python – sooner technique to get bip44 deal with from mnemonic?

0
60


lengthy story brief my 12 phrase seed phrase has a passphrase and I forgot the order. So I did all of the permutations of the 12 phrases to search out the legitimate ones (29939407). So the script beneath is my manner of add the passphrase after which getting all of the legacy addresses. Nonetheless, I am undecided if It is my laptop however thus far the script I’ve has solely written 3.5 million addresses and it has been operating for 12 hours! so I used to be questioning if somebody might reccomend any methods to hurry up this script?

from bip_utils import Bip39MnemonicGenerator, Bip39SeedGenerator, Bip39WordsNum, Bip44Changes, Bip84, Bip84Coins, Bip44Changes, Bip44, Bip44Coins

mnemonics_filename = open ('sats.txt')
address_filename = open('sats-address.txt')

mnemonics = open(mnemonics_filename, 'r')
deal with = open(address_filename, 'w+')

for mnemonic in mnemonics:
    seed_bytes = Bip39SeedGenerator(mnemonic).Generate("satsenchanter")
    bip44_mst_ctx = Bip44.FromSeed(seed_bytes, Bip44Coins.BITCOIN)
    bip44_acc_ctx = bip44_mst_ctx.Objective().Coin().Account(0)
    bip44_chg_ctx = bip44_acc_ctx.Change(Bip44Changes.CHAIN_EXT)
    for i in vary(1):
        bip44_addr_ctx = bip44_chg_ctx.AddressIndex(i)
        b44.write(bip44_addr_ctx.PublicKey().ToAddress()+'n')

LEAVE A REPLY

Please enter your comment!
Please enter your name here