Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check a 0-confirmation Bitcoin transaction without having the private key in my wallet?

I am programming a site that accepts Bitcoin payments, but I do not want to hold any private keys on the server. I am using the so-called "lazy API" method where I create private keys and addresses ahead of time off-line, and then get customers to send to them, and I want to be notified when the transaction happens, as fast as possible, with 0 confirmations.

I can't figure out how to do this programmatically, unless I add the private key to bitcoind's wallet, which I don't want to do for security reasons. I'd prefer to do it in PHP, but I'll settle for whatever.

like image 818
Cocorico Avatar asked Nov 25 '22 00:11

Cocorico


1 Answers

You don't need to check your own bitcoin client for a transaction to a specific address. You can use https://blockchain.info/api.

Also, since version .10.0 the bitcoin client supports watch only addresses which allows you to add the public key without the private key and observe transactions this way.

like image 123
boris Avatar answered Nov 26 '22 20:11

boris