2020-12-27 00:10:02 +00:00
|
|
|
## chantools rescueclosed
|
|
|
|
|
|
|
|
Try finding the private keys for funds that are in outputs of remotely force-closed channels
|
|
|
|
|
2020-12-27 00:40:51 +00:00
|
|
|
### Synopsis
|
|
|
|
|
|
|
|
If channels have already been force-closed by the remote
|
|
|
|
peer, this command tries to find the private keys to sweep the funds from the
|
|
|
|
output that belongs to our side. This can only be used if we have a channel DB
|
|
|
|
that contains the latest commit point. Normally you would use SCB to get the
|
|
|
|
funds from those channels. But this method can help if the other node doesn't
|
|
|
|
know about the channels any more but we still have the channel.db from the
|
|
|
|
moment they force-closed.
|
|
|
|
|
2021-03-01 09:14:27 +00:00
|
|
|
The alternative use case for this command is if you got the commit point by
|
2021-08-13 11:10:43 +00:00
|
|
|
running the fund-recovery branch of my guggero/lnd fork (see
|
|
|
|
https://github.com/guggero/lnd/releases for a binary release) in combination
|
|
|
|
with the fakechanbackup command. Then you need to specify the --commit_point and
|
2021-03-01 09:14:27 +00:00
|
|
|
--force_close_addr flags instead of the --channeldb and --fromsummary flags.
|
|
|
|
|
2021-05-01 11:34:12 +00:00
|
|
|
If you need to rescue a whole bunch of channels all at once, you can also
|
|
|
|
specify the --fromsummary and --lnd_log flags to automatically look for force
|
|
|
|
close addresses in the summary and the corresponding commit points in the
|
|
|
|
lnd log file. This only works if lnd is running the fund-recovery branch of my
|
2021-08-13 11:10:43 +00:00
|
|
|
guggero/lnd (https://github.com/guggero/lnd/releases) fork and only if the
|
|
|
|
debuglevel is set to debug (lnd.conf, set 'debuglevel=debug').
|
2021-05-01 11:34:12 +00:00
|
|
|
|
2020-12-27 00:10:02 +00:00
|
|
|
```
|
|
|
|
chantools rescueclosed [flags]
|
|
|
|
```
|
|
|
|
|
2020-12-27 00:40:51 +00:00
|
|
|
### Examples
|
|
|
|
|
|
|
|
```
|
2021-05-02 15:40:13 +00:00
|
|
|
chantools rescueclosed \
|
2020-12-27 00:40:51 +00:00
|
|
|
--fromsummary results/summary-xxxxxx.json \
|
|
|
|
--channeldb ~/.lnd/data/graph/mainnet/channel.db
|
2021-03-01 09:14:27 +00:00
|
|
|
|
2021-05-02 15:40:13 +00:00
|
|
|
chantools rescueclosed --force_close_addr bc1q... --commit_point 03xxxx
|
2021-05-01 11:34:12 +00:00
|
|
|
|
2021-05-02 15:40:13 +00:00
|
|
|
chantools rescueclosed --fromsummary results/summary-xxxxxx.json \
|
2021-05-01 11:34:12 +00:00
|
|
|
--lnd_log ~/.lnd/logs/bitcoin/mainnet/lnd.log
|
2020-12-27 00:40:51 +00:00
|
|
|
```
|
|
|
|
|
2020-12-27 00:10:02 +00:00
|
|
|
### Options
|
|
|
|
|
|
|
|
```
|
2021-03-01 09:14:27 +00:00
|
|
|
--bip39 read a classic BIP39 seed and passphrase from the terminal instead of asking for lnd seed format or providing the --rootkey flag
|
|
|
|
--channeldb string lnd channel.db file to use for rescuing force-closed channels
|
|
|
|
--commit_point string the commit point that was obtained from the logs after running the fund-recovery branch of guggero/lnd
|
|
|
|
--force_close_addr string the address the channel was force closed to
|
|
|
|
--fromchanneldb string channel input is in the format of an lnd channel.db file
|
|
|
|
--fromsummary string channel input is in the format of chantool's channel summary; specify '-' to read from stdin
|
|
|
|
-h, --help help for rescueclosed
|
|
|
|
--listchannels string channel input is in the format of lncli's listchannels format; specify '-' to read from stdin
|
2021-05-01 11:34:12 +00:00
|
|
|
--lnd_log string the lnd log file to read to get the commit_point values when rescuing multiple channels at the same time
|
2021-03-01 09:14:27 +00:00
|
|
|
--pendingchannels string channel input is in the format of lncli's pendingchannels format; specify '-' to read from stdin
|
|
|
|
--rootkey string BIP32 HD root key of the wallet to use for decrypting the backup; leave empty to prompt for lnd 24 word aezeed
|
2020-12-27 00:10:02 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Options inherited from parent commands
|
|
|
|
|
|
|
|
```
|
|
|
|
-r, --regtest Indicates if regtest parameters should be used
|
2023-09-18 13:09:44 +00:00
|
|
|
-s, --signet Indicates if the public signet parameters should be used
|
2020-12-27 00:10:02 +00:00
|
|
|
-t, --testnet Indicates if testnet parameters should be used
|
|
|
|
```
|
|
|
|
|
|
|
|
### SEE ALSO
|
|
|
|
|
|
|
|
* [chantools](chantools.md) - Chantools helps recover funds from lightning channels
|
|
|
|
|