From ca12adced4ab5a54d7ee25b40b49cd034b920cc8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 14 Oct 2021 21:06:47 +0200 Subject: -basic logic for withdraw KYC checks --- src/include/taler_exchangedb_plugin.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/include/taler_exchangedb_plugin.h') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index d94a985d..34196aad 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -2011,6 +2011,18 @@ typedef enum GNUNET_GenericReturnValue const struct TALER_WireTransferIdentifierRawP *wtid); +/** + * Function called with the amounts historically + * withdrawn from the same origin account. + * + * @param cls closure + * @param val one of the withdrawn amounts + */ +typedef void +(*TALER_EXCHANGEDB_WithdrawHistoryCallback)( + void *cls, + const struct TALER_Amount *val); + /** * Function called with details about expired reserves. * @@ -2450,6 +2462,27 @@ struct TALER_EXCHANGEDB_Plugin struct TALER_EXCHANGEDB_ReserveHistory **rhp); + /** + * Find out all of the amounts that have been withdrawn + * so far from the same bank account that created the + * given reserve. + * + * @param cls closure + * @param reserve_pub reserve to select withdrawals by + * @param duration how far back should we select withdrawals + * @param cb function to call on each amount withdrawn + * @param cb_cls closure for @a cb + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*select_withdraw_amounts_by_account)( + void *cls, + const struct TALER_ReservePublicKeyP *reserve_pub, + struct GNUNET_TIME_Relative duration, + TALER_EXCHANGEDB_WithdrawHistoryCallback cb, + void *cb_cls); + + /** * Free memory associated with the given reserve history. * -- cgit v1.2.3