Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: PrintCoins on November 19, 2011, 06:14:16 PM



Title: Command line script to create a public address from a private key
Post by: PrintCoins on November 19, 2011, 06:14:16 PM
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.


Title: Re: Command line script to create a public address from a private key
Post by: pc on November 19, 2011, 06:42:23 PM
The tool I've heard of before was called Bitcoin Off-The-Grid (https://bitcointalk.org/index.php?topic=23081.0), though I think there may be others now.

There's also vanitygen (https://bitcointalk.org/index.php?topic=25804.0), 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 (https://bitcointalk.org/index.php?topic=34028.0). 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.


Title: Re: Command line script to create a public address from a private key
Post by: rjk on November 19, 2011, 09:08:21 PM
https://bitcointalk.org/index.php?topic=50721.0


Title: Re: Command line script to create a public address from a private key
Post by: btc_artist on November 21, 2011, 08:14:32 PM
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.


Title: Re: Command line script to create a public address from a private key
Post by: Stephen Gornick on May 30, 2012, 12:45:50 AM
Necro thread sorry ...

A python utility here:
 - http://bitcointalk.org/index.php?topic=84238.0


Title: Re: Command line script to create a public address from a private key
Post by: Mike Hearn on May 30, 2012, 04:18:10 PM
There's also wallet-tool from bitcoinj (java but can be compiled to a native binary).


Title: Re: Command line script to create a public address from a private key
Post by: davout on May 30, 2012, 07:17:39 PM
In pure shell : https://bitcointalk.org/index.php?topic=11606.0


Title: Re: Command line script to create a public address from a private key
Post by: etotheipi on May 30, 2012, 10:10:29 PM
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 (http://bitcoinarmory.com/index.php/building-armory-from-source).  Perhaps I will add a download to a precompiled CppBlockUtils.so/.dll/.pyd/.whatever for users that want to access armoryengine without compiling anything.