import type { EIP1193Parameters, Hex, HttpTransportConfig, PublicRpcSchema, RequiredBy } from "viem"; import type { ILogger } from "../sdk/index.js"; import type { RpcResponse } from "./types.js"; export type EthCallMethod = Extract; export type EthCallRequest = EIP1193Parameters<[EthCallMethod]>; export interface DetectedCall { request: EthCallRequest; response?: RpcResponse; responseHeaders?: Record; } export type CheckMulticallFn = (data: EthCallRequest) => boolean; /** * Helper to spy on eth_call requests and responses in viem transport */ export declare class EthCallSpy { #private; enabled: boolean; constructor(check: CheckMulticallFn, logger?: ILogger, enabled?: boolean); onFetchRequest: Required["onFetchRequest"]; onFetchResponse: Required["onFetchResponse"]; get detectedCalls(): TCall[]; get detectedBlock(): bigint; protected storeRequest(blockNumber: bigint, data: EthCallRequest): void; protected storeResponse(_call: RequiredBy): void | Promise; }