DIDComm Action Documentation
The DIDComm Action
component enables workflows to communicate with external wallets and applications using the DIDComm v2 protocol. This action allows for sending trust pings, messages, and verifiable credentials to recipients through secure, encrypted DIDComm channels.
Overview
DIDComm (Decentralized Identifier Communication) is a protocol for secure, private, and authenticated messaging between DID-identified entities. In the Blocktrust Credential Workflow platform, the DIDComm Action enables workflows to:
- Establish secure communication channels with external wallets
- Send basic messages to recipients
- Issue verifiable credentials directly to wallets
- Verify connectivity through trust ping operations
This component serves as a bridge between your workflow platform and the broader decentralized identity ecosystem, allowing for standardized credential exchange.
Configuration Options
Sender Peer DID
The DID that will be used as the sender identity for the DIDComm message:
- Select from the tenant’s available peer DIDs
- Displays the name and a truncated version of the DID for easy identification
- The private keys associated with this DID will be used to sign and encrypt the message
This identity represents your tenant in the communication. For information on managing PeerDIDs, see the PeerDID Settings documentation.
Recipient Peer DID
The DID of the recipient that the message will be sent to:
- Source:
- Static Value: Manually enter a specific recipient DID
- From Trigger: Use a DID provided in the trigger parameters
- From Previous Action: Use a DID produced by a previous action in the workflow
- Value:
- For static sources: The specific DID string to use
- For trigger sources: Select the parameter name that contains the DID
- For action outcomes: Select the action that produced the DID
The recipient DID must be a valid peer DID that the system can resolve to obtain service endpoints for message delivery.
DIDComm Type
The type of DIDComm message to send:
- Trust Ping:
- A simple connectivity test to verify that the communication channel works
- Useful for checking if a wallet is online and accessible
- Requires minimal configuration - just sender and recipient DIDs
- Message:
- A basic DIDComm message with customizable content fields
- Allows for defining a structured message with multiple fields
- Each field can have static or dynamic values
- Credential Issuance:
- Sends a verifiable credential to the recipient wallet
- Follows the DIDComm Issue Credential v2 protocol
- Requires a credential input from a previous action or trigger
Message Content (for Message type)
When the Message type is selected, you can define the content fields:
- Add Field: Creates a new message field with key and value
- Field Key: The property name in the message
- Field Value Source:
- Static: A fixed value entered directly
- Trigger Input: Value from a trigger parameter
- Action Outcome: Value from a previous action result
- Field Value: The actual content of the field
Credential Source (for Credential Issuance type)
When the Credential Issuance type is selected, you need to specify the credential to be sent:
- Source Selection:
- Static Value: Directly enter a W3C Verifiable Credential JWT
- From Trigger: Use a credential supplied by the workflow trigger
- From Previous Action: Use a credential produced by a previous action (typically an Issue W3C Credential action)
- Value Configuration:
- For static values: Enter the raw JWT credential
- For trigger inputs: Select the parameter that contains the credential
- For action outcomes: Select the action that produced the credential
How It Works
When a workflow with a DIDComm action is executed:
- The platform resolves both sender and recipient DIDs
- It retrieves the cryptographic keys associated with the sender DID
- The system resolves the recipient’s DID document to find service endpoints
- Based on the DIDComm type, it creates the appropriate message:
- For Trust Ping: A simple ping message
- For Message: A structured message with the defined fields
- For Credential Issuance: A credential offer message with the credential as an attachment
- The message is encrypted using the sender’s keys and the recipient’s public key
- The encrypted message is sent to the recipient’s service endpoint
- The result of the operation is stored in the workflow outcome
Technical Details
The DIDComm action:
- Uses the
PeerDidResolver
to resolve DIDs to their DID documents - Extracts service endpoints from the recipient’s DID document
- Handles mediator routing if the recipient uses a mediator
- Packages messages according to the DIDComm v2 specification
- Supports the Issue Credential v2 protocol for credential issuance
- Performs encryption and signing using the tenant’s keys
Integration with Other Components
This action integrates with:
- PeerDID Management: Uses tenant-managed Peer DIDs from the PeerDID Settings
- Issue W3C Credential Action: Can use credentials created by this action for issuance
- Workflow Context: Reads input parameters and stores operation results
- Parameter Resolution: Supports dynamic values from trigger inputs and previous actions
Use Cases
The DIDComm action is ideal for:
- Wallet Integration: Send credentials directly to user wallets
- Multi-Party Workflows: Communicate with multiple participants in a credential exchange
- Notification Systems: Alert users of important credential events
- Verification Requests: Initiate credential verification flows with external systems
- Trust Establishment: Create secure channels for subsequent credential exchange
Example Configurations
Trust Ping Configuration
A basic connectivity check:
- Sender PeerDID: Select one of your tenant’s Peer DIDs
- Recipient PeerDID: Specify the recipient’s DID (static or from trigger)
- DIDComm Type: Trust Ping
Credential Issuance Configuration
Send a credential to a wallet:
- Sender PeerDID: Select one of your tenant’s Peer DIDs
- Recipient PeerDID: Set to the subject’s DID (usually from a trigger parameter)
- DIDComm Type: Credential Issuance
- Credential Source: From Previous Action (select an Issue W3C Credential action)
Custom Message Configuration
Send a structured message:
- Sender PeerDID: Select one of your tenant’s Peer DIDs
- Recipient PeerDID: Specify the recipient’s DID
- DIDComm Type: Message
- Message Content: Add fields like “subject”, “body”, and “priority”
Requirements and Dependencies
For the DIDComm action to work properly:
- You must have at least one Peer DID created in your tenant settings (see PeerDID Settings)
- For credential issuance, you need a valid credential from a previous action
- The recipient DID must be resolvable and have valid service endpoints
- Your workflow platform must have outbound network access to reach the recipient’s service endpoints
Troubleshooting
Common issues and solutions:
- Message Delivery Failure: Ensure the recipient DID is valid and has accessible service endpoints
- Encryption Errors: Verify that your Peer DIDs have properly configured cryptographic keys
- Invalid Credential: For credential issuance, check that the credential is a valid JWT
- Missing Parameters: Ensure all required values are properly configured in the action