Eth module

eth.blockNumber

Returns current block number

Invocation

eth.blockNumber

This method doesn't have parameters.

Returned type

Description

Quantity

Example request of eth.blockNumber
Example request of eth.blockNumber
eth.blockNumber

See also JSON RPC eth_blockNumber

eth.call

Executes a tx call (does not create a transaction)

Invocation

eth.call(transactionCall, blockParameter)

Parameter

Type

Description

transactionCall

TransactionForRpc object

blockParameter

BlockParameter object

Returned type

Description

String

Example request of eth.call
Objects in eth_call
Example request of eth.call
eth.call(transactionCall, blockParameter)
Objects in eth_call

TransactionForRpc

Field name

Type

Hash

Hash

Nonce

Quantity

BlockHash

Hash

BlockNumber

Quantity

TransactionIndex

Quantity

From

Address

To

Address

Value

Quantity

GasPrice

Quantity

Gas

Quantity

Data

Data

Input

Data

V

Quantity

S

Quantity

R

Quantity

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_call

eth.chainId

Returns ChainID

Invocation

eth.chainId

This method doesn't have parameters.

Returned type

Description

UInt64 object

Example request of eth.chainId
Objects in eth_chainId
Example request of eth.chainId
eth.chainId
Objects in eth_chainId

UInt64

Field name

Type

See also JSON RPC eth_chainId

eth.estimateGas

Executes a tx call and returns gas used (does not create a transaction)

Invocation

eth.estimateGas(transactionCall, blockParameter)

Parameter

Type

Description

transactionCall

TransactionForRpc object

blockParameter

BlockParameter object

Returned type

Description

Quantity

Example request of eth.estimateGas
Objects in eth_estimateGas
Example request of eth.estimateGas
eth.estimateGas(transactionCall, blockParameter)
Objects in eth_estimateGas

TransactionForRpc

Field name

Type

Hash

Hash

Nonce

Quantity

BlockHash

Hash

BlockNumber

Quantity

TransactionIndex

Quantity

From

Address

To

Address

Value

Quantity

GasPrice

Quantity

Gas

Quantity

Data

Data

Input

Data

V

Quantity

S

Quantity

R

Quantity

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_estimateGas

eth.getBalance

Returns account balance

Invocation

eth.getBalance(address, blockParameter)

Parameter

Type

Description

address

Address

blockParameter

BlockParameter object

Returned type

Description

Quantity

Example request of eth.getBalance
Objects in eth_getBalance
Example request of eth.getBalance
eth.getBalance(address, blockParameter)
Objects in eth_getBalance

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_getBalance

eth.getBlockByHash

Retrieves a block by hash

Invocation

eth.getBlockByHash(blockHash, returnFullTransactionObjects)

Parameter

Type

Description

blockHash

Hash

returnFullTransactionObjects

Boolean

Returned type

Description

BlockForRpc object

Example request of eth.getBlockByHash
Objects in eth_getBlockByHash
Example request of eth.getBlockByHash
eth.getBlockByHash(blockHash, returnFullTransactionObjects)
Objects in eth_getBlockByHash

BlockForRpc

Field name

Type

Author

Address

Difficulty

Quantity

ExtraData

Data

GasLimit

Quantity

GasUsed

Quantity

Hash

Hash

LogsBloom

Bloom Object

Miner

Address

MixHash

Hash

Nonce

Data

Number

Quantity

ParentHash

Hash

ReceiptsRoot

Hash

Sha3Uncles

Hash

Signature

Data

Size

Quantity

StateRoot

Hash

Step

Quantity

TotalDifficulty

Quantity

Timestamp

Quantity

Transactions

Array

TransactionsRoot

Hash

Uncles

Array

See also JSON RPC eth_getBlockByHash

eth.getBlockByNumber

Retrieves a block by number

Invocation

eth.getBlockByNumber(blockParameter, returnFullTransactionObjects)

Parameter

Type

Description

blockParameter

BlockParameter object

returnFullTransactionObjects

Boolean

Returned type

Description

BlockForRpc object

Example request of eth.getBlockByNumber
Objects in eth_getBlockByNumber
Example request of eth.getBlockByNumber
eth.getBlockByNumber(blockParameter, returnFullTransactionObjects)
Objects in eth_getBlockByNumber

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

BlockForRpc

Field name

Type

Author

Address

Difficulty

Quantity

ExtraData

Data

GasLimit

Quantity

GasUsed

Quantity

Hash

Hash

LogsBloom

Bloom Object

Miner

Address

MixHash

Hash

Nonce

Data

Number

Quantity

ParentHash

Hash

ReceiptsRoot

Hash

Sha3Uncles

Hash

Signature

Data

Size

Quantity

StateRoot

Hash

Step

Quantity

TotalDifficulty

Quantity

Timestamp

Quantity

Transactions

Array

TransactionsRoot

Hash

Uncles

Array

See also JSON RPC eth_getBlockByNumber

eth.getBlockTransactionCountByHash

Returns number of transactions in the block block hash

Invocation

eth.getBlockTransactionCountByHash(blockHash)

Parameter

Type

Description

blockHash

Hash

Returned type

Description

Quantity

Example request of eth.getBlockTransactionCountByHash
Example request of eth.getBlockTransactionCountByHash
eth.getBlockTransactionCountByHash(blockHash)

See also JSON RPC eth_getBlockTransactionCountByHash

eth.getBlockTransactionCountByNumber

Returns number of transactions in the block by block number

Invocation

eth.getBlockTransactionCountByNumber(blockParameter)

Parameter

Type

Description

blockParameter

BlockParameter object

Returned type

Description

Quantity

Example request of eth.getBlockTransactionCountByNumber
Objects in eth_getBlockTransactionCountByNumber
Example request of eth.getBlockTransactionCountByNumber
eth.getBlockTransactionCountByNumber(blockParameter)
Objects in eth_getBlockTransactionCountByNumber

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_getBlockTransactionCountByNumber

eth.getCode

Returns account code at given address and block

Invocation

eth.getCode(address, blockParameter)

Parameter

Type

Description

address

Address

blockParameter

BlockParameter object

Returned type

Description

Data

Example request of eth.getCode
Objects in eth_getCode
Example request of eth.getCode
eth.getCode(address, blockParameter)
Objects in eth_getCode

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_getCode

eth.getFilterChanges

Reads filter changes

Invocation

eth.getFilterChanges(filterId)

Parameter

Type

Description

filterId

Quantity

Returned type

Description

Array

Example request of eth.getFilterChanges
Example request of eth.getFilterChanges
eth.getFilterChanges(filterId)

See also JSON RPC eth_getFilterChanges

eth.getLogs

Reads logs

Invocation

eth.getLogs(filter)

Parameter

Type

Description

filter

Filter object

Returned type

Description

Array

Example request of eth.getLogs
Objects in eth_getLogs
Example request of eth.getLogs
eth.getLogs(filter)
Objects in eth_getLogs

Filter

Field name

Type

FromBlock

BlockParameter object

ToBlock

BlockParameter object

Address

Object

Topics

Array

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

See also JSON RPC eth_getLogs

eth.getProof

https://github.com/ethereum/EIPs/issues/1186

Invocation

eth.getProof(accountAddress, hashRate, blockParameter)

Parameter

Type

Description

accountAddress

Address

hashRate

Data

blockParameter

BlockParameter object

Returned type

Description

AccountProof object

Example request of eth.getProof
Objects in eth_getProof
Example request of eth.getProof
eth.getProof(accountAddress, hashRate, blockParameter)
Objects in eth_getProof

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

AccountProof

Field name

Type

Address

Address

Proof

Data

Balance

Quantity

CodeHash

Hash

Nonce

Quantity

StorageRoot

Hash

StorageProofs

StorageProof[] object

StorageProof[]

Field name

Type

Length

Quantity

LongLength

Quantity

Rank

Quantity

SyncRoot

Object

IsReadOnly

Boolean

IsFixedSize

Boolean

IsSynchronized

Boolean

See also JSON RPC eth_getProof

eth.getStorageAt

Returns storage data at address. storage_index

Invocation

eth.getStorageAt(address, positionIndex, blockParameter)

Parameter

Type

Description

address

Address

positionIndex

Quantity

blockParameter

BlockParameter object

Returned type

Description

Data

Example request of eth.getStorageAt
Objects in eth_getStorageAt
Example request of eth.getStorageAt
eth.getStorageAt(address, positionIndex, blockParameter)
Objects in eth_getStorageAt

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_getStorageAt

eth.getTransactionByBlockNumberAndIndex

Retrieves a transaction by block number and index

Invocation

eth.getTransactionByBlockNumberAndIndex(blockParameter, positionIndex)

Parameter

Type

Description

blockParameter

BlockParameter object

positionIndex

Quantity

Returned type

Description

TransactionForRpc object

Example request of eth.getTransactionByBlockNumberAndIndex
Objects in eth_getTransactionByBlockNumberAndIndex
Example request of eth.getTransactionByBlockNumberAndIndex
eth.getTransactionByBlockNumberAndIndex(blockParameter, positionIndex)
Objects in eth_getTransactionByBlockNumberAndIndex

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

TransactionForRpc

Field name

Type

Hash

Hash

Nonce

Quantity

BlockHash

Hash

BlockNumber

Quantity

TransactionIndex

Quantity

From

Address

To

Address

Value

Quantity

GasPrice

Quantity

Gas

Quantity

Data

Data

Input

Data

V

Quantity

S

Quantity

R

Quantity

See also JSON RPC eth_getTransactionByBlockNumberAndIndex

eth.getTransactionByHash

Retrieves a transaction by hash

Invocation

eth.getTransactionByHash(transactionHash)

Parameter

Type

Description

transactionHash

Hash

Returned type

Description

TransactionForRpc object

Example request of eth.getTransactionByHash
Objects in eth_getTransactionByHash
Example request of eth.getTransactionByHash
eth.getTransactionByHash(transactionHash)
Objects in eth_getTransactionByHash

TransactionForRpc

Field name

Type

Hash

Hash

Nonce

Quantity

BlockHash

Hash

BlockNumber

Quantity

TransactionIndex

Quantity

From

Address

To

Address

Value

Quantity

GasPrice

Quantity

Gas

Quantity

Data

Data

Input

Data

V

Quantity

S

Quantity

R

Quantity

See also JSON RPC eth_getTransactionByHash

eth.getTransactionCount

Returns account nonce (number of trnsactions from the account since genesis) at the given block number

Invocation

eth.getTransactionCount(address, blockParameter)

Parameter

Type

Description

address

Address

blockParameter

BlockParameter object

Returned type

Description

Quantity

Example request of eth.getTransactionCount
Objects in eth_getTransactionCount
Example request of eth.getTransactionCount
eth.getTransactionCount(address, blockParameter)
Objects in eth_getTransactionCount

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_getTransactionCount

eth.getTransactionReceipt

Retrieves a transaction receipt by tx hash

Invocation

eth.getTransactionReceipt(txHashData)

Parameter

Type

Description

txHashData

Hash

Returned type

Description

ReceiptForRpc object

Example request of eth.getTransactionReceipt
Objects in eth_getTransactionReceipt
Example request of eth.getTransactionReceipt
eth.getTransactionReceipt(txHashData)
Objects in eth_getTransactionReceipt

ReceiptForRpc

Field name

Type

TransactionHash

Hash

TransactionIndex

Quantity

BlockHash

Hash

BlockNumber

Quantity

CumulativeGasUsed

Quantity

GasUsed

Quantity

From

Address

To

Address

ContractAddress

Address

Logs

LogEntryForRpc[] object

LogsBloom

Bloom Object

Root

Hash

Status

Quantity

Error

String

LogEntryForRpc[]

Field name

Type

Length

Quantity

LongLength

Quantity

Rank

Quantity

SyncRoot

Object

IsReadOnly

Boolean

IsFixedSize

Boolean

IsSynchronized

Boolean

See also JSON RPC eth_getTransactionReceipt

eth.getUncleByBlockHashAndIndex

Retrieves an uncle block header by block hash and uncle index

Invocation

eth.getUncleByBlockHashAndIndex(blockHashData, positionIndex)

Parameter

Type

Description

blockHashData

Hash

positionIndex

Quantity

Returned type

Description

BlockForRpc object

Example request of eth.getUncleByBlockHashAndIndex
Objects in eth_getUncleByBlockHashAndIndex
Example request of eth.getUncleByBlockHashAndIndex
eth.getUncleByBlockHashAndIndex(blockHashData, positionIndex)
Objects in eth_getUncleByBlockHashAndIndex

BlockForRpc

Field name

Type

Author

Address

Difficulty

Quantity

ExtraData

Data

GasLimit

Quantity

GasUsed

Quantity

Hash

Hash

LogsBloom

Bloom Object

Miner

Address

MixHash

Hash

Nonce

Data

Number

Quantity

ParentHash

Hash

ReceiptsRoot

Hash

Sha3Uncles

Hash

Signature

Data

Size

Quantity

StateRoot

Hash

Step

Quantity

TotalDifficulty

Quantity

Timestamp

Quantity

Transactions

Array

TransactionsRoot

Hash

Uncles

Array

See also JSON RPC eth_getUncleByBlockHashAndIndex

eth.getUncleByBlockNumberAndIndex

Retrieves an uncle block header by block number and uncle index

Invocation

eth.getUncleByBlockNumberAndIndex(blockParameter, positionIndex)

Parameter

Type

Description

blockParameter

BlockParameter object

positionIndex

Quantity

Returned type

Description

BlockForRpc object

Example request of eth.getUncleByBlockNumberAndIndex
Objects in eth_getUncleByBlockNumberAndIndex
Example request of eth.getUncleByBlockNumberAndIndex
eth.getUncleByBlockNumberAndIndex(blockParameter, positionIndex)
Objects in eth_getUncleByBlockNumberAndIndex

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

BlockForRpc

Field name

Type

Author

Address

Difficulty

Quantity

ExtraData

Data

GasLimit

Quantity

GasUsed

Quantity

Hash

Hash

LogsBloom

Bloom Object

Miner

Address

MixHash

Hash

Nonce

Data

Number

Quantity

ParentHash

Hash

ReceiptsRoot

Hash

Sha3Uncles

Hash

Signature

Data

Size

Quantity

StateRoot

Hash

Step

Quantity

TotalDifficulty

Quantity

Timestamp

Quantity

Transactions

Array

TransactionsRoot

Hash

Uncles

Array

See also JSON RPC eth_getUncleByBlockNumberAndIndex

eth.getUncleCountByBlockNumber

Returns number of uncles in the block by block number

Invocation

eth.getUncleCountByBlockNumber(blockParameter)

Parameter

Type

Description

blockParameter

BlockParameter object

Returned type

Description

Quantity

Example request of eth.getUncleCountByBlockNumber
Objects in eth_getUncleCountByBlockNumber
Example request of eth.getUncleCountByBlockNumber
eth.getUncleCountByBlockNumber(blockParameter)
Objects in eth_getUncleCountByBlockNumber

BlockParameter

Field name

Type

Type

BlockParameterType object

BlockNumber

Quantity

BlockHash

Hash

RequireCanonical

Boolean

BlockParameterType

  • Quantity or String (latest, earliest, pending)

See also JSON RPC eth_getUncleCountByBlockNumber

eth.newPendingTransactionFilter

Creates an update filter

Invocation

eth.newPendingTransactionFilter()

This method doesn't have parameters.

Returned type

Description

Quantity

Example request of eth.newPendingTransactionFilter
Example request of eth.newPendingTransactionFilter
eth.newPendingTransactionFilter()

See also JSON RPC eth_newPendingTransactionFilter

eth.pendingTransactions

Returns the pending transactions list

Invocation

eth.pendingTransactions

This method doesn't have parameters.

Returned type

Description

TransactionForRpc object

Example request of eth.pendingTransactions
Objects in eth_pendingTransactions
Example request of eth.pendingTransactions
eth.pendingTransactions
Objects in eth_pendingTransactions

TransactionForRpc

Field name

Type

Hash

Hash

Nonce

Quantity

BlockHash

Hash

BlockNumber

Quantity

TransactionIndex

Quantity

From

Address

To

Address

Value

Quantity

GasPrice

Quantity

Gas

Quantity

Data

Data

Input

Data

V

Quantity

S

Quantity

R

Quantity

See also JSON RPC eth_pendingTransactions

eth.protocolVersion

Returns ETH protocol version

Invocation

eth.protocolVersion

This method doesn't have parameters.

Returned type

Description

String

Example request of eth.protocolVersion
Example request of eth.protocolVersion
eth.protocolVersion

See also JSON RPC eth_protocolVersion

eth.sendEth

Invocation

eth.sendEth(from, to, amountInEth)

Parameter

Type

Description

from

String

to

String

amountInEth

Quantity

Returned type

Description

String

Example request of eth.sendEth
Example request of eth.sendEth
eth.sendEth(from, to, amountInEth)

eth.sendRawTransaction

Send a raw transaction to the tx pool and broadcasting

Invocation

eth.sendRawTransaction(transaction)

Parameter

Type

Description

transaction

Data

Returned type

Description

Hash

Example request of eth.sendRawTransaction
Example request of eth.sendRawTransaction
eth.sendRawTransaction(transaction)

See also JSON RPC eth_sendRawTransaction

eth.sendTransaction

Send a transaction to the tx pool and broadcasting

Invocation

eth.sendTransaction(rpcTx)

Parameter

Type

Description

rpcTx

TransactionForRpc object

Returned type

Description

Hash

Example request of eth.sendTransaction
Objects in eth_sendTransaction
Example request of eth.sendTransaction
eth.sendTransaction(rpcTx)
Objects in eth_sendTransaction

TransactionForRpc

Field name

Type

Hash

Hash

Nonce

Quantity

BlockHash

Hash

BlockNumber

Quantity

TransactionIndex

Quantity

From

Address

To

Address

Value

Quantity

GasPrice

Quantity

Gas

Quantity

Data

Data

Input

Data

V

Quantity

S

Quantity

R

Quantity

See also JSON RPC eth_sendTransaction

eth.sendWei

Invocation

eth.sendWei(from, to, amountInWei)

Parameter

Type

Description

from

String

to

String

amountInWei

Quantity

Returned type

Description

String

Example request of eth.sendWei
Example request of eth.sendWei
eth.sendWei(from, to, amountInWei)

eth.syncing

Returns syncing status

Invocation

eth.syncing()

This method doesn't have parameters.

Returned type

Description

SyncingResult object

Example request of eth.syncing
Objects in eth_syncing
Example request of eth.syncing
eth.syncing()
Objects in eth_syncing

SyncingResult

Field name

Type

IsSyncing

Boolean

StartingBlock

Quantity

CurrentBlock

Quantity

HighestBlock

Quantity

See also JSON RPC eth_syncing