export type JsonRpcId = number | string; export type JsonRpcVersion = string & ("2.0" | "1.0"); export interface JsonRpcRequestPayload { readonly jsonrpc: JsonRpcVersion; readonly id: JsonRpcId; readonly method: string; readonly params: T; readonly requestOptions?: unknown; } export interface JsonRpcNotificationPayload { readonly jsonrpc: JsonRpcVersion; readonly method: string; readonly params: T; readonly requestOptions?: unknown; } export type JsonRpcRequest = JsonRpcRequestPayload | JsonRpcNotificationPayload; export type JsonRpcBatchRequest = JsonRpcRequest[]; export type JsonRpcRequestOrBatch = JsonRpcRequest | JsonRpcBatchRequest; export interface JsonRpcResponseWithResultPayload { readonly id?: JsonRpcId; jsonrpc: JsonRpcVersion; result: T; error?: never; } export interface JsonRpcErrorPayload { readonly code?: number; readonly data?: T; readonly message: string; } export interface JsonRpcResponseWithErrorPayload { readonly id?: JsonRpcId; jsonrpc: JsonRpcVersion; result?: never; error: JsonRpcErrorPayload; } export type JsonRpcResponse = JsonRpcResponseWithResultPayload | JsonRpcResponseWithErrorPayload; export type JsonRpcBatchResponse = JsonRpcResponse[]; export type JsonRpcResponseOrBatch = JsonRpcResponse | JsonRpcBatchResponse; export type HexString = string; export type ELBlockNumberOrTag = number | string | "latest" | "earliest" | "pending"; export interface ELProof { readonly address: string; readonly balance: string; readonly codeHash: string; readonly nonce: string; readonly storageHash: string; readonly accountProof: string[]; readonly storageProof: { readonly key: string; readonly value: string; readonly proof: string[]; }[]; } export interface ELTransaction { readonly type: string; readonly nonce: string; readonly to: string | null; readonly chainId?: string; readonly input: string; readonly value: string; readonly gasPrice?: string; readonly gas: string; readonly maxFeePerGas?: string; readonly maxPriorityFeePerGas?: string; readonly blockHash: string; readonly blockNumber: string; readonly from: string; readonly hash: string; readonly r: string; readonly s: string; readonly v: string; readonly transactionIndex: string; readonly accessList?: { address: string; storageKeys: string[]; }[]; readonly data?: string; } export interface ELWithdrawal { readonly index: string; readonly validatorIndex: string; readonly address: string; readonly amount: string; } export interface ELBlock { readonly parentHash: string; readonly stateRoot: string; readonly receiptsRoot: string; readonly logsBloom: string; readonly nonce: string; readonly difficulty: string; readonly totalDifficulty: string; readonly number: string; readonly gasLimit: string; readonly gasUsed: string; readonly timestamp: string; readonly extraData?: Buffer | string; readonly mixHash: string; readonly hash: string; readonly baseFeePerGas: string; readonly miner: string; readonly sha3Uncles: string; readonly size: string; readonly uncles: ELBlock[]; readonly transactions: ELTransaction[]; readonly transactionsRoot: string; readonly withdrawals?: ELWithdrawal[]; readonly withdrawalsRoot?: string; } export interface ELAccessList { readonly address: HexString; readonly storageKeys: HexString[]; } export interface ELAccessListResponse { readonly error: string; readonly gasUsed: HexString; readonly accessList: ELAccessList[]; } export type ELStorageProof = Pick; export type ELApi = { eth_getBalance: (address: string, block?: number | string) => string; eth_createAccessList: (transaction: ELTransaction, block?: ELBlockNumberOrTag) => ELAccessListResponse; eth_call: (transaction: ELTransaction, block?: ELBlockNumberOrTag) => HexString; eth_estimateGas: (transaction: ELTransaction, block?: ELBlockNumberOrTag) => HexString; eth_getCode: (address: string, block?: ELBlockNumberOrTag) => HexString; eth_getProof: (address: string, storageKeys: string[], block?: ELBlockNumberOrTag) => ELProof; eth_getBlockByNumber: (block: ELBlockNumberOrTag, hydrated?: boolean) => ELBlock | undefined; eth_getBlockByHash: (block: string, hydrated?: boolean) => ELBlock | undefined; }; export type ELApiParams = { [K in keyof ELApi]: Parameters; }; export type ELApiReturn = { [K in keyof ELApi]: ReturnType; }; //# sourceMappingURL=types.d.ts.map