Skip to main content

Module verify

Module verify 

Source
Expand description

The live Protocol v2 decision path (SPEC-v2 §6). Mirrors Go verify_v2.go.

Structs§

V2ProviderError
A provider or hook failure (trust, audience, receiver binding). The message is diagnostic only; the verifier handles every failure fail-closed.
V2TrustResolution
The caller-authenticated trust provider result. root_key is the complete root public key for Trusted; the verifier recomputes its key ID and requires it and the key to equal the chain’s terminal issuer, treating a mismatch as ambiguous. Unavailable, ambiguous, an error, or a panic yields indeterminate/trust_unavailable.
V2VerifyCallbacks
The verifier-owned dependencies of the live v2 decision path. claim_store is required. A callback that returns an error or panics is handled fail-closed: trust -> trust_unavailable, status -> unavailable for that issuer, audience -> constraint_unverifiable, rate -> constraint_unverifiable. If the caller’s context has ended when a callback fails, nothing is committed (evaluation_cancelled) and the claim remains in progress for lease-expiry recovery.
V2VerifyOutcome
The result of verify_proof_bundle_v2. It deliberately has no decision field: for Committed, committed is the opaque handoff to super::release_v2_decision. error (and error_class) is present exactly for Preflight and Evaluating (Go returns the error itself only for Evaluating).
V2VerifyRequest
One live verification. context_policy: None means the verifier explicitly configured no context policy; the terminal result can then never be allow (SPEC-v2 §6.7). now is the caller’s clock and is used only for the pre-claim freshness check; every post-claim time-sensitive check uses the claim store’s authoritative time.

Enums§

V2TrustOutcome
A trust provider’s answer for one verified chain (SPEC-v2 §6.1).
V2VerifyStage
Where a verification stopped.

Functions§

verify_proof_bundle_v2
Go VerifyProofBundleV2: the live decision path in the SPEC-v2 §6 order. A pre-claim failure returns Preflight with a classified error and invokes no claim, trust, status, audience, or rate callback. A committed outcome is never an authorization.

Type Aliases§

V2AudienceProvider
The receiver-audience membership provider.
V2ReceiverBindingHook
The application’s pure pre-consumption hook. It runs after the built-in expected-agent, session-context and exact-audience checks and before the claim. It must not perform I/O or have side effects.
V2TrustProvider
The trust provider, selected by authenticated configuration; it never follows a location or identifier taken from the proof.