Type aliases
GetBlockTimeApi
GetBlockTimeApi =
object
Methods
getBlockTime()
getBlockTime(
blockNumber
):UnixTimestamp
Returns the estimated production time of a block.
Each validator reports their UTC time to the ledger on a regular interval by intermittently adding a timestamp to a vote for a particular block. A requested block's time is calculated from the stake-weighted mean of the vote timestamps in a set of recent blocks recorded on the ledger.
Parameters
Parameter | Type | Description |
---|---|---|
blockNumber | bigint | Block number, identified by slot |
Returns
UnixTimestamp
Estimated production time, as Unix timestamp (seconds since the Unix epoch)