diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-03-02 21:07:27 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-03-02 21:07:27 +0100 |
commit | 17ff4f5e97b981f0b3eebd6e3923fe60dc75edd5 (patch) | |
tree | 585b6cbe92aec91b2e186206c1bfe746a0cd85e6 /src/include | |
parent | 531272a92a5aa08559436138ff5106a6bff1b361 (diff) | |
parent | 201b2b3d1af2a4d44fe32c8b0312d935845cf129 (diff) |
fixing #4230 in bank-lib
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/Makefile.am | 6 | ||||
-rw-r--r-- | src/include/taler_crypto_lib.h | 24 | ||||
-rw-r--r-- | src/include/taler_exchange_service.h (renamed from src/include/taler_mint_service.h) | 446 | ||||
-rw-r--r-- | src/include/taler_exchangedb_lib.h (renamed from src/include/taler_mintdb_lib.h) | 106 | ||||
-rw-r--r-- | src/include/taler_exchangedb_plugin.h (renamed from src/include/taler_mintdb_plugin.h) | 258 | ||||
-rw-r--r-- | src/include/taler_signatures.h | 200 |
6 files changed, 520 insertions, 520 deletions
diff --git a/src/include/Makefile.am b/src/include/Makefile.am index 4d7ae3cb2..6f7f53acb 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am @@ -16,9 +16,9 @@ talerinclude_HEADERS = \ taler_crypto_lib.h \ taler_json_lib.h \ taler_util.h \ - taler_mint_service.h \ - taler_mintdb_lib.h \ - taler_mintdb_plugin.h \ + taler_exchange_service.h \ + taler_exchangedb_lib.h \ + taler_exchangedb_plugin.h \ taler_pq_lib.h \ taler_signatures.h \ taler_wire_lib.h \ diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 6056270fa..e948fa28a 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -140,23 +140,23 @@ struct TALER_TransferPrivateKeyP /** - * @brief Type of online public keys used by the mint to sign + * @brief Type of online public keys used by the exchange to sign * messages. */ -struct TALER_MintPublicKeyP +struct TALER_ExchangePublicKeyP { /** - * Taler uses EdDSA for online mint message signing. + * Taler uses EdDSA for online exchange message signing. */ struct GNUNET_CRYPTO_EddsaPublicKey eddsa_pub; }; /** - * @brief Type of online public keys used by the mint to + * @brief Type of online public keys used by the exchange to * sign messages. */ -struct TALER_MintPrivateKeyP +struct TALER_ExchangePrivateKeyP { /** * Taler uses EdDSA for online signatures sessions. @@ -166,9 +166,9 @@ struct TALER_MintPrivateKeyP /** - * @brief Type of signatures used by the mint to sign messages online. + * @brief Type of signatures used by the exchange to sign messages online. */ -struct TALER_MintSignatureP +struct TALER_ExchangeSignatureP { /** * Taler uses EdDSA for online signatures sessions. @@ -178,7 +178,7 @@ struct TALER_MintSignatureP /** - * @brief Type of the offline master public key used by the mint. + * @brief Type of the offline master public key used by the exchange. */ struct TALER_MasterPublicKeyP { @@ -214,7 +214,7 @@ struct TALER_AuditorSignatureP /** - * @brief Type of the offline master public keys used by the mint. + * @brief Type of the offline master public keys used by the exchange. */ struct TALER_MasterPrivateKeyP { @@ -226,7 +226,7 @@ struct TALER_MasterPrivateKeyP /** - * @brief Type of signatures by the offline master public key used by the mint. + * @brief Type of signatures by the offline master public key used by the exchange. */ struct TALER_MasterSignatureP { @@ -464,8 +464,8 @@ struct TALER_WireTransferIdentifierRawP /** * Binary information encoded in Crockford's Base32 in wire transfer * subjects of transfers from Taler to a merchant. The actual value - * is chosen by the mint and has no particular semantics, other than - * being unique so that the mint can lookup details about the wire + * is chosen by the exchange and has no particular semantics, other than + * being unique so that the exchange can lookup details about the wire * transfer when needed. */ struct TALER_WireTransferIdentifierP diff --git a/src/include/taler_mint_service.h b/src/include/taler_exchange_service.h index 1502edfbc..566dec6f8 100644 --- a/src/include/taler_mint_service.h +++ b/src/include/taler_exchange_service.h @@ -14,13 +14,13 @@ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> */ /** - * @file include/taler_mint_service.h - * @brief C interface of libtalermint, a C library to use mint's HTTP API + * @file include/taler_exchange_service.h + * @brief C interface of libtalerexchange, a C library to use exchange's HTTP API * @author Sree Harsha Totakura <sreeharsha@totakura.in> * @author Christian Grothoff */ -#ifndef _TALER_MINT_SERVICE_H -#define _TALER_MINT_SERVICE_H +#ifndef _TALER_EXCHANGE_SERVICE_H +#define _TALER_EXCHANGE_SERVICE_H #include "taler_util.h" @@ -30,7 +30,7 @@ * @brief Handle to this library context. This is where the * main event loop logic lives. */ -struct TALER_MINT_Context; +struct TALER_EXCHANGE_Context; /** @@ -39,18 +39,18 @@ struct TALER_MINT_Context; * * @return the context, NULL on error (failure to initialize) */ -struct TALER_MINT_Context * -TALER_MINT_init (void); +struct TALER_EXCHANGE_Context * +TALER_EXCHANGE_init (void); /** * Obtain the information for a select() call to wait until - * #TALER_MINT_perform() is ready again. Note that calling - * any other TALER_MINT-API may also imply that the library - * is again ready for #TALER_MINT_perform(). + * #TALER_EXCHANGE_perform() is ready again. Note that calling + * any other TALER_EXCHANGE-API may also imply that the library + * is again ready for #TALER_EXCHANGE_perform(). * * Basically, a client should use this API to prepare for select(), - * then block on select(), then call #TALER_MINT_perform() and then + * then block on select(), then call #TALER_EXCHANGE_perform() and then * start again until the work with the context is done. * * This function will NOT zero out the sets and assumes that @a max_fd @@ -69,10 +69,10 @@ TALER_MINT_init (void); * to be passed to select().) * @param timeout set to the timeout in milliseconds (!); -1 means * no timeout (NULL, blocking forever is OK), 0 means to - * proceed immediately with #TALER_MINT_perform(). + * proceed immediately with #TALER_EXCHANGE_perform(). */ void -TALER_MINT_get_select_info (struct TALER_MINT_Context *ctx, +TALER_EXCHANGE_get_select_info (struct TALER_EXCHANGE_Context *ctx, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, @@ -86,7 +86,7 @@ TALER_MINT_get_select_info (struct TALER_MINT_Context *ctx, * @param ctx the library context */ void -TALER_MINT_perform (struct TALER_MINT_Context *ctx); +TALER_EXCHANGE_perform (struct TALER_EXCHANGE_Context *ctx); /** @@ -97,7 +97,7 @@ TALER_MINT_perform (struct TALER_MINT_Context *ctx); * @param ctx the library context */ void -TALER_MINT_fini (struct TALER_MINT_Context *ctx); +TALER_EXCHANGE_fini (struct TALER_EXCHANGE_Context *ctx); /* ********************* /keys *********************** */ @@ -105,27 +105,27 @@ TALER_MINT_fini (struct TALER_MINT_Context *ctx); /** * List of possible options to be passed to - * #TALER_MINT_connect(). + * #TALER_EXCHANGE_connect(). */ -enum TALER_MINT_Option +enum TALER_EXCHANGE_Option { /** * Terminator (end of option list). */ - TALER_MINT_OPTION_END = 0 + TALER_EXCHANGE_OPTION_END = 0 }; /** - * @brief Mint's signature key + * @brief Exchange's signature key */ -struct TALER_MINT_SigningPublicKey +struct TALER_EXCHANGE_SigningPublicKey { /** * The signing public key */ - struct TALER_MintPublicKeyP key; + struct TALER_ExchangePublicKeyP key; /** * Validity start time @@ -140,9 +140,9 @@ struct TALER_MINT_SigningPublicKey /** - * @brief Public information about a mint's denomination key + * @brief Public information about a exchange's denomination key */ -struct TALER_MINT_DenomPublicKey +struct TALER_EXCHANGE_DenomPublicKey { /** * The public key @@ -173,7 +173,7 @@ struct TALER_MINT_DenomPublicKey /** * When do signatures with this denomination key become invalid? * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Mint is then allowed to destroy its side + * disputes anymore, as the Exchange is then allowed to destroy its side * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_spend (by a year or more). */ @@ -202,9 +202,9 @@ struct TALER_MINT_DenomPublicKey /** - * @brief Information we get from the mint about auditors. + * @brief Information we get from the exchange about auditors. */ -struct TALER_MINT_AuditorInformation +struct TALER_EXCHANGE_AuditorInformation { /** * Public key of the auditing institution. @@ -234,35 +234,35 @@ struct TALER_MINT_AuditorInformation * elements point to the same locations as the entries * in the key's main `denom_keys` array. */ - const struct TALER_MINT_DenomPublicKey **denom_keys; + const struct TALER_EXCHANGE_DenomPublicKey **denom_keys; }; /** - * @brief Information about keys from the mint. + * @brief Information about keys from the exchange. */ -struct TALER_MINT_Keys +struct TALER_EXCHANGE_Keys { /** - * Long-term offline signing key of the mint. + * Long-term offline signing key of the exchange. */ struct TALER_MasterPublicKeyP master_pub; /** - * Array of the mint's online signing keys. + * Array of the exchange's online signing keys. */ - struct TALER_MINT_SigningPublicKey *sign_keys; + struct TALER_EXCHANGE_SigningPublicKey *sign_keys; /** - * Array of the mint's denomination keys. + * Array of the exchange's denomination keys. */ - struct TALER_MINT_DenomPublicKey *denom_keys; + struct TALER_EXCHANGE_DenomPublicKey *denom_keys; /** - * Array of the keys of the auditors of the mint. + * Array of the keys of the auditors of the exchange. */ - struct TALER_MINT_AuditorInformation *auditors; + struct TALER_EXCHANGE_AuditorInformation *auditors; /** * Length of the @e sign_keys array. @@ -284,101 +284,101 @@ struct TALER_MINT_Keys /** * Function called with information about who is auditing - * a particular mint and what key the mint is using. + * a particular exchange and what key the exchange is using. * * @param cls closure * @param keys information about the various keys used - * by the mint + * by the exchange */ typedef void -(*TALER_MINT_CertificationCallback) (void *cls, - const struct TALER_MINT_Keys *keys); +(*TALER_EXCHANGE_CertificationCallback) (void *cls, + const struct TALER_EXCHANGE_Keys *keys); /** - * @brief Handle to the mint. This is where we interact with - * a particular mint and keep the per-mint information. + * @brief Handle to the exchange. This is where we interact with + * a particular exchange and keep the per-exchange information. */ -struct TALER_MINT_Handle; +struct TALER_EXCHANGE_Handle; /** - * Initialise a connection to the mint. Will connect to the - * mint and obtain information about the mint's master public - * key and the mint's auditor. The respective information will + * Initialise a connection to the exchange. Will connect to the + * exchange and obtain information about the exchange's master public + * key and the exchange's auditor. The respective information will * be passed to the @a cert_cb once available, and all future - * interactions with the mint will be checked to be signed + * interactions with the exchange will be checked to be signed * (where appropriate) by the respective master key. * * @param ctx the context - * @param url HTTP base URL for the mint - * @param cert_cb function to call with the mint's certification information + * @param url HTTP base URL for the exchange + * @param cert_cb function to call with the exchange's certification information * @param cert_cb_cls closure for @a cert_cb - * @param ... list of additional arguments, terminated by #TALER_MINT_OPTION_END. - * @return the mint handle; NULL upon error + * @param ... list of additional arguments, terminated by #TALER_EXCHANGE_OPTION_END. + * @return the exchange handle; NULL upon error */ -struct TALER_MINT_Handle * -TALER_MINT_connect (struct TALER_MINT_Context *ctx, +struct TALER_EXCHANGE_Handle * +TALER_EXCHANGE_connect (struct TALER_EXCHANGE_Context *ctx, const char *url, - TALER_MINT_CertificationCallback cert_cb, + TALER_EXCHANGE_CertificationCallback cert_cb, void *cert_cb_cls, ...); /** - * Disconnect from the mint. + * Disconnect from the exchange. * - * @param mint the mint handle + * @param exchange the exchange handle */ void -TALER_MINT_disconnect (struct TALER_MINT_Handle *mint); +TALER_EXCHANGE_disconnect (struct TALER_EXCHANGE_Handle *exchange); /** - * Obtain the keys from the mint. + * Obtain the keys from the exchange. * - * @param mint the mint handle - * @return the mint's key set + * @param exchange the exchange handle + * @return the exchange's key set */ -const struct TALER_MINT_Keys * -TALER_MINT_get_keys (const struct TALER_MINT_Handle *mint); +const struct TALER_EXCHANGE_Keys * +TALER_EXCHANGE_get_keys (const struct TALER_EXCHANGE_Handle *exchange); /** - * Test if the given @a pub is a the current signing key from the mint + * Test if the given @a pub is a the current signing key from the exchange * according to @a keys. * - * @param keys the mint's key set - * @param pub claimed current online signing key for the mint + * @param keys the exchange's key set + * @param pub claimed current online signing key for the exchange * @return #GNUNET_OK if @a pub is (according to /keys) a current signing key */ int -TALER_MINT_test_signing_key (const struct TALER_MINT_Keys *keys, - const struct TALER_MintPublicKeyP *pub); +TALER_EXCHANGE_test_signing_key (const struct TALER_EXCHANGE_Keys *keys, + const struct TALER_ExchangePublicKeyP *pub); /** - * Obtain the denomination key details from the mint. + * Obtain the denomination key details from the exchange. * - * @param keys the mint's key set + * @param keys the exchange's key set * @param pk public key of the denomination to lookup * @return details about the given denomination key, NULL if the key is not * found */ -const struct TALER_MINT_DenomPublicKey * -TALER_MINT_get_denomination_key (const struct TALER_MINT_Keys *keys, +const struct TALER_EXCHANGE_DenomPublicKey * +TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, const struct TALER_DenominationPublicKey *pk); /** - * Obtain the denomination key details from the mint. + * Obtain the denomination key details from the exchange. * - * @param keys the mint's key set + * @param keys the exchange's key set * @param hc hash of the public key of the denomination to lookup * @return details about the given denomination key */ -const struct TALER_MINT_DenomPublicKey * -TALER_MINT_get_denomination_key_by_hash (const struct TALER_MINT_Keys *keys, +const struct TALER_EXCHANGE_DenomPublicKey * +TALER_EXCHANGE_get_denomination_key_by_hash (const struct TALER_EXCHANGE_Keys *keys, const struct GNUNET_HashCode *hc); @@ -388,31 +388,31 @@ TALER_MINT_get_denomination_key_by_hash (const struct TALER_MINT_Keys *keys, /** * @brief A Wire format inquiry handle */ -struct TALER_MINT_WireHandle; +struct TALER_EXCHANGE_WireHandle; /** * Callbacks of this type are used to serve the result of submitting a - * wire format inquiry request to a mint. + * wire format inquiry request to a exchange. * * The callback is invoked multiple times, once for each supported @a * method. Finally, it is invoked one more time with cls/0/NULL/NULL * to indicate the end of the iteration. If any request fails to - * generate a valid response from the mint, @a http_status will also + * generate a valid response from the exchange, @a http_status will also * be zero and the iteration will also end. Thus, the iteration * always ends with a final call with an @a http_status of 0. If the * @a http_status is already 0 on the first call, then the response to * the /wire request was invalid. Later, clients can tell the * difference between @a http_status of 0 indicating a failed * /wire/method request and a regular end of the iteration by @a - * method being non-NULL. If the mint simply correctly asserts that + * method being non-NULL. If the exchange simply correctly asserts that * it does not support any methods, @a method will be NULL but the @a * http_status will be #MHD_HTTP_OK for the first call (followed by a * cls/0/NULL/NULL call to signal the end of the iteration). * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful request; - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param method wire format method supported, i.e. "test" or "sepa", or NULL * if already the /wire request failed. * @param obj the received JSON reply, if successful this should be the wire @@ -422,17 +422,17 @@ struct TALER_MINT_WireHandle; * provide more information to the user about the @a method). */ typedef void -(*TALER_MINT_WireResultCallback) (void *cls, +(*TALER_EXCHANGE_WireResultCallback) (void *cls, unsigned int http_status, const char *method, json_t *obj); /** - * Obtain information about a mint's wire instructions. - * A mint may provide wire instructions for creating + * Obtain information about a exchange's wire instructions. + * A exchange may provide wire instructions for creating * a reserve. The wire instructions also indicate - * which wire formats merchants may use with the mint. + * which wire formats merchants may use with the exchange. * This API is typically used by a wallet for wiring * funds, and possibly by a merchant to determine * supported wire formats. @@ -440,17 +440,17 @@ typedef void * Note that while we return the (main) response verbatim to the * caller for further processing, we do already verify that the * response is well-formed (i.e. that signatures included in the - * response are all valid). If the mint's reply is not well-formed, + * response are all valid). If the exchange's reply is not well-formed, * we return an HTTP status code of zero to @a cb. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param wire_cb the callback to call when a reply for this request is available * @param wire_cb_cls closure for the above callback * @return a handle for this request */ -struct TALER_MINT_WireHandle * -TALER_MINT_wire (struct TALER_MINT_Handle *mint, - TALER_MINT_WireResultCallback wire_cb, +struct TALER_EXCHANGE_WireHandle * +TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange, + TALER_EXCHANGE_WireResultCallback wire_cb, void *wire_cb_cls); @@ -461,7 +461,7 @@ TALER_MINT_wire (struct TALER_MINT_Handle *mint, * @param wh the wire information request handle */ void -TALER_MINT_wire_cancel (struct TALER_MINT_WireHandle *wh); +TALER_EXCHANGE_wire_cancel (struct TALER_EXCHANGE_WireHandle *wh); /* ********************* /deposit *********************** */ @@ -470,61 +470,61 @@ TALER_MINT_wire_cancel (struct TALER_MINT_WireHandle *wh); /** * @brief A Deposit Handle */ -struct TALER_MINT_DepositHandle; +struct TALER_EXCHANGE_DepositHandle; /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a mint. + * deposit permission request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful deposit; - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param obj the received JSON reply, should be kept as proof (and, in case of errors, * be forwarded to the customer) */ typedef void -(*TALER_MINT_DepositResultCallback) (void *cls, +(*TALER_EXCHANGE_DepositResultCallback) (void *cls, unsigned int http_status, json_t *obj); /** - * Submit a deposit permission to the mint and get the mint's + * Submit a deposit permission to the exchange and get the exchange's * response. This API is typically used by a merchant. Note that * while we return the response verbatim to the caller for further * processing, we do already verify that the response is well-formed * (i.e. that signatures included in the response are all valid). If - * the mint's reply is not well-formed, we return an HTTP status code + * the exchange's reply is not well-formed, we return an HTTP status code * of zero to @a cb. * * We also verify that the @a coin_sig is valid for this deposit * request, and that the @a ub_sig is a valid signature for @a - * coin_pub. Also, the @a mint must be ready to operate (i.e. have + * coin_pub. Also, the @a exchange must be ready to operate (i.e. have * finished processing the /keys reply). If either check fails, we do - * NOT initiate the transaction with the mint and instead return NULL. + * NOT initiate the transaction with the exchange and instead return NULL. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param amount the amount to be deposited - * @param wire_deadline execution date, until which the merchant would like the mint to settle the balance (advisory, the mint cannot be - * forced to settle in the past or upon very short notice, but of course a well-behaved mint will limit aggregation based on the advice received) - * @param wire_details the merchant’s account details, in a format supported by the mint - * @param h_contract hash of the contact of the merchant with the customer (further details are never disclosed to the mint) + * @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 coin_pub coin’s public key * @param denom_pub denomination key with which the coin is signed - * @param denom_sig mint’s unblinded signature of the coin - * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the mint + * @param denom_sig exchange’s unblinded signature of the coin + * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the exchange * @param transaction_id transaction id for the transaction between merchant and customer * @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests) - * @param refund_deadline date until which the merchant can issue a refund to the customer via the mint (can be zero if refunds are not allowed) + * @param refund_deadline date until which the merchant can issue a refund to the customer via the exchange (can be zero if refunds are not allowed) * @param coin_sig the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s private key. * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_MINT_DepositHandle * -TALER_MINT_deposit (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_DepositHandle * +TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_Amount *amount, struct GNUNET_TIME_Absolute wire_deadline, json_t *wire_details, @@ -537,7 +537,7 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, const struct TALER_MerchantPublicKeyP *merchant_pub, struct GNUNET_TIME_Absolute refund_deadline, const struct TALER_CoinSpendSignatureP *coin_sig, - TALER_MINT_DepositResultCallback cb, + TALER_EXCHANGE_DepositResultCallback cb, void *cb_cls); @@ -548,7 +548,7 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, * @param deposit the deposit permission request handle */ void -TALER_MINT_deposit_cancel (struct TALER_MINT_DepositHandle *deposit); +TALER_EXCHANGE_deposit_cancel (struct TALER_EXCHANGE_DepositHandle *deposit); /* ********************* /reserve/status *********************** */ @@ -557,23 +557,23 @@ TALER_MINT_deposit_cancel (struct TALER_MINT_DepositHandle *deposit); /** * @brief A /reserve/status Handle */ -struct TALER_MINT_ReserveStatusHandle; +struct TALER_EXCHANGE_ReserveStatusHandle; /** * Ways how a reserve's balance may change. */ -enum TALER_MINT_ReserveTransactionType { +enum TALER_EXCHANGE_ReserveTransactionType { /** * Deposit into the reserve. */ - TALER_MINT_RTT_DEPOSIT, + TALER_EXCHANGE_RTT_DEPOSIT, /** * Withdrawal from the reserve. */ - TALER_MINT_RTT_WITHDRAWAL + TALER_EXCHANGE_RTT_WITHDRAWAL }; @@ -581,13 +581,13 @@ enum TALER_MINT_ReserveTransactionType { /** * @brief Entry in the reserve's transaction history. */ -struct TALER_MINT_ReserveHistory +struct TALER_EXCHANGE_ReserveHistory { /** * Type of the transaction. */ - enum TALER_MINT_ReserveTransactionType type; + enum TALER_EXCHANGE_ReserveTransactionType type; /** * Amount transferred (in or out). @@ -616,45 +616,45 @@ struct TALER_MINT_ReserveHistory /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a mint. + * deposit permission request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param[in] json original response in JSON format (useful only for diagnostics) * @param balance current balance in the reserve, NULL on error * @param history_length number of entries in the transaction history, 0 on error * @param history detailed transaction history, NULL on error */ typedef void -(*TALER_MINT_ReserveStatusResultCallback) (void *cls, +(*TALER_EXCHANGE_ReserveStatusResultCallback) (void *cls, unsigned int http_status, json_t *json, const struct TALER_Amount *balance, unsigned int history_length, - const struct TALER_MINT_ReserveHistory *history); + const struct TALER_EXCHANGE_ReserveHistory *history); /** * Submit a request to obtain the transaction history of a reserve - * from the mint. Note that while we return the full response to the + * from the exchange. Note that while we return the full response to the * caller for further processing, we do already verify that the * response is well-formed (i.e. that signatures included in the - * response are all valid and add up to the balance). If the mint's + * response are all valid and add up to the balance). If the exchange's * reply is not well-formed, we return an HTTP status code of zero to * @a cb. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param reserve_pub public key of the reserve to inspect * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_MINT_ReserveStatusHandle * -TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_ReserveStatusHandle * +TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_ReservePublicKeyP *reserve_pub, - TALER_MINT_ReserveStatusResultCallback cb, + TALER_EXCHANGE_ReserveStatusResultCallback cb, void *cb_cls); @@ -665,7 +665,7 @@ TALER_MINT_reserve_status (struct TALER_MINT_Handle *mint, * @param wsh the withdraw status request handle */ void -TALER_MINT_reserve_status_cancel (struct TALER_MINT_ReserveStatusHandle *wsh); +TALER_EXCHANGE_reserve_status_cancel (struct TALER_EXCHANGE_ReserveStatusHandle *wsh); /* ********************* /reserve/withdraw *********************** */ @@ -674,35 +674,35 @@ TALER_MINT_reserve_status_cancel (struct TALER_MINT_ReserveStatusHandle *wsh); /** * @brief A /reserve/withdraw Handle */ -struct TALER_MINT_ReserveWithdrawHandle; +struct TALER_EXCHANGE_ReserveWithdrawHandle; /** * Callbacks of this type are used to serve the result of submitting a - * deposit permission request to a mint. + * deposit permission request to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param sig signature over the coin, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_ReserveWithdrawResultCallback) (void *cls, +(*TALER_EXCHANGE_ReserveWithdrawResultCallback) (void *cls, unsigned int http_status, const struct TALER_DenominationSignature *sig, json_t *full_response); /** - * Withdraw a coin from the mint using a /reserve/withdraw request. This + * Withdraw a coin from the exchange using a /reserve/withdraw request. This * API is typically used by a wallet. Note that to ensure that no * money is lost in case of hardware failures, the caller must have * committed (most of) the arguments to disk before calling, and be * ready to repeat the request with the same arguments in case of * failures. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param pk kind of coin to create * @param reserve_priv private key of the reserve to withdraw from * @param coin_priv where to store the coin's private key, @@ -712,16 +712,16 @@ typedef void * @param res_cb the callback to call when the final result for this request is available * @param res_cb_cls closure for @a res_cb * @return NULL - * if the inputs are invalid (i.e. denomination key not with this mint). + * if the inputs are invalid (i.e. denomination key not with this exchange). * In this case, the callback is not called. */ -struct TALER_MINT_ReserveWithdrawHandle * -TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, - const struct TALER_MINT_DenomPublicKey *pk, +struct TALER_EXCHANGE_ReserveWithdrawHandle * +TALER_EXCHANGE_reserve_withdraw (struct TALER_EXCHANGE_Handle *exchange, + const struct TALER_EXCHANGE_DenomPublicKey *pk, const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_CoinSpendPrivateKeyP *coin_priv, const struct TALER_DenominationBlindingKey *blinding_key, - TALER_MINT_ReserveWithdrawResultCallback res_cb, + TALER_EXCHANGE_ReserveWithdrawResultCallback res_cb, void *res_cb_cls); @@ -732,7 +732,7 @@ TALER_MINT_reserve_withdraw (struct TALER_MINT_Handle *mint, * @param sign the withdraw sign request handle */ void -TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sign); +TALER_EXCHANGE_reserve_withdraw_cancel (struct TALER_EXCHANGE_ReserveWithdrawHandle *sign); /* ********************* /refresh/melt+reveal ***************************** */ @@ -748,7 +748,7 @@ TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sig * no money is lost in case of hardware failures, is operation does * not actually initiate the request. Instead, it generates a buffer * which the caller must store before proceeding with the actual call - * to #TALER_MINT_refresh_melt() that will generate the request. + * to #TALER_EXCHANGE_refresh_melt() that will generate the request. * * This function does verify that the given request data is internally * consistent. However, the @a melts_sigs are only verified if @a @@ -775,20 +775,20 @@ TALER_MINT_reserve_withdraw_cancel (struct TALER_MINT_ReserveWithdrawHandle *sig * @param fresh_pks array of @a pks_len denominations of fresh coins to create * @param[out] res_size set to the size of the return value, or 0 on error * @return NULL - * if the inputs are invalid (i.e. denomination key not with this mint). + * if the inputs are invalid (i.e. denomination key not with this exchange). * Otherwise, pointer to a buffer of @a res_size to store persistently - * before proceeding to #TALER_MINT_refresh_melt(). + * before proceeding to #TALER_EXCHANGE_refresh_melt(). * Non-null results should be freed using #GNUNET_free(). */ char * -TALER_MINT_refresh_prepare (unsigned int num_melts, +TALER_EXCHANGE_refresh_prepare (unsigned int num_melts, const struct TALER_CoinSpendPrivateKeyP *melt_privs, const struct TALER_Amount *melt_amounts, const struct TALER_DenominationSignature *melt_sigs, - const struct TALER_MINT_DenomPublicKey *melt_pks, + const struct TALER_EXCHANGE_DenomPublicKey *melt_pks, int check_sigs, unsigned int fresh_pks_len, - const struct TALER_MINT_DenomPublicKey *fresh_pks, + const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks, size_t *res_size); @@ -797,53 +797,53 @@ TALER_MINT_refresh_prepare (unsigned int num_melts, /** * @brief A /refresh/melt Handle */ -struct TALER_MINT_RefreshMeltHandle; +struct TALER_EXCHANGE_RefreshMeltHandle; /** * Callbacks of this type are used to notify the application about the * result of the /refresh/melt stage. If successful, the @a noreveal_index - * should be committed to disk prior to proceeding #TALER_MINT_refresh_reveal(). + * should be committed to disk prior to proceeding #TALER_EXCHANGE_refresh_reveal(). * * @param cls closure * @param http_status HTTP response code, never #MHD_HTTP_OK (200) as for successful intermediate response this callback is skipped. - * 0 if the mint's reply is bogus (fails to follow the protocol) - * @param noreveal_index choice by the mint in the cut-and-choose protocol, + * 0 if the exchange's reply is bogus (fails to follow the protocol) + * @param noreveal_index choice by the exchange in the cut-and-choose protocol, * UINT16_MAX on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_RefreshMeltCallback) (void *cls, +(*TALER_EXCHANGE_RefreshMeltCallback) (void *cls, unsigned int http_status, uint16_t noreveal_index, json_t *full_response); /** - * Submit a melt request to the mint and get the mint's + * Submit a melt request to the exchange and get the exchange's * response. * * This API is typically used by a wallet. Note that to ensure that * no money is lost in case of hardware failures, the provided * argument should have been constructed using - * #TALER_MINT_refresh_prepare and committed to persistent storage + * #TALER_EXCHANGE_refresh_prepare and committed to persistent storage * prior to calling this function. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param refresh_data_length size of the @a refresh_data (returned - * in the `res_size` argument from #TALER_MINT_refresh_prepare()) + * in the `res_size` argument from #TALER_EXCHANGE_refresh_prepare()) * @param refresh_data the refresh data as returned from - #TALER_MINT_refresh_prepare()) + #TALER_EXCHANGE_refresh_prepare()) * @param melt_cb the callback to call with the result * @param melt_cb_cls closure for @a melt_cb * @return a handle for this request; NULL if the argument was invalid. * In this case, neither callback will be called. */ -struct TALER_MINT_RefreshMeltHandle * -TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshMeltHandle * +TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange, size_t refresh_data_length, const char *refresh_data, - TALER_MINT_RefreshMeltCallback melt_cb, + TALER_EXCHANGE_RefreshMeltCallback melt_cb, void *melt_cb_cls); @@ -854,7 +854,7 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, * @param rmh the refresh handle */ void -TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh); +TALER_EXCHANGE_refresh_melt_cancel (struct TALER_EXCHANGE_RefreshMeltHandle *rmh); /* ********************* /refresh/reveal ***************************** */ @@ -862,7 +862,7 @@ TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh); /** * Callbacks of this type are used to return the final result of - * submitting a refresh request to a mint. If the operation was + * submitting a refresh request to a exchange. If the operation was * successful, this function returns the signatures over the coins * that were remelted. The @a coin_privs and @a sigs arrays give the * coins in the same order (and should have the same length) in which @@ -870,14 +870,14 @@ TALER_MINT_refresh_melt_cancel (struct TALER_MINT_RefreshMeltHandle *rmh); * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param num_coins number of fresh coins created, length of the @a sigs and @a coin_privs arrays, 0 if the operation failed * @param coin_privs array of @a num_coins private keys for the coins that were created, NULL on error * @param sigs array of signature over @a num_coins coins, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_RefreshRevealCallback) (void *cls, +(*TALER_EXCHANGE_RefreshRevealCallback) (void *cls, unsigned int http_status, unsigned int num_coins, @@ -889,11 +889,11 @@ typedef void /** * @brief A /refresh/reveal Handle */ -struct TALER_MINT_RefreshRevealHandle; +struct TALER_EXCHANGE_RefreshRevealHandle; /** - * Submit a /refresh/reval request to the mint and get the mint's + * Submit a /refresh/reval request to the exchange and get the exchange's * response. * * This API is typically used by a wallet. Note that to ensure that @@ -901,25 +901,25 @@ struct TALER_MINT_RefreshRevealHandle; * arguments should have been committed to persistent storage * prior to calling this function. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param refresh_data_length size of the @a refresh_data (returned - * in the `res_size` argument from #TALER_MINT_refresh_prepare()) + * in the `res_size` argument from #TALER_EXCHANGE_refresh_prepare()) * @param refresh_data the refresh data as returned from - #TALER_MINT_refresh_prepare()) - * @param noreveal_index response from the mint to the - * #TALER_MINT_refresh_melt() invocation + #TALER_EXCHANGE_refresh_prepare()) + * @param noreveal_index response from the exchange to the + * #TALER_EXCHANGE_refresh_melt() invocation * @param reveal_cb the callback to call with the final result of the * refresh operation * @param reveal_cb_cls closure for the above callback * @return a handle for this request; NULL if the argument was invalid. * In this case, neither callback will be called. */ -struct TALER_MINT_RefreshRevealHandle * -TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshRevealHandle * +TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange, size_t refresh_data_length, const char *refresh_data, uint16_t noreveal_index, - TALER_MINT_RefreshRevealCallback reveal_cb, + TALER_EXCHANGE_RefreshRevealCallback reveal_cb, void *reveal_cb_cls); @@ -930,7 +930,7 @@ TALER_MINT_refresh_reveal (struct TALER_MINT_Handle *mint, * @param rrh the refresh reval handle */ void -TALER_MINT_refresh_reveal_cancel (struct TALER_MINT_RefreshRevealHandle *rrh); +TALER_EXCHANGE_refresh_reveal_cancel (struct TALER_EXCHANGE_RefreshRevealHandle *rrh); /* ********************* /refresh/link ***************************** */ @@ -939,26 +939,26 @@ TALER_MINT_refresh_reveal_cancel (struct TALER_MINT_RefreshRevealHandle *rrh); /** * @brief A /refresh/link Handle */ -struct TALER_MINT_RefreshLinkHandle; +struct TALER_EXCHANGE_RefreshLinkHandle; /** * Callbacks of this type are used to return the final result of - * submitting a /refresh/link request to a mint. If the operation was + * submitting a /refresh/link request to a exchange. If the operation was * successful, this function returns the signatures over the coins * that were created when the original coin was melted. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) + * 0 if the exchange's reply is bogus (fails to follow the protocol) * @param num_coins number of fresh coins created, length of the @a sigs and @a coin_privs arrays, 0 if the operation failed * @param coin_privs array of @a num_coins private keys for the coins that were created, NULL on error * @param sigs array of signature over @a num_coins coins, NULL on error * @param pubs array of public keys for the @a sigs, NULL on error - * @param full_response full response from the mint (for logging, in case of errors) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_RefreshLinkCallback) (void *cls, +(*TALER_EXCHANGE_RefreshLinkCallback) (void *cls, unsigned int http_status, unsigned int num_coins, const struct TALER_CoinSpendPrivateKeyP *coin_privs, @@ -968,23 +968,23 @@ typedef void /** - * Submit a link request to the mint and get the mint's response. + * Submit a link request to the exchange and get the exchange's response. * * This API is typically not used by anyone, it is more a threat * against those trying to receive a funds transfer by abusing the * /refresh protocol. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param coin_priv private key to request link data for * @param link_cb the callback to call with the useful result of the * refresh operation the @a coin_priv was involved in (if any) * @param link_cb_cls closure for @a link_cb * @return a handle for this request */ -struct TALER_MINT_RefreshLinkHandle * -TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_RefreshLinkHandle * +TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_CoinSpendPrivateKeyP *coin_priv, - TALER_MINT_RefreshLinkCallback link_cb, + TALER_EXCHANGE_RefreshLinkCallback link_cb, void *link_cb_cls); @@ -995,7 +995,7 @@ TALER_MINT_refresh_link (struct TALER_MINT_Handle *mint, * @param rlh the refresh link handle */ void -TALER_MINT_refresh_link_cancel (struct TALER_MINT_RefreshLinkHandle *rlh); +TALER_EXCHANGE_refresh_link_cancel (struct TALER_EXCHANGE_RefreshLinkHandle *rlh); /* ********************* /admin/add/incoming *********************** */ @@ -1004,31 +1004,31 @@ TALER_MINT_refresh_link_cancel (struct TALER_MINT_RefreshLinkHandle *rlh); /** * @brief A /admin/add/incoming Handle */ -struct TALER_MINT_AdminAddIncomingHandle; +struct TALER_EXCHANGE_AdminAddIncomingHandle; /** * Callbacks of this type are used to serve the result of submitting - * information about an incoming transaction to a mint. + * information about an incoming transaction to a exchange. * * @param cls closure * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request - * 0 if the mint's reply is bogus (fails to follow the protocol) - * @param full_response full response from the mint (for logging, in case of errors) + * 0 if the exchange's reply is bogus (fails to follow the protocol) + * @param full_response full response from the exchange (for logging, in case of errors) */ typedef void -(*TALER_MINT_AdminAddIncomingResultCallback) (void *cls, +(*TALER_EXCHANGE_AdminAddIncomingResultCallback) (void *cls, unsigned int http_status, json_t *full_response); /** - * Notify the mint that we have received an incoming transaction + * Notify the exchange that we have received an incoming transaction * which fills a reserve. Note that this API is an administrative - * API and thus not accessible to typical mint clients, but only - * to the operators of the mint. + * API and thus not accessible to typical exchange clients, but only + * to the operators of the exchange. * - * @param mint the mint handle; the mint must be ready to operate + * @param exchange the exchange handle; the exchange must be ready to operate * @param reserve_pub public key of the reserve * @param amount amount that was deposited * @param execution_date when did we receive the amount @@ -1039,13 +1039,13 @@ typedef void * if the inputs are invalid (i.e. invalid amount). * In this case, the callback is not called. */ -struct TALER_MINT_AdminAddIncomingHandle * -TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_AdminAddIncomingHandle * +TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *amount, struct GNUNET_TIME_Absolute execution_date, const json_t *wire, - TALER_MINT_AdminAddIncomingResultCallback res_cb, + TALER_EXCHANGE_AdminAddIncomingResultCallback res_cb, void *res_cb_cls); @@ -1056,7 +1056,7 @@ TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, * @param aai the admin add incoming request handle */ void -TALER_MINT_admin_add_incoming_cancel (struct TALER_MINT_AdminAddIncomingHandle *aai); +TALER_EXCHANGE_admin_add_incoming_cancel (struct TALER_EXCHANGE_AdminAddIncomingHandle *aai); /* ********************* /wire/deposits *********************** */ @@ -1064,12 +1064,12 @@ TALER_MINT_admin_add_incoming_cancel (struct TALER_MINT_AdminAddIncomingHandle * /** * @brief A /wire/deposits Handle */ -struct TALER_MINT_WireDepositsHandle; +struct TALER_EXCHANGE_WireDepositsHandle; /** * Details for one of the /deposit operations that the - * mint combined into a single wire transfer. + * exchange combined into a single wire transfer. */ struct TALER_WireDepositDetails { @@ -1089,7 +1089,7 @@ struct TALER_WireDepositDetails struct TALER_Amount coin_value; /** - * Fee charged by the mint for the deposit. + * Fee charged by the exchange for the deposit. */ struct TALER_Amount coin_fee; @@ -1106,18 +1106,18 @@ struct TALER_WireDepositDetails * of the coin transactions that were combined into the wire transfer. * * @param cls closure - * @param http_status HTTP status code we got, 0 on mint protocol violation + * @param http_status HTTP status code we got, 0 on exchange protocol violation * @param json original json reply (may include signatures, those have then been * validated already) - * @param wtid extracted wire transfer identifier, or NULL if the mint could + * @param wtid extracted wire transfer identifier, or NULL if the exchange could * not provide any (set only if @a http_status is #MHD_HTTP_OK) - * @param total_amount total amount of the wire transfer, or NULL if the mint could + * @param total_amount total amount of the wire transfer, or NULL if the exchange could * not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK) * @param details_length length of the @a details array * @param details array with details about the combined transactions */ typedef void -(*TALER_MINT_WireDepositsCallback)(void *cls, +(*TALER_EXCHANGE_WireDepositsCallback)(void *cls, unsigned int http_status, json_t *json, const struct GNUNET_HashCode *h_wire, @@ -1127,19 +1127,19 @@ typedef void /** - * Query the mint about which transactions were combined + * Query the exchange about which transactions were combined * to create a wire transfer. * - * @param mint mint to query + * @param exchange exchange to query * @param wtid raw wire transfer identifier to get information about * @param cb callback to call * @param cb_cls closure for @a cb * @return handle to cancel operation */ -struct TALER_MINT_WireDepositsHandle * -TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_WireDepositsHandle * +TALER_EXCHANGE_wire_deposits (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_MINT_WireDepositsCallback cb, + TALER_EXCHANGE_WireDepositsCallback cb, void *cb_cls); @@ -1150,7 +1150,7 @@ TALER_MINT_wire_deposits (struct TALER_MINT_Handle *mint, * @param wdh the wire deposits request handle */ void -TALER_MINT_wire_deposits_cancel (struct TALER_MINT_WireDepositsHandle *wdh); +TALER_EXCHANGE_wire_deposits_cancel (struct TALER_EXCHANGE_WireDepositsHandle *wdh); /* ********************* /deposit/wtid *********************** */ @@ -1159,23 +1159,23 @@ TALER_MINT_wire_deposits_cancel (struct TALER_MINT_WireDepositsHandle *wdh); /** * @brief A /deposit/wtid Handle */ -struct TALER_MINT_DepositWtidHandle; +struct TALER_EXCHANGE_DepositWtidHandle; /** * Function called with detailed wire transfer data. * * @param cls closure - * @param http_status HTTP status code we got, 0 on mint protocol violation + * @param http_status HTTP status code we got, 0 on exchange protocol violation * @param json original json reply (may include signatures, those have then been * validated already) - * @param wtid wire transfer identifier used by the mint, NULL if mint did not + * @param wtid wire transfer identifier used by the exchange, NULL if exchange did not * yet execute the transaction * @param execution_time actual or planned execution time for the wire transfer * @param coin_contribution contribution to the @a total_amount of the deposited coin (may be NULL) */ typedef void -(*TALER_MINT_DepositWtidCallback)(void *cls, +(*TALER_EXCHANGE_DepositWtidCallback)(void *cls, unsigned int http_status, json_t *json, const struct TALER_WireTransferIdentifierRawP *wtid, @@ -1186,7 +1186,7 @@ typedef void /** * Obtain the wire transfer details for a given deposit. * - * @param mint the mint to query + * @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 @@ -1196,14 +1196,14 @@ typedef void * @param cb_cls closure for @a cb * @return handle to abort request */ -struct TALER_MINT_DepositWtidHandle * -TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, +struct TALER_EXCHANGE_DepositWtidHandle * +TALER_EXCHANGE_deposit_wtid (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 TALER_CoinSpendPublicKeyP *coin_pub, uint64_t transaction_id, - TALER_MINT_DepositWtidCallback cb, + TALER_EXCHANGE_DepositWtidCallback cb, void *cb_cls); @@ -1214,7 +1214,7 @@ TALER_MINT_deposit_wtid (struct TALER_MINT_Handle *mint, * @param dwh the wire deposits request handle */ void -TALER_MINT_deposit_wtid_cancel (struct TALER_MINT_DepositWtidHandle *dwh); +TALER_EXCHANGE_deposit_wtid_cancel (struct TALER_EXCHANGE_DepositWtidHandle *dwh); -#endif /* _TALER_MINT_SERVICE_H */ +#endif /* _TALER_EXCHANGE_SERVICE_H */ diff --git a/src/include/taler_mintdb_lib.h b/src/include/taler_exchangedb_lib.h index 70e314d9a..347ad0650 100644 --- a/src/include/taler_mintdb_lib.h +++ b/src/include/taler_exchangedb_lib.h @@ -14,62 +14,62 @@ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> */ /** - * @file include/taler_mintdb_lib.h - * @brief IO operations for the mint's private keys + * @file include/taler_exchangedb_lib.h + * @brief IO operations for the exchange's private keys * @author Florian Dold * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_MINTDB_LIB_H -#define TALER_MINTDB_LIB_H +#ifndef TALER_EXCHANGEDB_LIB_H +#define TALER_EXCHANGEDB_LIB_H #include "taler_signatures.h" /** - * Subdirectroy under the mint's base directory which contains - * the mint's signing keys. + * Subdirectroy under the exchange's base directory which contains + * the exchange's signing keys. */ -#define TALER_MINTDB_DIR_SIGNING_KEYS "signkeys" +#define TALER_EXCHANGEDB_DIR_SIGNING_KEYS "signkeys" /** - * Subdirectory under the mint's base directory which contains - * the mint's denomination keys. + * Subdirectory under the exchange's base directory which contains + * the exchange's denomination keys. */ -#define TALER_MINTDB_DIR_DENOMINATION_KEYS "denomkeys" +#define TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS "denomkeys" /** - * Subdirectory under the mint's base directory which contains - * the mint's auditing information. + * Subdirectory under the exchange's base directory which contains + * the exchange's auditing information. */ -#define TALER_MINTDB_DIR_AUDITORS "auditors" +#define TALER_EXCHANGEDB_DIR_AUDITORS "auditors" GNUNET_NETWORK_STRUCT_BEGIN /** - * @brief On disk format used for a mint signing key. Signing keys are used - * by the mint to affirm its messages, but not to create coins. + * @brief On disk format used for a exchange signing key. Signing keys are used + * by the exchange to affirm its messages, but not to create coins. * Includes the private key followed by the public information about * the signing key. */ -struct TALER_MINTDB_PrivateSigningKeyInformationP +struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP { /** - * Private key part of the mint's signing key. + * Private key part of the exchange's signing key. */ - struct TALER_MintPrivateKeyP signkey_priv; + struct TALER_ExchangePrivateKeyP signkey_priv; /** - * Public information about a mint signing key. + * Public information about a exchange signing key. */ - struct TALER_MintSigningKeyValidityPS issue; + struct TALER_ExchangeSigningKeyValidityPS issue; }; /** * Information about a denomination key. */ -struct TALER_MINTDB_DenominationKeyInformationP +struct TALER_EXCHANGEDB_DenominationKeyInformationP { /** @@ -91,7 +91,7 @@ GNUNET_NETWORK_STRUCT_END * @brief All information about a denomination key (which is used to * sign coins into existence). */ -struct TALER_MINTDB_DenominationKeyIssueInformation +struct TALER_EXCHANGEDB_DenominationKeyIssueInformation { /** * The private key of the denomination. Will be NULL if the private @@ -109,7 +109,7 @@ struct TALER_MINTDB_DenominationKeyIssueInformation /** * Signed public information about a denomination key. */ - struct TALER_MINTDB_DenominationKeyInformationP issue; + struct TALER_EXCHANGEDB_DenominationKeyInformationP issue; }; @@ -124,16 +124,16 @@ struct TALER_MINTDB_DenominationKeyIssueInformation * #GNUNET_SYSERR to abort iteration with error! */ typedef int -(*TALER_MINTDB_SigningKeyIterator)(void *cls, +(*TALER_EXCHANGEDB_SigningKeyIterator)(void *cls, const char *filename, - const struct TALER_MINTDB_PrivateSigningKeyInformationP *ski); + const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski); /** - * Call @a it for each signing key found in the @a mint_base_dir. + * Call @a it for each signing key found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_SIGNING_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_SIGNING_KEYS * subdirectory * @param it function to call on each signing key * @param it_cls closure for @a it @@ -142,8 +142,8 @@ typedef int * files are simply skipped), -1 on error */ int -TALER_MINTDB_signing_keys_iterate (const char *mint_base_dir, - TALER_MINTDB_SigningKeyIterator it, +TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_SigningKeyIterator it, void *it_cls); @@ -159,16 +159,16 @@ TALER_MINTDB_signing_keys_iterate (const char *mint_base_dir, * #GNUNET_SYSERR to abort iteration with error! */ typedef int -(*TALER_MINTDB_DenominationKeyIterator)(void *cls, +(*TALER_EXCHANGEDB_DenominationKeyIterator)(void *cls, const char *alias, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki); + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** - * Call @a it for each denomination key found in the @a mint_base_dir. + * Call @a it for each denomination key found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_DENOMINATION_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS * subdirectory * @param it function to call on each denomination key found * @param it_cls closure for @a it @@ -178,8 +178,8 @@ typedef int * as maybe none of the files were well-formed) */ int -TALER_MINTDB_denomination_keys_iterate (const char *mint_base_dir, - TALER_MINTDB_DenominationKeyIterator it, +TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_DenominationKeyIterator it, void *it_cls); @@ -191,8 +191,8 @@ TALER_MINTDB_denomination_keys_iterate (const char *mint_base_dir, * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure. */ int -TALER_MINTDB_denomination_key_write (const char *filename, - const struct TALER_MINTDB_DenominationKeyIssueInformation *dki); +TALER_EXCHANGEDB_denomination_key_write (const char *filename, + const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** @@ -203,8 +203,8 @@ TALER_MINTDB_denomination_key_write (const char *filename, * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure */ int -TALER_MINTDB_denomination_key_read (const char *filename, - struct TALER_MINTDB_DenominationKeyIssueInformation *dki); +TALER_EXCHANGEDB_denomination_key_read (const char *filename, + struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki); /** @@ -212,7 +212,7 @@ TALER_MINTDB_denomination_key_read (const char *filename, * * @param cls closure * @param apub the auditor's public key - * @param mpub the mint's public key (as expected by the auditor) + * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a asig and @a dki arrays * @param asigs array of the auditor's signatures over the @a dks, of length @a dki_len * @param dki array of denomination coin data signed by the auditor, of length @a dki_len @@ -221,7 +221,7 @@ TALER_MINTDB_denomination_key_read (const char *filename, * #GNUNET_SYSERR to abort iteration with error! */ typedef int -(*TALER_MINTDB_AuditorIterator)(void *cls, +(*TALER_EXCHANGEDB_AuditorIterator)(void *cls, const struct TALER_AuditorPublicKeyP *apub, const struct TALER_MasterPublicKeyP *mpub, unsigned int dki_len, @@ -230,10 +230,10 @@ typedef int /** - * Call @a it with information for each auditor found in the @a mint_base_dir. + * Call @a it with information for each auditor found in the @a exchange_base_dir. * - * @param mint_base_dir base directory for the mint, - * the signing keys must be in the #TALER_MINTDB_DIR_DENOMINATION_KEYS + * @param exchange_base_dir base directory for the exchange, + * the signing keys must be in the #TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS * subdirectory * @param it function to call with auditor information * @param it_cls closure for @a it @@ -243,8 +243,8 @@ typedef int * as maybe none of the files were well-formed) */ int -TALER_MINTDB_auditor_iterate (const char *mint_base_dir, - TALER_MINTDB_AuditorIterator it, +TALER_EXCHANGEDB_auditor_iterate (const char *exchange_base_dir, + TALER_EXCHANGEDB_AuditorIterator it, void *it_cls); @@ -254,13 +254,13 @@ TALER_MINTDB_auditor_iterate (const char *mint_base_dir, * @param filename the file where to write the auditor information to * @param apub the auditor's public key * @param asigs the auditor's signatures, array of length @a dki_len - * @param mpub the mint's public key (as expected by the auditor) + * @param mpub the exchange's public key (as expected by the auditor) * @param dki_len length of @a dki and @a asigs arrays * @param dki array of denomination coin data signed by the auditor * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure. */ int -TALER_MINTDB_auditor_write (const char *filename, +TALER_EXCHANGEDB_auditor_write (const char *filename, const struct TALER_AuditorPublicKeyP *apub, const struct TALER_AuditorSignatureP *asigs, const struct TALER_MasterPublicKeyP *mpub, @@ -274,8 +274,8 @@ TALER_MINTDB_auditor_write (const char *filename, * @param cfg configuration to use * @return NULL on failure */ -struct TALER_MINTDB_Plugin * -TALER_MINTDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); +struct TALER_EXCHANGEDB_Plugin * +TALER_EXCHANGEDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); /** @@ -284,7 +284,7 @@ TALER_MINTDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); * @param plugin plugin to unload */ void -TALER_MINTDB_plugin_unload (struct TALER_MINTDB_Plugin *plugin); +TALER_EXCHANGEDB_plugin_unload (struct TALER_EXCHANGEDB_Plugin *plugin); diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_exchangedb_plugin.h index b65b3e4f7..aecb050a7 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -14,22 +14,22 @@ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> */ /** - * @file include/taler_mintdb_plugin.h - * @brief Low-level (statement-level) database access for the mint + * @file include/taler_exchangedb_plugin.h + * @brief Low-level (statement-level) database access for the exchange * @author Florian Dold * @author Christian Grothoff */ -#ifndef TALER_MINTDB_PLUGIN_H -#define TALER_MINTDB_PLUGIN_H +#ifndef TALER_EXCHANGEDB_PLUGIN_H +#define TALER_EXCHANGEDB_PLUGIN_H #include <gnunet/gnunet_util_lib.h> -#include "taler_mintdb_lib.h" +#include "taler_exchangedb_lib.h" /** * @brief Information we keep on bank transfer(s) that established a reserve. */ -struct TALER_MINTDB_BankTransfer +struct TALER_EXCHANGEDB_BankTransfer { /** @@ -38,13 +38,13 @@ struct TALER_MINTDB_BankTransfer struct TALER_ReservePublicKeyP reserve_pub; /** - * Amount that was transferred to the mint. + * Amount that was transferred to the exchange. */ struct TALER_Amount amount; /** - * When did the mint receive the incoming transaction? - * (This is the execution date of the mint's database, + * When did the exchange receive the incoming transaction? + * (This is the execution date of the exchange's database, * the execution date of the bank should be in @e wire). */ struct GNUNET_TIME_Absolute execution_date; @@ -60,7 +60,7 @@ struct TALER_MINTDB_BankTransfer /** * @brief A summary of a Reserve */ -struct TALER_MINTDB_Reserve +struct TALER_EXCHANGEDB_Reserve { /** * The reserve's public key. This uniquely identifies the reserve @@ -84,7 +84,7 @@ struct TALER_MINTDB_Reserve * the /withdraw operation if needed, and to have proof * that a reserve was drained by this amount. */ -struct TALER_MINTDB_CollectableBlindcoin +struct TALER_EXCHANGEDB_CollectableBlindcoin { /** @@ -98,7 +98,7 @@ struct TALER_MINTDB_CollectableBlindcoin struct TALER_DenominationPublicKey denom_pub; /** - * Value of the coin being minted (matching the denomination key) + * Value of the coin being exchangeed (matching the denomination key) * plus the transaction fee. We include this in what is being * signed so that we can verify a reserve's remaining total balance * without needing to access the respective denomination key @@ -107,14 +107,14 @@ struct TALER_MINTDB_CollectableBlindcoin struct TALER_Amount amount_with_fee; /** - * Withdrawl fee charged by the mint. This must match the Mint's + * Withdrawl fee charged by the exchange. This must match the Exchange's * denomination key's withdrawl fee. If the client puts in an * invalid withdrawl fee (too high or too low) that does not match - * the Mint's denomination key, the withdraw operation is invalid - * and will be rejected by the mint. The @e amount_with_fee minus + * the Exchange's denomination key, the withdraw operation is invalid + * and will be rejected by the exchange. The @e amount_with_fee minus * the @e withdraw_fee is must match the value of the generated * coin. We include this in what is being signed so that we can - * verify a mint's accounting without needing to access the + * verify a exchange's accounting without needing to access the * respective denomination key information each time. */ struct TALER_Amount withdraw_fee; @@ -142,17 +142,17 @@ struct TALER_MINTDB_CollectableBlindcoin /** * @brief Types of operations on a reserved. */ -enum TALER_MINTDB_ReserveOperation +enum TALER_EXCHANGEDB_ReserveOperation { /** * Money was deposited into the reserve via a bank transfer. */ - TALER_MINTDB_RO_BANK_TO_MINT = 0, + TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE = 0, /** * A Coin was withdrawn from the reserve using /withdraw. */ - TALER_MINTDB_RO_WITHDRAW_COIN = 1 + TALER_EXCHANGEDB_RO_WITHDRAW_COIN = 1 }; @@ -162,18 +162,18 @@ enum TALER_MINTDB_ReserveOperation * established the reserve and all /withdraw operations we have done * since). */ -struct TALER_MINTDB_ReserveHistory +struct TALER_EXCHANGEDB_ReserveHistory { /** * Next entry in the reserve history. */ - struct TALER_MINTDB_ReserveHistory *next; + struct TALER_EXCHANGEDB_ReserveHistory *next; /** * Type of the event, determins @e details. */ - enum TALER_MINTDB_ReserveOperation type; + enum TALER_EXCHANGEDB_ReserveOperation type; /** * Details of the operation, depending on @e type. @@ -182,14 +182,14 @@ struct TALER_MINTDB_ReserveHistory { /** - * Details about a bank transfer to the mint. + * Details about a bank transfer to the exchange. */ - struct TALER_MINTDB_BankTransfer *bank; + struct TALER_EXCHANGEDB_BankTransfer *bank; /** * Details about a /withdraw operation. */ - struct TALER_MINTDB_CollectableBlindcoin *withdraw; + struct TALER_EXCHANGEDB_CollectableBlindcoin *withdraw; } details; @@ -207,7 +207,7 @@ struct TALER_MINTDB_ReserveHistory * (as determined by transaction ID). (Note: we might want to * fix #3819 and include at least h_contract as well.) */ -struct TALER_MINTDB_Deposit +struct TALER_EXCHANGEDB_Deposit { /** * Information about the coin that is being deposited. @@ -230,14 +230,14 @@ struct TALER_MINTDB_Deposit /** * Hash over the contract between merchant and customer - * (remains unknown to the Mint). + * (remains unknown to the Exchange). */ struct GNUNET_HashCode h_contract; /** * Hash of the (canonical) representation of @e wire, used * to check the signature on the request. Generated by - * the mint from the detailed wire data provided by the + * the exchange from the detailed wire data provided by the * merchant. */ struct GNUNET_HashCode h_wire; @@ -256,12 +256,12 @@ struct TALER_MINTDB_Deposit /** * Time when this request was generated. Used, for example, to * assess when (roughly) the income was achieved for tax purposes. - * Note that the Mint will only check that the timestamp is not "too + * Note that the Exchange will only check that the timestamp is not "too * far" into the future (i.e. several days). The fact that the * timestamp falls within the validity period of the coin's * denomination key is irrelevant for the validity of the deposit * request, as obviously the customer and merchant could conspire to - * set any timestamp. Also, the Mint must accept very old deposit + * set any timestamp. Also, the Exchange must accept very old deposit * requests, as the merchant might have been unable to transmit the * deposit request in a timely fashion (so back-dating is not * prevented). @@ -302,7 +302,7 @@ struct TALER_MINTDB_Deposit * dimensions of the operation, security parameters and * client signatures from "/refresh/melt" and "/refresh/commit". */ -struct TALER_MINTDB_RefreshSession +struct TALER_EXCHANGEDB_RefreshSession { /** @@ -316,7 +316,7 @@ struct TALER_MINTDB_RefreshSession uint16_t num_newcoins; /** - * Index (smaller #TALER_CNC_KAPPA) which the mint has chosen to not + * Index (smaller #TALER_CNC_KAPPA) which the exchange has chosen to not * have revealed during cut and choose. */ uint16_t noreveal_index; @@ -327,7 +327,7 @@ struct TALER_MINTDB_RefreshSession /** * @brief Specification for coin in a /refresh/melt operation. */ -struct TALER_MINTDB_RefreshMelt +struct TALER_EXCHANGEDB_RefreshMelt { /** * Information about the coin that is being melted. @@ -355,11 +355,11 @@ struct TALER_MINTDB_RefreshMelt struct TALER_Amount amount_with_fee; /** - * Melting fee charged by the mint. This must match the Mint's + * Melting fee charged by the exchange. This must match the Exchange's * denomination key's melting fee. If the client puts in an invalid - * melting fee (too high or too low) that does not match the Mint's + * melting fee (too high or too low) that does not match the Exchange's * denomination key, the melting operation is invalid and will be - * rejected by the mint. The @e amount_with_fee minus the @e + * rejected by the exchange. The @e amount_with_fee minus the @e * melt_fee is the amount that will be credited to the melting * session. */ @@ -369,12 +369,12 @@ struct TALER_MINTDB_RefreshMelt /** - * @brief We have as many `struct TALER_MINTDB_RefreshCommitCoin` as there are new + * @brief We have as many `struct TALER_EXCHANGEDB_RefreshCommitCoin` as there are new * coins being created by the refresh (for each of the #TALER_CNC_KAPPA - * sets). These are the coins we ask the mint to sign if the + * sets). These are the coins we ask the exchange to sign if the * respective set is selected. */ -struct TALER_MINTDB_RefreshCommitCoin +struct TALER_EXCHANGEDB_RefreshCommitCoin { /** @@ -399,12 +399,12 @@ struct TALER_MINTDB_RefreshCommitCoin /** * @brief Linked list of refresh information linked to a coin. */ -struct TALER_MINTDB_LinkDataList +struct TALER_EXCHANGEDB_LinkDataList { /** * Information is stored in a NULL-terminated linked list. */ - struct TALER_MINTDB_LinkDataList *next; + struct TALER_EXCHANGEDB_LinkDataList *next; /** * Link data, used to recover the private key of the coin @@ -428,17 +428,17 @@ struct TALER_MINTDB_LinkDataList * @brief Enumeration to classify the different types of transactions * that can be done with a coin. */ -enum TALER_MINTDB_TransactionType +enum TALER_EXCHANGEDB_TransactionType { /** * /deposit operation. */ - TALER_MINTDB_TT_DEPOSIT = 0, + TALER_EXCHANGEDB_TT_DEPOSIT = 0, /** * /refresh/melt operation. */ - TALER_MINTDB_TT_REFRESH_MELT = 1 + TALER_EXCHANGEDB_TT_REFRESH_MELT = 1 }; @@ -446,18 +446,18 @@ enum TALER_MINTDB_TransactionType /** * @brief List of transactions we performed for a particular coin. */ -struct TALER_MINTDB_TransactionList +struct TALER_EXCHANGEDB_TransactionList { /** * Next pointer in the NULL-terminated linked list. */ - struct TALER_MINTDB_TransactionList *next; + struct TALER_EXCHANGEDB_TransactionList *next; /** * Type of the transaction, determines what is stored in @e details. */ - enum TALER_MINTDB_TransactionType type; + enum TALER_EXCHANGEDB_TransactionType type; /** * Details about the transaction, depending on @e type. @@ -468,12 +468,12 @@ struct TALER_MINTDB_TransactionList /** * Details if transaction was a /deposit operation. */ - struct TALER_MINTDB_Deposit *deposit; + struct TALER_EXCHANGEDB_Deposit *deposit; /** * Details if transaction was a /refresh/melt operation. */ - struct TALER_MINTDB_RefreshMelt *melt; + struct TALER_EXCHANGEDB_RefreshMelt *melt; } details; @@ -483,7 +483,7 @@ struct TALER_MINTDB_TransactionList /** * @brief All of the information from a /refresh/melt commitment. */ -struct TALER_MINTDB_MeltCommitment +struct TALER_EXCHANGEDB_MeltCommitment { /** @@ -499,7 +499,7 @@ struct TALER_MINTDB_MeltCommitment /** * Array of @e num_oldcoins melt operation details. */ - struct TALER_MINTDB_RefreshMelt *melts; + struct TALER_EXCHANGEDB_RefreshMelt *melts; /** * Array of @e num_newcoins denomination keys @@ -509,7 +509,7 @@ struct TALER_MINTDB_MeltCommitment /** * 2D-Array of #TALER_CNC_KAPPA and @e num_newcoins commitments. */ - struct TALER_MINTDB_RefreshCommitCoin *commit_coins[TALER_CNC_KAPPA]; + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins[TALER_CNC_KAPPA]; /** * 2D-Array of #TALER_CNC_KAPPA and @e new_oldcoins links. @@ -521,7 +521,7 @@ struct TALER_MINTDB_MeltCommitment /** * @brief Handle for a database session (per-thread, for transactions). */ -struct TALER_MINTDB_Session; +struct TALER_EXCHANGEDB_Session; /** @@ -535,7 +535,7 @@ struct TALER_MINTDB_Session; * @param merchant_pub public key of the merchant * @param coin_pub public key of the coin * @param amount_with_fee amount that was deposited including fee - * @param deposit_fee amount the mint gets to keep as transaction fees + * @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 wire_deadline by which the merchant adviced that he would like the @@ -544,7 +544,7 @@ struct TALER_MINTDB_Session; * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ typedef int -(*TALER_MINTDB_DepositIterator)(void *cls, +(*TALER_EXCHANGEDB_DepositIterator)(void *cls, unsigned long long rowid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -566,7 +566,7 @@ typedef int * @param shared_secret_enc set to shared secret for the session */ typedef void -(*TALER_MINTDB_TransferDataCallback)(void *cls, +(*TALER_EXCHANGEDB_TransferDataCallback)(void *cls, const struct GNUNET_HashCode *session_hash, const struct TALER_TransferPublicKeyP *transfer_pub, const struct TALER_EncryptedLinkSecretP *shared_secret_enc); @@ -582,12 +582,12 @@ typedef void * if the transaction was not yet done * @param coin_contribution how much did the coin we asked about * contribute to the total transfer value? (deposit value including fee) - * @param coin_fee how much did the mint charge for the deposit fee + * @param coin_fee how much did the exchange charge for the deposit fee * @param execution_time when was the transaction done, or * when we expect it to be done (if @a wtid was NULL) */ typedef void -(*TALER_MINTDB_DepositWtidCallback)(void *cls, +(*TALER_EXCHANGEDB_DepositWtidCallback)(void *cls, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *coin_contribution, const struct TALER_Amount *coin_fee, @@ -608,7 +608,7 @@ typedef void * @param coin_fee applicable fee for this coin */ typedef void -(*TALER_MINTDB_WireTransferDataCallback)(void *cls, +(*TALER_EXCHANGEDB_WireTransferDataCallback)(void *cls, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, const struct GNUNET_HashCode *h_contract, @@ -627,7 +627,7 @@ typedef void * @param buf_size number of bytes in @a buf, 0 on error */ typedef void -(*TALER_MINTDB_WirePreparationCallback) (void *cls, +(*TALER_EXCHANGEDB_WirePreparationCallback) (void *cls, unsigned long long rowid, const char *buf, size_t buf_size); @@ -637,7 +637,7 @@ typedef void * @brief The plugin API, returned from the plugin's "init" function. * The argument given to "init" is simply a configuration handle. */ -struct TALER_MINTDB_Plugin +struct TALER_EXCHANGEDB_Plugin { /** @@ -660,7 +660,7 @@ struct TALER_MINTDB_Plugin * database default one * @param the database connection, or NULL on error */ - struct TALER_MINTDB_Session * + struct TALER_EXCHANGEDB_Session * (*get_session) (void *cls, int temporary); @@ -673,7 +673,7 @@ struct TALER_MINTDB_Plugin */ int (*drop_temporary) (void *cls, - struct TALER_MINTDB_Session *db); + struct TALER_EXCHANGEDB_Session *db); /** @@ -697,7 +697,7 @@ struct TALER_MINTDB_Plugin */ int (*start) (void *cls, - struct TALER_MINTDB_Session *session); + struct TALER_EXCHANGEDB_Session *session); /** @@ -710,7 +710,7 @@ struct TALER_MINTDB_Plugin */ int (*commit) (void *cls, - struct TALER_MINTDB_Session *session); + struct TALER_EXCHANGEDB_Session *session); /** @@ -721,7 +721,7 @@ struct TALER_MINTDB_Plugin */ void (*rollback) (void *cls, - struct TALER_MINTDB_Session *session); + struct TALER_EXCHANGEDB_Session *session); /** @@ -737,9 +737,9 @@ struct TALER_MINTDB_Plugin */ int (*insert_denomination_info) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_DenominationPublicKey *denom_pub, - const struct TALER_MINTDB_DenominationKeyInformationP *issue); + const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue); /** @@ -753,9 +753,9 @@ struct TALER_MINTDB_Plugin */ int (*get_denomination_info) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_DenominationPublicKey *denom_pub, - struct TALER_MINTDB_DenominationKeyInformationP *issue); + struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue); /** @@ -770,8 +770,8 @@ struct TALER_MINTDB_Plugin */ int (*reserve_get) (void *cls, - struct TALER_MINTDB_Session *db, - struct TALER_MINTDB_Reserve *reserve); + struct TALER_EXCHANGEDB_Session *db, + struct TALER_EXCHANGEDB_Reserve *reserve); /** @@ -793,7 +793,7 @@ struct TALER_MINTDB_Plugin */ int (*reserves_in_insert) (void *cls, - struct TALER_MINTDB_Session *db, + struct TALER_EXCHANGEDB_Session *db, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *balance, struct GNUNET_TIME_Absolute execution_time, @@ -816,9 +816,9 @@ struct TALER_MINTDB_Plugin */ int (*get_withdraw_info) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_blind, - struct TALER_MINTDB_CollectableBlindcoin *collectable); + struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable); /** @@ -835,8 +835,8 @@ struct TALER_MINTDB_Plugin */ int (*insert_withdraw_info) (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_CollectableBlindcoin *collectable); + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable); /** @@ -848,9 +848,9 @@ struct TALER_MINTDB_Plugin * @param reserve_pub public key of the reserve * @return known transaction history (NULL if reserve is unknown) */ - struct TALER_MINTDB_ReserveHistory * + struct TALER_EXCHANGEDB_ReserveHistory * (*get_reserve_history) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_ReservePublicKeyP *reserve_pub); @@ -862,7 +862,7 @@ struct TALER_MINTDB_Plugin */ void (*free_reserve_history) (void *cls, - struct TALER_MINTDB_ReserveHistory *rh); + struct TALER_EXCHANGEDB_ReserveHistory *rh); /** @@ -877,8 +877,8 @@ struct TALER_MINTDB_Plugin */ int (*have_deposit) (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_Deposit *deposit); + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Deposit *deposit); /** @@ -891,8 +891,8 @@ struct TALER_MINTDB_Plugin */ int (*insert_deposit) (void *cls, - struct TALER_MINTDB_Session *session, - const struct TALER_MINTDB_Deposit *deposit); + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Deposit *deposit); /** @@ -907,7 +907,7 @@ struct TALER_MINTDB_Plugin */ int (*mark_deposit_tiny) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid); @@ -923,7 +923,7 @@ struct TALER_MINTDB_Plugin */ int (*mark_deposit_done) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid); @@ -941,8 +941,8 @@ struct TALER_MINTDB_Plugin */ int (*get_ready_deposit) (void *cls, - struct TALER_MINTDB_Session *session, - TALER_MINTDB_DepositIterator deposit_cb, + struct TALER_EXCHANGEDB_Session *session, + TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls); @@ -962,10 +962,10 @@ struct TALER_MINTDB_Plugin */ int (*iterate_matching_deposits) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_wire, const struct TALER_MerchantPublicKeyP *merchant_pub, - TALER_MINTDB_DepositIterator deposit_cb, + TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls, uint32_t limit); @@ -983,9 +983,9 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_session) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, - struct TALER_MINTDB_RefreshSession *refresh_session); + struct TALER_EXCHANGEDB_RefreshSession *refresh_session); /** @@ -1000,9 +1000,9 @@ struct TALER_MINTDB_Plugin */ int (*create_refresh_session) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, - const struct TALER_MINTDB_RefreshSession *refresh_session); + const struct TALER_EXCHANGEDB_RefreshSession *refresh_session); /** @@ -1018,9 +1018,9 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_melt) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, uint16_t oldcoin_index, - const struct TALER_MINTDB_RefreshMelt *melt); + const struct TALER_EXCHANGEDB_RefreshMelt *melt); /** @@ -1036,10 +1036,10 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_melt) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t oldcoin_index, - struct TALER_MINTDB_RefreshMelt *melt); + struct TALER_EXCHANGEDB_RefreshMelt *melt); /** @@ -1056,7 +1056,7 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_order) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t num_newcoins, const struct TALER_DenominationPublicKey *denom_pubs); @@ -1076,7 +1076,7 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_order) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t num_newcoins, struct TALER_DenominationPublicKey *denom_pubs); @@ -1097,11 +1097,11 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_commit_coins) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_newcoins, - const struct TALER_MINTDB_RefreshCommitCoin *commit_coins); + const struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins); /** @@ -1120,11 +1120,11 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_commit_coins) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_coins, - struct TALER_MINTDB_RefreshCommitCoin *commit_coins); + struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coins); /** @@ -1141,7 +1141,7 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_commit_links) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_links, @@ -1163,7 +1163,7 @@ struct TALER_MINTDB_Plugin */ int (*get_refresh_commit_links) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t cnc_index, uint16_t num_links, @@ -1179,9 +1179,9 @@ struct TALER_MINTDB_Plugin * @return NULL if the @a session_hash does not correspond to any known melt * operation */ - struct TALER_MINTDB_MeltCommitment * + struct TALER_EXCHANGEDB_MeltCommitment * (*get_melt_commitment) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash); @@ -1193,7 +1193,7 @@ struct TALER_MINTDB_Plugin */ void (*free_melt_commitment) (void *cls, - struct TALER_MINTDB_MeltCommitment *mc); + struct TALER_EXCHANGEDB_MeltCommitment *mc); /** @@ -1211,7 +1211,7 @@ struct TALER_MINTDB_Plugin */ int (*insert_refresh_out) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash, uint16_t newcoin_index, const struct TALER_DenominationSignature *ev_sig); @@ -1226,9 +1226,9 @@ struct TALER_MINTDB_Plugin * @param session_hash session to get linkage data for * @return all known link data for the session */ - struct TALER_MINTDB_LinkDataList * + struct TALER_EXCHANGEDB_LinkDataList * (*get_link_data_list) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *session_hash); @@ -1240,7 +1240,7 @@ struct TALER_MINTDB_Plugin */ void (*free_link_data_list) (void *cls, - struct TALER_MINTDB_LinkDataList *ldl); + struct TALER_EXCHANGEDB_LinkDataList *ldl); /** @@ -1261,9 +1261,9 @@ struct TALER_MINTDB_Plugin */ int (*get_transfer) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinSpendPublicKeyP *coin_pub, - TALER_MINTDB_TransferDataCallback tdc, + TALER_EXCHANGEDB_TransferDataCallback tdc, void *tdc_cls); @@ -1276,9 +1276,9 @@ struct TALER_MINTDB_Plugin * @param coin_pub coin to investigate * @return list of transactions, NULL if coin is fresh */ - struct TALER_MINTDB_TransactionList * + struct TALER_EXCHANGEDB_TransactionList * (*get_coin_transactions) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_CoinSpendPublicKeyP *coin_pub); @@ -1290,7 +1290,7 @@ struct TALER_MINTDB_Plugin */ void (*free_coin_transaction_list) (void *cls, - struct TALER_MINTDB_TransactionList *list); + struct TALER_EXCHANGEDB_TransactionList *list); /** @@ -1307,9 +1307,9 @@ struct TALER_MINTDB_Plugin */ int (*lookup_wire_transfer) (void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_MINTDB_WireTransferDataCallback cb, + TALER_EXCHANGEDB_WireTransferDataCallback cb, void *cb_cls); @@ -1332,13 +1332,13 @@ struct TALER_MINTDB_Plugin */ int (*wire_lookup_deposit_wtid)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct GNUNET_HashCode *h_contract, const struct GNUNET_HashCode *h_wire, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantPublicKeyP *merchant_pub, uint64_t transaction_id, - TALER_MINTDB_DepositWtidCallback cb, + TALER_EXCHANGEDB_DepositWtidCallback cb, void *cb_cls); @@ -1355,12 +1355,12 @@ struct TALER_MINTDB_Plugin * @param execution_time when did we execute the transaction * @param coin_pub which public key was this payment about * @param coin_value amount contributed by this coin in total - * @param coin_fee deposit fee charged by mint for this coin + * @param coin_fee deposit fee charged by exchange for this coin * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors */ int (*insert_aggregation_tracking)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, @@ -1384,7 +1384,7 @@ struct TALER_MINTDB_Plugin */ int (*wire_prepare_data_insert)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const char *type, const char *buf, size_t buf_size); @@ -1400,7 +1400,7 @@ struct TALER_MINTDB_Plugin */ int (*wire_prepare_data_mark_finished)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, unsigned long long rowid); @@ -1419,13 +1419,13 @@ struct TALER_MINTDB_Plugin */ int (*wire_prepare_data_get)(void *cls, - struct TALER_MINTDB_Session *session, + struct TALER_EXCHANGEDB_Session *session, const char *type, - TALER_MINTDB_WirePreparationCallback cb, + TALER_EXCHANGEDB_WirePreparationCallback cb, void *cb_cls); }; -#endif /* _TALER_MINT_DB_H */ +#endif /* _TALER_EXCHANGE_DB_H */ diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 2526597ee..729bed262 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -54,62 +54,62 @@ #define TALER_IDLE_RESERVE_EXPIRATION_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 5) /*********************************************/ -/* Mint offline signatures (with master key) */ +/* Exchange offline signatures (with master key) */ /*********************************************/ /** - * Purpose for signing public keys signed by the mint master key. + * Purpose for signing public keys signed by the exchange master key. */ #define TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY 1024 /** - * Purpose for denomination keys signed by the mint master key. + * Purpose for denomination keys signed by the exchange master key. */ #define TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY 1025 /** - * Signature where the Mint confirms its SEPA details in + * Signature where the Exchange confirms its SEPA details in * the /wire/sepa response. */ #define TALER_SIGNATURE_MASTER_SEPA_DETAILS 1026 /*********************************************/ -/* Mint online signatures (with signing key) */ +/* Exchange online signatures (with signing key) */ /*********************************************/ /** - * Purpose for the state of a reserve, signed by the mint's signing + * Purpose for the state of a reserve, signed by the exchange's signing * key. */ -#define TALER_SIGNATURE_MINT_RESERVE_STATUS 1032 +#define TALER_SIGNATURE_EXCHANGE_RESERVE_STATUS 1032 /** - * Signature where the Mint confirms a deposit request. + * Signature where the Exchange confirms a deposit request. */ -#define TALER_SIGNATURE_MINT_CONFIRM_DEPOSIT 1033 +#define TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT 1033 /** - * Signature where the mint (current signing key) confirms the + * Signature where the exchange (current signing key) confirms the * no-reveal index for cut-and-choose and the validity of the melted * coins. */ -#define TALER_SIGNATURE_MINT_CONFIRM_MELT 1034 +#define TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT 1034 /** - * Signature where the Mint confirms the full /keys response set. + * Signature where the Exchange confirms the full /keys response set. */ -#define TALER_SIGNATURE_MINT_KEY_SET 1035 +#define TALER_SIGNATURE_EXCHANGE_KEY_SET 1035 /** - * Signature where the Mint confirms the /wire response. + * Signature where the Exchange confirms the /wire response. */ -#define TALER_SIGNATURE_MINT_WIRE_TYPES 1036 +#define TALER_SIGNATURE_EXCHANGE_WIRE_TYPES 1036 /** - * Signature where the Mint confirms the /deposit/wtid response. + * Signature where the Exchange confirms the /deposit/wtid response. */ -#define TALER_SIGNATURE_MINT_CONFIRM_WIRE 1036 +#define TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE 1036 /*********************/ @@ -118,9 +118,9 @@ /** * Signature where the auditor confirms that he is - * aware of certain denomination keys from the mint. + * aware of certain denomination keys from the exchange. */ -#define TALER_SIGNATURE_AUDITOR_MINT_KEYS 1064 +#define TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS 1064 /***********************/ @@ -176,7 +176,7 @@ /** * EdDSA test signature. */ -#define TALER_SIGNATURE_MINT_TEST_EDDSA 1303 +#define TALER_SIGNATURE_EXCHANGE_TEST_EDDSA 1303 @@ -202,7 +202,7 @@ struct TALER_WithdrawRequestPS struct TALER_ReservePublicKeyP reserve_pub; /** - * Value of the coin being minted (matching the denomination key) + * Value of the coin being exchangeed (matching the denomination key) * plus the transaction fee. We include this in what is being * signed so that we can verify a reserve's remaining total balance * without needing to access the respective denomination key @@ -211,14 +211,14 @@ struct TALER_WithdrawRequestPS struct TALER_AmountNBO amount_with_fee; /** - * Withdrawl fee charged by the mint. This must match the Mint's + * Withdrawl fee charged by the exchange. This must match the Exchange's * denomination key's withdrawl fee. If the client puts in an * invalid withdrawl fee (too high or too low) that does not match - * the Mint's denomination key, the withdraw operation is invalid - * and will be rejected by the mint. The @e amount_with_fee minus + * the Exchange's denomination key, the withdraw operation is invalid + * and will be rejected by the exchange. The @e amount_with_fee minus * the @e withdraw_fee is must match the value of the generated * coin. We include this in what is being signed so that we can - * verify a mint's accounting without needing to access the + * verify a exchange's accounting without needing to access the * respective denomination key information each time. */ struct TALER_AmountNBO withdraw_fee; @@ -229,7 +229,7 @@ struct TALER_WithdrawRequestPS struct GNUNET_HashCode h_denomination_pub GNUNET_PACKED; /** - * Hash of the (blinded) message to be signed by the Mint. + * Hash of the (blinded) message to be signed by the Exchange. */ struct GNUNET_HashCode h_coin_envelope GNUNET_PACKED; }; @@ -260,12 +260,12 @@ struct TALER_DepositRequestPS /** * Time when this request was generated. Used, for example, to * assess when (roughly) the income was achieved for tax purposes. - * Note that the Mint will only check that the timestamp is not "too + * Note that the Exchange will only check that the timestamp is not "too * far" into the future (i.e. several days). The fact that the * timestamp falls within the validity period of the coin's * denomination key is irrelevant for the validity of the deposit * request, as obviously the customer and merchant could conspire to - * set any timestamp. Also, the Mint must accept very old deposit + * set any timestamp. Also, the Exchange must accept very old deposit * requests, as the merchant might have been unable to transmit the * deposit request in a timely fashion (so back-dating is not * prevented). @@ -293,17 +293,17 @@ struct TALER_DepositRequestPS /** * Amount to be deposited, including deposit fee charged by the - * mint. This is the total amount that the coin's value at the mint + * exchange. This is the total amount that the coin's value at the exchange * will be reduced by. */ struct TALER_AmountNBO amount_with_fee; /** - * Depositing fee charged by the mint. This must match the Mint's + * Depositing fee charged by the exchange. This must match the Exchange's * denomination key's depositing fee. If the client puts in an * invalid deposit fee (too high or too low) that does not match the - * Mint's denomination key, the deposit operation is invalid and - * will be rejected by the mint. The @e amount_with_fee minus the + * Exchange's denomination key, the deposit operation is invalid and + * will be rejected by the exchange. The @e amount_with_fee minus the * @e deposit_fee is the amount that will be transferred to the * account identified by @e h_wire. */ @@ -317,7 +317,7 @@ struct TALER_DepositRequestPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. The deposit request is to be + * signed (blindly) by the Exchange. The deposit request is to be * signed by the corresponding private key (using EdDSA). */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -327,13 +327,13 @@ struct TALER_DepositRequestPS /** * @brief Format used to generate the signature on a confirmation - * from the mint that a deposit request succeeded. + * from the exchange that a deposit request succeeded. */ struct TALER_DepositConfirmationPS { /** - * Purpose must be #TALER_SIGNATURE_MINT_CONFIRM_DEPOSIT. Signed - * by a `struct TALER_MintPublicKeyP` using EdDSA. + * Purpose must be #TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT. Signed + * by a `struct TALER_ExchangePublicKeyP` using EdDSA. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -362,7 +362,7 @@ struct TALER_DepositConfirmationPS * How much time does the @e merchant have to issue a refund * request? Zero if refunds are not allowed. After this time, the * coin cannot be refunded. Note that the wire transfer will not be - * performed by the mint until the refund deadline. This value + * performed by the exchange until the refund deadline. This value * is taken from the original deposit request. */ struct GNUNET_TIME_AbsoluteNBO refund_deadline; @@ -375,7 +375,7 @@ struct TALER_DepositConfirmationPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. The deposit request is to be + * signed (blindly) by the Exchange. The deposit request is to be * signed by the corresponding private key (using EdDSA). */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -417,11 +417,11 @@ struct TALER_RefreshMeltCoinAffirmationPS struct TALER_AmountNBO amount_with_fee; /** - * Melting fee charged by the mint. This must match the Mint's + * Melting fee charged by the exchange. This must match the Exchange's * denomination key's melting fee. If the client puts in an invalid - * melting fee (too high or too low) that does not match the Mint's + * melting fee (too high or too low) that does not match the Exchange's * denomination key, the melting operation is invalid and will be - * rejected by the mint. The @e amount_with_fee minus the @e + * rejected by the exchange. The @e amount_with_fee minus the @e * melt_fee is the amount that will be credited to the melting * session. */ @@ -429,7 +429,7 @@ struct TALER_RefreshMeltCoinAffirmationPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. The deposit request is to be + * signed (blindly) by the Exchange. The deposit request is to be * signed by the corresponding private key (using EdDSA). */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -437,16 +437,16 @@ struct TALER_RefreshMeltCoinAffirmationPS /** - * @brief Format of the block signed by the Mint in response to a successful - * "/refresh/melt" request. Hereby the mint affirms that all of the - * coins were successfully melted. This also commits the mint to a + * @brief Format of the block signed by the Exchange in response to a successful + * "/refresh/melt" request. Hereby the exchange affirms that all of the + * coins were successfully melted. This also commits the exchange to a * particular index to not be revealed during the refresh. */ struct TALER_RefreshMeltConfirmationPS { /** - * Purpose is #TALER_SIGNATURE_MINT_CONFIRM_MELT. Signed - * by a `struct TALER_MintPublicKeyP` using EdDSA. + * Purpose is #TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT. Signed + * by a `struct TALER_ExchangePublicKeyP` using EdDSA. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -469,14 +469,14 @@ struct TALER_RefreshMeltConfirmationPS /** - * @brief Information about a signing key of the mint. Signing keys are used - * to sign mint messages other than coins, i.e. to confirm that a + * @brief Information about a signing key of the exchange. Signing keys are used + * to sign exchange messages other than coins, i.e. to confirm that a * deposit was successful or that a refresh was accepted. */ -struct TALER_MintSigningKeyValidityPS +struct TALER_ExchangeSigningKeyValidityPS { /** - * Signature over the signing key (by the master key of the mint). + * Signature over the signing key (by the master key of the exchange). * * FIXME: should be moved outside of the "PS" struct, this is ugly. * (and makes this struct different from all of the others) @@ -489,8 +489,8 @@ struct TALER_MintSigningKeyValidityPS struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * Master public key of the mint corresponding to @e signature. - * This is the long-term offline master key of the mint. + * Master public key of the exchange corresponding to @e signature. + * This is the long-term offline master key of the exchange. */ struct TALER_MasterPublicKeyP master_public_key; @@ -501,7 +501,7 @@ struct TALER_MintSigningKeyValidityPS /** * When does this signing key expire? Note: This is currently when - * the Mint will definitively stop using it. Signatures made with + * the Exchange will definitively stop using it. Signatures made with * the key remain valid until @e end. When checking validity periods, * clients should allow for some overlap between keys and tolerate * the use of either key during the overlap time (due to the @@ -512,31 +512,31 @@ struct TALER_MintSigningKeyValidityPS /** * When do signatures with this signing key become invalid? After * this point, these signatures cannot be used in (legal) disputes - * anymore, as the Mint is then allowed to destroy its side of the + * anymore, as the Exchange is then allowed to destroy its side of the * evidence. @e end is expected to be significantly larger than @e * expire (by a year or more). */ struct GNUNET_TIME_AbsoluteNBO end; /** - * The public online signing key that the mint will use + * The public online signing key that the exchange will use * between @e start and @e expire. */ - struct TALER_MintPublicKeyP signkey_pub; + struct TALER_ExchangePublicKeyP signkey_pub; }; /** - * @brief Signature made by the mint over the full set of keys, used - * to detect cheating mints that give out different sets to + * @brief Signature made by the exchange over the full set of keys, used + * to detect cheating exchanges that give out different sets to * different users. */ -struct TALER_MintKeySetPS +struct TALER_ExchangeKeySetPS { /** - * Purpose is #TALER_SIGNATURE_MINT_KEY_SET. Signed - * by a `struct TALER_MintPublicKeyP` using EdDSA. + * Purpose is #TALER_SIGNATURE_EXCHANGE_KEY_SET. Signed + * by a `struct TALER_ExchangePublicKeyP` using EdDSA. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -565,7 +565,7 @@ struct TALER_DenominationKeyValidityPS struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * The long-term offline master key of the mint that was + * The long-term offline master key of the exchange that was * used to create @e signature. */ struct TALER_MasterPublicKeyP master; @@ -576,14 +576,14 @@ struct TALER_DenominationKeyValidityPS struct GNUNET_TIME_AbsoluteNBO start; /** - * The mint will sign fresh coins between @e start and this time. + * The exchange will sign fresh coins between @e start and this time. * @e expire_withdraw will be somewhat larger than @e start to * ensure a sufficiently large anonymity set, while also allowing - * the Mint to limit the financial damage in case of a key being - * compromised. Thus, mints with low volume are expected to have a - * longer withdraw period (@e expire_withdraw - @e start) than mints + * the Exchange to limit the financial damage in case of a key being + * compromised. Thus, exchanges with low volume are expected to have a + * longer withdraw period (@e expire_withdraw - @e start) than exchanges * with high transaction volume. The period may also differ between - * types of coins. A mint may also have a few denomination keys + * types of coins. A exchange may also have a few denomination keys * with the same value with overlapping validity periods, to address * issues such as clock skew. */ @@ -592,7 +592,7 @@ struct TALER_DenominationKeyValidityPS /** * Coins signed with the denomination key must be spent or refreshed * between @e start and this expiration time. After this time, the - * mint will refuse transactions involving this key as it will + * exchange will refuse transactions involving this key as it will * "drop" the table with double-spending information (shortly after) * this time. Note that wallets should refresh coins significantly * before this time to be on the safe side. @e expire_spend must be @@ -604,7 +604,7 @@ struct TALER_DenominationKeyValidityPS /** * When do signatures with this denomination key become invalid? * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Mint is then allowed to destroy its side + * disputes anymore, as the Exchange is then allowed to destroy its side * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_spend (by a year or more). */ @@ -616,19 +616,19 @@ struct TALER_DenominationKeyValidityPS struct TALER_AmountNBO value; /** - * The fee the mint charges when a coin of this type is withdrawn. + * The fee the exchange charges when a coin of this type is withdrawn. * (can be zero). */ struct TALER_AmountNBO fee_withdraw; /** - * The fee the mint charges when a coin of this type is deposited. + * The fee the exchange charges when a coin of this type is deposited. * (can be zero). */ struct TALER_AmountNBO fee_deposit; /** - * The fee the mint charges when a coin of this type is refreshed. + * The fee the exchange charges when a coin of this type is refreshed. * (can be zero). */ struct TALER_AmountNBO fee_refresh; @@ -645,18 +645,18 @@ struct TALER_DenominationKeyValidityPS /** * @brief Information signed by an auditor affirming * the master public key and the denomination keys - * of a mint. + * of a exchange. */ -struct TALER_MintKeyValidityPS +struct TALER_ExchangeKeyValidityPS { /** - * Purpose is #TALER_SIGNATURE_AUDITOR_MINT_KEYS. + * Purpose is #TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * The long-term offline master key of the mint, affirmed by the + * The long-term offline master key of the exchange, affirmed by the * auditor. */ struct TALER_MasterPublicKeyP master; @@ -667,14 +667,14 @@ struct TALER_MintKeyValidityPS struct GNUNET_TIME_AbsoluteNBO start; /** - * The mint will sign fresh coins between @e start and this time. + * The exchange will sign fresh coins between @e start and this time. * @e expire_withdraw will be somewhat larger than @e start to * ensure a sufficiently large anonymity set, while also allowing - * the Mint to limit the financial damage in case of a key being - * compromised. Thus, mints with low volume are expected to have a - * longer withdraw period (@e expire_withdraw - @e start) than mints + * the Exchange to limit the financial damage in case of a key being + * compromised. Thus, exchanges with low volume are expected to have a + * longer withdraw period (@e expire_withdraw - @e start) than exchanges * with high transaction volume. The period may also differ between - * types of coins. A mint may also have a few denomination keys + * types of coins. A exchange may also have a few denomination keys * with the same value with overlapping validity periods, to address * issues such as clock skew. */ @@ -683,7 +683,7 @@ struct TALER_MintKeyValidityPS /** * Coins signed with the denomination key must be spent or refreshed * between @e start and this expiration time. After this time, the - * mint will refuse transactions involving this key as it will + * exchange will refuse transactions involving this key as it will * "drop" the table with double-spending information (shortly after) * this time. Note that wallets should refresh coins significantly * before this time to be on the safe side. @e expire_spend must be @@ -695,7 +695,7 @@ struct TALER_MintKeyValidityPS /** * When do signatures with this denomination key become invalid? * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Mint is then allowed to destroy its side + * disputes anymore, as the Exchange is then allowed to destroy its side * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_spend (by a year or more). */ @@ -707,19 +707,19 @@ struct TALER_MintKeyValidityPS struct TALER_AmountNBO value; /** - * The fee the mint charges when a coin of this type is withdrawn. + * The fee the exchange charges when a coin of this type is withdrawn. * (can be zero). */ struct TALER_AmountNBO fee_withdraw; /** - * The fee the mint charges when a coin of this type is deposited. + * The fee the exchange charges when a coin of this type is deposited. * (can be zero). */ struct TALER_AmountNBO fee_deposit; /** - * The fee the mint charges when a coin of this type is refreshed. + * The fee the exchange charges when a coin of this type is refreshed. * (can be zero). */ struct TALER_AmountNBO fee_refresh; @@ -737,7 +737,7 @@ struct TALER_MintKeyValidityPS * @brief For each (old) coin being melted, we have a `struct * RefreshCommitLinkP` that allows the user to find the shared secret * to decrypt the respective refresh links for the new coins in the - * `struct TALER_MINTDB_RefreshCommitCoin`. + * `struct TALER_EXCHANGEDB_RefreshCommitCoin`. * * Part of the construction of the refresh session's hash and * thus of what is signed there. @@ -759,8 +759,8 @@ struct TALER_RefreshCommitLinkP /** - * @brief Information signed by the mint's master - * key affirming the SEPA details for the mint. + * @brief Information signed by the exchange's master + * key affirming the SEPA details for the exchange. */ struct TALER_MasterWireSepaDetailsPS { @@ -780,19 +780,19 @@ struct TALER_MasterWireSepaDetailsPS /** - * @brief Information signed by a mint's online signing key affirming - * the wire formats supported by the mint. + * @brief Information signed by a exchange's online signing key affirming + * the wire formats supported by the exchange. */ -struct TALER_MintWireSupportMethodsPS +struct TALER_ExchangeWireSupportMethodsPS { /** - * Purpose is #TALER_SIGNATURE_MINT_WIRE_TYPES. + * Purpose is #TALER_SIGNATURE_EXCHANGE_WIRE_TYPES. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * Hash over the various wire formats supported by this mint + * Hash over the various wire formats supported by this exchange * (all as 0-terminated strings). */ struct GNUNET_HashCode h_wire_types GNUNET_PACKED; @@ -841,7 +841,7 @@ struct TALER_DepositTrackPS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. + * signed (blindly) by the Exchange. */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -896,14 +896,14 @@ struct TALER_ContractPS /** - * Details affirmed by the mint about a wire transfer the mint + * Details affirmed by the exchange about a wire transfer the exchange * claims to have done with respect to a deposit operation. */ struct TALER_ConfirmWirePS { /** * Purpose header for the signature over the contract with - * purpose #TALER_SIGNATURE_MINT_CONFIRM_WIRE. + * purpose #TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -924,7 +924,7 @@ struct TALER_ConfirmWirePS /** * The coin's public key. This is the value that must have been - * signed (blindly) by the Mint. + * signed (blindly) by the Exchange. */ struct TALER_CoinSpendPublicKeyP coin_pub; @@ -941,7 +941,7 @@ struct TALER_ConfirmWirePS uint64_t transaction_id GNUNET_PACKED; /** - * When did the mint execute this transfer? Note that the + * When did the exchange execute this transfer? Note that the * timestamp may not be exactly the same on the wire, i.e. * because the wire has a different timezone or resolution. */ |