taler-docs

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

commit 88be0259aea4fb2dcfc0073b2f13b2252d73060c
parent 8b85d4147ce62f2a43c2b58daa2b95d8ea307b4e
Author: Antoine A <>
Date:   Mon, 12 May 2025 16:36:38 +0200

[dd:libeufin-conversion-rate-group] improve API symmetry

Diffstat:
Mdesign-documents/063-libeufin-conversion-rate-group.rst | 28+++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/design-documents/063-libeufin-conversion-rate-group.rst b/design-documents/063-libeufin-conversion-rate-group.rst @@ -65,6 +65,12 @@ This would become the ``default`` group, that will be used by all created users. // Regional amount fee to subtract after applying the cashin ratio. cashin_fee?: Amount; + // Smallest possible regional amount, converted amount is rounded to this amount + cashin_tiny_amount?: Amount; + + // Rounding mode used during cashin conversion + cashin_rounding_mode?: "zero" | "up" | "nearest"; + // Minimum regional amount authorised for cashout before conversion cashout_min_amount?: Amount; @@ -73,9 +79,13 @@ This would become the ``default`` group, that will be used by all created users. // Fiat amount fee to subtract after applying the cashout ratio. cashout_fee?: Amount; + + // Smallest possible fiat amount, converted amount is rounded to this amount + cashout_tiny_amount?: Amount; + + // Rounding mode used during cashout conversion + cashout_rounding_mode?: "zero" | "up" | "nearest"; } - -TODO: do we also enable different rouding mode ?? .. ts:def:: ConversionRateGroup @@ -104,6 +114,12 @@ TODO: do we also enable different rouding mode ?? // Regional amount fee to subtract after applying the cashin ratio. cashin_fee?: Amount; + // Smallest possible regional amount, converted amount is rounded to this amount + cashin_tiny_amount?: Amount; + + // Rounding mode used during cashin conversion + cashin_rounding_mode?: "zero" | "up" | "nearest"; + // Minimum regional amount authorised for cashout before conversion cashout_min_amount?: Amount; @@ -112,6 +128,12 @@ TODO: do we also enable different rouding mode ?? // Fiat amount fee to subtract after applying the cashout ratio. cashout_fee?: Amount; + + // Smallest possible fiat amount, converted amount is rounded to this amount + cashout_tiny_amount?: Amount; + + // Rounding mode used during cashout conversion + cashout_rounding_mode?: "zero" | "up" | "nearest"; } When we run the conversion logic we take values from the user group and fallback to the default values when they are null. If the ratio is zero it disable the conversion. @@ -128,7 +150,7 @@ TODO: How hard is it to migrate to this in the wallets ? Taler Core Bank API ------------------- -We migrate ``POST /conversion-rate`` here to set the default conversion rate group value and set unchangeable values (tiny_amount). +We migrate ``POST /conversion-rate`` here to set the default conversion rate group value. We add new admin only conversion rate group management endpoints: