exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 1c1b644dfb916293acaaf4d98d1b962083fb6ec5
parent 81c9ee198206f0b8890faa2a74d2b4ef0bb1a344
Author: Florian Dold <florian@dold.me>
Date:   Sat, 30 May 2026 01:30:50 +0200

fix wire_transfer_gateway vs prepared_transfer_url

The wire transfer API was already an established name/concept.  Calling
a new service wire transfer gateway would've been excessively confusing.

As a drive-by change, this commit also removes the unused and
undocumented OPEN_BANKING_GATEWAY and WIRE_TRANSFER_GATEWAY config
options.

Renaming the database column for the wire_transfer_gateway can be done
at a later time, as it does not affect the exchange API.

Diffstat:
Msrc/exchange-tools/taler-exchange-offline.c | 34+++++++++++++++++-----------------
Msrc/exchange/taler-exchange-httpd.c | 43-------------------------------------------
Msrc/exchange/taler-exchange-httpd_get-keys.c | 10+++++-----
Msrc/exchange/taler-exchange-httpd_post-management-wire.c | 14+++++++-------
Msrc/exchangedb/get_wire_accounts.c | 7++++---
Msrc/exchangedb/insert_wire.c | 9+++++----
Msrc/exchangedb/sql-schema/0010-wire_accounts.sql | 2+-
Msrc/exchangedb/update_wire.c | 6+++---
Msrc/include/exchange-database/get_wire_accounts.h | 8++++----
Msrc/include/exchange-database/insert_wire.h | 4++--
Msrc/include/exchange-database/update_wire.h | 4++--
Msrc/include/taler/exchange/get-keys.h | 2+-
Msrc/include/taler/exchange/post-management-wire.h | 14+++++++-------
Msrc/include/taler/taler_crypto_lib.h | 16++++++++--------
Msrc/lib/exchange_api_common.c | 16++++++++--------
Msrc/lib/exchange_api_handle.c | 4++--
Msrc/lib/exchange_api_post-management-wire.c | 18+++++++++---------
Msrc/util/offline_signatures.c | 52++++++++++++++++++++++++++--------------------------
18 files changed, 111 insertions(+), 152 deletions(-)

