From 40daa209fb0fb5292956fd3f5770a90e8da0c2a6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 22 May 2022 18:21:15 +0200 Subject: -more work on reverse history --- src/include/taler_exchange_service.h | 85 ++++++++++++++++++++++++++++++++++- src/include/taler_exchangedb_plugin.h | 11 +++++ 2 files changed, 95 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index c615ca7c..7b62c909 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -1318,7 +1318,17 @@ enum TALER_EXCHANGE_ReserveTransactionType /** * Reserve closed operation. */ - TALER_EXCHANGE_RTT_CLOSE + TALER_EXCHANGE_RTT_CLOSE, + + /** + * Reserve history request. + */ + TALER_EXCHANGE_RTT_HISTORY, + + /** + * Reserve purese merge operation. + */ + TALER_EXCHANGE_RTT_MERGE }; @@ -1454,6 +1464,79 @@ struct TALER_EXCHANGE_ReserveHistoryEntry } close_details; + /** + * Information about a history operation of the reserve. + * @e type is #TALER_EXCHANGE_RTT_HISTORY. + */ + struct + { + + /** + * Fee paid for the request. + */ + struct TALER_Amount history_fee; + + /** + * When was the request made. + */ + struct GNUNET_TIME_Timestamp request_timestamp; + + /** + * Signature by the reserve approving the history request. + */ + struct TALER_ReserveSignatureP reserve_sig; + + } history_details; + + /** + * Information about a merge operation on the reserve. + * @e type is #TALER_EXCHANGE_RTT_MERGE. + */ + struct + { + + /** + * Fee paid for the purse. + */ + struct TALER_Amount purse_fee; + + /** + * Hash over the contract. + */ + struct TALER_PrivateContractHashP h_contract_terms; + + /** + * Merge capability key. + */ + struct TALER_PurseMergePublicKeyP merge_pub; + + /** + * Purse signature. + */ + struct TALER_PurseContractSignatureP purse_sig; + + /** + * Purse public key. + */ + struct TALER_PurseContractPublicKeyP purse_pub; + + /** + * Merge signature. + */ + struct TALER_PurseMergePublicKeyP merge_sig; + + /** + * Signature by the reserve approving the merge. + */ + struct TALER_ReserveSignatureP reserve_sig; + + /** + * When was the merge made. + */ + struct GNUNET_TIME_Timestamp merge_timestamp; + + } merge_details; + } details; }; diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 68faf34f..8762b192 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -983,6 +983,12 @@ struct TALER_EXCHANGEDB_RecoupRefreshListEntry */ struct TALER_EXCHANGEDB_PurseMerge { + + /** + * Public key of the reserve the coin was merged into. + */ + struct TALER_ReservePublicKeyP reserve_pub; + /** * Amount in the purse, with fees. */ @@ -1036,6 +1042,11 @@ struct TALER_EXCHANGEDB_PurseMerge */ struct TALER_EXCHANGEDB_HistoryRequest { + /** + * Public key of the reserve the history request was for. + */ + struct TALER_ReservePublicKeyP reserve_pub; + /** * Fee paid for the request. */ -- cgit v1.2.3