diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_exchange_service.h | 48 | ||||
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 102 |
2 files changed, 79 insertions, 71 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index a1a1e3997..31f41e178 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -1054,18 +1054,16 @@ struct TALER_EXCHANGE_DepositContractDetail { /** - * Execution date, until which the merchant would like the exchange to - * settle the balance (advisory, the exchange cannot be forced to settle in - * the past or upon very short notice, but of course a well-behaved exchange - * will limit aggregation based on the advice received). + * Hash of the contact of the merchant with the customer (further details + * are never disclosed to the exchange) */ - struct GNUNET_TIME_Timestamp wire_deadline; + struct TALER_PrivateContractHashP h_contract_terms; /** - * The merchant’s account details, in the payto://-format supported by the - * exchange. + * The public key of the merchant (used to identify the merchant for refund + * requests). */ - const char *merchant_payto_uri; + struct TALER_MerchantPublicKeyP merchant_pub; /** * Salt used to hash the @e merchant_payto_uri. @@ -1073,34 +1071,42 @@ struct TALER_EXCHANGE_DepositContractDetail struct TALER_WireSaltP wire_salt; /** - * Hash of the contact of the merchant with the customer (further details - * are never disclosed to the exchange) + * Hash over data provided by the wallet to customize the contract. + * All zero if not used. */ - struct TALER_PrivateContractHashP h_contract_terms; + struct GNUNET_HashCode wallet_data_hash; /** - * Policy extension specific details about the deposit relevant to the exchange. + * Date until which the merchant can issue a refund to the customer via the + * exchange (can be zero if refunds are not allowed); must not be after the + * @e wire_deadline. */ - json_t *policy_details; + struct GNUNET_TIME_Timestamp refund_deadline; + + /** + * Execution date, until which the merchant would like the exchange to + * settle the balance (advisory, the exchange cannot be forced to settle in + * the past or upon very short notice, but of course a well-behaved exchange + * will limit aggregation based on the advice received). + */ + struct GNUNET_TIME_Timestamp wire_deadline; /** * Timestamp when the contract was finalized, must match approximately the * current time of the exchange. */ - struct GNUNET_TIME_Timestamp timestamp; + struct GNUNET_TIME_Timestamp wallet_timestamp; /** - * The public key of the merchant (used to identify the merchant for refund - * requests). + * The merchant’s account details, in the payto://-format supported by the + * exchange. */ - struct TALER_MerchantPublicKeyP merchant_pub; + const char *merchant_payto_uri; /** - * Date until which the merchant can issue a refund to the customer via the - * exchange (can be zero if refunds are not allowed); must not be after the - * @e wire_deadline. + * Policy extension specific details about the deposit relevant to the exchange. */ - struct GNUNET_TIME_Timestamp refund_deadline; + const json_t *policy_details; }; diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 36ce74745..c3be78b4b 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1727,15 +1727,6 @@ struct TALER_EXCHANGEDB_CoinDepositInformation */ struct TALER_EXCHANGEDB_BatchDeposit { - /** - * Array about the coins that are being deposited. - */ - const struct TALER_EXCHANGEDB_CoinDepositInformation *cdis; - - /** - * Length of the @e cdis array. - */ - unsigned int num_cdis; /** * Public key of the merchant. Enables later identification @@ -1750,20 +1741,19 @@ struct TALER_EXCHANGEDB_BatchDeposit struct TALER_PrivateContractHashP h_contract_terms; /** - * Salt used by the merchant to compute "h_wire". + * Hash over additional inputs by the wallet. */ - struct TALER_WireSaltP wire_salt; + struct GNUNET_HashCode wallet_data_hash; /** - * Information about the receiver for executing the transaction. URI in - * payto://-format. + * Unsalted hash over @e receiver_wire_account. */ - const char *receiver_wire_account; + struct TALER_PaytoHashP wire_target_h_payto; /** - * Unsalted hash over @e receiver_wire_account. + * Salt used by the merchant to compute "h_wire". */ - struct TALER_PaytoHashP wire_target_h_payto; + struct TALER_WireSaltP wire_salt; /** * Time when this request was generated. Used, for example, to @@ -1796,19 +1786,30 @@ struct TALER_EXCHANGEDB_BatchDeposit struct GNUNET_TIME_Timestamp wire_deadline; /** - * Hash over additional inputs by the wallet. + * Row ID of the policy details; 0 if no policy applies. */ - struct GNUNET_HashCode wallet_data_hash; + uint64_t policy_details_serial_id; /** - * Row ID of the policy details; 0 if no policy applies. + * Information about the receiver for executing the transaction. URI in + * payto://-format. */ - uint64_t policy_details_serial_id; + const char *receiver_wire_account; + + /** + * Array about the coins that are being deposited. + */ + const struct TALER_EXCHANGEDB_CoinDepositInformation *cdis; /** - * True if @e wallet_data_hash was provided + * Length of the @e cdis array. + */ + unsigned int num_cdis; + + /** + * False if @e wallet_data_hash was provided */ - bool has_wallet_data_hash; + bool no_wallet_data_hash; /** * True if further processing is blocked by policy. @@ -1861,10 +1862,10 @@ struct TALER_EXCHANGEDB_Deposit struct TALER_WireSaltP wire_salt; /** - * Information about the receiver for executing the transaction. URI in - * payto://-format. + * Hash over the policy data for this deposit (remains unknown to the + * Exchange). Needed for the verification of the deposit's signature */ - char *receiver_wire_account; + struct TALER_ExtensionPolicyHashP h_policy; /** * Time when this request was generated. Used, for example, to @@ -1907,16 +1908,17 @@ struct TALER_EXCHANGEDB_Deposit */ struct TALER_Amount deposit_fee; - /* - * True if @e policy_json was provided + /** + * Information about the receiver for executing the transaction. URI in + * payto://-format. */ - bool has_policy; + char *receiver_wire_account; /** - * Hash over the policy data for this deposit (remains unknown to the - * Exchange). Needed for the verification of the deposit's signature + * True if @e policy_json was provided */ - struct TALER_ExtensionPolicyHashP h_policy; + bool has_policy; + }; @@ -1959,20 +1961,26 @@ struct TALER_EXCHANGEDB_DepositListEntry struct TALER_AgeCommitmentHash h_age_commitment; /** - * true, if age commitment is not applicable + * Salt used to compute h_wire from the @e receiver_wire_account. */ - bool no_age_commitment; + struct TALER_WireSaltP wire_salt; /** - * Detailed information about the receiver for executing the transaction. - * URL in payto://-format. + * Hash over the policy data for this deposit (remains unknown to the + * Exchange). Needed for the verification of the deposit's signature */ - char *receiver_wire_account; + struct TALER_ExtensionPolicyHashP h_policy; /** - * Salt used to compute h_wire from the @e receiver_wire_account. + * Fraction of the coin's remaining value to be deposited, including + * depositing fee (if any). The coin is identified by @e coin_pub. */ - struct TALER_WireSaltP wire_salt; + struct TALER_Amount amount_with_fee; + + /** + * Depositing fee. + */ + struct TALER_Amount deposit_fee; /** * Time when this request was generated. Used, for example, to @@ -2005,28 +2013,22 @@ struct TALER_EXCHANGEDB_DepositListEntry struct GNUNET_TIME_Timestamp wire_deadline; /** - * Fraction of the coin's remaining value to be deposited, including - * depositing fee (if any). The coin is identified by @e coin_pub. + * Detailed information about the receiver for executing the transaction. + * URL in payto://-format. */ - struct TALER_Amount amount_with_fee; + char *receiver_wire_account; /** - * Depositing fee. + * true, if age commitment is not applicable */ - struct TALER_Amount deposit_fee; + bool no_age_commitment; - /* + /** * True if a policy was provided with the deposit request */ bool has_policy; /** - * Hash over the policy data for this deposit (remains unknown to the - * Exchange). Needed for the verification of the deposit's signature - */ - struct TALER_ExtensionPolicyHashP h_policy; - - /** * Has the deposit been wired? */ bool done; |