Post
Topic
Board Development & Technical Discussion
Re: How to generate qr codes for address and private keys?
by
Altoidnerd
on 08/09/2015, 05:28:00 UTC
Using the new bitcoin-core binaries in linux (be sure you have qrencode installed):

Code:
addr=$(./bitcoin-cli getnewaddress) && ./bitcoin-cli dumpprivkey $addr| qrencode -o ~/Desktop/$addr.privkey.png && echo "private key dumped for: "$addr

See http://altoidnerd.com/2015/09/06/how-import-a-bitcoind-address-private-key-into-breadwallet-ios-with-a-qr-code-using-bitcoin-core-for-ubuntu-linux/

Keep in mind the above snippet generated a new address.  You can use and address you have in mind e.g. "address":

Code:
addr="address" && ./bitcoin-cli dumpprivkey $addr| qrencode -o ~/Desktop/$addr.privkey.png && echo "private key dumped for: "$addr

Or if you have the private key as a string = "privkey":

Code:
key="privkey"; echo $key | qrencode -o ~/Desktop/mykey.png && echo "private key qr mykey.png created for $key