aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-12 17:23:31 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-12 17:23:36 +0200
commit393ae7f9a3536569dde87cab8055693d6f1bd924 (patch)
treefeb303000c95740da3631bdea6a6cf33ac8009e7 /src/include
parente71782ea777efce86342def929ed55330762a16d (diff)
-add dB logic for auditor iteration over purse deposits
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index a79acd20d..e3f27070d 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -1681,12 +1681,74 @@ struct TALER_EXCHANGEDB_PurseDepositListEntry
struct TALER_CoinSpendSignatureP coin_sig;
/**
+ * FIXME-Oec: probably needed here, not yet used
+ * anywhere!
+ *
+ * Hash of the age commitment used to sign the coin, if age restriction was
+ * applicable to the denomination. May be all zeroes if no age restriction
+ * applies.
+ */
+ struct TALER_AgeCommitmentHash h_age_commitment_FIXME;
+
+ /**
* Set to true if the coin was refunded.
*/
bool refunded;
};
+
+/**
+ * Information about a /purses/$PID/deposit operation.
+ */
+struct TALER_EXCHANGEDB_PurseDeposit
+{
+
+ /**
+ * Exchange hosting the purse, NULL for this exchange.
+ */
+ char *exchange_base_url;
+
+ /**
+ * Public key of the purse.
+ */
+ struct TALER_PurseContractPublicKeyP purse_pub;
+
+ /**
+ * Contribution of the coin to the purse, including
+ * deposit fee.
+ */
+ struct TALER_Amount amount;
+
+ /**
+ * Depositing fee.
+ */
+ struct TALER_Amount deposit_fee;
+
+ /**
+ * Signature by the coin affirming the deposit.
+ */
+ struct TALER_CoinSpendSignatureP coin_sig;
+
+ /**
+ * Public key of the coin.
+ */
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+
+ /**
+ * Hash of the age commitment used to sign the coin, if age restriction was
+ * applicable to the denomination. May be all zeroes if no age restriction
+ * applies.
+ */
+ struct TALER_AgeCommitmentHash h_age_commitment;
+
+ /**
+ * Set to true if @e h_age_commitment is not available.
+ */
+ bool no_age_commitment;
+
+};
+
/**
* Information about a melt operation.
*/
@@ -1916,6 +1978,24 @@ typedef enum GNUNET_GenericReturnValue
/**
+ * Function called with details about purse deposits that have been made, with
+ * the goal of auditing the deposit's execution.
+ *
+ * @param cls closure
+ * @param rowid unique serial ID for the deposit in our DB
+ * @param deposit deposit details
+ * @param denom_pub denomination public key of @a coin_pub
+ * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
+ */
+typedef enum GNUNET_GenericReturnValue
+(*TALER_EXCHANGEDB_PurseDepositCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_EXCHANGEDB_PurseDeposit *deposit,
+ const struct TALER_DenominationPublicKey *denom_pub);
+
+
+/**
* Function called with details about coins that were melted,
* with the goal of auditing the refresh's execution.
*
@@ -3961,6 +4041,24 @@ struct TALER_EXCHANGEDB_Plugin
void *cb_cls);
/**
+ * Select purse deposits above @a serial_id in monotonically increasing
+ * order.
+ *
+ * @param cls closure
+ * @param serial_id highest serial ID to exclude (select strictly larger)
+ * @param cb function to call on each result
+ * @param cb_cls closure for @a cb
+ * @return transaction status code
+ */
+ enum GNUNET_DB_QueryStatus
+ (*select_purse_deposits_above_serial_id)(
+ void *cls,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_PurseDepositCallback cb,
+ void *cb_cls);
+
+
+ /**
* Select refresh sessions above @a serial_id in monotonically increasing
* order.
*