///
import { Tree } from "./tree";
import { Data, Quantity } from "@ganache/utils";
import { Ancestry } from "./ancestry";
import { Request } from "./helpers";
import { GanacheLevelUp } from "../../database";
/**
* A leveldb-backed cache that enables associating immutable data as it existed
* at a specific height on a blockchain.
*
* The design affords faster db reads (one read to get known closest ancestors
* and descendants) and fast db writes (one write per node in a relationship).
*/
export declare class PersistentCache {
readonly version: Buffer;
protected db: GanacheLevelUp;
protected cacheDb: GanacheLevelUp;
protected ancestorDb: GanacheLevelUp;
protected ancestry: Ancestry;
protected hashBuffer: Buffer;
protected request: Request;
constructor();
static deleteDb(dbSuffix?: string): Promise;
/**
* Serializes the entire database world state into a JSON tree
*/
static serializeDb(dbSuffix?: string): Promise;
}>>;
static getDbDirectory(suffix?: string): string;
static create(dbSuffix?: string): Promise;
initialize(height: Quantity, hash: Data, request: Request): Promise;
/**
* `reBalancePromise` is used at shutdown to ensure we are done balancing the
* tree
*
*/
_reBalancePromise: Promise;
getBlock(height: Quantity): Promise;
reBalanceDescendantTree(height: Quantity, targetBlock: Tree, allKnownDescendants: Buffer[]): Promise;
get(method: string, params: any[], key: string): Promise;
put(method: string, params: any[], key: string, value: Buffer): Promise;
private status;
close(): Promise;
}
//# sourceMappingURL=persistent-cache.d.ts.map