format

fun format(amount: BigInteger, tokenType: String, includeSymbol: Boolean = true): String

Format amount with thousands separators and decimals.

Return

Formatted string (e.g., "1,234.567890" or "1,234.567890 DUST")

Parameters

amount

Raw amount in base units (BigInteger, must be non-negative)

tokenType

Token type string (e.g., "DUST", "TNIGHT")

includeSymbol

If true, append token symbol (e.g., " DUST")

Throws

if amount is negative