import type { CodecLoader } from './index.ts'; import type { AbortOptions } from '@libp2p/interface'; import type { Blockstore } from 'interface-blockstore'; import type { BlockView, CID, Version } from 'multiformats'; export interface GraphWalkerComponents { blockstore: Blockstore; getCodec: CodecLoader; } export interface GraphWalkerInit { } export interface GraphNode { block: BlockView; depth: number; path: CID[]; } export interface WalkOptions extends AbortOptions { /** * Stop traversal once `node.depth` reaches this value. The root is * depth 0. Default: Infinity (walk the entire DAG). */ depth?: number; includeChild?(child: CID, parent: BlockView): boolean; } export interface GraphWalker { walk(cid: CID, options?: WalkOptions): AsyncGenerator>; } export type GraphWalkerFactory = (components: GraphWalkerComponents) => GraphWalker; //# sourceMappingURL=graph-walker.d.ts.map