doc: Add documentation for --recover flag.

This commit is contained in:
adi2011 2023-07-31 09:06:36 +09:30 committed by Rusty Russell
parent 51f72c1d1d
commit 97bc3ae20a
2 changed files with 18 additions and 0 deletions

View File

@ -57,6 +57,19 @@ The returned result must contain a `result` member which is either the string `d
Note that `peer_connected` is a chained hook. The first plugin that decides to `disconnect` with or without an `error_message` will lead to the subsequent plugins not being called anymore.
### `recover`
This hook is called whenever the node is started using the --recovery flag. So basically whenever a user wants to recover their node with a codex32 secret, they can use --recover=<codex32secret> to use that secret as their HSM Secret.
The payload consists of the following information:
```json
{
"codex32": "ms10leetsllhdmn9m42vcsamx24zrxgs3qrl7ahwvhw4fnzrhve25gvezzyqqtum9pgv99ycma"
}
```
This hook is intended to be used for recovering the node and funds by connecting to some known peers who keep your peer storage backups with them.
### `commitment_revocation`
This hook is called whenever a channel state is updated, and the old state was revoked. State updates in Lightning consist of the following steps:

View File

@ -290,6 +290,11 @@ connections; default is not to activate the plugin at all.
### Lightning node customization options
* **recover**=*codex32secret*
A 32-byte secret encoded as a codex32 secret string. This would be used to construct
`hsm_secret`` in case it doesn't exist.
* **alias**=*NAME*
Up to 32 bytes of UTF-8 characters to tag your node. Completely silly, since