/** * amount.ts — strict decimal amount parsing for payment paths. * * parseFloat silently accepts garbage prefixes ("1,000" parses as 1) and * loses precision on large or high-precision values. parseAmountStrict * validates the entire string against a strict decimal grammar and converts * to base units with pure string/BigInt math — no float rounding anywhere. */ /** * Strictly parse a human-readable amount string into base units (bigint). * * - Leading/trailing whitespace is trimmed (" 5 " → 5); every remaining * character must match the strict decimal grammar above. * - At most `decimals` decimal places are allowed — excess precision is * rejected, never silently truncated or rounded. * - Zero and negative amounts are rejected (all call sites require a * positive amount). * - Conversion is exact: "1.00000000000000001" with decimals=18 → * 1000000000000000010n (the parseFloat path collapses this to 1 ETH). * * @param value Human-readable amount, e.g. "1.5" * @param decimals Base-unit decimal places of the asset (6 for USDC, 18 for ETH) * @param label Field name used in error messages (default: "amount") */ export declare function parseAmountStrict(value: string, decimals: number, label?: string): bigint; //# sourceMappingURL=amount.d.ts.map