Skip to content

Chain API

Reference

getBlockHash

Future<BlockHash> getBlockHash({int? blockNumber})

Returns the BlockHash for the given block number. If no block number is provided, it will return the hash of the latest block at chain height.

getChainHeader

Future<int> getChainHeader({BlockHash? at})

Get the latest block number or specific block number by BlockHash.