Skip to content

rotateSpendKey

PQSafe AgentPay API Reference v0.1.0


PQSafe AgentPay API Reference / rotateSpendKey

Function: rotateSpendKey()

rotateSpendKey(_issuerAddress, _config): Promise<SpendKeyRecord>

Defined in: pqsafe/agent-pay/src/sprint2/issuer.ts:206

Rotate the active spend key (advance to next quarterly key).

Sprint 3 implementation will:

  1. Generate new ML-DSA-65 spend key.
  2. Sign new spend key certificate with root key (requires HSM interaction).
  3. Advance issuer epoch on-chain (invalidates all envelopes from old epoch).
  4. Old spend key remains in hierarchy for historical verification.

Parameters

_issuerAddress

string

_config

apiKey

string

serviceUrl

string

Returns

Promise<SpendKeyRecord>

Throws

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