Switchboard precisioned representation of numbers.

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • mantissa: BN
    • scale: number

    Returns SwitchboardDecimal

Properties

mantissa: BN
scale: number

Accessors

  • get big(): Big

    Returns Big

Methods

  • SwitchboardDecimal equality comparator.

    Parameters

    Returns boolean

    true iff equal

  • Convert SwitchboardDecimal to big.js Big type.

    Returns Big

    Big representation

  • Returns { mantissa: string; scale: number; value: string }

  • Returns string

  • Convert untyped object to a Switchboard decimal, if possible.

    Parameters

    • obj: any

      raw object to convert from

    Returns SwitchboardDecimal

    SwitchboardDecimal

  • Convert a Big.js decimal to a Switchboard decimal.

    Parameters

    • big: Big

      a Big.js decimal

    Returns SwitchboardDecimal

    a SwitchboardDecimal