near-api-js - v7.5.3
    Preparing search index...

    Function yoctoToNear

    • Formats integer yoctoNEAR as a decimal NEAR string.

      Parameters

      • yocto: bigint | `${bigint}`

        Amount in yoctoNEAR as a bigint or integer string.

      • decimals: number = NEAR_NOMINATION_EXP

        Maximum fractional digits, from 0 to 24. Defaults to 24; fractional values are floored.

      Returns `${number}`

      A decimal string with excess fractional digits truncated and trailing zeroes removed.

      If the amount is not an integer or the requested precision is outside the supported range.