import { TypedEventEmitter } from 'main-event'; import type { KadDHTComponents } from './index.js'; import type { PeerId, Startable } from '@libp2p/interface'; export interface TopologyListenerInit { protocol: string; logPrefix: string; } export interface TopologyListenerEvents { peer: CustomEvent; } /** * Receives notifications of new peers joining the network that support the DHT protocol */ export declare class TopologyListener extends TypedEventEmitter implements Startable { private readonly log; private readonly components; private readonly protocol; private running; private registrarId?; constructor(components: KadDHTComponents, init: TopologyListenerInit); isStarted(): boolean; /** * Start the network */ start(): Promise; /** * Stop all network activity */ stop(): Promise; } //# sourceMappingURL=topology-listener.d.ts.map