Bitcoin Forum
April 26, 2024, 02:27:14 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Other / Beginners & Help / Help with BIP44 and blockchain.com API on: August 10, 2018, 11:05:02 AM
We are currently developing a OTC direct BTC exchange. Last week we launched after using Blockchain.com 's receive api v2. We used them to generated addresses for clients to send us bitcoin. The system worked flawlessly and all minor bugs were quickly fixed. Till this happened...

The API states due to BIP44...

As defined in BIP 44, wallet software will not scan past 20 unused addresses. Given enough requests from this API that don't have a matching payment, you could generate addresses past this horizon, which would make spending funds paid to those addresses quite difficult. For this reason, this API will return an error and refuse to generate new addresses if it detects it would create a gap of over 20 unused addresses. If you encounter this error, you will either need to switch to a new xPub (within the same wallet is fine), or receive a payment to one of the previous 20 created addresses

However, We got a trade for over 0.8 BTC. my API key and xPUB generated a address and presented it to the user as normal. The user paid and we credited the user with his fiat. I go onto the blockchain explorer and see the funds, confirmed in the address which i should own, but its not in my wallet and the funds are not accessable. After back and forth trying to send little amounts to the address to maybe get it to allocate I head back to the API docs and read what I quoted above.. It said it will not generate passed 20 unused addresses because if it does the BIP44 will not scan >21 and allocate funds. So i was not concerned at first. I then made a support query explaining what had happened and this was their response..

Hello,

Our Receive Payments API (RPv2) does not allow generating more than 20 unused addresses consecutively. This is to comply with the BIP44 spec, which states that addresses of an xpub after this limit should not be checked for funds.

To avoid this limit, we advise against generating a new address until necessary. For example, when accepting a user payment, do not request a new address to be generated until the very end of a checkout process, when the user is likely to complete the payment.

As a workaround, you could also send a small amount of bitcoin every 20 addresses, to ensure that the address limit requirements are met.

Best,

As I said I read the docs again and saw this but then it appeared to me this is what happened. The API generated more than 20 unused addresses and continued even though their docs said this would not happen as I am using rp V2. The addresses given to the user was number 21 and he sent funds to it that were not allocated to my account even though I own the address. I explained this to support after some tests and even paid out to every unpaid invoice as they suggested I do, still nothing showing in my blockchain wallet and the btc still sits in that address.

Support has not answered me in 2 days and they appear not to be interested in helping me.. what do I do?? Is there anyway I can recover my funds by manually scanning the address with my api key and xpub so it can allocate my funds to me. i

Any help or suggestions will be appreciated.. Im sure other users of their api have encountered this issue 
2  Bitcoin / Development & Technical Discussion / Help. Blockchain.com Bip44 spec rpv2 API on: August 10, 2018, 09:21:28 AM
We are currently developing a OTC direct BTC exchange. Last week we launched after using Blockchain.com 's receive api v2. We used them to generated addresses for clients to send us bitcoin. The system worked flawlessly and all minor bugs were quickly fixed. Till this happened...

The API states due to BIP44...

As defined in BIP 44, wallet software will not scan past 20 unused addresses. Given enough requests from this API that don't have a matching payment, you could generate addresses past this horizon, which would make spending funds paid to those addresses quite difficult. For this reason, this API will return an error and refuse to generate new addresses if it detects it would create a gap of over 20 unused addresses. If you encounter this error, you will either need to switch to a new xPub (within the same wallet is fine), or receive a payment to one of the previous 20 created addresses

However, We got a trade for over 0.8 BTC. my API key and xPUB generated a address and presented it to the user as normal. The user paid and we credited the user with his fiat. I go onto the blockchain explorer and see the funds, confirmed in the address which i should own, but its not in my wallet and the funds are not accessable. After back and forth trying to send little amounts to the address to maybe get it to allocate I head back to the API docs and read what I quoted above.. It said it will not generate passed 20 unused addresses because if it does the BIP44 will not scan >21 and allocate funds. So i was not concerned at first. I then made a support query explaining what had happened and this was their response..

Hello,

Our Receive Payments API (RPv2) does not allow generating more than 20 unused addresses consecutively. This is to comply with the BIP44 spec, which states that addresses of an xpub after this limit should not be checked for funds.

To avoid this limit, we advise against generating a new address until necessary. For example, when accepting a user payment, do not request a new address to be generated until the very end of a checkout process, when the user is likely to complete the payment.

As a workaround, you could also send a small amount of bitcoin every 20 addresses, to ensure that the address limit requirements are met.

Best,


As I said I read the docs again and saw this but then it appeared to me this is what happened. The API generated more than 20 unused addresses and continued even though their docs said this would not happen as I am using rp V2. The addresses given to the user was number 21 and he sent funds to it that were not allocated to my account even though I own the address. I explained this to support after some tests and even paid out to every unpaid invoice as they suggested I do, still nothing showing in my blockchain wallet and the btc still sits in that address.

Support has not answered me in 2 days and they appear not to be interested in helping me.. what do I do?? Is there anyway I can recover my funds by manually scanning the address with my api key and xpub so it can allocate my funds to me. i

Any help or suggestions will be appreciated.. Im sure other users of their api have encountered this issue 
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!