aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-02-06 15:41:39 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-02-06 15:43:06 +0100
commit8c820b6916841d746475a4f67904272a518a7aa9 (patch)
tree947ac506f58d92990a7a2dfcfd4a1b7ed9ead48b /src/include
parent26d5e08816d3a435cb562db5859069206ca95a63 (diff)
contract terminology renaming (#4877)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h4
-rw-r--r--src/include/taler_error_codes.h2
-rw-r--r--src/include/taler_exchange_service.h14
-rw-r--r--src/include/taler_exchangedb_plugin.h34
-rw-r--r--src/include/taler_signatures.h36
5 files changed, 44 insertions, 46 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 269c1c62c..ecdb2e3b0 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -361,9 +361,9 @@ struct TALER_CoinPublicInfo
struct TALER_TrackTransferDetails
{
/**
- * Hash of the contract.
+ * Hash of the proposal data.
*/
- struct GNUNET_HashCode h_contract;
+ struct GNUNET_HashCode h_proposal_data;
/**
* Which coin was deposited?
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index b0e337325..7a0d9340e 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -343,7 +343,7 @@ enum TALER_ErrorCode
/**
* The hash of the given wire address does not match the hash
- * specified in the contract.
+ * specified in the proposal data.
* This response is provided
* with HTTP status code MHD_HTTP_BAD_REQUEST.
*/
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index e368f954c..2133e5770 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -451,7 +451,7 @@ typedef void
* @param wire_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)
* @param wire_details the merchant’s account details, in a format supported by the exchange
- * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the exchange)
+ * @param h_proposal_data hash of the contact of the merchant with the customer (further details are never disclosed to the exchange)
* @param coin_pub coin’s public key
* @param denom_pub denomination key with which the coin is signed
* @param denom_sig exchange’s unblinded signature of the coin
@@ -470,7 +470,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_Amount *amount,
struct GNUNET_TIME_Absolute wire_deadline,
json_t *wire_details,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_DenominationSignature *denom_sig,
const struct TALER_DenominationPublicKey *denom_pub,
@@ -539,8 +539,8 @@ typedef void
* (as that fee is still being subtracted), and smaller than the amount
* (with deposit fee) of the original deposit contribution of this coin
* @param refund_fee fee applicable to this coin for the refund
- * @param h_contract hash of the contact of the merchant with the customer that is being refunded
- * @param transaction_id transaction id for the transaction being refunded, must match @a h_contract
+ * @param h_proposal_data hash of the contact of the merchant with the customer that is being refunded
+ * @param transaction_id transaction id for the transaction being refunded, must match @a h_proposal_data
* @param coin_pub coin’s public key of the coin from the original deposit operation
* @param rtransaction_id transaction id for the transaction between merchant and customer (of refunding operation);
* this is needed as we may first do a partial refund and later a full refund. If both
@@ -556,7 +556,7 @@ struct TALER_EXCHANGE_RefundHandle *
TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_Amount *amount,
const struct TALER_Amount *refund_fee,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
uint64_t transaction_id,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
uint64_t rtransaction_id,
@@ -1217,7 +1217,7 @@ typedef void
* @param exchange the exchange to query
* @param merchant_priv the merchant's private key
* @param h_wire hash of merchant's wire transfer details
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the proposal data
* @param coin_pub public key of the coin
* @param transaction_id transaction identifier
* @param cb function to call with the result
@@ -1228,7 +1228,7 @@ struct TALER_EXCHANGE_TrackTransactionHandle *
TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_MerchantPrivateKeyP *merchant_priv,
const struct GNUNET_HashCode *h_wire,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
uint64_t transaction_id,
TALER_EXCHANGE_TrackTransactionCallback cb,
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 19fb1d042..779c9892e 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -223,8 +223,8 @@ struct TALER_EXCHANGEDB_Deposit
/**
* ECDSA signature affirming that the customer intends
* this coin to be deposited at the merchant identified
- * by @e h_wire in relation to the contract identified
- * by @e h_contract.
+ * by @e h_wire in relation to the proposal data identified
+ * by @e h_proposal_data.
*/
struct TALER_CoinSpendSignatureP csig;
@@ -235,10 +235,10 @@ struct TALER_EXCHANGEDB_Deposit
struct TALER_MerchantPublicKeyP merchant_pub;
/**
- * Hash over the contract between merchant and customer
+ * Hash over the proposa data between merchant and customer
* (remains unknown to the Exchange).
*/
- struct GNUNET_HashCode h_contract;
+ struct GNUNET_HashCode h_proposal_data;
/**
* Hash of the (canonical) representation of @e wire, used
@@ -332,10 +332,10 @@ struct TALER_EXCHANGEDB_Refund
struct TALER_MerchantSignatureP merchant_sig;
/**
- * Hash over the contract between merchant and customer
+ * Hash over the proposal data between merchant and customer
* (remains unknown to the Exchange).
*/
- struct GNUNET_HashCode h_contract;
+ struct GNUNET_HashCode h_proposal_data;
/**
* Merchant-generated transaction ID to detect duplicate
@@ -563,7 +563,7 @@ struct TALER_EXCHANGEDB_Session;
* @param amount_with_fee amount that was deposited including fee
* @param deposit_fee amount the exchange gets to keep as transaction fees
* @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and customer
* @param wire_deadline by which the merchant adviced that he would like the
* wire transfer to be executed
* @param receiver_wire_account wire details for the merchant, NULL from iterate_matching_deposits()
@@ -577,7 +577,7 @@ typedef int
const struct TALER_Amount *amount_with_fee,
const struct TALER_Amount *deposit_fee,
uint64_t transaction_id,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
struct GNUNET_TIME_Absolute wire_deadline,
const json_t *receiver_wire_account);
@@ -610,7 +610,7 @@ typedef void
* @param coin_sig signature from the coin
* @param amount_with_fee amount that was deposited including fee
* @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and customer
* @param refund_deadline by which the merchant adviced that he might want
* to get a refund
* @param wire_deadline by which the merchant adviced that he would like the
@@ -627,7 +627,7 @@ typedef int
const struct TALER_CoinSpendSignatureP *coin_sig,
const struct TALER_Amount *amount_with_fee,
uint64_t transaction_id,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
struct GNUNET_TIME_Absolute refund_deadline,
struct GNUNET_TIME_Absolute wire_deadline,
const json_t *receiver_wire_account,
@@ -645,7 +645,7 @@ typedef int
* @param coin_sig signature from the coin
* @param amount_with_fee amount that was deposited including fee
* @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and customer
* @param refund_deadline by which the merchant adviced that he might want
* to get a refund
* @param wire_deadline by which the merchant adviced that he would like the
@@ -673,7 +673,7 @@ typedef int
* @param coin_pub public key of the coin
* @param merchant_pub public key of the merchant
* @param merchant_sig signature of the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and customer
* @param transaction_id original transaction ID chosen by the merchant
* @param rtransaction_id refund transaction ID chosen by the merchant
* @param amount_with_fee amount that was deposited including fee
@@ -685,7 +685,7 @@ typedef int
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_MerchantPublicKeyP *merchant_pub,
const struct TALER_MerchantSignatureP *merchant_sig,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
uint64_t transaction_id,
uint64_t rtransaction_id,
const struct TALER_Amount *amount_with_fee);
@@ -784,7 +784,7 @@ typedef void
* @param merchant_pub public key of the merchant (should be same for all callbacks with the same @e cls)
* @param h_wire hash of wire transfer details of the merchant (should be same for all callbacks with the same @e cls)
* @param exec_time execution time of the wire transfer (should be same for all callbacks with the same @e cls)
- * @param h_contract which contract was this payment about
+ * @param h_proposal_data which proposal was this payment about
* @param transaction_id merchant's transaction ID for the payment
* @param coin_pub which public key was this payment about
* @param coin_value amount contributed by this coin in total (with fee)
@@ -795,7 +795,7 @@ typedef void
const struct TALER_MerchantPublicKeyP *merchant_pub,
const struct GNUNET_HashCode *h_wire,
struct GNUNET_TIME_Absolute exec_time,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
uint64_t transaction_id,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *coin_value,
@@ -1504,7 +1504,7 @@ struct TALER_EXCHANGEDB_Plugin
*
* @param cls closure
* @param session database connection
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the proposal data
* @param h_wire hash of merchant wire details
* @param coin_pub public key of deposited coin
* @param merchant_pub merchant public key
@@ -1517,7 +1517,7 @@ struct TALER_EXCHANGEDB_Plugin
int
(*wire_lookup_deposit_wtid)(void *cls,
struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *h_contract,
+ const struct GNUNET_HashCode *h_proposal_data,
const struct GNUNET_HashCode *h_wire,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_MerchantPublicKeyP *merchant_pub,
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index cf05d6551..3740eb205 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -266,7 +266,7 @@ struct TALER_DepositRequestPS
/**
* Hash over the contract for which this deposit is made.
*/
- struct GNUNET_HashCode h_contract GNUNET_PACKED;
+ struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
/**
* Hash over the wiring information of the merchant.
@@ -301,7 +301,7 @@ struct TALER_DepositRequestPS
* to the customer for each transaction. Note that different coins
* that are part of the same transaction can use the same
* transaction ID. The transaction ID is useful for later disputes,
- * and the merchant's contract offer (@e h_contract) with the
+ * and the merchant's contract offer (@e h_proposal_data) with the
* customer should include the offer's term and transaction ID
* signed with a key from the merchant.
*/
@@ -356,7 +356,7 @@ struct TALER_DepositConfirmationPS
/**
* Hash over the contract for which this deposit is made.
*/
- struct GNUNET_HashCode h_contract GNUNET_PACKED;
+ struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
/**
* Hash over the wiring information of the merchant.
@@ -417,9 +417,10 @@ struct TALER_RefundRequestPS
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
/**
- * Hash over the contract which is being refunded.
+ * Hash over the proposal data to identify the contract
+ * which is being refunded.
*/
- struct GNUNET_HashCode h_contract GNUNET_PACKED;
+ struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
/**
* Merchant-generated transaction ID of the orginal transaction.
@@ -475,9 +476,10 @@ struct TALER_RefundConfirmationPS
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
/**
- * Hash over the contract which is being refunded.
+ * Hash over the proposal data to identify the contract
+ * which is being refunded.
*/
- struct GNUNET_HashCode h_contract GNUNET_PACKED;
+ struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
/**
* Merchant-generated transaction ID of the orginal transaction.
@@ -917,9 +919,9 @@ struct TALER_DepositTrackPS
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
/**
- * Hash over the contract for which this deposit is made.
+ * Hash over the proposal data of the contract for which this deposit is made.
*/
- struct GNUNET_HashCode h_contract GNUNET_PACKED;
+ struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
/**
* Hash over the wiring information of the merchant.
@@ -928,13 +930,9 @@ struct TALER_DepositTrackPS
/**
* Merchant-generated transaction ID to detect duplicate
- * transactions. The merchant must communicate a merchant-unique ID
- * to the customer for each transaction. Note that different coins
- * that are part of the same transaction can use the same
- * transaction ID. The transaction ID is useful for later disputes,
- * and the merchant's contract offer (@e h_contract) with the
- * customer should include the offer's term and transaction ID
- * signed with a key from the merchant.
+ * transactions. Chosen by the merchant and used to group
+ * deposits when there are multiple payments the same proposal
+ * (typically from different customers).
*/
uint64_t transaction_id GNUNET_PACKED;
@@ -963,7 +961,7 @@ struct TALER_WireDepositDetailP
/**
* Hash of the contract
*/
- struct GNUNET_HashCode h_contract;
+ struct GNUNET_HashCode h_proposal_data;
/**
* Time when the wire transfer was performed by the exchange.
@@ -1087,7 +1085,7 @@ struct TALER_ConfirmWirePS
/**
* Hash over the contract for which this deposit is made.
*/
- struct GNUNET_HashCode h_contract GNUNET_PACKED;
+ struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
/**
* Raw value (binary encoding) of the wire transfer subject.
@@ -1106,7 +1104,7 @@ struct TALER_ConfirmWirePS
* merchant-unique ID to the customer for each transaction. Note
* that different coins that are part of the same transaction can
* use the same transaction ID. The transaction ID is useful for
- * later disputes, and the merchant's contract offer (@e h_contract)
+ * later disputes, and the merchant's contract offer (@e h_proposal_data)
* with the customer should include the offer's term and transaction
* ID signed with a key from the merchant.
*/