Key Custody

Agent declares a send from a delegated client_tss wallet

The only gate on an agent threshold signature: sign/complete hands the signature to the agent, which could broadcast it without 1Claw, so everything POST /v1/agents/{agent_id}/transactions checks before signing is checked here, in this order: the agent's guardrails (chains, allowlists, per-transaction and daily caps), the sanctions screen, the human approval policy (or the resume of an approved one), Cedar/OPA transaction policy, and M-of-N consensus (action submit_transaction). Then it builds the unsigned message, writes a prepared row to the transaction ledger (so daily caps count it from this moment) and records the prepared intent. Only a prepared message can enter /tss/sign/begin, and sign/complete and broadcast refuse (403) a prepare that recorded no ledger row. Requires a treasury delegation and a share provisioned to the agent's runtime.

Two 202 outcomes, neither of which builds a message:

  • Human approval (status: awaiting_approval): a ledger row is written as awaiting_approval and an approval with action agent_tss_transaction is created. Once a human approves it, call prepare again with the same key_id, to and value and resume_tx_id set to the returned transaction_id. Rejecting the approval marks the row rejected.
  • M-of-N consensus (status: pending_approval): call prepare again with the same transfer and approval_id set to the returned pending_approval_id once the approval is granted.
post/v1/agents/{agent_id}/tss/prepare

Request

  • Base URL: https://api.1claw.co
  • URL: https://api.1claw.co/v1/agents/{agent_id}/tss/prepare
  • Auth: HTTP bearer

Request body

key_idstring uuid required
tostring required
valuestring required

Major units.

memostring
approval_idstring uuid

An approved M-of-N consensus approval for this exact transfer (the pending_approval_id of an earlier 202). The approval is bound to key_id, chain, to, value and memo.

resume_tx_idstring uuid

The transaction_id of an earlier prepare that was parked on human approval (202 awaiting_approval). The transaction must still be awaiting_approval, belong to this agent, match this transfer, and its approval must be approved; resuming spends that approval.

Response

Unsigned message, recorded as a prepared intent with a ledger row

key_idstring uuid required
chainstring required
fromstring required
tostring required
value_base_unitsstring required
recent_blockhashstring required

The chain's freshness value the message was built against.

messagestring required

Base64 unsigned transaction message; what /tss/sign/begin takes.

message_digeststring required

Hex SHA-256 of the message.

transaction_idstring uuid

The prepared ledger row an agent prepare wrote. Present on an agent prepare; absent on a user's own treasury prepare.

Changes

No recorded changes to this operation across all 1 revision of this API.