0
guys. I need to create bitcoin watcher, which will subscribe to new block event of bitcoin node and make some operations with mined transactions.
For starting node I use
bitcoind -testnet -datadir=/home/ubuntu/bitcoin/ -rpcuser=user -rpcpassword=password
And use it in Node.js via library Bitcoin core
I found only one way to interact with new block event:
here the solution. But it was answer for five years ago. I hope that it can be much better solution for subscribing for new blocks without using bcoin or else frameworks, which work with own nodes and doesn't have possibility to connect to external node via link.
I would be able to use Node.js v10.12