summaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 2dc764e8..1324b4d9 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -1781,6 +1781,53 @@ struct TALER_MERCHANTDB_Plugin
struct TALER_MERCHANTDB_PickupDetails **pickups);
+ /**
+ * Insert details about a tip pickup operation. The @a total_picked_up
+ * UPDATES the total amount under the @a tip_id, while the @a
+ * total_requested is the amount to be associated with this @a pickup_id.
+ * While there is usually only one pickup event that picks up the entire
+ * amount, our schema allows for wallets to pick up the amount incrementally
+ * over multiple pick up operations.
+ *
+ * @param cls closure, typically a connection to the db
+ * @param tip_id the unique ID for the tip
+ * @param total_picked_up how much was picked up overall at this
+ * point (includes @total_requested)
+ * @param pickup_id unique ID for the operation
+ * @param total_requested how much is being picked up in this operation
+ * @return transaction status, usually
+ * #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT for success
+ * #GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if @a credit_uuid already known
+ */
+ enum GNUNET_DB_QueryStatus
+ (*insert_pickup)(void *cls,
+ const char *instance_id,
+ const struct GNUNET_HashCode *tip_id,
+ const struct TALER_Amount *total_picked_up,
+ const struct GNUNET_HashCode *pickup_id,
+ const struct TALER_Amount *total_requested);
+
+
+ /**
+ * Insert blind signature obtained from the exchange during a
+ * tip pickup operation.
+ *
+ * @param cls closure, typically a connection to the db
+ * @param pickup_id unique ID for the operation
+ * @param offset offset of the blind signature for the pickup
+ * @param blind_sig the blind signature
+ * @return transaction status, usually
+ * #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT for success
+ * #GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if @a credit_uuid already known
+ */
+ enum GNUNET_DB_QueryStatus
+ (*insert_pickup_blind_signature)(
+ void *cls,
+ const struct GNUNET_HashCode *pickup_id,
+ uint32_t offset,
+ const struct GNUNET_CRYPTO_RsaSignature *blind_sig);
+
+
/* ****************** OLD API ******************** */