ssi
4.3.0, released 2 months ago by affinidi.com
Affinidi Self-Sovereign Identity library for Dart and Flutter.
WASM-ready
What it does
Provides tools and libraries for implementing Self-Sovereign Identity (SSI) solutions, supporting Decentralised Identifiers (DIDs), Verifiable Credentials (VCs), and Verifiable Presentations (VPs). It manages cryptographic keys and wallets across multiple DID methods.
AI-written summary of version 4.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to implement Decentralised Identifiers (DID) resolution and management.
- You are building a digital wallet that handles Verifiable Credentials (VCs) and Verifiable Presentations (VPs).
- You need cryptographic signing and verification using various key management solutions like BIP32 and persistent wallets.
Skip it when
- You only require standard centralized authentication like OAuth or social logins without decentralized identifiers.
- You are targeting a Dart SDK version older than 3.10.0.
Strengths
- Supports multiple DID methods including did:key, did:peer, did:web, and did:webvh.
- Provides comprehensive Verifiable Credential and Presentation data models (V1 and V2, JWT, and SD-JWT).
- WebAssembly compatibility through dart2wasm.
Weaknesses
- Niche domain-specific package with a steep learning curve related to SSI standards.
- Experimental support for post-quantum algorithms (ML-DSA-44) tied to draft W3C specifications.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 16
Add the dependency to pubspec.yaml and import ssi.dart. Requires Dart SDK version ^3.10.0.
import 'dart:typed_data';
import 'package:base_codecs/base_codecs.dart';
import 'package:ssi/ssi.dart';
void main() async {
final seed = hexDecode(
'a1772b144344781f2a55fc4d5e49f3767bb0967205ad08454a09c76d96fd2ccd',
);
final keyId = "m/44'/60'/0'/0'/0'";
final wallet = Bip32Wallet.fromSeed(seed);
final data = Uint8List.fromList([1, 2, 3]);
final signature = await wallet.sign(data, keyId: keyId);
final isRootSignatureValid =
await wallet.verify(data, signature: signature, keyId: keyId);
print('check if root signature is valid: $isRootSignatureValid');
}Works with
Packages commonly used together with ssi: ones it builds on, ones built on it, and its own family.
- archivessi depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- cryptossi depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- pointycastlessi depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- dart_jsonwebtokenssi depends on itA Dart library for creating, signing, decoding and verifying JSON Web Tokens (JWT).
- cryptographyssi depends on itCross‑platform cryptographic algorithms for Dart and Flutter.
- pinenaclssi depends on itDart implementation of TweetNaCl cryptographic library with high-level APIs
- ellipticssi depends on itPure Dart elliptic curve math for ECDSA, ECDH, key generation.
- ecdsassi depends on itImplements ECDSA signing and verification in pure Dart.