diff options
Diffstat (limited to 'src/include/taler_signatures.h')
-rw-r--r-- | src/include/taler_signatures.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index bd892e793..f1586aa8c 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -396,6 +396,64 @@ struct TALER_DepositConfirmationPS /** + * @brief Format used to generate the signature on a request to refund + * a coin into the account of the customer. + */ +struct TALER_RefundRequestPS +{ + /** + * Purpose must be #TALER_SIGNATURE_MERCHANT_REFUND. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Hash over the contract which is being refunded. + */ + struct GNUNET_HashCode h_contract GNUNET_PACKED; + + /** + * Merchant-generated transaction ID of the orginal transaction. + */ + uint64_t transaction_id GNUNET_PACKED; + + /** + * The coin's public key. This is the value that must have been + * signed (blindly) by the Exchange. + */ + struct TALER_CoinSpendPublicKeyP coin_pub; + + /** + * The Merchant's public key. Allows the merchant to later refund + * the transaction or to inquire about the wire transfer identifier. + */ + struct TALER_MerchantPublicKeyP merchant; + + /** + * Merchant-generated transaction ID for the refund. + */ + uint64_t rtransaction_id GNUNET_PACKED; + + /** + * Amount to be refunded, including refund fee charged by the + * exchange to the customer. + */ + struct TALER_AmountNBO refund_amount; + + /** + * Refund fee charged by the exchange. This must match the + * Exchange's denomination key's refund fee. If the client puts in + * an invalid refund fee (too high or too low) that does not match + * the Exchange's denomination key, the refund operation is invalid + * and will be rejected by the exchange. The @e amount_with_fee + * minus the @e refund_fee is the amount that will be credited to + * the original coin. + */ + struct TALER_AmountNBO refund_fee; + +}; + + +/** * @brief Message signed by a coin to indicate that the coin should be * melted. */ @@ -640,6 +698,13 @@ struct TALER_DenominationKeyValidityPS struct TALER_AmountNBO fee_refresh; /** + * The fee the exchange charges when a coin of this type is refunded. + * (can be zero). Note that refund fees are charged to the customer; + * if a refund is given, the deposit fee is also refunded. + */ + struct TALER_AmountNBO fee_refund; + + /** * Hash code of the denomination public key. (Used to avoid having * the variable-size RSA key in this struct.) */ @@ -736,6 +801,12 @@ struct TALER_ExchangeKeyValidityPS struct TALER_AmountNBO fee_refresh; /** + * The fee the exchange charges when a coin of this type is refreshed. + * (can be zero). + */ + struct TALER_AmountNBO fee_refund; + + /** * Hash code of the denomination public key. (Used to avoid having * the variable-size RSA key in this struct.) */ |