Register a committed transaction
submit_txStep 4: register a committed transaction by txHash. Kinds: create-caper, buy, sell, swap, proposal, vote, count, trigger, resolve, execute, activate-upgrade, exit, withdraw-founder, transfer-founder. The server verifies before mirroring anything: receipts are re-read on-ledger (forged or foreign txHashes are refused, replays are idempotent). Context per kind – create-caper, exit, withdraw-founder, transfer-founder: cashtag; proposal: proposalId; count, trigger, resolve, execute, activate-upgrade: code (the P-… code). The answer's result is applied (the receipt verified and this call wrote it to Caper's mirror of the ledger), already (the mirror held it before this call, so a replay is safe), unindexed (the receipt's event, or the step before it, has not reached the mirror: retry in a few seconds) or refused (the receipt does not match the request, and reason says why); registered is true for the first two, and count also answers the proposal's status once registered. A buy, sell or exit that is not registered, and a swap with neither leg registered, is a tool error carrying result and reason. Requires the Bearer token from the login tool, sent as an HTTP Authorization: Bearer <token> header on the POST carrying this call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>",
"txHash": "<txHash>"
},
"name": "submit_tx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | the cranks after the vote: the proposal's P-… code | |
| kind | Yes | What the transaction did | |
| txHash | Yes | The committed transaction intent hash (txid_…) | |
| cashtag | No | create-caper, exit and the founder kinds: the caper's cashtag | |
| proposalId | No | proposal: the id from the create-proposal manifest response |