diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-06-15 20:49:39 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-06-15 20:49:39 +0200 |
commit | eccf37e450918e554425b7a9daef324cdaaa37a5 (patch) | |
tree | 5af1d86d3d2bb002d4aac687cdc8bf6c43a33ed2 /src/include | |
parent | 83be3173d4933d00a7826bb05c6a661515b0e6f9 (diff) | |
download | exchange-eccf37e450918e554425b7a9daef324cdaaa37a5.tar.xz |
-more DB prep work towards reserve auditing with p2p payments
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index eaac5cd32..afd850ad5 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -2002,6 +2002,73 @@ typedef enum GNUNET_GenericReturnValue /** + * Function called with details about + * account merge requests that have been made, with + * the goal of auditing the account merge execution. + * + * @param cls closure + * @param rowid unique serial ID for the deposit in our DB + * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop + */ +typedef enum GNUNET_GenericReturnValue +(*TALER_EXCHANGEDB_AccountMergeCallback)( + void *cls, + uint64_t rowid, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_PurseContractPublicKeyP *purse_pub, + const struct TALER_PrivateContractHashP *h_contract_terms, + struct GNUNET_TIME_Timestamp purse_expiration, + const struct TALER_Amount *amount, + uint32_t min_age, + enum TALER_WalletAccountMergeFlags flags, + const struct TALER_Amount *purse_fee, + struct GNUNET_TIME_Timestamp merge_timestamp, + struct TALER_ReserveSignatureP *reserve_sig); + + +/** + * Function called with details about purse + * merges that have been made, with + * the goal of auditing the purse merge execution. + * + * @param cls closure + * @param rowid unique serial ID for the deposit in our DB + * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop + */ +typedef enum GNUNET_GenericReturnValue +(*TALER_EXCHANGEDB_PurseMergeCallback)( + void *cls, + uint64_t rowid, + const char *partner_base_url, + const struct TALER_Amount *amount, + enum TALER_WalletAccountMergeFlags flags, + const struct TALER_PurseMergePublicKeyP *merge_pub, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_PurseMergeSignatureP *merge_sig, + const struct TALER_PurseContractPublicKeyP *purse_pub, + struct GNUNET_TIME_Timestamp merge_timestamp); + + +/** + * Function called with details about + * history requests that have been made, with + * the goal of auditing the history request execution. + * + * @param cls closure + * @param rowid unique serial ID for the deposit in our DB + * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop + */ +typedef enum GNUNET_GenericReturnValue +(*TALER_EXCHANGEDB_HistoryRequestCallback)( + void *cls, + uint64_t rowid, + const struct TALER_Amount *history_fee, + const struct GNUNET_TIME_Timestamp ts, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_ReserveSignatureP *reserve_sig); + + +/** * Function called with details about purse refunds that have been made, with * the goal of auditing the purse refund's execution. * @@ -4102,6 +4169,60 @@ struct TALER_EXCHANGEDB_Plugin /** + * Select account merges 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_account_merges_above_serial_id)( + void *cls, + uint64_t serial_id, + TALER_EXCHANGEDB_AccountMergeCallback cb, + void *cb_cls); + + + /** + * Select purse merges 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_merges_above_serial_id)( + void *cls, + uint64_t serial_id, + TALER_EXCHANGEDB_PurseMergeCallback cb, + void *cb_cls); + + + /** + * Select history requests 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_history_requests_above_serial_id)( + void *cls, + uint64_t serial_id, + TALER_EXCHANGEDB_HistoryRequestCallback cb, + void *cb_cls); + + + /** * Select purse refunds above @a serial_id in monotonically increasing * order. * |