T402 API Reference - v2.8.0
    Preparing search index...

    Function convertToTokenAmount

    • Convert a decimal amount to token smallest units

      Parameters

      • decimalAmount: string

        The decimal amount (e.g., "0.10")

      • decimals: number

        The number of decimals for the token (e.g., 6 for USDC)

      Returns string

      The amount in smallest units as a string