How to use the libp2p-webrtc-star.WStar function in libp2p-webrtc-star

To help you get started, we’ve selected a few libp2p-webrtc-star examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ChainSafe / lodestar / src / p2p / libp2p-bundle.ts View on Github external
constructor(_options: LodestarNodeOpts) {
    const wrtcStar = new WStar({ id: _options.peerInfo.id });

    const defaults = {
      modules: {
        transport: [TCP, wrtcStar],
	streamMuxer: [Mplex],
	peerDiscovery: [Bootstrap, wrtcStar.discovery],
	dht: KadDHT
      },
      config: {
        peerDiscovery: {
          bootstrap: {
            interval: 2000,
            enabled: true,
            list: _options.bootstrap || []
          }
	},

libp2p-webrtc-star

libp2p WebRTC transport that includes a discovery mechanism provided by the signalling-star

(Apache-2.0 OR MIT)
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis