bitcore-p2p-cash
Interface to the bitcoin P2P network for bitcore
Last updated 5 years ago by ematiu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install bitcore-p2p-cash 
SYNC missed versions from official npm registry.

Bitcore P2P Cash

NPM Package

The peer-to-peer networking protocol for BCH.

bitcore-p2p-cash adds Bitcoin Cash protocol support for Bitcore.

See the main bitcore repo for more information.

Getting Started

npm install bitcore-p2p-cash

In order to connect to the Bitcoin Cash network, you'll need to know the IP address of at least one node of the network, or use Pool to discover peers using a DNS seed.

var Peer = require('bitcore-p2p-cash').Peer;

var peer = new Peer({host: '127.0.0.1'});

peer.on('ready', function() {
  // peer info
  console.log(peer.version, peer.subversion, peer.bestHeight);
});
peer.on('disconnect', function() {
  console.log('connection closed');
});
peer.connect();

Then, you can get information from other peers by using:

// handle events
peer.on('inv', function(message) {
  // message.inventory[]
});
peer.on('tx', function(message) {
  // message.transaction
});

Take a look at this guide on the usage of the Peer class.

Contributing

See CONTRIBUTING.md on the main bitcore repo for information about how to contribute.

License

Code released under the MIT license.

Copyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.

Current Tags

  • 8.0.0                                ...           beta (7 years ago)
  • 10.5.3                                ...           latest (a month ago)

42 Versions

  • 10.5.3                                ...           a month ago
  • 10.5.2                                ...           a month ago
  • 10.4.1                                ...           2 months ago
  • 10.3.0                                ...           3 months ago
  • 10.2.1                                ...           3 months ago
  • 10.1.0                                ...           4 months ago
  • 10.0.39                                ...           6 months ago
  • 10.0.36                                ...           6 months ago
  • 10.0.28                                ...           8 months ago
  • 10.0.23                                ...           10 months ago
  • 10.0.21                                ...           a year ago
  • 10.0.18                                ...           a year ago
  • 10.0.17                                ...           a year ago
  • 10.0.16                                ...           a year ago
  • 10.0.15                                ...           a year ago
  • 10.0.13                                ...           a year ago
  • 10.0.11                                ...           a year ago
  • 10.0.5                                ...           2 years ago
  • 10.0.3                                ...           2 years ago
  • 10.0.2                                ...           2 years ago
  • 10.0.0                                ...           2 years ago
  • 9.0.0                                ...           2 years ago
  • 8.25.47                                ...           2 years ago
  • 8.25.46                                ...           2 years ago
  • 8.25.40                                ...           2 years ago
  • 8.25.38                                ...           2 years ago
  • 8.25.36                                ...           2 years ago
  • 8.25.35                                ...           2 years ago
  • 8.25.34                                ...           2 years ago
  • 8.25.31                                ...           2 years ago
  • 8.25.30                                ...           2 years ago
  • 8.25.28                                ...           3 years ago
  • 8.25.25                                ...           3 years ago
  • 8.25.22                                ...           3 years ago
  • 8.25.21                                ...           3 years ago
  • 8.25.10                                ...           3 years ago
  • 8.19.0                                ...           5 years ago
  • 8.17.1                                ...           5 years ago
  • 8.7.0                                ...           5 years ago
  • 8.6.0                                ...           5 years ago
  • 1.2.1                                ...           7 years ago
  • 8.0.0                                ...           7 years ago
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (5)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE