/** Autogenerated with "atma act ./actions/rpc.act.ts" */ import { DataLike } from '../utils/types'; import { TEth } from '../models/TEth'; import { RpcBase } from './RpcBase'; import { RpcSubscription, RpcLogFilterOptions } from './RpcSubscription'; export declare class Rpc extends RpcBase { /** * Subscribes to specific Ethereum events, returning a subscription ID used to receive notifications. * The eth_subscribe method allows clients to subscribe to specific events on the Ethereum network, such as new blocks, new pending transactions, or changes in the state of an account. When an event occurs, a notification is sent to the client with the corresponding data. To stop receiving notifications, the client can unsubscribe using the eth_unsubscribe method. * @param subscriptionType - The type of subscription to create. Must be one of:`newHeads`: new block headers - `logs`: logs matching a filter object - `newPendingTransactions`: new pending transactions - `syncing`: changes in syncing status * @param filterOptions - An optional object containing filter options specific to the subscription type. Only applicable for 'logs' subscription type. * @returns subscriptionId - A unique subscription ID that can be used to unsubscribe or identify incoming notifications. */ eth_subscribe(type: 'newHeads'): Promise>; eth_subscribe(type: 'logs', options: RpcLogFilterOptions): Promise>; eth_subscribe(type: 'newPendingTransactions'): Promise>; /** * Unsubscribes from a specific Ethereum event, using the subscription ID provided by eth_subscribe. * The eth_unsubscribe method allows clients to unsubscribe from specific events on the Ethereum network, to which they have previously subscribed using the eth_subscribe method. The client needs to provide the subscription ID obtained from eth_subscribe to stop receiving notifications for the corresponding event. * @param subscriptionId - The unique subscription ID obtained from the eth_subscribe method, used to identify the subscription to be unsubscribed. * @returns unsubscribed - A boolean value indicating whether the unsubscription was successful. */ eth_unsubscribe(subscriptionId: string): Promise; /** * Adds an Ethereum chain to the wallet. * Creates a confirmation asking the user to add the specified chain to the wallet application. The caller must specify a chain ID and some chain metadata. The wallet application may refuse or accept the request. `null` is returned if the chain is added, and an error otherwise. Introduced by [EIP 3085](https://eips.ethereum.org/EIPS/eip-3085). * @param addEthereumChainParameter - * @returns AddEthereumChainResult - */ wallet_addEthereumChain(addEthereumChainParameter?: DataLike): Promise; /** * Switches the wallet's active Ethereum chain. * Requests that the wallet switches its active Ethereum chain. Introduced by [EIP 3326](https://ethereum-magicians.org/t/eip-3326-wallet-switchethereumchain). * @param switchEthereumChainParameter - * @returns SwitchEthereumChainResult - */ wallet_switchEthereumChain(switchEthereumChainParameter?: { chainId: string; }): Promise; /** * Requests additional permissions. * Requests additional permissions from the user. Introduced by [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255). * @param requestPermissionsObject - * @returns PermissionsList - */ wallet_requestPermissions(requestPermissionsObject: { eth_accounts: { [key: string]: any; }; [key: string]: { [key: string]: any; }; }): Promise; /** * Gets the user's permissions. * Gets the user's permissions. Introduced by [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255). * @returns PermissionsList - */ wallet_getPermissions(): Promise; /** * Redirects the user back to the site after onboarding. * Registers the requesting site with MetaMask as the initiator of onboarding, enabling MetaMask to redirect the user back to the site after onboarding. Returns a promise that resolves to `true`, or rejects if there's an error. Instead of calling this method directly, you should use the [`@metamask/onboarding`](https://github.com/MetaMask/metamask-onboarding) library. * @returns RegisterOnboardingResult - `true` if the request was successful, `false` otherwise. */ wallet_registerOnboarding(): Promise; /** * Tracks a token in MetaMask. * Requests that the user track the specified token in MetaMask. Returns a boolean indicating if the token was successfully added. Once added, the token is indistinguishable from those added using legacy methods, such as a centralized registry. Introduced by [EIP-747](https://eips.ethereum.org/EIPS/eip-747). Currently support for ERC721 and ERC1155 tokens is limited to the extension (not on mobile) and is considered experimental. See [MIP-1](https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md) and [MIP proposal lifecycle](https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle) for more information. * @param type - Supports ERC-20, ERC-721, and ERC-1155 tokens. Currently support for ERC721 and ERC1155 tokens is limited to the extension (not on mobile) and is considered experimental. See [MIP-1](https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md) and [MIP proposal lifecycle](https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle) for more information. * @param options - * @returns WatchAssetResult - `true` if the token was added, `false` otherwise. */ wallet_watchAsset(type: 'ERC20' | 'ERC721' | 'ERC1155', options?: { address: string; symbol: string; decimals: number; image: string; tokenId: string; }): Promise; /** * Decrypts an encrypted message. * Requests that MetaMask decrypt the specified encrypted message. The message must have been encrypted using the public encryption key of the specified Ethereum address. Returns a promise that resolves to the decrypted message, or rejects if the decryption attempt fails. * @param encryptedMessage - The encrypted message to decrypt. * @param address - The address of the Ethereum account that can decrypt the message. * @returns PermissionsList - */ eth_decrypt(encryptedMessage: string, address: TEth.Address): Promise; /** * Gets a public key used for encryption. * Requests that the user share their public encryption key. Returns a public encryption key, or rejects if the user denies the request. The public key is computed from entropy associated with the specified user account, using the NaCl implementation of the `X25519_XSalsa20_Poly1305` algorithm. * @param address - The address of the Ethereum account that can decrypt the message. * @returns EncryptionKey - */ eth_getEncryptionPublicKey(address: TEth.Address): Promise; /** * Requests that the user provide an Ethereum address. * Requests that the user provide an Ethereum address to be identified by. This method is specified by [EIP-1102](https://eips.ethereum.org/EIPS/eip-1102). Internally, this method calls `wallet_requestPermissions` for permission to call `eth_accounts`. * @returns AddressList - */ eth_requestAccounts(): Promise; /** * Gets a list of addresses for the user's accounts. * Returns a list of addresses for the accounts owned by the user. * @returns AddressList - */ eth_accounts(): Promise; /** * Presents a structured data message for the user to sign. * Presents a data message for the user to sign in a structured and readable format and returns the signed response. Introduced By [EIP-712](https://eips.ethereum.org/EIPS/eip-712). * @param address - The address of the requested signing account. * @param typedData - * @returns Signature - */ eth_signTypedData_v4(address: TEth.Address, typedData: DataLike): Promise; /** * Presents a plain text signature challenge to the user. * Presents a plain text signature challenge to the user and returns the signed response. Equivalent to `eth_sign` on some other wallets, and prepends a safe prefix to the signed message to prevent the challenge tricking users into signing a financial transaction. This method requires that the user has granted permission to interact with their account first, so make sure to call `eth_requestAccounts` first. * @param challenge - A hex-encoded UTF-8 string to present to the user. See how to encode a string like this in the [`browser-string-hexer`](https://github.com/danfinlay/browser-string-hexer) module. * @param address - The address of the requested signing account. * @returns Signature - A hex-encoded 129-byte array starting with `0x`. */ personal_sign(challenge: string, address: TEth.Address): Promise; /** * Initiates a new transaction. * Creates a new wallet confirmation to make an ethereum transaction from the user's account. This method requires that the user has granted permission to interact with their account first, so make sure to call `eth_requestAccounts` or `wallet_requestPermissions` first. * @param transaction - The transaction object to sign and send. * @returns TransactionHash - The transaction hash of the sent transaction. */ eth_sendTransaction(transaction: { to: TEth.Address; from: TEth.Address; gas: bigint; value: bigint; data: TEth.Hex; gasPrice: bigint; maxPriorityFeePerGas: bigint; maxFeePerGas: bigint; }): Promise; /** * Returns the number of most recent block. * * @returns Block number - */ eth_blockNumber(): Promise; /** * Executes a new message call immediately without creating a transaction on the block chain. * * @param transaction - * @param block - * @returns Return data - */ eth_call(transaction: DataLike, block?: DataLike): Promise; /** * Returns the chain ID of the current network. * * @returns Chain ID - */ eth_chainId(): Promise; /** * Returns the client coinbase address. * * @returns Coinbase address - */ eth_coinbase(): Promise; /** * Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. * * @param transaction - * @param block - * @returns Gas used - */ eth_estimateGas(transaction: DataLike, block?: DataLike): Promise; /** * Transaction fee history * Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range. * @param blockCount - Requested range of blocks. Clients will return less than the requested range if not all blocks are available. * @param newestBlock - Highest block of the requested range. * @param rewardPercentiles - A monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the coresponding effective tip for the percentile will be determined, accounting for gas consumed. * @returns feeHistoryResult - Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available. */ eth_feeHistory(blockCount: bigint, newestBlock: DataLike, rewardPercentiles: number[]): Promise<{ oldestBlock: bigint; baseFeePerGas: bigint[]; gasUsedRatio: number[]; reward: bigint[][]; }>; /** * Returns the current price per gas in wei. * * @returns Gas price - */ eth_gasPrice(): Promise; /** * Returns the balance of the account of given address. * * @param address - * @param block - * @returns Balance - */ eth_getBalance(address: TEth.Address, block?: DataLike): Promise; /** * Returns information about a block by hash. * * @param blockHash - * @param hydratedTransactions - * @returns Block information - */ eth_getBlockByHash(blockHash: TEth.Hex, hydratedTransactions: boolean): Promise; /** * Returns information about a block by number. * * @param block - * @param hydratedTransactions - * @returns Block information - */ eth_getBlockByNumber(block: DataLike, hydratedTransactions: boolean): Promise; /** * Returns the number of transactions in a block from a block matching the given block hash. * * @param blockHash - * @returns Transaction count - */ eth_getBlockTransactionCountByHash(blockHash?: TEth.Hex): Promise; /** * Returns the number of transactions in a block matching the given block number. * * @param block - * @returns Transaction count - */ eth_getBlockTransactionCountByNumber(block?: DataLike): Promise; /** * Returns code at a given address. * * @param address - * @param block - * @returns Bytecode - */ eth_getCode(address: TEth.Address, block: DataLike): Promise; /** * Polling method for a filter, which returns an array of logs which occurred since last poll. * * @param filterIdentifier - * @returns Log objects - */ eth_getFilterChanges(filterIdentifier?: bigint): Promise; /** * Returns an array of all logs matching filter with given id. * * @param filterIdentifier - * @returns Log objects - */ eth_getFilterLogs(filterIdentifier?: bigint): Promise; /** * Returns an array of all logs matching filter with given id. * * @param filter - * @returns Log objects - */ eth_getLogs(filter?: DataLike): Promise; /** * Returns the merkle proof for a given account and optionally some storage keys. * * @param address - * @param storageKeys - * @param block - * @returns Account - */ eth_getProof(address: TEth.Address, storageKeys: TEth.Hex[], block: DataLike): Promise; /** * Returns the value from a storage position at a given address. * * @param address - * @param storageSlot - * @param block - * @returns Value - */ eth_getStorageAt(address: TEth.Address, storageSlot: bigint, block?: DataLike): Promise; /** * Returns information about a transaction by block hash and transaction index position. * * @param blockHash - * @param transactionIndex - * @returns Transaction information - */ eth_getTransactionByBlockHashAndIndex(blockHash: TEth.Hex, transactionIndex: bigint): Promise; /** * Returns information about a transaction by block number and transaction index position. * * @param block - * @param transactionIndex - * @returns Transaction information - */ eth_getTransactionByBlockNumberAndIndex(block: DataLike, transactionIndex: bigint): Promise; /** * Returns the information about a transaction requested by transaction hash. * * @param transactionHash - * @returns Transaction information - */ eth_getTransactionByHash(transactionHash: TEth.Hex): Promise; /** * Returns the number of transactions sent from an address. * * @param address - * @param block - * @returns Transaction count - */ eth_getTransactionCount(address: TEth.Address, block?: DataLike): Promise; /** * Returns the receipt of a transaction by transaction hash. * * @param transactionHash - * @returns Receipt information - */ eth_getTransactionReceipt(transactionHash: TEth.Hex): Promise; /** * Returns the number of uncles in a block from a block matching the given block hash. * * @param blockHash - * @returns Uncle count - */ eth_getUncleCountByBlockHash(blockHash?: TEth.Hex): Promise; /** * Returns the number of transactions in a block matching the given block number. * * @param block - * @returns Uncle count - */ eth_getUncleCountByBlockNumber(block?: DataLike): Promise; /** * Returns the current maxPriorityFeePerGas per gas in wei. * * @returns Max priority fee per gas - */ eth_maxPriorityFeePerGas(): Promise; /** * Creates a filter in the node, to notify when a new block arrives. * * @returns Filter Identifier - */ eth_newBlockFilter(): Promise; /** * Creates a filter object, based on filter options, to notify when the state changes (logs). * * @param filter - * @returns Filter Identifier - */ eth_newFilter(filter?: DataLike): Promise; /** * Creates a filter in the node, to notify when new pending transactions arrive. * * @returns Filter Identifier - */ eth_newPendingTransactionFilter(): Promise; /** * Submits a raw transaction. * * @param transaction - * @returns Transaction hash - */ eth_sendRawTransaction(transaction: TEth.Hex): Promise; /** * Returns an object with data about the sync status or false. * * @returns Syncing status - */ eth_syncing(): Promise; /** * Uninstalls a filter with given id. * * @param filterIdentifier - * @returns Success - */ eth_uninstallFilter(filterIdentifier?: bigint): Promise; /** * current client version * Returns the version of the current client * @returns clientVersion - client version */ web3_clientVersion(): Promise; /** * Hashes data * Hashes data using the Keccak-256 algorithm * @param data - data to hash using the Keccak-256 algorithm * @returns hashedData - Keccak-256 hash of the given data */ web3_sha3(data?: string): Promise; /** * returns listening status * Determines if this client is listening for new network connections. * @returns netListeningResult - `true` if listening is active or `false` if listening is not active */ net_listening(): Promise; /** * number of peers * Returns the number of peers currently connected to this client. * @returns quantity - number of connected peers. */ net_peerCount(): Promise; /** * Network identifier associated with network * Returns the network ID associated with the current network. * @returns networkId - Network ID associated with the current network */ net_version(): Promise; /** * Returns raw transaction data of a transaction with the given hash. * * @param transactionHash - Hex representation of a Keccak 256 hash * @returns rawTransactionByHash - The raw transaction data */ eth_getRawTransactionByHash(transactionHash?: string): Promise; /** * Returns raw transaction data of a transaction with the block hash and index of which it was mined. * * @param blockHash - The hex representation of the Keccak 256 of the RLP encoded block * @param index - The ordering in which a transaction is mined within its block. * @returns rawTransaction - The raw transaction data */ eth_getRawTransactionByBlockHashAndIndex(blockHash?: string, index?: bigint): Promise; /** * Returns raw transaction data of a transaction with the block number and index of which it was mined. * * @param blockNumber - * @param index - The ordering in which a transaction is mined within its block. * @returns rawTransaction - The raw transaction data */ eth_getRawTransactionByBlockNumberAndIndex(blockNumber?: bigint, index?: bigint): Promise; /** * Returns information about a uncle of a block by hash and uncle index position. * * @param blockHash - The hex representation of the Keccak 256 of the RLP encoded block * @param index - The ordering in which a uncle is included within its block. * @returns uncle - */ eth_getUncleByBlockHashAndIndex(blockHash?: string, index?: bigint): Promise; /** * Returns information about a uncle of a block by hash and uncle index position. * * @param uncleBlockNumber - The block in which the uncle was included * @param index - The ordering in which a uncle is included within its block. * @returns uncleResult - returns an uncle block or null */ eth_getUncleByBlockNumberAndIndex(uncleBlockNumber: bigint, index: bigint): Promise; /** * Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target'). * * @returns work - */ eth_getWork(): Promise; /** * Returns the number of hashes per second that the node is mining with. * * @returns hashesPerSecond - Integer of the number of hashes per second */ eth_hashrate(): Promise; /** * Returns true if client is actively mining new blocks. * * @returns mining - Whether or not the client is mining */ eth_mining(): Promise; /** * Returns the transactions that are pending in the transaction pool and have a from address that is one of the accounts this node manages. * * @returns pendingTransactions - */ eth_pendingTransactions(): Promise; /** * Returns the current ethereum protocol version. * * @returns protocolVersion - The current ethereum protocol version */ eth_protocolVersion(): Promise; /** * Used for submitting mining hashrate. * * @param hashRate - Hex representation of a 256 bit unit of data * @param id - String identifying the client * @returns submitHashRateSuccess - whether of not submitting went through successfully */ eth_submitHashrate(hashRate: string, id: string): Promise; /** * Used for submitting a proof-of-work solution. * * @param nonce - * @param powHash - Hex representation of a 256 bit unit of data * @param mixHash - Hex representation of a 256 bit unit of data * @returns solutionValid - returns true if the provided solution is valid, otherwise false. */ eth_submitWork(nonce?: bigint, powHash?: string, mixHash?: string): Promise; /** * Generates an access list for a transaction. * * @param transaction - * @param block - * @returns Gas used - */ eth_createAccessList(transaction: { type: string; nonce: string; to: string; from: string; gas: string; value: string; input: string; gasPrice: string; maxPriorityFeePerGas: string; maxFeePerGas: string; accessList: { address: string; storageKeys: string[]; }[]; chainId: string; }, block?: string | 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending'): Promise<{ accessList: { address: string; storageKeys: string[]; }[]; error: string; gasUsed: string; }>; /** * Returns an EIP-191 signature over the provided data. * * @param address - * @param message - * @returns Signature - */ eth_sign(address: string, message: string): Promise; /** * Returns an RLP encoded transaction signed by the specified account. * * @param transaction - * @returns Encoded transaction - */ eth_signTransaction(transaction: { type: string; nonce: string; to: string; from: string; gas: string; value: string; input: string; gasPrice: string; maxPriorityFeePerGas: string; maxFeePerGas: string; accessList: { address: string; storageKeys: string[]; }[]; chainId: string; }): Promise; /** * Returns an RLP-encoded header. * * @param block - * @returns Header RLP - */ debug_getRawHeader(block: string | 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending'): Promise; /** * Returns an RLP-encoded block. * * @param block - * @returns Block RLP - */ debug_getRawBlock(block: string | 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending'): Promise; /** * Returns an array of EIP-2718 binary-encoded transactions. * * @param transactionHash - * @returns EIP-2718 binary-encoded transaction - */ debug_getRawTransaction(transactionHash: string): Promise; /** * Returns an array of EIP-2718 binary-encoded receipts. * * @param block - * @returns Receipts - */ debug_getRawReceipts(block: string | 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending'): Promise; /** * Returns an array of recent bad blocks that the client has seen on the network. * * @returns Blocks - */ debug_getBadBlocks(): Promise<{ block: string; hash: string; rlp: string; }[]>; /** * Exchanges list of supported Engine API methods * * @param consensusClientMethods - * @returns Execution client methods - */ engine_exchangeCapabilities(consensusClientMethods: string[]): Promise; /** * Updates the forkchoice state * * @param forkchoiceState - * @param payloadAttributes - * @returns Response object - */ engine_forkchoiceUpdatedV1(forkchoiceState: { headBlockHash: string; safeBlockHash: string; finalizedBlockHash: string; }, payloadAttributes?: { timestamp: string; prevRandao: string; suggestedFeeRecipient: string; }): Promise<{ payloadStatus: { status: 'VALID' | 'INVALID' | 'SYNCING'; latestValidHash: string; validationError: string; }; payloadId: string; }>; /** * Updates the forkchoice state * * @param forkchoiceState - * @param payloadAttributes - * @returns Response object - */ engine_forkchoiceUpdatedV2(forkchoiceState: { headBlockHash: string; safeBlockHash: string; finalizedBlockHash: string; }, payloadAttributes?: { timestamp: string; prevRandao: string; suggestedFeeRecipient: string; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }): Promise<{ payloadStatus: { status: 'VALID' | 'INVALID' | 'SYNCING'; latestValidHash: string; validationError: string; }; payloadId: string; }>; /** * Runs execution payload validation * * @param executionPayload - * @returns Payload status - */ engine_newPayloadV1(executionPayload: { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; }): Promise<{ status: 'VALID' | 'INVALID' | 'SYNCING' | 'ACCEPTED' | 'INVALID_BLOCK_HASH'; latestValidHash: string; validationError: string; }>; /** * Runs execution payload validation * * @param executionPayload - * @returns Payload status - */ engine_newPayloadV2(executionPayload: { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; } | { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }): Promise<{ status: 'VALID' | 'INVALID' | 'SYNCING' | 'ACCEPTED'; latestValidHash: string; validationError: string; }>; /** * Obtains execution payload from payload build process * * @param payloadId - * @returns Execution payload - */ engine_getPayloadV1(payloadId: string): Promise<{ parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; }>; /** * Obtains execution payload from payload build process * * @param payloadId - * @returns Response object - */ engine_getPayloadV2(payloadId: string): Promise<{ executionPayload: { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; } | { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }; blockValue: string; }>; /** * Given block hashes returns bodies of the corresponding execution payloads * * @param arrayOfBlockHashes - * @returns Execution payload bodies - */ engine_getPayloadBodiesByHashV1(arrayOfBlockHashes: string[]): Promise<{ transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }[]>; /** * Given a range of block numbers returns bodies of the corresponding execution payloads * * @param startingBlockNumber - * @param numberOfBlocksToReturn - * @returns Execution payload bodies - */ engine_getPayloadBodiesByRangeV1(startingBlockNumber: string, numberOfBlocksToReturn: string): Promise<{ transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }[]>; /** * Exchanges transition configuration * * @param consensusClientConfiguration - * @returns Execution client configuration - */ engine_exchangeTransitionConfigurationV1(consensusClientConfiguration: { terminalTotalDifficulty: string; terminalBlockHash: string; terminalBlockNumber: string; }): Promise<{ terminalTotalDifficulty: string; terminalBlockHash: string; terminalBlockNumber: string; }>; /** * Submits the Bundle * * @param flashbotsBundleRequest - * @returns FlashbotsBundleResponse - */ eth_sendBundle(flashbotsBundleRequest: DataLike): Promise; /** * Simulates the Bundle * * @param flashbotsBundleRequest - * @returns FlashbotsBundleResult - */ eth_callBundle(flashbotsBundleRequest: DataLike): Promise; /** * Submits the Bundle in new format * * @param flashbotsMevBundleRequest - * @returns FlashbotsMevBundleResult - */ mev_sendBundle(flashbotsMevBundleRequest: DataLike): Promise; /** * Simulates the Bundle in new format * * @param flashbotsMevBundleRequest - * @returns FlashbotsMevBundleSimulationResponse - */ mev_simBundle(flashbotsMevBundleRequest: DataLike): Promise; /** * Prevents a submitted bundle from being included on-chain * * @param bundleToBeCanceled - * @returns bundleCancelationResult - */ eth_cancelBundle(bundleToBeCanceled: { [key: string]: any; }): Promise; /** * Send a single transaction to Flashbots * * @param flashbotsSingleBundleReq - * @returns flashbotsSingleBundleRes - */ eth_sendPrivateTransaction(flashbotsSingleBundleReq: DataLike): Promise; /** * Behaves like eth_sendPrivateTransaction but its format is similar to that of eth_sendRawTransaction * * @param flashbotsRawTransactionHex - * @param flashbotsRawTransactionPreferences - * @returns bundleHash - */ eth_sendPrivateRawTransaction(flashbotsRawTransactionHex: string[], flashbotsRawTransactionPreferences?: { hints: any[]; builders: any[]; }): Promise; /** * Stops private transactions from being submitted for future blocks * * @param txHashe - * @returns Tx result - */ eth_cancelPrivateTransaction(txHashe: TEth.Hex): Promise; /** * Returns a quick summary of how a searcher is performing in the Flashbots ecosystem * * @param userStatsRequest - String, a hex encoded recent block number, in order to prevent replay attacks. Must be within 20 blocks of the current chain tip * @returns UserStatsResponse - */ flashbots_getUserStats(userStatsRequest: string): Promise<{ is_high_priority: boolean; all_time_miner_payments: string; all_time_gas_simulated: string; last_7d_miner_payments: string; last_7d_gas_simulated: string; last_1d_miner_payments: string; last_1d_gas_simulated: string; }>; /** * Returns stats for a single bundle. * * @param bundleId - * @returns Bundle information - */ flashbots_getBundleStatsV2(bundleId: { bundleHash: TEth.Hex; blockNumber: TEth.Hex; }): Promise<{ isHighPriority: boolean; isSimulated: boolean; simulatedAt: string; receivedAt: string; consideredByBuildersAt: { pubkey: string; timestamp: string; }[]; sealedByBuildersAt: { pubkey: string; timestamp: string; }[]; }>; protected returnSchemas: { methods: { eth_subscribe: string; eth_unsubscribe: string; wallet_addEthereumChain: string; wallet_switchEthereumChain: string; wallet_requestPermissions: string[]; wallet_getPermissions: string[]; wallet_registerOnboarding: string; wallet_watchAsset: string; eth_decrypt: string[]; eth_getEncryptionPublicKey: string; eth_requestAccounts: string[]; eth_accounts: string[]; eth_signTypedData_v4: string; personal_sign: string; eth_sendTransaction: string; eth_blockNumber: string; eth_call: string; eth_chainId: string; eth_coinbase: string; eth_estimateGas: string; eth_feeHistory: { oldestBlock: string; baseFeePerGas: string[]; gasUsedRatio: string[]; reward: string[][]; }; eth_gasPrice: string; eth_getBalance: string; eth_getBlockByHash: string; eth_getBlockByNumber: string; eth_getBlockTransactionCountByHash: string; eth_getBlockTransactionCountByNumber: string; eth_getCode: string; eth_getFilterChanges: string; eth_getFilterLogs: string; eth_getLogs: string; eth_getProof: string; eth_getStorageAt: string; eth_getTransactionByBlockHashAndIndex: string; eth_getTransactionByBlockNumberAndIndex: string; eth_getTransactionByHash: string; eth_getTransactionCount: string; eth_getTransactionReceipt: string; eth_getUncleCountByBlockHash: string; eth_getUncleCountByBlockNumber: string; eth_maxPriorityFeePerGas: string; eth_newBlockFilter: string; eth_newFilter: string; eth_newPendingTransactionFilter: string; eth_sendRawTransaction: string; eth_syncing: string; eth_uninstallFilter: string; web3_clientVersion: string; web3_sha3: string; net_listening: string; net_peerCount: string; net_version: string; eth_getRawTransactionByHash: string; eth_getRawTransactionByBlockHashAndIndex: string; eth_getRawTransactionByBlockNumberAndIndex: string; eth_getUncleByBlockHashAndIndex: string; eth_getUncleByBlockNumberAndIndex: string; eth_hashrate: string; eth_mining: string; eth_pendingTransactions: string[]; eth_protocolVersion: string; eth_submitHashrate: string; eth_submitWork: string; eth_createAccessList: { accessList: { address: string; storageKeys: string[]; }[]; error: string; gasUsed: string; }; eth_sign: string; eth_signTransaction: string; debug_getRawHeader: string; debug_getRawBlock: string; debug_getRawTransaction: string; debug_getRawReceipts: string[]; debug_getBadBlocks: { block: string; hash: string; rlp: string; }[]; engine_exchangeCapabilities: string[]; engine_forkchoiceUpdatedV1: { payloadStatus: { status: string; latestValidHash: string; validationError: string; }; payloadId: string; }; engine_forkchoiceUpdatedV2: { payloadStatus: { status: string; latestValidHash: string; validationError: string; }; payloadId: string; }; engine_newPayloadV1: { status: string; latestValidHash: string; validationError: string; }; engine_newPayloadV2: { status: string; latestValidHash: string; validationError: string; }; engine_getPayloadV1: { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; }; engine_getPayloadV2: { executionPayload: { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }; blockValue: string; }; engine_getPayloadBodiesByHashV1: { transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }[]; engine_getPayloadBodiesByRangeV1: { transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }[]; engine_exchangeTransitionConfigurationV1: { terminalTotalDifficulty: string; terminalBlockHash: string; terminalBlockNumber: string; }; eth_sendBundle: string; eth_callBundle: string; mev_sendBundle: string; mev_simBundle: string; eth_cancelBundle: string; eth_sendPrivateTransaction: string; eth_sendPrivateRawTransaction: string; eth_cancelPrivateTransaction: string; flashbots_getUserStats: { is_high_priority: string; all_time_miner_payments: string; all_time_gas_simulated: string; last_7d_miner_payments: string; last_7d_gas_simulated: string; last_1d_miner_payments: string; last_1d_gas_simulated: string; }; flashbots_getBundleStatsV2: { isHighPriority: string; isSimulated: string; simulatedAt: string; receivedAt: string; consideredByBuildersAt: { pubkey: string; timestamp: string; }[]; sealedByBuildersAt: { pubkey: string; timestamp: string; }[]; }; }; schemas: { AddEthereumChainParameter: { chainId: string; blockExplorerUrls: string[]; chainName: string; iconUrls: string[]; nativeCurrency: string; rpcUrls: string[]; }; NativeCurrency: { decimals: string; name: string; symbol: string; }; Permission: { id: string; "@context": string[]; invoker: string; caveats: { type: string; name: string; }[]; }; TypedData: { types: {}; domain: {}; primaryType: string; message: {}; }; GenericTransaction: { type: string; nonce: string; to: string; from: string; gas: string; value: string; input: string; gasPrice: string; maxPriorityFeePerGas: string; maxFeePerGas: string; accessList: string[]; chainId: string; }; AccessListEntry: { address: string; storageKeys: string[]; }; BlockNumberOrTagOrHash: { oneOf: string[]; }; BlockNumberOrTag: { oneOf: string[]; }; Block: { hash: string; parentHash: string; sha3Uncles: string; miner: string; stateRoot: string; transactionsRoot: string; receiptsRoot: string; logsBloom: string; difficulty: string; number: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; mixHash: string; nonce: string; totalDifficulty: string; baseFeePerGas: string; withdrawalsRoot: string; size: string; transactions: { oneOf: string[][]; }; withdrawals: string[]; uncles: string[]; }; TransactionInfo: { allOf: (string | { blockHash: string; blockNumber: string; from: string; hash: string; transactionIndex: string; })[]; }; TransactionSigned: { oneOf: string[]; }; Transaction1559Signed: { allOf: (string | { yParity: string; v: string; r: string; s: string; })[]; }; Transaction1559Unsigned: { type: string; nonce: string; to: string; gas: string; value: string; input: string; maxPriorityFeePerGas: string; maxFeePerGas: string; gasPrice: string; accessList: string[]; chainId: string; }; Transaction2930Signed: { allOf: (string | { yParity: string; v: string; r: string; s: string; })[]; }; Transaction2930Unsigned: { type: string; nonce: string; to: string; gas: string; value: string; input: string; gasPrice: string; accessList: string[]; chainId: string; }; TransactionLegacySigned: { allOf: (string | { v: string; r: string; s: string; })[]; }; TransactionLegacyUnsigned: { type: string; nonce: string; to: string; gas: string; value: string; input: string; gasPrice: string; chainId: string; }; Withdrawal: { index: string; validatorIndex: string; address: string; amount: string; }; FilterResults: { oneOf: string[][]; }; Log: { removed: string; logIndex: string; transactionIndex: string; transactionHash: string; blockHash: string; blockNumber: string; address: string; data: string; topics: string[]; }; Filter: { fromBlock: string; toBlock: string; address: { oneOf: (string | string[])[]; }; topics: string[]; }; FilterTopic: { oneOf: (string | string[])[]; }; AccountProof: { address: string; accountProof: string[]; balance: string; codeHash: string; nonce: string; storageHash: string; storageProof: string[]; }; StorageProof: { key: string; value: string; proof: string[]; }; ReceiptInfo: { type: string; transactionHash: string; transactionIndex: string; blockHash: string; blockNumber: string; from: string; to: string; cumulativeGasUsed: string; gasUsed: string; contractAddress: string; logs: string[]; logsBloom: string; root: string; status: string; effectiveGasPrice: string; }; SyncingStatus: { oneOf: (string | { startingBlock: string; currentBlock: string; highestBlock: string; })[]; }; Transaction: { blockHash: string; blockNumber: string; from: string; gas: string; gasPrice: string; hash: string; input: string; nonce: string; to: string; transactionIndex: string; value: string; v: string; r: string; s: string; }; FlashbotsBundleRequest: { txs: string[]; blockNumber: string; minTimestamp: string; maxTimestamp: string; revertingTxHashes: string[]; replacementUuid: string; }; FlashbotsBundleResponse: { bundleHash: string; bundleGasPrice: string; coinbaseDiff: string; ethSentToCoinbase: string; gasFees: string; stateBlockNumber: string; totalGasUsed: string; }; FlashbotsMevBundleRequest: { version: string; inclusion: { block: string; maxBlock: string; }; body: { oneOf: (string | { hash: string; tx: string; canRevert: string; } | { tx: string; canRevert: string; hash?: undefined; })[]; }[]; validity: {}; privacy: {}; metadata: { originId: string; }; }; FlashbotsMevBundleResult: { bundleHash: string; }; FlashbotsMevBundleSimulationResponse: { success: string; stateBlock: string; mevGasPrice: string; profit: string; refundableValue: string; gasUsed: string; logs: {}[]; }; FlashbotsSingleBundleReq: { tx: string; maxBlockNumber: string; preferences: { fast: string; privacy: {}; validity: { refund: { address: string; percent: string; }[]; }; }; }; }; }; req: { eth_unsubscribe(subscriptionId: string): { method: string; params: any[]; }; wallet_addEthereumChain(addEthereumChainParameter?: DataLike): { method: string; params: any[]; }; wallet_switchEthereumChain(switchEthereumChainParameter?: { chainId: string; }): { method: string; params: any[]; }; wallet_requestPermissions(requestPermissionsObject: { eth_accounts: { [key: string]: any; }; [key: string]: { [key: string]: any; }; }): { method: string; params: any[]; }; wallet_getPermissions(): { method: string; params: any[]; }; wallet_registerOnboarding(): { method: string; params: any[]; }; wallet_watchAsset(type: "ERC20" | "ERC721" | "ERC1155", options?: { address: string; symbol: string; decimals: number; image: string; tokenId: string; }): { method: string; params: any[]; }; eth_decrypt(encryptedMessage: string, address: TEth.Address): { method: string; params: any[]; }; eth_getEncryptionPublicKey(address: TEth.Address): { method: string; params: any[]; }; eth_requestAccounts(): { method: string; params: any[]; }; eth_accounts(): { method: string; params: any[]; }; eth_signTypedData_v4(address: TEth.Address, typedData: DataLike): { method: string; params: any[]; }; personal_sign(challenge: string, address: TEth.Address): { method: string; params: any[]; }; eth_sendTransaction(transaction: { to: TEth.Address; from: TEth.Address; gas: bigint; value: bigint; data: TEth.Hex; gasPrice: bigint; maxPriorityFeePerGas: bigint; maxFeePerGas: bigint; }): { method: string; params: any[]; }; eth_blockNumber(): { method: string; params: any[]; }; eth_call(transaction: DataLike, block?: DataLike): { method: string; params: any[]; }; eth_chainId(): { method: string; params: any[]; }; eth_coinbase(): { method: string; params: any[]; }; eth_estimateGas(transaction: DataLike, block?: DataLike): { method: string; params: any[]; }; eth_feeHistory(blockCount: bigint, newestBlock: DataLike, rewardPercentiles: number[]): { method: string; params: any[]; }; eth_gasPrice(): { method: string; params: any[]; }; eth_getBalance(address: TEth.Address, block?: DataLike): { method: string; params: any[]; }; eth_getBlockByHash(blockHash: TEth.Hex, hydratedTransactions: boolean): { method: string; params: any[]; }; eth_getBlockByNumber(block: DataLike, hydratedTransactions: boolean): { method: string; params: any[]; }; eth_getBlockTransactionCountByHash(blockHash?: TEth.Hex): { method: string; params: any[]; }; eth_getBlockTransactionCountByNumber(block?: DataLike): { method: string; params: any[]; }; eth_getCode(address: TEth.Address, block: DataLike): { method: string; params: any[]; }; eth_getFilterChanges(filterIdentifier?: bigint): { method: string; params: any[]; }; eth_getFilterLogs(filterIdentifier?: bigint): { method: string; params: any[]; }; eth_getLogs(filter?: DataLike): { method: string; params: any[]; }; eth_getProof(address: TEth.Address, storageKeys: TEth.Hex[], block: DataLike): { method: string; params: any[]; }; eth_getStorageAt(address: TEth.Address, storageSlot: bigint, block?: DataLike): { method: string; params: any[]; }; eth_getTransactionByBlockHashAndIndex(blockHash: TEth.Hex, transactionIndex: bigint): { method: string; params: any[]; }; eth_getTransactionByBlockNumberAndIndex(block: DataLike, transactionIndex: bigint): { method: string; params: any[]; }; eth_getTransactionByHash(transactionHash: TEth.Hex): { method: string; params: any[]; }; eth_getTransactionCount(address: TEth.Address, block?: DataLike): { method: string; params: any[]; }; eth_getTransactionReceipt(transactionHash: TEth.Hex): { method: string; params: any[]; }; eth_getUncleCountByBlockHash(blockHash?: TEth.Hex): { method: string; params: any[]; }; eth_getUncleCountByBlockNumber(block?: DataLike): { method: string; params: any[]; }; eth_maxPriorityFeePerGas(): { method: string; params: any[]; }; eth_newBlockFilter(): { method: string; params: any[]; }; eth_newFilter(filter?: DataLike): { method: string; params: any[]; }; eth_newPendingTransactionFilter(): { method: string; params: any[]; }; eth_sendRawTransaction(transaction: TEth.Hex): { method: string; params: any[]; }; eth_syncing(): { method: string; params: any[]; }; eth_uninstallFilter(filterIdentifier?: bigint): { method: string; params: any[]; }; web3_clientVersion(): { method: string; params: any[]; }; web3_sha3(data?: string): { method: string; params: any[]; }; net_listening(): { method: string; params: any[]; }; net_peerCount(): { method: string; params: any[]; }; net_version(): { method: string; params: any[]; }; eth_getRawTransactionByHash(transactionHash?: string): { method: string; params: any[]; }; eth_getRawTransactionByBlockHashAndIndex(blockHash?: string, index?: bigint): { method: string; params: any[]; }; eth_getRawTransactionByBlockNumberAndIndex(blockNumber?: bigint, index?: bigint): { method: string; params: any[]; }; eth_getUncleByBlockHashAndIndex(blockHash?: string, index?: bigint): { method: string; params: any[]; }; eth_getUncleByBlockNumberAndIndex(uncleBlockNumber: bigint, index: bigint): { method: string; params: any[]; }; eth_getWork(): { method: string; params: any[]; }; eth_hashrate(): { method: string; params: any[]; }; eth_mining(): { method: string; params: any[]; }; eth_pendingTransactions(): { method: string; params: any[]; }; eth_protocolVersion(): { method: string; params: any[]; }; eth_submitHashrate(hashRate: string, id: string): { method: string; params: any[]; }; eth_submitWork(nonce?: bigint, powHash?: string, mixHash?: string): { method: string; params: any[]; }; eth_createAccessList(transaction: { type: string; nonce: string; to: string; from: string; gas: string; value: string; input: string; gasPrice: string; maxPriorityFeePerGas: string; maxFeePerGas: string; accessList: { address: string; storageKeys: string[]; }[]; chainId: string; }, block?: string | "earliest" | "finalized" | "safe" | "latest" | "pending"): { method: string; params: any[]; }; eth_sign(address: string, message: string): { method: string; params: any[]; }; eth_signTransaction(transaction: { type: string; nonce: string; to: string; from: string; gas: string; value: string; input: string; gasPrice: string; maxPriorityFeePerGas: string; maxFeePerGas: string; accessList: { address: string; storageKeys: string[]; }[]; chainId: string; }): { method: string; params: any[]; }; debug_getRawHeader(block: string | "earliest" | "finalized" | "safe" | "latest" | "pending"): { method: string; params: any[]; }; debug_getRawBlock(block: string | "earliest" | "finalized" | "safe" | "latest" | "pending"): { method: string; params: any[]; }; debug_getRawTransaction(transactionHash: string): { method: string; params: any[]; }; debug_getRawReceipts(block: string | "earliest" | "finalized" | "safe" | "latest" | "pending"): { method: string; params: any[]; }; debug_getBadBlocks(): { method: string; params: any[]; }; engine_exchangeCapabilities(consensusClientMethods: string[]): { method: string; params: any[]; }; engine_forkchoiceUpdatedV1(forkchoiceState: { headBlockHash: string; safeBlockHash: string; finalizedBlockHash: string; }, payloadAttributes?: { timestamp: string; prevRandao: string; suggestedFeeRecipient: string; }): { method: string; params: any[]; }; engine_forkchoiceUpdatedV2(forkchoiceState: { headBlockHash: string; safeBlockHash: string; finalizedBlockHash: string; }, payloadAttributes?: { timestamp: string; prevRandao: string; suggestedFeeRecipient: string; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }): { method: string; params: any[]; }; engine_newPayloadV1(executionPayload: { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; }): { method: string; params: any[]; }; engine_newPayloadV2(executionPayload: { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; } | { parentHash: string; feeRecipient: string; stateRoot: string; receiptsRoot: string; logsBloom: string; prevRandao: string; blockNumber: string; gasLimit: string; gasUsed: string; timestamp: string; extraData: string; baseFeePerGas: string; blockHash: string; transactions: string[]; withdrawals: { index: string; validatorIndex: string; address: string; amount: string; }[]; }): { method: string; params: any[]; }; engine_getPayloadV1(payloadId: string): { method: string; params: any[]; }; engine_getPayloadV2(payloadId: string): { method: string; params: any[]; }; engine_getPayloadBodiesByHashV1(arrayOfBlockHashes: string[]): { method: string; params: any[]; }; engine_getPayloadBodiesByRangeV1(startingBlockNumber: string, numberOfBlocksToReturn: string): { method: string; params: any[]; }; engine_exchangeTransitionConfigurationV1(consensusClientConfiguration: { terminalTotalDifficulty: string; terminalBlockHash: string; terminalBlockNumber: string; }): { method: string; params: any[]; }; eth_sendBundle(flashbotsBundleRequest: DataLike): { method: string; params: any[]; }; eth_callBundle(flashbotsBundleRequest: DataLike): { method: string; params: any[]; }; mev_sendBundle(flashbotsMevBundleRequest: DataLike): { method: string; params: any[]; }; mev_simBundle(flashbotsMevBundleRequest: DataLike): { method: string; params: any[]; }; eth_cancelBundle(bundleToBeCanceled: { [key: string]: any; }): { method: string; params: any[]; }; eth_sendPrivateTransaction(flashbotsSingleBundleReq: DataLike): { method: string; params: any[]; }; eth_sendPrivateRawTransaction(flashbotsRawTransactionHex: string[], flashbotsRawTransactionPreferences?: { hints: any[]; builders: any[]; }): { method: string; params: any[]; }; eth_cancelPrivateTransaction(txHashe: TEth.Hex): { method: string; params: any[]; }; flashbots_getUserStats(userStatsRequest: string): { method: string; params: any[]; }; flashbots_getBundleStatsV2(bundleId: { bundleHash: TEth.Hex; blockNumber: TEth.Hex; }): { method: string; params: any[]; }; }; } export declare namespace RpcTypes { /** TypedData */ type TypedData = { types: { EIP712Domain: any[]; [key: string]: { name: string; type: string; }[]; }; domain: { [key: string]: any; }; primaryType: string; message: { [key: string]: any; }; }; /** AddEthereumChainParameter */ type AddEthereumChainParameter = { chainId: string; blockExplorerUrls: string[]; chainName: string; iconUrls: string[]; nativeCurrency: RpcTypes.NativeCurrency; rpcUrls: string[]; }; /** NativeCurrency */ type NativeCurrency = { decimals: bigint; name: string; symbol: string; }; /** Permission */ type Permission = { id: string; '@context': string[]; invoker: string; caveats: { type: string; value: any; name: string; }[]; }; /** Block object */ type Block = { hash: TEth.Hex; parentHash: TEth.Hex; sha3Uncles: TEth.Hex; miner: TEth.Address; stateRoot: TEth.Hex; transactionsRoot: TEth.Hex; receiptsRoot: TEth.Hex; logsBloom: TEth.Hex; difficulty: bigint; number: number; gasLimit: bigint; gasUsed: bigint; timestamp: number; extraData: TEth.Hex; mixHash: TEth.Hex; nonce: TEth.Hex; totalDifficulty: bigint; baseFeePerGas: bigint; withdrawalsRoot: TEth.Hex; size: bigint; transactions: TEth.Hex[] | RpcTypes.TransactionInfo[]; withdrawals: RpcTypes.Withdrawal[]; uncles: TEth.Hex[]; }; /** Block number or tag */ type BlockNumberOrTag = bigint | 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending'; /** Block number, tag, or block hash */ type BlockNumberOrTagOrHash = bigint | 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending' | TEth.Hex; /** Syncing status */ type SyncingStatus = { startingBlock: bigint; currentBlock: bigint; highestBlock: bigint; } | boolean; /** Filter results */ type FilterResults = TEth.Hex[] | RpcTypes.Log[]; /** filter */ type Filter = { fromBlock: number; toBlock: number; address: TEth.Address | TEth.Address[]; topics: RpcTypes.FilterTopic[]; }; /** Filter Topic List Entry */ type FilterTopic = TEth.Hex | TEth.Hex[]; /** log */ type Log = { removed: boolean; logIndex: number; transactionIndex: number; transactionHash: TEth.Hex; blockHash: TEth.Hex; blockNumber: number; address: TEth.Address; data: TEth.Hex; topics: TEth.Hex[]; }; /** Receipt information */ type ReceiptInfo = { type: number; transactionHash: TEth.Hex; transactionIndex: bigint; blockHash: TEth.Hex; blockNumber: number; from: TEth.Address; to: TEth.Address; cumulativeGasUsed: bigint; gasUsed: bigint; contractAddress: TEth.Address; logs: RpcTypes.Log[]; logsBloom: TEth.Hex; root: TEth.Hex; status: number; effectiveGasPrice: bigint; }; /** Account proof */ type AccountProof = { address: TEth.Address; accountProof: TEth.Hex[]; balance: bigint; codeHash: TEth.Hex; nonce: bigint; storageHash: TEth.Hex; storageProof: RpcTypes.StorageProof[]; }; /** Storage proof */ type StorageProof = { key: TEth.Hex; value: bigint; proof: TEth.Hex[]; }; /** Access list entry */ type AccessListEntry = { address: TEth.Address; storageKeys: TEth.Hex[]; }; /** EIP-1559 transaction. */ type Transaction1559Unsigned = { type: number; nonce: number; to: TEth.Address; gas: bigint; value: bigint; input: TEth.Hex; maxPriorityFeePerGas: bigint; maxFeePerGas: bigint; gasPrice: bigint; accessList: RpcTypes.AccessListEntry[]; chainId: number; }; /** EIP-2930 transaction. */ type Transaction2930Unsigned = { type: number; nonce: number; to: TEth.Address; gas: bigint; value: bigint; input: TEth.Hex; gasPrice: bigint; accessList: RpcTypes.AccessListEntry[]; chainId: number; }; /** Legacy transaction. */ type TransactionLegacyUnsigned = { type: number; nonce: number; to: TEth.Address; gas: bigint; value: bigint; input: TEth.Hex; gasPrice: bigint; chainId: number; }; /** Signed 1559 Transaction */ type Transaction1559Signed = RpcTypes.Transaction1559Unsigned & { yParity: number; v: number; r: TEth.Hex; s: TEth.Hex; }; /** Signed 2930 Transaction */ type Transaction2930Signed = RpcTypes.Transaction2930Unsigned & { yParity: number; v: number; r: TEth.Hex; s: TEth.Hex; }; /** Signed Legacy Transaction */ type TransactionLegacySigned = RpcTypes.TransactionLegacyUnsigned & { v: number; r: TEth.Hex; s: TEth.Hex; }; type TransactionSigned = RpcTypes.Transaction1559Signed | RpcTypes.Transaction2930Signed | RpcTypes.TransactionLegacySigned; /** Transaction information */ type TransactionInfo = { blockHash: TEth.Hex; blockNumber: number; from: TEth.Address; hash: TEth.Hex; transactionIndex: number; } & RpcTypes.TransactionSigned; /** Transaction object generic to all types */ type GenericTransaction = { type: number; nonce: bigint; to: TEth.Address; from: TEth.Address; gas: bigint; value: bigint; input: TEth.Hex; gasPrice: bigint; maxPriorityFeePerGas: bigint; maxFeePerGas: bigint; accessList: RpcTypes.AccessListEntry[]; chainId: bigint; }; /** Validator withdrawal */ type Withdrawal = { index: bigint; validatorIndex: bigint; address: TEth.Address; amount: bigint; }; /** transaction */ type Transaction = { blockHash: undefined; blockNumber: undefined; from: string; gas: string; gasPrice: string; hash: string; input: string; nonce: bigint; to: string; transactionIndex: bigint; value: string; v: number; r: TEth.Hex; s: TEth.Hex; }; /** Bundle Input v0 */ type FlashbotsBundleRequest = { txs: TEth.Hex[]; blockNumber: TEth.Hex; minTimestamp: number; maxTimestamp: number; revertingTxHashes: TEth.Hex[]; replacementUuid: string; }; /** Bundle Input v0 */ type FlashbotsBundleResponse = { bundleHash: TEth.Hex; bundleGasPrice: bigint; coinbaseDiff: bigint; ethSentToCoinbase: bigint; gasFees: bigint; stateBlockNumber: number; totalGasUsed: number; results: any[]; }; /** A new bundle format to send bundles to MEV-Share. */ type FlashbotsMevBundleRequest = { version: string; inclusion: { block: TEth.Hex; maxBlock: TEth.Hex; }; body: ({ hash: TEth.Hex; } | { tx: TEth.Hex; canRevert: boolean; } | RpcTypes.FlashbotsMevBundleRequest)[]; validity: { refund: any[]; refundConfig: any[]; }; privacy: { hints: any[]; builders: any[]; }; metadata: { originId: string; }; }; type FlashbotsMevBundleResult = { bundleHash: TEth.Hex; }; type FlashbotsMevBundleSimulationResponse = { success: boolean; stateBlock: string; mevGasPrice: string; profit: string; refundableValue: string; gasUsed: string; logs: { [key: string]: any; }[]; }; type FlashbotsSingleBundleReq = { tx: string; maxBlockNumber: string; preferences: { fast: boolean; privacy: { hints: any[]; builders: any[]; }; validity: { refund: { address: TEth.Address; percent: number; }[]; }; }; }; }