Open andresuribe87 opened 9 months ago
Possible duplicate of https://github.com/TBD54566975/tbdex/issues/199, which includes discussion of other aspects of currency representation as well.
Add to spec: use 3 digits beyond the currency's significant digits for amount representation.
notes from tbdex office hours:
seems like everyone is on board. can add a decimal
definition in the definitions.json
json schema and use that as a $ref
for all amount values
Many fields use a data type of
string
to represent numbers. The description of the fields mention an "amount". Some examples include:Offering.payoutUnitsPerPayinUnit
CurrencyDetails.currencyCode
CurrencyDetails.minSubunits
It would be helpful to clarify what possible values are for those fields. One proposal below.
Define a data type that is
Decimal
. The data typeDecimal
is serialized as a string. The only possible values of a string such that it would be correctly deserialized would be values that match the regex/^\d*\.?\d*$/
(or similar).