aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h34
-rw-r--r--src/include/taler_exchange_service.h113
-rw-r--r--src/include/taler_exchangedb_plugin.h4
-rw-r--r--src/include/taler_signatures.h8
4 files changed, 79 insertions, 80 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index af451b20..b07da775 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -355,6 +355,40 @@ struct TALER_CoinPublicInfo
/**
+ * Details for one of the /deposit operations that the
+ * exchange combined into a single wire transfer.
+ */
+struct TALER_TrackTransferDetails
+{
+ /**
+ * Hash of the contract.
+ */
+ struct GNUNET_HashCode h_contract;
+
+ /**
+ * Which coin was deposited?
+ */
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+
+ /**
+ * Value of the deposit (including fee).
+ */
+ struct TALER_Amount coin_value;
+
+ /**
+ * Fee charged by the exchange for the deposit.
+ */
+ struct TALER_Amount coin_fee;
+
+ /**
+ * Merchant's transaction identifier.
+ */
+ uint64_t transaction_id;
+
+};
+
+
+/**
* Check if a coin is valid; that is, whether the denomination key exists,
* is not expired, and the signature is correct.
*
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 5f79b9be..ecfbc725 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -1093,46 +1093,12 @@ void
TALER_EXCHANGE_admin_add_incoming_cancel (struct TALER_EXCHANGE_AdminAddIncomingHandle *aai);
-/* ********************* /wire/deposits *********************** */
+/* ********************* /track/transfer *********************** */
/**
- * @brief A /wire/deposits Handle
+ * @brief A /track/transfer Handle
*/
-struct TALER_EXCHANGE_WireDepositsHandle;
-
-
-/**
- * Details for one of the /deposit operations that the
- * exchange combined into a single wire transfer.
- */
-struct TALER_WireDepositDetails
-{
- /**
- * Hash of the contract.
- */
- struct GNUNET_HashCode h_contract;
-
- /**
- * Which coin was deposited?
- */
- struct TALER_CoinSpendPublicKeyP coin_pub;
-
- /**
- * Value of the deposit (including fee).
- */
- struct TALER_Amount coin_value;
-
- /**
- * Fee charged by the exchange for the deposit.
- */
- struct TALER_Amount coin_fee;
-
- /**
- * Merchant's transaction identifier.
- */
- uint64_t transaction_id;
-
-};
+struct TALER_EXCHANGE_TrackTransferHandle;
/**
@@ -1144,22 +1110,21 @@ struct TALER_WireDepositDetails
* @param sign_key exchange key used to sign @a json, or NULL
* @param json original json reply (may include signatures, those have then been
* validated already)
- * @param wtid extracted wire transfer identifier, or NULL if the exchange could
- * not provide any (set only if @a http_status is #MHD_HTTP_OK)
+ * @param h_wire hash of the wire transfer address the transfer went to, or NULL on error
* @param total_amount total amount of the wire transfer, or NULL if the exchange could
* not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK)
* @param details_length length of the @a details array
* @param details array with details about the combined transactions
*/
typedef void
-(*TALER_EXCHANGE_WireDepositsCallback)(void *cls,
- unsigned int http_status,
- const struct TALER_ExchangePublicKeyP *sign_key,
- const json_t *json,
- const struct GNUNET_HashCode *h_wire,
- const struct TALER_Amount *total_amount,
- unsigned int details_length,
- const struct TALER_WireDepositDetails *details);
+(*TALER_EXCHANGE_TrackTransferCallback)(void *cls,
+ unsigned int http_status,
+ const struct TALER_ExchangePublicKeyP *sign_key,
+ const json_t *json,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_Amount *total_amount,
+ unsigned int details_length,
+ const struct TALER_TrackTransferDetails *details);
/**
@@ -1172,11 +1137,11 @@ typedef void
* @param cb_cls closure for @a cb
* @return handle to cancel operation
*/
-struct TALER_EXCHANGE_WireDepositsHandle *
-TALER_EXCHANGE_wire_deposits (struct TALER_EXCHANGE_Handle *exchange,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- TALER_EXCHANGE_WireDepositsCallback cb,
- void *cb_cls);
+struct TALER_EXCHANGE_TrackTransferHandle *
+TALER_EXCHANGE_track_transfer (struct TALER_EXCHANGE_Handle *exchange,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ TALER_EXCHANGE_TrackTransferCallback cb,
+ void *cb_cls);
/**
@@ -1186,16 +1151,16 @@ TALER_EXCHANGE_wire_deposits (struct TALER_EXCHANGE_Handle *exchange,
* @param wdh the wire deposits request handle
*/
void
-TALER_EXCHANGE_wire_deposits_cancel (struct TALER_EXCHANGE_WireDepositsHandle *wdh);
+TALER_EXCHANGE_track_transfer_cancel (struct TALER_EXCHANGE_TrackTransferHandle *wdh);
-/* ********************* /deposit/wtid *********************** */
+/* ********************* /track/transaction *********************** */
/**
- * @brief A /deposit/wtid Handle
+ * @brief A /track/transaction Handle
*/
-struct TALER_EXCHANGE_DepositWtidHandle;
+struct TALER_EXCHANGE_TrackTransactionHandle;
/**
@@ -1212,17 +1177,17 @@ struct TALER_EXCHANGE_DepositWtidHandle;
* @param coin_contribution contribution to the @a total_amount of the deposited coin (may be NULL)
*/
typedef void
-(*TALER_EXCHANGE_DepositWtidCallback)(void *cls,
- unsigned int http_status,
- const struct TALER_ExchangePublicKeyP *sign_key,
- const json_t *json,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- struct GNUNET_TIME_Absolute execution_time,
- const struct TALER_Amount *coin_contribution);
+(*TALER_EXCHANGE_TrackTransactionCallback)(void *cls,
+ unsigned int http_status,
+ const struct TALER_ExchangePublicKeyP *sign_key,
+ const json_t *json,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ struct GNUNET_TIME_Absolute execution_time,
+ const struct TALER_Amount *coin_contribution);
/**
- * Obtain the wire transfer details for a given deposit.
+ * Obtain the wire transfer details for a given transaction.
*
* @param exchange the exchange to query
* @param merchant_priv the merchant's private key
@@ -1234,15 +1199,15 @@ typedef void
* @param cb_cls closure for @a cb
* @return handle to abort request
*/
-struct TALER_EXCHANGE_DepositWtidHandle *
-TALER_EXCHANGE_deposit_wtid (struct TALER_EXCHANGE_Handle *exchange,
- const struct TALER_MerchantPrivateKeyP *merchant_priv,
- const struct GNUNET_HashCode *h_wire,
- const struct GNUNET_HashCode *h_contract,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- uint64_t transaction_id,
- TALER_EXCHANGE_DepositWtidCallback cb,
- void *cb_cls);
+struct TALER_EXCHANGE_TrackTransactionHandle *
+TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
+ const struct TALER_MerchantPrivateKeyP *merchant_priv,
+ const struct GNUNET_HashCode *h_wire,
+ const struct GNUNET_HashCode *h_contract,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ uint64_t transaction_id,
+ TALER_EXCHANGE_TrackTransactionCallback cb,
+ void *cb_cls);
/**
@@ -1252,7 +1217,7 @@ TALER_EXCHANGE_deposit_wtid (struct TALER_EXCHANGE_Handle *exchange,
* @param dwh the wire deposits request handle
*/
void
-TALER_EXCHANGE_deposit_wtid_cancel (struct TALER_EXCHANGE_DepositWtidHandle *dwh);
+TALER_EXCHANGE_track_transaction_cancel (struct TALER_EXCHANGE_TrackTransactionHandle *dwh);
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 40b8f978..92e0354d 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -654,7 +654,7 @@ typedef void
* when we expect it to be done (if @a wtid was NULL)
*/
typedef void
-(*TALER_EXCHANGEDB_DepositWtidCallback)(void *cls,
+(*TALER_EXCHANGEDB_TrackTransactionCallback)(void *cls,
const struct TALER_WireTransferIdentifierRawP *wtid,
const struct TALER_Amount *coin_contribution,
const struct TALER_Amount *coin_fee,
@@ -1415,7 +1415,7 @@ struct TALER_EXCHANGEDB_Plugin
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_MerchantPublicKeyP *merchant_pub,
uint64_t transaction_id,
- TALER_EXCHANGEDB_DepositWtidCallback cb,
+ TALER_EXCHANGEDB_TrackTransactionCallback cb,
void *cb_cls);
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index c31cc6b9..a58d2173 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -108,7 +108,7 @@
#define TALER_SIGNATURE_EXCHANGE_KEY_SET 1035
/**
- * Signature where the Exchange confirms the /deposit/wtid response.
+ * Signature where the Exchange confirms the /track/transaction response.
*/
#define TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE 1036
@@ -152,7 +152,7 @@
* Signature where the merchant confirms that he needs the wire
* transfer identifier for a deposit operation.
*/
-#define TALER_SIGNATURE_MERCHANT_DEPOSIT_WTID 1103
+#define TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION 1103
/*********************/
@@ -932,7 +932,7 @@ struct TALER_MasterWireDetailsPS
struct TALER_DepositTrackPS
{
/**
- * Purpose must be #TALER_SIGNATURE_MERCHANT_DEPOSIT_WTID.
+ * Purpose must be #TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION.
*/
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
@@ -975,7 +975,7 @@ struct TALER_DepositTrackPS
/**
* @brief Format internally used for packing the detailed information
- * to generate the signature for /wire/deposits signatures.
+ * to generate the signature for /track/transfer signatures.
*/
struct TALER_WireDepositDetailP
{