Post
Topic
Board Development & Technical Discussion
Re: How to check any balance and send from any private key?
by
J-Norm
on 07/11/2012, 04:05:07 UTC
  • Quickly send a payment from any private key

This isn't what you wanted to do but perhaps if you want a quick and dirty solution, you can use Blockchain.info to sweep the funds from a private key to an address in your local wallet.  That way you don't need to import that private key into the bitcoin.org client.

That can be done using the API:

I have been meaning to add this ability to the blockchain.info API for a while. You can now replace the guid in the send api (https://blockchain.info/api/api_send) with a Hex encoded private key.

https://blockchain.info/merchant/4d6c9dff493fcd2da9508e01c8b13461d37e3d8b6df1732942d3257874051362/payment?to=$address&amount=$amount

$address = destination bitcoin address.
$amount = amount to send in satoshi.


It looks like you can feed an unsigned raw transaction and a list of private keys into the new bitcoin client and it will sign and send the transaction without storing the keys in your wallet so this seems like a good solution for sending. I can use my perlfoo to create the raw transaction.

(By the way I just had to check if 4d6c9dff493fcd2da9508e01c8b13461d37e3d8b6df1732942d3257874051362 had any money in it, damn none!)