features/wallet/send/zec_amount library

Parse a user-typed ZEC amount string into integer zatoshis — INTEGER MATH ONLY, the strict inverse of formatZec (zat_format.dart). A send amount is money, so it NEVER routes through double: IEEE-754 cannot represent most decimal ZEC values exactly, and a float path would silently send the wrong amount. This is the host-side first gate before a PaymentDraft is composed; the SDK re-validates every figure, but parsing here gives an honest inline message before any bridge call.

Classes

ZecAmountInvalid
An invalid amount — render fault honestly inline.
ZecAmountResult
The result of parseZecAmount — a validated zatoshi value or a typed fault.
ZecAmountValid
A valid, positive, in-range amount in zatoshis.

Enums

ZecAmountFault
Why an amount string was rejected — the axis the form's inline message keys on (never a raw code; design invariant 6). All payload-free: an amount is never-log material (§5.4), so the reason carries no value.

Functions

parseZecAmount(String input) → ZecAmountResult
Parse input (a user-typed ZEC amount) into zatoshis with integer math only.