Skip to main content

evaluate_state

Function evaluate_state 

Source
pub fn evaluate_state(
    cred: &CredentialRecord,
    trusted_issuers: &[String],
    now_unix: u32,
) -> VerificationState
Expand description

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.

Precedence:

  • Revoked if the stored state is already Revoked (revocation is sticky).
  • Expired if expires_at_unix is set and <= now_unix.
  • else IssuerTrusted if issuer_did is in trusted_issuers.
  • else SchemaValid if the credential carries at least one claim.
  • else Unverified.