1

I'm trying to build an API similar to the blockchain.com wallet API so that I can send and receive bitcoin on my e-commerce site. I have a docker container running a pruned node and I'm using another docker container as an API server to send RPC requests to the bitcoind pruned docker container. The requests are all working and I'm using regtest network. Before I switch to the mainnet I would like to know a few things.

  1. People will be generating a huge amount of new bitcoin addresses whenever there is a new order being created but it's not sure that they will pay to that address, they may abandon the cart for instance, and will this cause problem? Do I need to maintain the addresses without any gaps?

  2. How can I create multiple wallets like blockchain.com, will the container running blockchain core be capable of doing this by just calling the RPC from the API container? Are there any restrictions to the number of wallets I can create?

  3. My site is an e-commerce site, can I create multiple wallets for each user on my site so that I can send them like affiliate commissions to their wallet from the main wallet for instance?

  4. Is there any procedures I need to be paying attention to particularly ? Please advise.

3 Answers 3

1
  1. You can keep generating addresses. Bitcoin Core is capable of generating and keeping track of millions of addresses. You don't need to worry about gap limit, as you are using bitcoin core. Gap limit issues mostly arise when you are deriving adresses from xpub
  2. Yes, you can create multiple wallets in bitcoin core using multiple wallet finds. About limits on number of wallets feel free to see this
  3. There are multiple open source projects that offer bitcoin wallet as a service which you can take inspiration from. Feel free to see IBM secure wallet and coinpunk
0

Yes, you'd need to maintain the full record of all addresses, because you don't know whether they'd still receive a payment eventually, after they've been seen by someone. Otherwise, you will miss getting paid and need to rescan later, so you might as well keep the full body in the first place.

bitcoind is probably not the right tool to track a multitude of different customers' wallets. Have you taken a look at BTCPayServer?

0

You try Bitpay's API to you are not experienced with coding, I think it is easy to implement on your e-commerce site. or, you should generate a single-use bitcoin address for every transaction and make sure to maintain the record for each transaction. Also, make sure to keep the private keys offline. above all, try hiring a bitcoin developer if your needs are much bigger.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.