Skip to main content

verify_presentation_sync

Function verify_presentation_sync 

Source
pub fn verify_presentation_sync(
    envelope: &PresentationEnvelope,
    signed: &SignedAcdc,
    issuer_kel: &[Event],
    tel_events: &[TelEvent],
    receipts: &[StoredReceipt],
    witness_policy: VerifierWitnessPolicy,
    subject_kel: &[Event],
    subject_delegator_kel: &[Event],
    expected_audience: &str,
    expected_challenge: Option<&[u8]>,
    now: DateTime<Utc>,
) -> PresentationVerdict
Expand description

Verify a credential presentation synchronously, with no executor — the WASM-safe core behind verify_presentation.

Identical contract to verify_presentation but executor-free: block_on is impossible in browser WASM, so every non-Rust binding target (C-ABI, WASM, Node, Python, Go) calls this directly. It chains F.5’s verify_credential_sync so a revoked/invalid credential never binds, then enforces the holder proof through the synchronous pure-Rust software_verify.

Args: identical to verify_presentation minus the trailing provider.

Usage:

let verdict = verify_presentation_sync(
    &envelope, &signed, &issuer_kel, &tel, &receipts, policy,
    &subject_kel, &subject_delegator_kel, "audience.example", Some(&nonce), now,
);
assert!(verdict.is_honored());