npm install --save ipfs-bitswap, it can also be used directly in the browser.
The source is available for download from GitHub. Alternatively, you can install using npm:
$ npm install --save ipfs-bitswap
You can then
require() ipfs-bitswap as normal:
const ipfsBitswap = require('ipfs-bitswap')
Ipfs-bitswap should work in any ES2015 environment out of the box.
The portable versions of ipfs-bitswap, including
index.min.js, are included in the
/dist folder. Ipfs-bitswap can also be found on unpkg.com under
Find providers given a
Find the providers of a given
cid and connect to them.
Connects to another peer
Is equal for Maps of BitswapMessageEntry or Blocks