commit 76dc05a85867ab5a49b57c5152014dc3224a1ed9
parent ad46410a91b47c706424a822f4ede58c352d5a27
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 22 Dec 2024 12:04:26 +0100
remove long-deprecated rewards_allowed from C API, add new kyc_enabled to REST API
Diffstat:
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_config.h b/src/exchange/taler-exchange-httpd_config.h
@@ -41,7 +41,7 @@
*
* Returned via both /config and /keys endpoints.
*/
-#define EXCHANGE_PROTOCOL_VERSION "23:0:6"
+#define EXCHANGE_PROTOCOL_VERSION "24:0:7"
/**
diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c
@@ -2429,6 +2429,8 @@ create_krd (struct TEH_KeyStateHandle *ksh,
(double) TEH_stefan_lin),
GNUNET_JSON_pack_string ("asset_type",
asset_type),
+ GNUNET_JSON_pack_bool ("kyc_enabled",
+ GNUNET_YES == TEH_enable_kyc),
GNUNET_JSON_pack_bool ("rewards_allowed",
false),
GNUNET_JSON_pack_data_auto ("master_public_key",
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
@@ -714,9 +714,9 @@ struct TALER_EXCHANGE_Keys
unsigned int rc;
/**
- * Set to true if rewards are allowed at this exchange.
+ * Set to true if KYC is enabled at this exchange.
*/
- bool rewards_allowed;
+ bool kyc_enabled;
};
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
@@ -18,7 +18,7 @@ lib_LTLIBRARIES = \
libtalerexchange.la
libtalerexchange_la_LDFLAGS = \
- -version-info 13:0:0 \
+ -version-info 14:0:0 \
-no-undefined
libtalerexchange_la_SOURCES = \
exchange_api_add_aml_decision.c \
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
@@ -40,12 +40,12 @@
* Which version of the Taler protocol is implemented
* by this library? Used to determine compatibility.
*/
-#define EXCHANGE_PROTOCOL_CURRENT 23
+#define EXCHANGE_PROTOCOL_CURRENT 24
/**
* How many versions are we backwards compatible with?
*/
-#define EXCHANGE_PROTOCOL_AGE 6
+#define EXCHANGE_PROTOCOL_AGE 5
/**
* Set to 1 for extra debug logging.
@@ -987,11 +987,9 @@ decode_keys_json (const json_t *resp_obj,
GNUNET_JSON_spec_array_const (
"auditors",
&auditors_array),
- GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_bool (
- "rewards_allowed",
- &key_data->rewards_allowed),
- NULL),
+ GNUNET_JSON_spec_bool (
+ "kyc_enabled",
+ &key_data->kyc_enabled),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_object_const ("extensions",
&manifests),
@@ -2628,8 +2626,8 @@ TALER_EXCHANGE_keys_to_json (const struct TALER_EXCHANGE_Keys *kd)
recoup)),
GNUNET_JSON_pack_array_steal ("auditors",
auditors),
- GNUNET_JSON_pack_bool ("rewards_allowed",
- kd->rewards_allowed),
+ GNUNET_JSON_pack_bool ("kyc_enabled",
+ kd->kyc_enabled),
GNUNET_JSON_pack_allow_null (
GNUNET_JSON_pack_object_incref ("extensions",
kd->extensions)),