New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@animo-id/credo-ts-didcomm

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@animo-id/credo-ts-didcomm

Credo DIDComm Module

  • 0.5.14-alpha-20250213120231
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
318
Maintainers
0
Weekly downloads
 
Created
Source


Credo Logo

Credo DIDComm Module

License typescript @credo-ts/action-menu version


Base DIDComm package for Credo. Adds all DIDComm v1 Core protocols, such as Connections, Out-of-Band, Discover Features, Mediation Coordination, Message Pickup, Proofs and Credentials as defined in Aries RFCs.

Quick start

In order for this module to work, we have to inject it into the agent to access agent functionality. See the example for more information.

Note: At the moment, for a basic DIDComm agent to work, it is required to instantiate at least 3 modules besides the basic DidCommModule: OutOfBandModule, ConnectionsModule and MessagePickupModule

Example of usage

import type { DidCommModuleConfigOptions } from '@credo-ts/didcomm'

import { agentDependencies, HttpInboundTransport } from '@credo-ts/node'
import {
  ConnectionsModule,
  ProofsModule,
  CredentialsModule,
  HttpOutboundTransport,
  getDefaultDidcommModules,
} from '@credo-ts/didcomm'

const agent = new Agent({
  config: {
    /* config */
  },
  dependencies: agentDependencies,
  modules: {
    ...getDefaultDidcommModules(didcommConfig),
    connections: new ConnectionsModule({
      /* Custom module settings */
    }),
    credentials: new CredentialsModule({
      /* Custom module settings */
    }),
    proofs: new ProofsModule({
      /* Custom module settings */
    }),
    /* */
    /* other custom modules */
  },
})

// Register inbound and outbound transports for DIDComm
agent.modules.didcomm.registerInboundTransport(new HttpInboundTransport({ port }))
agent.modules.didcomm.registerOutboundTransport(new HttpOutboundTransport())

await agent.initialize()

// Create an invitation
const outOfBand = await this.agent.modules.oob.createInvitation()

In this example, by using the convenient method getDefaultDidcommModules you can easily instantiate the basic DIDComm protocols: out-of-band, connections, message pickup, discover features, proof exchange, issue credentials, basic message and mediation coordination. You can of course instantiate only the ones you need for your particular implementation.

FAQs

Package last updated on 13 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc