import type { TraversalStrategy } from '../index.ts'; import type { CodecLoader } from '@helia/interface'; import type { GraphWalker, GraphWalkerComponents } from '@helia/utils'; import type { AbortOptions } from '@libp2p/interface'; import type { Blockstore } from 'interface-blockstore'; import type { BlockView } from 'multiformats'; import type { CID } from 'multiformats/cid'; export interface GraphSearchOptions { /** * Graph traversal strategy, defaults to breadth-first */ walker?(components: GraphWalkerComponents): GraphWalker; /** * How to search the graph * * @deprecated use `walker` instead - this will be removed in a future release */ strategy?: 'depth-first' | 'breadth-first'; } /** * A traversal strategy that performs a depth-first search looking for a target * CID. */ export declare class GraphSearch implements TraversalStrategy { private haystack?; private readonly needle; private readonly options?; private walker?; constructor(needle: CID, options?: GraphSearchOptions); constructor(haystack: CID, needle: CID, options?: GraphSearchOptions); traverse(root: CID, blockstore: Blockstore, getCodec: CodecLoader, options?: AbortOptions): AsyncGenerator, void, undefined>; } //# sourceMappingURL=graph-search.d.ts.map