I am using this bitcore npm package. https://bitcore.io/api/lib

And i want to monitor all the transactions over the blockchain, and read the input address, output address and amount associated with that transaction.

But i am unable to find the javascript method to invoke to accomplish this. Even i am not able to find a example for this.

I am looking for as short as something like

var someLib = require('some-bitcore-lib')

someLib.on('block-recieved', function(){
   // print everything
   // do something else;

Any help? Where can i find that some-bitcore-lib or how can i create that in nodejs?

  • 2
    I'm voting to close this question as off-topic because belongs on stackoverflow
    – deepbrook
    Commented Aug 4, 2017 at 18:16
  • Have you tried reading bitcore.io/guides/satoshi-fire-alarm
    – Nick ODell
    Commented Aug 4, 2017 at 21:23
  • @codeofnode: have found any solution for the same? Commented Feb 15, 2018 at 7:36

1 Answer 1


Consider using bcoin.js which is in pure JS. It fires events when a transaction takes place. Quite simply you can do:

node.on("tx", (tx) => {
   console.log(tx.outputs, tx.inputs)

Note that, in bitcoin, each transaction can have multiple outputs and inputs, so these are arrays of inputs and outputs. You can obtain the total output amount by summing across all output amounts. Additionally, in this case you wouldn't concern yourself with blocks - just transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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