diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-04-11 21:29:15 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-04-11 21:29:15 +0200 |
commit | 4f078c7666bfc1c2379b242c38674932dbf832ee (patch) | |
tree | 2ad069f96d69e63ed299d042511a29bd49e97a44 /src/include | |
parent | 8b321252230a2e87ec8f50cec0c344122952c387 (diff) | |
download | exchange-4f078c7666bfc1c2379b242c38674932dbf832ee.tar.xz |
scaffolding work towards #3712
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_mintdb_plugin.h | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h index 505e86bb3..307b75645 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_mintdb_plugin.h @@ -24,6 +24,7 @@ #include <gnunet/gnunet_util_lib.h> #include "taler_util.h" +#include "taler_signatures.h" /** @@ -378,7 +379,7 @@ GNUNET_NETWORK_STRUCT_BEGIN /** * @brief For each (old) coin being melted, we have a `struct - * RefreshCommitLink` that allows the user to find the shared secret + * RefreshCommitLinkP` that allows the user to find the shared secret * to decrypt the respective refresh links for the new coins in the * `struct TALER_MINTDB_RefreshCommitCoin`. */ @@ -519,6 +520,44 @@ struct TALER_MINTDB_TransactionList /** + * @brief All of the information from a /refresh/melt commitment. + */ +struct TALER_MINTDB_MeltCommitment +{ + + /** + * Number of coins we are melting. + */ + uint16_t num_oldcoins; + + /** + * Number of new coins we are creating. + */ + uint16_t num_newcoins; + + /** + * Array of @e num_oldcoins melt operation details. + */ + struct TALER_MINTDB_RefreshMelt *melts; + + /** + * Array of @e num_newcoins denomination keys + */ + struct TALER_DenominationPublicKey *denom_pubs; + + /** + * 2D-Array of #TALER_CNC_KAPPA and @e num_newcoins commitments. + */ + struct TALER_MINTDB_RefreshCommitCoin *commit_coins[TALER_CNC_KAPPA]; + + /** + * 2D-Array of #TALER_CNC_KAPPA and @e new_oldcoins links. + */ + struct TALER_MINTDB_RefreshCommitLinkP *commit_links[TALER_CNC_KAPPA]; +}; + + +/** * @brief Handle for a database session (per-thread, for transactions). */ struct TALER_MINTDB_Session; @@ -955,6 +994,32 @@ struct TALER_MINTDB_Plugin /** + * Get all of the information from the given melt commit operation. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param sesssion database connection to use + * @param session_hash hash to identify refresh session + * @return NULL if the @a session_hash does not correspond to any known melt + * operation + */ + struct TALER_MINTDB_MeltCommitment * + (*get_melt_commitment) (void *cls, + struct TALER_MINTDB_Session *sesssion, + const struct GNUNET_HashCode *session_hash); + + + /** + * Free information about a melt commitment. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param mc melt commitment data to free + */ + void + (*free_melt_commitment) (void *cls, + struct TALER_MINTDB_MeltCommitment *mc); + + + /** * Insert signature of a new coin generated during refresh into * the database indexed by the refresh session and the index * of the coin. This data is later used should an old coin |