How to use libp2p-gossipsub - 2 common examples

To help you get started, we’ve selected a few libp2p-gossipsub 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 / packages / lodestar / src / network / gossip / gossip.ts View on Github external
public constructor(opts: INetworkOptions, {config, libp2p, logger}: IGossipModules) {
    super();
    this.opts = opts;
    this.config = config;
    this.libp2p = libp2p;
    this.logger = logger.child({module: "gossip", level: LogLevel[logger.level]});
    this.logger.silent = logger.silent;
    this.pubsub = new Gossipsub(libp2p, {gossipIncoming: false});
    this.handlers = this.registerHandlers();
  }
github ChainSafe / lodestar / packages / lodestar / src / network / gossip.ts View on Github external
public constructor(opts: INetworkOptions, {config, libp2p, logger}: IGossipModules) {
    super();
    this.opts = opts;
    this.config = config;
    this.libp2p = libp2p;
    this.logger = logger;
    this.pubsub = new Gossipsub(libp2p, {gossipIncoming: false});
  }

libp2p-gossipsub

A typescript implementation of gossipsub

Apache-2.0
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis

Popular libp2p-gossipsub functions