commit ee829bc8d16b114ce05dbebe50b87becf744678b
parent 233d5da4edf8d94f793b48a657fd8af746285194
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 3 Apr 2026 12:55:22 +0200
more spec fixes
Diffstat:
3 files changed, 53 insertions(+), 19 deletions(-)
diff --git a/core/exchange/post-reserves-RESERVE_PUB-close.rst b/core/exchange/post-reserves-RESERVE_PUB-close.rst
@@ -14,7 +14,10 @@
**Response:**
:http:statuscode:`200 OK`:
- The exchange responds with a `ReserveCloseResponse` object.
+ The exchange responds with a `ReserveCloseResponse` object. Note
+ that if the reserve balance is less than the closing fee, the
+ server will just return an amount of zero and simply not wire any
+ funds.
:http:statuscode:`400 Bad Request`:
The request timestamp has excessive clock skew.
This response comes with a standard `ErrorDetail` response with
diff --git a/core/exchange/post-reserves-RESERVE_PUB-purse.rst b/core/exchange/post-reserves-RESERVE_PUB-purse.rst
@@ -16,38 +16,57 @@
The request is invalid. In addition to generic error codes,
the following specific error codes may be returned:
- 1. ``TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_BEFORE_NOW``: The requested purse expiration time is in the past.
+ 1. ``TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_BEFORE_NOW``:
+ The requested purse expiration time is in the past.
+ 2. ``TALER_EC_EXCHANGE_RESERVES_PURSE_CREATE_INSUFFICIENT_FUNDS``:
+ The reserve does not have enough funds to create this reserve.
+ 3. ``TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_IS_NEVER``:
+ A purse expiration time of "never" is not allowed.
+ 4. ``TALER_EC_EXCHANGE_RESERVES_PURSE_FEE_TOO_LOW``:
+ The specified purse fee is lower than allowed.
- :http:statuscode:`402 Payment Required`:
- The account needs to contain more funding to create more purses.
- This response comes with a standard `ErrorDetail` response.
:http:statuscode:`403 Forbidden`:
Account or contract signature is invalid.
This response comes with a standard `ErrorDetail` response.
+ Returned with error codes of:
+ - ``TALER_EC_EXCHANGE_PURSE_CREATE_SIGNATURE_INVALID``
+ - ``TALER_EC_EXCHANGE_PURSE_ECONTRACT_SIGNATURE_INVALID``
+ - ``TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID``
+ - ``TALER_EC_EXCHANGE_RESERVES_RESERVE_MERGE_SIGNATURE_INVALID``
+
:http:statuscode:`404 Not found`:
The purse creation operation failed as we could not find the reserve.
This response comes with a standard `ErrorDetail` response.
- :http:statuscode:`410 Gone`:
- The purse has expired.
- This response comes with a standard `ErrorDetail` response with
- a code of ``TALER_EC_EXCHANGE_GENERIC_PURSE_EXPIRED``.
+ Returned with an EC of ``TALER_EC_EXCHANGE_GENERIC_RESERVE_UNKNOWN``
:http:statuscode:`409 Conflict`:
The purse creation failed because a purse with
the same public key but different meta data was
- created previously. Which specific conflict it is
- can be decided by looking at the error code
- (``TALER_EC_EXCHANGE_PURSE_CREATE_CONFLICTING_META_DATA`` or
- ``TALER_EC_EXCHANGE_PURSE_DEPOSIT_CONFLICTING_META_DATA`` or
- ``TALER_EC_EXCHANGE_PURSE_ECONTRACT_CONFLICTING_META_DATA``).
+ created previously or the funds for the operation
+ were insufficient. Which specific conflict it is
+ can be decided by looking at the error code:
+ - ``TALER_EC_EXCHANGE_PURSE_CREATE_CONFLICTING_META_DATA``
+ - ``TALER_EC_EXCHANGE_PURSE_DEPOSIT_CONFLICTING_META_DATA``
+ - ``TALER_EC_EXCHANGE_PURSE_ECONTRACT_CONFLICTING_META_DATA``
+ - ``TALER_EC_EXCHANGE_RESERVES_PURSE_CREATE_INSUFFICIENT_FUNDS``
+ - ``TALER_EC_EXCHANGE_RESERVES_PURSE_CREATE_CONFLICTING_META_DATA``
The specific fields of the response depend on the error code
and include the signatures (and what was signed over) proving the
conflict.
The response will be a `PurseConflict` response
(but not a `DepositDoubleSpendError`).
+ :http:statuscode:`410 Gone`:
+ The purse has expired.
+ This response comes with a standard `ErrorDetail` response with
+ a code of ``TALER_EC_EXCHANGE_GENERIC_PURSE_EXPIRED``.
:http:statuscode:`451 Unavailable For Legal Reasons`:
This account has not yet passed the KYC checks.
The client must pass KYC checks before proceeding with the merge.
The response will be an `LegitimizationNeededResponse` object.
+ :http:statuscode:`503 Service unavailable`:
+ The server could not process the request because it is currently
+ unavailable. Error codes include:
+ - ``TALER_EC_EXCHANGE_GENERIC_KEYS_MISSING``
+ - ``TALER_EC_EXCHANGE_GENERIC_GLOBAL_FEES_MISSING``
**Details:**
@@ -68,7 +87,7 @@
// for the purse creation. Optional, if not present
// the purse is to be created from the purse quota
// of the reserve.
- purse_fee: Amount;
+ purse_fee?: Amount;
// Optional encrypted contract, in case the buyer is
// proposing the contract and thus establishing the
diff --git a/core/exchange/post-reveal-withdraw.rst b/core/exchange/post-reveal-withdraw.rst
@@ -16,8 +16,13 @@
:http:statuscode:`200 OK`:
The coin's' secret material matched the commitment and the original request was well-formed.
The response body is a `RevealResponse`.
+ :http:statuscode:`400 Bad request:`
+ The request from the client is malformed. Error codes used are:
+ - ``TALER_EC_GENERIC_PARAMETER_MALFORMED``
+ - ``TALER_EC_EXCHANGE_WITHDRAW_REVEAL_INVALID_HASH``
:http:statuscode:`404 Not found`:
The provided commitment $RCH is unknown.
+ Error code: ``TALER_EC_EXCHANGE_WITHDRAW_COMMITMENT_UNKNOWN``
:http:statuscode:`409 Conflict`:
There is a problem between the original commitment and the revealed secret data.
The returned information is proof of the mismatch,
@@ -35,7 +40,16 @@
- The computation of the hash of the commitment with provided input does
result in the value of field ``h_commitment``.
Error code:
- ``TALER_EC_EXCHANGE_AGE_WITHDRAW_REVEAL_INVALID_HASH``
+ ``TALER_EC_EXCHANGE_WITHDRAW_REVEAL_INVALID_HASH``
+ :http:statuscode:`500 Internal Server Error`:
+ Returned if the server had an internal issue processing the request.
+ Error codes include:
+ - ``TALER_EC_GENERIC_DB_FETCH_FAILED``
+ - ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``
+ :http:statuscode:`503 Service unavailable`:
+ The server could not process the request because it is currently
+ unavailable. Error codes include:
+ - ``TALER_EC_EXCHANGE_GENERIC_KEYS_MISSING``
**Details:**
@@ -45,10 +59,8 @@
.. ts:def:: RevealWithdrawRequest
interface RevealWithdrawRequest {
- // The reserve's public key from the previous call to ``/withdraw``.
- reserve_pub: string;
- // This is the h_planchets running hash of all blinded planchets
+ // This is the running hash of all blinded planchets
// from the previous call to ``/withdraw``.
planchets_h: string;