Post
Topic
Board Project Development
Re: how to convert xprv to wif or (hex) 1,2,3 address index (python)
by
stalker00075
on 02/06/2022, 08:35:23 UTC
You can make a wrapper script around bip32gen, in a single file using `os.spawnl` to create a bip32gen subprocess and wait for it to exit. The wrapper will just read the list of keys from a file and loop through them.
Note: Make sure you make the script wrapper executable.
Code:
#!/usr/bin/python3
import os

keys = []
file = open('keys.txt' 'r')
for l in file:
    keys.append(l.strip('\n'))
for k in keys:
    os.spawnl(os.P_WAIT, '/path/to/bip32gen', ['cmd', 'options', 'as', 'list'])



I did through bash as advised odolvlobo
but it turned out the speed is very low 23 xprv per second and I have a dictionary for 1 million xprv

anyway thank you for checking