Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Hyperledger Identus SDK for Rust

Chain-neutral Rust foundations for decentralized identity, verifiable credentials, and wallet products.

Pre-release software: the active develop line and 0.1.0-rc.1 trains are experimental. A registry receipt—not this handbook—proves whether a crate is published. No crate is production-supported, certified, or a final SemVer commitment.

This handbook answers three practical questions:

  1. What reusable capabilities belong in SDK-Rust?
  2. Why are the crypto foundation and DID capabilities separate release trains?
  3. What evidence and human decisions remain before each candidate can advance?

The short version

CrateOne responsibilityDeliberately outside
identus-deriveGenerate recurring validated-newtype and port-marker scaffolding at compile time.Runtime SSI, protocol, chain, storage, and product policy.
identus-coreProvide chain-neutral errors, time, URL, component metadata, and foundational capability types.Cryptographic algorithms, DID methods, transports, custody, and wallet policy.
identus-cryptoProvide reusable bytes-in/bytes-out cryptographic primitives and explicit entropy injection.Key custody, hardware/KMS policy, JOSE/protocol policy, ledgers, and wallet decisions.

The dependency direction is intentional: crypto builds on core; core uses the derive tooling; neither foundation may depend on a blockchain, wallet product, or downstream repository.

The next independent train is candidate-only. identus-did supplies generic DID values, document models, and resolver ports. identus-did-resolver-http is the optional Axum host adapter. It adds no DID method, ledger, chain, wallet, or product policy.

Start here

SDK-Rust is the generic Rust foundation shared by Identus ecosystem products. It is not a wallet application, blockchain SDK, cloud service, or umbrella that automatically owns every SSI protocol.

Ownership rule

Reusable, chain-neutral domain primitives, cryptographic utilities, protocol engines, ports, validation, and conformance evidence belong in SDK-Rust. Method, ledger, runtime, custody, consent, trust, persistence, user experience, deployment, and certification policy remain with their owning downstream.

That distinction allows Midnight Identity, NeoPRISM/Cardano, Lace ID Portal, Oxid, and future products to share foundations without forcing one chain or product model into the others.

Maturity vocabulary

TermMeaning here
ImplementedCode and tests exist; the public surface may still change.
CandidateA reproducible artifact is available for review; publication status is proven only by its registry receipt.
Experimental 0.xSemVer applies with an explicit migration policy and support window.
SupportedThe documented compiler, targets, features, and support period are an effective promise.
CertifiedAn external assessment or certification exists; tests alone never imply this.

The first three packages—identus-derive, identus-core, and identus-crypto—are release-activated 0.1.0-rc.1 packages. The independent identus-did and identus-did-resolver-http train is candidate-only: its release-shaped archives are prepared in an isolated temporary workspace, but its canonical manifests remain version 0.0.0 with publish = false. Every other workspace package remains 0.0.0, unpublished, and outside either candidate closure.

Branches

  • develop is the protected integration and documentation source.
  • main is intentionally reserved and is not populated by site publication.
  • Releases require a separately approved exact revision and protected process.

For the repository-level contract, see Governance, constraints, and the release policy.

The first crypto release train

The first published prerelease is a three-package closure at 0.1.0-rc.1:

identus-crypto =0.1.0-rc.1
    ├── identus-core =0.1.0-rc.1
    └── identus-derive =0.1.0-rc.1

identus-core =0.1.0-rc.1
    └── identus-derive =0.1.0-rc.1

identus-derive is included because it generates foundational type behavior at compile time. identus-core gives the crypto crate stable chain-neutral error, metadata, URL, and clock contracts. identus-crypto is the independently useful consumer capability that justified preparing the closure first.

Why not release the whole monorepo?

The workspace also contains implemented experimental components and quarantined placeholders. Releasing all of them together would convert package presence into accidental API, support, and namespace promises. The isolated train keeps the first review cohesive. DID follows its own candidate-only train; credentials, protocols, bindings, and wallet ports remain on their own evidence-driven timelines.

The separate DID candidate train reuses the released foundation without changing this train’s immutable tag or publication receipt.

Candidate and publication mechanics

The three canonical package manifests carry 0.1.0-rc.1; every unrelated workspace member retains the 0.0.0, publish = false default. The candidate tool creates a temporary three-member workspace, uses exact internal requirements, and assembles every Cargo archive twice. It verifies normalized contents, extracted archive closure, feature profiles, public API, SemVer, SBOMs, checksums, tool versions, source identity, and limitations.

Candidate preparation is deliberately not publication. The descriptor states publication = "release-gated": upload occurs only from a signed exact tag through the protected crates-io environment, with an independent maintainer approval and an immutable publication receipt. The namespace- creating train uses a short-lived bootstrap token; every later train uses crates.io trusted publishing through OIDC.

Published API origin

The checked-in identus-crypto 0.1.0-rc.1 public-API baseline describes the artifact that was actually published. Its digest is immutable; later additive development does not rewrite release history.

Current qualification generates API with the pinned toolchain and compares it to that origin as a line multiset. Every published occurrence must remain. Additional lines are compatible and appear in a bounded JSON report; a removed or changed signature fails the candidate. Baseline initialization is rejected while the descriptor identifies published-origin. A compatibility rejection retains only its diagnostics report; it does not expose candidate packages, a publication workspace, or a success receipt.

This distinction matters: an unpublished first candidate may establish or, with exact evidence, reconcile its origin. A published train may only compare against its origin or select a new version through a separately approved release slice.

The credential-bearing job repeats the signed-tag, exact-SHA, and protected develop ancestry checks after environment approval. Candidate artifacts are scoped to the workflow run rather than an individual attempt, so a failed job can be retried without rebuilding or substituting evidence. Existing packages and release assets are reused only when their checksums and release identity match exactly; disagreement fails closed.

Read ADR 0134, ADR 0113, and the candidate descriptor for the executable contract.

DID candidate train

M5 prepares two chain-neutral packages as an independent 0.1.0-rc.1 candidate:

identus-did-resolver-http =0.1.0-rc.1
    ├── identus-did =0.1.0-rc.1
    └── identus-core =0.1.0-rc.1

identus-did =0.1.0-rc.1
    ├── identus-core =0.1.0-rc.1
    └── identus-derive =0.1.0-rc.1 (build-time)

Responsibilities and boundary

PackageOwnsDoes not own
identus-didValidated DID and DID URL values, DID documents, verification methods, services, resolver-facing models, and generic resolver ports.DID methods, ledger access, networking, persistence, key custody, trust, consent, or wallet policy.
identus-did-resolver-httpAxum request/response mapping, DID resolution content negotiation, and optional openapi schema types.A resolver implementation, DID method, deployment topology, authentication, rate limiting, or product policy.

The HTTP package is an optional host adapter, not a required facade. Consumers that need only domain values or implement their own transport select identus-did directly. DID method and chain adapters depend on the generic ports from outside this candidate boundary.

Candidate state

The canonical workspace manifests are still version 0.0.0 with publish = false. The candidate tool stages release-shaped archives in an external scratch workspace without changing those manifests. Its reserved future tag is identus-did-v0.1.0-rc.1; no tag, GitHub release, publication workflow, or crates.io artifact is claimed here.

The exact protected source revision for this review is:

8fb2f21ae178ec77bdd1afc9e128e8e7779edeed

Use the source-adoption instructions to evaluate it. A library that will itself be published to crates.io cannot retain a Git dependency and must wait for registry-published packages.

Reproducible evidence

Two clean preparations reproduced the same candidate archives and evidence:

Evidenceidentus-did SHA-256identus-did-resolver-http SHA-256
Cargo archive7736e445ffce327fae19a55c7b8b7adf38887f93f56aba4a9a804d18d765fb6890366988dd00a4730d398431531d0066eb109ff48a1fcc8f0aed4d9673678480
Public API origin5c985cd2d3f26c07230ace1086d7a178662a4f583d0086574ac9baa6a00be6399c432f0d0c3d5db92da3aa88aed05164aa2adf483c11be84b9239c9973179df6
Normalized CycloneDX 1.5d0e0976fa6d96918d59202cd173c4162459f19b253120c41fce3058e5c59d109fbaa3985eacf2c89649799c1a33effeb2b521aa21c5ec92ff70444a6afb126d6

The committed API snapshots establish the origin for later SemVer comparison. Because this is the first candidate, compatibility is explicitly not-applicable-first-candidate; no self-comparison was used to manufacture a green result. The SBOMs describe dependencies and licenses but do not replace Cargo-deny, advisory review, provenance, or security assessment.

Before publication, the identus-did origin was intentionally rebased once to include the already-protected bounded JSON wire validator. Pinned cargo-public-api 0.52.0 reported zero removals and exactly 13 additions; the resolver API remained unchanged. The closed API-origin receipt binds the exact source revision, hashes, classification, and symbol set. This is an additive correction to an unpublished origin, not a stable API promise.

Primary evidence:

Compiler and target contract

PackageLinux + macOSBrowser WASMAndroid ARM64iOS ARM64
identus-didPrimary tests + MSRV compile checksCompile-checkedCompile-checkedCompile-checked
identus-did-resolver-httpPrimary tests + MSRV compile checksNot supportedNot supportedNot supported

The matrix always exercises the staged 0.1.0-rc.1 sources and their exact internal dependency versions. Portable rows use cargo check with Rust 1.98.1 and 1.89.0; they make no browser, device, simulator, binding, packaging, performance, or certification claim. The HTTP adapter is host-only by design. Weekly/manual slow CI produces four attempt-scoped lane receipts and accepts their aggregate only when source revision, compiler identities, target rows, outcomes, and staged lockfile agree.

Promotion gates

Candidate assembly and documentation do not authorize publication. The matrix implementation is tracked in #387, but only a natural or explicitly approved manual slow run at the final revision constitutes release evidence. M5 then requires an independent exact-SHA decision in #388. Administrator-owned trusted-publishing hardening remains tracked by #344.

See release readiness for the consolidated gate table. The DID candidate readiness packet binds the closed evidence, downstream E2E receipts, retained historical failed-run evidence, and remaining exact-SHA approval gates.

DID candidate readiness packet

The identus-did train is technically qualified but is not yet approved or published. This page is the durable engineer-review packet for identus-did 0.1.0-rc.1 and identus-did-resolver-http 0.1.0-rc.1.

Current state: engineering qualification complete; publication blocked on separate explicit human authority.

The machine-readable source is the readiness manifest.

Candidate identity

FieldValue
Traindid
Candidateidentus-did-0.1.0-rc.1
Packagesidentus-did, then identus-did-resolver-http
Protected evidence basec429ac494a6eaeb2e22c0b38a5b1d70c0eb6ff62
Protected merge revisionc429ac494a6eaeb2e22c0b38a5b1d70c0eb6ff62
Staged lock SHA-256f7535a6819c9b9e4474c95b427b54646d46ccac51703c680086ef75c790fba4f
identus-did API SHA-2565c985cd2d3f26c07230ace1086d7a178662a4f583d0086574ac9baa6a00be639
Resolver API SHA-2569c432f0d0c3d5db92da3aa88aed05164aa2adf483c11be84b9239c9973179df6
Candidate archive SHA-2567736e445ffce327fae19a55c7b8b7adf38887f93f56aba4a9a804d18d765fb68 / 90366988dd00a4730d398431531d0066eb109ff48a1fcc8f0aed4d9673678480
CycloneDX SHA-256d0e0976fa6d96918d59202cd173c4162459f19b253120c41fce3058e5c59d109 / fbaa3985eacf2c89649799c1a33effeb2b521aa21c5ec92ff70444a6afb126d6
Reserved future tagidentus-did-v0.1.0-rc.1
Slow receipt SHA-256b8b4cb25793776c5e01a0752fd3ca6b3b09ae1554829821425b2a663288bc14d
DID matrix SHA-256d1cb0f8c55b08bc89100a0401ca348b1f8167c8117c0be39ba96ca48e50187c4
Canonical source state0.0.0, publish = false
Exact release subjectNot authorized; #344 owns trusted-publishing administration

Opaque receipt hashes are identifiers, not review content or a ritual a person must approve without understanding. Human review applies to the code diff, acceptance behavior, test and evidence limits, retained SDK/NeoPRISM ownership boundary, and the explicit non-claims below. Publication remains a separate decision that requires fresh authority and cannot be inferred from engineering qualification.

Closed evidence

Evidence classStatusReceipt
Independent train identity and deterministic archivesComplete#382, ADR 0153
Public API origins and normalized CycloneDXCompletePR #584, factory receipt, ADR 0154
Engineer handbook and source-adoption guidanceComplete#386
Linux/macOS primary + MSRV and package-specific portable targetsComplete#387, ADR 0155
Exact protected-revision slow evidenceComplete; 11 jobs passed on attempt 1run 40888621367, receipt packet
Downstream source-pinned adoptionCompleteNeoPRISM PR #324
Publication authorityPending and separate from engineering review#344

The retained historical failed weekly run, run 40260649503, failed in slow (macos-latest) after RustSec classified build-time-only basic-toml 0.1.10 as unmaintained. Issue #564 and ADR 0191 introduced a narrow, exact-path, expiring acceptance without waiving vulnerabilities or unrelated advisories. The failed run remains historical evidence; it is superseded, not relabelled, by exact protected run 40888621367, which passed all eleven jobs on attempt 1.

Downstream E2E and QoS evidence

NeoPRISM remains the owner of Cardano observation, persistence, service runtime, and production network selection. Its SDK adoption branch and parity harness provide independent consumer-shaped evidence:

  • SDK adoption PR #324 merged with exact SDK revision c429ac494a6eaeb2e22c0b38a5b1d70c0eb6ff62 through compatibility facades.
  • Parity issue #325 defines the comparison contract.
  • Harness PR #327 provides isolated published-versus-candidate execution.
  • Repeated final-candidate receipt records byte-identical canonical manifests at fixed Preprod slot 10,723,321.
  • Latest composition receipt records zero missing, extra, duplicate, or changed operations; zero pending rows and restarts; and diagnostic duration, cursor-rate, CPU, RAM, and process measurements.

These runs prove bounded compatibility for the stated images, revisions, network boundary, and harness. They are not a claim that SDK-Rust owns Cardano integration, that every chain state was sampled, or that diagnostic QoS ratios are production thresholds.

Reproduce the repository evidence

From an artifact-free checkout at the candidate revision:

nix develop --command python3 scripts/check-release-candidates.py .
nix develop --command python3 scripts/check-did-final-readiness.py .
nix build .#docs-site --no-link
scripts/factory check

The complete Linux/macOS slow matrix ran in the protected slow workflow and binds the same protected revision. Local execution cannot substitute for its hosted macOS receipt. Future publication still requires separate explicit human authority; that authority is not a second review of opaque hashes.

Explicit non-claims

This packet does not claim crates.io publication, stable API compatibility, certification, vulnerability-free status, browser/device runtime support, production readiness, publication approval, or stable API. The HTTP adapter remains host-only; portable target rows are compile checks for identus-did only. Publication is a later protected decision.

Candidate crates

Each candidate crate has one reason to exist and a visible boundary. The separation is designed for low coupling, high cohesion, minimal feature cones, and independent future evolution.

Crypto foundation train

CrateKindRuntime dependency direction
identus-deriveProcedural macroBuild-time only
identus-coreFoundation values and portsDepends on identus-derive and Serde
identus-cryptoCryptographic primitivesDepends on identus-core and identus-derive; algorithms are feature-gated

The release train is not a layered facade where consumers must always import all three. A consumer normally selects the highest-level crate it needs; Cargo resolves its exact internal closure.

DID candidate train

CrateKindRuntime dependency direction
identus-didGeneric DID domain and portsDepends on released identus-core; uses identus-derive at build time
identus-did-resolver-httpOptional Axum HTTP adapterDepends on identus-did, released identus-core, and host HTTP libraries

These two packages are candidate-only and source-evaluated. They are not available from crates.io merely because a staged 0.1.0-rc.1 archive and public-API origin exist. See the DID candidate review.

Portable DID methods

CrateKindRuntime dependency direction
identus-did-keyStrict effect-free did:key profileDepends on generic DID/crypto foundations; opt-in registry composition
identus-did-jwkBounded effect-free did:jwk profileDepends on generic DID/crypto/JSON foundations; opt-in registry composition

These packages are unpublished experimental source components. Their frozen profiles, bounds, redacted errors, conformance packets, fuzzing, benchmarks, and registry E2E routes are reviewed independently from the generic DID candidate train.

Portable PRISM stack

CrateKindRuntime dependency direction
identus-prism-didPRISM method semanticsDepends on generic DID/crypto foundations
identus-prism-vdrPRISM VDR semanticsDepends on identus-prism-did
identus-prism-indexerOrdered atomic indexing coreDepends on identus-prism-vdr

These are unpublished experimental source packages, not part of either activated release train. See the portable-stack walkthrough for effect boundaries, executable evidence, and downstream adoption status.

Selective-disclosure credential semantics

CrateKindRuntime dependency direction
identus-sd-jwtRFC 9901 mechanicsDepends on JOSE and generic credential/presentation vocabulary
identus-sd-jwt-vcCanonical draft-22 VC profileDepends on the RFC engine and generic credential vocabulary

Both crates are unpublished experimental source components. Protocol crates are dev/test dependencies of the profile, not production foundations.

identus-derive

identus-derive is compile-time tooling for repetitive, security-sensitive domain-type structure.

It owns

  • #[derive(Newtype)] for supported single-field string, byte, and numeric tuple structs;
  • generated constructors, accessors, conversions, display behavior, optional Serde integration, and fallible parsing appropriate to each category;
  • #[identus::port], an inert capability marker that enforces the SDK’s port-trait naming convention;
  • validation of generated output against forbidden unsafe constructs before tokens leave the macro.

It does not own

  • business or protocol validation rules;
  • a runtime object model;
  • cryptography, serialization formats, storage, transport, or chains;
  • arbitrary code generation for downstream convenience.

The consuming type declares its domain constraint. The macro standardizes the safe shape; it does not decide what a valid DID, credential, key, or wallet policy means.

Why it is a separate crate

Rust procedural macros compile for the build host and require a dedicated proc-macro package. Keeping that compiler surface separate also prevents syn, quote, and proc-macro2 from becoming runtime dependencies of SDK consumers.

Review focus

  • Diagnostics and generated public APIs are compatibility surfaces.
  • Generated code must inherit the repository’s no-unsafe policy.
  • Compile-fail fixtures are part of the contract, not incidental tests.
  • Runtime crates should expose explicit types rather than re-exporting the macro crate as a broad facade.

Source

identus-core

identus-core holds small chain-neutral values and capability contracts that multiple SDK components need without depending on a protocol or product.

It owns

  • stable component metadata;
  • capability identifiers and error codes;
  • redaction-safe IdentusError, ErrorKind, and IdentusResult contracts;
  • bounded generic URLs;
  • wall and monotonic clock ports plus millisecond time/duration values.

The public error value stores static public fields. Its display form contains a stable code and public message, not secrets or internal debugging context.

It does not own

  • a catch-all prelude or umbrella SDK facade;
  • cryptographic algorithms or secret-bearing key types;
  • DID/VC/protocol wire models;
  • network clients, persistence, telemetry, trust, custody, or wallet policy;
  • chain or runtime integration.

Dependency role

identus-core uses identus-derive for shared type conventions and Serde for the bounded values that require serialization. Higher crates depend inward on core; core must never depend outward on those components.

Example: public error boundary

use identus_core::{CapabilityId, ErrorCode, ErrorKind, IdentusError};

let error = IdentusError::public(
    ErrorCode::new("invalid_input"),
    ErrorKind::InvalidInput,
    CapabilityId::new("example"),
    "input is invalid",
);

assert_eq!(error.to_string(), "invalid_input: input is invalid");

Source

identus-crypto

identus-crypto provides reusable primitive operations on key material. Its contract is bytes-in/bytes-out cryptography with typed boundaries—not custody, wallet orchestration, or protocol policy.

Capability surface

  • Ed25519 signing and verification;
  • X25519 key agreement material and Ed25519-to-X25519 conversion;
  • secp256k1 and P-256 keys, signing, and verification;
  • SHA-256/SHA-512 and supporting HMAC/PBKDF2 paths;
  • BIP-39, secp256k1 BIP-32, SLIP-0010, and Cardano V2 Ed25519-BIP32;
  • bounded hex, Base64URL, public JWK, JWK thumbprint, and public COSE Key representations;
  • caller-injected SecureRandom for key generation and mnemonic creation.

Feature policy

Algorithms and encodings are feature-gated. Consumers should disable defaults and select the smallest reviewed capability cone when they do not need the full suite.

FeatureAdds
hashSHA-256 and SHA-512 digest values/functions
ed25519Ed25519 key and signature operations; public JWK support
x25519X25519 keys; conversion also requires hash
secp256k1K-256 key and ECDSA operations
secp256r1P-256 key and ECDSA operations
jwk / jwk-thumbprintBounded public JWK values and RFC 7638 thumbprints
coseBounded public COSE Key values
derivationBIP-39, BIP-32/SLIP-0010, HMAC, and required curves
cardano-bip32Cardano V2 extended Ed25519 keys
kmp-compatExplicit legacy KMP/Apollo interop path

Security boundary

Secret-bearing SDK types redact diagnostics and use zeroization where their owned representation permits it. The workspace forbids first-party unsafe code. Entropy is explicit and fallible; the production adapter lives outside the primitive crate.

Consumers still own:

  • non-exportable key handles and hardware/KMS integration;
  • secure storage, backup, recovery, access control, and consent;
  • algorithm/profile negotiation and protocol verification policy;
  • side-channel and platform hardening appropriate to their threat model;
  • rate, message-size, and work budgets at the calling boundary.

Example: minimal hashing

use identus_crypto::sha256;

let digest = sha256(b"bounded public input");
assert_eq!(digest.as_array().len(), 32);

Before registry publication, evaluation uses a full immutable Git revision and an explicit feature set. See Adoption.

Source

identus-sd-jwt-vc

identus-sd-jwt-vc is the canonical, bounded Verifiable Digital Credential profile over the identus-sd-jwt RFC 9901 engine. It is pinned to draft-ietf-oauth-sd-jwt-vc-22 and emits exact dc+sd-jwt credentials.

What it owns

  • protected typ=dc+sd-jwt and generic envelope format=dc+sd-jwt;
  • vct, aka_vcts, registered numeric dates, cnf, and non-selective claim placement;
  • finite caller-supplied issuer discovery, Type Metadata, and status-list evidence;
  • redaction-safe receipts and type/status queries;
  • an offline OID4VCI/OID4VP/selective-presentation/holder-binding journey.

