import type { QueryEvent } from '../index.js'; import type { QueryFunc } from '../query/types.js'; import type { Logger, PeerId, RoutingOptions } from '@libp2p/interface'; import type { ConnectionManager } from '@libp2p/interface-internal'; import type { Filter } from '@libp2p/utils'; export interface QueryPathOptions extends RoutingOptions { /** * What are we trying to find */ key: Uint8Array; /** * Where we start our query */ startingPeers: PeerId[]; /** * Who we are */ ourPeerId: PeerId; /** * The query function to run with each peer */ query: QueryFunc; /** * How many concurrent node/value lookups to run */ alpha: number; /** * The index within `k` this path represents */ path: number; /** * How many disjoint paths are in this query */ numPaths: number; /** * Query log */ log: Logger; /** * Set of peers seen by this and other paths */ peersSeen: Filter; /** * The libp2p connection manager */ connectionManager: ConnectionManager; /** * The overall query abort signal */ signal: AbortSignal; } /** * Walks a path through the DHT, calling the passed query function for * every peer encountered that we have not seen before */ export declare function queryPath(options: QueryPathOptions): AsyncGenerator; //# sourceMappingURL=query-path.d.ts.map