import { CID } from 'multiformats/cid'; import type { ReadableStorage, WalkPathOptions } from '../index.ts'; export interface ResolveResult { /** * The CID of the node */ cid: CID; /** * The name of the node */ name: string; /** * Any unresolved path segments */ rest: string[]; } /** * A resolver searches the block that the root CID resolves to for one or more * resolve results corresponding to the passed path segments, loading new blocks * as necessary. */ export interface Resolver { (root: CID, path: string[], blockstore: ReadableStorage, options?: WalkPathOptions): AsyncGenerator; } export declare const resolvers: Record; export interface PathEntry { cid: CID; name: string; path: string; roots: CID[]; remainder: string[]; } /** * Returns an async iterator that yields entries for all segments in a path * * @example * * ```TypeScript * import { walkPath } from 'ipfs-unixfs-exporter' * * const entries = [] * * for await (const entry of walkPath('Qmfoo/foo/bar/baz.txt', blockstore)) { * entries.push(entry) * } * * // entries contains 4x `entry` objects * ``` */ export declare function walkPath(path: string | CID, blockstore: ReadableStorage, options?: WalkPathOptions): AsyncGenerator; //# sourceMappingURL=index.d.ts.map