@aptos-labs/ts-sdk - v3.1.1
    Preparing search index...

    Function convertAmountFromOnChainToHumanReadable

    • Amount is represented in the smallest unit format on chain, this function converts the smallest unit format to a human-readable amount format

      Parameters

      • value: number

        The value in human-readable format

      • decimal: number

        The token decimal

      Returns number

      The value in the smallest units

      human-readable amount format: 500
      on chain amount format when decimal is 8: 50000000000