aboutsummaryrefslogtreecommitdiff
path: root/src/mint/mint_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/mint_db.h')
-rw-r--r--src/mint/mint_db.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/mint/mint_db.h b/src/mint/mint_db.h
index b80f750b0..b26c70b26 100644
--- a/src/mint/mint_db.h
+++ b/src/mint/mint_db.h
@@ -137,6 +137,27 @@ struct BankTransfer
137/* FIXME: add functions to add bank transfers to our DB 137/* FIXME: add functions to add bank transfers to our DB
138 (and to test if we already did add one) (#3633) */ 138 (and to test if we already did add one) (#3633) */
139 139
140/**
141 * A summary of a Reserve
142 */
143struct Reserve
144{
145 /**
146 * The reserve's public key. This uniquely identifies the reserve
147 */
148 struct GNUNET_CRYPTO_EddsaPublicKey *pub;
149
150 /**
151 * The balance amount existing in the reserve
152 */
153 struct TALER_Amount balance;
154
155 /**
156 * The expiration date of this reserve
157 */
158 struct GNUNET_TIME_Absolute expiry;
159};
160
140 161
141/** 162/**
142 * Information we keep for a withdrawn coin to reproduce 163 * Information we keep for a withdrawn coin to reproduce
@@ -173,16 +194,15 @@ struct CollectableBlindcoin
173 * Get the summary of a reserve. 194 * Get the summary of a reserve.
174 * 195 *
175 * @param db the database connection handle 196 * @param db the database connection handle
176 * @param reserve_pub the public key identifying the reserve 197 * @param reserve the reserve data. The public key of the reserve should be set
177 * @param balance the amount existing in the reserve (will be filled) 198 * in this structure; it is used to query the database. The balance
178 * @param expiry expiration of the reserve (will be filled) 199 * and expiration are then filled accordingly.
179 * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure 200 * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
180 */ 201 */
181int 202int
182TALER_MINT_DB_reserve_get (PGconn *db, 203TALER_MINT_DB_reserve_get (PGconn *db,
183 struct GNUNET_CRYPTO_EddsaPublicKey *reserve_pub, 204 struct Reserve *reserve);
184 struct TALER_Amount *balance, 205
185 struct GNUNET_TIME_Absolute *expiry);
186 206
187 207
188/* FIXME: need call to convert CollectableBlindcoin to JSON (#3527) */ 208/* FIXME: need call to convert CollectableBlindcoin to JSON (#3527) */