Expand description
W3C Verifiable Credentials Data Model implementation.
Supports both VCDM 1.1 and VCDM 2.0.
§Overview
This crate provides the core data types for Verifiable Credentials:
VerifiableCredential— the credential itself (issuer, subject, claims)VerifiablePresentation— wraps credentials for submission to verifiersCredentialBuilder/PresentationBuilder— ergonomic constructionCredentialStatus— integration point for revocation/suspension checking
§Proof Format Agnostic
The data model is independent of the proof/signature format. Credentials can be secured using:
- Data Integrity proofs (embedded in the
prooffield) - JWT (external envelope)
- SD-JWT VC (selective disclosure with external envelope)
- COSE (for mdoc/mDL)
§Version Detection
The VCDM version is automatically detected from the @context array:
https://www.w3.org/2018/credentials/v1→ VCDM 1.1https://www.w3.org/ns/credentials/v2→ VCDM 2.0
Re-exports§
pub use context::CREDENTIALS_V1_CONTEXT;pub use context::CREDENTIALS_V2_CONTEXT;pub use credential::ContextValue;pub use credential::CredentialBuilder;pub use credential::CredentialStatus;pub use credential::IssuerValue;pub use credential::SubjectValue;pub use credential::VerifiableCredential;pub use error::VcError;pub use presentation::PresentationBuilder;pub use presentation::VerifiablePresentation;
Modules§
- context
- JSON-LD context constants and validation for Verifiable Credentials.
- credential
- Verifiable Credential types supporting both VCDM 1.1 and 2.0.
- error
- Verifiable Credential error types.
- presentation
- Verifiable Presentation types for W3C VCDM 1.1 and 2.0.