aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-01-06 14:11:59 +0100
committerChristian Grothoff <christian@grothoff.org>2024-01-06 14:12:06 +0100
commit535b53cfc287e197ef5bfe3652ee123e847215fc (patch)
tree076d79f31752ef7f7f7ffc9d248c09c4fa7c3417 /src/include
parent026de1dda4cffbb973a2192a017974a487907a37 (diff)
add taler-merchant-depositcheck to build
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_merchantdb_plugin.h67
1 files changed, 57 insertions, 10 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 7e2b748c..8635c350 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -796,6 +796,33 @@ typedef void
/**
+ * Callback for results from `lookup_pending_deposits`.
+ *
+ * @param cls NULL
+ * @param deposit_serial identifies the deposit operation
+ * @param wire_deadline when is the wire due
+ * @param h_contract_terms hash of the contract terms
+ * @param merchant_priv private key of the merchant
+ * @param instance_id name of the instance
+ * @param h_wire hash of the merchant's wire account into * @param amount_with_fee amount the exchange will deposit for this coin
+ * @param deposit_fee fee the exchange will charge for this coin which the deposit was made
+ * @param coin_pub public key of the deposited coin
+ */
+typedef void
+(*TALER_MERCHANTDB_PendingDepositsCallback) (
+ void *cls,
+ uint64_t deposit_serial,
+ struct GNUNET_TIME_Absolute wire_deadline, /* missing in DB! Funky migration needed! */
+ const struct TALER_PrivateContractHashP *h_contract_terms,
+ const struct TALER_MerchantPrivateKeyP *merchant_priv,
+ const char *instance_id,
+ const struct TALER_MerchantWireHashP *h_wire,
+ const struct TALER_Amount *amount_with_fee,
+ const struct TALER_Amount *deposit_fee,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub);
+
+
+/**
* Function called with detailed information about a wire transfer and
* the underlying deposits that are being aggregated.
*
@@ -3629,11 +3656,11 @@ struct TALER_MERCHANTDB_Plugin
* @return database result code
*/
enum GNUNET_DB_QueryStatus
- (*update_token_family)(void *cls,
- const char *instance_id,
- const char *token_family_slug,
- const struct
- TALER_MERCHANTDB_TokenFamilyDetails *details);
+ (*update_token_family)(
+ void *cls,
+ const char *instance_id,
+ const char *token_family_slug,
+ const struct TALER_MERCHANTDB_TokenFamilyDetails *details);
/**
@@ -3646,11 +3673,31 @@ struct TALER_MERCHANTDB_Plugin
* @return database result code
*/
enum GNUNET_DB_QueryStatus
- (*insert_token_family)(void *cls,
- const char *instance_id,
- const char *token_family_slug,
- const struct
- TALER_MERCHANTDB_TokenFamilyDetails *details);
+ (*insert_token_family)(
+ void *cls,
+ const char *instance_id,
+ const char *token_family_slug,
+ const struct TALER_MERCHANTDB_TokenFamilyDetails *details);
+
+ /**
+ * Lookup deposits that are finished and awaiting a wire transfer.
+ *
+ * @param cls closure
+ * @param exchange_url exchange to filter deposits by
+ * @param limit maximum number of deposits to return
+ * @param allow_future true to allow deposits with wire deadline in the future
+ * @param cb function to call with deposit data
+ * @param cb_cls closure for @a cb
+ * @return transaction status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*lookup_pending_deposits)(
+ void *cls,
+ const char *exchange_url,
+ uint32_t limit,
+ bool allow_future,
+ TALER_MERCHANTDB_PendingDepositsCallback cb,
+ void *cb_cls);
};