taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit d3102b7a4e05d7aaa093c90b91c36d15b013607b
parent 43a3dca151682b7d64bcdd9872619143dad043d4
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 22 Apr 2023 22:07:55 +0200

specification for #7810

Diffstat:
Mcore/api-common.rst | 5++++-
Mcore/api-exchange.rst | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 1 deletion(-)

diff --git 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 @@ -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