Kit
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

ParameterTypeDescription
blockNumberbigintBlock number, identified by slot

Returns

UnixTimestamp

Estimated production time, as Unix timestamp (seconds since the Unix epoch)

See

https://solana.com/docs/rpc/http/getblocktime

On this page