How to use libp2p-webrtc-star - 3 common examples

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 || []
          }
	},
github libp2p / js-libp2p-switch / .aegir.js View on Github external
async () => {
      sigS = await sigServer.start(sigOptions)
    },
    (cb) => createA(cb),
github daviddias / js-ethereum-libp2p / gulpfile.js View on Github external
spawnNode((err, node) => {
    if (err) {
      throw err
    }
    relayNode = node
    sig = signalling.start(20000, done)
  })
})

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