summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2015-12-22 11:26:10 +0100
committerFlorian Dold <florian.dold@gmail.com>2015-12-22 11:26:10 +0100
commit24bfedf04e2603b263e5c28ef94b45b2643e2ab2 (patch)
treefe34fb68e41519931815c6364103135b04342bb8 /src/include
parentfdf51f8c73fadca9301f53fede630a43cc33091a (diff)
parent204f732c1a408490d6d13fa36b0635ce72fd4575 (diff)
downloadexchange-24bfedf04e2603b263e5c28ef94b45b2643e2ab2.tar.gz
exchange-24bfedf04e2603b263e5c28ef94b45b2643e2ab2.tar.bz2
exchange-24bfedf04e2603b263e5c28ef94b45b2643e2ab2.zip
Merge branch 'master' of ssh://taler.net/var/git/mint
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h12
-rw-r--r--src/include/taler_mintdb_plugin.h42
-rw-r--r--src/include/taler_signatures.h19
3 files changed, 73 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 082b439b2..16240e5a3 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);
+
};
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index ea9ed600a..fb2916cff 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -843,6 +843,25 @@ struct TALER_DepositTrackPS
};
+/**
+ * The contract sent by the merchant to the wallet.
+ */
+struct TALER_ContractPS
+{
+ /**
+ * Purpose header for the signature over the contract with
+ * purpose #TALER_SIGNATURE_MERCHANT_CONTRACT.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+ /**
+ * Hash of the JSON contract in UTF-8 including 0-termination,
+ * using JSON_COMPACT | JSON_SORT_KEYS
+ */
+ struct GNUNET_HashCode h_contract;
+
+};
+
GNUNET_NETWORK_STRUCT_END