@lemontv/bencode
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

BitTorrent bencode encode/decode

CircleCI Coveralls Typscript Dependences License Version Codacy Badge

Description

BitTorrent DHT KRPC protocol bencode (BEP 005) utils function write in typescript.

Installation

$ npm install @lemontv/bencode

Usage

import { encode, decode } from '@lemontv/bencode';

const request = encode({"t":"aa", "y":"q", "q":"ping", "a":{"id":"abcdefghij0123456789"}});

const response = decode(Buffer.from("d1:ad2:id20:abcdefghij0123456789e1:q4:ping1:t2:aa1:y1:qe"));

Package Sidebar

Install

npm i @lemontv/bencode

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

30.1 kB

Total Files

23

Last publish

Collaborators

  • lemontv