Socket
Book a DemoInstallSign in
Socket

ripple-account-monitor

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ripple-account-monitor

process ripple account activity serially

2.3.0
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 29 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.