{"name":"multiaddr","version":"6.0.3","description":"multiaddr implementation (binary + string representation of network addresses)","leadMaintainer":"Victor Bjelkholm <victorbjelkholm@gmail.com>","main":"src/index.js","scripts":{"lint":"aegir lint","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","build":"aegir build","release":"aegir release","release-minor":"aegir release --type minor","release-major":"aegir release --type major","coverage":"aegir coverage","coverage-publish":"aegir coverage publish","docs":"aegir docs","size":"bundlesize -f dist/index.min.js -s 14kB"},"repository":{"type":"git","url":"git+https://github.com/multiformats/js-multiaddr.git"},"keywords":["multiaddr","binary","string"],"license":"MIT","bugs":{"url":"https://github.com/multiformats/js-multiaddr/issues"},"homepage":"https://github.com/multiformats/js-multiaddr","dependencies":{"bs58":"^4.0.1","class-is":"^1.1.0","ip":"^1.1.5","is-ip":"^2.0.0","varint":"^5.0.0"},"devDependencies":{"aegir":"^18.0.3","bundlesize":"~0.17.0","chai":"^4.2.0","dirty-chai":"^2.0.1"},"contributors":[{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Lars Gierth","email":"lgierth@users.noreply.github.com"},{"name":"Maciej Krüger","email":"mkg20001@gmail.com"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Sid Harder","email":"sideharder@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Steven Allen","email":"steven@stebalien.com"},{"name":"Trond Arne Bråthen","email":"tabrath@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Yahya","email":"ya7yaz@gmail.com"},{"name":"Zane Starr","email":"zcstarr@gmail.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"npm-to-cdn-bot","email":"npmcdn-to-unpkg-bot@users.noreply.github.com","url":"by Forbes Lindesay"},{"name":"victorbjelkholm","email":"victor@protocol.ai"}],"gitHead":"06da24059513976e65e4a492bbaadb2a7a9d0c5d","_id":"multiaddr@6.0.3","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"daviddias","email":"mail@daviddias.me"},"dist":{"integrity":"sha512-ZYKAmSQ6j3x3fJQGF8yoAb5aDwrNFT/QVhfN8rId+M4/E1RYR3fsitFwMG3l7TuWhow+ET01mA+BViz+8NaktQ==","shasum":"36797d110ad1d912a69c07ca5fca6f8a08690bf3","tarball":"http://registry-npm.ywwl.com/multiaddr/download/multiaddr-6.0.3.tgz","fileCount":12,"unpackedSize":518235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNMOLCRA9TVsSAnZWagAA9xYQAJrKE2usOQhvgMm+I5o9\nYz8kOCuRVpnxuytx4VU6bSe1+DbLmRrNd/1itLbzvbxUSNXUYWh/owvgRled\na2fhqRTsfNhg97+c0EM4FHNRjQKvdqyXs7mi4/8BgaMgI6YyWCuqG0Ny+PvC\nSr41DyhEQLGvfEAKueTb0OZytaKbMl93mVeeAWmOtajUYikCncOYpLAU0voS\noPqyxLx7plfZafTgn00cn+eQjkmNkin60mrgHTyxETO+gTbU0AmP137xcPP2\nSgId0t6WZ0sfHbxFgN2u/2Cigj07WWQ3RKT6vofhjRkZb/kRvqrdn7zt7isM\nX+hAcDdw/omEXZbjWSl7iYeMroujuGVXXx2YfDHTii+Zxp0ZirUbjdCWzUJ7\nChuO3vv+PlS+jy84Elopbo2iPfGiAU8SeQZOGuoi7/VQ1LBsCv4I10eQ/1zg\nDjdLJTrgVjx8GuorgoVNW0R2tjsZogAQlAGUZQaU/F1LNzuMKYHNUMuLSVTu\npxb3nKj3Uwj/gFCrdiRII95pAAbW65dv5nmqYGitLSiUjhVgTJdPgoUwlYB7\nGkyeIz31P7aS313u2fjkQEu7qcYqC8eRKQXlvaVogUPNh6o66RUg6X7QUJ+8\nEmG5Lnl2AgQZWSl8FQBNsNzjh+DjIGzT4BCDZDiYGLwR9PHUklAhisa85cL7\nas5V\r\n=LXQV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIUsnaT7jHKI9mzltylI6ikFvg0EmIxp8htAoZ1o+jnQIhAPPNMISx2u7XCv/dQpw5nWZVojt5DcLLfqeXmkBKSZ5X"}],"size":132587,"noattachment":false,"key":"/multiaddr/-/multiaddr-6.0.3.tgz"},"maintainers":[{"email":"mail@daviddias.me","name":"daviddias"},{"email":"victorbjelkholm@gmail.com","name":"victorbjelkholm"},{"email":"volker.mische@gmail.com","name":"vmx"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/multiaddr_6.0.3_1546961802456_0.1467897763003425"},"_hasShrinkwrap":false,"deprecated":"This module is deprecated, please upgrade to @multiformats/multiaddr","readme":"js-multiaddr\n============\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs)\n[![Dependency Status](https://david-dm.org/multiformats/js-multiaddr.svg?style=flat-square)](https://david-dm.org/multiformats/js-multiaddr)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![](https://img.shields.io/travis/multiformats/js-multiaddr.svg?style=flat-square)](https://travis-ci.com/multiformats/js-multiaddr)\n[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-multiaddr.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-multiaddr)\n\n> JavaScript implementation of [multiaddr](https://github.com/multiformats/multiaddr).\n\n## Lead Maintainer\n\n[Jacob Heun](https://github.com/jacobheun)\n\n## Table of Contents\n\n- [js-multiaddr](#js-multiaddr)\n  - [Lead Maintainer](#lead-maintainer)\n  - [Table of Contents](#table-of-contents)\n  - [Background](#background)\n    - [What is multiaddr?](#what-is-multiaddr)\n  - [Install](#install)\n    - [NPM](#npm)\n    - [Browser: `<script>` Tag](#browser-script-tag)\n  - [Usage](#usage)\n  - [API](#api)\n  - [Resolvers](#resolvers)\n  - [Contribute](#contribute)\n  - [License](#license)\n\n## Background\n\n### What is multiaddr?\n\nA standard way to represent addresses that\n\n- support any standard network protocol\n- are self-describing\n- have a binary packed format\n- have a nice string representation\n- encapsulate well\n\n## Install\n\n### NPM\n```sh\nnpm i multiaddr\n```\n\n### Browser: `<script>` Tag\n\nLoading this module through a script tag will make the `Multiaddr` obj available in\nthe global namespace.\n\n```html\n<script src=\"https://unpkg.com/multiaddr/dist/index.min.js\"></script>\n```\n\n## Usage\n\n```js\n// if we are coming from <= 8.x you can use the factory function \nconst { multiaddr } = require('multiaddr')\nconst addr =  multiaddr(\"/ip4/127.0.0.1/udp/1234\")\n// <Multiaddr /ip4/127.0.0.1/udp/1234>\n\n// or just the class directly\nconst { Multiaddr } = require('multiaddr')\n\nconst addr = new 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.protos()\n/* \n[\n  {code: 4, name: 'ip4', size: 32},\n  {code: 273, name: 'udp', size: 16}\n]\n*/\n\n// gives you an object that is friendly with what Node.js core modules expect for addresses\naddr.nodeAddress()\n/*\n{\n  family: 4,\n  port: 1234,\n  address: \"127.0.0.1\"\n}\n*/\n\naddr.encapsulate('/sctp/5678')\n// <Multiaddr /ip4/127.0.0.1/udp/1234/sctp/5678>\n```\n\n## API\n\nhttps://multiformats.github.io/js-multiaddr/\n\n## Resolvers\n\n`multiaddr` allows multiaddrs to be resolved when appropriate resolvers are provided. This module already has resolvers available, but you can also create your own.  Resolvers should always be set in the same module that is calling `multiaddr.resolve()` to avoid conflicts if multiple versions of `multiaddr` are in your dependency tree. \nTo provide multiaddr resolvers you can do:\n\n```js\nconst { Multiaddr } = require('multiaddr')\nconst resolvers = require('multiaddr/src/resolvers')\n\nMultiaddr.resolvers.set('dnsaddr', resolvers.dnsaddrResolver)\n```\n\nThe available resolvers are:\n\n|     Name    | type | Description |\n|-------------|------|-------------|\n| `dnsaddrResolver` | `dnsaddr` | dnsaddr resolution with TXT Records |\n\nA resolver receives a `Multiaddr` as a parameter and returns a `Promise<Array<string>>`.\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/multiformats/js-multiaddr/issues).\n\nCheck out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[MIT](LICENSE) © 2016 Protocol Labs Inc.\n","publish_time":1546961802576,"_cnpm_publish_time":1546961802576,"dist-tags":{"latest":"10.0.1"}}