FixedPointToStringOptions
Options accepted by binaryFixedPointToString and
decimalFixedPointToString to control the emitted representation.
decimals: caps the number of fractional digits in the output. When this is lower than the value's native precision the raw value is rescaled usingrounding(defaults to'strict', which throwsSOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSSon inexact results). When higher, the extra precision is zero-padded only ifpadTrailingZerosis also set.padTrailingZeros: emits exactly as many fractional digits as requested bydecimals. Whendecimalsis omitted, pads to the value's native scale (decimalsfor decimal values,fractionalBitsfor binary values — the length of the exact base-10 expansion). Defaults tofalse, which trims trailing zeros (and drops the decimal point altogether for whole numbers).rounding: only consulted whendecimalsforces a scale-down. Defaults to'strict'.