Skip to main content

Crate dtg_credentials

Crate dtg_credentials 

Source
Expand description

Decentralized Trust Graph (DTG) Credentials

Re-exports§

pub use accept::AcceptListEntry;
pub use accept::AdditionalMember;
pub use accept::PredicateAcceptList;
pub use accept::PredicateStatus;
pub use accept::RegistryAcceptList;
pub use statement::CredentialSubjectStatement;
pub use statement::ENDORSES_V1;
pub use statement::ObjectKind;
pub use statement::PRESENTED_V1;
pub use statement::PredicateProfile;
pub use statement::StatementObject;
pub use statement::VETTED_V1;
pub use statement::WITNESSED_V1;
pub use statement::check_predicate_iri;

Modules§

accept
Which predicates a verifier accepts: the configuration that turns a well-formed VSC into a meaningful one.
authority
Verifying a chain of Verifiable Authority Credentials.
create
Builder methods for creating new entities.
delegation
Verifying a chain of Verifiable Delegation Credentials.
statement
Verifiable Statement Credentials (VSC): one type, many predicates.

Structs§

AuthorityGrant
The authority object a CredentialSubject::Authority carries.
CredentialSubjectAuthority
Verifiable Authority Credential (VAC) subject.
CredentialSubjectBasic
id of the credential subject only
CredentialSubjectDelegation
Delegation Credential subject
CredentialSubjectMembership
Membership Credential subject
DTGCommon
All DTG Credentials follow a common structure.
DTGCredential
Defined DTG Credentials
DelegationGrant
The delegation object a CredentialSubject::Delegation carries.
WitnessContext
The witnessContext a WITNESSED_V1 statement MAY carry: context of the witnessing event.

Enums§

CredentialSubject
This represents all possible credential subjects The order of the enum is important as it will match on first match
DTGCredentialError
Errors related to DTG Credentials
DTGCredentialType
DTG VC Type Identifiers — the concrete DTGCredential subtypes the v1 context defines.
IssuerScope
The correlation scope an issuer declares for its own identifier, carried as the REQUIRED top-level issuerScope of every DTG credential (DTG Core Credentials §Correlation Scope).
W3CVCVersion
What W3C VC Format is the credential using?

Constants§

DTG_CONTEXT_V1
The frozen DTG credential context, version 1, which a DTG credential lists second.
MAX_JSON_DEPTH
The deepest JSON document this library will digest, sign or verify.
W3C_VC_V1_CONTEXT
The W3C VC Data Model 1.1 context, accepted in first position under DTG Core Credentials §Legacy System Compatibility. This library never emits it.
W3C_VC_V2_CONTEXT
The W3C VC Data Model 2.0 context, which a DTG credential lists first.

Functions§

decode_digest_multibase
Decodes a digestMultibase value into the algorithm it names and the raw digest bytes.
digest_jsonDeprecated
A credential’s digest in the superseded sha256:<hex> encoding.
digest_multibase_json
The digest a DTG credential carries of another credential, computed over that credential in its wire form.
digests_match
Do two digestMultibase values refer to the same credential?
task_digest_multibase_json
The task digest of a Trust Task document, the value a credential carries as taskDigestMultibase alongside the taskContext that names the document.
verify_grant_with_public_key
Verifies a grant in its wire form before it is answered: that its issuer signed it, and that it is in force at at.