Skip to content

Commit 0789785

Browse files
committed
README+doc: update docs
1 parent 09b20b1 commit 0789785

File tree

4 files changed

+64
-3
lines changed

4 files changed

+64
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ Available Commands:
424424
filterbackup Filter an lnd channel.backup file and remove certain channels
425425
fixoldbackup Fixes an old channel.backup file that is affected by the lnd issue #3881 (unable to derive shachain root key)
426426
forceclose Force-close the last state that is in the channel.db provided
427+
scbforceclose Force-close the last state that is in the SCB provided
427428
genimportscript Generate a script containing the on-chain keys of an lnd wallet that can be imported into other software like bitcoind
428429
migratedb Apply all recent lnd channel database migrations
429430
pullanchor Attempt to CPFP an anchor output of a channel
@@ -496,6 +497,7 @@ Legend:
496497
| [removechannel](doc/chantools_removechannel.md) | (:skull: :warning:) Remove a single channel from a `channel.db` file |
497498
| [rescueclosed](doc/chantools_rescueclosed.md) | :pencil: (:pushpin:) Rescue funds in a legacy (pre `STATIC_REMOTE_KEY`) channel output |
498499
| [rescuefunding](doc/chantools_rescuefunding.md) | :pencil: (:pushpin:) Rescue funds from a funding transaction. Deprecated, use [zombierecovery](doc/chantools_zombierecovery.md) instead |
500+
| [scbforceclose](doc/chantools_scbforceclose.md) | :pencil: :warning: :skull: Force close a channel using the latest state from a channel backup. EXTREMELY DANGEROUS, read help text! |
499501
| [showrootkey](doc/chantools_showrootkey.md) | :pencil: Display the master root key (`xprv`) from your seed (DO NOT SHARE WITH ANYONE) |
500502
| [signmessage](doc/chantools_signmessage.md) | :pencil: Sign a message with the nodes identity pubkey. |
501503
| [signpsbt](doc/chantools_signpsbt.md) | :pencil: Sign a Partially Signed Bitcoin Transaction (PSBT) |

doc/chantools.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ https://github.com/lightninglabs/chantools/.
4343
* [chantools rescueclosed](chantools_rescueclosed.md) - Try finding the private keys for funds that are in outputs of remotely force-closed channels
4444
* [chantools rescuefunding](chantools_rescuefunding.md) - Rescue funds locked in a funding multisig output that never resulted in a proper channel; this is the command the initiator of the channel needs to run
4545
* [chantools rescuetweakedkey](chantools_rescuetweakedkey.md) - Attempt to rescue funds locked in an address with a key that was affected by a specific bug in lnd
46+
* [chantools scbforceclose](chantools_scbforceclose.md) - Force-close the last state that is in the SCB provided
4647
* [chantools showrootkey](chantools_showrootkey.md) - Extract and show the BIP32 HD root key from the 24 word lnd aezeed
4748
* [chantools signmessage](chantools_signmessage.md) - Sign a message with the node's private key.
4849
* [chantools signpsbt](chantools_signpsbt.md) - Sign a Partially Signed Bitcoin Transaction (PSBT)

doc/chantools_forceclose.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ Force-close the last state that is in the channel.db provided
44

55
### Synopsis
66

7-
If you are certain that a node is offline for good (AFTER
8-
you've tried SCB!) and a channel is still open, you can use this method to
9-
force-close your latest state that you have in your channel.db.
7+
8+
If you are certain that a node is offline for good (AFTER you've tried SCB!)
9+
and a channel is still open, you can use this method to force-close your
10+
latest state that you have in your channel.db.
1011

1112
**!!! WARNING !!! DANGER !!! WARNING !!!**
1213

doc/chantools_scbforceclose.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## chantools scbforceclose
2+
3+
Force-close the last state that is in the SCB provided
4+
5+
### Synopsis
6+
7+
8+
If you are certain that a node is offline for good (AFTER you've tried SCB!)
9+
and a channel is still open, you can use this method to force-close your
10+
latest state that you have in your channel.db.
11+
12+
**!!! WARNING !!! DANGER !!! WARNING !!!**
13+
14+
If you do this and the state that you publish is *not* the latest state, then
15+
the remote node *could* punish you by taking the whole channel amount *if* they
16+
come online before you can sweep the funds from the time locked (144 - 2000
17+
blocks) transaction *or* they have a watch tower looking out for them.
18+
19+
**This should absolutely be the last resort and you have been warned!**
20+
21+
```
22+
chantools scbforceclose [flags]
23+
```
24+
25+
### Examples
26+
27+
```
28+
chantools scbforceclose --multi_file channel.backup
29+
```
30+
31+
### Options
32+
33+
```
34+
--apiurl string API URL to use (must be esplora compatible) (default "https://api.node-recovery.com")
35+
--bip39 read a classic BIP39 seed and passphrase from the terminal instead of asking for lnd seed format or providing the --rootkey flag
36+
-h, --help help for scbforceclose
37+
--multi_backup string a hex encoded multi-channel backup obtained from exportchanbackup for force-closing channels
38+
--multi_file string the path to a single-channel backup file (channel.backup)
39+
--publish publish force-closing TX to the chain API instead of just printing the TX
40+
--rootkey string BIP32 HD root key of the wallet to use for decrypting the backup and signing tx; leave empty to prompt for lnd 24 word aezeed
41+
--single_backup string a hex encoded single channel backup obtained from exportchanbackup for force-closing channels
42+
--single_file string the path to a single-channel backup file
43+
--walletdb string read the seed/master root key to use for decrypting the backup and signing tx from an lnd wallet.db file instead of asking for a seed or providing the --rootkey flag
44+
```
45+
46+
### Options inherited from parent commands
47+
48+
```
49+
-r, --regtest Indicates if regtest parameters should be used
50+
-s, --signet Indicates if the public signet parameters should be used
51+
-t, --testnet Indicates if testnet parameters should be used
52+
```
53+
54+
### SEE ALSO
55+
56+
* [chantools](chantools.md) - Chantools helps recover funds from lightning channels
57+

0 commit comments

Comments
 (0)