What’s a Block Explorer??? What you Need to Know about Blockchain.info API

Takeaway:

 

  • Forwards can take a bit of time (reports of up to 33 confirmations in some cases.)
  • Sometimes, the internet can be too harsh and thus tarnish company reputation.  This likely happens based on Mob Mentality – stop accepting and start questioning…everything (even this :p)
  • The minimum amount receive payments api requires is .0005 BTC, so once this minimum is met, the transaction will forward to your address.

 

The Rub:

Last night I spent a half hour or so integrating the Blockchain.info Receice Payments API service. For those of you who got this far in the article (great job by the way), Blockchain.info is the worlds most recognized Bitcoin Block Exlorer.  What’s a block explorer?  => Bitcoin is a peer 2 peer network – Just like how there’s a protocol with filesharing for using Magnet Links to distribute files across the internet, for viewing and exploring the transactions in Bitcoin Network?:  There’s an ‘app’ for that too!  Block Explorers aren’t new, There’s Abe, bitcore, Insight, and others.  In fact, what’s nice about many of them is that you can Git-Clone a copy and fire up your own copy.  So why do Block Explorers matter? Ask yourself, how do you verify your BTC payment ‘actually’ went to the recipient? Sure, your wallet sees the funds you sent, but how do you, Satoshi Nakamoto, confirm that the transaction indeed was sent?  Well without going through the mess of publishing your own blockExplorer on top of a full node (totally possible by the way), you can simply use an existing block-explorer to see the transactions happening in the network as well as any past transaction that occurred.  For instance, with less than one minute of effort, I can even see the first time I ever spent Bitcoin: here. (that’s probably a trick link – as you can see it appears my address at the time was shuffling funds to itself.)

Now that the basics are out of the way, I’ll get into why I wrote the sensationalist title above:  I’ve seen that over the past few years, Blockchain.info seems to get a bad wrap from different sources.  Taking an objective approach, I go to the first lazy source I can find: wikipedia. They came online around 2011.  A click into a reference link deeper, and we learn that blockchain is actually a project operated under direction of the company Qkos Services Ltd (interestingly it says they’re dissolved???  Feedback from Ben Reeves or Nic Carey in the comments would be greatly appreciated!).  According to Bloomberg Business, their phone number is: 44 19 0467 5792.  So, anyway, I’m here today because I would like to use their api.  This API allows anyone to setup a bitcoin forwarding service – in simple terms, many users may not want to share a single bitcoin address to the world.

15pU3C6iDW6DwHP1qHnbWjj47aDaRicGsW

See how this address is here?  If you’ve got a phone, you could scan it for sure!  If I wanted, I could program the address here within whatever I wished.  However, the problem with this address is that you now see how much money I’ve collected.  While I personally don’t care if you know how much is in this address here or there, having knowledge of ALL my past transactions is a bit similar to feeling naked – why should I be subjected to the whole world prying its eyes on my activities and who gave me money, when they did it?  Enter – Receive payments API.

This API is great because it does not require you to have wallet or account with blockchain.info at all – With a small snippet of code, any content creator can dynamically generate a new payment address at will – With the snippet below, you can create a custom web page that will gereate a new address for payment on refresh.  Yet, once money is paid towards it, the BTC is automatically forwarded to my specified address!

//Receive Payments api Courtesy of Blockchain.info


$secret = '{your random string or identifier}';

$my_address = '{your BTC address for payments}';

$my_callback_url = 'https://mystore.com?invoice_id=058921123&secret='.$secret;

$root_url = 'https://blockchain.info/api/receive';

$parameters = 'method=create&address=' . $my_address .'&callback='. urlencode($my_callback_url);

$response = file_get_contents($root_url . '?' . $parameters);

$object = json_decode($response);

echo 'Send Payment To : ' . $object->input_address;

 

After throwing together a proof of concept – complete with a dynamic QR code generation mechanism I moved forward to send off a test transaction, the minimum amount I could fathom = 2 cents aka 0.00008292 BTC.  So far so good, Mycelium even recognized it so I presume that the link itself is also in the correct format and send it.  Then I wait.  and wait some more.  After 4 hours and 36 confirmations I decide to start looking around a bit more to see what info I could dig up.   I also begin to feel worried about the concerns brought forth above, until I find this little gem of a post from Bitcointalk back in 2013 about the exact similar issues – turns out I had not sent in the minimum amount required for the forwarding service to function – .0005 BTC or 24 cents as of this writing.

So, in closing, recall that no matter how far awesome technology comes, no matter how sophisticated our equipment can be, RTFM is still and shall forever remain Rule Numero Uno.

Courtesy XKCD

 

Post Author: Frankenmint

From the pristine land of the internetz, the Frankenment was bred from machine. While looking to embrace the new world Linux regime he is truly a windows bred. I've come from the darkness to the light to share with you other internetz fol-ken to share the message of virtual money. Through our actions, we can make the virtual world yet again beyond the decree of the internet, with the decree of internetz money! Bitcoin, the Supercurrency, the official tender of the internetz that will be accepted by all countries and all fol-ken Alike!