declare module 'libp2p-gossipsub' { import Libp2p from 'libp2p' import PeerInfo from 'peer-info' import PubSub from 'libp2p-pubsub' class Heartbeat { constructor(gossippub: GossipSub) start(callback: Function): void stop(callback: Function): void } interface CacheEntry { msgID: string topics: string[] } class MessageCache { constructor(gossip: number, history: number) msgs: Map history: Array> put(msg: any): void get(msgID: string): string[] getGossipIDs(topic: string): string[] shift(): void } class GossipSub extends PubSub { constructor (libp2p: Libp2p, options?: { fallbackToFloodsub?: boolean, emitSelf?: boolean}) mesh: Map> fanout: Map> lastpub: Map gossip: Map> control: Map messageCache: MessageCache heartbeat: Heartbeat start(callback?: Function): Promise stop(callback?: Function): Promise join(...topics: string[]): Promise leave(...topics: string[]): Promise } // eslint-disable-next-line import/no-default-export export default GossipSub }