lw_sweep
Sweep the entire L-BTC or specified Liquid asset balance to one address, deducting fee from inputs to leave zero balance of the targeted asset.
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.
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 |