{"name":"@multiformats/multiaddr","version":"13.0.3","description":"The JavaScript implementation of the Multiaddr spec","license":"Apache-2.0 OR MIT","homepage":"https://github.com/multiformats/js-multiaddr#readme","repository":{"type":"git","url":"git+https://github.com/multiformats/js-multiaddr.git"},"bugs":{"url":"https://github.com/multiformats/js-multiaddr/issues"},"publishConfig":{"access":"public","provenance":true},"keywords":["binary","multiaddr","string"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js","module-sync":"./dist/src/index.js"}},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","doc-check":"aegir doc-check","build":"aegir build","test":"aegir test -f","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release","docs":"aegir docs"},"dependencies":{"@chainsafe/is-ip":"^2.0.1","multiformats":"^14.0.0","uint8-varint":"^3.0.0","uint8arrays":"^6.1.1"},"devDependencies":{"aegir":"^48.0.4"},"browser":{"./dist/src/resolvers/dns.js":"./dist/src/resolvers/dns.browser.js"},"gitHead":"35cc0d9d7ba94626fa9f5bd4d672b5f616afad3e","_id":"@multiformats/multiaddr@13.0.3","_nodeVersion":"24.14.1","_npmVersion":"11.14.1","dist":{"integrity":"sha512-mEqqJ4r3a/uuFMTpRkU316wGNIDQNhuVWpm+ebKTQeYsfv9jXbPONWM6VVnj3KGUrwfsX7GZOyp4TFqEA2SPCw==","shasum":"f33a69879bd817fb67bab8ceb976c5d7dec38e7b","tarball":"http://registry-npm.ywwl.com/@multiformats/multiaddr/download/@multiformats/multiaddr-13.0.3.tgz","fileCount":45,"unpackedSize":317017,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@multiformats%2fmultiaddr@13.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGvVpMHDP4TdM0cVSKglW/FnRoaCsdnY7ue7HB1bepeKAiBZhNKIYUIi6xpPRvIqkJ/Z11ssfWU7UBtgKHIRiGcZNA=="}],"size":76916,"noattachment":false,"key":"/@multiformats/multiaddr/-/@multiformats/multiaddr-13.0.3.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e4a31853-2b29-4159-98a5-27f093328ce8"}},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"vmx","email":"volker.mische@gmail.com"},{"name":"mikeal","email":"mikeal.rogers@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"rvagg","email":"r@va.gg"},{"name":"lidel","email":"lidel@lidel.org"},{"name":"npm-service-account-multiformats","email":"npm-service-account+multiformats@ipfs.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/multiaddr_13.0.3_1778583786784_0.5797593999749988"},"_hasShrinkwrap":false,"readme":"# @multiformats/multiaddr\n\n[![multiformats.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://multiformats.io)\n[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-multiaddr.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-multiaddr)\n[![CI](https://img.shields.io/github/actions/workflow/status/multiformats/js-multiaddr/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/multiformats/js-multiaddr/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> The JavaScript implementation of the Multiaddr spec\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nA standard way to represent addresses that\n\n- support any standard network protocol\n- have a binary packed format\n- have a nice string representation\n- encapsulate well\n\n## Example\n\n```TypeScript\nimport { multiaddr } from '@multiformats/multiaddr'\n\nconst addr = multiaddr('/ip4/127.0.0.1/udp/1234')\n// Multiaddr(/ip4/127.0.0.1/udp/1234)\n\naddr.bytes\n// <Uint8Array 04 7f 00 00 01 11 04 d2>\n\naddr.toString()\n// '/ip4/127.0.0.1/udp/1234'\n\naddr.getComponents()\n// [\n//   { code: 4, name: 'ip4', value: '127.0.0.1' },\n//   { code: 273, name: 'udp', value: '1234' }\n// ]\n\naddr.encapsulate('/sctp/5678')\n// Multiaddr(/ip4/127.0.0.1/udp/1234/sctp/5678)\n```\n\n## Example - Adding custom protocols\n\nTo add application-specific or experimental protocols, add a protocol codec\nto the protocol registry:\n\n```ts\nimport { registry, V, multiaddr } from '@multiformats/multiaddr'\nimport type { ProtocolCodec } from '@multiformats/multiaddr'\n\nconst maWithCustomTuple = '/custom-protocol/hello'\n\n// throws UnknownProtocolError\nmultiaddr(maWithCustomTuple)\n\nconst protocol: ProtocolCodec = {\n  code: 2059,\n  name: 'custom-protocol',\n  size: V\n  // V means variable length, can also be 0, a positive integer (e.g. a fixed\n  // length or omitted\n}\n\nregistry.addProtocol(protocol)\n\n// does not throw UnknownProtocolError\nmultiaddr(maWithCustomTuple)\n\n// protocols can also be removed\nregistry.removeProtocol(protocol.code)\n```\n\n# Install\n\n```console\n$ npm i @multiformats/multiaddr\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `MultiformatsMultiaddr` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/@multiformats/multiaddr/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://multiformats.github.io/js-multiaddr>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/multiformats/js-multiaddr/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/multiformats/js-multiaddr/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1778583787004,"_cnpm_publish_time":1778583787004,"dist-tags":{"latest":"13.0.3"}}