btcpayserver / btcpayserver/btcpayserver-docker
Add C-Lightning hsm_secret backup
- Dominant language
- Shell
- Stars
- 752
- Forks
- 433
- Avg merge
- 5h 38m
- Merged PRs (30d)
- 60
Description
BTCPay has a backup UI for LND's Static Channel Backup (SCB), which is basically the private key of the on-chain wallet. The C-Lightning equivalent would be backing up the hsm_secret key. This is relatively easy to do:
https://lightning.readthedocs.io/BACKUP.html
There are two possible options:
1. Allow the user to save the hex dump
2. C-Lightning has the ability to generate the hsm_secret from BIP39 words, although conversion from hsm_secret to BIP39 seems to be missing. Still, you could generate a wallet, show the user the BIP39 words to save them, and use lightning-hsmtool to generate the hsm_secret.
NOTE: A robust backup for the C-Lightning database would still be needed, such as is suggested in issue #393.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the C-Lightning BACKUP documentation linked in the issue and inspect BTCPay's existing LND Static Channel Backup UI for the relevant entry point. Compare the hex-dump and BIP39 options, then define a backup flow that lets users preserve the hsm_secret; verify that the separate C-Lightning database backup concern from issue #393 remains outside this change.
Written by the indexing model from the issue text.
Assessment
- Domain
- security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100