Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChainTime

A Value Object to facilitate Chain Timestamp conversions.

Hierarchy

  • ChainTime

Index

Methods

after

  • Checks if a chainTime is after a given one

    Parameters

    • chainTime: ChainTime

      The other value to be compared

    Returns boolean

    true if after a given chainTime, otherwise false

before

  • Checks if a chainTime is before a given one

    Parameters

    • chainTime: ChainTime

      The other value to be compared

    Returns boolean

    true if before a given chainTime, otherwise false

equals

getChainTimestamp

  • getChainTimestamp(): number

getDate

  • getDate(): Date

getEpoch

  • getEpoch(): number

setChainTimestamp

  • setChainTimestamp(blockTimestamp: number): void

setDate

  • setDate(date: Date): void

Static fromChainTimestamp

  • fromChainTimestamp(timestamp: number): ChainTime

Static fromDate