📁 Archived - this module has been merged into js-libp2p
JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec
$ npm i @libp2p/webtransport
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>
libp2p-webtransport
is the WebTransport transport implementation compatible with libp2p.
> npm i @libp2p/webtransport
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.
Licensed under either of
- Apache 2.0, (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
- MIT (LICENSE-MIT / http://opensource.org/licenses/MIT)
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.