-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/lnwallet: add new wallet utility #2373
Conversation
d4f609f
to
3f86caa
Compare
Can you extend it to also dump a mnemonic phrase? |
That's not possible. The mnemonic phrase/seed is hashed to create the extended root key. The process cannot be reversed and only the BIP32 extended root key is stored in the |
@guggero Please add possibility to export also extended root key (xpriv). It is major piece of information for many tools for handling with wallets. |
@slush0 That's what you do with
It just says |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add COPY --from=builder /go/bin/lnwallet /bin/
to the Dockerfile
cherrypick on lightningnetwork#2373
26d9e9a
to
2bd1017
Compare
@Kukks you're right, thanks. At the time I probably thought that it wasn't really needed in the docker image but for consistency it's probably best to add it anyway. |
13ea0e3
to
63cd6af
Compare
Closing this in favor of https://github.com/guggero/chantools which now contains both functionalities of this PR (and more). |
In this PR we add a new command line utility program that allows us to inspect/dump a
wallet.db
file.Without this tool, there is currently no way to dump the private keys generated by
lnd
or even find out how many on-chain addresses have been generated (which is important to know when restoring a wallet from a seed).There are two sub-commands available:
dumpwallet
prints abitcoind
compatible dump wallet file to standard out (including all used addresses and their private keys).lnwallet --testnet dumpwallet --wallet_file example.db
walletinfo
prints the node's identity pubkey, the number of addresses used and, if requested, the BIP32 extended root key to standard out.lnwallet --testnet walletinfo --wallet_file example.db --with_root_key