KeelsonDocs
    Judge Mode

    API reference Mandates

    Store a passkey-signed mandate

    POST/v1/mandates

    Verifies the passkey assertion over M = SHA-256("keelson/mandate-challenge/v1" || 0x00 || H_sd || C_m) and stores the mandate as SIGNED, or ACTIVE when it allows several merchants.

    Headers

    Content-Typeapplication/jsonRequired
    idempotency-keystringRequired
    Idempotency-KeystringRequired
    1 to 255 characters. A retry with the same key returns the first answer.

    Request body

    application/json

    payloadSdobjectRequired
    The SD-JWT payload with its _sd digests, as signed.
    disclosuresarray of stringRequired
    Every disclosure of the payload; each digest must resolve.
    commitmentstringRequired
    C_m; must equal the payload's zk.commitment.
    saltstring
    The salt that opens C_m; the TEE needs it to issue the mandate.
    assertionobjectRequired
    A WebAuthn or Secure Payment Confirmation assertion, base64url fields.
    connectionobject
    The agent's request this mandate approves, by its user code. The mandate must name the asking agent's operator and grant no more than it asked; askAboveMinor may only be lower too.

    Responses

    • 201The mandate was stored
    • 401Not signed in, or the signature is invalid
    • 403The passkey is not the signer's
    • 409The mandate is already stored
    • 422The mandate is invalid (invalid-mandate), or it binds an agent key, a bond, an engine build, a policy set or terms other than the ones POST /v1/mandates/compile fills: the named operator's registered cnf key, its bond vault with the 50 PYUSD minimum, the engine version and TEE measurements of the build the legs run (or of another build admitted during a rotation), the current policy set hash and the current terms (mandate-binding-mismatch; fields names agent.cnf, agent.bond, policy.engine, policy.version, policy.measurements, policy.policy_set_hash or consent)
    • 429Too many approvals by user code
    • 503The TEE could not issue the mandate

    201 response

    idstringRequired
    mandateHashstringRequired
    statestringRequired
    ACTIVE at once when the mandate allows several merchants: each cart is then held on its own.One of SIGNEDACTIVE
    openMandatestringRequired
    The open mandate (L2) the TEE issued; the agent closes it per purchase.