Build your refund
build_refundBuild the UNSIGNED refund for a leg (available after its timelock expires). Acting for a person with no wallet here? Give them the swap's dealUrl to refund there instead. Same signing shapes as build_claim, except that on Solana only the leg's refund (funder) key can sign; for Bitcoin, omit preimageHex when broadcasting so the refund branch is taken.
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": {
"id": "<id>",
"leg": "<leg>"
},
"name": "build_refund"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Swap id | |
| leg | Yes | The leg YOU funded: a if you are the maker, b if you are the taker |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| txs | No | EVM txs | |
| sign | No | Signing scheme | |
| payTo | No | Bitcoin escrow address | |
| feePayTo | No | ||
| amountSats | No | ||
| psbtBase64 | No | ||
| sighashHexes | No | One per input | |
| transactions | No | TRON txs | |
| feeAmountSats | No | ||
| transactionBase64 | No | Solana tx |