Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 || []
}
},
async () => {
sigS = await sigServer.start(sigOptions)
},
(cb) => createA(cb),
spawnNode((err, node) => {
if (err) {
throw err
}
relayNode = node
sig = signalling.start(20000, done)
})
})