Public
Documentation Settings

rpc- api documentation

POSTgetblockbyhash

http://localhost:18888/rpc

Returns information about a block by hash.

Parameters

  • DATA, 32 Bytes - Hash of a block.
  • Boolean - If true it returns the full transaction objects, if false only the hashes of the transactions.

Returns

Object - A block object, or null when no block was found:

  • numberQUANTITY - the block number. null when its pending block.
  • hashDATA, 32 Bytes - hash of the block. null when its pending block.
  • parentHashDATA, 32 Bytes - hash of the parent block.
  • nonceDATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block.
  • sha3UnclesDATA, 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloomDATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block.
  • transactionsRootDATA, 32 Bytes - the root of the transaction trie of the block.
  • stateRootDATA, 32 Bytes - the root of the final state trie of the block.
  • receiptsRootDATA, 32 Bytes - the root of the receipts trie of the block.
  • minerDATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
  • difficultyQUANTITY - integer of the difficulty for this block.
  • totalDifficultyQUANTITY - integer of the total difficulty of the chain until this block.
  • extraDataDATA - the "extra data" field of this block.
  • sizeQUANTITY - integer the size of this block in bytes.
  • gasLimitQUANTITY - the maximum gas allowed in this block.
  • gasUsedQUANTITY - the total used gas by all transactions in this block.
  • timestampQUANTITY - the unix timestamp for when the block was collated.
  • transactionsArray - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • unclesArray - Array of uncle hashes.
Bodyraw (json)
json
{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x5d5fd12b4fba2479f08b22c292b53d9244fafc80230e55516f175ccb3f118746", false],"id":1}
Example Request
curl
curl --location 'http://localhost:18888/rpc
' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x5d5fd12b4fba2479f08b22c292b53d9244fafc80230e55516f175ccb3f118746", false],"id":1}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTchain id

http://localhost:16888/rpc
Plain Text
Returns the chain id.
Parameters
None
Returns
Id of the chain
Bodyraw (json)
json
{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67}
Example Request
curl
curl --location 'http://localhost:16888/rpc' \
--data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTsyncing

http://localhost:18888/rpc
Plain Text
Returns an object with data about the sync status or false.
Parameters
None
Returns
Object|Boolean, An object with sync status data or FALSE, when not syncing:
startingBlock: QUANTITY - The block at which the import started (will only be reset, after the sync reached his head)
currentBlock: QUANTITY - The current block, same as eth_blockNumber
highestBlock: QUANTITY - The estimated highest block
Bodyraw (json)
json
{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}
Example Request
curl
curl --location 'http://localhost:18888/rpc
' \
--data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTaccounts

http://localhost:16888/rpc

Returns a list of addresses owned by client.

Parameters

None

Returns

Array of DATA, 20 Bytes - addresses owned by the client.

Bodyraw (json)
json
{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}
Example Request
curl
curl --location 'http://localhost:16888/rpc' \
--data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers