Amount

constructor(amount: BigDecimal, currency: String)


constructor(amount: String, currency: String)

Convenience constructor that parses amount as a decimal, preserving the original number of fractional digits (e.g. Amount("100.00", "EUR") keeps the two trailing zeros). Accepts whatever BigDecimal.parseString accepts; non-canonical inputs are normalized on the wire. Callers needing byte-exact control should construct a BigDecimal themselves and use the primary constructor.

Throws

if amount is not parseable as a decimal.