{"name":"hyperdht-address","version":"1.0.0","author":{"name":"Holepunch Inc"},"license":"Apache-2.0","_id":"hyperdht-address@1.0.0","maintainers":[{"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":"cf21645baa962bb1b8273ec8158b823247eadaaf","tarball":"http://registry-npm.ywwl.com/hyperdht-address/download/hyperdht-address-1.0.0.tgz","fileCount":5,"integrity":"sha512-ajUwu5FhzOTvvrcrufw6csulnhLj93B/FaRmMrnwlUH65L46iggBSUTB4wAXtpMyufVYcNvBIjxJAg3cEOqE8Q==","signatures":[{"sig":"MEYCIQCjW4wYT4O7iV0zkeaCJJU6+SBbFSJ7EkeHr/QhvdCOOwIhAMZighi7ItkSLAuLSiqE7TjVgrMKN8wny7g2Ikfxqo2O","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13648,"size":5027,"noattachment":false,"key":"/hyperdht-address/-/hyperdht-address-1.0.0.tgz"},"main":"index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package":"./package.json"},"gitHead":"c04b34cdc6f5e72a0bb9afd369ec896b8d2a5197","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.0_1771929408992_0.9293028632935598","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":1771929409156,"_cnpm_publish_time":1771929409156,"dist-tags":{"latest":"1.1.1"}}