commit ea8a90a9dd5a33c2eb8cc6b859030f7f43280f8e
parent 02c8f34ae7eb7f11bcaf8c9e1b6c16cbfe53eeb0
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 3 Jan 2025 21:24:28 +0100
improve spec for 'no_amount_to_wallet' flag
Diffstat:
2 files changed, 110 insertions(+), 91 deletions(-)
diff --git a/core/api-bank-integration.rst b/core/api-bank-integration.rst
@@ -29,7 +29,7 @@ to tightly integrate with GNU Taler.
.. http:get:: /config
Return the protocol version and configuration information about the bank.
- This specification corresponds to ``current`` protocol being **v4**.
+ This specification corresponds to ``current`` protocol being **v5**.
**Response:**
@@ -63,6 +63,8 @@ to tightly integrate with GNU Taler.
}
+.. _wallet-wopid-withdrawing:
+
-----------
Withdrawing
-----------
@@ -174,6 +176,14 @@ for the withdrawal operation (the ``WITHDRAWAL_ID``) to interact with the withdr
// @since **v1**
selected_exchange_account?: string;
+ // If true, tells the wallet not to allow the user to
+ // specify an amount to withdraw and to not provide
+ // any amount when registering with the withdrawal
+ // operation. The amount to withdraw will be set
+ // by the final ``/withdrawals/$WITHDRAWAL_ID/confirm`` step.
+ // @since **v5**
+ no_amount_to_wallet?: bool;
+
// @deprecated since **v1**, use ``status`` instead
// Indicates whether the withdrawal was aborted.
aborted: boolean;
diff --git a/core/api-corebank.rst b/core/api-corebank.rst
@@ -32,6 +32,94 @@ The Libeufin bank provides a minimal core banking system. In addition to that,
it provides features for local/regional currencies.
+Config
+------
+
+.. http:get:: /config
+
+ Return the protocol version and configuration information about the bank.
+ This specification corresponds to ``current`` protocol being version **v8**.
+
+ **Response:**
+
+ :http:statuscode:`200 OK`:
+ Response is a `Config`.
+
+ **Details:**
+
+ .. ts:def:: Config
+
+ interface Config {
+ // Name of the API.
+ name: "taler-corebank";
+
+ // libtool-style representation of the Bank protocol version, see
+ // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning
+ // The format is "current:revision:age".
+ version: string;
+
+ // Bank display name to be used in user interfaces.
+ // For consistency use "Taler Bank" if missing.
+ // @since **v4**, will become mandatory in the next version.
+ bank_name?: string;
+
+ // Advertised base URL to use when you sharing an URL with another
+ // program.
+ // @since **v4**.
+ base_url?: string;
+
+ // If 'true' the server provides local currency conversion support
+ // If 'false' some parts of the API are not supported and return 501
+ allow_conversion: boolean;
+
+ // If 'true' anyone can register
+ // If 'false' only admin can
+ allow_registrations: boolean;
+
+ // If 'true' account can delete themselves
+ // If 'false' only admin can delete accounts
+ allow_deletions: boolean;
+
+ // If 'true' anyone can edit their name
+ // If 'false' only admin can
+ allow_edit_name: boolean;
+
+ // If 'true' anyone can edit their cashout account
+ // If 'false' only admin can
+ allow_edit_cashout_payto_uri: boolean;
+
+ // Default debt limit for newly created accounts
+ default_debit_threshold: Amount;
+
+ // Currency used by this bank.
+ currency: string;
+
+ // How the bank SPA should render this currency.
+ currency_specification: CurrencySpecification;
+
+ // TAN channels supported by the server
+ supported_tan_channels: TanChannel[];
+
+ // Wire transfer type supported by the bank.
+ // Defaults to 'iban' is missing
+ // @since **v4**, will become mandatory in the next version.
+ wire_type?: string;
+
+ // Wire transfer execution fees. Only applies to bank transactions and withdrawals.
+ // @since **v4**, will become mandatory in the next version.
+ wire_transfer_fees?: Amount;
+
+ // Minimum wire transfer amount allowed. Only applies to bank transactions and withdrawals.
+ // @since **v4**, will become mandatory in the next version.
+ min_wire_transfer_amount?: Amount;
+
+ // Maximum wire transfer amount allowed. Only applies to bank transactions and withdrawals.
+ // @since **v4**, will become mandatory in the next version.
+ max_wire_transfer_amount?: Amount;
+ }
+
+
+
Authentication
--------------
@@ -179,92 +267,6 @@ Bank Web UI
The web UI for the bank is typically served under ``/``.
-Config
-------
-
-.. http:get:: /config
-
- Return the protocol version and configuration information about the bank.
- This specification corresponds to ``current`` protocol being version **v7**.
-
- **Response:**
-
- :http:statuscode:`200 OK`:
- Response is a `Config`.
-
- **Details:**
-
- .. ts:def:: Config
-
- interface Config {
- // Name of the API.
- name: "taler-corebank";
-
- // libtool-style representation of the Bank protocol version, see
- // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning
- // The format is "current:revision:age".
- version: string;
-
- // Bank display name to be used in user interfaces.
- // For consistency use "Taler Bank" if missing.
- // @since **v4**, will become mandatory in the next version.
- bank_name?: string;
-
- // Advertised base URL to use when you sharing an URL with another
- // program.
- // @since **v4**.
- base_url?: string;
-
- // If 'true' the server provides local currency conversion support
- // If 'false' some parts of the API are not supported and return 501
- allow_conversion: boolean;
-
- // If 'true' anyone can register
- // If 'false' only admin can
- allow_registrations: boolean;
-
- // If 'true' account can delete themselves
- // If 'false' only admin can delete accounts
- allow_deletions: boolean;
-
- // If 'true' anyone can edit their name
- // If 'false' only admin can
- allow_edit_name: boolean;
-
- // If 'true' anyone can edit their cashout account
- // If 'false' only admin can
- allow_edit_cashout_payto_uri: boolean;
-
- // Default debt limit for newly created accounts
- default_debit_threshold: Amount;
-
- // Currency used by this bank.
- currency: string;
-
- // How the bank SPA should render this currency.
- currency_specification: CurrencySpecification;
-
- // TAN channels supported by the server
- supported_tan_channels: TanChannel[];
-
- // Wire transfer type supported by the bank.
- // Defaults to 'iban' is missing
- // @since **v4**, will become mandatory in the next version.
- wire_type?: string;
-
- // Wire transfer execution fees. Only applies to bank transactions and withdrawals.
- // @since **v4**, will become mandatory in the next version.
- wire_transfer_fees?: Amount;
-
- // Minimum wire transfer amount allowed. Only applies to bank transactions and withdrawals.
- // @since **v4**, will become mandatory in the next version.
- min_wire_transfer_amount?: Amount;
-
- // Maximum wire transfer amount allowed. Only applies to bank transactions and withdrawals.
- // @since **v4**, will become mandatory in the next version.
- max_wire_transfer_amount?: Amount;
- }
-
Account Management
------------------
@@ -915,7 +917,11 @@ Account withdrawals
// @since **v6**
suggested_amount?: Amount;
- // Tells the wallet not to specify an amount
+ // If true, tell the wallet not to allow the user to
+ // specify an amount to withdraw and to not provide
+ // any amount when registering with the withdrawal
+ // operation. The amount to withdraw will be set
+ // by the final ``/withdrawals/$WITHDRAWAL_ID/confirm`` step.
// @since **v8**
no_amount_to_wallet?: bool;
}
@@ -1032,8 +1038,11 @@ Account withdrawals
// Optional since **v6**.
suggested_amount?: Amount;
- // Tells the wallet not to specify an amount
- // Given if passed with the withdrawal request.
+ // If true, the wallet must not allow the user to
+ // specify an amount to withdraw and to not provide
+ // any amount when registering with the withdrawal
+ // operation. The amount to withdraw will be set
+ // by the final ``/withdrawals/$WITHDRAWAL_ID/confirm`` step.
// @since **v8**
no_amount_to_wallet?: bool;
@@ -1327,7 +1336,7 @@ Cashouts
Solves the ``CHALLENGE_ID`` challenge and allows performing the protected operation.
When the challenge is confirmed, you can call the protected endpoint again with ``CHALLENGE_ID`` in the ``X-Challenge-Id`` HTTP header and an empty request body.
-
+
This endpoints is not authenticated for token creation challenges. Too many unsuccessful attempts to confirm token creation challenges block the account.
**Request:**