aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-05-01 14:05:58 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-05-01 14:05:58 +0200
commit1a63275d9804762f0bcdc1cd23060c2e9b364fbb (patch)
tree2ac8d645d80089cb4674c9878c217025c0a984de /src/include
parentaf3c92f9d5a9e0d674ab2b1d8028268552ab9f5b (diff)
downloadexchange-1a63275d9804762f0bcdc1cd23060c2e9b364fbb.tar.xz
WiP: age-withdraw, finished reveal-request, 10/n
- /age-withdraw/$ACH/reveal handler now fully implemented - for consistency with api: rename of tables from withdraw_age_... to age_withdraw
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h46
1 files changed, 34 insertions, 12 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 43f6b73e8..e4c9a28be 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -760,7 +760,7 @@ struct TALER_EXCHANGEDB_TableData
struct TALER_ReserveSignatureP reserve_sig;
uint32_t noreveal_index;
struct GNUNET_TIME_Absolute timestamp;
- } withdraw_age_commitments;
+ } age_withdraw_commitments;
struct
{
@@ -772,7 +772,7 @@ struct TALER_EXCHANGEDB_TableData
struct TALER_ExchangeWithdrawValues ewv;
// h_coin_ev omitted, to be recomputed!
struct TALER_BlindedDenominationSignature ev_sig;
- } withdraw_age_revealed_coins;
+ } age_withdraw_revealed_coins;
} details;
@@ -1200,8 +1200,9 @@ struct TALER_EXCHANGEDB_AgeWithdrawCommitment
struct TALER_ReservePublicKeyP reserve_pub;
/**
- * Signature confirming the age withdrawal, matching @e reserve_pub, @e
- * maximum_age_group and @e h_commitment and @e total_amount_with_fee.
+ * Signature confirming the age withdrawal commitment, matching @e
+ * reserve_pub, @e maximum_age_group and @e h_commitment and @e
+ * total_amount_with_fee.
*/
struct TALER_ReserveSignatureP reserve_sig;
@@ -2737,6 +2738,28 @@ struct TALER_EXCHANGEDB_CsRevealFreshCoinData
uint32_t coin_off;
};
+/**
+ * Information about a coin that was revealed to the exchange
+ * during reveal.
+ */
+struct TALER_EXCHANGEDB_AgeWithdrawRevealedCoin
+{
+ /**
+ * Hash of the public denomination key of the coin.
+ */
+ struct TALER_DenominationHashP h_denom_pub;
+
+ /**
+ * Signature generated by the exchange over the coin (in blinded format).
+ */
+ struct TALER_BlindedDenominationSignature coin_sig;
+
+ /**
+ * Blinded hash of the new coin
+ */
+ struct TALER_BlindedCoinHashP h_coin_ev;
+};
+
/**
* Generic KYC status for some operation.
@@ -3810,19 +3833,18 @@ struct TALER_EXCHANGEDB_Plugin
* 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
+ * @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 age_withdraw_commitments table
+ * @param num_awrcs Number of coins to generate, size of the @a coin_evs array
+ * @param awrcs Array of @a num_awrcs information about coins to be created
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
(*insert_age_withdraw_reveal)(
void *cls,
- uint64_t h_commitment,
- uint32_t num_coins
- /* TODO: oec */
- );
+ const struct TALER_AgeWithdrawCommitmentHashP *h_commitment,
+ uint32_t num_awrcs,
+ const struct TALER_EXCHANGEDB_AgeWithdrawRevealedCoin *awrcs);
/**
* Lookup in the database for the fresh coins with age-restriction that