didcomm
2.4.0, released 5 weeks ago by affinidi.com
Implements the DIDComm v2 Messaging protocol for secure and private app communication.
What it does
Provides tools and libraries to send, receive, sign, and encrypt DIDComm v2 messages within your application. Supports various encryption algorithms, DID methods like did:peer and did:key, and connection to mediator services.
AI-written summary of version 2.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need secure, private, and decentralized messaging using Decentralized Identifiers (DIDs).
- Your app requires authenticated encryption (authcrypt) or anonymous encryption (anoncrypt) for message transport.
Skip it when
- You are building a standard REST or GraphQL client without decentralized identity requirements.
- You only need standard push notifications or real-time web sockets without DIDComm protocol framing.
Strengths
- Comprehensive support for DIDComm v2 message envelopes (plaintext, signed, authcrypt, anoncrypt).
- Supports multiple curves and algorithms like Ed25519, P-256, P-384, and P-521.
- Integrates with Affinidi Dart SSI for digital wallets and DID management.
Weaknesses
- Niche protocol domain with a steeper learning curve regarding decentralized identity and DID methods.
- Certain curves and content encryption algorithms have platform-specific limitations or lack full spec support.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 13
Requires setting up DID Manager, wallets via Affinidi Dart SSI, and proper cryptographic keys.
import 'package:didcomm/didcomm.dart';
// Compose a plain text message example
final message = Message(
id: '123',
type: 'https://example.com/protocols/1.0/message',
body: {'content': 'Hello DIDComm'},
to: ['did:example:recipient'],
from: 'did:example:sender',
);Alternatives
Packages that do the same job and could replace didcomm.
Works with
Packages commonly used together with didcomm: ones it builds on, ones built on it, and its own family.
- cryptodidcomm depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- uuiddidcomm depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- json_annotationdidcomm depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- web_socket_channeldidcomm depends on itCross‑platform WebSocket channel wrapper for Dart
- convertdidcomm depends on itEncoders and decoders for converting between different data representations.
- synchronizeddidcomm depends on itLock mechanism to prevent concurrent access to asynchronous code.
- diodidcomm depends on itA powerful HTTP networking package for Dart and Flutter with interceptors and request cancellation.
- pointycastledidcomm depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.