summaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-30 00:25:17 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-30 00:25:17 +0200
commitf5c484e625cde6b6822ea75c20cecf8f4db7c54d (patch)
treeca954d04bfca85d91198024e1f7cf59e5d0d421f /src/include/taler_merchantdb_plugin.h
parentce97f3d2e12b4da31eb0f611d401f56ce8052de5 (diff)
downloadmerchant-f5c484e625cde6b6822ea75c20cecf8f4db7c54d.tar.gz
merchant-f5c484e625cde6b6822ea75c20cecf8f4db7c54d.tar.bz2
merchant-f5c484e625cde6b6822ea75c20cecf8f4db7c54d.zip
sql-ing
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 2ef75de4..68efc6c7 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -311,7 +311,7 @@ typedef void
* @param wire_fee wire fee the exchange charges
*/
typedef void
-(*TALER_MERCHANTDB_DepositCallback)(
+(*TALER_MERCHANTDB_DepositsCallback)(
void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *amount_with_fee,
@@ -904,9 +904,32 @@ struct TALER_MERCHANTDB_Plugin
(*lookup_deposits)(void *cls,
const char *instance_id,
const struct GNUNET_HashCode *h_contract_terms,
- TALER_MERCHANTDB_DepositCallback cb,
+ TALER_MERCHANTDB_DepositsCallback cb,
void *cb_cls);
+
+ /**
+ * Insert an exchange signing key into our database.
+ *
+ * @param cls closure
+ * @param master_pub exchange master public key used for @a master_sig
+ * @param exchange_pub exchange signing key to insert
+ * @param start_date when does the signing key become valid
+ * @param expire_date when does the signing key stop being used
+ * @param end_date when does the signing key become void as proof
+ * @param master_sig signature of @a master_pub over the @a exchange_pub and the dates
+ */
+ enum GNUNET_DB_QueryStatus
+ (*insert_exchange_signkey)(
+ void *cls,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_ExchangePublicKeyP *exchange_pub,
+ struct GNUNET_TIME_Absolute start_date,
+ struct GNUNET_TIME_Absolute expire_date,
+ struct GNUNET_TIME_Absolute end_date,
+ const struct TALER_MasterSignatureP *master_sig);
+
+
/**
* Insert payment confirmation from the exchange into the database.
*
@@ -918,8 +941,9 @@ struct TALER_MERCHANTDB_Plugin
* @param amount_with_fee amount the exchange will deposit for this coin
* @param deposit_fee fee the exchange will charge for this coin
* @param wire_fee wire fee the exchange charges
- * @param exchange_pub public key used by the exchange for @a exchange_sig
+ * @param h_wire hash of the wire details of the target account of the merchant
* @param exchange_sig signature from exchange that coin was accepted
+ * @param exchange_pub signgin key that was used for @a exchange_sig
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
@@ -932,6 +956,7 @@ struct TALER_MERCHANTDB_Plugin
const struct TALER_Amount *deposit_fee,
const struct TALER_Amount *refund_fee,
const struct TALER_Amount *wire_fee,
+ const struct GNUNET_HashCode *h_wire,
const struct TALER_ExchangeSignatureP *exchange_sig,
const struct TALER_ExchangePublicKeyP *exchange_pub);