2.3.0 • Published 10 years ago

ripple-account-monitor v2.3.0

Weekly downloads
1
License
ISC
Repository
-
Last release
10 years ago

Ripple Account Monitor

INSTALLATION

npm install --save ripple-account-monitor

USAGE

const RippleAccountMonitor = require('ripple-account-monitor');

const monitor = new RippleAccountMonitor({
  rippleRestUrl: 'https://api.ripple.com/',
  account: 'r4EwBWxrx5HxYRyisfGzMto3AT8FZiYdWk',
  lastHash: 'EF5D38031A961C32D4170A1E7A888D57F553D36F40796C94D27C2497F6722E62',
  timeout: 1000,
  onTransaction: function(transaction, next) {
    console.log('new transaction', transaction.TransactionType);
    next();
  },
  onPayment: function(transaction, next) {
    console.log('new payment', transaction.hash);
    next();
  },
  onTrustSet: function(transaction, next) {
    console.log('new trust set', transaction.hash);
    next();
  },
  onAccountSet: function(transaction, next) {
    console.log('new account setting', transaction.hash);
    next();
  },
  onOfferCreate: function(transaction, next) {
    console.log('new offer created', transaction.hash);
    next();
  },
  onError: function(error) {
    console.log('RippleAccountMonitor::Error', error);
  }
});

monitor.start();

The above will listen forever to the ripple account and call the function onTransaction whenever there is a new transaction to process.

2.3.0

10 years ago

2.2.0

11 years ago

2.1.1

11 years ago

2.1.0

11 years ago

2.0.0

11 years ago

0.1.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago