eth-rpc-cache
Version:
A simple cache for Ethereum RPC requests extensible with different caching strategies
14 lines (13 loc) • 349 B
TypeScript
type JsonRpcResult = {
jsonrpc: string;
id: number;
result: string;
};
export type JsonRpcCallFn = (method: string, params: unknown[]) => Promise<JsonRpcResult>;
export type Strategy = {
maxAge?: number;
methods: string[];
name: string;
resolver?: (method: string, params: unknown[]) => string | undefined;
};
export {};