I am missing something about the Hex format, I just cant figure out the fix.
here is my python:
import bitcoin
with open("hex_keys.txt","r") as f:
content = f.readlines()
# you may also want to remove whitespace characters like `\n` at the end of each line
content = [x.strip() for x in content]
f.close()
outfile = open("hex2add.txt","w")
for x in content:
outfile.write(bitcoi[Suspicious link removed]ivkey_to_address(x,'hex')+"\n")
outfile.write((x)+"\n")
outfile.close()
I get the following error:
Traceback (most recent call last):
File "hex2add.py", line 13, in <module>
outfile.write(bitcoi[Suspicious link removed]ivkey_to_address(x,'hex')+"\n")
File "/usr/local/lib/python2.7/dist-packages/bitcoin/main.py", line 304, in privkey_to_address
return pubkey_to_address(privkey_to_pubkey(priv), magicbyte)
File "/usr/local/lib/python2.7/dist-packages/bitcoin/main.py", line 451, in pubkey_to_address
bin_hash160(binascii.unhexlify(pubkey)), magicbyte)
File "/usr/local/lib/python2.7/dist-packages/bitcoin/py2specials.py", line 43, in bin_to_b58check
inp_fmtd = chr(int(magicbyte)) + inp
ValueError: invalid literal for int() with base 10: 'hex'