44 releases (7 breaking)
Uses new Rust 2024
| new 0.8.5 | Aug 5, 2026 |
|---|---|
| 0.8.4 | Jul 19, 2026 |
| 0.8.3 | Jun 13, 2026 |
| 0.6.3 | Mar 26, 2026 |
| 0.1.7 | Mar 27, 2025 |
#124 in Authentication
8,335 downloads per month
Used in 30 crates
(15 directly)
1.5MB
31K
SLoC
affinidi-tdk
The unified entry point for the Affinidi Trust Development Kit. Depend on this single crate and enable feature flags to pull in only the libraries you need.
Disclaimer: This project is provided "as is" without warranties or guarantees. Users assume all risks associated with its deployment and use.
Installation
[dependencies]
affinidi-tdk = "0.8"
Feature Flags
Every published capability crate is reachable through a facade feature. Group
features (e.g. credentials, protocols) enable a whole layer; the individual
features let you pull in just one crate. The * re-export column is the module
name the crate is re-exported as (e.g. affinidi_tdk::vc).
| Feature | Default | Enables | Re-export | Description |
|---|---|---|---|---|
messaging |
Yes | affinidi-messaging-sdk |
messaging |
Affinidi Messaging SDK |
meeting-place |
Yes | affinidi-meeting-place |
meeting_place |
Affinidi Meeting Place SDK |
did-peer |
Yes | — (code-gate) | — | did:peer helpers in dids |
data-integrity |
Yes | affinidi-data-integrity |
data_integrity |
W3C Data Integrity proofs |
credentials |
No | group ↓ | — | All credential formats + status + proofs |
vc |
No | affinidi-vc |
vc |
W3C Verifiable Credentials |
sd-jwt |
No | affinidi-sd-jwt |
sd_jwt |
SD-JWT |
sd-jwt-vc |
No | affinidi-sd-jwt-vc |
sd_jwt_vc |
SD-JWT VC |
mdoc |
No | affinidi-mdoc |
mdoc |
ISO mdoc / mDL |
status-list |
No | affinidi-status-list |
status_list |
Bitstring status lists |
protocols |
No | group ↓ | — | OID4VC protocol family |
oid4vc-core |
No | affinidi-oid4vc-core |
oid4vc_core |
OID4VC core |
siopv2 |
No | affinidi-siopv2 |
siopv2 |
SIOPv2 |
openid4vci |
No | affinidi-openid4vci |
openid4vci |
OpenID4VCI |
openid4vp |
No | affinidi-openid4vp |
openid4vp |
OpenID4VP |
did-methods |
No | group ↓ | — | Standalone DID method crates |
did-web |
No | affinidi-did-web |
did_web |
did:web |
did-ebsi |
No | did-ebsi |
did_ebsi |
did:ebsi |
did-scid |
No | did-scid |
did_scid |
did:scid |
trust |
No | affinidi-trust-lists |
trust_lists |
Trust lists |
tsp |
No | affinidi-tsp |
tsp |
Trust Spanning Protocol |
Use the facade or direct sub-crate deps, not both. Mixing
affinidi-tdkwith a direct dependency on a crate it re-exports can resolve two copies of that crate. Foundation crates (affinidi-crypto,affinidi-tdk-common) are pinned atmajor.minor(caret), so any compatible patch resolves to a single version within the facade's tree.
Disable defaults with default-features = false in your Cargo.toml or
--no-default-features on the command line, then enable only what you need:
[dependencies]
affinidi-tdk = { version = "0.8", default-features = false, features = ["credentials", "protocols"] }
Re-exported Crates
This crate re-exports the following libraries:
affinidi-did-resolver-cache-sdk— DID resolution and cachingaffinidi-did-common— DID Document typesaffinidi-messaging-didcomm— DIDComm protocolaffinidi-messaging-sdk— Messaging SDK (feature:messaging)affinidi-meeting-place— Meeting Place SDK (feature:meeting-place)affinidi-data-integrity— Data Integrity proofs (feature:data-integrity)affinidi-did-authentication— DID authenticationaffinidi-tdk-common— Shared utilitiesaffinidi-secrets-resolver— Secret managementaffinidi-crypto— Cryptographic primitives
Examples
Runnable examples live in examples/ and import only through
affinidi_tdk::* — they are the canonical onboarding pattern (never depend on a
sub-crate directly):
did_auth— authenticate a DID against a service endpoint.resolve_did— resolve a DID and print its document.
cargo run -p affinidi-tdk --example resolve_did -- did:key:z6Mk…
Contributing: new capability crate ⇒ new facade feature
When a new published capability crate is added to the workspace, it must be made reachable through this facade in the same change:
- Add it as an
optional = truedependency (path +major.minorversion). - Add a
dep:-gated feature for it (and fold it into the relevant group feature —credentials/protocols/did-methods). - Re-export it under a
#[cfg(feature = "…")]insrc/lib.rs. - Add a row to the Feature Flags table above.
- Extend the facade feature-matrix CI job.
Related Crates
affinidi-messaging— Full messaging frameworkaffinidi-did-resolver— DID resolution
License
Dependencies
~127MB
~3M SLoC