Convert a list of 64 hex keys to private import format

1

Is there a python script that i could use to convert a list of private hex keys to there import format in bulk?

How would I go about this..

Could this be adjusted to take a .txt list of hex addresses and convert the to private import format, then print the results to a txt file?

In [1]: import base58
In [2]: hexstring= "00010966776006953D5567439E5E39F86A0D273BEED61967F6"
In [3]: unencoded_string = bytes.fromhex(hexstring)
In [4]: encoded_string= base58.b58encode(unencoded_string)
In [5]: print(encoded_string)
16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM

ryan

Posted 2015-11-28T18:44:57.917

Reputation: 11

can this be adjusted to take a list of hex addresses and then convert them to private import format and print results to a txt file?ryan 2015-11-28T18:49:15.720

Answers

1

You should consider using this (or a similar) python library to import your keys, as straight conversion from hex to base58 can have a few gotchas:

https://github.com/vbuterin/pybitcointools

Check the examples in the README and you should be on your way to making your script.

Josh Cincinnati

Posted 2015-11-28T18:44:57.917

Reputation: 645