Long story short my 12 word seed phrase has a passphrase and I forgot the order.
So I did all the permutations of the 12 words to find the valid ones (29939407). So the script below is my way of adding the passphrase and then getting all the legacy addresses.
However, I'm not sure if it's my computer but so far the script I have has only written 3.5 million addresses and it has been running for 12 hours! So I was wondering if anyone could recommend any ways to speed 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')
address = 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.Purpose().Coin().Account(0)
bip44_chg_ctx = bip44_acc_ctx.Change(Bip44Changes.CHAIN_EXT)
for i in range(1):
bip44_addr_ctx = bip44_chg_ctx.AddressIndex(i)
b44.write(bip44_addr_ctx.PublicKey().ToAddress()+'\n')