UNPKG

@atcute/car

Version:

lightweight DASL CAR and atproto repository decoder for AT Protocol.

25 lines (24 loc) 805 B
import { RepoEntry } from './types.js'; export type MissingBlockEntry = { cid: string; type: 'record'; key: string; } | { cid: string; type: 'mst-node'; } | { cid: string; type: 'commit'; }; export interface StreamedRepoReader { /** * list of blocks that were referenced but not found in the repository. * blocks may be reported as missing if multiple records share the same CID. */ readonly missingBlocks: readonly MissingBlockEntry[]; dispose(): Promise<void>; [Symbol.asyncDispose](): Promise<void>; [Symbol.asyncIterator](): AsyncIterator<RepoEntry>; } export declare const repoEntryTransform: () => ReadableWritablePair<RepoEntry, Uint8Array>; export declare const fromStream: (stream: ReadableStream<Uint8Array>) => StreamedRepoReader;