# @libp2p/webrtc-peer

> Simple one-to-one WebRTC data channels

Latest version **2.0.2** (published 2022-10-17) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install @libp2p/webrtc-peer
pnpm add @libp2p/webrtc-peer
yarn add @libp2p/webrtc-peer
bun add @libp2p/webrtc-peer
```

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2022-10-17 |
| First published | 2022-03-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16.0.0 |
| Dependencies | 10 |
| Unpacked size | 61.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | jacobheun, npm-service-account-libp2p, alanshaw, vascosantos, achingbrain, daviddias |

## Links

- npm: https://www.npmjs.com/package/@libp2p/webrtc-peer
- Repository: https://github.com/libp2p/js-libp2p-webrtc-peer
- Homepage: https://github.com/libp2p/js-libp2p-webrtc-peer#readme
- Issues: https://github.com/libp2p/js-libp2p-webrtc-peer/issues
- npm.io page: https://npm.io/package/@libp2p/webrtc-peer

## Dependencies (10)

- [delay](https://npm.io/package/delay.md) ^5.0.0
- [p-defer](https://npm.io/package/p-defer.md) ^4.0.0
- [p-event](https://npm.io/package/p-event.md) ^5.0.1
- [err-code](https://npm.io/package/err-code.md) ^3.0.1
- [it-pushable](https://npm.io/package/it-pushable.md) ^3.0.0
- [uint8arrays](https://npm.io/package/uint8arrays.md) ^4.0.2
- [@libp2p/logger](https://npm.io/package/@libp2p/logger.md) ^2.0.0
- [it-stream-types](https://npm.io/package/it-stream-types.md) ^1.0.4
- [iso-random-stream](https://npm.io/package/iso-random-stream.md) ^2.0.2
- [@libp2p/interfaces](https://npm.io/package/@libp2p/interfaces.md) ^3.0.2

## Recent versions

- 2.0.2 (latest) — 2022-10-17
- 2.0.1 — 2022-10-13
- 2.0.0 — 2022-06-15
- 1.0.9 — 2022-05-23
- 1.0.8 — 2022-05-23
- 1.0.7 — 2022-05-04
- 1.0.6 — 2022-05-04
- 1.0.5 — 2022-03-25
- 1.0.4 — 2022-03-19
- 1.0.3 — 2022-03-19
- 1.0.2 — 2022-03-18
- 1.0.1 — 2022-03-18
- 1.0.0 — 2022-03-18
- 0.0.0 — 2022-03-18

## README

# @libp2p/webrtc-peer <!-- omit in toc -->

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-webrtc-peer.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-webrtc-peer)
[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-webrtc-peer/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-webrtc-peer/actions/workflows/js-test-and-release.yml)

> Simple one-to-one WebRTC data channels

## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Usage](#usage)
- [License](#license)
- [Contribute](#contribute)

## Install

```console
$ npm i @libp2p/webrtc-peer
```

## Usage

```js
import { WebRTCInitiator } from '@libp2p/webrtc-peer'

const channel = new WebRTCInitiator(channelOptions)
channel.addEventListener('signal', (signal) => {
  // do handshake
})
```

## 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

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.

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