summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-22 13:01:11 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-22 13:01:11 +0200
commit49157c0beaeae761cac5daa22d8734880ee726dd (patch)
tree66925ea1cc7fd95f60a0835583f7d653a14553a8 /src/include
parenta006a459e5f7e5c47d8b0bf25f40f66954cc6464 (diff)
downloadmerchant-49157c0beaeae761cac5daa22d8734880ee726dd.tar.gz
merchant-49157c0beaeae761cac5daa22d8734880ee726dd.tar.bz2
merchant-49157c0beaeae761cac5daa22d8734880ee726dd.zip
implement POST /tips/ID/pickup
Diffstat (limited to 'src/include')
-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 ******************** */