@arkecosystem/peers
A simple TypeScript peer discovery client for the ARK Blockchain.
Last updated 3 months ago by faustbrian .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @arkecosystem/peers 
SYNC missed versions from official npm registry.

@arkecosystem/peers

Latest Version Node Engine Build Status Codecov License: MIT

Lead Maintainer: Brian Faust

Installation

yarn add @arkecosystem/peers

Usage

Peers via GitHub

import { PeerDiscovery } from "@arkecosystem/peers";

peerDiscovery = await PeerDiscovery.new({
	networkOrHost: "devnet"
})

peers = peerDiscovery
	.withVersion(">=2.4.0-next.0")
	.withLatency(300)
	.sortBy("latency")
	.findPeersWithPlugin("core-api");

Peers via Relay

import { PeerDiscovery } from "@arkecosystem/peers";

peerDiscovery = await PeerDiscovery.new({
	networkOrHost: "http://dexplorer.ark.io/api/peers",
})

peers = peerDiscovery
	.withVersion(">=2.4.0-next.0")
	.withLatency(300)
	.sortBy("latency")
	.findPeersWithPlugin("core-api");

Testing

yarn test

Security

If you discover a security vulnerability within this package, please send an e-mail to security@ark.io. All security vulnerabilities will be promptly addressed.

Credits

This project exists thanks to all the people who contribute.

License

MIT © ARK Ecosystem

Current Tags

  • 0.3.0                                ...           latest (3 months ago)

5 Versions

  • 0.3.0                                ...           3 months ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (14)

Copyright 2014 - 2016 © taobao.org |