Constructors

Properties

Methods

Constructors

  • Creates an instance of Since.

    Parameters

    • relative: "absolute" | "relative"

      Absolute or relative

    • metric: "blockNumber" | "epoch" | "timestamp"

      The metric of since

    • value: bigint

      The value of since

    Returns Since

Properties

relative: "absolute" | "relative"

Absolute or relative

metric: "blockNumber" | "epoch" | "timestamp"

The metric of since

value: bigint

The value of since

Methods

  • Creates a Since instance from a SinceLike object.

    Parameters

    • since: SinceLike

      A SinceLike object or an instance of Since.

    Returns Since

    A Since instance.

    const since = Since.from("0x1234567812345678");
    
  • Converts the Since instance to num.

    Returns bigint

    A num

    const num = since.toNum();
    
  • Creates a Since instance from a num-like value.

    Parameters

    • numLike: NumLike

      The num-like value to convert.

    Returns Since

    A Since instance.

    const since = Since.fromNum("0x0");