Build your funding
build_fundBuild the UNSIGNED transaction(s) to fund your leg. Returns chain-specific signing material (EVM txs / BTC pay-to / TRON txs). Sign with your own key/HSM/wallet, then submit via broadcast_tx. The server never holds your keys. Acting for a person with no wallet here? Give them the swap's dealUrl to fund there instead. A 409 is a state, not a failure: "already funded" / "escrow is already paid" (never pay the escrow again — on Bitcoin the second one may carry feePayTo/feeAmountSats when only the protocol fee is not seen yet), "cannot fund yet" / a missing address (wait or set it, then retry). On Bitcoin after a short payment amountSats is only the remainder (topUp: true). 503 = could not check — retry.
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_fund"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Swap id | |
| leg | Yes | The leg YOU fund: 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 |