Skip to content

Commit 29e5764

Browse files
darosiorniftynei
authored andcommitted
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 0b3c476 commit 29e5764

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
@@ -55,6 +55,17 @@ Specify \fIpassword\fR if the \fBhsm_secret\fR is encrypted\.
5555
\fBgeneratehsm\fR \fIhsm_secret_path\fR
5656
Generates a new hsm_secret using BIP39\.
5757

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

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

83-
\" SHA256STAMP:918981692d3840344e15c539b007b473d5ea0ad481145eccff092bf61ec6ddb0
94+
\" SHA256STAMP:3d847c486363271e0635336caca4fd14f5007a3ff463c223fb5bdb52dbf7b98e

doc/lightning-hsmtool.8.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ Specify *password* if the `hsm_secret` is encrypted.
5151
**generatehsm** *hsm\_secret\_path*
5252
Generates a new hsm_secret using BIP39.
5353

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

0 commit comments

Comments
 (0)