Class: DidCommAdapter ​
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:54
DidCommAdapter implements the CommunicationService interface for DidComm protocol. It handles message sending, receiving, and identity generation using DidComm. DidCommAdapter
Implements ​
Implements ​
Constructors ​
Constructor ​
new DidCommAdapter(
config?):DidCommAdapter
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:77
Constructs a new DidCommAdapter instance with the provided configuration.
Parameters ​
config? ​
DidCommAdapterConfig = ...
The configuration for the Nostr adapter.
Returns ​
DidCommAdapter
Properties ​
config ​
config:
DidCommAdapterConfig
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:65
The configuration for the DidComm adapter.
name ​
name:
string='didcomm'
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:59
The name of the communication service.
Implementation of ​
Methods ​
generateIdentity() ​
generateIdentity(
keys?):ServiceAdapterConfig
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:127
Generates a DidComm identity.
Parameters ​
keys? ​
Optional keys to use for identity generation.
Returns ​
The generated DidComm identity configuration.
Implementation of ​
CommunicationService.generateIdentity
registerMessageHandler() ​
registerMessageHandler(
messageType,handler):void
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:102
Registers a message handler for a specific message type.
Parameters ​
messageType ​
string
The type of message to handle.
handler ​
The handler function that processes the message.
Returns ​
void
Implementation of ​
CommunicationService.registerMessageHandler
sendMessage() ​
sendMessage(
_message,_recipient,_sender):Promise<void|Promise<string>[]>
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:114
Sends a message to a recipient using the Nostr protocol. This method is a placeholder and should be implemented with actual Nostr message sending logic.
Parameters ​
_message ​
any
The message to send, typically containing the content and metadata.
_recipient ​
string
The public key or identifier of the recipient.
_sender ​
string
The public key or identifier of the sender.
Returns ​
Promise<void | Promise<string>[]>
A promise that resolves when the message is sent.
Implementation of ​
CommunicationService.sendMessage
setKeys() ​
setKeys(
keys):void
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:93
Sets the keys used for Nostr communication.
Parameters ​
keys ​
The keys to set.
Returns ​
void
Implementation of ​
start() ​
start():
void
Defined in: packages/method/src/core/beacon/aggregation/communication/adapter/did-comm.ts:85
Starts the DidComm service.
Returns ​
void
Returns the DidCommAdapter instance for method chaining.