///
import { t } from '../common';
import * as util from './util';
export declare class Db implements t.IDb {
static create(args: {
dir: string;
dbKey?: string;
version?: string;
valueEncoding?: 'utf-8' | 'binary';
}): Promise>;
static toValues: typeof util.toValues;
static toKeyValueList: typeof util.toKeyValueList;
static toValueList: typeof util.toValueList;
static ensureTimestamps: typeof util.ensureTimestamps;
private constructor();
private readonly _;
readonly dispose$: import("rxjs").Observable<{}>;
readonly events$: import("rxjs").Observable;
readonly watch$: import("rxjs").Observable>;
readonly isDisposed: boolean;
readonly dir: string;
readonly key: string;
readonly localKey: string;
readonly discoveryKey: string;
readonly buffer: {
key: Buffer;
localKey: Buffer;
discoveryKey: Buffer;
};
readonly watching: string[];
readonly checkoutVersion: string | undefined;
dispose(): void;
replicate(options: {
live?: boolean;
}): t.IProtocol;
isAuthorized(peerKey?: Buffer | string): Promise;
authorize(peerKey: Buffer | string): Promise;
version(): Promise;
checkout(version: string): Promise>;
get(key: K): Promise>;
put(key: K, value: D[K]): Promise>;
delete(key: K): Promise>;
values(args?: {
pattern?: string;
recursive?: boolean;
gt?: boolean;
}): Promise>;
getMany(keys: Array): Promise>;
putMany(data: t.IDbUpdateObject | t.IDbUpdateList): Promise>;
deleteMany(data: Array): Promise;
private _batch;
watch(...pattern: Array): Promise;
unwatch(...pattern: Array): Promise;
history(key: K, options?: {
take?: number;
}): Promise[]>;
stats(options?: {}): Promise<{
dir: string;
size: {
bytes: number;
toString: (options?: import("@platform/fs/lib/size").IFileSizeStringOptions | undefined) => string;
};
}>;
toString(): string;
private fireError;
private next;
private throwIfDisposed;
private throwIfNoKey;
}