import type { HexString } from '@polkadot/util/types'; export interface BlockEntry { hash: HexString; number: number; header: HexString; parentHash: HexString | null; extrinsics: HexString[]; storageDiff: Record | null; } export interface KeyValueEntry { blockHash: string; key: string; value: string | null; } export declare class Database { constructor(location: string); close: () => Promise; saveBlock: (block: BlockEntry) => Promise; queryBlock: (hash: HexString) => Promise; queryBlockByNumber: (number: number) => Promise; queryHighestBlock: () => Promise; deleteBlock: (hash: HexString) => Promise; blocksCount: () => Promise; saveStorage: (blockHash: HexString, key: HexString, value: HexString | null) => Promise; saveStorageBatch?: (entries: KeyValueEntry[]) => Promise; queryStorage: (blockHash: HexString, key: HexString) => Promise; queryPagedKeys?: (blockHash: HexString, prefix: HexString) => Promise; savePagedKeys?: (blockHash: HexString, prefix: HexString, keys: HexString[]) => Promise; queryRpcCall?: (scope: string, method: string, params: string) => Promise; saveRpcCall?: (scope: string, method: string, params: string, result: string) => Promise; }