2

I want to create an API service that will trigger my local wallet to generate new account with receive address and return that address to a user.

User => API => my_local_wallet => API => User

The user will have this address and will be able to transfer Bitcoins into that address.

1

Yes, you can use bitcoin-cli for address generation.

To learn more try:

bitcoin-cli help getnewaddress

Also consider using some RESTful service running on your Bitcoind host.

For Node I can recommend https://www.npmjs.com/package/bitcoin-core

  • In order to keep my wallet anonymous I would want to create new account addresses. – Dor Bar Nov 19 '18 at 21:25
  • yes that command exactly does it – Boris Ivanov Nov 20 '18 at 9:23
  • But how should I attach the new address with any wallet on the network? My wallet is on my computer and the API is on a remote server. What I expect the API to do is to have the account address of my local wallet and assign the new Receiving-Address generated by the API to my wallet address. Can I do that? – Dor Bar Nov 21 '18 at 10:53
  • I guess its standard scenario: U have webservice which sell Pizza. 1. User ordering Pizza which cost 1BTC. 2. API make notice they need new address. 3. Ur PC generates new address. 4. API takes this address and ask user to pay. 5. User pays. 6. Ur PC periodically checks ur accout to see incoming transaction on that particular address to 1BTC. 7 If in X minutes 1BTC coming Ur PC notify Ur API that "Transaction passed". 8. You notify Ur chef to start cooking Pizza – Boris Ivanov Nov 21 '18 at 13:48
  • Between 2 and 3 there is so ting going on. Should be another peace of software that will trigger my wallet to create this new address automatically. – Dor Bar Nov 25 '18 at 10:05

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.