Skip to content

epochToDate

epochToDate(epoch, genesisTimestamp): Date | null

Defined in: packages/synapse-core/src/utils/epoch.ts:16

Convert a Filecoin epoch to a JavaScript Date

Parameter Type Description
epoch bigint The epoch to convert
genesisTimestamp number The genesis timestamp of the chain in seconds (Unix timestamp)

Date | null

Date of the epoch, or null when it is past the Date range (e.g. the maxUint256 “never” sentinel used by runwayInEpochs)