From 3c54813e0852264c5d1e674eb533ca9bfcfcb144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Mon, 17 Apr 2023 17:21:57 +0200 Subject: [PATCH] WIP: add stubs for (get|insert)_age_withdraw_reveal --- src/include/taler_exchangedb_plugin.h | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 962bccaa2..cf7659b3b 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -3698,6 +3698,37 @@ struct TALER_EXCHANGEDB_Plugin bool *balance_ok, uint64_t *ruuid); + /** + * Store in the database which coin(s) the wallet wanted to withdraw with + * age restriction enabled in a given age-withdraw operation and the relevant + * information we learned or created in the reveal steop + * + * @param cls the `struct PostgresClosure` with the plugin-specific state + * @param h_commitment The hash of the original age-withdraw commitment, which is a key into the withdraw_age_commitments table + * @param num_coins number of coins to generate, size of the @a coin_evs array + * TODO: oec + * @return query execution status + */ + enum GNUNET_DB_QueryStatus + (*insert_age_withdraw_reveal)( + void *cls, + uint64_t h_commitment, + uint32_t num_coins, + /* TODO: oec */ + ); + + /** + * Lookup in the database for the fresh coins with age-restriction that + * we created in the given age-withdraw operation. + * + * TODO: oec + */ + enum GNUNET_DB_QueryStatus + (*get_age_withdraw_reveal)( + void *cls, + uint64_t h_commitment + /* TODO: oec */ + ); /** * Retrieve the details to a policy given by its hash_code