Modules: eth
eth_accounts
Accounts returns the collection of accounts this node manages.
Params (0)
None
Result
commonAddress []common.Address
- Required: ✓ Yes
=== "Schema"
``` Schema
- items:
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
- type: array
```=== "Raw"
``` Raw
{
"items": [
{
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
],
"type": [
"array"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_accounts", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_accounts", "params": []}'
```=== "Javascript Console"
``` js
eth.accounts();
```eth_blockNumber
BlockNumber returns the block number of the chain head.
Params (0)
None
Result
hexutil.Uint64
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint64`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_blockNumber", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}'
```=== "Javascript Console"
``` js
eth.blockNumber();
```eth_chainId
ChainId is the EIP-155 replay-protection chain id for the current Ethereum chain config.
Note, this method does not conform to EIP-695 because the configured chain ID is always
returned, regardless of the current head block. We used to return an error when the chain
wasn't synced up to a block where EIP-155 is enabled, but this behavior caused issues
in CL clients.
Params (0)
None
Result
*hexutil.Big
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_chainId", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_chainId", "params": []}'
```=== "Javascript Console"
``` js
eth.chainId();
```eth_createAccessList
CreateAccessList creates an EIP-2930 type AccessList for the given transaction.
Reexec and BlockNrOrHash can be specified to create the accessList on top of a certain state.
Params (2)
Parameters must be given by position.
1:
args TransactionArgs
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- accessList:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- storageKeys:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `object`
- type: `array`
- chainId:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- data:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- from:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- gas:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasPrice:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- input:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- maxFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxPriorityFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- nonce:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- to:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- value:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"accessList": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageKeys": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"chainId": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"maxFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxPriorityFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": [
"object"
]
}
```2:
blockNrOrHash *rpc.BlockNumberOrHash
- Required: ✓ Yes
Result
*accessListResult
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- accessList:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- storageKeys:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `object`
- type: `array`
- error:
- type: `string`
- gasUsed:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"accessList": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageKeys": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"error": {
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_createAccessList", "params": [<args>, <blockNrOrHash>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_createAccessList", "params": [<args>, <blockNrOrHash>]}'
```=== "Javascript Console"
``` js
eth.createAccessList(args,blockNrOrHash);
```eth_etherbase
Etherbase is the address that mining rewards will be sent to.
Params (0)
None
Result
common.Address
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_etherbase", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_etherbase", "params": []}'
```=== "Javascript Console"
``` js
eth.etherbase();
```eth_fillTransaction
FillTransaction fills the defaults (nonce, gas, gasPrice or 1559 fields)
on a given unsigned transaction, and returns it to the caller for further
processing (signing + broadcast).
Params (1)
Parameters must be given by position.
1:
args TransactionArgs
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- accessList:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- storageKeys:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `object`
- type: `array`
- chainId:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- data:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- from:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- gas:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasPrice:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- input:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- maxFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxPriorityFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- nonce:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- to:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- value:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"accessList": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageKeys": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"chainId": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"maxFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxPriorityFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": [
"object"
]
}
```Result
*SignTransactionResult
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- raw:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- tx:
- additionalProperties: `false`
- type: `object`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"raw": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"tx": {
"additionalProperties": false,
"type": "object"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_fillTransaction", "params": [<args>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_fillTransaction", "params": [<args>]}'
```=== "Javascript Console"
``` js
eth.fillTransaction(args);
```eth_getBalance
GetBalance returns the amount of wei for the given address in the state of the
given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta
block numbers are also allowed.
Params (2)
Parameters must be given by position.
1:
address common.Address
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```2:
blockNrOrHash rpc.BlockNumberOrHash
- Required: ✓ Yes
Result
*hexutil.Big
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getBalance", "params": [<address>, <blockNrOrHash>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBalance", "params": [<address>, <blockNrOrHash>]}'
```=== "Javascript Console"
``` js
eth.getBalance(address,blockNrOrHash);
```eth_getBlockByNumber
GetBlockByNumber returns the requested canonical block.
- When blockNr is -1 the chain pending block is returned.
- When blockNr is -2 the chain latest block is returned.
- When blockNr is -3 the chain finalized block is returned.
- When blockNr is -4 the chain safe block is returned.
- When fullTx is true all transactions in the block are returned, otherwise
only the transaction hash is returned.
Params (2)
Parameters must be given by position.
1:
number rpc.BlockNumber
- Required: ✓ Yes
=== "Schema"
``` Schema
- oneOf:
- description: `The block height description`
- enum: earliest, latest, pending
- title: `blockNumberTag`
- type: string
- description: `Hex representation of a uint64`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: string
- title: `blockNumberIdentifier`
```=== "Raw"
``` Raw
{
"oneOf": [
{
"description": "The block height description",
"enum": [
"earliest",
"latest",
"pending"
],
"title": "blockNumberTag",
"type": [
"string"
]
},
{
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": [
"string"
]
}
],
"title": "blockNumberIdentifier"
}
```2:
fullTx bool
- Required: ✓ Yes
Result
*RPCMarshalBlockT
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- baseFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- difficulty:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- error:
- type: `string`
- extraData:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- gasLimit:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasUsed:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- hash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- logsBloom:
- items:
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxItems: `256`
- minItems: `256`
- type: `array`
- miner:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- mixHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- nonce:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- number:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- parentHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- receiptsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- sha3Uncles:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- size:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- stateRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- timestamp:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- totalDifficulty:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- transactions:
- items:
- additionalProperties: `true`
- type: `array`
- transactionsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- uncles:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- withdrawals:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- amount:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- index:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- validatorIndex:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- type: `object`
- type: `array`
- withdrawalsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"baseFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"error": {
"type": "string"
},
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactions": {
"items": {
"additionalProperties": true
},
"type": "array"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"uncles": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"withdrawals": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"amount": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"index": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"validatorIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"withdrawalsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getBlockByNumber", "params": [<number>, <fullTx>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBlockByNumber", "params": [<number>, <fullTx>]}'
```=== "Javascript Console"
``` js
eth.getBlockByNumber(number,fullTx);
```eth_getBlockTransactionCountByNumber
GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number.
Params (1)
Parameters must be given by position.
1:
blockNr rpc.BlockNumber
- Required: ✓ Yes
=== "Schema"
``` Schema
- oneOf:
- description: `The block height description`
- enum: earliest, latest, pending
- title: `blockNumberTag`
- type: string
- description: `Hex representation of a uint64`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: string
- title: `blockNumberIdentifier`
```=== "Raw"
``` Raw
{
"oneOf": [
{
"description": "The block height description",
"enum": [
"earliest",
"latest",
"pending"
],
"title": "blockNumberTag",
"type": [
"string"
]
},
{
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": [
"string"
]
}
],
"title": "blockNumberIdentifier"
}
```Result
*hexutil.Uint
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getBlockTransactionCountByNumber", "params": [<blockNr>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBlockTransactionCountByNumber", "params": [<blockNr>]}'
```=== "Javascript Console"
``` js
eth.getBlockTransactionCountByNumber(blockNr);
```eth_getFilterChanges
GetFilterChanges returns the logs for the filter with the given id since
last time it was called. This can be used for polling.
For pending transaction and block filters the result is []common.Hash.
(pending)Log filters return []Log.
Params (1)
Parameters must be given by position.
1:
id rpc.ID
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Result
interface interface{}
- Required: ✓ Yes
Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getFilterChanges", "params": [<id>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getFilterChanges", "params": [<id>]}'
```=== "Javascript Console"
``` js
eth.getFilterChanges(id);
```eth_getFilterLogs
GetFilterLogs returns the logs for the filter with the given id.
If the filter could not be found an empty array of logs is returned.
Params (1)
Parameters must be given by position.
1:
id rpc.ID
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Result
typesLog []*types.Log
- Required: ✓ Yes
=== "Schema"
``` Schema
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- blockHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- blockNumber:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- data:
- pattern: `^0x([a-fA-F0-9]?)+$`
- title: `bytes`
- type: `string`
- logIndex:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- removed:
- type: `boolean`
- topics:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- transactionHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- transactionIndex:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- type: object
- type: array
```=== "Raw"
``` Raw
{
"items": [
{
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"data": {
"pattern": "^0x([a-fA-F0-9]?)+$",
"title": "bytes",
"type": "string"
},
"logIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"removed": {
"type": "boolean"
},
"topics": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"transactionHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": [
"object"
]
}
],
"type": [
"array"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getFilterLogs", "params": [<id>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getFilterLogs", "params": [<id>]}'
```=== "Javascript Console"
``` js
eth.getFilterLogs(id);
```eth_getHashrate
GetHashrate returns the current hashrate for local CPU miner and remote miner.
Params (0)
None
Result
uint64
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getHashrate", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getHashrate", "params": []}'
```=== "Javascript Console"
``` js
eth.getHashrate();
```eth_getHeaderByNumber
GetHeaderByNumber returns the requested canonical block header.
- When blockNr is -1 the chain pending header is returned.
- When blockNr is -2 the chain latest header is returned.
- When blockNr is -3 the chain finalized header is returned.
- When blockNr is -4 the chain safe header is returned.
Params (1)
Parameters must be given by position.
1:
number rpc.BlockNumber
- Required: ✓ Yes
=== "Schema"
``` Schema
- oneOf:
- description: `The block height description`
- enum: earliest, latest, pending
- title: `blockNumberTag`
- type: string
- description: `Hex representation of a uint64`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: string
- title: `blockNumberIdentifier`
```=== "Raw"
``` Raw
{
"oneOf": [
{
"description": "The block height description",
"enum": [
"earliest",
"latest",
"pending"
],
"title": "blockNumberTag",
"type": [
"string"
]
},
{
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": [
"string"
]
}
],
"title": "blockNumberIdentifier"
}
```Result
*RPCMarshalHeaderT
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- baseFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- difficulty:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- extraData:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- gasLimit:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasUsed:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- hash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- logsBloom:
- items:
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxItems: `256`
- minItems: `256`
- type: `array`
- miner:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- mixHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- nonce:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- number:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- parentHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- receiptsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- sha3Uncles:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- stateRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- timestamp:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- totalDifficulty:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- transactionsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- withdrawalsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"baseFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"withdrawalsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getHeaderByNumber", "params": [<number>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getHeaderByNumber", "params": [<number>]}'
```=== "Javascript Console"
``` js
eth.getHeaderByNumber(number);
```eth_getProof
GetProof returns the Merkle-proof for a given account and optionally some storage keys.
Params (3)
Parameters must be given by position.
1:
address common.Address
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```2:
storageKeys []string
- Required: ✓ Yes
=== "Schema"
``` Schema
- items:
- type: string
- type: array
```=== "Raw"
``` Raw
{
"items": [
{
"type": [
"string"
]
}
],
"type": [
"array"
]
}
```3:
blockNrOrHash rpc.BlockNumberOrHash
- Required: ✓ Yes
Result
*AccountResult
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- accountProof:
- items:
- type: `string`
- type: `array`
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- balance:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- codeHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- nonce:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- storageHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- storageProof:
- items:
- additionalProperties: `false`
- properties:
- key:
- type: `string`
- proof:
- items:
- type: `string`
- type: `array`
- value:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- type: `object`
- type: `array`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"accountProof": {
"items": {
"type": "string"
},
"type": "array"
},
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"balance": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"codeHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"storageHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageProof": {
"items": {
"additionalProperties": false,
"properties": {
"key": {
"type": "string"
},
"proof": {
"items": {
"type": "string"
},
"type": "array"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getProof", "params": [<address>, <storageKeys>, <blockNrOrHash>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getProof", "params": [<address>, <storageKeys>, <blockNrOrHash>]}'
```=== "Javascript Console"
``` js
eth.getProof(address,storageKeys,blockNrOrHash);
```eth_getRawTransactionByBlockHashAndIndex
GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.
Params (2)
Parameters must be given by position.
1:
blockHash common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```2:
index hexutil.Uint
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint",
"type": [
"string"
]
}
```Result
hexutil.Bytes
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": [<blockHash>, <index>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": [<blockHash>, <index>]}'
```=== "Javascript Console"
``` js
eth.getRawTransactionByBlockHashAndIndex(blockHash,index);
```eth_getRawTransactionByHash
GetRawTransactionByHash returns the bytes of the transaction for the given hash.
Params (1)
Parameters must be given by position.
1:
hash common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Result
hexutil.Bytes
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getRawTransactionByHash", "params": [<hash>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByHash", "params": [<hash>]}'
```=== "Javascript Console"
``` js
eth.getRawTransactionByHash(hash);
```Source code
```go
func (s *TransactionAPI) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutil.Bytes, error) {
tx, _, _, _, err := s.b.GetTransaction(ctx, hash)
if err != nil {
return nil, err
}
if tx == nil {
if tx = s.b.GetPoolTransaction(hash); tx == nil {
return nil, nil
}
}
return tx.MarshalBinary()
}// GetRawTransactionByHash returns the bytes of the transaction for the given hash.
<a href="https://github.com/etclabscore/core-geth/blob/master/internal/ethapi/api.go#L1840" target="_">View on GitHub →</a>
</p>
</details>
---
### eth_getStorageAt
GetStorageAt returns the storage from the state at the given address, key and
block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block
numbers are also allowed.
#### Params (3)
Parameters must be given _by position_.
__1:__
address <code>common.Address</code>
+ Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```
=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```
__2:__
hexKey <code>string</code>
+ Required: ✓ Yes
__3:__
blockNrOrHash <code>rpc.BlockNumberOrHash</code>
+ Required: ✓ Yes
#### Result
<code>hexutil.Bytes</code>
+ Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
```
=== "Raw"
``` Raw
{
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": [
"string"
]
}
```
#### Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getStorageAt", "params": [<address>, <hexKey>, <blockNrOrHash>]}'
```
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getStorageAt", "params": [<address>, <hexKey>, <blockNrOrHash>]}'
```
=== "Javascript Console"
``` js
eth.getStorageAt(address,hexKey,blockNrOrHash);
```
<details><summary>Source code</summary>
<p>
```go
func (s *BlockChainAPI) GetStorageAt(ctx context.Context, address common.Address, hexKey string, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error) {
state, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)
if state == nil || err != nil {
return nil, err
}
key, _, err := decodeHash(hexKey)
if err != nil {
return nil, fmt.Errorf("unable to decode storage key: %s", err)
}
res := state.GetState(address, key)
return res[ // GetStorageAt returns the storage from the state at the given address, key and
// block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block
// numbers are also allowed.
:], state.Error()
}eth_getTransactionByBlockHashAndIndex
GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index.
Params (2)
Parameters must be given by position.
1:
blockHash common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```2:
index hexutil.Uint
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint",
"type": [
"string"
]
}
```Result
*RPCTransaction
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- accessList:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- storageKeys:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `object`
- type: `array`
- blockHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- blockNumber:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- chainId:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- from:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- gas:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasPrice:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- hash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- input:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- maxFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxPriorityFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- nonce:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- r:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- s:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- to:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- transactionIndex:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- type:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- v:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- value:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- yParity:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"accessList": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageKeys": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"chainId": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"maxFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxPriorityFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"r": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"s": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"type": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"v": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"yParity": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getTransactionByBlockHashAndIndex", "params": [<blockHash>, <index>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByBlockHashAndIndex", "params": [<blockHash>, <index>]}'
```=== "Javascript Console"
``` js
eth.getTransactionByBlockHashAndIndex(blockHash,index);
```eth_getTransactionByHash
GetTransactionByHash returns the transaction for the given hash
Params (1)
Parameters must be given by position.
1:
hash common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Result
*RPCTransaction
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- accessList:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- storageKeys:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `object`
- type: `array`
- blockHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- blockNumber:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- chainId:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- from:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- gas:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasPrice:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- hash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- input:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- maxFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxPriorityFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- nonce:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- r:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- s:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- to:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- transactionIndex:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- type:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- v:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- value:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- yParity:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"accessList": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageKeys": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"chainId": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"maxFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxPriorityFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"r": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"s": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"type": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"v": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"yParity": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getTransactionByHash", "params": [<hash>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByHash", "params": [<hash>]}'
```=== "Javascript Console"
``` js
eth.getTransactionByHash(hash);
```eth_getTransactionReceipt
GetTransactionReceipt returns the transaction receipt for the given transaction hash.
Params (1)
Parameters must be given by position.
1:
hash common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Result
mapstringinterface map[string]interface{}
- Required: ✓ Yes
=== "Schema"
``` Schema
- patternProperties:
- .*:
- additionalProperties: `true`
- type: object
```=== "Raw"
``` Raw
{
"patternProperties": {
".*": {
"additionalProperties": true
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getTransactionReceipt", "params": [<hash>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionReceipt", "params": [<hash>]}'
```=== "Javascript Console"
``` js
eth.getTransactionReceipt(hash);
```eth_getUncleByBlockHashAndIndex
GetUncleByBlockHashAndIndex returns the uncle block for the given block hash and index. When fullTx is true
all transactions in the block are returned in full detail, otherwise only the transaction hash is returned.
Params (2)
Parameters must be given by position.
1:
blockHash common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```2:
index hexutil.Uint
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint",
"type": [
"string"
]
}
```Result
*RPCMarshalBlockT
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- baseFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- difficulty:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- error:
- type: `string`
- extraData:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- gasLimit:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasUsed:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- hash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- logsBloom:
- items:
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxItems: `256`
- minItems: `256`
- type: `array`
- miner:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- mixHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- nonce:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- number:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- parentHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- receiptsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- sha3Uncles:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- size:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- stateRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- timestamp:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- totalDifficulty:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- transactions:
- items:
- additionalProperties: `true`
- type: `array`
- transactionsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- uncles:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- withdrawals:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- amount:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- index:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- validatorIndex:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- type: `object`
- type: `array`
- withdrawalsRoot:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"baseFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"error": {
"type": "string"
},
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactions": {
"items": {
"additionalProperties": true
},
"type": "array"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"uncles": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"withdrawals": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"amount": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"index": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"validatorIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"withdrawalsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": [
"object"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getUncleByBlockHashAndIndex", "params": [<blockHash>, <index>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleByBlockHashAndIndex", "params": [<blockHash>, <index>]}'
```=== "Javascript Console"
``` js
eth.getUncleByBlockHashAndIndex(blockHash,index);
```eth_getUncleCountByBlockHash
GetUncleCountByBlockHash returns number of uncles in the block for the given block hash
Params (1)
Parameters must be given by position.
1:
blockHash common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Result
*hexutil.Uint
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getUncleCountByBlockHash", "params": [<blockHash>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleCountByBlockHash", "params": [<blockHash>]}'
```=== "Javascript Console"
``` js
eth.getUncleCountByBlockHash(blockHash);
```eth_getWork
GetWork returns a work package for external miner.
The work package consists of 3 strings:
result[0] - 32 bytes hex encoded current block header pow-hash
result[1] - 32 bytes hex encoded seed hash used for DAG
result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
result[3] - hex encoded block numberParams (0)
None
Result
num4string [4]string
- Required: ✓ Yes
=== "Schema"
``` Schema
- items:
- type: string
- maxItems: `4`
- minItems: `4`
- type: array
```=== "Raw"
``` Raw
{
"items": [
{
"type": [
"string"
]
}
],
"maxItems": 4,
"minItems": 4,
"type": [
"array"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_getWork", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_getWork", "params": []}'
```=== "Javascript Console"
``` js
eth.getWork();
```eth_logs
Logs creates a subscription that fires for all new log that match the given filter criteria.
Params (1)
Parameters must be given by position.
1:
crit FilterCriteria
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- Addresses:
- items:
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- BlockHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- FromBlock:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- ToBlock:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- Topics:
- items:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `array`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"Addresses": {
"items": {
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"BlockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"FromBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"ToBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Topics": {
"items": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"type": "array"
}
},
"type": [
"object"
]
}
```Result
*rpc.Subscription
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", <crit>]}'
```eth_maxPriorityFeePerGas
MaxPriorityFeePerGas returns a suggestion for a gas tip cap for dynamic fee transactions.
Params (0)
None
Result
*hexutil.Big
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_maxPriorityFeePerGas", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_maxPriorityFeePerGas", "params": []}'
```=== "Javascript Console"
``` js
eth.maxPriorityFeePerGas();
```eth_newBlockFilter
NewBlockFilter creates a filter that fetches blocks that are imported into the chain.
It is part of the filter package since polling goes with eth_getFilterChanges.
Params (0)
None
Result
rpc.ID
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_newBlockFilter", "params": []}'
```eth_newFilter
NewFilter creates a new filter and returns the filter id. It can be
used to retrieve logs when the state changes. This method cannot be
used to fetch logs that are already stored in the state.
Default criteria for the from and to block are "latest".
Using "latest" as block number will return logs for mined blocks.
Using "pending" as block number returns logs for not yet mined (pending) blocks.
In case logs are removed (chain reorg) previously returned logs are returned
again but with the removed property set to true.
In case "fromBlock" > "toBlock" an error is returned.
Params (1)
Parameters must be given by position.
1:
crit FilterCriteria
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- Addresses:
- items:
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- BlockHash:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- FromBlock:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- ToBlock:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- Topics:
- items:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `array`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"Addresses": {
"items": {
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"BlockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"FromBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"ToBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Topics": {
"items": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"type": "array"
}
},
"type": [
"object"
]
}
```Result
rpc.ID
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_newFilter", "params": [<crit>]}'
```eth_newHeads
NewHeads send a notification each time a new (header) block is appended to the chain.
Params (0)
None
Result
*rpc.Subscription
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}'
```eth_newPendingTransactions
NewPendingTransactions creates a subscription that is triggered each time a
transaction enters the transaction pool. If fullTx is true the full tx is
sent to the client, otherwise the hash is sent.
Params (1)
Parameters must be given by position.
1:
fullTx *bool
- Required: ✓ Yes
Result
*rpc.Subscription
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions", <fullTx>]}'
```eth_newSideBlockFilter
NewSideBlockFilter creates a filter that fetches blocks that are imported into the chain with a non-canonical status.
It is part of the filter package since polling goes with eth_getFilterChanges.
Params (0)
None
Result
rpc.ID
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_newSideBlockFilter", "params": []}'
```eth_newSideHeads
NewSideHeads send a notification each time a new non-canonical (header) block is written to the database.
Params (0)
None
Result
*rpc.Subscription
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newSideHeads"]}'
```eth_resend
Resend accepts an existing transaction and a new gas price and limit. It will remove
the given transaction from the pool and reinsert it with the new gas price and limit.
Params (3)
Parameters must be given by position.
1:
sendArgs TransactionArgs
- Required: ✓ Yes
=== "Schema"
``` Schema
- additionalProperties: `false`
- properties:
- accessList:
- items:
- additionalProperties: `false`
- properties:
- address:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- storageKeys:
- items:
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- type: `array`
- type: `object`
- type: `array`
- chainId:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- data:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- from:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- gas:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- gasPrice:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- input:
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: `string`
- maxFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- maxPriorityFeePerGas:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- nonce:
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: `string`
- to:
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: `string`
- value:
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: `string`
- type: object
```=== "Raw"
``` Raw
{
"additionalProperties": false,
"properties": {
"accessList": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageKeys": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"chainId": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"maxFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxPriorityFeePerGas": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": [
"object"
]
}
```2:
gasPrice *hexutil.Big
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": [
"string"
]
}
```3:
gasLimit *hexutil.Uint64
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint64`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": [
"string"
]
}
```Result
common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_resend", "params": [<sendArgs>, <gasPrice>, <gasLimit>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_resend", "params": [<sendArgs>, <gasPrice>, <gasLimit>]}'
```=== "Javascript Console"
``` js
eth.resend(sendArgs,gasPrice,gasLimit);
```eth_sendRawTransaction
SendRawTransaction will add the signed transaction to the transaction pool.
The sender is responsible for signing the transaction and using the correct nonce.
Params (1)
Parameters must be given by position.
1:
input hexutil.Bytes
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": [
"string"
]
}
```Result
common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_sendRawTransaction", "params": [<input>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_sendRawTransaction", "params": [<input>]}'
```=== "Javascript Console"
``` js
eth.sendRawTransaction(input);
```eth_sign
Sign calculates an ECDSA signature for:
keccak256("\x19Ethereum Signed Message:\n" + len(message) + message).
Note, the produced signature conforms to the secp256k1 curve R, S and V values,
where the V value will be 27 or 28 for legacy reasons.
The account associated with addr must be unlocked.
https://github.com/ethereum/wiki/wiki/JSON-RPC#eth\_sign
Params (2)
Parameters must be given by position.
1:
addr common.Address
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```2:
data hexutil.Bytes
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": [
"string"
]
}
```Result
hexutil.Bytes
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_sign", "params": [<addr>, <data>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_sign", "params": [<addr>, <data>]}'
```=== "Javascript Console"
``` js
eth.sign(addr,data);
```eth_submitHashrate
SubmitHashrate can be used for remote miners to submit their hash rate.
This enables the node to report the combined hash rate of all miners
which submit work through this node.
It accepts the miner hash rate and an identifier which must be unique
between nodes.
Params (2)
Parameters must be given by position.
1:
rate hexutil.Uint64
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a uint64`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": [
"string"
]
}
```2:
id common.Hash
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
```=== "Raw"
``` Raw
{
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": [
"string"
]
}
```Result
bool
- Required: ✓ Yes
Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_submitHashrate", "params": [<rate>, <id>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_submitHashrate", "params": [<rate>, <id>]}'
```=== "Javascript Console"
``` js
eth.submitHashrate(rate,id);
```eth_subscribe
Subscribe creates a subscription to an event channel.
Subscriptions are not available over HTTP; they are only available over WS, IPC, and Process connections.
Params (2)
Parameters must be given by position.
1:
subscriptionName RPCEthSubscriptionParamsName
- Required: ✓ Yes
=== "Schema"
``` Schema
- oneOf:
- description: `Fires a notification each time a new header is appended to the chain, including chain reorganizations.`
- enum: newHeads
- type: string
- description: `Fires a notification each time a new header is appended to the non-canonical (side) chain, including chain reorganizations.`
- enum: newSideHeads
- type: string
- description: `Returns logs that are included in new imported blocks and match the given filter criteria.`
- enum: logs
- type: string
- description: `Returns the hash for all transactions that are added to the pending state and are signed with a key that is available in the node.`
- enum: newPendingTransactions
- type: string
- description: `Indicates when the node starts or stops synchronizing. The result can either be a boolean indicating that the synchronization has started (true), finished (false) or an object with various progress indicators.`
- enum: syncing
- type: string
- title: `subscriptionName`
```=== "Raw"
``` Raw
{
"oneOf": [
{
"description": "Fires a notification each time a new header is appended to the chain, including chain reorganizations.",
"enum": [
"newHeads"
],
"type": [
"string"
]
},
{
"description": "Fires a notification each time a new header is appended to the non-canonical (side) chain, including chain reorganizations.",
"enum": [
"newSideHeads"
],
"type": [
"string"
]
},
{
"description": "Returns logs that are included in new imported blocks and match the given filter criteria.",
"enum": [
"logs"
],
"type": [
"string"
]
},
{
"description": "Returns the hash for all transactions that are added to the pending state and are signed with a key that is available in the node.",
"enum": [
"newPendingTransactions"
],
"type": [
"string"
]
},
{
"description": "Indicates when the node starts or stops synchronizing. The result can either be a boolean indicating that the synchronization has started (true), finished (false) or an object with various progress indicators.",
"enum": [
"syncing"
],
"type": [
"string"
]
}
],
"title": "subscriptionName"
}
```2:
subscriptionOptions interface{}
- Required: No
Result
subscriptionID rpc.ID
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Client Method Invocation Examples
=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": [<subscriptionName>, <subscriptionOptions>]}'
```eth_syncing
Syncing returns false in case the node is currently not syncing with the network. It can be up-to-date or has not
yet received the latest block headers from its pears. In case it is synchronizing:
- startingBlock: block number this node started to synchronize from
- currentBlock: block number this node is currently importing
- highestBlock: block number of the highest block header this node has received from peers
- pulledStates: number of state entries processed until now
- knownStates: number of known state entries that still need to be pulled
Params (0)
None
Result
interface interface{}
- Required: ✓ Yes
Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_syncing", "params": []}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_syncing", "params": []}'
```=== "Javascript Console"
``` js
eth.syncing();
```eth_uninstallFilter
UninstallFilter removes the filter with the given filter id.
Params (1)
Parameters must be given by position.
1:
id rpc.ID
- Required: ✓ Yes
=== "Schema"
``` Schema
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
```=== "Raw"
``` Raw
{
"description": "Subscription identifier",
"title": "subscriptionID",
"type": [
"string"
]
}
```Result
bool
- Required: ✓ Yes
Client Method Invocation Examples
=== "Shell HTTP"
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "eth_uninstallFilter", "params": [<id>]}'
```=== "Shell WebSocket"
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_uninstallFilter", "params": [<id>]}'
```=== "Javascript Console"
``` js
eth.uninstallFilter(id);
```