{"name":"hyperdht-address","version":"1.1.0","author":{"name":"Holepunch Inc"},"license":"Apache-2.0","_id":"hyperdht-address@1.1.0","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":"0a6b8772b4ad540ea6172e10ea7ed913bb7680c8","tarball":"http://registry-npm.ywwl.com/hyperdht-address/download/hyperdht-address-1.1.0.tgz","fileCount":5,"integrity":"sha512-a7ijbyqQO2aLveVBPPaz66947bQ9kNFpwpGin43FHYXasCnRjzv72Y+wKAkx/f3lnr77Laf1sNsDoU/s/N3g2w==","signatures":[{"sig":"MEQCIDCk+lM4ducBloiBw8xcjsYgIezFIkVck0tc434/V7i8AiBY9qU5BW5hjcz7YBJ6FUSEDzZ/TqEw0YXSAx/d9t8hgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13647,"size":5029,"noattachment":false,"key":"/hyperdht-address/-/hyperdht-address-1.1.0.tgz"},"main":"index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package":"./package.json"},"gitHead":"0fd86438a1b80a662d767526603f4bf729ec5922","scripts":{"lint":"lunte","test":"prettier . --check && lunte && brittle-bare test/index.js","format":"prettier . --write"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/hyperdht-address.git","type":"git"},"_npmVersion":"11.12.1","description":"hyperdht-address","directories":{},"_nodeVersion":"24.13.0","dependencies":{"hyperschema":"^1.20.1","compact-encoding":"^3.0.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.1.0_1778000818656_0.10971649196266453","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":1778000818811,"_cnpm_publish_time":1778000818811,"dist-tags":{"latest":"1.1.1"}}