ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.82k stars 896 forks source link

Novice musings on wallet #2534

Open Toninoso opened 5 years ago

Toninoso commented 5 years ago

If one searches for 'HD wallet' on this site one would find 8 closed and one open issue. They relate to these short musings.

Having a separate Bitcoin and Lightning wallet is certainly right in some cases. But in some cases it is a complication, a bother.

I would really like to be able to use 24 word mnemonic to initialize my Lightning wallet. Sometimes. At other times, I would like to be able to wipe out my SSD device, with installed Bitcoin and Lightning, secure in the knowledge that I can recover all the funds that are not committed to the channels by entering the mnemonic on, say, Ledger Nano.

cdecker commented 5 years ago

We decided to not implement an initialization via mnemonic so far because, as you mention, that might give the false sense of security, given that it allows only the recovery of on-chain funds. If you want to safeguard the root-seed you can certainly do that by backing up the hsm_secret file, or writing the seed down onto a piece of paper:

The following will give you a hex-encoded version of the 32 byte seed

hexdump ~/.lightning/hsm_secret

Eventually we will definitely add a more user-friendly way to restore on-chain funds, but for the reasons mentioned above, it's not very high on our priorities.