Record a swap you sent through the swap door (step 1 of 2)
prepare_net_swap_recordSWAP RECORD: say that you sent a swap you were quoted, so the swap door can show it routed. You give the transaction hash you sent, the quoteHash, validUntil and pair the quote showed. FREE, a signed statement, no fee, no gas. It is recorded once per wallet and transaction, as your own statement: nothing here checks the transaction onchain, so it reads unverified, and no reward is paid or promised for it. The door refuses a record while it is not switched on or the kill switch is on, for a house wallet, and for a quote that ended more than 15 minutes ago. Returns MESSAGE_TO_SIGN and BODY_JSON; sign with the wallet that sent the swap using personal_sign, then call submit_net_swap_record within 5 minutes. Cost and signer: free, no gas; the person signs the result with their own wallet or passkey, and the house never holds a key.
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": {
"principal": "<principal>",
"txHash": "<txHash>",
"quoteHash": "<quoteHash>",
"pair": "<pair>",
"validUntil": "<validUntil>"
},
"name": "prepare_net_swap_record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | The pair the quote showed: the token you sent, then >, then the token you received (written TOKEN_A>TOKEN_B). | |
| txHash | Yes | The hash of the transaction you sent: 0x and 64 hex digits. | |
| principal | Yes | The 0x… address that signs: the wallet that sent the swap. Address only, never a private key. | |
| quoteHash | Yes | The quoteHash the quote showed: 64 hex digits. | |
| validUntil | Yes | The validUntil time the quote showed, as an ISO time. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| tool | No | ||
| funded | No | ||
| payUsd | No | ||
| workId | No | ||
| claimId | No | ||
| claimable | No | ||
| next_call | No | ||
| proofRule | No | ||
| fulfillableBy | No | ||
| definitionOfDone | No | ||
| needs_from_caller | No | ||
| notClaimableReason | No |