aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-12-21 23:57:23 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2023-12-21 23:57:23 +0100
commitfa5582930e6198e2783ae9cad59d2d2b4ce2ee1a (patch)
tree12fc2dd1398e403d63dbabcef33ad7b62de0bf8d /src/include
parent98ca8478952ab57b3a9f3b8f9efc4a7bb11d2a53 (diff)
downloadexchange-fa5582930e6198e2783ae9cad59d2d2b4ce2ee1a.tar.xz
[wip, #7267] more refined denomination conflict response during deposit
If a coin was known but with a different denomination, return to the client an error response that contains the denomination's public key and the corresponding signature of the provided coin.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 596764b1c..25d3b17f9 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -4358,7 +4358,8 @@ struct TALER_EXCHANGEDB_Plugin
* Retrieve information about the given @a coin from the database.
*
* @param cls database connection plugin state
- * @param coin the coin that must be made known
+ * @param coin_pub the coin that must be made known
+ * @param[out] coin_info detailed information about the coin
* @return database transaction status, non-negative on success
*/
enum GNUNET_DB_QueryStatus
@@ -4366,6 +4367,21 @@ struct TALER_EXCHANGEDB_Plugin
const struct TALER_CoinSpendPublicKeyP *coin_pub,
struct TALER_CoinPublicInfo *coin_info);
+ /**
+ * Retrieve the signature and corresponding denomination for a given @a coin
+ * from the database
+ *
+ * @param cls database connection plugin state
+ * @param coin_pub the public key of the coin we search for
+ * @param[out] denom_pub the public key of the denomination that the coin was signed with
+ * @param[out] denom_sig the signature with the denomination's private key over the coin_pub
+ */
+ enum GNUNET_DB_QueryStatus
+ (*get_signature_for_known_coin) (
+ void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ struct TALER_DenominationPublicKey *denom_pub,
+ struct TALER_DenominationSignature *denom_sig);
/**
* Retrieve the denomination of a known coin.