export declare class MoneyError extends Error { readonly code: "AMOUNT_NOT_A_DECIMAL_STRING" | "AMOUNT_SCALE_INVALID" | "AMOUNT_TOO_LARGE" | "CURRENCY_MISMATCH"; constructor(code: "AMOUNT_NOT_A_DECIMAL_STRING" | "AMOUNT_SCALE_INVALID" | "AMOUNT_TOO_LARGE" | "CURRENCY_MISMATCH"); } /** * An amount of one currency, held as an integer of minor units. On the wire * BEAP writes a decimal string, because a JSON number cannot carry a bank's * amounts without a reader somewhere turning them into a float; in this * process the same amount is a `bigint`, because arithmetic on money must * not round. The two forms convert through the currency's own ISO 4217 * exponent, and a decimal whose scale is not the currency's is refused * rather than padded: `"250000.0"` is not how CHF writes an amount, and an * implementation that quietly accepted it would hash a different string * than the one the authority signed. */ export declare class Money { readonly currency: string; readonly minor: bigint; private constructor(); /** The wire form: a decimal string with exactly the currency's scale. */ static fromDecimal(amount: string, currency: string): Money; static fromMinor(minor: bigint, currency: string): Money; /** The wire form again, with exactly the currency's scale, for a digest to match. */ toDecimal(): string; equals(other: Money): boolean; /** Addition within one currency only; mixing two is a refusal, never a conversion. */ add(other: Money): Money; /** The total of a non-empty list, all of one currency. */ static sum(amounts: readonly Money[]): Money; toString(): string; } //# sourceMappingURL=Money.d.ts.map