gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] 01/02: New type for decimal number.


From: gnunet
Subject: [taler-docs] 01/02: New type for decimal number.
Date: Thu, 05 Oct 2023 15:55:33 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository docs.

commit 4aac30230b57758fe2b3acd057d77b3082eea67b
Author: MS <ms@taler.net>
AuthorDate: Thu Oct 5 15:52:12 2023 +0200

    New type for decimal number.
---
 core/.api-common.rst.swp   | Bin 0 -> 77824 bytes
 core/.api-corebank.rst.swp | Bin 0 -> 49152 bytes
 core/api-common.rst        |  11 +++++++++++
 core/api-corebank.rst      |   8 ++++----
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/core/.api-common.rst.swp b/core/.api-common.rst.swp
new file mode 100644
index 00000000..df35fed5
Binary files /dev/null and b/core/.api-common.rst.swp differ
diff --git a/core/.api-corebank.rst.swp b/core/.api-corebank.rst.swp
new file mode 100644
index 00000000..40629598
Binary files /dev/null and b/core/.api-corebank.rst.swp differ
diff --git a/core/api-common.rst b/core/api-common.rst
index 64cc7f33..ae4abcc4 100644
--- a/core/api-common.rst
+++ b/core/api-common.rst
@@ -306,6 +306,17 @@ Large numbers
 Large numbers such as RSA blinding factors and 256 bit keys, are transmitted
 as other binary data in Crockford Base32 encoding.
 
+Decimal numbers
+^^^^^^^^^^^^^^^
+
+..
+  FIXME: explain the representation with strings.
+
+.. ts:def:: DecimalNumber
+
+   // Number with at most 8 fractional digits.
+   type DecimalNumber = string;
+
 Timestamps
 ^^^^^^^^^^
 
diff --git a/core/api-corebank.rst b/core/api-corebank.rst
index 5d8bec6f..4310e5fe 100644
--- a/core/api-corebank.rst
+++ b/core/api-corebank.rst
@@ -933,16 +933,16 @@ Conversion rates
     interface ConversionRatesResponse {
 
       // Exchange rate to buy the local currency from the external one
-      buy_at_ratio: FractionalNumber; 
+      buy_at_ratio: DecimalNumber; 
 
       // Exchange rate to sell the local currency for the external one
-      sell_at_ratio: FractionalNumber; 
+      sell_at_ratio: DecimalNumber; 
 
       // Fee to subtract after applying the buy ratio.
-      buy_in_fee: FractionalNumber;
+      buy_in_fee: DecimalNumber;
 
       // Fee to subtract after applying the sell ratio.
-      sell_out_fee: FractionalNumber;
+      sell_out_fee: DecimalNumber;
     }
 
   For example, given a local currency LC, a fiat currency FC,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]