trust_tasks_proof/lib.rs
1//! Pluggable [`ProofVerifier`](trust_tasks_rs::ProofVerifier)
2//! implementations for the Trust Tasks framework.
3//!
4//! The framework's [`ProofVerifier`](trust_tasks_rs::ProofVerifier) trait is
5//! the seam where cryptosuite implementations plug in; this crate is the
6//! umbrella that hosts those implementations behind Cargo features so a
7//! single dependency line opts in to a specific backend without dragging
8//! in the others.
9//!
10//! ## Backends
11//!
12//! | Cargo feature | Module | Backed by |
13//! |---------------|---------------------------|----------------------------------------|
14//! | `affinidi` ✱ | [`affinidi`] | `affinidi-data-integrity` (EdDSA suites) |
15//!
16//! ✱ = enabled by default. Disable default features and opt in to the
17//! backends you want via `default-features = false` + an explicit
18//! `features = [...]` list.
19//!
20//! ## Quickstart (`affinidi` backend)
21//!
22//! ```rust,ignore
23//! use trust_tasks_proof::affinidi::Verifier;
24//! use trust_tasks_rs::ProofVerifier;
25//!
26//! // did:key only — offline, no I/O. Good for tests and self-issued docs.
27//! let verifier = Verifier::for_did_key();
28//! verifier.verify(&inbound_doc).await?;
29//! ```
30
31#![warn(missing_docs)]
32#![warn(rust_2018_idioms)]
33
34#[cfg(feature = "affinidi")]
35pub mod affinidi;