Skip to main content

web3_clientVersion

Returns the current client version. Parameters
  • None
Returns
  • result (string): The current client version.
Example Implementation in JS:

web3_sha3

Returns Keccak-256 (not the standardized SHA3-256) of the given data. Parameters
  • data (string): The data in hexadecimal form to convert into a SHA3 hash.
Returns
  • result (string): The SHA3 result of the given string.
Example Implementation in JS:

net_version

Returns the current network id. Parameters
  • None
Returns
  • result (string): The current network id.
Example Implementation in JS:

net_listening

Returns true if client is actively listening for network connections. Parameters
  • None
Returns
  • result (boolean): true when listening, otherwise false.
Example Implementation in JS:

eth_chainId

Returns the chain ID used for signing replay-protected transactions. Parameters
  • None
Returns
  • result (string): Hexadecimal value as a string representing the integer of the current chain id.
Example Implementation in JS:

eth_blockNumber

Returns the number of most recent block. Parameters
  • None
Returns
  • result (string): The number of the most recent block.
Example Implementation in JS:

eth_getBalance

Returns the balance of the account of given address. Parameters
  • address (string): The address to check for balance.
  • QUANTITY|TAG (string): An integer block number, or the string “latest”/“earliest”.
Returns
  • result (string): An integer of the current balance in wei (hex string).
Example Implementation in JS:

eth_getStorageAt

Returns the value from a storage position at a given address. Parameters
  • address (string): The address of the storage.
  • position (string): The position in the storage.
  • QUANTITY|TAG (string): An integer block number, or the string “latest”/“earliest”.
Returns
  • result (string): The value at the given storage position.
Example Implementation in JS:

eth_getTransactionCount

Returns the number of transactions sent from an address. Parameters
  • address (string): The address to check for transaction count.
  • QUANTITY|TAG (string): An integer block number, or the string “latest”/“earliest”.
Returns
  • result (string): The number of transactions sent from the given address.
Example Implementation in JS:

eth_getBlockTransactionCountByHash

Returns the number of transactions in a block from a block matching the given block hash. Parameters
  • blockHash (string): The hash of the block.
Returns
  • result (string): The number of transactions in the block.
Example Implementation in JS:

eth_getBlockTransactionCountByNumber

Returns the number of transactions in a block matching the given block number. Parameters
  • blockNumber (string): The block number.
Returns
  • result (string): The number of transactions in the block.
Example Implementation in JS:

eth_signTransaction

Returns a signed transaction. Parameters
  • transaction (object): The transaction to sign.
Returns
  • result (string): The signed transaction.
Example Implementation in JS:

eth_sendTransaction

Sends a transaction to the network. Parameters
  • transaction (object): The transaction to send.
Returns
  • result (string): The transaction hash.
Example Implementation in JS:

eth_sendRawTransaction

Sends a raw transaction to the network. Parameters
  • rawTransaction (string): The raw transaction data.
Returns
  • result (string): The transaction hash.
Example Implementation in JS:

eth_subscribe

Subscribes to a new block header or a new pending transaction. Parameters
  • subscriptionType (string): The type of subscription (“newHeads” or “newPendingTransactions”).
Returns
  • result (string): The subscription ID.
Example Implementation in JS:

eth_estimateGas

Returns an estimate of how much gas is necessary to allow a transaction to complete. Parameters
  • transaction (object): The transaction to estimate gas for.
Returns
  • result (string): The estimated gas.
Example Implementation in JS:

eth_getBlockByHash

Returns information about a block by hash. Parameters
  • blockHash (string): The hash of the block.
Returns
  • result (object): Block information object.
Example Implementation in JS:

eth_getBlockByNumber

Returns information about a block by number. Parameters
  • blockNumber (string): The block number.
Returns
  • result (object): Block information object.
Example Implementation in JS:

eth_getTransactionByHash

Returns the information about a transaction requested by transaction hash. Parameters
  • txHash (string): The hash of a transaction.
Returns
  • result (object): Transaction details object.
Example Implementation in JS:

eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash. Parameters
  • txHash (string): The hash of the transaction.
Returns
  • result (object): Transaction receipt object.
Example Implementation in JS: