Skip to main content

Module amount

Module amount 

Source
Expand description

Amounts the venue is asked to move: plain decimals, at most eight places, never zero, in the normal form that is hashed ("12.50" is "12.5", "007" is "7").

Structs§

Amount
A validated amount: its wire string and the same value as a Dec.

Enums§

BadAmount

Constants§

MAX_DECIMALS
The most places an amount the venue takes may have.

Functions§

clean_amount
Checks a typed amount: digits, at most one point with digits before it, at most eight places, not zero. Returns the normal form; a place finer than eight is refused, never rounded.