Bitcore Bus?


So i’ve been working on building a IPN system for Bitcoin using Bitcore’s Bus, but have had issues with attempting to include it. If i try run a node programmatically, it just closes immediantly, no errors/messages:

So how can I include Bus whilst running a service in a node that has been built using & (can only put 2 links)

And does anyone have any tips on how to efficiently create an api. I was thinking of using Bus to subscribe to transactions from a dynamic array of all the addresses that are defined and dealing with confirmations/callbacks from there.


I’ve fixed that issue

But now my issue is that when subscribed to something, i don’t get any actual results.

bus.subscribe('address/transaction', ['mmzJfdHMnUm56qq15VfuuMaMyEKy6EEriD']);
bus.subscribe('address/balance', ['mmzJfdHMnUm56qq15VfuuMaMyEKy6EEriD']);

bus.on('address/transaction', function(transaction) {

bus.on('address/balance', function(balance) {

This returns no errors, but sending btc to those addresses don’t log anything.

Any update to this?


This should be working, I’ve been able to subscribe: I believe there are a few tutorials that also use the functionality (e.g.

From what I can see, that runs as a service. Your colleague showed me how to do it via a node. But, that led to the bus not working.

var configuration = {
  datadir: '/root/slut/btc/.data',
  network: 'testnet',
  "services": [{
    name: "address",
    module: Address,
    config: {}
  }, {
    name: 'bitcoind',
    module: Bitcoin,
    config: {}
  }, {
    name: 'db',
    module: DB,
    config: {}

var node = new Node(configuration);
var bus = node.openBus();

node.on('ready', function() {
  bus.subscribe('address/transaction', ['mmzJfdHMnUm56qq15VfuuMaMyEKy6EEriD']);
  bus.subscribe('address/balance', ['mmzJfdHMnUm56qq15VfuuMaMyEKy6EEriD']);

node.on('error', function(err) {

node.start(function() {'node started up');

Would just doing this but server side work to achieve an IPN functionality?

Any update?

I have also the same problem

It seems to me that you are misusing the subscription function.
You should register to the event of the service like

In case of bitcoind, it would be something like this:
bus.subscribe('bitcoind/addresstxid', ['13FMwCYz3hUhwPcaWuD2M1U2KzfTtvLM89']);

See here:

I’ve just published a new service for message exchanging.
You can check it to see how I managed events

Hope this helps