What it does not own

No HTTP, certificate parsing or path building, DID resolution, JWK-set retrieval, issuer authorization, trust anchors, status-list retrieval or decoding, freshness/acceptance policy, rendering, persistence, replay, UI, legacy vc+sd-jwt output, or language-specific DTO compatibility is included.

State progression

The profile consumes a disclosure-verified RFC value. Optional evidence can prove structural correlation only; it never produces a product trust or credential-acceptance decision. The generic report does not promote a caller-selected verification key into issuer resolution: that stage remains NotChecked without correlated issuer discovery evidence. Draft-22 array and wildcard Type Metadata paths are first-class, and generic reports keep issuer, schema and status evidence failures in their own stages.

Evidence

cargo test -p identus-sd-jwt-vc --all-features
cargo bench -p identus-sd-jwt-vc --bench directional

The draft identity is bound in code and tests by name, date, canonical URL and SHA-256. Any later draft or RFC requires a new reviewed compatibility slice.

identus-did-key

identus-did-key is an independently selectable, effect-free DID-method package. It turns caller-owned public keys into canonical did:key values, parses a strict bounded profile, and projects local DID documents without a network, runtime, store, or global registry.

Supported profile

SurfaceIncludedExcluded
Encodingcanonical base58-btc zbase64url u, non-canonical varints
Public keysEd25519, X25519, P-256, secp256k1private codecs, P-384, BLS, RSA
Verification methodMultikey with publicKeyMultibasedonor DTOs and alternate suites
Relationshipscanonical non-weak Ed25519 and other signing curves: four signing/capability relationships; contributory direct X25519: key agreementweak Ed25519, low-order X25519 and implicit Ed25519-to-X25519 conversion
Operationscreate, parse, deterministic local resolveupdate, deactivate, network resolution
Representationscontext-free DID JSON; DID Core + Multikey contexts for DID JSON-LDJSON-LD processing or expansion

The method-specific identifier is limited to 128 bytes and decoded public material to 67 bytes. Parsing uses a fixed stack buffer, canonical unsigned varints, exact key lengths, SDK curve validation, canonical re-encoding, and content-free error categories. Ed25519 public keys must additionally use a canonical field encoding and not be weak. X25519 public keys must use a canonical field encoding and produce a contributory shared secret.

Explicit composition

use identus_did::DidMethodRegistry;
use identus_did_key::DidKeyResolver;

let registry = DidMethodRegistry::builder()
    .register(DidKeyResolver.into_method_binding())?
    .build();
Ok::<(), identus_did::Error>(())

Linking the package never changes a global default. Products choose the method explicitly and continue to own custody, trust, persistence, transport, consent, telemetry, and runtime policy.

Evidence

The fixture-driven conformance suite binds the pinned did:key v0.9 draft to independent DIF, Spruce, and Impierce Rust oracles without adding those crates as dependencies. Property tests, a registry E2E, a bounded fuzz target, and a directional benchmark cover the selected profile. The registry E2E additionally proves representation negotiation: DID JSON is context-free while DID JSON-LD carries the DID Core and Multikey contexts.

Run the readable local E2E:

cargo test -p identus-did-key --test registry_e2e

The canonical manifest remains experimental at 0.0.0 with publication disabled. Compile evidence for native, WASM, iOS, and Android is not a claim of browser/device packaging, certification, or production support.

identus-did-jwk

identus-did-jwk is an independently selectable, effect-free DID-method package. It turns caller-owned public JWKs into deterministic did:jwk values, parses bounded duplicate-safe JSON, and projects local DID documents without a network, runtime, store, custody layer, or global registry.

Supported profile

SurfaceIncludedExcluded
Carriercanonical unpadded base64url over UTF-8 JSONpadding, alternate alphabets, duplicate names
Public keysEd25519, X25519, P-256, secp256k1private/symmetric keys, unsupported curves
JWK policyabsent use, explicit sig or enc, bounded public extensionskey_ops and extension-driven relationship policy
Verification methodJsonWebKey2020 with publicKeyJwk at fixed #0kid fragments and donor DTOs
Operationscreate, parse, deterministic local resolveupdate, deactivate, network resolution
Representationscontext-free DID JSON; DID Core + JWS 2020 contexts for DID JSON-LDJSON-LD processing or expansion

Carrier text is bounded at 21,846 bytes and decoded JSON at 16,384 bytes. The duplicate-safe parser additionally limits depth to 16, nodes to 1,024, and top-level members to 64. Creation applies the same serialized ceilings, and both entry paths preflight generic DID document projection limits. Accepted values therefore remain resolvable rather than deferring an extension-shape failure until projection. All four curve families receive actual public-key validation before use.

Explicit composition

use identus_did::DidMethodRegistry;
use identus_did_jwk::DidJwkResolver;

let registry = DidMethodRegistry::builder()
    .register(DidJwkResolver.into_method_binding())?
    .build();
Ok::<(), identus_did::Error>(())

Linking the package never changes a global default. Products continue to own custody, trust, persistence, transport, consent, telemetry, and runtime policy.

Evidence

The attributed fixture packet executes the pinned P-256 and X25519 examples. Property tests, alternate-serialization tests, security negatives, an opt-in registry E2E, bounded fuzz target, and directional benchmark cover the profile.

Run the readable local E2E:

cargo test -p identus-did-jwk --test registry_e2e

The manifest remains experimental at 0.0.0 with publication disabled. Portable compile evidence does not claim browser/device packaging, certification, consumer adoption, or production support.

identus-prism-did

Portable, chain-neutral PRISM DID method semantics.

Responsibility

  • parse bounded short-form and long-form PRISM identifiers;
  • preserve exact inbound signed operation bytes for hashing and verification;
  • construct and validate create, update, and deactivate operations;
  • reduce operations into deterministic method state atomically; and
  • project active state into generic identus-did documents.

