Skip to main content

Module credentials

Module credentials 

Source
Expand description

Verifiable-credential status cache and presentation building — Restricted vault records.

Implements the master plan’s credential items (audit CRE-01..09). Two honesty boundaries are load-bearing and documented at their point of use:

  1. evaluate_state is a status cache, not cryptographic verification. It classifies a credential from cheap, local facts (expiry, an issuer-trust allow-list, claim presence). It does NOT check an issuer signature, a revocation registry, or a proof — a VerificationState::IssuerTrusted value means “the issuer DID is on the caller’s trust list”, never “the credential’s signature verified”. Real proof verification lives in the identity / key-vault layer.

  2. build_presentation is plain JSON field selection, NOT cryptographic selective disclosure. It simply drops the claim keys the holder did not select. It gives no unlinkability, no zero-knowledge property, and no proof that the omitted claims exist or that the disclosed ones were signed. The type is named FieldSelectedPresentation so it cannot be mistaken for ZK selective disclosure (plan §Q11).

Structs§

CredentialRecord
A verifiable-credential envelope as held in the WellFair vault.
FieldSelectedPresentation
The result of build_presentation: a credential reduced to the holder-selected claim keys.
PresentationRequest
A holder-driven request for a subset of a credential’s claims.

Enums§

VerificationState
Locally-derived verification status of a credential.

Functions§

build_credential_envelope
Build the Restricted record envelope for a credential.
build_presentation
Build a field-selected presentation of cred, disclosing only claims whose keys appear in selected_claim_keys. Keys requested but absent on the credential are silently skipped; the disclosed order follows the credential’s own claim order (deterministic).
credential_record_id
record ID.
credential_summary
summary.
evaluate_state
Classify a credential from cheap local facts. Status cache, NOT cryptographic verification (see the module header): no signature, revocation-registry, or proof check is performed.
presentation_summary
summary.