satim-module - v1.0.0
    Preparing search index...

    Function toMinorUnits

    • Convert a major-unit amount to an integer count of minor units (centimes).

      This is the single conversion point for all caller amounts. Bypassing it (e.g. computing amount * 100 directly) would reintroduce the IEEE-754 silent-rounding vulnerability fixed by the relative-epsilon precision check.

      Parameters

      • amount: number

      Returns number

      Error when amount is not a finite positive number.

      Error when amount exceeds MAX_SAFE_AMOUNT.

      Error when amount has more than 2 decimal places.