summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-04-22 22:07:55 +0200
committerChristian Grothoff <christian@grothoff.org>2023-04-22 22:08:00 +0200
commitd3102b7a4e05d7aaa093c90b91c36d15b013607b (patch)
tree270db1b72ef47737faa374047e84221ade3f3323 /core
parent43a3dca151682b7d64bcdd9872619143dad043d4 (diff)
downloaddocs-d3102b7a4e05d7aaa093c90b91c36d15b013607b.tar.gz
docs-d3102b7a4e05d7aaa093c90b91c36d15b013607b.tar.bz2
docs-d3102b7a4e05d7aaa093c90b91c36d15b013607b.zip
specification for #7810
Diffstat (limited to 'core')
-rw-r--r--core/api-common.rst5
-rw-r--r--core/api-exchange.rst59
2 files changed, 63 insertions, 1 deletions
diff --git a/core/api-common.rst b/core/api-common.rst
index ab7726a1..02cf5a1e 100644
--- a/core/api-common.rst
+++ b/core/api-common.rst
@@ -1015,6 +1015,9 @@ within the
*/
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
struct TALER_PaytoHash h_wire_details;
+ struct GNUNET_HashCode h_conversion_url;
+ struct GNUNET_HashCode h_credit_restrictions;
+ struct GNUNET_HashCode h_debit_restrictions;
};
.. _TALER_MasterWireFeePS:
@@ -1778,4 +1781,4 @@ within the
struct GNUNET_TIME_TimestampNBO expiration_time;
struct TALER_ReservePublicKeyP reserve_pub;
struct GNUNET_HashCode h_attributes;
- };
+ };
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index 38bd6459..9c1f9031 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -547,12 +547,71 @@ possibly by using HTTPS.
// ``payto://`` URI identifying the account and wire method
payto_uri: string;
+ // URI to convert amounts from or to the currency used by
+ // this wire account of the exchange. Missing if no
+ // conversion is applicable.
+ conversion_url?: string;
+
+ // Restrictions that apply to bank accounts that would send
+ // funds to the exchange (crediting this exchange bank account).
+ // Optional, empty array for unrestricted.
+ credit_restrictions: AccountRestriction[];
+
+ // Restrictions that apply to bank accounts that would receive
+ // funds from the exchange (debiting this exchange bank account).
+ // Optional, empty array for unrestricted.
+ debit_restrictions: AccountRestriction[];
+
// Signature using the exchange's offline key over
// a `TALER_MasterWireDetailsPS`
// with purpose ``TALER_SIGNATURE_MASTER_WIRE_DETAILS``.
master_sig: EddsaSignature;
}
+ .. ts:def:: AccountRestriction
+
+ type AccountRestriction =
+ RegexAccountRestriction |
+ DenyAllAccountRestriction
+
+ .. ts:def:: DenyAllAccountRestriction
+
+ // Account restriction that disables this type of
+ // account for the indicated operation categorically.
+ interface DenyAllAccountRestriction {
+
+ type: "deny";
+ }
+
+ .. ts:def:: RegexAccountRestriction
+
+ // Accounts interacting with this type of account
+ // restriction must have a payto://-URI matching
+ // the given regex.
+ interface RegexAccountRestriction {
+
+ type: "regex";
+
+ // Regular expression that the payto://-URI of the
+ // partner account must follow. The regular expression
+ // should follow posix-egrep, but without support for character
+ // classes, GNU extensions, back-references or intervals. See
+ // https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002degrep-regular-expression-syntax.html
+ // for a description of the posix-egrep syntax. Applications
+ // may support regexes with additional features, but exchanges
+ // must not use such regexes.
+ payto_regex: string;
+
+ // Hint for a human to understand the restriction
+ // (that is hopefully easier to comprehend than the regex itself).
+ human_hint: string;
+
+ // Map from IETF BCP 47 language tags to localized
+ // human hints.
+ human_hint_i18n?: { [lang_tag: string]: string };
+
+ }
+
Aggregate wire transfer fees representing the fees the exchange
charges per wire transfer to a merchant must be specified as an
array in all wire transfer response objects under ``fees``. The