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
  • 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 Nov 28 '15 at 18:49
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.