Skip to content

Commit 11c1a11

Browse files
committed
doc: document output descriptors in hsmtool
Touch a bit about it as a backup/recovery mechanism in the FAQ Signed-off-by: Antoine Poinsot <[email protected]>
1 parent 6b9793a commit 11c1a11

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

doc/FAQ.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ C-lightning has an internal bitcoin wallet, which you can use to make "on-chain"
108108
transactions, (see [withdraw](https://lightning.readthedocs.io/lightning-withdraw.7.html).
109109
These on-chain funds are backed up via the HD wallet seed, stored in byte-form in `hsm_secret`.
110110

111-
and which you can backup thanks to a seed stored in the `hsm_secret`.
112111
`lightningd` also stores information for funds locked in Lightning Network channels, which are stored
113112
in a database. This database is required for on-going channel updates as well as channel closure.
114113
There is no single-seed backup for funds locked in channels.

doc/lightning-hsmtool.8

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ and is usually no greater than the number of channels that the node has
5151
ever had\.
5252
Specify \fIpassword\fR if the \fBhsm_secret\fR is encrypted\.
5353

54+
55+
\fBdumponchaindescriptors\fR \fIhsm_secret\fR [\fIpassword\fR] [\fItestnet\fR]
56+
Dump output descriptors for our onchain wallet\.
57+
The descriptors can be used by external services to be able to generate
58+
addresses for our onchain wallet\. (for example on \fBbitcoind\fR using the
59+
\fBimportmulti\fR or \fBimportdescriptors\fR RPC calls)
60+
We need the path to the hsm_secret containing the wallet seed, and an optional
61+
(skip using \fB""\fR) password if it was encrypted\.
62+
To generate descriptors using testnet master keys, you may specify \fItestnet\fR as
63+
the last parameter\. By default, mainnet-encoded keys are generated\.
64+
5465
.SH BUGS
5566

5667
You should report bugs on our github issues page, and maybe submit a fix
@@ -76,4 +87,4 @@ Note: the modules in the ccan/ directory have their own licenses, but
7687
the rest of the code is covered by the BSD-style MIT license\.
7788
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
7889

79-
\" SHA256STAMP:11b3e6c050eb31e7faac10e8b75c3f7b7d57269f7f8c47c67f6d115b7a479c09
90+
\" SHA256STAMP:14b345602e8b20325cb943f760767b6bbeec39e5128ca496c27be2d0163a07ca

doc/lightning-hsmtool.8.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ and is usually no greater than the number of channels that the node has
4848
ever had.
4949
Specify *password* if the `hsm_secret` is encrypted.
5050

51+
**dumponchaindescriptors** *hsm_secret* \[*password*\] \[*testnet*\]
52+
Dump output descriptors for our onchain wallet.
53+
The descriptors can be used by external services to be able to generate
54+
addresses for our onchain wallet. (for example on `bitcoind` using the
55+
`importmulti` or `importdescriptors` RPC calls)
56+
We need the path to the hsm_secret containing the wallet seed, and an optional
57+
(skip using `""`) password if it was encrypted.
58+
To generate descriptors using testnet master keys, you may specify *testnet* as
59+
the last parameter. By default, mainnet-encoded keys are generated.
60+
5161
BUGS
5262
----
5363

0 commit comments

Comments
 (0)