import { CarReader } from '@ipld/car'; import { CID } from 'multiformats/cid'; export interface BlockStoreForFetch { get(cid: CID): Promise; put(cid: CID, bytes: Uint8Array): Promise; } export interface FetchChainOptions { rootCID: CID; stopAtCID?: CID; stopAtCounter?: number; fetchBlock: (cid: CID) => Promise; fetchAll: (cid: CID) => Promise; maxDepth?: number; } export interface FetchChainResult { rootCID: CID; blockStore: BlockStoreForFetch; /** Serializable blocks array for worker boundary crossing */ blocks: [string, Uint8Array][]; snapshotCount: number; counterRange?: { minCounter: number; maxCounter: number; }; } /** * Fetches a snapshot chain iteratively, stopping at stopAtCID. * Uses 3 requests per snapshot: root(block), applogs(all), info(all). * This avoids the gateway's dag-scope=all following prev links recursively. */ export declare function fetchSnapshotChainUntil(options: FetchChainOptions): Promise; //# sourceMappingURL=fetch-snapshot-chain.d.ts.map