# bitcore-p2p-chaincoin

> Interface to the chaincoin P2P network for bitcore-chaincoin

Latest version **1.1.5** (published 2017-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install bitcore-p2p-chaincoin
pnpm add bitcore-p2p-chaincoin
yarn add bitcore-p2p-chaincoin
bun add bitcore-p2p-chaincoin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2017-11-21 |
| First published | 2017-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | BitPay |
| Maintainers | hashunlimited |
| Keywords | bitcoin, bitcore |

## Links

- npm: https://www.npmjs.com/package/bitcore-p2p-chaincoin
- Repository: https://github.com/ChainCoinUnlimited/bitcore-p2p-chaincoin
- Homepage: https://github.com/ChainCoinUnlimited/bitcore-p2p-chaincoin#readme
- Issues: https://github.com/ChainCoinUnlimited/bitcore-p2p-chaincoin/issues
- npm.io page: https://npm.io/package/bitcore-p2p-chaincoin

## Dependencies (4)

- [bloom-filter](https://npm.io/package/bloom-filter.md) ^0.2.0
- [node-buffers](https://npm.io/package/node-buffers.md) ^0.1.1
- [socks5-client](https://npm.io/package/socks5-client.md) ^0.3.6
- [bitcore-lib-chaincoin](https://npm.io/package/bitcore-lib-chaincoin.md) ^0.15.1

## Recent versions

- 1.1.5 (latest) — 2017-11-21
- 1.1.3 — 2017-11-19

## README

Bitcore P2P-Chaincoin
=======

[![NPM Package](https://img.shields.io/npm/v/bitcore-p2p-chaincoin.svg?style=flat-square)](https://www.npmjs.org/package/bitcore-p2p-chaincoin)
[![Build Status](https://img.shields.io/travis/chaincoinunlimited/bitcore-p2p-chaincoin.svg?branch=master&style=flat-square)](https://travis-ci.org/chaincoinunlimited/bitcore-p2p-chaincoin)
[![Coverage Status](https://img.shields.io/coveralls/chaincoinunlimited/bitcore-p2p-chaincoin.svg?style=flat-square)](https://coveralls.io/r/chaincoinunlimited/bitcore-p2p-chaincoin?branch=master)

`bitcore-p2p-chaincoin` adds Chaincoin protocol support for Bitcore-Chaincoin.

See [the main bitcore-chaincoin repo](https://github.com/chaincoinunlimited/bitcore-chaincoin) for more information.

## Getting Started

```sh
npm install bitcore-p2p-chaincoin
```
In order to connect to the Chaincoin network, you'll need to know the IP address of at least one node of the network, or use [Pool](/docs/pool.md) to discover peers using a DNS seed.

```javascript
var Peer = require('bitcore-p2p-chaincoin').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:

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

Take a look at the [bitcore guide](http://bitcore.io/guide/peer.html) on the usage of the `Peer` class.

## Contributing

See [CONTRIBUTING.md](https://github.com/chaincoinunlimited/bitcore-chaincoin/blob/master/CONTRIBUTING.md) on the main bitcore-chaincoin repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/bitpay/bitcore/blob/master/LICENSE).

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

---
_Source: https://npm.io/package/bitcore-p2p-chaincoin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
