taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 215a455a313ed492b8fcfc45686dd032d952a029
parent d8c437a1ef74e45937fdd86e3d5bdd5e25ee6243
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sun,  8 Oct 2023 11:40:37 +0200

update REST Specs for DD51

Diffstat:
Mcore/api-bank-integration.rst | 3+++
Mcore/api-exchange.rst | 37+++++++++++++++++++++++++++++++++++++
Mcore/api-merchant.rst | 14+++++++++++++-
3 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/core/api-bank-integration.rst b/core/api-bank-integration.rst @@ -51,6 +51,9 @@ to tightly integrate with GNU Taler. // Currency used by this bank. currency: string; + // How the bank SPA should render this currency. + currency_specification: CurrencySpecification; + // Name of the API. name: "taler-bank-integration"; } diff --git a/core/api-exchange.rst b/core/api-exchange.rst @@ -81,11 +81,45 @@ possibly by using HTTPS. // Currency supported by this exchange. currency: string; + // How wallets should render this currency. + currency_specification: CurrencySpecification; + // Names of supported KYC requirements. supported_kyc_requirements: string[]; } + .. ts:def:: CurrencySpecification + + interface CurrencySpecification { + + // Name of the currency. + name: string; + + // Decimal separator for fractional digits. + decimal_separator: string; + + // how many digits the user may enter after the decimal_separator + num_fractional_input_digits: Integer; + + // Number of fractional digits to render in normal font and size. + num_fractional_normal_digits: Integer; + + // Number of fractional digits to render always, if needed by + // padding with zeros. + num_fractional_trailing_zero_digits: Integer; + + // Whether the currency name should be rendered before (true) or + // after (false) the numeric value + is_currency_name_leading: boolean; + + // map of powers of 10 to alternative currency names / symbols, must + // always have an entry under "0" that defines the base name, + // e.g. "0 => €" or "3 => k€". For BTC, would be "0 => BTC, -3 => mBTC". + // Communicates the currency symbol to be used. + alt_unit_names: { log10 : string }; + } + .. http:get:: /keys @@ -119,6 +153,9 @@ possibly by using HTTPS. // The exchange's currency or asset unit. currency: string; + // How wallets should render this currency. + currency_specification: CurrencySpecification; + // How many digits should the amounts be rendered // with by default. Small capitals should // be used to render fractions beyond the number diff --git a/core/api-merchant.rst b/core/api-merchant.rst @@ -138,9 +138,21 @@ such as the implemented version of the protocol and the currency used. // Name of the protocol. name: "taler-merchant"; - // Currency supported by this backend. + // Default (!) currency supported by this backend. + // This is the currency that the backend should + // suggest by default to the user when entering + // amounts. See ``currencies`` for a list of + // supported currencies and how to render them. currency: string; + // How wallets should render currencies supported + // by this backend. Maps + // currency codes (e.g. "EUR" or "KUDOS") to + // the respective currency specification. + // All currencies in this map are supported by + // the backend. + currencies: { currency : CurrencySpecification}; + }