-
-
Save nc50lc/600f2e1034c0898bb127f998258e3bda to your computer and use it in GitHub Desktop.
converts bip39 mnemonic to bip49 first account xprv. requires electrum.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#converts bip39 mnemonic to bip49 first account xprv | |
from electrum import keystore | |
import sys | |
mnemonic = ' '.join( sys.argv[1:] ) | |
if keystore.bip39_is_checksum_valid( mnemonic ) == (True,True) : | |
k = keystore.from_bip39_seed( mnemonic, "", "m/49'/0'/0'" ) | |
print( k.xprv ) | |
else: | |
print ( "Invalid mnemonic" ) | |
print ( "To use this script call it with the seed mnemonic words as the only arguments" ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment