commit 067e371ec700429d3bfcbec0c27df34506e0dda9
parent 79155838c0e731026b75bb0e7131c69abd7cbfb0
Author: Özgür Kesim <oec-taler@kesim.org>
Date: Sat, 12 Apr 2025 00:34:24 +0200
[exchange] cleanup
Diffstat:
| M | core/api-exchange.rst | | | 189 | ++++++++++++++++++++++++++++++++++++++----------------------------------------- |
1 file changed, 91 insertions(+), 98 deletions(-)
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
@@ -1646,92 +1646,6 @@ exchange.
}
-CSR-Withdraw
-~~~~~~~~~~~~
-
-.. note:: This endpoint is deprecated starting with API version v26.
- Use ``/blinding-prepare`` instead.
-
-.. http:post:: /csr-withdraw
-
- Obtain exchange-side input values in preparation for a
- withdraw step for certain denomination cipher types,
- specifically at this point for Clause-Schnorr blind
- signatures.
-
- **Request:** The request body must be a `WithdrawPrepareRequest` object.
-
- **Response:**
-
- :http:statuscode:`200 OK`:
- The request was successful, and the response is a `WithdrawPrepareResponse`. Note that repeating exactly the same request
- will again yield the same response (assuming none of the denomination is expired).
- :http:statuscode:`404 Not found`:
- The denomination key is not known to the exchange.
- :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
- `DenominationGoneMessage`. Clients must evaluate
- the error code provided to understand which of the
- cases this is and handle it accordingly.
-
- **Details:**
-
- .. ts:def:: WithdrawPrepareRequest
-
- interface WithdrawPrepareRequest {
-
- // Nonce to be used by the exchange to derive
- // its private inputs from. Must not have ever
- // been used before.
- nonce: CSNonce;
-
- // Hash of the public key of the denomination the
- // request relates to.
- denom_pub_hash: HashCode;
-
- }
-
- .. ts:def:: WithdrawPrepareResponse
-
- type WithdrawPrepareResponse =
- | ExchangeWithdrawValue;
-
- .. ts:def:: ExchangeWithdrawValue
-
- type ExchangeWithdrawValue = DenomCipher & (
- | ExchangeRsaWithdrawValue
- | ExchangeCsWithdrawValue
- );
-
- .. ts:def:: DenomCipher
-
- interface DenomCipher {
- cipher: "RSA" | "CS";
- }
-
- .. ts:def:: ExchangeRsaWithdrawValue
-
- interface ExchangeRsaWithdrawValue extends DenomCipher {
- cipher: "RSA";
- }
-
- .. ts:def:: ExchangeCsWithdrawValue
-
- interface ExchangeCsWithdrawValue extends DenomCipher {
- cipher: "CS";
-
- // CSR R0 value
- r_pub_0: CSRPublic;
-
- // CSR R1 value
- r_pub_1: CSRPublic;
- }
-
-
-Withdraw
-~~~~~~~~
-
.. http:post:: /withdraw
.. note::
@@ -1991,9 +1905,85 @@ Withdraw
}
+.. http:post:: /csr-withdraw
+
+ .. note:: This endpoint is deprecated starting with API version v26.
+ Use ``/blinding-prepare`` instead.
+
+ Obtain exchange-side input values in preparation for a
+ withdraw step for certain denomination cipher types,
+ specifically at this point for Clause-Schnorr blind
+ signatures.
+
+ **Request:** The request body must be a `WithdrawPrepareRequest` object.
+
+ **Response:**
+
+ :http:statuscode:`200 OK`:
+ The request was successful, and the response is a `WithdrawPrepareResponse`. Note that repeating exactly the same request
+ will again yield the same response (assuming none of the denomination is expired).
+ :http:statuscode:`404 Not found`:
+ The denomination key is not known to the exchange.
+ :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
+ `DenominationGoneMessage`. Clients must evaluate
+ the error code provided to understand which of the
+ cases this is and handle it accordingly.
+
+ **Details:**
+
+ .. ts:def:: WithdrawPrepareRequest
+
+ interface WithdrawPrepareRequest {
+
+ // Nonce to be used by the exchange to derive
+ // its private inputs from. Must not have ever
+ // been used before.
+ nonce: CSNonce;
+
+ // Hash of the public key of the denomination the
+ // request relates to.
+ denom_pub_hash: HashCode;
+
+ }
+
+ .. ts:def:: WithdrawPrepareResponse
+
+ type WithdrawPrepareResponse =
+ | ExchangeWithdrawValue;
+
+ .. ts:def:: ExchangeWithdrawValue
+
+ type ExchangeWithdrawValue = DenomCipher & (
+ | ExchangeRsaWithdrawValue
+ | ExchangeCsWithdrawValue
+ );
+
+ .. ts:def:: DenomCipher
+
+ interface DenomCipher {
+ cipher: "RSA" | "CS";
+ }
+
+ .. ts:def:: ExchangeRsaWithdrawValue
+
+ interface ExchangeRsaWithdrawValue extends DenomCipher {
+ cipher: "RSA";
+ }
+
+ .. ts:def:: ExchangeCsWithdrawValue
+
+ interface ExchangeCsWithdrawValue extends DenomCipher {
+ cipher: "CS";
+
+ // CSR R0 value
+ r_pub_0: CSRPublic;
+
+ // CSR R1 value
+ r_pub_1: CSRPublic;
+ }
-Batch Withdraw
-~~~~~~~~~~~~~~
.. http:post:: /reserves/$RESERVE_PUB/batch-withdraw
@@ -2306,7 +2296,7 @@ These endpoints are called by the client
// The value for ``PublishedAgeRestrictionBaseKey`` is a randomly chosen
// `Edx25519PublicKey` for which the private key is not known to the clients. It is
- // used during the age-withdraw protocol so that clients can proof that they
+ // used during the age-withdraw protocol so that clients can prove that they
// derived all public keys to age groups higher than their allowed maximum
// from this particular value.
const PublishedAgeRestrictionBaseKey =
@@ -2329,14 +2319,16 @@ Reserve History
The GET request should come with the following HTTP headers:
- *If-None-Match*: The client MAY provide an ``If-None-Match`` header with an
- Etag. In that case, the server MUST additionally respond with an ``304``
- status code in case the reserve history matches the provided Etag.
+ ``If-None-Match``:
+ The client MAY provide an ``If-None-Match`` header with an
+ Etag. In that case, the server MUST additionally respond with an ``304``
+ status code in case the reserve history matches the provided Etag.
- *Taler-Reserve-History-Signature*: The client MUST provide Base-32 encoded
- EdDSA signature over a TALER_SIGNATURE_RESERVE_HISTORY_REQUEST made with
- the respective ``$RESERVE_PRIV``, affirming desire to download the current
- reserve transaction history.
+ ``Taler-Reserve-History-Signature``:
+ The client MUST provide Base-32 encoded
+ EdDSA signature over a ``TALER_SIGNATURE_RESERVE_HISTORY_REQUEST`` made with
+ the respective ``$RESERVE_PRIV``, affirming desire to download the current
+ reserve transaction history.
:query start=OFFSET: *Optional.* Only return reserve history entries with
offsets above the given OFFSET. Allows clients to not
@@ -2479,8 +2471,9 @@ Reserve History
// call to /withdraw.
h_planchets: HashCode;
- // The array of blinded coins to be signed.
- h_coin_evs: HashCode[];
+ // The blinding seed that was provided. It will be NULL if
+ // no denominations of cipher type Clause-Schnorr were invovled
+ blinding_seed?: BlindingMasterSeed;
// The array of hashes of public key of denominations for the coins.
denom_pub_hashes: HashCode[];