summaryrefslogtreecommitdiff
path: root/src/include/taler_exchange_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-03-05 18:18:25 +0100
committerChristian Grothoff <christian@grothoff.org>2022-03-05 18:18:25 +0100
commit54106e63dca71dd983315c1935c5ca391f9fc254 (patch)
tree97ea8fe451847dae24412e3ebf27451bc9632d74 /src/include/taler_exchange_service.h
parenta080f118904525034777686e294f9ad5f703c71c (diff)
downloadexchange-54106e63dca71dd983315c1935c5ca391f9fc254.tar.gz
exchange-54106e63dca71dd983315c1935c5ca391f9fc254.tar.bz2
exchange-54106e63dca71dd983315c1935c5ca391f9fc254.zip
add client API for setting global fees
Diffstat (limited to 'src/include/taler_exchange_service.h')
-rw-r--r--src/include/taler_exchange_service.h64
1 files changed, 63 insertions, 1 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 00115e12a..48272a6b8 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -3511,7 +3511,7 @@ TALER_EXCHANGE_management_set_wire_fees (
struct GNUNET_TIME_Timestamp validity_end,
const struct TALER_WireFeeSet *fees,
const struct TALER_MasterSignatureP *master_sig,
- TALER_EXCHANGE_ManagementWireEnableCallback cb,
+ TALER_EXCHANGE_ManagementSetWireFeeCallback cb,
void *cb_cls);
@@ -3526,6 +3526,68 @@ TALER_EXCHANGE_management_set_wire_fees_cancel (
/**
+ * Function called with information about the global fee setting operation result.
+ *
+ * @param cls closure
+ * @param hr HTTP response data
+ */
+typedef void
+(*TALER_EXCHANGE_ManagementSetGlobalFeeCallback) (
+ void *cls,
+ const struct TALER_EXCHANGE_HttpResponse *hr);
+
+
+/**
+ * @brief Handle for a POST /management/global-fees request.
+ */
+struct TALER_EXCHANGE_ManagementSetGlobalFeeHandle;
+
+
+/**
+ * Inform the exchange about global fees.
+ *
+ * @param ctx the context
+ * @param exchange_base_url HTTP base URL for the exchange
+ * @param validity_start start date for the provided wire fees
+ * @param validity_end end date for the provided wire fees
+ * @param fees the wire fees for this time period
+ * @param purse_timeout when do purses time out
+ * @param kyc_timeout when do reserves without KYC time out
+ * @param history_expiration how long are account histories preserved
+ * @param purse_account_limit how many purses are free per account
+ * @param master_sig signature affirming the wire fees;
+ * of purpose #TALER_SIGNATURE_MASTER_GLOBAL_FEES
+ * @param cb function to call with the exchange's result
+ * @param cb_cls closure for @a cb
+ * @return the request handle; NULL upon error
+ */
+struct TALER_EXCHANGE_ManagementSetGlobalFeeHandle *
+TALER_EXCHANGE_management_set_global_fees (
+ struct GNUNET_CURL_Context *ctx,
+ const char *exchange_base_url,
+ struct GNUNET_TIME_Timestamp validity_start,
+ struct GNUNET_TIME_Timestamp validity_end,
+ const struct TALER_GlobalFeeSet *fees,
+ struct GNUNET_TIME_Relative purse_timeout,
+ struct GNUNET_TIME_Relative kyc_timeout,
+ struct GNUNET_TIME_Relative history_expiration,
+ uint32_t purse_account_limit,
+ const struct TALER_MasterSignatureP *master_sig,
+ TALER_EXCHANGE_ManagementSetGlobalFeeCallback cb,
+ void *cb_cls);
+
+
+/**
+ * Cancel #TALER_EXCHANGE_management_enable_wire() operation.
+ *
+ * @param swfh handle of the operation to cancel
+ */
+void
+TALER_EXCHANGE_management_set_global_fees_cancel (
+ struct TALER_EXCHANGE_ManagementSetGlobalFeeHandle *sgfh);
+
+
+/**
* Function called with information about the POST
* /auditor/$AUDITOR_PUB/$H_DENOM_PUB operation result.
*