Skip to content
pubscout

didcomm

2.4.0, released 5 weeks ago by affinidi.com

Implements the DIDComm v2 Messaging protocol for secure and private app communication.

$ flutter pub add didcomm
Source repository

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.

  • http2

    An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.

  • ag_ui

    Dart SDK for AG-UI protocol supporting event-based communication and SSE streaming.

  • connectanum

    A Dart/Flutter client implementing the WAMP protocol for RPC and Pub/Sub.

Works with

Packages commonly used together with didcomm: ones it builds on, ones built on it, and its own family.