🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

hyperdht-address

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperdht-address

hyperdht-address

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
20K
7.73%
Maintainers
2
Weekly downloads
 
Created
Source

hyperdht-address

Encode and decode HyperDHT addresses.

Install

npm install hyperdht-address

Usage

const { encode, decode } = require('hyperdht-address')

const buf = encode(key, [{ host: '0.0.0.0', port: 12345 }])
const { key, nodes } = decode(buf)

API

const buf = encode(key, [nodes])

Encode a 32-byte key and optional array of nodes into a buffer.

Each node has the shape { host, port }.

const { key, nodes } = decode(buf)

Decode a buffer into an address object with key (Buffer) and nodes (array of { host, port, family }).

License

Apache-2.0

FAQs

Package last updated on 05 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts