credibil_holder/
lib.rs

1//! # Credibil Holder
2//!
3//! An SDK for building applications that act as a holder's agent (such as a
4//! wallet). It supports `OpenID` for Verifiable Credential Issuance
5//! and Presentation and is designed to be used with issuer and verifier
6//! services that implement those standards. In particular it is designed to
7//! work with services based on `credibil-vc`.
8//!
9//! The crate does not provide a user or service interface - that is the job of
10//! an application implementer. See the examples directory for simple (not
11//! full-featured) implementations.
12//!
13//! # Design
14//!
15//! ** Flow State **
16//!
17//! Similar to other general OpenID implementations, the library is based
18//! around orchestrating flows for VC issuance or presentation (to a verifier).
19//!
20//! The client application can interact with types that "remember" the current
21//! state of the flow and provide associated methods to use that state to
22//! prepare requests and then update the state with responses.
23//!
24//! A full set of end-to-end tests are provided in the `tests` directory that
25//! demonstrate how to use the library with all the possible variations of VC
26//! issuance supported by the standards as implemented in `credibil-vc`.
27//!
28//! At present, the only supported credential data type is the
29//! [W3C Verifiable Credentials Data Model v2.0](https://www.w3.org/TR/vc-data-model-2.0/).
30//!
31//! ** Provider **
32//!
33//! In a similar style to `credibil-vc`, implementors make use of 'Provider'
34//! traits that are responsible for handling storage, signing and verifying
35//! proof of key ownership by resolving distributed identifiers (DIDs). See
36//! the `provider` module in this crate for traits specific to
37//! holder agents.
38//!
39//! # Example
40//!
41//! See the `examples` directory for some simple applications that make use of
42//! the SDK and also sample applications that demonstrate services and
43//! applications for Issuers and Verifiers using `credibil-vc` and that work
44//! in conjunction with the example wallets.
45
46// TODO: implement client registration/ client metadata endpoints
47
48// TODO: support [SIOPv2](https://openid.net/specs/openid-connect-self-issued-v2-1_0.html)(https://openid.net/specs/openid-connect-self-issued-v2-1_0.html)
49//        - add Token endpoint
50//        - add Metadata endpoint
51//        - add Registration endpoint
52
53pub mod credential;
54pub mod issuance;
55pub mod presentation;
56pub mod provider;
57
58pub use credibil_vc::{Kind, Quota, did, infosec, test_utils, urlencode};