API ReferenceValidationFunction
validateTokenAmount()
function validateTokenAmount(raw): Result<bigint, ValidationError[]>;Validates that a token amount is greater than zero.
Pure tier-1 validator — no deps, no config, synchronous. Safe to call from form onChange handlers
and server-side code alike.
Returns Result.ok with the amount on success, or Result.err with a ValidationError array if
the amount is zero or negative.
Parameters
| Parameter | Type |
|---|---|
raw | bigint |
Returns
Result<bigint,
ValidationError[]>