1

hello I am building a web application using nodejs, bcoin and my application provides the user with a bitcoin address in which to deposit funds, I would like to know how I can listen on my nodejs server:

  • when the user deposits funds in the bitcoin address that my application provided
  • The deposit has gone through 12 confirmations.
Parcero
  • 35
  • 3

1 Answers1

1

The bcoin full node and wallet emit JavaScript events for things like blocks and transactions, which can be listened for with a websocket client.

There is a guide to sockets and events in bcoin here: bcoin.io/guides/events.html

If you have any more questions about bcoin you can join us on slack or on IRC (Libera) #bcoin

pinhead
  • 4,932
  • 2
  • 23
  • 38
  • Thanks for the answer, can you tell me if the websocket client notifies me only the confirmations that a transaction that I send has or also those that send me to my address? – Parcero Dec 16 '21 at 00:54
  • Both sent and received TXs should be emitted by events. – pinhead Dec 16 '21 at 01:32