import { type Hash } from '../hash.ts'; import type { Read as KVRead, Store as KVStore, Write as KVWrite } from '../kv/store.ts'; import { Chunk, type ChunkHasher, type Refs } from './chunk.ts'; import { type RefCountUpdatesDelegate } from './gc.ts'; import { type Read, type Store, type Write } from './store.ts'; export declare class StoreImpl implements Store { #private; constructor(kv: KVStore, chunkHasher: ChunkHasher, assertValidHash: (hash: Hash) => void); read(): Promise; write(): Promise; close(): Promise; } export declare class ReadImpl implements Read { protected readonly _tx: KVRead; readonly assertValidHash: (hash: Hash) => void; constructor(kv: KVRead, assertValidHash: (hash: Hash) => void); hasChunk(hash: Hash): Promise; getChunk(hash: Hash): Promise; mustGetChunk(hash: Hash): Promise; getHead(name: string): Promise; /** * Prefetch ALL chunks from the KV store in a single bulk read. * Returns a Map that can be used as an in-memory cache. * Only works if the underlying KV store supports getAll() (IDBStore does). * Falls back to an empty map if getAll() is not available. */ prefetchAll(): Promise>; release(): void; get closed(): boolean; } export declare class WriteImpl extends ReadImpl implements Write, RefCountUpdatesDelegate { #private; protected readonly _tx: KVWrite; constructor(kvw: KVWrite, chunkHasher: ChunkHasher, assertValidHash: (hash: Hash) => void); createChunk: (data: V, refs: Refs) => Chunk; get kvWrite(): KVWrite; putChunk(c: Chunk): Promise; setHead(name: string, hash: Hash): Promise; removeHead(name: string): Promise; commit(): Promise; getRefCount(hash: Hash): Promise; getRefs(hash: Hash): Promise; release(): void; } //# sourceMappingURL=store-impl.d.ts.map