Skip to content

isRevoked

PQSafe AgentPay API Reference v0.1.0


PQSafe AgentPay API Reference / isRevoked

Function: isRevoked()

isRevoked(_request, _config): Promise<RevocationStatus>

Defined in: pqsafe/agent-pay/src/sprint2/revocation.ts:109

Check whether a SpendEnvelope has been revoked via any of the 3 layers.

Sprint 3 implementation will:

  1. Check Layer 2 (epoch): compare envelope.issuerEpoch against on-chain current epoch. Fast path — cached per-issuer, invalidated by epoch-change events.
  2. If amount >= config.failClosedThresholdUsd, check Layer 3 (per-envelope registry).
  3. Apply fail-safe policy based on amount if the service is unreachable.

Parameters

_request

RevocationCheckRequest

_config

RevocationServiceConfig

Returns

Promise<RevocationStatus>

Throws

‘Sprint 2 — implementation queued’ until Sprint 3 ships.