JsonRpcSchemaPublic
JsonRpcSchemaPublic:
object
Type declaration
eth_blobGasPrice
eth_blobGasPrice:
object
Description
Returns the current blob price of gas expressed in wei
Example
provider.request({ method: 'eth_blobGasPrice' })// => '0x09184e72a000'
eth_blobGasPrice.Method
eth_blobGasPrice.Method:
"eth_blobGasPrice"
eth_blobGasPrice.Parameters?
optional
eth_blobGasPrice.Parameters:undefined
eth_blobGasPrice.ReturnType
eth_blobGasPrice.ReturnType:
Quantity
eth_blockNumber
eth_blockNumber:
object
Description
Returns the number of the most recent block seen by this client
Example
provider.request({ method: 'eth_blockNumber' })// => '0x1b4'
eth_blockNumber.Method
eth_blockNumber.Method:
"eth_blockNumber"
eth_blockNumber.Parameters?
optional
eth_blockNumber.Parameters:undefined
eth_blockNumber.ReturnType
eth_blockNumber.ReturnType:
Quantity
eth_call
eth_call:
object
Description
Executes a new message call immediately without submitting a transaction to the network
Example
provider.request({ method: 'eth_call', params: [{ to: '0x...', data: '0x...' }] })// => '0x...'
eth_call.Method
eth_call.Method:
"eth_call"
eth_call.Parameters
eth_call.Parameters: [
Partial
<TransactionRequest
>] | [Partial
<TransactionRequest
>,BlockNumber
|BlockTag
|BlockIdentifier
] | [Partial
<TransactionRequest
>,BlockNumber
|BlockTag
|BlockIdentifier
,RpcStateOverride
]
eth_call.ReturnType
eth_call.ReturnType:
Hex
eth_chainId
eth_chainId:
object
Description
Returns the chain ID associated with the current network
Example
provider.request({ method: 'eth_chainId' })// => '1'
eth_chainId.Method
eth_chainId.Method:
"eth_chainId"
eth_chainId.Parameters?
optional
eth_chainId.Parameters:undefined
eth_chainId.ReturnType
eth_chainId.ReturnType:
Quantity
eth_coinbase
eth_coinbase:
object
Description
Returns the client coinbase address.
Example
provider.request({ method: 'eth_coinbase' })// => '0x...'
eth_coinbase.Method
eth_coinbase.Method:
"eth_coinbase"
eth_coinbase.Parameters?
optional
eth_coinbase.Parameters:undefined
eth_coinbase.ReturnType
eth_coinbase.ReturnType:
Address
eth_estimateGas
eth_estimateGas:
object
Description
Estimates the gas necessary to complete a transaction without submitting it to the network
Example
provider.request({ method: 'eth_estimateGas', params: [{ from: '0x...', to: '0x...', value: '0x...' }]})// => '0x5208'
eth_estimateGas.Method
eth_estimateGas.Method:
"eth_estimateGas"
eth_estimateGas.Parameters
eth_estimateGas.Parameters: [
TransactionRequest
] | [TransactionRequest
,BlockNumber
|BlockTag
]
eth_estimateGas.ReturnType
eth_estimateGas.ReturnType:
Quantity
eth_feeHistory
eth_feeHistory:
object
Description
Returns a collection of historical gas information
Example
provider.request({ method: 'eth_feeHistory', params: ['4', 'latest', ['25', '75']]})// => {// oldestBlock: '0x1',// baseFeePerGas: ['0x1', '0x2', '0x3', '0x4'],// gasUsedRatio: ['0x1', '0x2', '0x3', '0x4'],// reward: [['0x1', '0x2'], ['0x3', '0x4'], ['0x5', '0x6'], ['0x7', '0x8']]// }
eth_feeHistory.Method
eth_feeHistory.Method:
"eth_feeHistory"
eth_feeHistory.Parameters
eth_feeHistory.Parameters: [
Quantity
,BlockNumber
|BlockTag
,number
[] |undefined
]
eth_feeHistory.ReturnType
eth_feeHistory.ReturnType:
FeeHistory
eth_gasPrice
eth_gasPrice:
object
Description
Returns the current price of gas expressed in wei
Example
provider.request({ method: 'eth_gasPrice' })// => '0x09184e72a000'
eth_gasPrice.Method
eth_gasPrice.Method:
"eth_gasPrice"
eth_gasPrice.Parameters?
optional
eth_gasPrice.Parameters:undefined
eth_gasPrice.ReturnType
eth_gasPrice.ReturnType:
Quantity
eth_getBalance
eth_getBalance:
object
Description
Returns the balance of an address in wei
Example
provider.request({ method: 'eth_getBalance', params: ['0x...', 'latest'] })// => '0x12a05...'
eth_getBalance.Method
eth_getBalance.Method:
"eth_getBalance"
eth_getBalance.Parameters
eth_getBalance.Parameters: [
Address
,BlockNumber
|BlockTag
|BlockIdentifier
]
eth_getBalance.ReturnType
eth_getBalance.ReturnType:
Quantity
eth_getBlockByHash
eth_getBlockByHash:
object
Description
Returns information about a block specified by hash
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getBlockByHash', params: ['0x...', true] })// => {// number: '0x1b4',// hash: '0x...',// parentHash: '0x...',// ...// }
eth_getBlockByHash.Method
eth_getBlockByHash.Method:
"eth_getBlockByHash"
eth_getBlockByHash.Parameters
eth_getBlockByHash.Parameters: [
Hash
,boolean
]
eth_getBlockByHash.ReturnType
eth_getBlockByHash.ReturnType:
Block
|null
eth_getBlockByNumber
eth_getBlockByNumber:
object
Description
Returns information about a block specified by number
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getBlockByNumber', params: ['0x1b4', true] })// => {// number: '0x1b4',// hash: '0x...',// parentHash: '0x...',// ...// }
eth_getBlockByNumber.Method
eth_getBlockByNumber.Method:
"eth_getBlockByNumber"
eth_getBlockByNumber.Parameters
eth_getBlockByNumber.Parameters: [
BlockNumber
|BlockTag
,boolean
]
eth_getBlockByNumber.ReturnType
eth_getBlockByNumber.ReturnType:
Block
|null
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByHash:
object
Description
Returns the number of transactions in a block specified by block hash
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getBlockTransactionCountByHash', params: ['0x...'] })// => '0x1'
eth_getBlockTransactionCountByHash.Method
eth_getBlockTransactionCountByHash.Method:
"eth_getBlockTransactionCountByHash"
eth_getBlockTransactionCountByHash.Parameters
eth_getBlockTransactionCountByHash.Parameters: [
Hash
]
eth_getBlockTransactionCountByHash.ReturnType
eth_getBlockTransactionCountByHash.ReturnType:
Quantity
eth_getBlockTransactionCountByNumber
eth_getBlockTransactionCountByNumber:
object
Description
Returns the number of transactions in a block specified by block number
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getBlockTransactionCountByNumber', params: ['0x1b4'] })// => '0x1'
eth_getBlockTransactionCountByNumber.Method
eth_getBlockTransactionCountByNumber.Method:
"eth_getBlockTransactionCountByNumber"
eth_getBlockTransactionCountByNumber.Parameters
eth_getBlockTransactionCountByNumber.Parameters: [
BlockNumber
|BlockTag
]
eth_getBlockTransactionCountByNumber.ReturnType
eth_getBlockTransactionCountByNumber.ReturnType:
Quantity
eth_getCode
eth_getCode:
object
Description
Returns the contract code stored at a given address
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getCode', params: ['0x...', 'latest'] })// => '0x...'
eth_getCode.Method
eth_getCode.Method:
"eth_getCode"
eth_getCode.Parameters
eth_getCode.Parameters: [
Address
,BlockNumber
|BlockTag
|BlockIdentifier
]
eth_getCode.ReturnType
eth_getCode.ReturnType:
Hex
eth_getFilterChanges
eth_getFilterChanges:
object
Description
Returns a list of all logs based on filter ID since the last log retrieval
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getFilterChanges', params: ['0x...'] })// => [{ ... }, { ... }]
eth_getFilterChanges.Method
eth_getFilterChanges.Method:
"eth_getFilterChanges"
eth_getFilterChanges.Parameters
eth_getFilterChanges.Parameters: [
Quantity
]
eth_getFilterChanges.ReturnType
eth_getFilterChanges.ReturnType:
Log
[] |Hex
[]
eth_getFilterLogs
eth_getFilterLogs:
object
Description
Returns a list of all logs based on filter ID
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getFilterLogs', params: ['0x...'] })// => [{ ... }, { ... }]
eth_getFilterLogs.Method
eth_getFilterLogs.Method:
"eth_getFilterLogs"
eth_getFilterLogs.Parameters
eth_getFilterLogs.Parameters: [
Quantity
]
eth_getFilterLogs.ReturnType
eth_getFilterLogs.ReturnType:
Log
[]
eth_getLogs
eth_getLogs:
object
Description
Returns a list of all logs based on a filter object
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getLogs', params: [{ fromBlock: '0x...', toBlock: '0x...', address: '0x...', topics: ['0x...'] }] })// => [{ ... }, { ... }]
eth_getLogs.Method
eth_getLogs.Method:
"eth_getLogs"
eth_getLogs.Parameters
eth_getLogs.Parameters: [
object
&object
|object
]
eth_getLogs.ReturnType
eth_getLogs.ReturnType:
Log
[]
eth_getProof
eth_getProof:
object
Description
Returns the account and storage values of the specified account including the Merkle-proof.
Link
https://eips.ethereum.org/EIPS/eip-1186
Example
provider.request({ method: 'eth_getProof', params: ['0x...', ['0x...'], 'latest'] })// => {// ...// }
eth_getProof.Method
eth_getProof.Method:
"eth_getProof"
eth_getProof.Parameters
eth_getProof.Parameters: [
Address
,Hash
[],BlockNumber
|BlockTag
]
eth_getProof.ReturnType
eth_getProof.ReturnType:
Proof
eth_getStorageAt
eth_getStorageAt:
object
Description
Returns the value from a storage position at an address
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getStorageAt', params: ['0x...', '0x...', 'latest'] })// => '0x...'
eth_getStorageAt.Method
eth_getStorageAt.Method:
"eth_getStorageAt"
eth_getStorageAt.Parameters
eth_getStorageAt.Parameters: [
Address
,Quantity
,BlockNumber
|BlockTag
|BlockIdentifier
]
eth_getStorageAt.ReturnType
eth_getStorageAt.ReturnType:
Hex
eth_getTransactionByBlockHashAndIndex
eth_getTransactionByBlockHashAndIndex:
object
Description
Returns information about a transaction specified by block hash and transaction index
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getTransactionByBlockHashAndIndex', params: ['0x...', '0x...'] })// => { ... }
eth_getTransactionByBlockHashAndIndex.Method
eth_getTransactionByBlockHashAndIndex.Method:
"eth_getTransactionByBlockHashAndIndex"
eth_getTransactionByBlockHashAndIndex.Parameters
eth_getTransactionByBlockHashAndIndex.Parameters: [
Hash
,Quantity
]
eth_getTransactionByBlockHashAndIndex.ReturnType
eth_getTransactionByBlockHashAndIndex.ReturnType:
Transaction
|null
eth_getTransactionByBlockNumberAndIndex
eth_getTransactionByBlockNumberAndIndex:
object
Description
Returns information about a transaction specified by block number and transaction index
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getTransactionByBlockNumberAndIndex', params: ['0x...', '0x...'] })// => { ... }
eth_getTransactionByBlockNumberAndIndex.Method
eth_getTransactionByBlockNumberAndIndex.Method:
"eth_getTransactionByBlockNumberAndIndex"
eth_getTransactionByBlockNumberAndIndex.Parameters
eth_getTransactionByBlockNumberAndIndex.Parameters: [
BlockNumber
|BlockTag
,Quantity
]
eth_getTransactionByBlockNumberAndIndex.ReturnType
eth_getTransactionByBlockNumberAndIndex.ReturnType:
Transaction
|null
eth_getTransactionByHash
eth_getTransactionByHash:
object
Description
Returns information about a transaction specified by hash
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getTransactionByHash', params: ['0x...'] })// => { ... }
eth_getTransactionByHash.Method
eth_getTransactionByHash.Method:
"eth_getTransactionByHash"
eth_getTransactionByHash.Parameters
eth_getTransactionByHash.Parameters: [
Hash
]
eth_getTransactionByHash.ReturnType
eth_getTransactionByHash.ReturnType:
Transaction
|null
eth_getTransactionCount
eth_getTransactionCount:
object
Description
Returns the number of transactions sent from an address
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getTransactionCount', params: ['0x...', 'latest'] })// => '0x1'
eth_getTransactionCount.Method
eth_getTransactionCount.Method:
"eth_getTransactionCount"
eth_getTransactionCount.Parameters
eth_getTransactionCount.Parameters: [
Address
,BlockNumber
|BlockTag
|BlockIdentifier
]
eth_getTransactionCount.ReturnType
eth_getTransactionCount.ReturnType:
Quantity
eth_getTransactionReceipt
eth_getTransactionReceipt:
object
Description
Returns the receipt of a transaction specified by hash
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getTransactionReceipt', params: ['0x...'] })// => { ... }
eth_getTransactionReceipt.Method
eth_getTransactionReceipt.Method:
"eth_getTransactionReceipt"
eth_getTransactionReceipt.Parameters
eth_getTransactionReceipt.Parameters: [
Hash
]
eth_getTransactionReceipt.ReturnType
eth_getTransactionReceipt.ReturnType:
TransactionReceipt
|null
eth_getUncleByBlockHashAndIndex
eth_getUncleByBlockHashAndIndex:
object
Description
Returns information about an uncle specified by block hash and uncle index position
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getUncleByBlockHashAndIndex', params: ['0x...', '0x...'] })// => { ... }
eth_getUncleByBlockHashAndIndex.Method
eth_getUncleByBlockHashAndIndex.Method:
"eth_getUncleByBlockHashAndIndex"
eth_getUncleByBlockHashAndIndex.Parameters
eth_getUncleByBlockHashAndIndex.Parameters: [
Hash
,Quantity
]
eth_getUncleByBlockHashAndIndex.ReturnType
eth_getUncleByBlockHashAndIndex.ReturnType:
Uncle
|null
eth_getUncleByBlockNumberAndIndex
eth_getUncleByBlockNumberAndIndex:
object
Description
Returns information about an uncle specified by block number and uncle index position
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getUncleByBlockNumberAndIndex', params: ['0x...', '0x...'] })// => { ... }
eth_getUncleByBlockNumberAndIndex.Method
eth_getUncleByBlockNumberAndIndex.Method:
"eth_getUncleByBlockNumberAndIndex"
eth_getUncleByBlockNumberAndIndex.Parameters
eth_getUncleByBlockNumberAndIndex.Parameters: [
BlockNumber
|BlockTag
,Quantity
]
eth_getUncleByBlockNumberAndIndex.ReturnType
eth_getUncleByBlockNumberAndIndex.ReturnType:
Uncle
|null
eth_getUncleCountByBlockHash
eth_getUncleCountByBlockHash:
object
Description
Returns the number of uncles in a block specified by block hash
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getUncleCountByBlockHash', params: ['0x...'] })// => '0x1'
eth_getUncleCountByBlockHash.Method
eth_getUncleCountByBlockHash.Method:
"eth_getUncleCountByBlockHash"
eth_getUncleCountByBlockHash.Parameters
eth_getUncleCountByBlockHash.Parameters: [
Hash
]
eth_getUncleCountByBlockHash.ReturnType
eth_getUncleCountByBlockHash.ReturnType:
Quantity
eth_getUncleCountByBlockNumber
eth_getUncleCountByBlockNumber:
object
Description
Returns the number of uncles in a block specified by block number
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_getUncleCountByBlockNumber', params: ['0x...'] })// => '0x1'
eth_getUncleCountByBlockNumber.Method
eth_getUncleCountByBlockNumber.Method:
"eth_getUncleCountByBlockNumber"
eth_getUncleCountByBlockNumber.Parameters
eth_getUncleCountByBlockNumber.Parameters: [
BlockNumber
|BlockTag
]
eth_getUncleCountByBlockNumber.ReturnType
eth_getUncleCountByBlockNumber.ReturnType:
Quantity
eth_maxPriorityFeePerGas
eth_maxPriorityFeePerGas:
object
Description
Returns the current maxPriorityFeePerGas in wei.
Link
https://ethereum.github.io/execution-apis/api-documentation/
Example
provider.request({ method: 'eth_maxPriorityFeePerGas' })// => '0x5f5e100'
eth_maxPriorityFeePerGas.Method
eth_maxPriorityFeePerGas.Method:
"eth_maxPriorityFeePerGas"
eth_maxPriorityFeePerGas.Parameters?
optional
eth_maxPriorityFeePerGas.Parameters:undefined
eth_maxPriorityFeePerGas.ReturnType
eth_maxPriorityFeePerGas.ReturnType:
Quantity
eth_newBlockFilter
eth_newBlockFilter:
object
Description
Creates a filter to listen for new blocks that can be used with eth_getFilterChanges
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_newBlockFilter' })// => '0x1'
eth_newBlockFilter.Method
eth_newBlockFilter.Method:
"eth_newBlockFilter"
eth_newBlockFilter.Parameters?
optional
eth_newBlockFilter.Parameters:undefined
eth_newBlockFilter.ReturnType
eth_newBlockFilter.ReturnType:
Quantity
eth_newFilter
eth_newFilter:
object
Description
Creates a filter to listen for specific state changes that can then be used with eth_getFilterChanges
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_newFilter', params: [{ fromBlock: '0x...', toBlock: '0x...', address: '0x...', topics: ['0x...'] }] })// => '0x1'
eth_newFilter.Method
eth_newFilter.Method:
"eth_newFilter"
eth_newFilter.Parameters
eth_newFilter.Parameters: [
object
]
eth_newFilter.ReturnType
eth_newFilter.ReturnType:
Quantity
eth_newPendingTransactionFilter
eth_newPendingTransactionFilter:
object
Description
Creates a filter to listen for new pending transactions that can be used with eth_getFilterChanges
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_newPendingTransactionFilter' })// => '0x1'
eth_newPendingTransactionFilter.Method
eth_newPendingTransactionFilter.Method:
"eth_newPendingTransactionFilter"
eth_newPendingTransactionFilter.Parameters?
optional
eth_newPendingTransactionFilter.Parameters:undefined
eth_newPendingTransactionFilter.ReturnType
eth_newPendingTransactionFilter.ReturnType:
Quantity
eth_protocolVersion
eth_protocolVersion:
object
Description
Returns the current Ethereum protocol version
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_protocolVersion' })// => '54'
eth_protocolVersion.Method
eth_protocolVersion.Method:
"eth_protocolVersion"
eth_protocolVersion.Parameters?
optional
eth_protocolVersion.Parameters:undefined
eth_protocolVersion.ReturnType
eth_protocolVersion.ReturnType:
string
eth_sendRawTransaction
eth_sendRawTransaction:
object
Description
Sends a signed transaction to the network
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_sendRawTransaction', params: ['0x...'] })// => '0x...'
eth_sendRawTransaction.Method
eth_sendRawTransaction.Method:
"eth_sendRawTransaction"
eth_sendRawTransaction.Parameters
eth_sendRawTransaction.Parameters: [
Hex
]
eth_sendRawTransaction.ReturnType
eth_sendRawTransaction.ReturnType:
Hash
eth_uninstallFilter
eth_uninstallFilter:
object
Description
Destroys a filter based on filter ID
Link
https://eips.ethereum.org/EIPS/eip-1474
Example
provider.request({ method: 'eth_uninstallFilter', params: ['0x1'] })// => true
eth_uninstallFilter.Method
eth_uninstallFilter.Method:
"eth_uninstallFilter"
eth_uninstallFilter.Parameters
eth_uninstallFilter.Parameters: [
Quantity
]
eth_uninstallFilter.ReturnType
eth_uninstallFilter.ReturnType:
boolean
net_listening
net_listening:
object
Description
Determines if this client is listening for new network connections
Example
provider.request({ method: 'net_listening' })// => true
net_listening.Method
net_listening.Method:
"net_listening"
net_listening.Parameters?
optional
net_listening.Parameters:undefined
net_listening.ReturnType
net_listening.ReturnType:
boolean
net_peerCount
net_peerCount:
object
Description
Returns the number of peers currently connected to this client
Example
provider.request({ method: 'net_peerCount' })// => '0x1'
net_peerCount.Method
net_peerCount.Method:
"net_peerCount"
net_peerCount.Parameters?
optional
net_peerCount.Parameters:undefined
net_peerCount.ReturnType
net_peerCount.ReturnType:
Quantity
net_version
net_version:
object
Description
Returns the chain ID associated with the current network
Example
provider.request({ method: 'net_version' })// => '1'
net_version.Method
net_version.Method:
"net_version"
net_version.Parameters?
optional
net_version.Parameters:undefined
net_version.ReturnType
net_version.ReturnType:
Quantity
web3_clientVersion
web3_clientVersion:
object
Description
Returns the version of the current client
Example
provider.request({ method: 'web3_clientVersion' })// => 'MetaMask/v1.0.0'
web3_clientVersion.Method
web3_clientVersion.Method:
"web3_clientVersion"
web3_clientVersion.Parameters?
optional
web3_clientVersion.Parameters:undefined
web3_clientVersion.ReturnType
web3_clientVersion.ReturnType:
string
web3_sha3
web3_sha3:
object
Description
Hashes data using the Keccak-256 algorithm
Example
provider.request({ method: 'web3_sha3', params: ['0x68656c6c6f20776f726c64'] })// => '0xc94770007dda54cF92009BFF0dE90c06F603a09f'
web3_sha3.Method
web3_sha3.Method:
"web3_sha3"
web3_sha3.Parameters
web3_sha3.Parameters: [
Hash
]
web3_sha3.ReturnType
web3_sha3.ReturnType:
string