We want to accept bitcoin on our ecommerce, we want each user to have a unique bitcoin address.
How to generate those addresses ? Is it possible to generate them without the private key ? We don't want to have the private key anywhere in the code.
How to access all the bitcoins in all those addresses at once ? Is it possible to receive the bitcoins in unique addresses but in the same account ?
Best regards,
If you already have a node running or plan on running your own node, take a look at BitPay's bitcore npm module (and its related packages):
https://www.npmjs.com/package/bitcore
If you prefer to avoid running your own node and have no security or other concerns about using a third party provider, take a look at blockchain's API:
https://blockchain.info/api/api_receive
In both cases you should be able to use aforementioned xpub key to generate BTC addresses without having to expose the private keys from whatever airgapped device or hardware wallet you are using.