# ipfs-bitswap

> JavaScript implementation of the Bitswap data exchange protocol used by IPFS

Latest version **20.0.2** (published 2024-01-16) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install ipfs-bitswap
pnpm add ipfs-bitswap
yarn add ipfs-bitswap
bun add ipfs-bitswap
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 20.0.2 |
| Published | 2024-01-16 |
| First published | 2016-05-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 24 |
| Unpacked size | 452.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 75 |
| Maintainers | daviddias, dignifiedquire, achingbrain, alanshaw, dirkmc, npm-service-account-ipfs |
| Keywords | exchange, ipfs, libp2p, p2p |

## Links

- npm: https://www.npmjs.com/package/ipfs-bitswap
- Repository: https://github.com/ipfs/js-ipfs-bitswap
- Homepage: https://github.com/ipfs/js-ipfs-bitswap#readme
- Issues: https://github.com/ipfs/js-ipfs-bitswap/issues
- npm.io page: https://npm.io/package/ipfs-bitswap

## Dependencies (24)

- [events](https://npm.io/package/events.md) ^3.3.0
- [it-map](https://npm.io/package/it-map.md) ^3.0.2
- [varint](https://npm.io/package/varint.md) ^6.0.0
- [it-pipe](https://npm.io/package/it-pipe.md) ^3.0.1
- [it-take](https://npm.io/package/it-take.md) ^3.0.1
- [it-drain](https://npm.io/package/it-drain.md) ^3.0.5
- [any-signal](https://npm.io/package/any-signal.md) ^4.1.1
- [it-foreach](https://npm.io/package/it-foreach.md) ^2.0.2
- [uint8arrays](https://npm.io/package/uint8arrays.md) ^5.0.1
- [multiformats](https://npm.io/package/multiformats.md) ^13.0.0
- [@libp2p/utils](https://npm.io/package/@libp2p/utils.md) ^5.0.0
- [@libp2p/logger](https://npm.io/package/@libp2p/logger.md) ^4.0.0
- [uint8arraylist](https://npm.io/package/uint8arraylist.md) ^2.4.3
- [varint-decoder](https://npm.io/package/varint-decoder.md) ^1.0.0
- [interface-store](https://npm.io/package/interface-store.md) ^5.1.0
- [progress-events](https://npm.io/package/progress-events.md) ^1.0.0
- [protons-runtime](https://npm.io/package/protons-runtime.md) ^5.0.0
- [just-debounce-it](https://npm.io/package/just-debounce-it.md) ^3.0.1
- [@libp2p/interface](https://npm.io/package/@libp2p/interface.md) ^1.0.0
- [it-length-prefixed](https://npm.io/package/it-length-prefixed.md) ^9.0.0
- [interface-blockstore](https://npm.io/package/interface-blockstore.md) ^5.0.0
- [@multiformats/multiaddr](https://npm.io/package/@multiformats/multiaddr.md) ^12.1.0
- [timeout-abort-controller](https://npm.io/package/timeout-abort-controller.md) ^3.0.0
- [@vascosantos/moving-average](https://npm.io/package/@vascosantos/moving-average.md) ^1.1.0

## Recent versions

- 20.0.2 (latest) — 2024-01-16
- 20.0.1 — 2024-01-16
- 20.0.0 — 2023-11-30
- 19.0.2 — 2023-11-04
- 19.0.1 — 2023-10-09
- 19.0.0 — 2023-08-05
- 18.0.3 — 2023-07-27
- 18.0.2 — 2023-07-27
- 18.0.1 — 2023-05-22
- 18.0.0 — 2023-05-19
- 17.0.3 — 2023-05-19
- 17.0.2 — 2023-04-13
- 17.0.1 — 2023-04-04
- 17.0.0 — 2023-03-13
- 16.0.0 — 2023-02-13
- … 100 more at https://npm.io/package/ipfs-bitswap/versions

## README

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs-bitswap.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs-bitswap)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs-bitswap/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/ipfs/js-ipfs-bitswap/actions/workflows/js-test-and-release.yml?query=branch%3Amain)

> JavaScript implementation of the Bitswap data exchange protocol used by IPFS

# About

This module implements the [Bitswap protocol](https://docs.ipfs.tech/concepts/bitswap/) in TypeScript.

# Install

```console
$ npm i ipfs-bitswap
```

## Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `IpfsBitswap` in the global namespace.

```html
<script src="https://unpkg.com/ipfs-bitswap/dist/index.min.js"></script>
```

# API Docs

- <https://ipfs.github.io/js-ipfs-bitswap>

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

# Contribute

Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-ipfs-bitswap/issues).

Also see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)

---
_Source: https://npm.io/package/ipfs-bitswap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
