GetBlock

Query block header information or entire block information according to block height or block hash. (Confirmed state).

This method will use 30 Compute Units.


Parameters

  • id_or_num - String - Can be the block height or the block hash. No value entered means to query the latest block

  • detail - Boolean - true means query the entire block information including the header and body. false means only query the block header information.

Returns

Field
Type
Description

blockID

string

block hash

block_header.raw_data.timestamp

int64

block timestamp

block_header.raw_data.txTrieRoot

string

the root of transaction merkle tree

block_header.raw_data.parentHash

string

parent block hash

block_header.raw_data.number

int64

block number

block_header.raw_data.witness_id

int64

super representative id

block_header.raw_data.witness_address

string

super representative address

block_header.raw_data.version

int32

version

block_header.raw_data.accountStateRoot

string

the root of account state tree

block_header.witness_signature

string

the signature of SR

transactions

Transaction[]

Transaction information in the block, please refer to gettransactionbyid for the content contained in each transaction

Last updated

Was this helpful?