Skip to content

advanceEpoch

PQSafe AgentPay API Reference v0.1.0


PQSafe AgentPay API Reference / advanceEpoch

Function: advanceEpoch()

advanceEpoch(_issuerAddress, _config): Promise<bigint>

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

Advance the issuer epoch (Layer 2 — bulk invalidation).

Advancing the epoch invalidates ALL envelopes signed under the current epoch for this issuer. Use in response to key compromise, agent misbehavior, or as a routine rotation event.

Sprint 3 implementation will:

  1. POST /v1/issuers/:id/epoch/advance (requires root key or spend key auth).
  2. Hosted service atomically increments the epoch counter.
  3. Triggers on-chain epoch write to Arbitrum registry (audit anchor).
  4. All verifiers revalidating envelopes will see the new epoch and reject old ones.

Parameters

_issuerAddress

string

_config

RevocationServiceConfig

Returns

Promise<bigint>

The new epoch number.

Throws

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