Generate a script containing the on-chain keys of an lnd wallet that can be imported into other software like bitcoind
Generates a script that contains all on-chain private (or public) keys derived from an lnd 24 word aezeed wallet. That script can then be imported into other software like bitcoind.
The following script formats are currently supported:
chantools genimportscript [flags]
chantools genimportscript --format bitcoin-cli \
--recoverywindow 5000
--bip39 read a classic BIP39 seed and passphrase from the terminal instead of asking for lnd seed format or providing the --rootkey flag
--derivationpath string use one specific derivation path; specify the first levels of the derivation path before any internal/external branch; Cannot be used in conjunction with --lndpaths
--format string format of the generated import script; currently supported are: bitcoin-importwallet, bitcoin-cli, bitcoin-cli-watchonly, bitcoin-descriptors and electrum (default "bitcoin-importwallet")
-h, --help help for genimportscript
--lndpaths use all derivation paths that lnd used; results in a large number of results; cannot be used in conjunction with --derivationpath
--recoverywindow uint32 number of keys to scan per internal/external branch; output will consist of double this amount of keys (default 2500)
--rescanfrom uint32 block number to rescan from; will be set automatically from the wallet birthday if the lnd 24 word aezeed is entered (default 500000)
--rootkey string BIP32 HD root key of the wallet to use for decrypting the backup; leave empty to prompt for lnd 24 word aezeed
--stdout write generated import script to standard out instead of writing it to a file
--walletdb string read the seed/master root key to use for decrypting the backup from an lnd wallet.db file instead of asking for a seed or providing the --rootkey flag
--nologfile If set, no log file will be created. This is useful for testing purposes where we don't want to create a log file.
-r, --regtest Indicates if regtest parameters should be used
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used