lightning_refund
Recover L-BTC locked by a failed Lightning send swap back to the swap wallet or a specified Liquid address, using a provider cosign or timeout refund branch.
Instructions
Recover the L-BTC locked up by a failed Lightning send swap, back to the swap's own wallet (or a given Liquid address). Works with both providers. A cooperative refund is cosigned by the provider and works right away; if the provider declines, the refund branch can be spent on its own once the timeout block passes. claim_public_key and blinding_key only need supplying for swaps created before those fields were stored locally — the error message says when that applies.
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": "lightning_refund"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | No | Liquid destination address; defaults to a new address of the swap's wallet | |
| dry_run | No | Build and sign the refund but do not broadcast it (default false) | |
| swap_id | Yes | Swap ID returned from lightning_send | |
| blinding_key | No | Lockup blinding key (hex), for legacy swaps only | |
| claim_public_key | No | Provider's claim public key (hex), for legacy swaps only |