summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-12-09 15:36:34 +0100
committerChristian Grothoff <christian@grothoff.org>2015-12-09 15:36:34 +0100
commitc20f955ae43a57208b40d9a7978a7f089592ad60 (patch)
tree93f142c11461c77654f76fb427d8ea5bbb57ef0d /src/include
parentc5204d3a213fb70d10ec873fc869013390a5435f (diff)
downloadexchange-c20f955ae43a57208b40d9a7978a7f089592ad60.tar.gz
exchange-c20f955ae43a57208b40d9a7978a7f089592ad60.tar.bz2
exchange-c20f955ae43a57208b40d9a7978a7f089592ad60.zip
towards /deposit/wtid handling (more skeleton work)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h12
-rw-r--r--src/include/taler_mintdb_plugin.h42
2 files changed, 54 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index a3c21b386..7a4bcb831 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -102,6 +102,18 @@ struct TALER_MerchantPrivateKeyP
/**
+ * @brief Type of signatures made by merchants.
+ */
+struct TALER_MerchantSignatureP
+{
+ /**
+ * Taler uses EdDSA for merchants.
+ */
+ struct GNUNET_CRYPTO_EddsaSignature eddsa_sig;
+};
+
+
+/**
* @brief Type of transfer public keys used during refresh
* operations.
*/
diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h
index d83cf9d44..d9a1c6c85 100644
--- a/src/include/taler_mintdb_plugin.h
+++ b/src/include/taler_mintdb_plugin.h
@@ -569,6 +569,23 @@ typedef void
/**
+ * Function called with the results of the lookup of the
+ * wire transfer identifier information.
+ *
+ * @param cls closure
+ * @param wtid base32-encoded wire transfer identifier, NULL
+ * if the transaction was not yet done
+ * @param execution_time when was the transaction done, or
+ * when we expect it to be done (if @a wtid was NULL);
+ * #GNUNET_TIME_UNIT_FOREVER_ABS if the /deposit is unknown
+ * to the mint
+ */
+typedef void
+(*TALER_MINTDB_DepositWtidCallback)(void *cls,
+ const char *wtid,
+ struct GNUNET_TIME_Absolute execution_time);
+
+/**
* @brief The plugin API, returned from the plugin's "init" function.
* The argument given to "init" is simply a configuration handle.
*/
@@ -1177,6 +1194,31 @@ struct TALER_MINTDB_Plugin
struct TALER_MINTDB_TransactionList *list);
+ /**
+ * Try to find the wire transfer details for a deposit operation.
+ * If we did not execute the deposit yet, return when it is supposed
+ * to be executed.
+ *
+ * @param cls closure
+ * @param h_contract hash of the contract
+ * @param h_wire hash of merchant wire details
+ * @param coin_pub public key of deposited coin
+ * @param merchant_pub merchant public key
+ * @param transaction_id transaction identifier
+ * @param cb function to call with the result
+ * @param cb_cls closure to pass to @a cb
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors
+ */
+ int
+ (*wire_lookup_deposit_wtid)(void *cls,
+ const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ uint64_t transaction_id,
+ TALER_MINTDB_DepositWtidCallback cb,
+ void *cb_cls);
+
};