ipfs-bitswap
![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square)
![Sauce Test Status](https://saucelabs.com/browser-matrix/js-ipfs-bitswap.svg)
Node.js implementation of the Bitswap 'data exchange' protocol used by IPFS
Table of Contents
Install
npm
> npm install ipfs-bitswap
Use in Node.js
const Bitswap = require('ipfs-bitswap')
Use in a browser with browserify, webpack or any other bundler
const Bitswap = require('ipfs-bitswap')
Use in a browser using a script tag
Loading this module through a script tag will make the IpfsBitswap
object available in the global namespace.
<script src="https://unpkg.com/ipfs-bitswap/dist/index.min.js"></script>
<script src="https://unpkg.com/ipfs-bitswap/dist/index.js"></script>
Usage
See https://ipfs.github.io/js-ipfs-bitswap
API
See https://ipfs.github.io/js-ipfs-bitswap
Development
Structure
![](https://github.com/ipfs/js-ipfs-bitswap/raw/HEAD/img/architecture.png)
» tree src
src
├── components
│ ├── decision
│ │ ├── engine.js
│ │ ├── index.js
│ │ └── ledger.js
│ ├── network
│ │ └── index.js
│ └── want-manager
│ ├── index.js
│ └── msg-queue.js
├── constants.js
├── index.js
└── types
├── message
│ ├── entry.js
│ ├── index.js
│ └── message.proto.js
└── wantlist
├── entry.js
└── index.js
Contribute
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)
License
MIT