Typed constructors validate keys, services, contexts, and ordered actions before deterministic protobuf encoding. Callers sign RawPrismOperation::as_bytes() through their own custody implementation and assemble a SignedPrismOperation; this crate never owns entropy or private keys.

Dependency direction

The crate depends inward on identus-did, narrowly featured identus-crypto, identus-core, and private prost wire types. Generated protobuf values are not public API. VDR and indexer crates depend on this crate; the generic layers do not depend back on PRISM.

Limits and non-goals

The supported profile bounds operation/envelope bytes, identifiers, keys, services, contexts, projection amplification, and update work. It does not perform ledger lookup/submission, persistence, HTTP, scheduling, custody, or product policy.

identus-prism-vdr

Bounded, effect-neutral PRISM verifiable-data-registry semantics.

Responsibility

  • parse bounded create, update, and deactivate storage operations;
  • authorize exact operation bytes with the active PRISM VDR key;
  • represent root ownership, current head, and terminal state; and
  • traverse ancestry locally first under finite depth and lookup budgets.

The crate returns typed, redacted outcomes for malformed, missing, cyclic, stale, terminal, unauthorized, and resource-exhausted operations.

Dependency direction

The crate depends on identus-prism-did for method state and exact signed envelopes. identus-prism-indexer composes VDR mutations; no generic crate depends on this method-specific layer.

Ports and non-goals

VdrLookup is a caller-implemented read port. The crate does not supply a Cardano client, SQL repository, cache, retry loop, runtime, HTTP service, CLI, or deployment. Cancellation belongs between bounded calls.

identus-prism-indexer

Deterministic PRISM transaction planning and atomic commit contracts.

Responsibility

  • validate one complete bounded, ordered source transaction;
  • derive a domain-separated transition digest over exact records;
  • probe immutable transition receipts before mutable-state reads;
  • plan DID and VDR mutations in wire order; and
  • submit the complete mutation set plus next cursor through one atomic commit.

Exact replay is idempotent. Identity reuse with different content, stale cursors, incomplete batches, malformed operations, invalid state, and commit conflicts fail closed.

Dependency direction

This is the outer portable composition crate. It depends on identus-prism-vdr, which depends on identus-prism-did. It does not pull in an async executor, network client, database driver, Cardano client, or native system library.

Ports and non-goals

Adopters implement cursor, transition-receipt, DID/VDR lookup, and atomic commit ports. They also own authoritative transaction-boundary extraction, polling, cancellation, retry, telemetry, rollback policy, and process lifecycle. The SDK owns no internal queue or background task.

Architecture

SDK-Rust uses an inward dependency direction: products and chain adapters may depend on generic components, while generic components cannot import product, chain, runtime, deployment, or UI policy.

The first release candidate intentionally covers only the lowest cohesive three-crate closure.

Dependency direction

Arrows mean “depends on.” Dependency direction always points toward the more stable, generic center:

  1. wallets, identity products, and chain families select SDK components;
  2. protocol/domain components select primitive foundations;
  3. identus-crypto depends on identus-core;
  4. identus-core and identus-crypto use identus-derive at compile time.

The reverse direction is forbidden. In particular, the three-crate release train cannot depend on Midnight, Compact, Cardano/PRISM, consumer repositories, wallet storage implementations, or product trust/custody policy.

This allows downstreams to evolve independently while sharing evidence-backed foundations.

Ownership boundaries

SDK-Rust owns

  • generic primitives and domain values;
  • reusable cryptographic operations and bounded representations;
  • protocol-neutral ports and validation contracts;
  • independently selectable, bounded DID-method semantics that depend inward on generic layers; and
  • deterministic, effect-isolated VDR/indexing cores whose scheduling and storage remain caller-owned;
  • conformance and compatibility evidence attached to those surfaces.

Chain and identity repositories own

  • concrete ledger clients, transaction-boundary extraction, submission, synchronization, and finality;
  • durable repositories, source polling, retries, node runtimes, and hosted services;
  • Compact contracts, proving systems, and chain-native cryptosuites;
  • chain deployment and operational policy.

Wallet and application products own

  • key custody, secure storage, consent, account recovery, and authorization;
  • trust decisions, credential selection, user experience, and telemetry;
  • backend deployment, availability, privacy, and regulatory controls;
  • the decision to adopt an SDK revision or release.

An SDK abstraction is reusable only when these product and chain decisions can remain outside it.

Portable PRISM stack

SDK-Rust separates PRISM method semantics from the effects required to operate a Cardano indexer or hosted service. The result is three cohesive, independently selectable source packages:

The solid arrows are Cargo dependency direction. The dashed boxes are ports or responsibilities that an adopter owns. These three PRISM crates do not open a network connection, start a task, sleep, retry, write a database, submit a transaction, or own private-key custody.

Responsibilities

CrateOwnsDoes not own
identus-prism-didBounded short/long identifiers, exact signed operation bytes, create/update/deactivate construction, validation, deterministic state reduction, DID document projectionLedger lookup/submission, persistence, custody, HTTP, runtime
identus-prism-vdrStorage-entry wire semantics, VDR-key authorization, current-entry state, bounded ancestry traversalCardano sources, durable repository, scheduling, retry
identus-prism-indexerComplete ordered transaction batches, transition digests, replay/idempotency, deterministic planning, one atomic commit contractSource polling, channels, database transactions, process lifecycle

Generic crates never depend on these method-specific packages. The machine dependency guard fixes the allowed internal SDK edges to indexer -> VDR -> PRISM DID -> generic DID and crypto and rejects prohibited donor/chain package families. The current quality receipt separately proves with cargo tree that the three resolved cones contain no async executor, network client, database driver, Cardano client, or native system library.

