Parses a wire amount such as 'CREDIT:12.34' back into an Amount. The currency is the part
before the colon and must be one this system handles; anything else throws INVALID_AMOUNT, so a
string that merely contains a colon can never build an amount with a nonsense currency. This is
the inverse of encodeAmount, shared by every layer that stores or receives an amount as text:
the cache, the HTTP wire, and the SQL engines.
Parses a wire amount such as
'CREDIT:12.34'back into anAmount. The currency is the part before the colon and must be one this system handles; anything else throws INVALID_AMOUNT, so a string that merely contains a colon can never build an amount with a nonsense currency. This is the inverse ofencodeAmount, shared by every layer that stores or receives an amount as text: the cache, the HTTP wire, and the SQL engines.