commit 4dc2250c75b39e5454197f1ff0ec1638be899db7
parent ffdda0098dcb0c7fa01065f456566344338703ef
Author: Özgür Kesim <oec-taler@kesim.org>
Date: Wed, 22 Jan 2025 12:47:26 +0100
[exchange] refine /binding-withdraw
Diffstat:
| M | core/api-exchange.rst | | | 86 | +++++++++++++++++++++++++++++++++++++++++++------------------------------------ |
1 file changed, 47 insertions(+), 39 deletions(-)
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
@@ -1574,59 +1574,64 @@ Blinding Prepare
expired).
:http:statuscode:`404 Not found`:
A denomination key is not known to the exchange. The response is a
- `DenominationUnknownMessage`.
+ `DenominationUnknownMessage` with error ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN``.
:http:statuscode:`410 Gone`:
A requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked.
- The response is a `DenominationExpiredMessage`. Clients must evaluate the
- error code provided to understand which of the cases this is and handle it
- accordingly.
+ The response is a `DenominationGoneMessage` with error
+ ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE``,
+ ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_EXPIRED`` or
+ ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_REVOKED``.
+ Clients must evaluate the error code provided to understand
+ which of the cases this is and handle it accordingly.
**Details:**
+
.. ts:def:: BlindingPrepareRequest
- interface BlindingPrepareRequest {
+ type BlindingPrepareRequest = BlindingPrepareRequestCS;
+
+
+ .. ts:def:: BlindingPrepareRequestCS
+
+ interface BlindingPrepareRequestCS {
+ // Cipher type
+ cipher: "CS";
// Nonces to be used by the exchange to derive
- // its private inputs from. Must not have ever
+ // its private input from. Must not have ever
// been used before.
nonces: CSNonce[];
- // Hashes of the public keys of denominations the
- // request relates to. Must be of the same length
- // as ``nonces``.
+ // Hashes of the public key of the denomination the
+ // request relates to. The denomination MUST support
+ // Clause-Schnorr signatures.
denom_pub_hs: HashCode[];
}
.. ts:def:: BlindingPrepareResponse
- type BlindingPrepareResponse = BlindingPrepareValue[];
+ type BlindingPrepareResponse = BlindingPrepareResponseCS;
- .. ts:def:: BlindingPrepareValue
- type BlindingPrepareValue =
- | BlindingPrepareRSAValue
- | BlindingPrepareCSValue;
+ .. ts:def:: BlindingPrepareResponseCS
- .. ts:def:: BlindingPrepareRSAValue
+ interface BlindingPrepareResponseCS {
+ cipher: "CS";
- interface BlindingPrepareRSAValue{
- cipher: "RSA";
+ // Array of pairs of CS values, one pair per input
+ r_pubs: CsRPublicPair[];
}
- .. ts:def:: BlindingPrepareCSValue
-
- interface BlindingPrepareCSValue {
- cipher: "CS";
- // CSR R0 value
- r_pub_0: CsRPublic;
+ .. ts:def:: CsRPublicPair
- // CSR R1 value
- r_pub_1: CsRPublic;
- }
+ // Pair of points on the curve Curve25519, one of
+ // which is randomly selected in the Clause-Schnorr
+ // signature scheme.
+ type CsRPublicPair = [ CsRPublic, CsRPublic ];
@@ -1655,7 +1660,7 @@ CSR-Withdraw
:http:statuscode:`410 Gone`:
The requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.
@@ -1776,7 +1781,7 @@ Withdraw
:http:statuscode:`410 Gone`:
A requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked.
- The response is a `DenominationExpiredMessage`. Clients must evaluate the
+ The response is a `DenominationGoneMessage`. Clients must evaluate the
error code provided to understand which of the cases this is and handle it
accordingly.
:http:statuscode:`451 Unavailable for Legal Reasons`:
@@ -1902,14 +1907,17 @@ Withdraw
}
- .. ts:def:: DenominationExpiredMessage
+ .. ts:def:: DenominationGoneMessage
- interface DenominationExpiredMessage {
+ interface DenominationGoneMessage {
// Taler error code. Note that beyond
// expiration this message format is also
// used if the key is not yet valid, or
- // has been revoked.
+ // has been revoked. May be one of
+ // - ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE``
+ // - ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_EXPIRED``
+ // - ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_REVOKED``
code: number;
// Signature by the exchange over a
@@ -2002,7 +2010,7 @@ Batch Withdraw
:http:statuscode:`410 Gone`:
A requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked.
- The response is a `DenominationExpiredMessage`. Clients must evaluate the
+ The response is a `DenominationGoneMessage`. Clients must evaluate the
error code provided to understand which of the cases this is and handle it
accordingly.
:http:statuscode:`451 Unavailable for Legal Reasons`:
@@ -3056,7 +3064,7 @@ proof to the seller for the escrow of sufficient fund.
:http:statuscode:`410 Gone`:
The requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.
:http:statuscode:`451 Unavailable For Legal Reasons`:
@@ -3392,7 +3400,7 @@ the API during normal operation.
:http:statuscode:`410 Gone`:
A requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.
@@ -3476,7 +3484,7 @@ the API during normal operation.
:http:statuscode:`410 Gone`:
The requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.
@@ -3625,7 +3633,7 @@ the API during normal operation.
:http:statuscode:`410 Gone`:
The requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.
@@ -3744,7 +3752,7 @@ the API during normal operation.
:http:statuscode:`410 Gone`:
The requested denomination key (for the fresh coins) is not yet or no longer valid.
It either before the validity start, past the expiration or was revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.
@@ -3895,7 +3903,7 @@ in using this API.
:http:statuscode:`410 Gone`:
The requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was not yet revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.
@@ -3980,7 +3988,7 @@ in using this API.
:http:statuscode:`410 Gone`:
The requested denomination key is not yet or no longer valid.
It either before the validity start, past the expiration or was not yet revoked. The response is a
- `DenominationExpiredMessage`. Clients must evaluate
+ `DenominationGoneMessage`. Clients must evaluate
the error code provided to understand which of the
cases this is and handle it accordingly.