import type { DB, ValueEncoding } from '@ethereumjs/util'; /** Options for {@link createBinaryTree} and {@link BinaryTree}. */ export interface BinaryTreeOpts { /** * A database instance. */ db: DB; /** * A `Uint8Array` for the root of a previously stored tree */ root?: Uint8Array; /** * Store the root inside the database after every `write` operation */ useRootPersistence: boolean; /** * LRU cache for tree nodes to allow for faster node retrieval. * * Default: 0 (deactivated) */ cacheSize: number; /** * Hash function used for hashing the tree nodes. */ hashFunction: (msg: Uint8Array) => Uint8Array; } export interface CheckpointDBOpts { /** * A database instance. */ db: DB; /** * ValueEncoding of the database (the values which are `put`/`get` in the db are of this type). Defaults to `string` */ valueEncoding?: ValueEncoding; /** * Cache size (default: 0) */ cacheSize?: number; } export type Checkpoint = { keyValueMap: Map; root: Uint8Array; }; /** Internal DB key used when `useRootPersistence` stores the tree root. */ export declare const ROOT_DB_KEY: Uint8Array; //# sourceMappingURL=types.d.ts.map