Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reklatsmasters/peerid
Generate peer id for bittorrent dht node
https://github.com/reklatsmasters/peerid
Last synced: 24 days ago
JSON representation
Generate peer id for bittorrent dht node
- Host: GitHub
- URL: https://github.com/reklatsmasters/peerid
- Owner: reklatsmasters
- License: mit
- Created: 2015-12-26T07:53:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-09T07:09:13.000Z (almost 8 years ago)
- Last Synced: 2024-09-14T22:48:08.762Z (about 2 months ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## peerid
[![travis](https://travis-ci.org/ReklatsMasters/peerid.svg)](https://travis-ci.org/ReklatsMasters/peerid)
[![npm](https://img.shields.io/npm/v/peerid.svg)](https://npmjs.org/package/peerid)
[![license](https://img.shields.io/npm/l/peerid.svg)](https://npmjs.org/package/peerid)
[![downloads](https://img.shields.io/npm/dm/peerid.svg)](https://npmjs.org/package/peerid)
[![Test Coverage](https://codeclimate.com/github/ReklatsMasters/peerid/badges/coverage.svg)](https://codeclimate.com/github/ReklatsMasters/peerid/coverage)Generate peer id / node id for dht / bt node
### Usage
```js
const BtClient = require('bittorrent-tracker')
const peerid = require('peerid')const client = new BtClient(peerid(), 6881 /*, torrent file */)
// do some ...peerid('-UT1800-') // with prefix
```### API
##### `peerid([prefix: String|Buffer]): Buffer`
Generate random peer id / node id### License
MIT, © Dmitry Tsvettsikh