diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-28 19:48:41 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-28 19:48:41 +0100 |
commit | 2e0e30291c4e490389f85bbd4973374f0adf22f4 (patch) | |
tree | 8d5f306cb967e7e7ab137b133206c7414bbb6f35 /src/include | |
parent | e19f1906a3363f0f49553d35d95429c92bec29d4 (diff) |
sign /deposit reply so that merchant has proof that mint accepted it
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_signatures.h | 57 |
1 files changed, 54 insertions, 3 deletions
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index e72c2ed61..84968582e 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -85,6 +85,12 @@ */ #define TALER_SIGNATURE_REFRESH_MELT_CONFIRM 9 +/** + * Signature where the Mint confirms a deposit request. + */ +#define TALER_SIGNATURE_MINT_DEPOSIT 10 + + /***********************/ /* Merchant signatures */ /***********************/ @@ -101,12 +107,12 @@ /** * Signature made by the wallet of a user to confirm a deposit permission */ -#define TALER_SIGNATURE_DEPOSIT 201 +#define TALER_SIGNATURE_WALLET_DEPOSIT 201 /** * Signature made by the wallet of a user to confirm a incremental deposit permission */ -#define TALER_SIGNATURE_INCREMENTAL_DEPOSIT 202 +#define TALER_SIGNATURE_INCREMENTAL_WALLET_DEPOSIT 202 @@ -149,7 +155,7 @@ struct TALER_WithdrawRequest struct TALER_DepositRequest { /** - * Purpose must be #TALER_SIGNATURE_DEPOSIT + * Purpose must be #TALER_SIGNATURE_WALLET_DEPOSIT */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -183,6 +189,51 @@ struct TALER_DepositRequest /** + * Format used to generate the signature on a confirmation + * from the mint that a deposit request succeeded. + */ +struct TALER_DepositConfirmation +{ + /** + * Purpose must be #TALER_SIGNATURE_MINT_DEPOSIT + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Hash over the contract for which this deposit is made. + */ + struct GNUNET_HashCode h_contract; + + /** + * Hash over the wiring information of the merchant. + */ + struct GNUNET_HashCode h_wire; + + /** + * Merchant-generated transaction ID to detect duplicate + * transactions. + */ + uint64_t transaction_id GNUNET_PACKED; + + /** + * Amount to be deposited. + */ + struct TALER_AmountNBO amount; + + /** + * The coin's public key. + */ + struct GNUNET_CRYPTO_EcdsaPublicKey coin_pub; + + /** + * The Merachant's public key. + */ + struct GNUNET_CRYPTO_EddsaPublicKey merchant; + +}; + + +/** * FIXME */ struct TALER_MINT_SignKeyIssue |