{"bin":{"jsipfs":"src/cli/bin.js"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"dist":{"shasum":"1f07f15e7e5c425820d3e4eb129ac75a00425423","tarball":"https://registry.npmjs.org/ipfs/-/ipfs-0.39.0-rc.0.tgz","fileCount":273,"integrity":"sha512-qM4fBHSzuheZBRaoB15RWi4G1ovYuUqzSr+vmHijOp8XlvHIeDlIjYBRjepxHIfcIMwMI5p8unCXg/BiDzNM/Q==","signatures":[{"sig":"MEQCIC69RmGeGsMmXW7muWixSJXizXXAN3NUF1JOWA1SZafQAiAeM2OqEWDZmO33inyP2YuLzRVQqxC+Xl82SL85chWAEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27519148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnGvuCRA9TVsSAnZWagAASeMP/1BUC3YQ3CcUrko+Qk6v\nX9tFXKp7CqEQ6sUIecsxnhnlhL9KMN1/P+p5h5zfhOkgjaVvcwnHhN/XqhQh\ny9tZw+c9U5880X+aLGhQwgf2shjkRNKc+u4Npq6epRC6Wh1ZQBamZK5omEzQ\nDdM8lRyabBE/Z4gvTe92nkIR0htGzRxGLCT0LrULM3BQoWtL1ImPcbtX6Obf\nwMkwcVH2D2r/XUIrD9bUwEcm3a2J3Dp3OKhnJMsQmHQ3ymPvTZ1Lk5JHHZwA\nt9eaHXiC0wnjcVnTn+0cMmha4jSKlTQ2XZnp9Cd3YFfxRPdzlrfuw3g0rw7N\npTUkW1BUV8agnSj1CuLqvkrUejlMvPZa72v3I5CZSMSndycsRATDFI3yV22Y\nFZ09q2qy51iirk6V3v9kgt4U757wQ/L/tK2IM7TJHIEg4GE6exsrpbkvX/mu\n4QdAt2wTbL8TgvNA+5/SiKOvluGr4unVUryn5+7Dy4CH9YGUiH8xgQnBCtsV\nnrD/MY4Bj2GJmXbrBryuHw/kCFLAp0ncOppFW6Xink5ypQW2yOXgbsKNUTzz\nW65+aVyVq6vg6MwnaUubCkjAlsQx4+rpTG/LAy0oMgMOrp/tFHG888d/bENR\nNBfnJlHXMAvEs2JK8c6kDUiL4kwck1yYv0W2Oc1dzmtQihG3lsOfagA7F1Ab\nVI2t\r\n=LDaN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/core/index.js","name":"ipfs","readme":"<p align=\"center\">\n  <a href=\"https://js.ipfs.io\" title=\"JS IPFS\">\n    <img src=\"https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png\" alt=\"IPFS in JavaScript logo\" width=\"244\" />\n  </a>\n</p>\n\n<h3 align=\"center\">The JavaScript implementation of the IPFS protocol.</h3>\n\n<p align=\"center\">\n  <a href=\"http://protocol.ai\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg\"></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs\"><img src=\"https://badgen.net/codecov/c/github/ipfs/js-ipfs\" /></a>\n  <a href=\"https://bundlephobia.com/result?p=ipfs\"><img src=\"https://badgen.net/bundlephobia/minzip/ipfs\"></a>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat\"></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D6.0.0-orange.svg?style=flat\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat\" /></a>\n  <br>\n</p>\n\n### Project status - `Alpha`\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, API might change, beware of the Dragons 🐉..\n\n**Want to get started?** Check our [examples folder](/examples) to learn how to spawn an IPFS node in Node.js and in the Browser.\n\n**Please read this:** The [DHT](https://en.wikipedia.org/wiki/Distributed_hash_table), a fundamental piece for automatic content and peer discovery is not yet complete. There are multiple applications that can be built without this service but nevertheless it is fundamental to getting that magic IPFS experience. The current status is that implementation is done and merged and we're working on performance issues. Expect the DHT to be available in a release very soon.\n\n[**`Weekly Core Implementations Call`**](https://github.com/ipfs/team-mgmt/issues/992)\n\n## Tech Lead\n\n[David Dias](https://github.com/daviddias)\n\n## Lead Maintainer\n\n[Alan Shaw](https://github.com/alanshaw)\n\n## Table of Contents\n\n- [Tech Lead](#tech-lead)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [npm](#npm)\n  - [Use in Node.js](#use-in-nodejs)\n  - [Through command line tool](#through-command-line-tool)\n  - [Use in the browser](#use-in-the-browser)\n- [Usage](#usage)\n  - [IPFS CLI](#ipfs-cli)\n  - [IPFS Daemon](#ipfs-daemon)\n  - [IPFS Module](#ipfs-module)\n  - [Tutorials and Examples](#tutorials-and-examples)\n  - [API](#api)\n    - [IPFS Constructor](#ipfs-constructor)\n      - [`options.repo`](#optionsrepo)\n      - [`options.init`](#optionsinit)\n      - [`options.start`](#optionsstart)\n      - [`options.pass`](#optionspass)\n      - [`options.silent`](#optionssilent)\n      - [`options.relay`](#optionsrelay)\n      - [`options.preload`](#optionspreload)\n      - [`options.EXPERIMENTAL`](#optionsexperimental)\n      - [`options.config`](#optionsconfig)\n        - [Configuring Delegate Routers](#configuring-delegate-routers)\n      - [`options.ipld`](#optionsipld)\n      - [`options.libp2p`](#optionslibp2p)\n      - [`options.connectionManager`](#optionsconnectionmanager)\n    - [Events](#events)\n    - [`node.ready`](#nodeready)\n    - [`node.start()`](#nodestart)\n    - [`node.stop()`](#nodestop)\n    - [Core API](#core-api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Block](#block)\n    - [Name](#name)\n    - [Crypto and Key Management](#crypto-and-key-management)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Static types and utils](#static-types-and-utils)\n- [FAQ](#faq)\n    - [How to enable WebRTC support for js-ipfs in the Browser](#how-to-enable-webrtc-support-for-js-ipfs-in-the-browser)\n    - [Is there WebRTC support for js-ipfs with Node.js?](#is-there-webrtc-support-for-js-ipfs-with-nodejs)\n    - [How can I configure an IPFS node to use a custom `signaling endpoint` for my WebRTC transport?](#how-can-i-configure-an-ipfs-node-to-use-a-custom-signaling-endpoint-for-my-webrtc-transport)\n    - [Is there a more stable alternative to webrtc-star that offers a similar functionality?](#is-there-a-more-stable-alternative-to-webrtc-star-that-offers-a-similar-functionality)\n    - [I see some slowness when hopping between tabs Chrome with IPFS nodes, is there a reason why?](#i-see-some-slowness-when-hopping-between-tabs-chrome-with-ipfs-nodes-is-there-a-reason-why)\n    - [Can I use IPFS in my Electron App?](#can-i-use-ipfs-in-my-electron-app)\n    - [Have more questions?](#have-more-questions)\n- [Running js-ipfs with Docker](#running-js-ipfs-with-docker)\n- [Packages](#packages)\n- [Development](#development)\n  - [Clone and install dependencies](#clone-and-install-dependencies)\n  - [Run tests](#run-tests)\n  - [Run interop tests](#run-interop-tests)\n  - [Run benchmark tests](#run-benchmark-tests)\n  - [Lint](#lint)\n  - [Build a dist version](#build-a-dist-version)\n  - [Runtime Support](#runtime-support)\n  - [Code Architecture and folder Structure](#code-architecture-and-folder-structure)\n      - [Source code](#source-code)\n  - [Monitoring](#monitoring)\n  - [IPFS Architecture](#ipfs-architecture)\n- [Contribute](#contribute)\n  - [Want to hack on IPFS?](#want-to-hack-on-ipfs)\n- [License](#license)\n\n## Install\n\n### npm\n\nThis project is available through [npm](https://www.npmjs.com/). To install, run:\n\n```bash\n> npm install ipfs\n```\n\nJS IPFS depends on native modules that are installed by [`node-gyp`](https://github.com/nodejs/node-gyp). If you have problems running the command above, it is likely that the [build tools required by `node-gyp`](https://github.com/nodejs/node-gyp#installation) are missing from your system. Please install them and then try again.\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\nThis project is tested on macOS, Linux and Windows.\n\n### Use in Node.js\n\nTo create an IPFS node programmatically:\n\n```js\nconst IPFS = require('ipfs')\nconst node = await IPFS.create()\n\n// Ready to use!\n// See https://github.com/ipfs/js-ipfs#core-api\n```\n\n### Through command line tool\n\nIn order to use js-ipfs as a CLI, you must install it with the `global` flag. Run the following (even if you have ipfs installed locally):\n\n```bash\nnpm install ipfs --global\n```\n\nThe CLI is available by using the command `jsipfs` in your terminal. This is aliased, instead of using `ipfs`, to make sure it does not conflict with the [Go implementation](https://github.com/ipfs/go-ipfs).\n\n### Use in the browser\n\nLearn how to bundle with browserify and webpack in the [`examples`](https://github.com/ipfs/js-ipfs/tree/master/examples) folder.\n\nYou can also load it using a `<script>` using the [unpkg](https://unpkg.com) CDN **or** the [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs) CDN. Inserting one of the following lines will make an `Ipfs` object available in the global namespace.\n\n```html\n<!-- loading the minified version using unpkg -->\n<script src=\"https://unpkg.com/ipfs/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version using unpkg -->\n<script src=\"https://unpkg.com/ipfs/dist/index.js\"></script>\n```\n**OR THIS:**\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs/dist/index.js\"></script>\n```\n\nInserting one of the above lines will make an `Ipfs` object available in the global namespace:\n\n```html\n<script>\nasync function main () {\n  const node = await window.Ipfs.create()\n  // Ready to use!\n  // See https://github.com/ipfs/js-ipfs#core-api\n}\nmain()\n</script>\n```\n\n## Usage\n\n### IPFS CLI\n\nThe `jsipfs` CLI, available when `js-ipfs` is installed globally, follows (should, it is a WIP) the same interface defined by `go-ipfs`, you can always use the `help` command for help menus.\n\n```sh\n# Install js-ipfs globally\n> npm install ipfs --global\n> jsipfs --help\nCommands:\n  bitswap               A set of commands to manipulate the bitswap agent.\n  block                 Manipulate raw IPFS blocks.\n  bootstrap             Show or edit the list of bootstrap peers.\n  commands              List all available commands\n  config <key> [value]  Get and set IPFS config values\n  daemon                Start a long-running daemon process\n# ...\n```\n\n`js-ipfs` uses some different default config values, so that they don't clash directly with a go-ipfs node running in the same machine. These are:\n\n- default repo location: `~/.jsipfs` (can be changed with env variable `IPFS_PATH`)\n- default swarm port: `4002`\n- default API port: `5002`\n\n### IPFS Daemon\n\nThe IPFS Daemon exposes the API defined in the [HTTP API spec`](https://docs.ipfs.io/reference/api/http/). You can use any of the IPFS HTTP-API client libraries with it, such as: [js-ipfs-http-client](https://github.com/ipfs/js-ipfs-http-client).\n\nIf you want a programmatic way to spawn a IPFS Daemon using JavaScript, check out [ipfsd-ctl module](https://github.com/ipfs/js-ipfsd-ctl)\n\n### IPFS Module\n\nUse the IPFS Module as a dependency of a project to __spawn in process instances of IPFS__. Create an instance by calling `await IPFS.create()`:\n\n```js\n// Create the IPFS node instance\nconst node = await IPFS.create()\n// Your node is now ready to use \\o/\nawait node.stop()\n// node is now 'offline'\n```\n\n### [Tutorials and Examples](/examples)\n\nYou can find some examples and tutorials in the [examples](/examples) folder, these exist to help you get started using `js-ipfs`.\n\n### API\n\n#### IPFS Constructor\n\n```js\nconst node = await IPFS.create([options])\n```\n\nCreates and returns a ready to use instance of an IPFS node.\n\n<details><summary>Alternative method to construct an IPFS node</summary>\n\nThe recommended method of creating a new IPFS node is to use the `IPFS.create` method. However, IPFS is a `class`, and can also be constructed using the `new` keyword:\n\n```js\nconst node = new IPFS([options])\n```\n\nAt this point, your node has been created but is **not** ready to use. You must either attach a listener for the \"ready\" event _or_ wait for the `node.ready` promise to resolve:\n\n```js\nnode.on('ready', () => { /* Node is now ready to use */ })\n// OR\nawait node.ready\n```\n</details>\n\nUse the `options` argument to specify advanced configuration. It is an object with any of these properties:\n\n##### `options.repo`\n\n| Type | Default |\n|------|---------|\n| string or [`ipfs.Repo`](https://github.com/ipfs/js-ipfs-repo) instance | `'~/.jsipfs'` in Node.js, `'ipfs'` in browsers |\n\nThe file path at which to store the IPFS node’s data. Alternatively, you can set up a customized storage system by providing an [`ipfs.Repo`](https://github.com/ipfs/js-ipfs-repo) instance.\n\nExample:\n\n```js\n// Store data outside your user directory\nconst node = await IPFS.create({ repo: '/var/ipfs/data' })\n```\n\n##### `options.init`\n\n| Type | Default |\n|------|---------|\n| boolean or object | `true` |\n\nInitialize the repo when creating the IPFS node.\n\nIf you have already initialized a repo before creating your IPFS node (e.g. you are loading a repo that was saved to disk from a previous run of your program), you must make sure to set this to `false`. Note that *initializing* a repo is different from creating an instance of [`ipfs.Repo`](https://github.com/ipfs/js-ipfs-repo). The IPFS constructor sets many special properties when initializing a repo, so you should usually not try and call `repoInstance.init()` yourself.\n\nInstead of a boolean, you may provide an object with custom initialization options. All properties are optional:\n\n- `emptyRepo` (boolean) Whether to remove built-in assets, like the instructional tour and empty mutable file system, from the repo. (Default: `false`)\n- `bits` (number) Number of bits to use in the generated key pair. (Default: `2048`)\n- `privateKey` (string/PeerId) A pre-generated private key to use. Can be either a base64 string or a [PeerId](https://github.com/libp2p/js-peer-id) instance. **NOTE: This overrides `bits`.**\n    ```js\n    // Generating a Peer ID:\n    const PeerId = require('peer-id')\n    PeerId.create({ bits: 2048 }, (err, peerId) => {\n      // Generates a new Peer ID, complete with public/private keypair\n      // See https://github.com/libp2p/js-peer-id\n    })\n    ```\n- `pass` (string) A passphrase to encrypt keys. You should generally use the [top-level `pass` option](#optionspass) instead of the `init.pass` option (this one will take its value from the top-level option if not set).\n\n##### `options.start`\n\n| Type | Default |\n|------|---------|\n| boolean | `true` |\n\n If `false`, do not automatically start the IPFS node. Instead, you’ll need to manually call [`node.start()`](#nodestart) yourself.\n\n##### `options.pass`\n\n| Type | Default |\n|------|---------|\n| string | `null` |\n\nA passphrase to encrypt/decrypt your keys.\n\n##### `options.silent`\n\n| Type | Default |\n|------|---------|\n| Boolean | `false` |\n\nPrevents all logging output from the IPFS node.\n\n##### `options.relay`\n\n| Type | Default |\n|------|---------|\n| object | `{ enabled: true, hop: { enabled: false, active: false } }` |\n\nConfigure circuit relay (see the [circuit relay tutorial](https://github.com/ipfs/js-ipfs/tree/master/examples/circuit-relaying) to learn more).\n\n- `enabled` (boolean): Enable circuit relay dialer and listener. (Default: `true`)\n- `hop` (object)\n    - `enabled` (boolean): Make this node a relay (other nodes can connect *through* it). (Default: `false`)\n    - `active` (boolean): Make this an *active* relay node. Active relay nodes will attempt to dial a destination peer even if that peer is not yet connected to the relay. (Default: `false`)\n\n##### `options.preload`\n\n| Type | Default |\n|------|---------|\n| object | `{ enabled: true, addresses: [...] }` |\n\nConfigure remote preload nodes. The remote will preload content added on this node, and also attempt to preload objects requested by this node.\n\n- `enabled` (boolean): Enable content preloading (Default: `true`)\n- `addresses` (array): Multiaddr API addresses of nodes that should preload content. **NOTE:** nodes specified here should also be added to your node's bootstrap address list at [`config.Boostrap`](#optionsconfig).\n\n##### `options.EXPERIMENTAL`\n\n| Type | Default |\n|------|---------|\n| object | `{ ipnsPubsub: false, sharding: false }` |\n\nEnable and configure experimental features.\n\n- `ipnsPubsub` (boolean): Enable pub-sub on IPNS. (Default: `false`)\n- `sharding` (boolean): Enable directory sharding. Directories that have many child objects will be represented by multiple DAG nodes instead of just one. It can improve lookup performance when a directory has several thousand files or more. (Default: `false`)\n\n##### `options.config`\n\n| Type | Default |\n|------|---------|\n| object |  [`config-nodejs.js`](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/config-nodejs.js) in Node.js, [`config-browser.js`](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/config-browser.js) in browsers |\n\nModify the default IPFS node config. This object will be *merged* with the default config; it will not replace it. The default config is documented in [the js-ipfs config file doc](doc/config.md).\n\n###### Configuring Delegate Routers\n\nIf you need to support Delegated Content and/or Peer Routing, you can enable it by specifying the multiaddrs of your delegate nodes in the config via `options.config.Addresses.Delegates`. If you need to run a delegate router we encourage you to run your own, with go-ipfs. You can see instructions for doing so in the [delegated routing example](https://github.com/libp2p/js-libp2p/tree/master/examples/delegated-routing).\n\nIf you are not able to run your own delegate router nodes, we currently have two nodes that support delegated routing. **Important**: As many people may be leveraging these nodes, performance may be affected, which is why we recommend running your own nodes in production.\n\nAvailable delegate multiaddrs are:\n- `/dns4/node0.delegate.ipfs.io/tcp/443/https`\n- `/dns4/node1.delegate.ipfs.io/tcp/443/https`\n\n**Note**: If more than 1 delegate multiaddr is specified, the actual delegate will be randomly selected on startup.\n\n##### `options.ipld`\n\n | Type | Default |\n|------|---------|\n| object |  [`ipld-nodejs.js`](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/ipld-nodejs.js) in Node.js, [`ipld-browser.js`](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/ipld-browser.js) in browsers |\n\n Modify the default IPLD config. This object will be *merged* with the default config; it will not replace it. Check IPLD [docs](https://github.com/ipld/js-ipld#ipld-constructor) for more information on the available options.\n\n > Browser config does **NOT** include by default all the IPLD formats. Only `ipld-dag-pb`, `ipld-dag-cbor` and `ipld-raw` are included.\n\n To add support for other formats we provide two options, one sync and another async.\n\n Examples for the sync option:\n\n<details><summary>ESM Environments</summary>\n\n```js\nimport ipldGit from 'ipld-git'\nimport ipldBitcoin from 'ipld-bitcoin'\n\nconst node = await IPFS.create({\n  ipld: {\n    formats: [ipldGit, ipldBitcoin]\n  }\n})\n```\n</details>\n<details><summary>Commonjs Environments</summary>\n\n```js\nconst node = await IPFS.create({\n  ipld: {\n    formats: [require('ipld-git'), require('ipld-bitcoin')]\n  }\n})\n```\n</details>\n<details><summary>Using script tags</summary>\n\n```html\n<script src=\"https://unpkg.com/ipfs/dist/index.min.js\"></script>\n<script src=\"https://unpkg.com/ipld-git/dist/index.min.js\"></script>\n<script src=\"https://unpkg.com/ipld-bitcoin/dist/index.min.js\"></script>\n<script>\nasync function main () {\n  const node = await self.IPFS.create({\n    ipld: {\n      formats: [self.IpldGit, self.IpldBitcoin]\n    }\n  })\n}\nmain()\n</script>\n```\n</details>\n\n Examples for the async option:\n\n<details><summary>ESM Environments</summary>\n\n```js\nconst node = await IPFS.create({\n  ipld: {\n    async loadFormat (codec) {\n      if (codec === multicodec.GIT_RAW) {\n        return import('ipld-git') // This is a dynamic import\n      } else {\n        throw new Error('unable to load format ' + multicodec.print[codec])\n      }\n    }\n  }\n})\n```\n> For more information about dynamic imports please check [webpack docs](https://webpack.js.org/guides/code-splitting/#dynamic-imports) or search your bundler documention.\n\nUsing dynamic imports will tell your bundler to create a separate file (normally called *chunk*) that will **only** be requested by the browser if it's really needed. This strategy will reduce your bundle size and load times without removing any functionality.\n\nWith Webpack IPLD formats can even be grouped together using magic comments `import(/* webpackChunkName: \"ipld-formats\" */ 'ipld-git')` to produce a single file with all of them.\n</details>\n\n<details><summary>Commonjs Environments</summary>\n\n```js\nconst node = await IPFS.create({\n  ipld: {\n    async loadFormat (codec) {\n      if (codec === multicodec.GIT_RAW) {\n        return require('ipld-git')\n      } else {\n        throw new Error('unable to load format ' + multicodec.print[codec])\n      }\n    }\n  }\n})\n```\n</details>\n\n<details><summary>Using Script tags</summary>\n\n```js\n<script src=\"https://unpkg.com/ipfs/dist/index.min.js\"></script>\n<script>\nconst load = (name, url) => new Promise((resolve, reject) => {\n  const script = document.createElement('script')\n  script.src = url\n  script.onload = () => resolve(self[name])\n  script.onerror = () => reject(new Error('Failed to load ' + url))\n  document.body.appendChild(script)\n})\n\nconst node = await self.IPFS.create({\n  ipld: {\n    async loadFormat (codec) {\n      switch (codec) {\n        case multicodec.GIT_RAW:\n          return load('IpldGit', 'https://unpkg.com/ipld-git/dist/index.min.js')\n        case multicodec.BITCOIN_BLOCK:\n          return load('IpldBitcoin', 'https://unpkg.com/ipld-bitcoin/dist/index.min.js')\n        default:\n          throw new Error('Unable to load format ' + multicodec.print[codec])\n      }\n    }\n  }\n})\n</script>\n```\n</details>\n\n\n##### `options.libp2p`\n\n| Type | Default |\n|------|---------|\n| object | [`libp2p-nodejs.js`](https://github.com/ipfs/js-ipfs/blob/master/src/core/runtime/libp2p-nodejs.js) in Node.js, [`libp2p-browser.js`](https://github.com/ipfs/js-ipfs/blob/master/src/core/runtime/libp2p-browser.js) in browsers |\n| function | [`libp2p bundle`](examples/custom-libp2p) |\n\nThe libp2p option allows you to build your libp2p node by configuration, or via a bundle function. If you are looking to just modify the below options, using the object format is the quickest way to get the default features of libp2p. If you need to create a more customized libp2p node, such as with custom transports or peer/content routers that need some of the ipfs data on startup, a custom bundle is a great way to achieve this.\n\nYou can see the bundle in action in the [custom libp2p example](examples/custom-libp2p).\n\n- `modules` (object):\n    - `transport` (Array<[libp2p.Transport](https://github.com/libp2p/interface-transport)>): An array of Libp2p transport classes/instances to use _instead_ of the defaults. See [libp2p/interface-transport](https://github.com/libp2p/interface-transport) for details.\n    - `peerDiscovery` (Array<[libp2p.PeerDiscovery](https://github.com/libp2p/interface-peer-discovery)>): An array of Libp2p peer discovery classes/instances to use _instead_ of the defaults. See [libp2p/peer-discovery](https://github.com/libp2p/interface-peer-discovery) for details. If passing a class, configuration can be passed using the config section below under the key corresponding to you module's unique `tag` (a static property on the class)\n    - `dht` (object): a DHT implementation that enables PeerRouting and ContentRouting. Example [libp2p/js-libp2p-kad-dht](https://github.com/libp2p/js-libp2p-kad-dht)\n    - `pubsub` (object): a Pubsub implementation on top of [libp2p/js-libp2p-pubsub](https://github.com/libp2p/js-libp2p-pubsub)\n- `config` (object):\n    - `peerDiscovery` (object):\n        - `autoDial` (boolean): Dial to discovered peers when under the Connection Manager min peer count watermark. (default `true`)\n        - `[PeerDiscovery.tag]` (object): configuration for a peer discovery module\n            - `enabled` (boolean): whether this module is enabled or disabled\n            - `[custom config]` (any): other keys are specific to the module\n    - `dht` (object): Configuration options for the DHT (WARNING: the current DHT implementation has performance issues, your mileage may vary)\n        - `enabled` (boolean): whether the DHT is enabled or not (default `false`)\n        - `kBucketSize` (number): bucket size (default `20`)\n        - `randomWalk` (object): configuration for random walk\n            - `enabled` (boolean): whether random DHT walking is enabled (default `false`)\n    - `pubsub` (object): Configuration options for Pubsub\n        - `enabled` (boolean): if pubbsub subsystem should be enabled (default: `false`)\n        - `emitSelf` (boolean): whether the node should emit to self on publish, in the event of the topic being subscribed (default: `true`)\n        - `signMessages` (boolean): if messages should be signed (default: `true`)\n        - `strictSigning` (boolean): if message signing should be required (default: `true`)\n\n##### `options.connectionManager`\n\n| Type | Default |\n|------|---------|\n| object | [defaults](https://github.com/libp2p/js-libp2p-connection-manager#create-a-connectionmanager) |\n\nConfigure the libp2p connection manager.\n\n#### Events\n\nIPFS instances are Node.js [EventEmitters](https://nodejs.org/dist/latest-v8.x/docs/api/events.html#events_class_eventemitter). You can listen for events by calling `node.on('event', handler)`:\n\n```js\nconst node = await IPFS.create({ repo: '/var/ipfs/data' })\nnode.on('error', errorObject => console.error(errorObject))\n```\n\n- `error` is always accompanied by an `Error` object with information about the error that occurred.\n\n    ```js\n    node.on('error', error => {\n      console.error(error.message)\n    })\n    ```\n\n- `init` is emitted after a new repo has been initialized. It will not be emitted if you set the `init: false` option on the constructor.\n\n- `ready` is emitted when a node is ready to use. This is the final event you will receive when creating a node (after `init` and `start`).\n\n    When creating a new IPFS node, you should almost always wait for the `ready` event before calling methods or interacting with the node.\n\n- `start` is emitted when a node has started listening for connections. It will not be emitted if you set the `start: false` option on the constructor.\n\n- `stop` is emitted when a node has closed all connections and released access to its repo. This is usually the result of calling [`node.stop()`](#nodestop).\n\n#### `node.ready`\n\nA promise that resolves when the node is ready to use. Should be used when constructing an IPFS node using `new`. You don't need to use this if you're using [`await IPFS.create`](#ipfs-constructor). e.g.\n\n```js\nconst node = new IPFS()\nawait node.ready\n// Ready to use!\n```\n\n#### `node.start()`\n\nStart listening for connections with other IPFS nodes on the network. In most cases, you do not need to call this method — `IPFS.create()` will automatically do it for you.\n\nThis method is asynchronous and returns a promise.\n\n```js\nconst node = await IPFS.create({ start: false })\nconsole.log('Node is ready to use but not started!')\n\ntry {\n  await node.start()\n  console.log('Node started!')\n} catch (error) {\n  console.error('Node failed to start!', error)\n}\n```\n\n<details><summary>Starting using callbacks and events</summary>\n\nIf you pass a function to this method, it will be called when the node is started (Note: this method will **not** return a promise if you use a callback function).\n\n```js\n// Note: you can use the class constructor style for more\n// idiomatic callback/events style code\nconst node = new IPFS({ start: false })\n\nnode.on('ready', () => {\n  console.log('Node is ready to use but not started!')\n\n  node.start(error => {\n    if (error) {\n      return console.error('Node failed to start!', error)\n    }\n    console.log('Node started!')\n  })\n})\n```\n\nAlternatively you can listen for the [`start` event](#events):\n\n```js\n// Note: you can use the class constructor style for more\n// idiomatic callback/events style code\nconst node = new IPFS({ start: false })\n\nnode.on('ready', () => {\n  console.log('Node is ready to use but not started!')\n  node.start()\n})\n\nnode.on('error', error => {\n  console.error('Something went terribly wrong!', error)\n})\n\nnode.on('start', () => console.log('Node started!'))\n```\n\n</details>\n\n#### `node.stop()`\n\nClose and stop listening for connections with other IPFS nodes, then release access to the node’s repo.\n\nThis method is asynchronous and returns a promise.\n\n```js\nconst node = await IPFS.create()\nconsole.log('Node is ready to use!')\n\ntry {\n  await node.stop()\n  console.log('Node stopped!')\n} catch (error) {\n  console.error('Node failed to stop!', error)\n}\n```\n\n<details><summary>Stopping using callbacks and events</summary>\n\nIf you pass a function to this method, it will be called when the node is stopped (Note: this method will **not** return a promise if you use a callback function).\n\n```js\n// Note: you can use the class constructor style for more\n// idiomatic callback/events style code\nconst node = new IPFS()\n\nnode.on('ready', () => {\n  console.log('Node is ready to use!')\n\n  node.stop(error => {\n    if (error) {\n      return console.error('Node failed to stop cleanly!', error)\n    }\n    console.log('Node stopped!')\n  })\n})\n```\n\nAlternatively you can listen for the [`stop` event](#events).\n\n```js\nconst node = new IPFS()\n\nnode.on('ready', () => {\n  console.log('Node is ready to use!')\n  node.stop()\n})\n\nnode.on('error', error => {\n  console.error('Something went terribly wrong!', error)\n})\n\nnode.on('stop', () => console.log('Node stopped!'))\n```\n</details>\n\n#### Core API\n\n[![](https://github.com/ipfs/interface-ipfs-core/raw/master/img/badge.png)](https://github.com/ipfs/interface-ipfs-core)\n\nThe IPFS core API provides all functionality that is not specific to setting up and starting or stopping a node. This API is available directly on an IPFS instance, on the command line (when using the CLI interface), and as an HTTP REST API. For a complete reference, see [![](https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg)](https://github.com/ipfs/interface-ipfs-core).\n\nAll the API methods aside from streaming methods (ones that end in `ReadableStream` or `PullStream`) are asynchronous and return Promises, but _also_ accept callbacks.\n\nThe core API is grouped into several areas:\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.addPullStream([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addpullstream)\n  - [`ipfs.addReadableStream([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addreadablestream)\n  - [`ipfs.addFromStream(stream)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromstream)\n  - [`ipfs.addFromFs(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs)\n  - [`ipfs.addFromUrl(url, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromurl)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.catPullStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#catpullstream)\n  - [`ipfs.catReadableStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#catreadablestream)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.getPullStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#getpullstream)\n  - [`ipfs.getReadableStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#getreadablestream)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n  - [`ipfs.lsPullStream(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#lspullstream)\n  - [`ipfs.lsReadableStream(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#lsreadablestream)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.readPullStream(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesreadpullstream)\n  - [`ipfs.files.readReadableStream(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesreadreadablestream)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/DAG.md)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/DAG.md#dagtree)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n- [object (legacy)](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectstat)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/OBJECT.md#objectpatchsetdata)\n\n#### Block\n\n- [block](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, cid)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/BLOCK.md#blockstat)\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n\n#### Name\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(value, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(value, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Crypto and Key Management\n\n- [key](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, options)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n- crypto (not implemented yet)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.rm(peer, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(multihash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n  - [`ipfs.dht.query(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtquery)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/PUBSUB.md#pubsubpeers)\n\n- [libp2p](https://github.com/libp2p/interface-libp2p). Every IPFS instance also exposes the libp2p SPEC at `ipfs.libp2p`. The formal interface for this SPEC hasn't been defined but you can find documentation at its implementations:\n  - [Node.js bundle](./src/core/runtime/libp2p-nodejs.js)\n  - [Browser Bundle](./src/core/runtime/libp2p-browser.js)\n  - [libp2p baseclass](https://github.com/libp2p/js-libp2p)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/SWARM.md#swarmpeers)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#version)\n  - [`ipfs.ping(peerId, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.pingReadableStream(peerId, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#pingreadablestream)\n  - [`ipfs.pingPullStream(peerId, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#pingpullstream)\n  - `ipfs.init([options])`\n  - `ipfs.start()`\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#stop)\n  - `ipfs.isOnline()`\n  - [`ipfs.resolve(name, [options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#resolve)\n  - [`ipfs.dns(name, [options]`](https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/REPO.md)\n  - `ipfs.repo.init`\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/REPO.md#repoversion)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.bwPullStream([options]) -> Pull Stream`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/STATS.md#statsbwpullstream)\n  - [`ipfs.stats.bwReadableStream([options]) -> Readable Stream`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/STATS.md#statsbwreadablestream)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/STATS.md#statsrepo)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/CONFIG.md#configreplace)\n\n#### Static types and utils\n\nAside from the default export, `ipfs` exports various types and utilities that are included in the bundle:\n\n- [`crypto`](https://www.npmjs.com/package/libp2p-crypto)\n- [`isIPFS`](https://www.npmjs.com/package/is-ipfs)\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`PeerId`](https://www.npmjs.com/package/peer-id)\n- [`PeerInfo`](https://www.npmjs.com/package/peer-info)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`multihashing`](https://www.npmjs.com/package/multihashing-async)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`CID`](https://www.npmjs.com/package/cids)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs')\n// ...or from an es-module:\nimport { CID } from 'ipfs'\n```\n\n## FAQ\n\n#### How to enable WebRTC support for js-ipfs in the Browser\n\nTo add a WebRTC transport to your js-ipfs node, you must add a WebRTC multiaddr. To do that, simple override the config.Addresses.Swarm array which contains all the multiaddrs which the IPFS node will use. See below:\n\n```JavaScript\nconst node = await IPFS.create({\n  config: {\n    Addresses: {\n      Swarm: [\n        '/dns4/wrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star'\n      ]\n    }\n  }\n})\n\n// your instance with WebRTC is ready\n```\n\n**Important:** This transport usage is kind of unstable and several users have experienced crashes. Track development of a solution at https://github.com/ipfs/js-ipfs/issues/1088.\n\n#### Is there WebRTC support for js-ipfs with Node.js?\n\nYes, however, bear in mind that there isn't a 100% stable solution to use WebRTC in Node.js, use it at your own risk. The most tested options are:\n\n- [wrtc](https://npmjs.org/wrtc) - Follow the install instructions.\n- [electron-webrtc](https://npmjs.org/electron-webrtc)\n\nTo add WebRTC support in a IPFS node instance, do:\n\n```JavaScript\nconst wrtc = require('wrtc') // or require('electron-webrtc')()\nconst WStar = require('libp2p-webrtc-star')\nconst wstar = new WStar({ wrtc })\n\nconst node = await IPFS.create({\n  repo: 'your-repo-path',\n  // start: false,\n  config: {\n    Addresses: {\n      Swarm: [\n        \"/ip4/0.0.0.0/tcp/4002\",\n        \"/ip4/127.0.0.1/tcp/4003/ws\",\n        \"/dns4/wrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star\"\n      ]\n    }\n  },\n  libp2p: {\n    modules: {\n      transport: [wstar],\n      peerDiscovery: [wstar.discovery]\n    }\n  }\n})\n\n// your instance with WebRTC is ready\n```\n\nTo add WebRTC support to the IPFS daemon, you only need to install one of the WebRTC modules globally:\n\n```bash\nnpm install wrtc --global\n# or\nnpm install electron-webrtc --global\n```\n\nThen, update your IPFS Daemon config to include the multiaddr for this new transport on the `Addresses.Swarm` array. Add: `\"/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star\"`\n\n#### How can I configure an IPFS node to use a custom `signaling endpoint` for my WebRTC transport?\n\nYou'll need to execute a compatible `signaling server` ([libp2p-webrtc-star](https://github.com/libp2p/js-libp2p-webrtc-star) works) and include the correct configuration param for your IPFS node:\n\n- provide the [`multiaddr`](https://github.com/multiformats/multiaddr) for the `signaling server`\n\n```JavaScript\nconst node = await IPFS.create({\n  repo: 'your-repo-path',\n  config: {\n    Addresses: {\n      Swarm: [\n        '/ip4/127.0.0.1/tcp/9090/ws/p2p-webrtc-star'\n      ]\n    }\n  }\n})\n```\n\nThe code above assumes you are running a local `signaling server` on port `9090`. Provide the correct values accordingly.\n\n#### Is there a more stable alternative to webrtc-star that offers a similar functionality?\n\nYes, websocket-star! A WebSockets based transport that uses a Relay to route the messages. To enable it, just do:\n\n```JavaScript\nconst node = await IPFS.create({\n  config: {\n    Addresses: {\n      Swarm: [\n        '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star'\n      ]\n    }\n  }\n})\n\n// your instance with websocket-star is ready\n```\n\n#### I see some slowness when hopping between tabs Chrome with IPFS nodes, is there a reason why?\n\nYes, unfortunately, due to [Chrome aggressive resource throttling policy](https://github.com/ipfs/js-ipfs/issues/611), it cuts freezes the execution of any background tab, turning an IPFS node that was running on that webpage into a vegetable state.\n\nA way to mitigate this in Chrome, is to run your IPFS node inside a Service Worker, so that the IPFS instance runs in a background process. You can learn how to install an IPFS node as a service worker in here the repo [ipfs-service-worker](https://github.com/ipfs/ipfs-service-worker)\n\n#### Can I use IPFS in my Electron App?\n\nYes you can and in many ways. Read https://github.com/ipfs/notes/issues/256 for the multiple options.\n\nWe now support Electron v5.0.0 without the need to rebuilt native modules.\nStill if you run into problems with native modules follow these instructions [here](https://electronjs.org/docs/tutorial/using-native-node-modules).\n\n#### Have more questions?\n\nAsk for help in our forum at https://discuss.ipfs.io or in IRC (#ipfs on Freenode).\n\n## Running js-ipfs with Docker\n\nWe have automatic Docker builds setup with Docker Hub: https://hub.docker.com/r/ipfs/js-ipfs/\n\nAll branches in the Github repository maps to a tag in Docker Hub, except `master` Git branch which is mapped to `latest` Docker tag.\n\nYou can run js-ipfs like this:\n\n```\n$ docker run -it -p 4002:4002 -p 4003:4003 -p 5002:5002 -p 9090:9090 ipfs/js-ipfs:latest\n\ninitializing ipfs node at /root/.jsipfs\ngenerating 2048-bit RSA keypair...done\npeer identity: Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS\nto get started, enter:\n\n         jsipfs files cat /ipfs/QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr/readme\n\nInitializing daemon...\nUsing wrtc for webrtc support\nSwarm listening on /ip4/127.0.0.1/tcp/4003/ws/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS\nSwarm listening on /ip4/172.17.0.2/tcp/4003/ws/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS\nSwarm listening on /ip4/127.0.0.1/tcp/4002/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS\nSwarm listening on /ip4/172.17.0.2/tcp/4002/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS\nAPI is listening on: /ip4/0.0.0.0/tcp/5002\nGateway (readonly) is listening on: /ip4/0.0.0.0/tcp/9090\nDaemon is ready\n\n$ curl --silent localhost:5002/api/v0/id | jq .ID\n\"Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS\"\n```\n\n\n## Packages\n\nListing of the main packages used in the IPFS ecosystem. There are also three specifications worth linking here:\n\n- [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core)\n- [`HTTP API spec`](https://docs.ipfs.io/reference/api/http)\n- [`cli spec`](https://github.com/ipfs/specs/tree/master/public-api/cli)\n\n> This table is generated using the module `package-table` with `package-table --data=package-list.json`.\n\n| Package | Version | Deps | CI/Travis | Coverage | Lead Maintainer |\n| ---------|---------|---------|---------|---------|--------- |\n| **Files** |\n| [`ipfs-unixfs-engine`](//github.com/ipfs/js-ipfs-unixfs-engine) | [![npm](https://img.shields.io/npm/v/ipfs-unixfs-engine.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-unixfs-engine/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-unixfs-engine.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs-engine) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-unixfs-engine.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-unixfs-engine) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs-engine/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs-engine) | [Alex Potsides](mailto:alex.potsides@protocol.ai) |\n| [`ipfs-unixfs-exporter`](//github.com/ipfs/js-ipfs-unixfs-exporter) | [![npm](https://img.shields.io/npm/v/ipfs-unixfs-exporter.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-unixfs-exporter/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-unixfs-exporter.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs-exporter) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-unixfs-exporter.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-unixfs-exporter) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs-exporter/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs-exporter) | [Alex Potsides](mailto:alex.potsides@protocol.ai) |\n| [`ipfs-unixfs-importer`](//github.com/ipfs/js-ipfs-unixfs-importer) | [![npm](https://img.shields.io/npm/v/ipfs-unixfs-importer.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-unixfs-importer/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-unixfs-importer.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs-importer) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-unixfs-importer.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-unixfs-importer) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs-importer/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs-importer) | [Alex Potsides](mailto:alex.potsides@protocol.ai) |\n| [`ipfs-mfs`](//github.com/ipfs/js-ipfs-mfs) | [![npm](https://img.shields.io/npm/v/ipfs-mfs.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-mfs/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-mfs.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-mfs) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-mfs.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-mfs) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-mfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-mfs) | [Alex Potsides](mailto:alex.potsides@protocol.ai) |\n| [`ipfs-unixfs`](//github.com/ipfs/js-ipfs-unixfs) | [![npm](https://img.shields.io/npm/v/ipfs-unixfs.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-unixfs/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-unixfs.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-unixfs) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs) | [Alex Potsides](mailto:alex.potsides@protocol.ai) |\n| **Repo** |\n| [`ipfs-repo`](//github.com/ipfs/js-ipfs-repo) | [![npm](https://img.shields.io/npm/v/ipfs-repo.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-repo/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-repo.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-repo) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-repo.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-repo) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-repo/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-repo) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| **Exchange** |\n| [`ipfs-block-service`](//github.com/ipfs/js-ipfs-block-service) | [![npm](https://img.shields.io/npm/v/ipfs-block-service.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-block-service/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-block-service.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-block-service) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-block-service.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-block-service) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-block-service/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-block-service) | [Volker Mische](mailto:volker.mische@gmail.com) |\n| [`ipfs-block`](//github.com/ipfs/js-ipfs-block) | [![npm](https://img.shields.io/npm/v/ipfs-block.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-block/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-block.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-block) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-block.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-block) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-block/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-block) | [Volker Mische](mailto:volker.mische@gmail.com) |\n| [`ipfs-bitswap`](//github.com/ipfs/js-ipfs-bitswap) | [![npm](https://img.shields.io/npm/v/ipfs-bitswap.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-bitswap/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-bitswap.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-bitswap) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-bitswap.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-bitswap) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-bitswap/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-bitswap) | [Dirk McCormick](mailto:dirk@protocol.ai) |\n| **IPNS** |\n| [`js-ipfs-name`](//github.com/ipfs/js-ipfs-name) | [![npm](https://img.shields.io/npm/v/js-ipfs-name.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-name/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-name.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-name) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-name.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-name) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-name/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-name) | N/A |\n| **Generics/Utils** |\n| [`ipfs-utils`](//github.com/ipfs/js-ipfs-utils) | [![npm](https://img.shields.io/npm/v/ipfs-utils.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-utils/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-utils.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-utils) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-utils.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-utils) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-utils) | [Hugo Dias](mailto:hugomrdias@gmail.com) |\n| [`ipfs-http-client`](//github.com/ipfs/js-ipfs-http-client) | [![npm](https://img.shields.io/npm/v/ipfs-http-client.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-http-client/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-http-client) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-http-client.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-http-client) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-http-client/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-http-client) | [Alan Shaw](mailto:alan@tableflip.io) |\n| [`ipfs-http-response`](//github.com/ipfs/js-ipfs-http-response) | [![npm](https://img.shields.io/npm/v/ipfs-http-response.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-http-response/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-http-response.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-http-response) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-http-response.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-http-response) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-http-response/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-http-response) | [Vasco Santos](mailto:vasco.santos@moxy.studio) |\n| [`ipfsd-ctl`](//github.com/ipfs/js-ipfsd-ctl) | [![npm](https://img.shields.io/npm/v/ipfsd-ctl.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfsd-ctl/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfsd-ctl.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfsd-ctl) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfsd-ctl.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfsd-ctl) | [![codecov](https://codecov.io/gh/ipfs/js-ipfsd-ctl/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfsd-ctl) | N/A |\n| [`ipfs-multipart`](//github.com/ipfs/js-ipfs-multipart) | [![npm](https://img.shields.io/npm/v/ipfs-multipart.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-multipart/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-multipart.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-multipart) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-multipart.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-multipart) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-multipart/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-multipart) | [Hugo Dias](mailto:mail@hugodias.me) |\n| [`is-ipfs`](//github.com/ipfs/is-ipfs) | [![npm](https://img.shields.io/npm/v/is-ipfs.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/is-ipfs/releases) | [![Deps](https://david-dm.org/ipfs/is-ipfs.svg?style=flat-square)](https://david-dm.org/ipfs/is-ipfs) | [![Travis CI](https://travis-ci.com/ipfs/is-ipfs.svg?branch=master)](https://travis-ci.com/ipfs/is-ipfs) | [![codecov](https://codecov.io/gh/ipfs/is-ipfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/is-ipfs) | [Marcin Rataj](mailto:lidel@lidel.org) |\n| [`aegir`](//github.com/ipfs/aegir) | [![npm](https://img.shields.io/npm/v/aegir.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/aegir/releases) | [![Deps](https://david-dm.org/ipfs/aegir.svg?style=flat-square)](https://david-dm.org/ipfs/aegir) | [![Travis CI](https://travis-ci.com/ipfs/aegir.svg?branch=master)](https://travis-ci.com/ipfs/aegir) | [![codecov](https://codecov.io/gh/ipfs/aegir/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/aegir) | [Hugo Dias](mailto:hugomrdias@gmail.com) |\n| [`ipfs-repo-migrations`](//github.com/ipfs/js-ipfs-repo-migrations) | [![npm](https://img.shields.io/npm/v/ipfs-repo-migrations.svg?maxAge=86400&style=flat-square)](//github.com/ipfs/js-ipfs-repo-migrations/releases) | [![Deps](https://david-dm.org/ipfs/js-ipfs-repo-migrations.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-repo-migrations) | [![Travis CI](https://travis-ci.com/ipfs/js-ipfs-repo-migrations.svg?branch=master)](https://travis-ci.com/ipfs/js-ipfs-repo-migrations) | [![codecov](https://codecov.io/gh/ipfs/js-ipfs-repo-migrations/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-repo-migrations) | N/A |\n| **libp2p** |\n| [`libp2p`](//github.com/libp2p/js-libp2p) | [![npm](https://img.shields.io/npm/v/libp2p.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| [`peer-id`](//github.com/libp2p/js-peer-id) | [![npm](https://img.shields.io/npm/v/peer-id.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-peer-id/releases) | [![Deps](https://david-dm.org/libp2p/js-peer-id.svg?style=flat-square)](https://david-dm.org/libp2p/js-peer-id) | [![Travis CI](https://travis-ci.com/libp2p/js-peer-id.svg?branch=master)](https://travis-ci.com/libp2p/js-peer-id) | [![codecov](https://codecov.io/gh/libp2p/js-peer-id/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-peer-id) | [Pedro Teixeira](mailto:i@pgte.me) |\n| [`peer-info`](//github.com/libp2p/js-peer-info) | [![npm](https://img.shields.io/npm/v/peer-info.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-peer-info/releases) | [![Deps](https://david-dm.org/libp2p/js-peer-info.svg?style=flat-square)](https://david-dm.org/libp2p/js-peer-info) | [![Travis CI](https://travis-ci.com/libp2p/js-peer-info.svg?branch=master)](https://travis-ci.com/libp2p/js-peer-info) | [![codecov](https://codecov.io/gh/libp2p/js-peer-info/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-peer-info) | [Pedro Teixeira](mailto:i@pgte.me) |\n| [`libp2p-crypto`](//github.com/libp2p/js-libp2p-crypto) | [![npm](https://img.shields.io/npm/v/libp2p-crypto.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-crypto/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-crypto.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-crypto) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-crypto.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-crypto) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-crypto/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-crypto) | [Friedel Ziegelmayer](mailto:dignifiedquire@gmail.com) |\n| [`libp2p-keychain`](//github.com/libp2p/js-libp2p-keychain) | [![npm](https://img.shields.io/npm/v/libp2p-keychain.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-keychain/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-keychain.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-keychain) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-keychain.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-keychain) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-keychain/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-keychain) | [Vasco Santos](mailto:vasco.santos@moxy.studio) |\n| [`libp2p-circuit`](//github.com/libp2p/js-libp2p-circuit) | [![npm](https://img.shields.io/npm/v/libp2p-circuit.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-circuit/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-circuit.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-circuit) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-circuit.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-circuit) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-circuit/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-circuit) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| [`libp2p-floodsub`](//github.com/libp2p/js-libp2p-floodsub) | [![npm](https://img.shields.io/npm/v/libp2p-floodsub.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-floodsub/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-floodsub.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-floodsub) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-floodsub.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-floodsub) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-floodsub/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-floodsub) | [Vasco Santos](mailto:vasco.santos@moxy.studio) |\n| [`libp2p-kad-dht`](//github.com/libp2p/js-libp2p-kad-dht) | [![npm](https://img.shields.io/npm/v/libp2p-kad-dht.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-kad-dht/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-kad-dht.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-kad-dht) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-kad-dht.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-kad-dht) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-kad-dht/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-kad-dht) | [Vasco Santos](mailto:vasco.santos@moxy.studio) |\n| [`libp2p-mdns`](//github.com/libp2p/js-libp2p-mdns) | [![npm](https://img.shields.io/npm/v/libp2p-mdns.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-mdns/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-mdns.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-mdns) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-mdns.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-mdns) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-mdns/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-mdns) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| [`libp2p-bootstrap`](//github.com/libp2p/js-libp2p-bootstrap) | [![npm](https://img.shields.io/npm/v/libp2p-bootstrap.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-bootstrap/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-bootstrap) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-bootstrap.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-bootstrap) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-bootstrap/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-bootstrap) | [Vasco Santos](mailto:vasco.santos@moxy.studio) |\n| [`libp2p-secio`](//github.com/libp2p/js-libp2p-secio) | [![npm](https://img.shields.io/npm/v/libp2p-secio.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-secio/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-secio.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-secio) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-secio.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-secio) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-secio/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-secio) | [Friedel Ziegelmayer](mailto:dignifiedquire@gmail.com) |\n| [`libp2p-tcp`](//github.com/libp2p/js-libp2p-tcp) | [![npm](https://img.shields.io/npm/v/libp2p-tcp.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-tcp/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-tcp.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-tcp) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-tcp.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-tcp) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-tcp/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-tcp) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| [`libp2p-webrtc-star`](//github.com/libp2p/js-libp2p-webrtc-star) | [![npm](https://img.shields.io/npm/v/libp2p-webrtc-star.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-webrtc-star/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-webrtc-star.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-webrtc-star) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-webrtc-star.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-webrtc-star) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-webrtc-star/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-webrtc-star) | [Vasco Santos](mailto:vasco.santos@moxy.studio) |\n| [`libp2p-websocket-star`](//github.com/libp2p/js-libp2p-websocket-star) | [![npm](https://img.shields.io/npm/v/libp2p-websocket-star.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-websocket-star/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-websocket-star.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-websocket-star) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-websocket-star.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-websocket-star) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-websocket-star/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-websocket-star) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| [`libp2p-websockets`](//github.com/libp2p/js-libp2p-websockets) | [![npm](https://img.shields.io/npm/v/libp2p-websockets.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-websockets/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-websockets.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-websockets) | [![Travis CI](https://travis-ci.com/libp2p/js-libp2p-websockets.svg?branch=master)](https://travis-ci.com/libp2p/js-libp2p-websockets) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-websockets/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/js-libp2p-websockets) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| [`pull-mplex`](//github.com/libp2p/pull-mplex) | [![npm](https://img.shields.io/npm/v/pull-mplex.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/pull-mplex/releases) | [![Deps](https://david-dm.org/libp2p/pull-mplex.svg?style=flat-square)](https://david-dm.org/libp2p/pull-mplex) | [![Travis CI](https://travis-ci.com/libp2p/pull-mplex.svg?branch=master)](https://travis-ci.com/libp2p/pull-mplex) | [![codecov](https://codecov.io/gh/libp2p/pull-mplex/branch/master/graph/badge.svg)](https://codecov.io/gh/libp2p/pull-mplex) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| **IPLD** |\n| [`ipld`](//github.com/ipld/js-ipld) | [![npm](https://img.shields.io/npm/v/ipld.svg?maxAge=86400&style=flat-square)](//github.com/ipld/js-ipld/releases) | [![Deps](https://david-dm.org/ipld/js-ipld.svg?style=flat-square)](https://david-dm.org/ipld/js-ipld) | [![Travis CI](https://travis-ci.com/ipld/js-ipld.svg?branch=master)](https://travis-ci.com/ipld/js-ipld) | [![codecov](https://codecov.io/gh/ipld/js-ipld/branch/master/graph/badge.svg)](https://codecov.io/gh/ipld/js-ipld) | [Volker Mische](mailto:volker.mische@gmail.com) |\n| [`ipld-dag-pb`](//github.com/ipld/js-ipld-dag-pb) | [![npm](https://img.shields.io/npm/v/ipld-dag-pb.svg?maxAge=86400&style=flat-square)](//github.com/ipld/js-ipld-dag-pb/releases) | [![Deps](https://david-dm.org/ipld/js-ipld-dag-pb.svg?style=flat-square)](https://david-dm.org/ipld/js-ipld-dag-pb) | [![Travis CI](https://travis-ci.com/ipld/js-ipld-dag-pb.svg?branch=master)](https://travis-ci.com/ipld/js-ipld-dag-pb) | [![codecov](https://codecov.io/gh/ipld/js-ipld-dag-pb/branch/master/graph/badge.svg)](https://codecov.io/gh/ipld/js-ipld-dag-pb) | [Volker Mische](mailto:volker.mische@gmail.com) |\n| [`ipld-dag-cbor`](//github.com/ipld/js-ipld-dag-cbor) | [![npm](https://img.shields.io/npm/v/ipld-dag-cbor.svg?maxAge=86400&style=flat-square)](//github.com/ipld/js-ipld-dag-cbor/releases) | [![Deps](https://david-dm.org/ipld/js-ipld-dag-cbor.svg?style=flat-square)](https://david-dm.org/ipld/js-ipld-dag-cbor) | [![Travis CI](https://travis-ci.com/ipld/js-ipld-dag-cbor.svg?branch=master)](https://travis-ci.com/ipld/js-ipld-dag-cbor) | [![codecov](https://codecov.io/gh/ipld/js-ipld-dag-cbor/branch/master/graph/badge.svg)](https://codecov.io/gh/ipld/js-ipld-dag-cbor) | [Volker Mische](mailto:volker.mische@gmail.com) |\n| **Multiformats** |\n| [`multihashing`](//github.com/multiformats/js-multihashing) | [![npm](https://img.shields.io/npm/v/multihashing.svg?maxAge=86400&style=flat-square)](//github.com/multiformats/js-multihashing/releases) | [![Deps](https://david-dm.org/multiformats/js-multihashing.svg?style=flat-square)](https://david-dm.org/multiformats/js-multihashing) | [![Travis CI](https://travis-ci.com/multiformats/js-multihashing.svg?branch=master)](https://travis-ci.com/multiformats/js-multihashing) | [![codecov](https://codecov.io/gh/multiformats/js-multihashing/branch/master/graph/badge.svg)](https://codecov.io/gh/multiformats/js-multihashing) | [Hugo Dias](mailto:mail@hugodias.me) |\n| [`mafmt`](//github.com/multiformats/js-mafmt) | [![npm](https://img.shields.io/npm/v/mafmt.svg?maxAge=86400&style=flat-square)](//github.com/multiformats/js-mafmt/releases) | [![Deps](https://david-dm.org/multiformats/js-mafmt.svg?style=flat-square)](https://david-dm.org/multiformats/js-mafmt) | [![Travis CI](https://travis-ci.com/multiformats/js-mafmt.svg?branch=master)](https://travis-ci.com/multiformats/js-mafmt) | [![codecov](https://codecov.io/gh/multiformats/js-mafmt/branch/master/graph/badge.svg)](https://codecov.io/gh/multiformats/js-mafmt) | N/A |\n| [`multiaddr`](//github.com/multiformats/js-multiaddr) | [![npm](https://img.shields.io/npm/v/multiaddr.svg?maxAge=86400&style=flat-square)](//github.com/multiformats/js-multiaddr/releases) | [![Deps](https://david-dm.org/multiformats/js-multiaddr.svg?style=flat-square)](https://david-dm.org/multiformats/js-multiaddr) | [![Travis CI](https://travis-ci.com/multiformats/js-multiaddr.svg?branch=master)](https://travis-ci.com/multiformats/js-multiaddr) | [![codecov](https://codecov.io/gh/multiformats/js-multiaddr/branch/master/graph/badge.svg)](https://codecov.io/gh/multiformats/js-multiaddr) | [Jacob Heun](mailto:jacobheun@gmail.com) |\n| [`multihashes`](//github.com/multiformats/js-multihash) | [![npm](https://img.shields.io/npm/v/multihashes.svg?maxAge=86400&style=flat-square)](//github.com/multiformats/js-multihash/releases) | [![Deps](https://david-dm.org/multiformats/js-multihash.svg?style=flat-square)](https://david-dm.org/multiformats/js-multihash) | [![Travis CI](https://travis-ci.com/multiformats/js-multihash.svg?branch=master)](https://travis-ci.com/multiformats/js-multihash) | [![codecov](https://codecov.io/gh/multiformats/js-multihash/branch/master/graph/badge.svg)](https://codecov.io/gh/multiformats/js-multihash) | [David Dias](mailto:daviddias@ipfs.io) |\n\n## Development\n\n### Clone and install dependencies\n\n```sh\n> git clone https://github.com/ipfs/js-ipfs.git\n> cd js-ipfs\n> npm install\n```\n\n### Run tests\n\n```sh\n# run all the unit tests\n> npm test\n\n# run individual tests (findprovs)\n> npm run test -- --grep findprovs\n\n# run just IPFS tests in Node.js\n> npm run test:node\n\n# run just IPFS core tests\n> npm run test:node:core\n\n# run just IPFS HTTP-API tests\n> npm run test:node:http\n\n# run just IPFS CLI tests\n> npm run test:node:cli\n\n# run just IPFS core tests in the Browser (Chrome)\n> npm run test:browser\n\n# run some interface tests (block API) on Node.js\n> npm run test:node:interface -- --grep '.block'\n```\n\n### Run interop tests\n\n\n```sh\n# run the interop tests with the default go-IPFS\n> npm run test:interop\n\n# run the interop tests with a different go-IPFS\n> IPFS_EXEC_GO=/path/to/ipfs npm run test:interop\n```\n\n### Run benchmark tests\n\n```sh\n# run all the benchmark tests\n> npm run benchmark\n\n# run just IPFS benchmarks in Node.js\n> npm run benchmark:node\n\n# run just IPFS benchmarks in Node.js for an IPFS instance\n> npm run benchmark:node:core\n\n# run just IPFS benchmarks in Node.js for an IPFS daemon\n> npm run benchmark:node:http\n\n# run just IPFS benchmarks in the browser (Chrome)\n> npm run benchmark:browser\n```\n\n### Lint\n\n**Conforming to linting rules is a prerequisite to commit to js-ipfs.**\n\n```sh\n> npm run lint\n```\n\n### Build a dist version\n\n```sh\n> npm run build\n```\n\n### [Runtime Support](https://github.com/ipfs/js-ipfs/issues/536)\n\n### Code Architecture and folder Structure\n\n![](/img/overview.png)\n\n##### Source code\n\n```Bash\n> tree src -L 2\nsrc                 # Main source code folder\n├── cli             # Implementation of the IPFS CLI\n│   └── ...\n├── http            # The HTTP-API implementation of IPFS as defined by HTTP API spec\n├── core            # IPFS implementation, the core (what gets loaded in browser)\n│   ├── components  # Each of IPFS subcomponent\n│   └── ...\n└── ...\n```\n\n### Monitoring\n\nThe HTTP API exposed with js-ipfs can also be used for exposing metrics about\nthe running js-ipfs node and other Node.js metrics.\n\nTo enable it, you need to set the environment variable `IPFS_MONITORING` (any value)\n\nOnce the environment variable is set and the js-ipfs daemon is running, you can get\nthe metrics (in prometheus format) by making a GET request to the following endpoint:\n\n```\nhttp://localhost:5002/debug/metrics/prometheus\n```\n\n### IPFS Architecture\n\n![](/img/architecture.png)\n\n[Annotated version](https://user-images.githubusercontent.com/1211152/47606420-b6265780-da13-11e8-923b-b365a8534e0e.png)j\n\nWhat does this image explain?\n\n- IPFS uses `ipfs-repo` which picks `fs` or `indexeddb` as its storage drivers, depending if it is running in Node.js or in the Browser.\n- The exchange protocol, `bitswap`, uses the Block Service which in turn uses the Repo, offering a get and put of blocks to the IPFS implementation.\n- The DAG API (previously Object) comes from the IPLD Resolver, it can support several IPLD Formats (i.e: dag-pb, dag-cbor, etc).\n- The Files API uses `ipfs-unixfs-engine` to import and export files to and from IPFS.\n- libp2p, the network stack of IPFS, uses libp2p to dial and listen for connections, to use the DHT, for discovery mechanisms, and more.\n\n## Contribute\n\nIPFS implementation in JavaScript is a work in progress. As such, there's a few things you can do right now to help out:\n\n- Go through the modules below and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.\n- **Perform code reviews**. More eyes will help (a) speed the project along, (b) ensure quality, and (c) reduce possible future bugs.\n- Take a look at go-ipfs and some of the planning repositories or issues: for instance, the [libp2p spec](https://github.com/ipfs/specs/pull/19). Contributions here that would be most helpful are **top-level comments** about how it should look based on our understanding. Again, the more eyes the better.\n- **Add tests**. There can never be enough tests.\n\n### Want to hack on IPFS?\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_large)\n","browser":{"stream":"readable-stream","./src/core/runtime/dns-nodejs.js":"./src/core/runtime/dns-browser.js","./src/core/runtime/ipld-nodejs.js":"./src/core/runtime/ipld-browser.js","./src/core/runtime/repo-nodejs.js":"./src/core/runtime/repo-browser.js","./test/utils/create-repo-nodejs.js":"./test/utils/create-repo-browser.js","./src/core/runtime/config-nodejs.js":"./src/core/runtime/config-browser.js","./src/core/runtime/libp2p-nodejs.js":"./src/core/runtime/libp2p-browser.js","./src/core/components/init-assets.js":false,"./src/core/runtime/preload-nodejs.js":"./src/core/runtime/preload-browser.js","./src/core/runtime/add-from-fs-nodejs.js":"./src/core/runtime/add-from-fs-browser.js","./src/core/runtime/libp2p-pubsub-routers-nodejs.js":"./src/core/runtime/libp2p-pubsub-routers-browser.js"},"engines":{"npm":">=6.0.0","node":">=10.0.0"},"gitHead":"b30339cd4765fdb90f9279ec9efcf813e33afb01","license":"MIT","scripts":{"lint":"aegir lint","test":"aegir test","build":"aegir build","release":"aegir release -t node -t browser","coverage":"nyc --reporter=text --reporter=lcov npm run test:node","benchmark":"echo \"Error: no benchmarks yet\" && exit 1","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:interop":"IPFS_JS_EXEC=$PWD/src/cli/bin.js ipfs-interop","release-major":"aegir release --type major -t node -t browser","release-minor":"aegir release --type minor -t node -t browser","test:external":"aegir test-external","test:node:cli":"aegir test -t node -f test/cli/index.js","benchmark:node":"echo \"Error: no benchmarks yet\" && exit 1","test:node:core":"aegir test -t node -f test/core/**/*.js","test:node:http":"aegir test -t node -f test/http-api/index.js","test:webworker":"aegir test -t webworker","benchmark:browser":"echo \"Error: no benchmarks yet\" && exit 1","test:bootstrapers":"IPFS_TEST=bootstrapers aegir test -t browser -f test/bootstrapers.js","test:node:gateway":"aegir test -t node -f test/gateway/index.js","benchmark:node:core":"echo \"Error: no benchmarks yet\" && exit 1","benchmark:node:http":"echo \"Error: no benchmarks yet\" && exit 1","test:node:interface":"aegir test -t node -f test/core/interface.spec.js"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"homepage":"https://js.ipfs.io","keywords":["IPFS"],"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details","repository":{"url":"git+https://github.com/ipfs/js-ipfs.git","type":"git"},"_npmVersion":"6.11.3","description":"JavaScript implementation of the IPFS specification","directories":{},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"daviddias","email":"mail@daviddias.me"}],"_nodeVersion":"10.16.2","contributors":[{"name":"0xflotus","email":"0xflotus@gmail.com"},{"name":"A_A","email":"21040751+Otto-AA@users.noreply.github.com"},{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex North","email":"alex@alexnorth.me"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Andrew Nesbitt","email":"andrewnez@gmail.com"},{"name":"Andrew de Andrade","email":"andrew@deandrade.com.br"},{"name":"André Cruz","email":"andremiguelcruz@msn.com"},{"name":"Arkadiy Kukarkin","email":"parkan@users.noreply.github.com"},{"name":"Arpit Agarwal","email":"93arpit@gmail.com"},{"name":"Arpit Agarwal","email":"atvanguard@users.noreply.github.com"},{"name":"Bernard Mordan","email":"bernard@tableflip.io"},{"name":"Brian Vander Schaaf","email":"bvs330@gmail.com"},{"name":"Bruno Zell","email":"bruno.zzell@gmail.com"},{"name":"CHEVALAY JOSSELIN","email":"josselin54.chevalay@gmail.com"},{"name":"Caio Gondim","email":"me@caiogondim.com"},{"name":"Chance Hudson","email":"jchancehud@gmail.com"},{"name":"Chirag Shinde","email":"chirag-shinde@users.noreply.github.com"},{"name":"Christian Couder","email":"chriscool@tuxfamily.org"},{"name":"Dafeng","email":"dfguo.joe@gmail.com"},{"name":"Dan Ordille","email":"dordille@gmail.com"},{"name":"Dan Shields","email":"35669742+NukeManDan@users.noreply.github.com"},{"name":"Daniel J. O'Quinn","email":"danieljoquinn@gmail.com"},{"name":"Daniela Borges Matos de Carvalho","email":"alunassertiva@gmail.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"David Gilbertson","email":"gilbertson.david@gmail.com"},{"name":"David da Silva","email":"dasilvacontin@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dominic Della Valle","email":"ddvpublic@Gmail.com"},{"name":"Dzmitry Bachko","email":"dbachko@gmail.com"},{"name":"Enrico Marino","email":"enrico.marino@email.com"},{"name":"Faheel Ahmad","email":"faheel@live.in"},{"name":"Felix Yan","email":"felixonmars@archlinux.org"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Francisco Baio Dias","email":"francisco@typeform.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Georgios Rassias","email":"georassias@gmail.com"},{"name":"Gorka Ludlow","email":"gorka@aquigorka.com"},{"name":"Grant Herman","email":"grantlouisherman041@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Haoliang Yu","email":"haoliangyu@users.noreply.github.com"},{"name":"Harsh Vakharia","email":"harshjv@users.noreply.github.com"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Henry Rodrick","email":"moshisushi@gmail.com"},{"name":"Heo Sangmin","email":"heo@mapiacompany.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"Irakli Gozalishvili","email":"contact@gozala.io"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"Jacob Heun","email":"jake@andyet.net"},{"name":"Jade Meskill","email":"jade.meskill@gmail.com"},{"name":"Johannes Wikner","email":"johannes.wikner@gmail.com"},{"name":"Jon Schlinkert","email":"dev@sellside.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Jonybang","email":"Jonybange@gmail.com"},{"name":"João Antunes","email":"j.goncalo.antunes@gmail.com"},{"name":"João Santos","email":"joaosantos15@users.noreply.github.com"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Lars Gierth","email":"larsg@systemli.org"},{"name":"Lukas Drgon","email":"lukas.drgon@gmail.com"},{"name":"Maciej Krüger","email":"mkg20001@gmail.com"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Marius Darila","email":"marius.darila@gmail.com"},{"name":"Mark Robert Henderson","email":"henderson.mark@gmail.com"},{"name":"Mat Kelly","email":"machawk1@gmail.com"},{"name":"Michelle Lee","email":"michelle@protocol.ai"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Molly","email":"momack2@users.noreply.github.com"},{"name":"Mounish Sai","email":"pvsmounish@gmail.com"},{"name":"My9Bot","email":"34904312+My9Bot@users.noreply.github.com"},{"name":"Nick Poulden","email":"nick@poulden.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Oskar Nyberg","email":"oskar@oskarnyberg.com"},{"name":"Pascal Precht","email":"pascal.precht@googlemail.com"},{"name":"Pau Ramon Revilla","email":"masylum@gmail.com"},{"name":"Paulo Rodrigues","email":"me@paulogr.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Portia Burton","email":"plburton@gmail.com"},{"name":"Prabhakar Poudel","email":"yuvrajzohan@gmail.com"},{"name":"Qmstream","email":"51881352+Qmstream@users.noreply.github.com"},{"name":"Raoul Millais","email":"raoul@raoulmillais.com"},{"name":"RasmusErik Voel Jensen","email":"github@solsort.com"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Rob Brackett","email":"rob@robbrackett.com"},{"name":"Rod Keys","email":"rod@zokos.com"},{"name":"Sangwon Hong","email":"qpakzk@gmail.com"},{"name":"Sid Harder","email":"sideharder@gmail.com"},{"name":"SidHarder","email":"softwarenavigator@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Stephen Whitmore","email":"noffle@users.noreply.github.com"},{"name":"Steven Allen","email":"steven@stebalien.com"},{"name":"Terence Pae","email":"terencepae@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis CI","email":"travis@travis-ci.org"},{"name":"Uroš Jurglič","email":"jurglic@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vincent Martin","email":"vince@finalatomicbuster.net"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Xiao Liang","email":"yxliang01@users.noreply.github.com"},{"name":"Yahya","email":"ya7yaz@gmail.com"},{"name":"Yole","email":"yole@ultiledger.io"},{"name":"bitspill","email":"bitspill+github@bitspill.net"},{"name":"datafatmunger","email":"jbg@peerparty.org"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dirkmc","email":"dirk@mccormick.cx"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"hapsody","email":"hapsody@gmail.com"},{"name":"jbenet","email":"juan@benet.ai"},{"name":"jonahweissman","email":"19804455+jonahweissman@users.noreply.github.com"},{"name":"kevingzhang","email":"kevin.zhang.canada@gmail.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"npmcdn-to-unpkg-bot","email":"npmcdn-to-unpkg-bot@users.noreply.github.com"},{"name":"robbsolter","email":"35879806+robbsolter@users.noreply.github.com"},{"name":"seungwon-kang","email":"ksw3894@gmail.com"},{"name":"swedneck","email":"40505480+swedneck@users.noreply.github.com"},{"name":"tcme","email":"hi@this-connect.me"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Максим Ильин","email":"negamaxi@gmail.com"}],"dependencies":{"bl":"^3.0.0","ky":"^0.14.0","dlv":"^1.1.3","bs58":"^4.0.1","cids":"~0.7.1","glob":"^7.1.3","ipld":"~0.25.0","ipns":"^0.6.1","temp":"~0.9.0","async":"^2.6.1","debug":"^4.1.0","fnv1a":"^1.0.1","mafmt":"^6.0.10","yargs":"^14.0.0","libp2p":"^0.26.2","lodash":"^4.17.15","mkdirp":"~0.5.1","semver":"^6.3.0","varint":"^5.0.0","byteman":"^1.3.5","hashlru":"^2.3.0","is-ipfs":"~0.6.1","iso-url":"~0.4.6","it-pipe":"^1.0.1","kind-of":"^6.0.2","mortice":"^2.0.0","p-queue":"^6.1.0","peer-id":"^0.12.2","protons":"^1.0.1","cid-tool":"~0.3.0","class-is":"^1.1.0","err-code":"^2.0.0","ipfs-mfs":"^0.13.0","ipld-git":"~0.5.0","ipld-raw":"^4.0.0","progress":"^2.0.1","pull-cat":"^1.1.11","@hapi/joi":"^15.0.0","base32.js":"~0.1.0","file-type":"^12.0.1","fsm-event":"^2.1.0","hapi-pino":"^6.1.0","ipfs-repo":"^0.28.0","is-stream":"^2.0.0","multiaddr":"^6.1.1","multibase":"~0.6.0","peer-book":"^0.9.1","peer-info":"~0.15.1","pull-file":"^1.1.0","pull-sort":"^1.0.1","@hapi/ammo":"^3.1.1","@hapi/boom":"^7.4.3","@hapi/hapi":"^18.3.2","ipfs-block":"~0.8.1","ipfs-utils":"~0.4.0","ipld-zcash":"~0.3.0","libp2p-tcp":"^0.13.0","mime-types":"^2.1.21","multicodec":"~0.5.5","node-fetch":"^2.3.0","pull-defer":"~0.2.3","pull-mplex":"~0.1.1","receptacle":"^1.3.2","tar-stream":"^2.0.0","callbackify":"^1.1.0","ipfs-unixfs":"~0.1.16","ipld-dag-pb":"~0.18.0","libp2p-mdns":"~0.12.0","multihashes":"~0.4.14","p-iteration":"^1.1.8","prom-client":"^11.5.3","pull-ndjson":"~0.1.1","pull-stream":"^3.6.14","superstruct":"~0.6.2","bignumber.js":"^9.0.0","ipfs-bitswap":"^0.26.0","ipld-bitcoin":"~0.3.0","it-to-stream":"^0.1.1","ky-universal":"~0.3.0","libp2p-secio":"~0.11.0","array-shuffle":"^1.0.1","explain-error":"^1.0.4","ipld-dag-cbor":"~0.15.0","ipld-ethereum":"^4.0.0","jsondiffpatch":"~0.3.11","just-safe-set":"^2.1.0","libp2p-crypto":"^0.16.2","libp2p-record":"~0.7.0","merge-options":"^1.0.1","promisify-es6":"^1.0.3","pull-pushable":"^2.2.0","pull-traverse":"^1.0.3","yargs-promise":"^1.1.0","dag-cbor-links":"^1.3.0","datastore-core":"~0.7.0","ipfs-multipart":"^0.2.0","is-domain-name":"^1.0.1","is-pull-stream":"~0.0.0","libp2p-kad-dht":"~0.16.0","lodash.flatten":"^4.4.0","pull-abortable":"^4.1.1","get-folder-size":"^2.0.0","libp2p-floodsub":"^0.18.0","libp2p-keychain":"^0.5.1","promise-nodeify":"^3.0.1","readable-stream":"^3.4.0","update-notifier":"^3.0.1","datastore-pubsub":"^0.2.1","ipfs-http-client":"^38.2.0","libp2p-bootstrap":"~0.9.3","libp2p-gossipsub":"~0.0.5","multiaddr-to-uri":"^5.0.0","uri-to-multiaddr":"^3.0.1","libp2p-websockets":"~0.12.3","async-iterator-all":"^1.0.0","binary-querystring":"~0.1.2","buffer-peek-stream":"^1.0.1","ipfs-block-service":"~0.16.0","ipfs-http-response":"~0.3.1","libp2p-webrtc-star":"~0.16.0","multihashing-async":"^0.8.0","interface-datastore":"~0.7.0","prometheus-gc-stats":"~0.6.0","ipfs-unixfs-exporter":"^0.38.0","ipfs-unixfs-importer":"^0.40.0","human-to-milliseconds":"^2.0.0","pull-stream-to-stream":"^1.3.4","stream-to-pull-stream":"^1.7.3","async-iterator-to-stream":"^1.1.0","libp2p-websocket-star-multi":"~0.4.3","async-iterator-to-pull-stream":"^1.3.0","libp2p-delegated-peer-routing":"^0.3.1","pull-stream-to-async-iterator":"^1.0.2","libp2p-delegated-content-routing":"^0.3.1"},"_hasShrinkwrap":false,"leadMaintainer":"Alan Shaw <alan@tableflip.io>","readmeFilename":"README.md","devDependencies":{"qs":"^6.5.2","hat":"0.0.3","ncp":"^2.0.0","aegir":"^20.3.1","delay":"^4.1.0","execa":"^2.0.4","sinon":"^7.4.2","rimraf":"^3.0.0","p-event":"^4.1.0","base64url":"^3.0.1","form-data":"^2.5.1","ipfsd-ctl":"^0.47.2","temp-write":"^4.0.0","detect-node":"^2.0.4","dir-compare":"^1.7.3","clear-module":"^4.0.0","ipfs-interop":"^0.1.1","stream-to-promise":"^2.2.0","interface-ipfs-core":"^0.117.2","libp2p-websocket-star":"~0.10.2"},"optionalDependencies":{"prom-client":"^11.5.3","prometheus-gc-stats":"~0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/ipfs_0.39.0-rc.0_1570532333206_0.8175962119686198","host":"s3://npm-registry-packages"},"browser-all-ipld-formats":{"./src/core/runtime/ipld-browser.js":"./src/core/runtime/ipld-browser-all.js"},"_id":"ipfs@0.39.0-rc.0","version":"0.39.0-rc.0"}