vechaindocsgithub
  • Preparing search index...
  • The search index is not available
vechain-sdk
  • vechain-sdk
  • @vechain/sdk-core
  • Units
  • parseUnits

Function parseUnits

  • parseUnits(exp, unit?): FixedPointNumber
  • Parse the decimal string expressing a value in the named unit ro return a FixedPointNumber value expressed in Units.wei.

    Parameters

    • exp: string

      The representation of a numeric value expressed in Units.ether.

    • unit: Units = Units.ether

      The order of magnitude to use to parse the exp representation.

    Returns FixedPointNumber

    Throws

    If exp is not a numeric expression.

    Remarks

    The term ether refers to the order of magnitude 10E18, not to the ETH cryptocurrency.

    See

    ethers parseUnits

    • Defined in packages/core/src/vcdm/currency/Units.ts:135

Settings

Member Visibility
vechaindocsgithub
vechain-sdk
  • Loading...

Generated using TypeDoc