QubicTypeScript

getTickInfo

Returns the current tick number, epoch, tick duration, and the first tick of the current epoch.

Signature

live.getTickInfo(opts?): Promise<Result<LiveTickInfo, QubicRpcError>>

Purpose

Fetch the current network tick to synchronise your application with the live chain state.

const result = await live.getTickInfo()
if (!result.ok) throw result.error

const { tick, epoch, duration, initialTick } = result.value
console.log(`Tick ${tick} in epoch ${epoch}`)

Parameters

NameTypeDescription
optsRequestOptionsOptional per-request overrides (signal, fetch)

Returns

Result<LiveTickInfo, QubicRpcError> — the current tick state.

FieldTypeDescription
ticknumberCurrent tick number
epochnumberCurrent epoch number
durationnumberTick duration in milliseconds
initialTicknumberFirst tick of the current epoch

On this page