Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Parse

Hierarchy

  • Parse

Index

Methods

Static fromTimestamp

  • fromTimestamp(timestamp: number): ReadonlyDate
  • Parameters

    • timestamp: number

    Returns ReadonlyDate

Static parseQuantity

  • parseQuantity(quantity: string): string
  • validates string to be a non-negative integer and cuts leading zeros

    Parameters

    • quantity: string

    Returns string

Static timeToNonce

  • timeToNonce(date: ReadonlyDate): Nonce
  • Convert a point in time to a nonce used in the Lisk/RISE codec.

    The nonce stores a UNIX timestamp as integer in seconds resolution. Since we use a Long variable, we are not affected by the year 2038 problem. The full range of possible Lisk/RISE timestamps (epoch in 2016 +/- 68 years) is covered since we allow negative nonce values.

    Parameters

    • date: ReadonlyDate

      the JavaScript date and time object

    Returns Nonce

Generated using TypeDoc