import { EIP1193ProviderFunc, JsonRpcRequest, JsonRpcMiddlewareHandler } from "../types.js"; export interface CachedProviderOptions { defaultChainId?: number; blockCache?: boolean | string[]; } export declare class CachedProvider implements JsonRpcMiddlewareHandler { private cachableJsonRpcMethods; private cachableJsonRpcMethodsByBlock; private cache; private cacheByBlock; private cacheByBlockResetLock; private onUpdateCallback?; readonly defaultChainId?: number; constructor(options?: CachedProviderOptions); requestHandler: (next: EIP1193ProviderFunc) => (request: JsonRpcRequest) => Promise; cacheKey: (method: string, params: any[], chainId?: number) => string; getCache: () => { [key: string]: any; }; setCache: (cache: { [key: string]: any; }) => void; getCacheValue: (key: string) => any; setCacheValue: (key: string, value: any) => void; setCacheByBlockValue: (key: string, value: any) => void; shouldCacheResponse: (request: JsonRpcRequest, result?: any) => boolean; onUpdate(callback: (key?: string, value?: any) => void): void; clearCache: () => void; }