10.0.28 • Published 2 months ago

bitcore-p2p-cash v10.0.28

Weekly downloads
16
License
MIT
Repository
github
Last release
2 months ago

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.

10.0.28

2 months ago

10.0.23

4 months ago

10.0.21

5 months ago

10.0.13

6 months ago

10.0.11

8 months ago

10.0.18

5 months ago

10.0.17

6 months ago

10.0.16

6 months ago

10.0.15

6 months ago

10.0.5

1 year ago

10.0.3

1 year ago

10.0.0

1 year ago

10.0.2

1 year ago

8.25.47

1 year ago

8.25.46

1 year ago

9.0.0

1 year ago

8.25.40

2 years ago

8.25.38

2 years ago

8.25.36

2 years ago

8.25.31

2 years ago

8.25.34

2 years ago

8.25.35

2 years ago

8.25.30

2 years ago

8.25.28

2 years ago

8.25.25

2 years ago

8.25.22

3 years ago

8.25.21

3 years ago

8.25.10

3 years ago

8.19.0

4 years ago

8.17.1

4 years ago

8.7.0

5 years ago

8.6.0

5 years ago

1.2.1

6 years ago

8.0.0

6 years ago