commit d7d95ad5efa18a3da0dbbb1e8ac7c8b5dca72e59
parent 79ad50987d5cd670793cf0e75e5cb062770d246c
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 5 Feb 2024 11:51:00 +0100
add 'implementation' field to /config responses, for now not mandatory
Diffstat:
8 files changed, 49 insertions(+), 14 deletions(-)
diff --git a/core/api-auditor.rst b/core/api-auditor.rst
@@ -56,6 +56,7 @@ know-your-customer (KYC) registration before issuing contracts.
.. http:get:: /config
Get the protocol version and some meta data about the auditor.
+ This specification corresponds to ``current`` protocol being version **0**.
**Response:**
@@ -75,6 +76,10 @@ know-your-customer (KYC) registration before issuing contracts.
// protocol is versioned independently of the exchange's protocol.
version: string;
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v0, may become mandatory in the future.
+ implementation?: string;
+
// Return which currency this auditor is auditing for.
currency: string;
diff --git a/core/api-bank-conversion-info.rst b/core/api-bank-conversion-info.rst
@@ -48,10 +48,14 @@ is used by wallets for withdrawals that involve a currency conversion.
// https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning
// The format is "current:revision:age".
version: string;
-
+
// Name of the API.
name: "taler-conversion-info";
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v4, may become mandatory in the future.
+ implementation?: string;
+
// Currency used by this bank.
regional_currency: string;
@@ -65,9 +69,9 @@ is used by wallets for withdrawals that involve a currency conversion.
fiat_currency_specification: CurrencySpecification;
// Additional information on conversion rates.
- // Those informations should never be used to perform conversions,
+ // Those informations should never be used to perform conversions,
// use /cashin-rate or /cashout-rate instead.
- // Conversion rates can change at any time. Clients must deal with
+ // Conversion rates can change at any time. Clients must deal with
// any resulting errors and call /cashin-rate or /cashout-rate again
// to use the new rates.
conversion_rate: ConversionRate;
@@ -91,7 +95,7 @@ is used by wallets for withdrawals that involve a currency conversion.
deducted from their fiat bank account.
or
-
+
:query amount_credit: this is the amount that the user will receive
in their regional bank account.
@@ -100,7 +104,7 @@ is used by wallets for withdrawals that involve a currency conversion.
:http:statuscode:`200 OK`:
Response is a `CashinConversionResponse`.
:http:statuscode:`400 Bad request`:
- * ``TALER_EC_GENERIC_PARAMETER_MISSING`` : none of the parameters have been provided.
+ * ``TALER_EC_GENERIC_PARAMETER_MISSING`` : none of the parameters have been provided.
* ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` : both of the parameters have been provided or one of them is not a valid Taler amount.
* ``TALER_EC_GENERIC_CURRENCY_MISMATCH`` : the parameter is in the wrong currency.
:http:statuscode:`409 Conflict`:
@@ -137,7 +141,7 @@ is used by wallets for withdrawals that involve a currency conversion.
deducted from their regional bank account.
or
-
+
:query amount_credit: this is the amount that the user will receive
in their fiat bank account.
@@ -146,7 +150,7 @@ is used by wallets for withdrawals that involve a currency conversion.
:http:statuscode:`200 OK`:
Response is a `CashoutConversionResponse`.
:http:statuscode:`400 Bad request`:
- * ``TALER_EC_GENERIC_PARAMETER_MISSING`` : none of the parameters have been provided.
+ * ``TALER_EC_GENERIC_PARAMETER_MISSING`` : none of the parameters have been provided.
* ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` : both of the parameters have been provided or one of them is not a valid Taler amount.
* ``TALER_EC_GENERIC_CURRENCY_MISMATCH`` : the parameter is in the wrong currency.
:http:statuscode:`409 Conflict`:
@@ -169,17 +173,17 @@ is used by wallets for withdrawals that involve a currency conversion.
.. http:post:: /conversion-rate
- This endpoint allows the administrator to update
+ This endpoint allows the administrator to update
the exchange rate between the regional currency
and the fiat currency of the banking system.
**Request:**
.. ts:def:: ConversionRate
-
+
interface ConversionRate {
// Exchange rate to buy regional currency from fiat
- cashin_ratio: DecimalNumber;
+ cashin_ratio: DecimalNumber;
// Regional amount fee to subtract after applying the cashin ratio.
cashin_fee: Amount;
@@ -194,7 +198,7 @@ is used by wallets for withdrawals that involve a currency conversion.
cashin_rounding_mode: "zero" | "up" | "nearest";
// Exchange rate to sell regional currency for fiat
- cashout_ratio: DecimalNumber;
+ cashout_ratio: DecimalNumber;
// Fiat amount fee to subtract after applying the cashout ratio.
cashout_fee: Amount;
diff --git a/core/api-bank-integration.rst b/core/api-bank-integration.rst
@@ -50,6 +50,10 @@ to tightly integrate with GNU Taler.
// The format is "current:revision:age".
version: string;
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v2, may become mandatory in the future.
+ implementation?: string;
+
// Currency used by this bank.
currency: string;
@@ -169,7 +173,7 @@ for the withdrawal operation (the ``WITHDRAWAL_ID``) to interact with the withdr
:http:statuscode:`404 Not found`:
The bank does not know about a withdrawal operation with the specified ``WITHDRAWAL_ID``.
:http:statuscode:`409 Conflict`:
- * ``TALER_EC_BANK_WITHDRAWAL_OPERATION_RESERVE_SELECTION_CONFLICT`` :
+ * ``TALER_EC_BANK_WITHDRAWAL_OPERATION_RESERVE_SELECTION_CONFLICT`` :
The wallet selected a different exchange or reserve public key under the same withdrawal ID.
* ``TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT`` : the reserve public key is already used.
* ``TALER_EC_BANK_UNKNOWN_ACCOUNT`` : the selected exchange account was not found.
@@ -208,9 +212,9 @@ for the withdrawal operation (the ``WITHDRAWAL_ID``) to interact with the withdr
**Response:**
- :http:statuscode:`204 No content`:
+ :http:statuscode:`204 No content`:
The withdrawal operation has been aborted.
:http:statuscode:`404 Not found`:
The withdrawal operation was not found.
- :http:statuscode:`409 Conflict`:
+ :http:statuscode:`409 Conflict`:
The withdrawal operation has been confirmed previously and can't be aborted.
diff --git a/core/api-bank-revenue.rst b/core/api-bank-revenue.rst
@@ -48,6 +48,10 @@ used by the merchant (or other parties) to query for incoming transactions to th
// Currency used by this gateway.
currency: string;
+
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v0, may become mandatory in the future.
+ implementation?: string;
}
diff --git a/core/api-bank-wire.rst b/core/api-bank-wire.rst
@@ -52,6 +52,10 @@ LibEuFin (work in progress).
// Currency used by this gateway.
currency: string;
+
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v0, may become mandatory in the future.
+ implementation?: string;
}
--------------
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
@@ -62,6 +62,7 @@ possibly by using HTTPS.
as well as the list of possible KYC requirements. This endpoint is largely
for the SPA for AML officers. Merchants should use ``/keys`` which also
contains the protocol version and currency.
+ This specification corresponds to ``current`` protocol being version **18**.
**Response:**
@@ -79,6 +80,10 @@ possibly by using HTTPS.
// Name of the protocol.
name: "taler-exchange";
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v18, may become mandatory in the future.
+ implementation?: string;
+
// Currency supported by this exchange, given
// as a currency code ("USD" or "EUR").
currency: string;
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
@@ -139,6 +139,10 @@ such as the implemented version of the protocol and the currency used.
// Name of the protocol.
name: "taler-merchant";
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v8, may become mandatory in the future.
+ implementation?: string;
+
// Default (!) currency supported by this backend.
// This is the currency that the backend should
// suggest by default to the user when entering
diff --git a/core/api-sync.rst b/core/api-sync.rst
@@ -114,6 +114,7 @@ Receiving Configuration
.. http:get:: /config
Obtain the key configuration settings of the storage service.
+ This specification corresponds to ``current`` protocol being version **2**.
**Response:**
@@ -139,6 +140,10 @@ Receiving Configuration
// The format is "current:revision:age".
version: string;
+ // URN of the implementation (needed to interpret 'revision' in version).
+ // @since v2, may become mandatory in the future.
+ implementation?: string;
+
}
.. _sync: