aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_exchangedb_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r--src/include/taler_exchangedb_plugin.h154
1 files changed, 117 insertions, 37 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index e26a20960..83d283401 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -75,6 +75,32 @@ struct TALER_EXCHANGEDB_DenominationKeyInformationP
75 75
76GNUNET_NETWORK_STRUCT_END 76GNUNET_NETWORK_STRUCT_END
77 77
78/**
79 * Meta data about an exchange online signing key.
80 */
81struct TALER_EXCHANGEDB_SignkeyMetaData
82{
83 /**
84 * Start time of the validity period for this key.
85 */
86 struct GNUNET_TIME_Absolute start;
87
88 /**
89 * The exchange will sign messages with this key between @e start and this time.
90 */
91 struct GNUNET_TIME_Absolute expire_sign;
92
93 /**
94 * When do signatures with this sign key become invalid?
95 * After this point, these signatures cannot be used in (legal)
96 * disputes anymore, as the Exchange is then allowed to destroy its side
97 * of the evidence. @e expire_legal is expected to be significantly
98 * larger than @e expire_sign (by a year or more).
99 */
100 struct GNUNET_TIME_Absolute expire_legal;
101
102};
103
78 104
79/** 105/**
80 * Enumeration of all of the tables replicated by exchange-auditor 106 * Enumeration of all of the tables replicated by exchange-auditor
@@ -194,16 +220,97 @@ struct TALER_EXCHANGEDB_TableData
194 uint64_t denominations_serial; 220 uint64_t denominations_serial;
195 } reserves_out; 221 } reserves_out;
196 222
197 struct {} auditors; 223 struct
198 struct {} auditor_denom_sigs; 224 {
199 struct {} exchange_sign_keys; 225 struct TALER_AuditorPublicKeyP auditor_pub;
200 struct {} signkey_revocations; 226 char *auditor_url;
201 struct {} known_coins; 227 char *auditor_name;
202 struct {} refresh_commitments; 228 bool is_active;
203 struct {} refresh_revealed_coins; 229 struct GNUNET_TIME_Absolute last_change;
204 struct {} refresh_transfer_keys; 230 } auditors;
205 struct {} deposits; 231
206 struct {} refunds; 232 struct
233 {
234 uint64_t auditor_uuid;
235 uint64_t denominations_serial;
236 struct TALER_AuditorSignatureP auditor_sig;
237 } auditor_denom_sigs;
238
239 struct
240 {
241 struct TALER_ExchangePublicKeyP exchange_pub;
242 struct TALER_MasterSignatureP master_sig;
243 struct TALER_EXCHANGEDB_SignkeyMetaData meta;
244 } exchange_sign_keys;
245
246 struct
247 {
248 uint64_t esk_serial;
249 struct TALER_MasterSignatureP master_sig;
250 } signkey_revocations;
251
252 struct
253 {
254 struct TALER_CoinSpendPublicKeyP coin_pub;
255 struct TALER_DenominationSignature denom_sig;
256 uint64_t denominations_serial;
257 } known_coins;
258
259 struct
260 {
261 struct TALER_RefreshCommitmentP rc;
262 struct TALER_CoinSpendSignatureP old_coin_sig;
263 struct TALER_Amount amount_with_fee;
264 uint32_t noreveal_index;
265 uint64_t old_known_coin_id;
266 } refresh_commitments;
267
268 struct
269 {
270 uint64_t freshcoin_index;
271 struct TALER_CoinSpendSignatureP link_sig;
272 void *coin_ev;
273 size_t coin_ev_size;
274 // h_coin_ev omitted, to be recomputed!
275 struct TALER_DenominationSignature ev_sig;
276 uint64_t denominations_serial;
277 uint64_t melt_serial_id;
278 } refresh_revealed_coins;
279
280 struct
281 {
282 struct TALER_TransferPublicKeyP tp;
283 struct TALER_TransferPrivateKeyP tprivs[TALER_CNC_KAPPA - 1];
284 uint64_t melt_serial_id;
285 } refresh_transfer_keys;
286
287 struct
288 {
289 struct TALER_Amount amount_with_fee;
290 struct GNUNET_TIME_Absolute wallet_timestamp;
291 struct GNUNET_TIME_Absolute exchange_timestamp;
292 struct GNUNET_TIME_Absolute refund_deadline;
293 struct GNUNET_TIME_Absolute wire_deadline;
294 struct TALER_MerchantPublicKeyP merchant_pub;
295 struct GNUNET_HashCode h_contract_terms;
296 // h_wire omitted, to be recomputed!
297 struct TALER_CoinSpendSignatureP coin_sig;
298 json_t *wire;
299 bool tiny;
300 bool done;
301 uint64_t known_coin_id;
302 } deposits;
303
304 struct
305 {
306 struct TALER_MerchantPublicKeyP merchant_pub; // FIXME
307 struct TALER_MerchantSignatureP merchant_sig;
308 struct GNUNET_HashCode h_contract_terms; // FIXME
309 uint64_t rtransaction_id;
310 struct TALER_Amount amount_with_fee;
311 uint64_t known_coin_id;
312 } refunds;
313
207 struct {} wire_out; 314 struct {} wire_out;
208 struct {} aggregation_tracking; 315 struct {} aggregation_tracking;
209 struct {} wire_fee; 316 struct {} wire_fee;
@@ -464,33 +571,6 @@ typedef void
464 571
465 572
466/** 573/**
467 * Meta data about an exchange online signing key.
468 */
469struct TALER_EXCHANGEDB_SignkeyMetaData
470{
471 /**
472 * Start time of the validity period for this key.
473 */
474 struct GNUNET_TIME_Absolute start;
475
476 /**
477 * The exchange will sign messages with this key between @e start and this time.
478 */
479 struct GNUNET_TIME_Absolute expire_sign;
480
481 /**
482 * When do signatures with this sign key become invalid?
483 * After this point, these signatures cannot be used in (legal)
484 * disputes anymore, as the Exchange is then allowed to destroy its side
485 * of the evidence. @e expire_legal is expected to be significantly
486 * larger than @e expire_sign (by a year or more).
487 */
488 struct GNUNET_TIME_Absolute expire_legal;
489
490};
491
492
493/**
494 * Signature of a function called with information about the exchange's 574 * Signature of a function called with information about the exchange's
495 * online signing keys. 575 * online signing keys.
496 * 576 *