import { KeyedResolvOnce, Logger, LRUSet, Result, URI } from "@adviser/cement"; import { type AnyLink, type CarHeader, type CommitOpts, type TransactionMeta, type CarGroup, type Loadable, BlockstoreRuntime, BlockstoreOpts, AttachedStores, ActiveStore, CIDActiveStore, CarLog, FroozenCarLog, FPBlock, CarBlockItem, BlockFetcher, CommitQueueIf } from "@fireproof/core-types-blockstore"; import { TaskManager } from "@fireproof/core-runtime"; import { type Attachable, type Attached, type CarTransaction, type DbMeta, type Falsy, type SuperThis, KeyBagIf } from "@fireproof/core-types-base"; export declare function carLogIncludesGroup(list: FroozenCarLog, cids: CarGroup): boolean; export declare class Loader implements Loadable { readonly blockstoreParent?: BlockFetcher; readonly ebOpts: BlockstoreRuntime; readonly logger: Logger; readonly commitQueue: CommitQueueIf; isCompacting: boolean; readonly cidCache: KeyedResolvOnce; private readonly maxConcurrentCarReader; private readonly maxConcurrentWrite; readonly seenCompacted: LRUSet; readonly sthis: SuperThis; readonly taskManager: TaskManager; readonly carLog: CarLog; readonly attachedStores: AttachedStores; tryToLoadStaleCars(store: ActiveStore): Promise; attach(attachable: Attachable): Promise; private ensureAttachedStore; private seenMeta; keyBag(): Promise; private readonly onceReady; metaStreamReader: ReadableStreamDefaultReader; ready(): Promise; currentMeta: CarGroup; waitFirstMeta(reader: ReadableStreamDefaultReader, local: ActiveStore, opts?: { meta?: DbMeta; origin?: URI; }): Promise; handleMetaStream(reader: ReadableStreamDefaultReader, local: ActiveStore, opts?: { meta?: DbMeta; origin?: URI; first: (v: CarGroup) => void; error: (e: Error) => void; }): void; close(): Promise; destroy(): Promise; readonly id: string; constructor(sthis: SuperThis, ebOpts: BlockstoreOpts, blockstore?: BlockFetcher); handleDbMetasFromStore(metas: DbMeta[], activeStore: ActiveStore): Promise; mergeDbMetaIntoClock(meta: DbMeta, activeStore: ActiveStore): Promise; loadCarHeaderFromMeta(dbm: DbMeta, astore: ActiveStore): Promise>; commitFiles(t: CarTransaction, done: TransactionMeta): Promise; loadFileCar(cid: AnyLink, store: ActiveStore): Promise>; commit(t: CarTransaction, done: T, opts?: CommitOpts): Promise; updateCarLog(cids: CarGroup, cHeader: CarHeader, compact: boolean): Promise; cacheTransaction(t: CarTransaction): Promise; removeCidsForCompact(cid: AnyLink, store: ActiveStore): Promise; entries(): AsyncIterableIterator; getBlock(cid: AnyLink): Promise; getCompactCarCids(carCid: AnyLink, store: ActiveStore): Promise; loadCar(cid: AnyLink, store: ActiveStore): Promise>; private makeDecoderAndCarReader; protected storesLoadCar(carCid: AnyLink, store: CIDActiveStore): Promise>; protected getMoreReaders(cids: AnyLink[], store: ActiveStore): Promise>[]>; }