Executable flow

The repository retains one readable integration scenario that:

  1. constructs and signs a DID create operation with caller-owned test keys;
  2. creates a VDR entry owned by that DID in the same ordered transaction;
  3. plans and commits both mutations atomically through an in-memory test port;
  4. projects the committed DID state into a DID Core document;
  5. resolves VDR root/head metadata through the lookup port and verifies the payload retained by the caller-owned test store;
  6. recognizes an exact transaction replay without a second commit; and
  7. applies and resolves a second VDR update transaction.

Run it from the repository root:

cargo test -p identus-prism-indexer --test indexing \
  portable_stack_e2e_creates_resolves_updates_and_replays

The in-memory adapter is test evidence, not a supported production store. A real source must extract one complete transaction boundary; a real store must repeat identity/digest and expected-cursor checks inside one atomic commit.

Evidence and current adoption state

  • ADR 0174 defines method ownership.
  • ADR 0176 defines the method package boundary.
  • ADR 0177 defines synchronous atomic indexing.
  • Quality baseline records target, benchmark, property, fuzz, and slow-lane receipts.
  • NeoPRISM fixed-boundary summary pins candidate revision ffaeafe9af35dc420c446b5f99d708cd2f9fe9db, Preprod slot 10,723,321, both independent passing runs, and canonical manifest SHA-256 1b4fd7cbaaf46fcb23e3c9878facb8a28b1b861374177b866fbb6d88bd39419f.
  • Run 1 and run 2 retain the exact image identities, drain receipts, semantic comparison, and diagnostic QoS results.

NeoPRISM PR #324 merged the adoption of generic SDK cryptography and DID components; it does not yet replace its PRISM method, Cardano, persistence, or runtime implementation with these three crates. Its parity evidence is an immutable compatibility baseline for a later, separately reviewed adoption—not proof that the extracted PRISM crates are already deployed.

Status and limitations

The packages remain experimental source components at version 0.0.0 with publish = false. Native, WASM, iOS, and Android checks are compile evidence, not browser/device packaging or production-runtime support. The SDK does not claim Cardano connectivity, durable storage, service availability, QoS thresholds, certification, or stable SemVer for this stack.

SD-JWT VC draft-22 stages

The architecture keeps independently meaningful evidence in distinct states. RFC 9901 parsing does not imply a valid issuer signature; an issuer signature does not imply a complete disclosure graph; a complete graph does not imply draft-22 profile validity; and structurally correlated metadata or status does not imply trust or acceptance.

Production dependencies point inward to generic credential and JOSE semantics. OID4VCI and OID4VP participate only in executable integration evidence, preventing protocol DTOs from becoming the credential model. Inline and URI-discovered JWKS inputs both carry bounded resolved keys and must contain the exact issuer-verification key; a URL alone advances no state. Supplying a verification key alone proves a signature, not issuer-key resolution, so the generic report keeps that stage NotChecked unless the optional discovery evidence correlates successfully. Type Metadata paths retain object-member, array-index and wildcard segments; evidence failures remain attributed to issuer-key, schema or status stages without overwriting a successful signature-proof stage.

The exact ownership, limits and migration trigger are maintained in the architecture knowledge base.

Evidence and release flow

The repository separates ordinary integration from production promotion:

  • Fast line: one required Ubuntu build/lint/test/factory gate for pull requests into develop.
  • Slow line: weekly/manual target, binding, fuzz, coverage, package, performance, and platform evidence on an exact protected revision.
  • Candidate gate: deterministic packages, API/SemVer review, SBOMs, checksums, provenance, source closure, consumer evidence, and documentation.
  • Human release gate: one release manager and a second maintainer approve the exact receipt before a tag or registry upload.

Documentation publication is evidence before the release decision. It does not advance the candidate by itself.

Adoption before publication

Every implemented SDK-Rust package can be evaluated from source; packages that are not published require this channel. A consumer pins the full commit reachable from protected develop, chooses features explicitly, and commits its lockfile.

identus-crypto = {
  git = "https://github.com/hyperledger-identus/sdk-rust",
  rev = "FULL_40_HEX_REVIEWED_COMMIT",
  default-features = false,
  features = [ "hash" ],
}

The placeholder must be replaced with the exact reviewed revision. Do not use develop, a tag that does not exist, a pull-request ref, or a short SHA.

The current DID candidate may be evaluated at the exact protected merge that contains its verified candidate evidence:

identus-did = {
  git = "https://github.com/hyperledger-identus/sdk-rust",
  rev = "cda086f3e7fe72d251c1f896bccdcf5dd1bc8c16",
}

identus-did-resolver-http = {
  git = "https://github.com/hyperledger-identus/sdk-rust",
  rev = "cda086f3e7fe72d251c1f896bccdcf5dd1bc8c16",
  default-features = false,
  features = [ "openapi" ],
}

Select the resolver package only when the consumer needs the Axum HTTP adapter; select openapi only when it needs generated schema support. The reserved candidate identity identus-did-v0.1.0-rc.1 is not a created tag or a registry receipt. Do not add a misleading version = "0.0.0" constraint.

Adoption receipt

Record:

  • old and new exact SDK revisions;
  • selected packages and features;
  • compiler and tested targets;
  • Cargo and Nix lock/hash changes;
  • dependency/feature-tree delta;
  • unit, conformance, integration, advisory, and license results;
  • public/wire compatibility and rollback.

The first planned M3 consumer is a minimal hash-only downstream canary. It is owned and implemented entirely downstream: this repository accepts only generic evidence and does not import consumer names, primitives, or policy. NeoPRISM provides a broader source-pinned cryptography integration reference.

The portable PRISM method/VDR/indexer crates have a separate adoption walkthrough. Its in-memory scenario proves composition and effect seams; it is not a Cardano or production storage adapter. NeoPRISM’s merged SDK adoption keeps PRISM/Cardano implementation downstream, so later replacement of that code requires a new immutable pin and its own old/new parity receipt.

