amountToStroops

fun amountToStroops(amount: String): BigInteger

Converts a decimal XLM amount string to stroops using BigDecimal arithmetic.

Parses the string as a decimal number, multiplies by 10,000,000 (stroops per XLM), and rounds to the nearest integer. Supports up to 7 decimal places.

Return

The amount in stroops as a BigInteger (1 XLM = 10,000,000 stroops)

Parameters

amount

The amount in XLM as a decimal string (must be non-empty and positive)

Throws

if the string is empty, not a valid number, or the resulting value is not positive