[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-docs] branch master updated: [common] refinement of withdraw spec
From: |
Admin |
Subject: |
[taler-docs] branch master updated: [common] refinement of withdraw specific structs |
Date: |
Tue, 04 Feb 2025 12:52:02 +0100 |
This is an automated email from the git hooks/post-receive script.
oec pushed a commit to branch master
in repository taler-docs.
The following commit(s) were added to refs/heads/master by this push:
new 3cb15219 [common] refinement of withdraw specific structs
3cb15219 is described below
commit 3cb152194494f989d381f4a3a1a32509d3fb20ad
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Tue Feb 4 12:51:01 2025 +0100
[common] refinement of withdraw specific structs
Definitions of TALER_WithdrawRequestDetailsP,
TALER_HashPlanchetsP, TALER_AgeMask added.
---
core/api-common.rst | 132 ++++++++++++++++++++++++++++++--------------------
core/api-exchange.rst | 16 ------
2 files changed, 80 insertions(+), 68 deletions(-)
diff --git a/core/api-common.rst b/core/api-common.rst
index 29e56a13..86ba4e30 100644
--- a/core/api-common.rst
+++ b/core/api-common.rst
@@ -456,6 +456,24 @@ Ages
// An age is an integer between 0 and 255 measured in years.
type Age = number;
+
+.. ts:def:: AgeMask
+
+ // Binary representation of the age groups.
+ // The bits set in the mask mark the edges at the beginning of a next age
+ // group. F.e. for the age groups
+ // 0-7, 8-9, 10-11, 12-13, 14-15, 16-17, 18-20, 21-*
+ // the following bits are set:
+ //
+ // 31 24 16 8 0
+ // | | | | |
+ // oooooooo oo1oo1o1 o1o1o1o1 ooooooo1
+ //
+ // A value of 0 means that the exchange does not support the extension for
+ // age-restriction.
+ type AgeMask = Integer;
+
+
Versions
^^^^^^^^
@@ -1193,15 +1211,10 @@ within the
`exchange's codebase
<https://docs.taler.net/global-licensing.html#exchange-repo>`_.
-.. _TALER_WithdrawCommitmentP:
+.. _TALER_WithdrawRequestDetailsP
.. sourcecode:: c
- struct TALER_WithdrawCommitmentP {
-
- /**
- * The reserve's public key
- */
- struct TALER_ReservePublicKeyP reserve_pub;
+ struct TALER_WithdrawRequestDetailsP {
/**
* Amount to withdraw, excluding fees, i.e.
@@ -1228,11 +1241,10 @@ within the
* to κ index=1 etc:
* h[0][0]…h[0][n-1]h[1][0]…h[1][n-1] … h[κ-1][0]…h[κ-1][n-1]
*/
- struct GNUNET_HashCode h_planchets;
+ struct TALER_HashPlanchetsP h_planchets;
/**
- * If age restriction applies, maximum age _group_ to commit to,
- * 0 otherwise.
+ * If age restriction applies, maximum age _group_ to commit to, 0
otherwise.
* Note that if age restriction applies, all denominations
* for all coins MUST support age restriction.
* Also note that this is not an age (in years), but the age group
@@ -1247,8 +1259,64 @@ within the
* If max_age_group is > 0, the mask MUST be non-zero, too.
*/
struct TALER_AgeMask mask;
+
+ };
+
+
+.. _TALER_HashPlanchetsP
+.. sourcecode:: c
+
+ /**
+ * This is the running SHA512-hash over all
+ * `TALER_BlindedCoinHashP` values of an array of coins.
+ * Note that each `TALER_BlindedCoinHashP` itself
+ * captures the hash of the corresponding denomination's
+ * public key.
+ */
+ struct TALER_HashPlanchetsP {
+ struct GNUNET_HashCode hash;
};
+
+.. _TALER_AgeMask:
+.. sourcecode:: c
+
+ /**
+ * Binary representation of the age groups.
+ * The bits set in the mask mark the edges at the beginning of a next age
+ * group. F.e. for the age groups
+ * 0-7, 8-9, 10-11, 12-13, 14-15, 16-17, 18-20, 21-*
+ * the following bits are set:
+ *
+ * 31 24 16 8 0
+ * | | | | |
+ * oooooooo oo1oo1o1 o1o1o1o1 ooooooo1
+ *
+ * A value of 0 means that the exchange does not support the extension for
+ * age-restriction.
+ */
+ struct TALER_AgeMask {
+ uint32_t mask;
+ };
+
+
+.. _TALER_WithdrawCommitmentP:
+.. sourcecode:: c
+
+ struct TALER_WithdrawCommitmentP {
+
+ /**
+ * The reserve's public key
+ */
+ struct TALER_ReservePublicKeyP reserve_pub;
+
+ /**
+ * The details of the withdraw request
+ */
+ struct TALER_WithdrawRequestDetailsP details;
+ };
+
+
.. _TALER_WithdrawCommitmentHashP:
.. sourcecode:: c
@@ -1278,49 +1346,9 @@ within the
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
/**
- * Amount to withdraw, excluding fees, i.e.
- * the total sum of the denominations of the coins.
- * Note that the reserve must have a value of at least amount+fee.
- */
- struct TALER_Amount amount;
-
- /**
- * Total fee for the withdrawal.
- * Note that the reserve must have a value of at least amount+fee.
+ * The details of the withdraw request
*/
- struct TALER_Amount fee;
-
- /**
- * This is the running SHA512-hash over all
- * `TALER_BlindedCoinHashP` values of the coins.
- * Note that each `TALER_BlindedCoinHashP` itself
- * captures the hash of the corresponding denomination's
- * public key.
- * If max_age was set in the withdraw request, there will be
- * n*κ many such values. The iteration MUST be first over
- * all coins belonging to κ index=0, then all coins
- * to κ index=1 etc:
- * h[0][0]…h[0][n-1]h[1][0]…h[1][n-1] … h[κ-1][0]…h[κ-1][n-1]
- */
- struct GNUNET_HashCode h_planchets;
-
- /**
- * If age restriction applies, maximum age _group_ to commit to,
- * 0 otherwise.
- * Note that if age restriction applies, all denominations
- * for all coins MUST support age restriction.
- * Also note that this is not an age (in years), but the age group
- * (an index) according to list of age groups in the configuration
- * of the exchange. See TALER_get_max_group() how to calculate
- * the age group to a given age (in years).
- */
- uint32_t max_age_group;
-
- /**
- * The age groups as configured for the exchange, represented as a mask.
- * If max_age_group is > 0, the mask MUST be non-zero, too.
- */
- struct TALER_AgeMask mask;
+ struct TALER_WithdrawRequestDetailsP details;
};
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index 0d27cd3c..9b3a746b 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -486,22 +486,6 @@ possibly by using HTTPS.
}
- .. ts:def:: AgeMask
-
- // Binary representation of the age groups.
- // The bits set in the mask mark the edges at the beginning of a next age
- // group. F.e. for the age groups
- // 0-7, 8-9, 10-11, 12-13, 14-15, 16-17, 18-21, 21-*
- // the following bits are set:
- //
- // 31 24 16 8 0
- // | | | | |
- // oooooooo oo1oo1o1 o1o1o1o1 ooooooo1
- //
- // A value of 0 means that the exchange does not support the extension for
- // age-restriction.
- type AgeMask = Integer;
-
.. ts:def:: DenomGroup
type DenomGroup =
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-docs] branch master updated: [common] refinement of withdraw specific structs,
Admin <=