diff --git a/src/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c @@ -1616,7 +1616,7 @@ upload_wire_add (const char *exchange_url, const char *err_name; const char *conversion_url = NULL; const char *open_banking_gateway = NULL; - const char *wire_transfer_gateway = NULL; + const char *prepared_transfer_url = NULL; const char *bank_label = NULL; int64_t priority = 0; const json_t *debit_restrictions; @@ -1634,8 +1634,8 @@ upload_wire_add (const char *exchange_url, &open_banking_gateway), NULL), GNUNET_JSON_spec_mark_optional ( - TALER_JSON_spec_web_url ("wire_transfer_gateway", - &wire_transfer_gateway), + TALER_JSON_spec_web_url ("prepared_transfer_url", + &prepared_transfer_url), NULL), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ("bank_label", @@ -1718,8 +1718,8 @@ upload_wire_add (const char *exchange_url, TALER_EXCHANGE_post_management_wire_option_conversion_url (conversion_url), TALER_EXCHANGE_post_management_wire_option_open_banking_gateway ( open_banking_gateway), - TALER_EXCHANGE_post_management_wire_option_wire_transfer_gateway ( - wire_transfer_gateway), + TALER_EXCHANGE_post_management_wire_option_prepared_transfer_url ( + prepared_transfer_url), TALER_EXCHANGE_post_management_wire_option_debit_restrictions ( debit_restrictions), TALER_EXCHANGE_post_management_wire_option_credit_restrictions ( @@ -3186,7 +3186,7 @@ do_add_wire (char *const *args) struct GNUNET_TIME_Timestamp now; const char *conversion_url = NULL; const char *open_banking_gateway = NULL; - const char *wire_transfer_gateway = NULL; + const char *prepared_transfer_url = NULL; const char *bank_label = NULL; int64_t priority = 0; json_t *debit_restrictions; @@ -3313,25 +3313,25 @@ do_add_wire (char *const *args) } if (0 == strcmp (args[num_args], - "wire-transfer-gateway")) + "prepared-transfer-url")) { num_args++; - wire_transfer_gateway = args[num_args]; - if (NULL == wire_transfer_gateway) + prepared_transfer_url = args[num_args]; + if (NULL == prepared_transfer_url) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "'wire-transfer-gateway' requires an argument\n"); + "'prepared-transfer-url' requires an argument\n"); global_ret = EXIT_INVALIDARGUMENT; GNUNET_SCHEDULER_shutdown (); json_decref (debit_restrictions); json_decref (credit_restrictions); return; } - if (! TALER_is_web_url (wire_transfer_gateway)) + if (! TALER_is_web_url (prepared_transfer_url)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "'wire-transfer-gateway' must refer to HTTP(S) endpoint, `%s' is invalid\n", - wire_transfer_gateway); + "'prepared-transfer-url' must refer to HTTP(S) endpoint, `%s' is invalid\n", + prepared_transfer_url); global_ret = EXIT_INVALIDARGUMENT; GNUNET_SCHEDULER_shutdown (); json_decref (debit_restrictions); @@ -3423,7 +3423,7 @@ do_add_wire (char *const *args) TALER_exchange_offline_wire_add_sign (payto_uri, conversion_url, open_banking_gateway, - wire_transfer_gateway, + prepared_transfer_url, debit_restrictions, credit_restrictions, now, @@ -3432,7 +3432,7 @@ do_add_wire (char *const *args) TALER_exchange_wire_signature_make (payto_uri, conversion_url, open_banking_gateway, - wire_transfer_gateway, + prepared_transfer_url, debit_restrictions, credit_restrictions, &master_priv, @@ -3452,8 +3452,8 @@ do_add_wire (char *const *args) GNUNET_JSON_pack_string ("open_banking_gateway", open_banking_gateway)), GNUNET_JSON_pack_allow_null ( - GNUNET_JSON_pack_string ("wire_transfer_gateway", - wire_transfer_gateway)), + GNUNET_JSON_pack_string ("prepared_transfer_url", + prepared_transfer_url)), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_string ("bank_label", bank_label)), diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c @@ -151,10 +151,6 @@ json_t *TEH_zero_limits; char *TEH_shopping_url; -char *TEH_obg_url; - -char *TEH_wire_transfer_gateway; - /** * Where to redirect users from "/"? */ @@ -2367,45 +2363,6 @@ exchange_serve_process_config (const char *cfg_fn) "invalid URL"); return GNUNET_SYSERR; } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (TEH_cfg, - "exchange", - "OPEN_BANKING_GATEWAY_URL", - &TEH_obg_url)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO, - "exchange", - "OPEN_BANKING_GATEWAY_URL"); - } - if ( (NULL != TEH_obg_url) && - (! TALER_is_web_url (TEH_obg_url)) ) - { - GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "exchange", - "OPEN_BANKING_GATEWAY_URL", - "invalid URL"); - return GNUNET_SYSERR; - } - - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (TEH_cfg, - "exchange", - "WIRE_TRANSFER_GATEWAY_URL", - &TEH_wire_transfer_gateway)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO, - "exchange", - "WIRE_TRANSFER_GATEWAY_URL"); - } - if ( (NULL != TEH_wire_transfer_gateway) && - (! TALER_is_web_url (TEH_wire_transfer_gateway)) ) - { - GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "exchange", - "WIRE_TRANSFER_GATEWAY_URL", - "invalid URL"); - return GNUNET_SYSERR; - } { char *master_public_key_str; diff --git a/src/exchange/taler-exchange-httpd_get-keys.c b/src/exchange/taler-exchange-httpd_get-keys.c @@ -484,7 +484,7 @@ wire_update_event_cb (void *cls, * @param payto_uri the exchange bank account URI to add * @param conversion_url URL of a conversion service, NULL if there is no conversion * @param open_banking_gateway URL of an open banking gateway, NULL if there is none - * @param wire_transfer_gateway URL of a wire transfer gateway, NULL if there is none + * @param prepared_transfer_url URL of a wire transfer gateway, NULL if there is none * @param debit_restrictions JSON array with debit restrictions on the account * @param credit_restrictions JSON array with credit restrictions on the account * @param master_sig master key signature affirming that this is a bank @@ -498,7 +498,7 @@ add_wire_account ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, const struct TALER_MasterSignatureP *master_sig, @@ -512,7 +512,7 @@ add_wire_account ( payto_uri, conversion_url, open_banking_gateway, - wire_transfer_gateway, + prepared_transfer_url, debit_restrictions, credit_restrictions, &TEH_master_public_key, @@ -539,8 +539,8 @@ add_wire_account ( open_banking_gateway)), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_string ( - "wire_transfer_gateway", - wire_transfer_gateway)), + "prepared_transfer_url", + prepared_transfer_url)), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_string ( "bank_label", diff --git a/src/exchange/taler-exchange-httpd_post-management-wire.c b/src/exchange/taler-exchange-httpd_post-management-wire.c @@ -68,7 +68,7 @@ struct AddWireContext /** * (optional) address of a wire transfer gateway service for this account. */ - const char *wire_transfer_gateway; + const char *prepared_transfer_url; /** * Restrictions imposed when crediting this account. @@ -152,7 +152,7 @@ add_wire (void *cls, awc->payto_uri, awc->conversion_url, awc->open_banking_gateway, - awc->wire_transfer_gateway, + awc->prepared_transfer_url, awc->debit_restrictions, awc->credit_restrictions, awc->validity_start, @@ -164,7 +164,7 @@ add_wire (void *cls, awc->payto_uri, awc->conversion_url, awc->open_banking_gateway, - awc->wire_transfer_gateway, + awc->prepared_transfer_url, awc->debit_restrictions, awc->credit_restrictions, awc->validity_start, @@ -213,8 +213,8 @@ TEH_handler_management_post_wire ( &awc.open_banking_gateway), NULL), GNUNET_JSON_spec_mark_optional ( - TALER_JSON_spec_web_url ("wire_transfer_gateway", - &awc.wire_transfer_gateway), + TALER_JSON_spec_web_url ("prepared_transfer_url", + &awc.prepared_transfer_url), NULL), GNUNET_JSON_spec_array_const ("credit_restrictions", &awc.credit_restrictions), @@ -266,7 +266,7 @@ TEH_handler_management_post_wire ( awc.payto_uri, awc.conversion_url, awc.open_banking_gateway, - awc.wire_transfer_gateway, + awc.prepared_transfer_url, awc.debit_restrictions, awc.credit_restrictions, awc.validity_start, @@ -287,7 +287,7 @@ TEH_handler_management_post_wire ( awc.payto_uri, awc.conversion_url, awc.open_banking_gateway, - awc.wire_transfer_gateway, + awc.prepared_transfer_url, awc.debit_restrictions, awc.credit_restrictions, &TEH_master_public_key, diff --git a/src/exchangedb/get_wire_accounts.c b/src/exchangedb/get_wire_accounts.c @@ -65,7 +65,7 @@ get_wire_accounts_cb (void *cls, struct TALER_FullPayto payto_uri; char *conversion_url = NULL; char *open_banking_gateway = NULL; - char *wire_transfer_gateway = NULL; + char *prepared_transfer_url = NULL; json_t *debit_restrictions = NULL; json_t *credit_restrictions = NULL; struct TALER_MasterSignatureP master_sig; @@ -83,8 +83,9 @@ get_wire_accounts_cb (void *cls, &open_banking_gateway), NULL), GNUNET_PQ_result_spec_allow_null ( + /* FIXME: rename in database migration */ GNUNET_PQ_result_spec_string ("wire_transfer_gateway", - &wire_transfer_gateway), + &prepared_transfer_url), NULL), GNUNET_PQ_result_spec_allow_null ( GNUNET_PQ_result_spec_string ("bank_label", @@ -128,7 +129,7 @@ get_wire_accounts_cb (void *cls, payto_uri, conversion_url, open_banking_gateway, - wire_transfer_gateway, + prepared_transfer_url, debit_restrictions, credit_restrictions, &master_sig, diff --git a/src/exchangedb/insert_wire.c b/src/exchangedb/insert_wire.c @@ -29,7 +29,7 @@ TALER_EXCHANGEDB_insert_wire ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp start_date, @@ -53,12 +53,13 @@ TALER_EXCHANGEDB_insert_wire ( NULL == open_banking_gateway ? GNUNET_PQ_query_param_null () : GNUNET_PQ_query_param_string (open_banking_gateway), - NULL == wire_transfer_gateway + NULL == prepared_transfer_url ? GNUNET_PQ_query_param_null () - : GNUNET_PQ_query_param_string (wire_transfer_gateway), + : GNUNET_PQ_query_param_string (prepared_transfer_url), GNUNET_PQ_query_param_end }; - + // FIXME: Also rename the wire_transfer_gateway column to prepared_transfer_url + // via schema migration. PREPARE (pg, "insert_wire", "INSERT INTO wire_accounts " diff --git a/src/exchangedb/sql-schema/0010-wire_accounts.sql b/src/exchangedb/sql-schema/0010-wire_accounts.sql @@ -24,7 +24,7 @@ ALTER TABLE wire_accounts COMMENT ON COLUMN wire_accounts.open_banking_gateway IS 'URL of an open banking gateway that can be used to initiate wire transfers to this account; NULL if there is no such service.'; COMMENT ON COLUMN wire_accounts.wire_transfer_gateway - IS 'URL of a wire transfer gateway that can be used to obtain (short) wire transfer subjects; NULL if there is no such service.'; + IS 'URL of a prepared transfer service that can be used to obtain (short) wire transfer subjects; NULL if there is no such service.'; COMMENT ON COLUMN wire_accounts.sig_version IS 'Protocol version used by the master_sig in this column. Used to tell which algorithm is needed to verify the signature.'; diff --git a/src/exchangedb/update_wire.c b/src/exchangedb/update_wire.c @@ -29,7 +29,7 @@ TALER_EXCHANGEDB_update_wire ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp change_date, @@ -61,9 +61,9 @@ TALER_EXCHANGEDB_update_wire ( NULL == open_banking_gateway ? GNUNET_PQ_query_param_null () : GNUNET_PQ_query_param_string (open_banking_gateway), - NULL == wire_transfer_gateway + NULL == prepared_transfer_url ? GNUNET_PQ_query_param_null () - : GNUNET_PQ_query_param_string (wire_transfer_gateway), + : GNUNET_PQ_query_param_string (prepared_transfer_url), GNUNET_PQ_query_param_end }; diff --git a/src/include/exchange-database/get_wire_accounts.h b/src/include/exchange-database/get_wire_accounts.h @@ -33,7 +33,7 @@ * @param payto_uri the exchange bank account URI * @param conversion_url URL of a conversion service, NULL if there is no conversion * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param prepared_transfer_url prepared transfer service, NULL if unavailable * @param debit_restrictions JSON array with debit restrictions on the account * @param credit_restrictions JSON array with credit restrictions on the account * @param master_sig master key signature affirming that this is a bank @@ -47,7 +47,7 @@ typedef void const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, const struct TALER_MasterSignatureP *master_sig, @@ -63,7 +63,7 @@ typedef void * @param payto_uri the exchange bank account URI * @param conversion_url URL of a conversion service, NULL if there is no conversion * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param prepared_transfer_url prepared transfer service, NULL if unavailable * @param debit_restrictions JSON array with debit restrictions on the account * @param credit_restrictions JSON array with credit restrictions on the account * @param master_sig master key signature affirming that this is a bank @@ -77,7 +77,7 @@ typedef void const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, const struct TALER_MasterSignatureP *master_sig, diff --git a/src/include/exchange-database/insert_wire.h b/src/include/exchange-database/insert_wire.h @@ -33,7 +33,7 @@ * @param payto_uri wire account of the exchange * @param conversion_url URL of a conversion service, NULL if there is no conversion * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param prepared_transfer_url wire transfer gateway service, NULL if unavailable * @param debit_restrictions JSON array with debit restrictions on the account * @param credit_restrictions JSON array with credit restrictions on the account * @param start_date date when the account was added by the offline system @@ -49,7 +49,7 @@ TALER_EXCHANGEDB_insert_wire (struct TALER_EXCHANGEDB_PostgresContext *pg, const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp start_date, diff --git a/src/include/exchange-database/update_wire.h b/src/include/exchange-database/update_wire.h @@ -33,7 +33,7 @@ * @param payto_uri account the update is about * @param conversion_url URL of a conversion service, NULL if there is no conversion * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param prepared_transfer_url wire transfer gateway service, NULL if unavailable * @param debit_restrictions JSON array with debit restrictions on the account; NULL allowed if not @a enabled * @param credit_restrictions JSON array with credit restrictions on the account; NULL allowed if not @a enabled * @param change_date date when the account status was last changed @@ -49,7 +49,7 @@ TALER_EXCHANGEDB_update_wire (struct TALER_EXCHANGEDB_PostgresContext *pg, const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp change_date, diff --git a/src/include/taler/exchange/get-keys.h b/src/include/taler/exchange/get-keys.h @@ -427,7 +427,7 @@ struct TALER_EXCHANGE_WireAccount * subjects. NULL if not configured. * @since protocol v33. */ - char *wire_transfer_gateway; + char *prepared_transfer_url; /** * Array of restrictions that apply when crediting diff --git a/src/include/taler/exchange/post-management-wire.h b/src/include/taler/exchange/post-management-wire.h @@ -59,10 +59,10 @@ enum TALER_EXCHANGE_PostManagementWireOption TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_OPEN_BANKING_GATEWAY, /** - * Wire transfer gateway service URL for short wire transfer subjects. + * Prepared transfer service URL for short wire transfer subjects. * If not set, no wire transfer gateway is used. */ - TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_WIRE_TRANSFER_GATEWAY, + TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_PREPARED_TRANSFER_URL, /** * Set of credit restrictions to apply. @@ -117,10 +117,10 @@ struct TALER_EXCHANGE_PostManagementWireOptionValue /** * Value if @e option is - * #TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_WIRE_TRANSFER_GATEWAY. + * #TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_PREPARED_TRANSFER_SERVICE. * May be NULL. */ - const char *wire_transfer_gateway; + const char *prepared_transfer_url; /** * Value if @e option is @@ -251,12 +251,12 @@ TALER_EXCHANGE_post_management_wire_create ( * @param g the wire transfer gateway URL string, or NULL for no gateway * @return representation of the option as a struct TALER_EXCHANGE_PostManagementWireOptionValue */ -#define TALER_EXCHANGE_post_management_wire_option_wire_transfer_gateway(g) \ +#define TALER_EXCHANGE_post_management_wire_option_prepared_transfer_url(g) \ (const struct TALER_EXCHANGE_PostManagementWireOptionValue) \ { \ .option = \ - TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_WIRE_TRANSFER_GATEWAY, \ - .details.wire_transfer_gateway = (g) \ + TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_PREPARED_TRANSFER_URL, \ + .details.prepared_transfer_url = (g) \ } diff --git a/src/include/taler/taler_crypto_lib.h b/src/include/taler/taler_crypto_lib.h @@ -6596,7 +6596,7 @@ TALER_exchange_offline_global_fee_verify ( * @param payto_uri bank account * @param conversion_url URL of the conversion service, or NULL if none * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param prepared_transfer_url prepared transfer service, NULL if unavailable * @param debit_restrictions JSON encoding of debit restrictions on the account; see AccountRestriction in the spec * @param credit_restrictions JSON encoding of credit restrictions on the account; see AccountRestriction in the spec * @param now timestamp to use for the signature (rounded) @@ -6608,7 +6608,7 @@ TALER_exchange_offline_wire_add_sign ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp now, @@ -6622,7 +6622,7 @@ TALER_exchange_offline_wire_add_sign ( * @param payto_uri bank account * @param conversion_url URL of the conversion service, or NULL if none * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param prepared_transfer_url prepared transfer service, NULL if unavailable * @param debit_restrictions JSON encoding of debit restrictions on the account; see AccountRestriction in the spec * @param credit_restrictions JSON encoding of credit restrictions on the account; see AccountRestriction in the spec * @param sign_time timestamp when signature was created @@ -6635,7 +6635,7 @@ TALER_exchange_offline_wire_add_verify ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp sign_time, @@ -6705,7 +6705,7 @@ TALER_exchange_offline_wire_del_verify ( * @param payto_uri URI that is signed * @param conversion_url URL of the conversion service, or NULL if none * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param wire_transfprepared_transfer_urler_gateway wire transfer gateway service, NULL if unavailable * @param debit_restrictions JSON encoding of debit restrictions on the account; see AccountRestriction in the spec * @param credit_restrictions JSON encoding of credit restrictions on the account; see AccountRestriction in the spec * @param master_pub master public key of the exchange @@ -6717,7 +6717,7 @@ TALER_exchange_wire_signature_check ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, const struct TALER_MasterPublicKeyP *master_pub, @@ -6751,7 +6751,7 @@ TALER_exchange_wire_signature_check32 ( * @param payto_uri account specification * @param conversion_url URL of the conversion service, or NULL if none * @param open_banking_gateway open banking gateway service, NULL if unavailable - * @param wire_transfer_gateway wire transfer gateway service, NULL if unavailable + * @param prepared_transfer_url wire transfer gateway service, NULL if unavailable * @param debit_restrictions JSON encoding of debit restrictions on the account; see AccountRestriction in the spec * @param credit_restrictions JSON encoding of credit restrictions on the account; see AccountRestriction in the spec * @param master_priv private key to sign with @@ -6762,7 +6762,7 @@ TALER_exchange_wire_signature_make ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, const struct TALER_MasterPrivateKeyP *master_priv, diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c @@ -516,7 +516,7 @@ TALER_EXCHANGE_parse_accounts ( struct TALER_FullPayto payto_uri; const char *conversion_url = NULL; const char *open_banking_gateway = NULL; - const char *wire_transfer_gateway = NULL; + const char *prepared_transfer_url = NULL; const char *bank_label = NULL; int64_t priority = 0; const json_t *credit_restrictions; @@ -533,8 +533,8 @@ TALER_EXCHANGE_parse_accounts ( &open_banking_gateway), NULL), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ("wire_transfer_gateway", - &wire_transfer_gateway), + GNUNET_JSON_spec_string ("prepared_transfer_url", + &prepared_transfer_url), NULL), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_int64 ("priority", @@ -567,7 +567,7 @@ TALER_EXCHANGE_parse_accounts ( } if ( (NULL != master_pub) && (! ( ( (NULL == open_banking_gateway) && - (NULL == wire_transfer_gateway) && + (NULL == prepared_transfer_url) && (GNUNET_OK == TALER_exchange_wire_signature_check32 ( payto_uri, @@ -581,7 +581,7 @@ TALER_EXCHANGE_parse_accounts ( payto_uri, conversion_url, open_banking_gateway, - wire_transfer_gateway, + prepared_transfer_url, debit_restrictions, credit_restrictions, master_pub, @@ -611,8 +611,8 @@ TALER_EXCHANGE_parse_accounts ( wa->conversion_url = GNUNET_strdup (conversion_url); if (NULL != open_banking_gateway) wa->open_banking_gateway = GNUNET_strdup (open_banking_gateway); - if (NULL != wire_transfer_gateway) - wa->wire_transfer_gateway = GNUNET_strdup (wire_transfer_gateway); + if (NULL != prepared_transfer_url) + wa->prepared_transfer_url = GNUNET_strdup (prepared_transfer_url); if (NULL != bank_label) wa->bank_label = GNUNET_strdup (bank_label); } /* end 'for all accounts */ @@ -662,7 +662,7 @@ TALER_EXCHANGE_free_accounts ( GNUNET_free (wa->fpayto_uri.full_payto); GNUNET_free (wa->conversion_url); GNUNET_free (wa->open_banking_gateway); - GNUNET_free (wa->wire_transfer_gateway); + GNUNET_free (wa->prepared_transfer_url); GNUNET_free (wa->bank_label); free_restrictions (wa->credit_restrictions_length, wa->credit_restrictions); diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c @@ -2138,8 +2138,8 @@ TALER_EXCHANGE_keys_to_json (const struct TALER_EXCHANGE_Keys *kd) GNUNET_JSON_pack_string ("open_banking_gateway", acc->open_banking_gateway)), GNUNET_JSON_pack_allow_null ( - GNUNET_JSON_pack_string ("wire_transfer_gateway", - acc->wire_transfer_gateway)), + GNUNET_JSON_pack_string ("prepared_transfer_url", + acc->prepared_transfer_url)), GNUNET_JSON_pack_int64 ("priority", acc->priority), GNUNET_JSON_pack_allow_null ( diff --git a/src/lib/exchange_api_post-management-wire.c b/src/lib/exchange_api_post-management-wire.c @@ -82,9 +82,9 @@ struct TALER_EXCHANGE_PostManagementWireHandle char *open_banking_gateway; /** - * URL of the wire transfer gateway, or NULL. + * URL of the prepared transfer service, or NULL. */ - char *wire_transfer_gateway; + char *prepared_transfer_url; /** * JSON encoding of debit restrictions (we hold a reference). @@ -259,10 +259,10 @@ TALER_EXCHANGE_post_management_wire_set_options_ ( ? GNUNET_strdup (opt->details.open_banking_gateway) : NULL; break; - case TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_WIRE_TRANSFER_GATEWAY: - GNUNET_free (pmwh->wire_transfer_gateway); - pmwh->wire_transfer_gateway = (NULL != opt->details.wire_transfer_gateway) - ? GNUNET_strdup (opt->details.wire_transfer_gateway) + case TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_PREPARED_TRANSFER_URL: + GNUNET_free (pmwh->prepared_transfer_url); + pmwh->prepared_transfer_url = (NULL != opt->details.prepared_transfer_url) + ? GNUNET_strdup (opt->details.prepared_transfer_url) : NULL; break; case TALER_EXCHANGE_POST_MANAGEMENT_WIRE_OPTION_CREDIT_RESTRICTIONS: @@ -323,8 +323,8 @@ TALER_EXCHANGE_post_management_wire_start ( GNUNET_JSON_pack_string ("open_banking_gateway", pmwh->open_banking_gateway)), GNUNET_JSON_pack_allow_null ( - GNUNET_JSON_pack_string ("wire_transfer_gateway", - pmwh->wire_transfer_gateway)), + GNUNET_JSON_pack_string ("prepared_transfer_url", + pmwh->prepared_transfer_url)), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_string ("bank_label", pmwh->bank_label)), @@ -379,7 +379,7 @@ TALER_EXCHANGE_post_management_wire_cancel ( GNUNET_free (pmwh->payto_uri_str); GNUNET_free (pmwh->conversion_url); GNUNET_free (pmwh->open_banking_gateway); - GNUNET_free (pmwh->wire_transfer_gateway); + GNUNET_free (pmwh->prepared_transfer_url); GNUNET_free (pmwh->bank_label); GNUNET_free (pmwh->url); GNUNET_free (pmwh->base_url); diff --git a/src/util/offline_signatures.c b/src/util/offline_signatures.c @@ -690,10 +690,10 @@ struct TALER_MasterAddWirePS struct GNUNET_HashCode h_open_banking_gateway; /** - * Hash over the wire transfer gateway URL, all zeros if there - * is no wire transfer gateway URL. + * Hash over the prepared transfer service URL, all zeros if there + * is no such URL. */ - struct GNUNET_HashCode h_wire_transfer_gateway; + struct GNUNET_HashCode h_prepared_transfer_url; /** * Hash over the debit restrictions. @@ -759,7 +759,7 @@ TALER_exchange_offline_wire_add_sign ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp now, @@ -782,10 +782,10 @@ TALER_exchange_offline_wire_add_sign ( GNUNET_CRYPTO_hash (open_banking_gateway, strlen (open_banking_gateway) + 1, &kv.h_open_banking_gateway); - if (NULL != wire_transfer_gateway) - GNUNET_CRYPTO_hash (wire_transfer_gateway, - strlen (wire_transfer_gateway) + 1, - &kv.h_wire_transfer_gateway); + if (NULL != prepared_transfer_url) + GNUNET_CRYPTO_hash (prepared_transfer_url, + strlen (prepared_transfer_url) + 1, + &kv.h_prepared_transfer_url); TALER_json_hash (debit_restrictions, &kv.h_debit_restrictions); TALER_json_hash (credit_restrictions, @@ -801,7 +801,7 @@ TALER_exchange_offline_wire_add_verify ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, struct GNUNET_TIME_Timestamp sign_time, @@ -824,10 +824,10 @@ TALER_exchange_offline_wire_add_verify ( GNUNET_CRYPTO_hash (open_banking_gateway, strlen (open_banking_gateway) + 1, &aw.h_open_banking_gateway); - if (NULL != wire_transfer_gateway) - GNUNET_CRYPTO_hash (wire_transfer_gateway, - strlen (wire_transfer_gateway) + 1, - &aw.h_wire_transfer_gateway); + if (NULL != prepared_transfer_url) + GNUNET_CRYPTO_hash (prepared_transfer_url, + strlen (prepared_transfer_url) + 1, + &aw.h_prepared_transfer_url); TALER_json_hash (debit_restrictions, &aw.h_debit_restrictions); TALER_json_hash (credit_restrictions, @@ -1257,10 +1257,10 @@ struct TALER_MasterWireDetailsPS struct GNUNET_HashCode h_open_banking_gateway; /** - * Hash over the wire transfer gateway URL, all zeros if there - * is no wire transfer gateway URL. + * Hash over the prepared transfer URL, all zeros if there + * is no such URL. */ - struct GNUNET_HashCode h_wire_transfer_gateway; + struct GNUNET_HashCode h_prepared_transfer_url; /** * Hash over the debit restrictions. @@ -1348,7 +1348,7 @@ TALER_exchange_wire_signature_check ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, const struct TALER_MasterPublicKeyP *master_pub, @@ -1369,10 +1369,10 @@ TALER_exchange_wire_signature_check ( GNUNET_CRYPTO_hash (open_banking_gateway, strlen (open_banking_gateway) + 1, &wd.h_open_banking_gateway); - if (NULL != wire_transfer_gateway) - GNUNET_CRYPTO_hash (wire_transfer_gateway, - strlen (wire_transfer_gateway) + 1, - &wd.h_wire_transfer_gateway); + if (NULL != prepared_transfer_url) + GNUNET_CRYPTO_hash (prepared_transfer_url, + strlen (prepared_transfer_url) + 1, + &wd.h_prepared_transfer_url); TALER_json_hash (debit_restrictions, &wd.h_debit_restrictions); TALER_json_hash (credit_restrictions, @@ -1389,7 +1389,7 @@ TALER_exchange_wire_signature_make ( const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, - const char *wire_transfer_gateway, + const char *prepared_transfer_url, const json_t *debit_restrictions, const json_t *credit_restrictions, const struct TALER_MasterPrivateKeyP *master_priv, @@ -1410,10 +1410,10 @@ TALER_exchange_wire_signature_make ( GNUNET_CRYPTO_hash (open_banking_gateway, strlen (open_banking_gateway) + 1, &wd.h_open_banking_gateway); - if (NULL != wire_transfer_gateway) - GNUNET_CRYPTO_hash (wire_transfer_gateway, - strlen (wire_transfer_gateway) + 1, - &wd.h_wire_transfer_gateway); + if (NULL != prepared_transfer_url) + GNUNET_CRYPTO_hash (prepared_transfer_url, + strlen (prepared_transfer_url) + 1, + &wd.h_prepared_transfer_url); TALER_json_hash (debit_restrictions, &wd.h_debit_restrictions); TALER_json_hash (credit_restrictions,