Skip to content

Latest commit

 

History

History
 
 

transport-webtransport

libp2p.io Discuss codecov CI

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

About

A libp2p transport based on WebTransport.

Example

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

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

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>

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

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.

See the Contributing doc for details on developing changes to this repo.