hmy_getBlockByHash
GetBlockByHash
Get block by its hash.
API v1
Parameters
String
- The block hash.Boolean
- Iftrue
, the returned block will contain all transactions in the block.
Returns
number
-Number
: The block number.null
when its pending block.hash
32 Bytes -String
: Hash of the block.null
when its pending block.parentHash
32 Bytes -String
: Hash of the parent block.nonce
8 Bytes -String
: Hash of the generated proof-of-work.null
when its pending block.logsBloom
256 Bytes -String
: The bloom filter for the logs of the block.null
when its pending block.transactionsRoot
32 Bytes -String
: The root of the transaction trie of the blockstateRoot
32 Bytes -String
: The root of the final state trie of the block.miner
-String
: The address of the beneficiary to whom the mining rewards were given.difficulty
-String
: Integer of the difficulty for this block.extraData
-String
: The “extra data” field of this block.size
-Number
: Integer the size of this block in bytes.gasLimit
-Number
: The maximum gas allowed in this block.gasUsed
-Number
: The total used gas by all transactions in this block.timestamp
-Number
: The unix timestamp for when the block was collated.stakingTransactions
-Array
: Array of staking transactions object; are present by defaulttransactions
-Array
: Array of transaction objects; absent if second parameter isfalse
.uncles
-Array
: Array of uncle hashes.
Sample Curl Request
Sample Curl Response
API v2
Parameters
String
- The block hash.blockArgs
- optional args struct in json format (should be used just with { })fullTx
-Bool
: To show full tx or notwithSigners
-Bool
: Include block signes in blocks or notinclStaking
-Bool
: To show staking txs or not
Returns
number
-Number
: The block number.null
when its pending block.hash
32 Bytes -String
: Hash of the block.null
when its pending block.parentHash
32 Bytes -String
: Hash of the parent block.nonce
8 Bytes -String
: Hash of the generated proof-of-work.null
when its pending block.logsBloom
256 Bytes -String
: The bloom filter for the logs of the block.null
when its pending block.transactionsRoot
32 Bytes -String
: The root of the transaction trie of the blockstateRoot
32 Bytes -String
: The root of the final state trie of the block.miner
-String
: The address of the beneficiary to whom the mining rewards were given.difficulty
-String
: Integer of the difficulty for this block.extraData
-String
: The “extra data” field of this block.size
-Number
: Integer the size of this block in bytes.gasLimit
-Number
: The maximum gas allowed in this block.gasUsed
-Number
: The total used gas by all transactions in this block.timestamp
-Number
: The unix timestamp for when the block was collated.stakingTransactions
-Array
: Array of staking transactions object; absent if inclStaking is false, are present by defaulttransactions
-Array
: Array of transaction objects; absent if second parameter isfalse
.uncles
-Array
: Array of uncle hashes.
Sample Curl Request
Sample Curl Response
Last updated