From 11c1a11273c5aeba2802f973ca60bfee8d7572c1 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Mon, 2 Nov 2020 00:14:20 +0100 Subject: [PATCH] doc: document output descriptors in hsmtool Touch a bit about it as a backup/recovery mechanism in the FAQ Signed-off-by: Antoine Poinsot --- doc/FAQ.md | 1 - doc/lightning-hsmtool.8 | 13 ++++++++++++- doc/lightning-hsmtool.8.md | 10 ++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/FAQ.md b/doc/FAQ.md index ce82a27eb9c4..40a7b7753a5b 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -108,7 +108,6 @@ C-lightning has an internal bitcoin wallet, which you can use to make "on-chain" transactions, (see [withdraw](https://lightning.readthedocs.io/lightning-withdraw.7.html). These on-chain funds are backed up via the HD wallet seed, stored in byte-form in `hsm_secret`. -and which you can backup thanks to a seed stored in the `hsm_secret`. `lightningd` also stores information for funds locked in Lightning Network channels, which are stored in a database. This database is required for on-going channel updates as well as channel closure. There is no single-seed backup for funds locked in channels. diff --git a/doc/lightning-hsmtool.8 b/doc/lightning-hsmtool.8 index f40d174feaf7..46c1f4b9a59a 100644 --- a/doc/lightning-hsmtool.8 +++ b/doc/lightning-hsmtool.8 @@ -51,6 +51,17 @@ and is usually no greater than the number of channels that the node has ever had\. Specify \fIpassword\fR if the \fBhsm_secret\fR is encrypted\. + + \fBdumponchaindescriptors\fR \fIhsm_secret\fR [\fIpassword\fR] [\fItestnet\fR] +Dump output descriptors for our onchain wallet\. +The descriptors can be used by external services to be able to generate +addresses for our onchain wallet\. (for example on \fBbitcoind\fR using the +\fBimportmulti\fR or \fBimportdescriptors\fR RPC calls) +We need the path to the hsm_secret containing the wallet seed, and an optional +(skip using \fB""\fR) password if it was encrypted\. +To generate descriptors using testnet master keys, you may specify \fItestnet\fR as +the last parameter\. By default, mainnet-encoded keys are generated\. + .SH BUGS 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 the rest of the code is covered by the BSD-style MIT license\. Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:11b3e6c050eb31e7faac10e8b75c3f7b7d57269f7f8c47c67f6d115b7a479c09 +\" SHA256STAMP:14b345602e8b20325cb943f760767b6bbeec39e5128ca496c27be2d0163a07ca diff --git a/doc/lightning-hsmtool.8.md b/doc/lightning-hsmtool.8.md index c87c2c449184..cb26bc1abfa1 100644 --- a/doc/lightning-hsmtool.8.md +++ b/doc/lightning-hsmtool.8.md @@ -48,6 +48,16 @@ and is usually no greater than the number of channels that the node has ever had. Specify *password* if the `hsm_secret` is encrypted. + **dumponchaindescriptors** *hsm_secret* \[*password*\] \[*testnet*\] +Dump output descriptors for our onchain wallet. +The descriptors can be used by external services to be able to generate +addresses for our onchain wallet. (for example on `bitcoind` using the +`importmulti` or `importdescriptors` RPC calls) +We need the path to the hsm_secret containing the wallet seed, and an optional +(skip using `""`) password if it was encrypted. +To generate descriptors using testnet master keys, you may specify *testnet* as +the last parameter. By default, mainnet-encoded keys are generated. + BUGS ----