Stroops and USDC Precision
USDC on Stellar uses 7 decimal places. The smallest unit is called a stroop:bigint values. The SDK provides two helper functions to convert between human-readable strings and stroops.
toStroops
Converts a human-readable amount string to abigint in stroops.
Returns:
bigint - The amount in stroops.
fromStroops
Converts abigint in stroops back to a human-readable string.
Returns:
string - Human-readable decimal string.
Conversion Table
Constants
The SDK exports several constants for common values:These time constants are the same values used by the Vowena smart contract. Use them when setting
period and gracePeriod in buildCreatePlan() to stay consistent with on-chain conventions.