#affinidi #ssi

affinidi-tdk

Affinidi Trust Development Kit. A Rust library for building secure, privacy-preserving, and interoperable applications.

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

Download history 278/week @ 2026-04-17 163/week @ 2026-04-24 575/week @ 2026-05-01 522/week @ 2026-05-08 478/week @ 2026-05-15 329/week @ 2026-05-22 1369/week @ 2026-05-29 1354/week @ 2026-06-05 2345/week @ 2026-06-12 2785/week @ 2026-06-19 1081/week @ 2026-06-26 646/week @ 2026-07-03 1448/week @ 2026-07-10 2740/week @ 2026-07-17 3077/week @ 2026-07-24 893/week @ 2026-07-31

8,335 downloads per month
Used in 30 crates (15 directly)

Apache-2.0

1.5MB
31K SLoC

affinidi-tdk

Crates.io Documentation Rust License

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-tdk with 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 at major.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:

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:

  1. Add it as an optional = true dependency (path + major.minor version).
  2. Add a dep:-gated feature for it (and fold it into the relevant group feature — credentials / protocols / did-methods).
  3. Re-export it under a #[cfg(feature = "")] in src/lib.rs.
  4. Add a row to the Feature Flags table above.
  5. Extend the facade feature-matrix CI job.

License

Apache-2.0

Dependencies

~127MB
~3M SLoC