I need a python script to verify, in an air gapped system, that my 24-word (or 12-word) mnemonic seed indeed generates the xpub that my wallet is showing me.
Is there a simple script that does that, having minimal dependencies?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI need a python script to verify, in an air gapped system, that my 24-word (or 12-word) mnemonic seed indeed generates the xpub that my wallet is showing me.
Is there a simple script that does that, having minimal dependencies?
Yes, I'd say the simplest way is to use python bip39 implementation of trezor, this one file should be enough with methods:
to_seed
- to convert list of the words into seed and
to_hd_master_key
- to generate master xpub/xpriv
It doesn't support further derivations (which require a bit more dependencies), for which I'd suggest using bip32 library.