DIDComm class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

DID Comm plugin for Agent

This plugin provides a method of creating an encrypted message according to the initial DIDComm-js implementation.

export declare class DIDComm implements IAgentPlugin
Implements: [IAgentPlugin](/docs/api/core.iagentplugin)


Be advised that this spec is still not final and that this protocol may need to change.


(constructor)(transports)(BETA) Constructor that takes a list of IDIDCommTransport objects.


methodsIDIDComm(BETA) Plugin methods
transportsIDIDCommTransport [](BETA)


getDidCommMessageMediaType({ message })(BETA) Partially decodes a possible DIDComm message string to determine the DIDCommMessageMediaType
packDIDCommMessage(args, context)(BETA) Packs a IDIDCommMessage using one of the DIDCommMessagePacking options.
sendDIDCommMessage(args, context)(BETA) Sends the given message to the recipient. If a return transport is provided it will be checked whether the parent thread allows reusing the route. You cannot reuse the transport if the message was forwarded from a DIDComm mediator. Emits an eventType 'DIDCommV2Message-sent' that contains the message id of packed DIDComm message IPackedDIDCommMessage after the message was sent.
sendMessageDIDCommAlpha1(args, context)(BETA)
unpackDIDCommMessage(args, context)(BETA) Unpacks a possible DIDComm message and returns the IDIDCommMessage and DIDCommMessagePacking used to pack it.