{"name":"hyperdht-address","version":"1.0.1","author":{"name":"Holepunch Inc"},"license":"Apache-2.0","_id":"hyperdht-address@1.0.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"d_cassidy","email":"dominic@cassidy.casa"}],"homepage":"https://github.com/holepunchto/hyperdht-address","bugs":{"url":"https://github.com/holepunchto/hyperdht-address/issues"},"dist":{"shasum":"9515be25c931990e03198b2c93f9ceaebe85fd50","tarball":"http://registry-npm.ywwl.com/hyperdht-address/download/hyperdht-address-1.0.1.tgz","fileCount":7,"integrity":"sha512-v817eJkhryWNtMGQHLxVo6jtfEeIV9k429fRUWUKkp1bm+3/rzH8r5BFef9VT7Jq4Tvgt0Gw11FV32CacsqMZA==","signatures":[{"sig":"MEQCIA6BaceIaNI9oFAGNBBwjYIXYdAStCFJnol1lyglAINyAiBvBjEXa5fHo9GhO+UqUMwMF2SRS5tjEZ7TYSktaL3EiA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16202,"size":5823,"noattachment":false,"key":"/hyperdht-address/-/hyperdht-address-1.0.1.tgz"},"main":"index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package":"./package.json"},"gitHead":"c90abdf94ad4bf47e3ae90d8c4d86762ff28668c","scripts":{"lint":"lunte","test":"prettier . --check && lunte && brittle-bare test/index.js","format":"prettier . --write"},"_npmUser":{"name":"d_cassidy","email":"dominic@cassidy.casa"},"repository":{"url":"git+https://github.com/holepunchto/hyperdht-address.git","type":"git"},"_npmVersion":"11.6.1","description":"hyperdht-address","directories":{},"_nodeVersion":"24.11.0","dependencies":{"hyperschema":"^1.20.1","compact-encoding":"^2.19.0"},"_hasShrinkwrap":false,"devDependencies":{"b4a":"^1.8.0","lunte":"^1.2.0","brittle":"^3.19.0","prettier":"^3.6.2","prettier-config-holepunch":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hyperdht-address_1.0.1_1773179356697_0.4980916906928885","host":"s3://npm-registry-packages-npm-production"},"readme":"# hyperdht-address\n\nEncode and decode HyperDHT addresses.\n\n## Install\n\n```\nnpm install hyperdht-address\n```\n\n## Usage\n\n```js\nconst { encode, decode } = require('hyperdht-address')\n\nconst buf = encode(key, [{ host: '0.0.0.0', port: 12345 }])\nconst { key, nodes } = decode(buf)\n```\n\n## API\n\n#### `const buf = encode(key, [nodes])`\n\nEncode a 32-byte key and optional array of nodes into a buffer.\n\nEach node has the shape `{ host, port }`.\n\n#### `const { key, nodes } = decode(buf)`\n\nDecode a buffer into an address object with `key` (Buffer) and `nodes` (array of `{ host, port, family }`).\n\n## License\n\nApache-2.0\n","publish_time":1773179356833,"_cnpm_publish_time":1773179356833,"dist-tags":{"latest":"1.1.1"}}