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 i ipfs-bitswap
Use in Node.js
const bitswap = require('ipfs-bitswap')
Use in a browser with browserify, webpack or any other bundler
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
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
For the documentation see API.md.
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