The crypto train’s registry receipt and the DID train’s exact source revision are different evidence channels. Source evaluation provides no crates.io checksum, stable SemVer support promise, LTS period, certification, or production warranty.

Release readiness

The first 0.1.0-rc.1 train for identus-derive, identus-core, and identus-crypto was published from approved source 21cfc28321f76f1d14a2483d536d302017674a18. Final 0.1.0 is not implied by that prerelease.

M3 release record

GateStatusEvidence owner
Reproducible isolated candidatePublished from the approved exact candidaterelease v0.1.0-rc.1, ADRs 0113/0134
Functional cryptography foundationComplete within its recorded limitations#286
Public architecture/release handbookDeployed#324
Durable crate names and first-publish bootstrapPublished; tokenless ownership/recovery hardening remains open#3, #344
Release compiler/support matrixComplete for the published candidate#325, ADR 0133
Independent downstream canaryExact-source canary green; downstream registry refresh remains externally owned#326
Natural weekly slow evidenceComplete at 19d0362038c3f2af6898624ea04347e3cd4648f7run 35555024293
Exact candidate slow receiptComplete for the published sourcerun 35887204030
Two-person approval and protected publicationComplete; bootstrap publication receipt retainedrun 35990705278, #326

Approval questions

Engineers reviewing later crypto trains should reuse these questions:

  1. Are the three crate responsibilities cohesive and appropriately separated?
  2. Is the public API small enough for an experimental SemVer commitment?
  3. Does the compiler/target promise match consumer needs and maintenance cost?
  4. Is the selected dependency and unsafe/native cone acceptable?
  5. Can a downstream adopt or reject the candidate without tribal knowledge?
  6. Is any release blocker absent from the evidence table?

The approval and publication record is issue #326. That issue remains open for post-bootstrap hardening, not because the first publication is unapproved. Future approval must again bind an exact source revision and candidate receipt; it cannot be inferred from this page or from a green documentation deployment.

M5 DID candidate status

The separate M5 target is 0.1.0-rc.1 for identus-did and identus-did-resolver-http. It is candidate-only and has no publication workflow or registry claim.

GateStatusEvidence owner
Independent train identity and deterministic archivesComplete#382, ADR 0153
Public API origins and normalized CycloneDX evidenceComplete; additive prepublication rebaseline recorded#384, #582, ADR 0154
Engineer-facing architecture and adoption handbookImplemented in this source revision; deployment receipt remains on the issue#386
Rust/target qualificationComplete; staged package-specific matrix retained#387, ADR 0155
Final exact-SHA slow evidenceComplete at c429ac494a6eaeb2e22c0b38a5b1d70c0eb6ff62; all 11 jobs passed on attempt 1run 40888621367, readiness packet
Source-pinned downstream adoptionComplete; NeoPRISM merged the bounded SDK adoption while retaining PRISM/Cardano/runtime ownershipNeoPRISM PR #324
Human review boundaryComplete engineering review applies to code, behavior, limitations, and ownership; hashes identify the reviewed material#388 receipt packet
Trusted-publishing administrationSeparate administrator-owned hardening#344

Reviewers should start with the DID candidate train. A green site build proves documentation integrity only. Engineering qualification does not authorize a registry, tag, publication, stable API, or main promotion; those remain separate explicit decisions.

Governance and contribution

SDK-Rust is AI-first but evidence-gated. Agents may plan, implement, review, push, and merge routine issue-linked work into protected develop after the required checks pass. Humans retain authority over release, publication, repository administration, security disclosure, legal-risk acceptance, and promotion to main.

Specification-driven flow

issue → research → constraints → OpenSpec contract → preflight
      → implementation → verification → review → protected develop
      → production evidence → human release decision

Important repository references:

Documentation changes use the same issue, OpenSpec, signed/DCO commit, local review, exact-head CI, and protected merge controls as code changes.

Current limitations

The handbook is intentionally explicit about what has not been proven.

  • Only identus-derive, identus-core, and identus-crypto are activated for the protected 0.1.0-rc.1 crates.io train; use its registry receipt to determine live publication state.
  • identus-did and identus-did-resolver-http have isolated, reproducible 0.1.0-rc.1 candidate archives but no crates.io release. Their canonical manifests remain 0.0.0 with publish = false; evaluate them only by exact source revision.
  • Every package outside those two train closures also remains 0.0.0 with publish = false.
  • The portable PRISM DID, VDR, and indexer packages have deterministic in-memory and compile-target evidence, but no SDK-owned Cardano source, durable store, hosted service, production QoS threshold, or downstream replacement claim.
  • Published 0.1.x artifacts retain their historical Rust 1.89.0 floor. The unpublished 0.2.x source line requires exact Rust 1.99.1 for MSRV, primary, candidate-preparation, and compatibility-etalon evidence.
  • WASM, iOS, and Android cryptography evidence is currently compile-oriented; it is not a blanket browser/device/runtime support claim.
  • Experimental DID language-binding evidence does not automatically support the crypto or DID release train on those platforms.
  • DID candidate API snapshots are a diffable compatibility origin, not a stable API promise. Candidate SBOMs are dependency evidence, not an advisory scan, signed provenance, vulnerability-free claim, or certification.
  • Test vectors, fuzzing, coverage, static analysis, and review reduce risk but are not security or compliance certification.
  • The SDK does not provide key custody, hardware/KMS management, secure wallet storage, trust policy, consent, chain integration, or product operations.
  • Consumer adoption remains independently owned and reversible.
  • Apollo deprecation and downstream duplicate removal require later releases, adoption evidence, and maintainer governance.

The machine-readable constraint index and component evidence remain normative: