diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-10-15 22:03:55 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-10-15 22:03:55 +0200 |
commit | 518c7009e7b19d681852a91e30028d37e6f55cd1 (patch) | |
tree | eec2be67afe07b914c782d9ec4564c9f9cd89c1a /src/include/taler_exchange_service.h | |
parent | 7421142bc105342043ae3b54cad2c445ef58e193 (diff) | |
download | exchange-518c7009e7b19d681852a91e30028d37e6f55cd1.tar.xz |
handle reserve open/close responses in reserve history in libtalerexchange
Diffstat (limited to 'src/include/taler_exchange_service.h')
-rw-r--r-- | src/include/taler_exchange_service.h | 81 |
1 files changed, 78 insertions, 3 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 2abd6b2aa..6268f45ac 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -1505,7 +1505,7 @@ enum TALER_EXCHANGE_ReserveTransactionType /** * Reserve closed operation. */ - TALER_EXCHANGE_RTT_CLOSE, + TALER_EXCHANGE_RTT_CLOSING, /** * Reserve history request. @@ -1513,9 +1513,19 @@ enum TALER_EXCHANGE_ReserveTransactionType TALER_EXCHANGE_RTT_HISTORY, /** - * Reserve purese merge operation. + * Reserve purse merge operation. */ - TALER_EXCHANGE_RTT_MERGE + TALER_EXCHANGE_RTT_MERGE, + + /** + * Reserve open request operation. + */ + TALER_EXCHANGE_RTT_OPEN, + + /** + * Reserve close request operation. + */ + TALER_EXCHANGE_RTT_CLOSE }; @@ -1730,6 +1740,71 @@ struct TALER_EXCHANGE_ReserveHistoryEntry } merge_details; + /** + * Information about an open request operation on the reserve. + * @e type is #TALER_EXCHANGE_RTT_OPEN. + */ + struct + { + + /** + * Signature by the reserve approving the open. + */ + struct TALER_ReserveSignatureP reserve_sig; + + /** + * Amount to be paid from the reserve balance to open + * the reserve. + */ + struct TALER_Amount reserve_payment; + + /** + * When was the request created. + */ + struct GNUNET_TIME_Timestamp request_timestamp; + + /** + * For how long should the reserve be kept open. + * (Determines amount to be paid.) + */ + struct GNUNET_TIME_Timestamp reserve_expiration; + + /** + * How many open purses should be included with the + * open reserve? + * (Determines amount to be paid.) + */ + uint32_t purse_limit; + + } open_request; + + /** + * Information about an close request operation on the reserve. + * @e type is #TALER_EXCHANGE_RTT_CLOSE. + */ + struct + { + + /** + * Signature by the reserve approving the close. + */ + struct TALER_ReserveSignatureP reserve_sig; + + /** + * When was the request created. + */ + struct GNUNET_TIME_Timestamp request_timestamp; + + /** + * Hash of the payto://-URI of the target account + * for the closure, or all zeros for the reserve + * origin account. + */ + struct TALER_PaytoHashP target_account_h_payto; + + } close_request; + + } details; }; |