UNPKG

@waku/core

Version:

TypeScript implementation of the Waku v2 protocol

27 lines (26 loc) 826 B
import { Libp2p } from "@libp2p/interface"; import { Dialer } from "./dialer.js"; type DiscoveryDialerConstructorOptions = { libp2p: Libp2p; dialer: Dialer; }; interface IDiscoveryDialer { start(): void; stop(): void; } /** * This class is responsible for dialing peers that are discovered by the libp2p node. * Managing limits for the peers is out of scope for this class. * Dialing after discovery is needed to identify the peer and get all other information: metadata, protocols, etc. */ export declare class DiscoveryDialer implements IDiscoveryDialer { private readonly libp2p; private readonly dialer; constructor(options: DiscoveryDialerConstructorOptions); start(): void; stop(): void; private onPeerDiscovery; private updatePeerStore; private getPeer; } export {};