lw_sweep
Sweep an entire L-BTC balance or a specified Liquid asset balance to one address, with fees deducted from inputs so the targeted wallet balance reaches zero.
Instructions
Sweep the entire L-BTC balance (or full balance of a specific Liquid asset) to one address. Fee is deducted from the inputs — leaves 0 sats of the targeted balance in the wallet. Use this whenever the user says 'send all', 'sweep', 'drain', 'empty wallet', or 'move everything' on Liquid. Asset sweep note: with asset_id set, the asset balance goes to 0 in one tx but L-BTC change may remain because the fee was paid in L-BTC — call lw_sweep again without asset_id to also empty L-BTC.
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": {
"wallet_name": "<wallet_name>",
"address": "<address>"
},
"name": "lw_sweep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Destination Liquid address | |
| asset_id | No | Optional asset ID (hex). Omit for an L-BTC sweep. Passing the L-BTC policy asset id is equivalent to omitting. | |
| password | No | Password to decrypt mnemonic (if encrypted at rest) | |
| wallet_name | Yes | Name of the wallet | |
| password_file | No | Path to a local file containing the wallet password; keeps the password out of the conversation. Do not combine with password. |