Blockchain.info updates Receive Payments API version to address edge cases

Blockchain.info updates Receive Payments API version to address edge cases

In a new update from Blockchain, who makes the popular bitcoin wallet and block explorer, they said have updated their Receive Payments API Version 2, which will address edge cases where some API users were encountering address gap issues.

When Blockchain created their latest version of the API, they decided to follow the BIP-44 standard for multi-account deterministic wallets. In the BIP there is a specific section on address gaps, which states:

Address gap limit is currently set to 20. If the software hits 20 unused addresses in a row, it expects there are no used addresses beyond this point and stops searching the address chain. We scan just the external chains, because internal chains receive only coins that come from the associated external chains.

Because of this, API users that create more than 20 bitcoin addresses and the previous 20 in a row aren’t used, any addresses beyond that initial 20 won’t be “seen” in the API until one of those previous 20 get a transaction. There are two ways to address this: 1) a dirty way would be to send some dust to those first 20 addresses so they next group of addresses can be seen or 2) not generate new addresses beyond the first 20 and display a message to API users that no more addresses can be generated until one of the first 20 get a transaction.

It seems Blockchain went with option 2, as they said starting August 1, 2016 they will respond to API requests that would push past the 20-address gap limit with an HTTP error, and they will not generate any new addresses for your xpub until they detect a payment that would close the gap below that limit. This ensures that API users will never have unreachable funds through the use of Receive Payments API V2, but might lead to not generating addresses when your users request them.

For users that want to bypass this new change, Blockchain is adding an advanced mechanism to override the gap by adding an optional ‘gap-limit’ parameter into the API.

Recently Blockchain received a lot of praise for the release of the Thunder Network, which is an off-chain bitcoin payments solution using smart contracts, currently in the alpha-testing phase. The Thunder Network is the first usable implementation of the Lightning network for off-chain bitcoin payments that settles back to the main bitcoin blockchain. The Thunder Network has the ability to make live, nearly instant, and ultra-cheap transactions.

SHARE
david@bitcoin.com'
David is a writer, researcher, and developer who is passionate about bitcoin and blockchain. He writes for Bitcoin.com, Blockchain.com, and is the founder of Bitcoinx.io (which was acquired by Bitcoin.com). David previously used to write and curate for Myspace and has worked in the fintech and payments space for over 15 years.