import type { OperationMetrics } from './kad-dht.js'; import type { PeerRouting } from './peer-routing/index.js'; import type { ComponentLogger, Metrics, PeerId, Startable } from '@libp2p/interface'; import type { DeferredPromise } from 'p-defer'; export interface QuerySelfInit { logPrefix: string; peerRouting: PeerRouting; count?: number; interval?: number; initialInterval?: number; queryTimeout?: number; initialQuerySelfHasRun: DeferredPromise; operationMetrics: OperationMetrics; } export interface QuerySelfComponents { peerId: PeerId; logger: ComponentLogger; metrics?: Metrics; events: EventTarget; } /** * Receives notifications of new peers joining the network that support the DHT protocol */ export declare class QuerySelf implements Startable { private readonly log; private readonly peerId; private readonly peerRouting; private readonly events; private readonly count; private readonly interval; private readonly initialInterval; private readonly queryTimeout; private running; private timeoutId?; private controller?; private initialQuerySelfHasRun?; private querySelfPromise?; constructor(components: QuerySelfComponents, init: QuerySelfInit); isStarted(): boolean; start(): void; stop(): void; querySelf(): Promise; } //# sourceMappingURL=query-self.d.ts.map