From e3c0320132f88f3d13e1f6d96a6cea9c3334df83 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 1 Jun 2020 14:12:59 +0200 Subject: add logic for activation of reserves to merchant backend DB --- src/include/taler_merchantdb_plugin.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/include/taler_merchantdb_plugin.h') diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index 8f17da7e..0346597e 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -1613,6 +1613,26 @@ struct TALER_MERCHANTDB_Plugin struct GNUNET_TIME_Absolute expiration); + /** + * Confirms @a credit as the amount the exchange claims to have received and + * thus really 'activates' the reserve. This has to happen before tips can + * be authorized. + * + * @param cls closure, typically a connection to the db + * @param instance_id which instance is the reserve tied to + * @param reserve_pub which reserve is topped up or created + * @param initial_exchange_balance how much money was be added to the reserve + * according to the exchange + * @return transaction status, usually + * #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT for success + */ + enum GNUNET_DB_QueryStatus + (*activate_reserve)(void *cls, + const char *instance_id, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_Amount *initial_exchange_balance); + + /** * Lookup reserves. * -- cgit v1.2.3