# audax-bitcore-p2p

> Interface to the bitcoin P2P network for bitcore

Latest version **8.3.0** (published 2020-06-16) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 8.3.0 |
| Published | 2020-06-16 |
| First published | 2020-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 773.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 82 |
| Author | BitPay |
| Maintainers | audax |
| Keywords | bitcoin, bitcore |

## Links

- npm: https://www.npmjs.com/package/audax-bitcore-p2p
- Repository: https://github.com/bitpay/bitcore-p2p
- Issues: https://github.com/bitpay/bitcore-p2p/issues
- npm.io page: https://npm.io/package/audax-bitcore-p2p

## Dependencies (6)

- [bcoin](https://npm.io/package/bcoin.md) 1.0.0-beta.12
- [buffers](https://npm.io/package/buffers.md) git+https://github.com/bitpay/node-buffers#v0.1.2-bitpay
- [bitcore-lib](https://npm.io/package/bitcore-lib.md) ^8.3.0
- [bloom-filter](https://npm.io/package/bloom-filter.md) ^0.2.0
- [socks5-client](https://npm.io/package/socks5-client.md) ^0.3.6
- [bitcore-audax-lib](https://npm.io/package/bitcore-audax-lib.md) ^8.3.0

## Recent versions

- 8.3.0 (latest) — 2020-06-16

## README

# Bitcore AUDAX P2P

[![NPM Package](https://img.shields.io/npm/v/bitcore-p2p.svg?style=flat-square)](https://www.npmjs.org/package/bitcore-p2p)
[![Build Status](https://img.shields.io/travis/bitpay/bitcore-p2p.svg?branch=master&style=flat-square)](https://travis-ci.org/bitpay/bitcore-p2p)
[![Coverage Status](https://img.shields.io/coveralls/bitpay/bitcore-p2p.svg?style=flat-square)](https://coveralls.io/r/bitpay/bitcore-p2p?branch=master)

**The peer-to-peer networking protocol for AUDAX.**

`audax-bitcore-p2p` adds [Bitcore protocol](https://en.bitcoin.it/wiki/Protocol_documentation) support for Bitcore.

See [the main bitcore repo](https://github.com/bitpay/bitcore) for more information.

## Getting Started

```sh
npm install audax-bitcore-p2p
```

In order to connect to the Bitcore AUDAX 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('audax-bitcore-p2p').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 this [guide](./docs/peer.md) on the usage of the `Peer` class.

## Contributing

See [CONTRIBUTING.md](https://github.com/bitpay/bitcore/blob/master/CONTRIBUTING.md) on the main bitcore repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/bitpay/bitcore/blob/master/LICENSE).

Copyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.

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