Wait for swap update
wait_for_swapWait for a swap to change stage or finish, then return its status, stage, outcome, and transaction IDs; call repeatedly after starting a swap until done is true.
Instructions
Wait until a swap's stage changes or it finishes, then return its status. Read-only: it watches this kit's local swap record while the swap runs in the background. After swap_asset_to_bsv, call it repeatedly until swap.done is true; a swap usually finishes within about an hour. Returns changed (false when the wait ended with no change, which is normal: call again), waited_seconds, and swap, the same view swap_status gives: stage, stage_label, step and steps_total, done, outcome (delivered, settled, refunded or failed), eta_minutes and txids with explorer links. Sends progress notifications when the client supplies a progress token. Use swap_status for an instant read.
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": {
"swap_id": "<swap_id>"
},
"name": "wait_for_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| swap_id | Yes | The swap_id returned by swap_asset_to_bsv or listed by swap_status. | |
| max_wait_seconds | No | Optional longest wait in whole seconds, from 1 to 55. Default 50. |