libp2p / js-libp2p-webtransport

WebTranport module that libp2p uses and that implements the interface-transport spec
Other
15 stars 5 forks source link

📁 Archived - this module has been merged into js-libp2p

@libp2p/webtransport

libp2p.io Discuss codecov CI

JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec

Table of contents

Install

$ npm i @libp2p/webtransport

Browser <script> tag

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

<script src="https://unpkg.com/@libp2p/webtransport/dist/index.min.js"></script>

Description

libp2p-webtransport is the WebTransport transport implementation compatible with libp2p.

Usage

> npm i @libp2p/webtransport

Libp2p Usage Example

import { createLibp2pNode } from 'libp2p'
import { webTransport } from '@libp2p/webtransport'
import { noise } from 'libp2p-noise'

const node = await createLibp2pNode({
  transports: [
    webTransport()
  ],
  connectionEncryption: [
    noise()
  ]
})

For more information see libp2p/js-libp2p/doc/CONFIGURATION.md#customizing-transports.

API

Transport

Connection

API Docs

License

Licensed under either of

Contribution

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.