import { type BatchOperation, type ConditionalBatchCondition, type ScanOptions, type Storage } from '../storage/interface.ts'; /** * Byte-oriented raw storage surface shared by local and HTTP clients. * * @example * ```ts * import { Engine, LocalClient, MemoryStorage, type WeftClientStorage } from '@lostgradient/weft'; * * await using engine = new Engine({ storage: new MemoryStorage() }); * const client = new LocalClient(engine); * const storage: WeftClientStorage = client.storage; * await storage.put('example:key', new TextEncoder().encode('value')); * ``` */ export interface WeftClientStorage { get(key: string): Promise; put(key: string, value: Uint8Array): Promise; delete(key: string): Promise; scan(prefix: string, options?: ScanOptions): AsyncIterable<[string, Uint8Array]>; batch(operations: BatchOperation[]): Promise; conditionalBatch(conditions: ConditionalBatchCondition[], operations: BatchOperation[]): Promise; } /** Adapt an engine-owned storage backend without exposing adapter-only methods. */ export declare function createLocalClientStorage(storage: Storage): WeftClientStorage;