summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--design-documents/051-fractional-digits.rst49
1 files changed, 49 insertions, 0 deletions
diff --git a/design-documents/051-fractional-digits.rst b/design-documents/051-fractional-digits.rst
index fb803567..64d606ea 100644
--- a/design-documents/051-fractional-digits.rst
+++ b/design-documents/051-fractional-digits.rst
@@ -106,6 +106,55 @@ to the alternative unit name, alas the "num_fractional_input_digits" would
always apply to the unit currency and may need to be adjusted if amounts
are input using an alternative unit name.
+Configuration syntax
+--------------------
+
+Each currency should be specified in its own subsystem-independent
+currency, with the section name prefixed with "currency-". In that
+section. The map could be given directly in JSON. For example:
+
+ .. code-block:: ini
+
+ [currency-euro]
+ name = "Euro"
+ code = "EUR"
+ decimal_separator = ","
+ num_fractional_input_digits = 2
+ num_fractional_normal_digits = 2
+ num_fractional_trailing_zero_digits = 2
+ is_currency_name_leading = NO
+ alt_unit_names = {0:"€"}
+
+ [currency-japanese-yen]
+ name = "Japanese Yen"
+ code = "JPY"
+ decimal_separator = "."
+ num_fractional_input_digits = 2
+ num_fractional_normal_digits = 0
+ num_fractional_trailing_zero_digits = 2
+ is_currency_name_leading = YES
+ alt_unit_names = {0:"¥"}
+
+ [currency-bitcoin-mainnet]
+ name = "Bitcoin-Mainnet"
+ code = "BITCOINBTC"
+ decimal_separator = "."
+ num_fractional_input_digits = 8
+ num_fractional_normal_digits = 3
+ num_fractional_trailing_zero_digits = 0
+ is_currency_name_leading = NO
+ alt_unit_names = {0:"BTC",-3:"mBTC"}
+
+ [currency-ethereum]
+ name = "WAI-ETHER"
+ code = "EthereumWAI"
+ decimal_separator = "."
+ num_fractional_input_digits = 0
+ num_fractional_normal_digits = 0
+ num_fractional_trailing_zero_digits = 0
+ is_currency_name_leading = NO
+ alt_unit_names = {0:"WAI",3:"KWAI",6:"MWAI",9:"GWAI",12:"Szabo",15:"Finney",18:"Ether",21:"KEther",24:"MEther"}
+
Implementation considerations
-----------------------------