Skip to content

createAgentSubkey

PQSafe AgentPay API Reference v0.1.0


PQSafe AgentPay API Reference / createAgentSubkey

Function: createAgentSubkey()

createAgentSubkey(_issuerAddress, _params, _config): Promise<AgentSubkeyRecord>

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

Create a new agent-scoped subkey with bounded authority.

Sprint 3 implementation will:

  1. Generate ML-DSA-44 agent subkey.
  2. Associate with active spend key + agent identity.
  3. Enforce agentMaxAmount <= spendKey’s effective limit.
  4. Register subkey in hosted issuer service.

Parameters

_issuerAddress

string

_params

agentAllowedCurrencies?

string[]

agentAllowedRails?

string[]

agentId

string

agentMaxAmount

number

ttlSeconds?

number

_config

apiKey

string

serviceUrl

string

Returns

Promise<AgentSubkeyRecord>

Throws

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