Author

Topic: Command line script to create a public address from a private key (Read 3051 times)

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
If you compile the CppBlockUtils for Armory, you can do a lot with a very simple python script:

Code:
>>> from armoryengine import *
>>> priv = hex_to_binary('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
>>> binAddr20 = convertKeyDataToAddress(priv)
>>> print hash160_to_addrStr(binAddr20)
'19YCGbqXnsaTNTinE7EzjYS2shhv7BSQw1'

It is a royal pain to compile the CppBlockUtils in Windows, but it is quite easy in Linux.  Just follow the instructions on my Building Armory from Source page.  Perhaps I will add a download to a precompiled CppBlockUtils.so/.dll/.pyd/.whatever for users that want to access armoryengine without compiling anything.
legendary
Activity: 1526
Merit: 1134
There's also wallet-tool from bitcoinj (java but can be compiled to a native binary).
full member
Activity: 154
Merit: 102
Bitcoin!
Does anyone have a command line script that can be used to create a public address from a private key. I don't want to need bitcoind installed.

Can be php, python, bash, or whatever I can use in linux.
Do you want to create public addresses for people to pay to? An alternative would be to load a large number of pre-generated addresses into your database, and use one each time someone needs to pay.
pc
sr. member
Activity: 253
Merit: 250
The tool I've heard of before was called Bitcoin Off-The-Grid, though I think there may be others now.

There's also vanitygen, which I've found useful occasionally just running "vanitygen 1" to get a random private key with associated address, but that doesn't help you if you have a private key already.

Edit: Oh, and I can't believe I forgot pywallet. That may be what you're really looking for. Just as a disclaimer, the only one of these I've used personally is vanitygen; but I just haven't needed the others yet.
hero member
Activity: 533
Merit: 501
Does anyone have a command line script that can be used to create a public address from a private key. I don't want to need bitcoind installed.

Can be php, python, bash, or whatever I can use in linux.
Jump to: