Module: lib/blockchains/ethereum/rpc

Module to connect to the Ethereum network through a Ethereum node

Source:

Methods

(inner) getBalance(address) → {Promise}

Gets the balance of the specified Ethereum blockchain account

Parameters:
Name Type Description
address string
Source:
Returns:
Type
Promise

(inner) getBlockByNumber(blockNumber) → {Promise}

Gets a block including transaction data by its block number

Parameters:
Name Type Description
blockNumber Object
Source:
Returns:

resolves to block with transactions

Type
Promise

(inner) getChainId() → {Promise}

Gets the chain identifier of the node

Source:
Returns:

resolves to the chain identifier

Type
Promise

(inner) getGasPrice() → {Promise}

Gets the current gas price

Source:
Returns:

resolves to gas price

Type
Promise

(inner) getHighestBlock() → {Promise}

Gets the highest block, i.e. the current block count of the longest chains

Source:
Returns:

resolves to highest known block number

Type
Promise

(inner) getNetworkId() → {Promise}

Gets the identifier of the network the node is connected to

Source:
Returns:

resolves to the network identifier

Type
Promise

(inner) getNodeInfo() → {Promise}

Gets the software and version of the node

Source:
Returns:

resolves to the node information

Type
Promise

(inner) getPeerCount() → {Promise}

Gets the number of peers the node is connected to

Source:
Returns:

resolves to the number of peers

Type
Promise

(inner) getProtocolVersion() → {Promise}

Gets the Ethereum protocol version of the node

Source:
Returns:

resolves to the protocol version

Type
Promise

(inner) getRawTransaction(transactionHash) → {Promise}

Gets a single transaction from the Ethereum blockchain under a timeout

Parameters:
Name Type Description
transactionHash string
Source:
Returns:

resolved to the transaction

Type
Promise

(inner) getTransactionCount(address) → {Promise}

Gets the transaction count of the specified Ethereum blockchain account

Parameters:
Name Type Description
address string
Source:
Returns:

resolves to the numer of transactions

Type
Promise

(inner) getTransactionReceipt(transactionHash) → {Promise}

Gets the receipt for the specified transaction

Parameters:
Name Type Description
transactionHash string
Source:
Returns:

resolves to a tranasction receipt

Type
Promise

(inner) getTransactionReceipt(rawTransaction) → {Promise}

Sends a raw signed transaction

Parameters:
Name Type Description
rawTransaction string

the raw signed transaction to be sent

Source:
Returns:

resolves to a tranasction receipt

Type
Promise

(inner) initRpc(ethConfig, ethState) → {Promise}

Initialises Ethereum RPC

Parameters:
Name Type Description
ethConfig Object

the Ethereum blockchain configuration

ethState Object

the Ethereum blockchain state

Source:
Returns:

resolve if succesfully initialised

Type
Promise

(inner) isSyncing() → {Promise}

Checks if the node is syncing

Source:
Returns:

resolves to syncing infomration

Type
Promise