[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: [header] try to map api
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: [header] try to map api |
Date: |
Tue, 10 Oct 2023 01:25:28 +0200 |
This is an automated email from the git hooks/post-receive script.
lukas-matyja pushed a commit to branch master
in repository donau.
The following commit(s) were added to refs/heads/master by this push:
new 308da18 [header] try to map api
308da18 is described below
commit 308da18936565d92f6df8446e7d9cd1ea5e916f0
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Tue Oct 10 01:25:14 2023 +0200
[header] try to map api
---
src/include/taler_donau_service.h | 1933 +++++++++----------------------------
1 file changed, 476 insertions(+), 1457 deletions(-)
diff --git a/src/include/taler_donau_service.h
b/src/include/taler_donau_service.h
index abd901c..7993462 100644
--- a/src/include/taler_donau_service.h
+++ b/src/include/taler_donau_service.h
@@ -297,7 +297,7 @@ struct TALER_DONAU_GetKeysHandle;
* Fetch the main /keys resources from an donau. Does an incremental
* fetch if @a last_keys is given. The obtained information will be passed to
* the @a cert_cb (possibly after first merging it with @a last_keys to
- * produce a full picture; expired keys (for deposit) will be removed from @a
+ * produce a full picture; expired keys (for ) will be removed from @a
* last_keys if there are any).
*
* @param ctx the context
@@ -446,135 +446,44 @@ TALER_DONAU_get_signing_key_info (
const struct TALER_DonauPublicKeyP *donau_pub);
-/* ********************* collect donation receipts/request signature for
QR-Code *********************** */
-
-/**
- * Information needed for a receipt to be collected.
- */
-struct TALER_DONAU_DonationUnitDetail
-{
-
- /**
- * Thedonation unit public key.
- */
- struct TALER_DonationUnitPublicKeyP bdr_pub;
-
- /**
- * Hash of the public key of the coin.
- */
- struct TALER_DonationUnitHashP h_donation_unit_pub; // Eh, what? Coin? Nonce!
-
- /**
- * Thedonation unit itself.
- */
- struct TALER_DonationUnit bdr; // FIXME: what is this!?
-};
+/* ********************* POST /submit *********************** */
/**
- * Information needed for adonation unit to be signed.
+ * Information needed for a donation receipt to be signed.
*/
-struct TALER_DONAU_DonationUnitDetail // Duplicated name!
+struct TALER_DONAU_DonationReceipt
{
-
- /**
- * The amount to be signed.
- */
- struct TALER_Amount amount; // why?
-
+
/**
- * The coin’s public key.
- */
- struct TALER_CoinSpendPublicKeyP coin_pub; // coin!??
+ * The hash of the coin donation unit's public key.
+ */
+ struct TALER_DonationUnitHashP h_donation_unit_pub;
/**
- * The signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made
- * by the donor with the coin’s private key.
+ * The nonce of the donation receipt.
*/
- struct TALER_CoinSpendSignatureP coin_sig; // why? how?
+ char TALER_Nonce *nonce;
/**
- * Donau’s unblinded signature of the coin.
+ * Donau’s unblinded signature of the donation receipt.
*/
struct TALER_DonationUnitSignature donation_unit_sig;
- /**
- * Hash of the public key of the coin.
- */
- struct TALER_DonationUnitHashP h_donation_unit_pub; // of the coin? or of
the public key for donation_unit_sig!!?
-};
-
-
-/**
- * Meta information about the contract relevant for a coin's deposit
- * operation.
- */
-struct TALER_DONAU_DepositContractDetail
-{
-
- /**
- * Hash of the contact of the charity with the donor (further details
- * are never disclosed to the donau)
- */
- struct TALER_PrivateContractHashP h_contract_terms; // ???
-
- /**
- * The public key of the charity (used to identify the charity for refund
- * requests).
- */
- struct TALER_CharityPublicKeyP charity_pub; // Eh, the charity is supposed
to be hidden!!!
-
- /**
- * Salt used to hash the @e charity_payto_uri.
- */
- struct TALER_WireSaltP wire_salt; // kill
- // out of time for review here...
-
- /**
- * Hash over data provided by the wallet to customize the contract.
- * All zero if not used.
- */
- struct GNUNET_HashCode wallet_data_hash;
-
- /**
- * Execution date, until which the charity would like the donau to
- * settle the balance (advisory, the donau cannot be forced to settle in
- * the past or upon very short notice, but of course a well-behaved donau
- * will limit aggregation based on the advice received).
- */
- struct GNUNET_TIME_Timestamp wire_deadline;
-
- /**
- * Timestamp when the contract was finalized, must match approximately the
- * current time of the donau.
- */
- struct GNUNET_TIME_Timestamp wallet_timestamp;
-
- /**
- * The charity’s account details, in the payto://-format supported by the
- * donau.
- */
- const char *charity_payto_uri;
-
- /**
- * Policy extension specific details about the deposit relevant to the donau.
- */
- const json_t *policy_details;
-
};
/**
- * @brief A Batch Deposit Handle
+ * @brief A Batch Submit Handle
*/
-struct TALER_DONAU_BatchDepositHandle;
+struct TALER_DONAU_BatchSubmitHandle;
/**
- * Structure with information about a batch deposit
+ * Structure with information about a batch
* operation's result.
*/
-struct TALER_DONAU_BatchDepositResult
+struct TALER_DONAU_BatchSubmitResult
{
/**
* HTTP response data
@@ -591,37 +500,18 @@ struct TALER_DONAU_BatchDepositResult
struct
{
/**
- * Time when the donau generated the batch deposit confirmation
- */
- struct GNUNET_TIME_Timestamp deposit_timestamp;
-
- /**
- * Array of signatures provided by the donau
- */
- const struct TALER_DonauSignatureP *donau_sigs;
-
- /**
- * donau key used to sign @a donau_sig.
+ * Eddsa signature provided by the donau
*/
- const struct TALER_DonauPublicKeyP *donau_pub;
+ const struct TALER_DonauSignatureP donau_sigs;
/**
- * Base URL for looking up wire transfers, or
- * NULL to use the default base URL.
+ * total amount over all donation receipts of a year specified by the
request.
*/
- const char *transaction_base_url;
+ const struct TALER_Amount donau_amount
- /**
- * Length of the @e donau_sigs array.
- */
- unsigned int num_signatures;
} ok;
- /**
- * Information returned if the HTTP status is
- * #MHD_HTTP_CONFLICT.
- */
struct
{
/* TODO: returning full details is not implemented */
@@ -633,26 +523,26 @@ struct TALER_DONAU_BatchDepositResult
/**
* Callbacks of this type are used to serve the result of submitting a
- * deposit permission request to a donau.
+ * permission request to a donau.
*
* @param cls closure
- * @param dr deposit response details
+ * @param dr response details
*/
typedef void
-(*TALER_DONAU_BatchDepositResultCallback) (
+(*TALER_DONAU_BatchSubmitResultCallback) (
void *cls,
- const struct TALER_DONAU_BatchDepositResult *dr);
+ const struct TALER_DONAU_BatchSubmitResult *dr);
/**
- * Submit a batch of deposit permissions to the donau and get the
+ * Submit a batch of permissions to the donau and get the
* donau's response. This API is typically used by a charity. 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 donau's reply is not
* well-formed, we return an HTTP status code of zero to @a cb.
*
- * We also verify that the @a cdds.coin_sig are valid for this deposit
+ * We also verify that the @a cdds.coin_sig are valid for this
* request, and that the @a cdds.ub_sig are a valid signatures for @a
* coin_pub. Also, the @a donau must be ready to operate (i.e. have
* finished processing the /keys reply). If either check fails, we do
@@ -661,63 +551,63 @@ typedef void
* @param ctx curl context
* @param url donau base URL
* @param keys donau keys
- * @param dcd details about the contract the deposit is for
+ * @param dcd details about the contract the is for
* @param num_cdds length of the @a cdds array
- * @param cdds array with details about the coins to be deposited
+ * @param cdds array with details about the coins to be ed
* @param cb the callback to call when a reply for this request is available
* @param cb_cls closure for the above callback
* @param[out] ec if NULL is returned, set to the error code explaining why
the operation failed
* @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_DONAU_BatchDepositHandle *
-TALER_DONAU_batch_deposit (
+struct TALER_DONAU_BatchSubmitHandle *
+TALER_DONAU_batch_ (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
- const struct TALER_DONAU_DepositContractDetail *dcd,
+ const struct TALER_DONAU_SubmitContractDetail *dcd,
unsigned int num_cdds,
- const struct TALER_DONAU_CoinDepositDetail cdds[static num_cdds],
- TALER_DONAU_BatchDepositResultCallback cb,
+ const struct TALER_DONAU_CoinSubmitDetail cdds[static num_cdds],
+ TALER_DONAU_BatchSubmitResultCallback cb,
void *cb_cls,
enum TALER_ErrorCode *ec);
/**
- * Change the chance that our deposit confirmation will be given to the
+ * Change the chance that our confirmation will be given to the
* auditor to 100%.
*
- * @param[in,out] deposit the batch deposit permission request handle
+ * @param[in,out] the batch deposit permission request handle
*/
-void
-TALER_DONAU_batch_deposit_force_dc (
- struct TALER_DONAU_BatchDepositHandle *deposit);
+//void
+//TALER_DONAU_batch__force_dc (
+ //struct TALER_DONAU_BatchSubmitHandle *);
/**
- * Cancel a batch deposit permission request. This function cannot be used
+ * Cancel a batch permission request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param[in] deposit the deposit permission request handle
+ * @param[in] the deposit permission request handle
*/
void
-TALER_DONAU_batch_deposit_cancel (
- struct TALER_DONAU_BatchDepositHandle *deposit);
+TALER_DONAU_batch__cancel (
+ struct TALER_DONAU_BatchSubmitHandle *);
-/* ********************* POST /csr issue receipts (equivalent to
issue_receipts of exchange) *********************** */
+/* ********************* POST /csr batch-issue (equivalent to withdraw of
exchange) *********************** */
/**
- * @brief A /csr-issue_receipts Handle
+ * @brief A /csr-batch-issue Handle
*/
-struct TALER_DONAU_CsRIssueReceiptsHandle;
+struct TALER_DONAU_CsRBatchIssueHandle;
/**
* Details about a response for a CS R request.
*/
-struct TALER_DONAU_CsRIssueReceiptsResponse
+struct TALER_DONAU_CsRBatchIssueResponse
{
/**
* HTTP response data.
@@ -736,9 +626,9 @@ struct TALER_DONAU_CsRIssueReceiptsResponse
{
/**
* Values contributed by the donau for the
- * respective coin's issue_receipts operation.
+ * respective coin's batch-issue operation.
*/
- struct TALER_DonauIssueReceiptsValues alg_values;
+ struct TALER_DonauBatchIssueValues alg_values;
} ok;
/**
@@ -755,19 +645,19 @@ struct TALER_DONAU_CsRIssueReceiptsResponse
/**
* Callbacks of this type are used to serve the result of submitting a
- * CS R issue_receipts request to a donau.
+ * CS R batch-issue request to a donau.
*
* @param cls closure
* @param csrr response details
*/
typedef void
-(*TALER_DONAU_CsRIssueReceiptsCallback) (
+(*TALER_DONAU_CsRBatchIssueCallback) (
void *cls,
- const struct TALER_DONAU_CsRIssueReceiptsResponse *csrr);
+ const struct TALER_DONAU_CsRBatchIssueResponse *csrr);
/**
- * Get a CS R using a /csr-issue_receipts request.
+ * Get a CS R using a /csr-batch-issue request.
*
* @param curl_ctx The curl context to use for the requests
* @param donau_url Base-URL to the excnange
@@ -779,94 +669,61 @@ typedef void
* if the inputs are invalid (i.e.donation unit key not with this
donau).
* In this case, the callback is not called.
*/
-struct TALER_DONAU_CsRIssueReceiptsHandle *
-TALER_DONAU_csr_issue_receipts (
+struct TALER_DONAU_CsRBatchIssueHandle *
+TALER_DONAU_csr_batch-issue (
struct GNUNET_CURL_Context *curl_ctx,
const char *donau_url,
const struct TALER_DONAU_DonationUnitPublicKey *pk,
const struct TALER_CsNonce *nonce,
- TALER_DONAU_CsRIssueReceiptsCallback res_cb,
+ TALER_DONAU_CsRBatchIssueCallback res_cb,
void *res_cb_cls);
/**
*
- * Cancel a CS R issue_receipts request. This function cannot be used
+ * Cancel a CS R batch-issue request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param csrh the issue_receipts handle
+ * @param csrh the batch-issue handle
*/
void
-TALER_DONAU_csr_issue_receipts_cancel (
- struct TALER_DONAU_CsRIssueReceiptsHandle *csrh);
+TALER_DONAU_csr_batch-issue_cancel (
+ struct TALER_DONAU_CsRBatchIssueHandle *csrh);
-/* ********************* GET /reserves/$RESERVE_PUB *********************** */
+/* ********************* GET /charities/$CHARITY_ID *********************** */
/**
- * Ways how a reserve's balance may change.
+ * actual information about a charity
*/
-enum TALER_DONAU_ReserveTransactionType
+struct TALER_DONAU_CHARITY
{
-
- /**
- * Deposit into the reserve.
- */
- TALER_DONAU_RTT_CREDIT,
-
- /**
- * IssueReceiptsal from the reserve.
- */
- TALER_DONAU_RTT_WITHDRAWAL,
-
- /**
- * Age-IssueReceiptsal from the reserve.
- */
- TALER_DONAU_RTT_AGEWITHDRAWAL,
-
- /**
- * /recoup operation.
- */
- TALER_DONAU_RTT_RECOUP,
-
- /**
- * Reserve closed operation.
- */
- TALER_DONAU_RTT_CLOSING,
-
- /**
- * Reserve history request.
- */
- TALER_DONAU_RTT_HISTORY,
-
+
/**
- * Reserve purse merge operation.
+ * charity id.
*/
- TALER_DONAU_RTT_MERGE,
+ unsigned int charity_id;
/**
- * Reserve open request operation.
+ * max allowed donation amount per year.
*/
- TALER_DONAU_RTT_OPEN,
+ struct Taler_Amount amount;
/**
- * Reserve close request operation.
+ * total donation amount for the current year
*/
- TALER_DONAU_RTT_CLOSE
-
-};
-
+}
/**
- * @brief Entry in the reserve's transaction history.
+ * @brief Entry in the charity's transaction history.
*/
-struct TALER_DONAU_ReserveHistoryEntry
+struct TALER_DONAU_charityHistoryEntry
{
/**
* Type of the transaction.
*/
- enum TALER_DONAU_ReserveTransactionType type;
+ enum TALER_DONAU_charityTransactionType type;
/**
* Amount transferred (in or out).
@@ -880,7 +737,7 @@ struct TALER_DONAU_ReserveHistoryEntry
{
/**
- * Information about a deposit that filled this reserve.
+ * Information about a that filled this charity.
* @e type is #TALER_DONAU_RTT_CREDIT.
*/
struct
@@ -903,7 +760,7 @@ struct TALER_DONAU_ReserveHistoryEntry
} in_details;
/**
- * Information about issue_receipts operation.
+ * Information about batch-issue operation.
* @e type is #TALER_DONAU_RTT_WITHDRAWAL.
*/
struct
@@ -913,66 +770,10 @@ struct TALER_DONAU_ReserveHistoryEntry
*/
json_t *out_authorization_sig;
- /**
- * Fee that was charged for the withdrawal.
- */
- struct TALER_Amount fee;
} withdraw;
-
- /**
- * Information about issue_receipts operation.
- * @e type is #TALER_DONAU_RTT_AGEWITHDRAWAL.
- */
- struct
- {
- /**
- * Signature authorizing the withdrawal for outgoing transaction.
- */
- json_t *out_authorization_sig;
-
- /**
- * Maximum age committed
- */
- uint8_t max_age;
-
- /**
- * Fee that was charged for the withdrawal.
- */
- struct TALER_Amount fee;
- } age_issue_receipts;
-
- /**
- * Information provided if the reserve was filled via /recoup.
- * @e type is #TALER_DONAU_RTT_RECOUP.
- */
- struct
- {
-
- /**
- * Public key of the coin that was paid back.
- */
- struct TALER_CoinSpendPublicKeyP coin_pub;
-
- /**
- * Signature of the coin of type
- * #TALER_SIGNATURE_DONAU_CONFIRM_RECOUP.
- */
- struct TALER_DonauSignatureP donau_sig;
-
- /**
- * Public key of the donau that was used for @e donau_sig.
- */
- struct TALER_DonauPublicKeyP donau_pub;
-
- /**
- * When did the /recoup operation happen?
- */
- struct GNUNET_TIME_Timestamp timestamp;
-
- } recoup_details;
-
+
/**
- * Information about a close operation of the reserve.
+ * Information about a close operation of the charity.
* @e type is #TALER_DONAU_RTT_CLOSE.
*/
struct
@@ -989,7 +790,7 @@ struct TALER_DONAU_ReserveHistoryEntry
/**
* Signature of the coin of type
- * #TALER_SIGNATURE_DONAU_RESERVE_CLOSED.
+ * #TALER_SIGNATURE_DONAU_CHARITY_CLOSED.
*/
struct TALER_DonauSignatureP donau_sig;
@@ -1011,7 +812,7 @@ struct TALER_DONAU_ReserveHistoryEntry
} close_details;
/**
- * Information about a history operation of the reserve.
+ * Information about a history operation of the charity.
* @e type is #TALER_DONAU_RTT_HISTORY.
*/
struct
@@ -1023,14 +824,14 @@ struct TALER_DONAU_ReserveHistoryEntry
struct GNUNET_TIME_Timestamp request_timestamp;
/**
- * Signature by the reserve approving the history request.
+ * Signature by the charity approving the history request.
*/
- struct TALER_ReserveSignatureP reserve_sig;
+ struct TALER_charitySignatureP charity_sig;
} history_details;
/**
- * Information about a merge operation on the reserve.
+ * Information about a merge operation on the charity.
* @e type is #TALER_DONAU_RTT_MERGE.
*/
struct
@@ -1057,9 +858,9 @@ struct TALER_DONAU_ReserveHistoryEntry
struct TALER_PurseContractPublicKeyP purse_pub;
/**
- * Signature by the reserve approving the merge.
+ * Signature by the charity approving the merge.
*/
- struct TALER_ReserveSignatureP reserve_sig;
+ struct TALER_charitySignatureP charity_sig;
/**
* When was the merge made.
@@ -1072,7 +873,7 @@ struct TALER_DONAU_ReserveHistoryEntry
struct GNUNET_TIME_Timestamp purse_expiration;
/**
- * Minimum age required for depositing into the purse.
+ * Minimum age required for ing into the purse.
*/
uint32_t min_age;
@@ -1090,22 +891,22 @@ struct TALER_DONAU_ReserveHistoryEntry
} merge_details;
/**
- * Information about an open request operation on the reserve.
+ * Information about an open request operation on the charity.
* @e type is #TALER_DONAU_RTT_OPEN.
*/
struct
{
/**
- * Signature by the reserve approving the open.
+ * Signature by the charity approving the open.
*/
- struct TALER_ReserveSignatureP reserve_sig;
+ struct TALER_charitySignatureP charity_sig;
/**
- * Amount to be paid from the reserve balance to open
- * the reserve.
+ * Amount to be paid from the charity balance to open
+ * the charity.
*/
- struct TALER_Amount reserve_payment;
+ struct TALER_Amount charity_payment;
/**
* When was the request created.
@@ -1113,14 +914,14 @@ struct TALER_DONAU_ReserveHistoryEntry
struct GNUNET_TIME_Timestamp request_timestamp;
/**
- * For how long should the reserve be kept open.
+ * For how long should the charity be kept open.
* (Determines amount to be paid.)
*/
- struct GNUNET_TIME_Timestamp reserve_expiration;
+ struct GNUNET_TIME_Timestamp charity_expiration;
/**
* How many open purses should be included with the
- * open reserve?
+ * open charity?
* (Determines amount to be paid.)
*/
uint32_t purse_limit;
@@ -1128,16 +929,16 @@ struct TALER_DONAU_ReserveHistoryEntry
} open_request;
/**
- * Information about an close request operation on the reserve.
+ * Information about an close request operation on the charity.
* @e type is #TALER_DONAU_RTT_CLOSE.
*/
struct
{
/**
- * Signature by the reserve approving the close.
+ * Signature by the charity approving the close.
*/
- struct TALER_ReserveSignatureP reserve_sig;
+ struct TALER_charitySignatureP charity_sig;
/**
* When was the request created.
@@ -1146,7 +947,7 @@ struct TALER_DONAU_ReserveHistoryEntry
/**
* Hash of the payto://-URI of the target account
- * for the closure, or all zeros for the reserve
+ * for the closure, or all zeros for the charity
* origin account.
*/
struct TALER_PaytoHashP target_account_h_payto;
@@ -1160,15 +961,15 @@ struct TALER_DONAU_ReserveHistoryEntry
/**
- * @brief A /reserves/ GET Handle
+ * @brief A /charitys/ GET Handle
*/
-struct TALER_DONAU_ReservesGetHandle;
+struct TALER_DONAU_charitysGetHandle;
/**
- * @brief Reserve summary.
+ * @brief charity summary.
*/
-struct TALER_DONAU_ReserveSummary
+struct TALER_DONAU_charitySummary
{
/**
@@ -1190,7 +991,7 @@ struct TALER_DONAU_ReserveSummary
{
/**
- * Reserve balance.
+ * charity balance.
*/
struct TALER_Amount balance;
@@ -1203,19 +1004,19 @@ struct TALER_DONAU_ReserveSummary
/**
* Callbacks of this type are used to serve the result of submitting a
- * reserve status request to a donau.
+ * charity status request to a donau.
*
* @param cls closure
* @param rs HTTP response data
*/
typedef void
-(*TALER_DONAU_ReservesGetCallback) (
+(*TALER_DONAU_charitysGetCallback) (
void *cls,
- const struct TALER_DONAU_ReserveSummary *rs);
+ const struct TALER_DONAU_charitySummary *rs);
/**
- * Submit a request to obtain the transaction history of a reserve
+ * Submit a request to obtain the transaction history of a charity
* from the donau. 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
@@ -1225,45 +1026,45 @@ typedef void
*
* @param ctx curl context
* @param url donau base URL
- * @param reserve_pub public key of the reserve to inspect
+ * @param charity_pub public key of the charity to inspect
* @param timeout how long to wait for an affirmative reply
- * (enables long polling if the reserve does not yet exist)
+ * (enables long polling if the charity does not yet exist)
* @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_DONAU_ReservesGetHandle *
-TALER_DONAU_reserves_get (
+struct TALER_DONAU_charitysGetHandle *
+TALER_DONAU_charitys_get (
struct GNUNET_CURL_Context *ctx,
const char *url,
- const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_charityPublicKeyP *charity_pub,
struct GNUNET_TIME_Relative timeout,
- TALER_DONAU_ReservesGetCallback cb,
+ TALER_DONAU_charitysGetCallback cb,
void *cb_cls);
/**
- * Cancel a reserve GET request. This function cannot be used
+ * Cancel a charity GET request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param rgh the reserve request handle
+ * @param rgh the charity request handle
*/
void
-TALER_DONAU_reserves_get_cancel (
- struct TALER_DONAU_ReservesGetHandle *rgh);
+TALER_DONAU_charitys_get_cancel (
+ struct TALER_DONAU_charitysGetHandle *rgh);
/**
- * @brief A /reserves/$RID/status Handle
+ * @brief A /charitys/$RID/status Handle
*/
-struct TALER_DONAU_ReservesStatusHandle;
+struct TALER_DONAU_charitysStatusHandle;
/**
- * @brief Reserve status details.
+ * @brief charity status details.
*/
-struct TALER_DONAU_ReserveStatus
+struct TALER_DONAU_charityStatus
{
/**
@@ -1285,7 +1086,7 @@ struct TALER_DONAU_ReserveStatus
{
/**
- * Current reserve balance. May not be the difference between
+ * Current charity balance. May not be the difference between
* @e total_in and @e total_out because the @e may be truncated.
*/
struct TALER_Amount balance;
@@ -1301,9 +1102,9 @@ struct TALER_DONAU_ReserveStatus
struct TALER_Amount total_out;
/**
- * Reserve history.
+ * charity history.
*/
- const struct TALER_DONAU_ReserveHistoryEntry *history;
+ const struct TALER_DONAU_charityHistoryEntry *history;
/**
* Length of the @e history array.
@@ -1319,60 +1120,60 @@ struct TALER_DONAU_ReserveStatus
/**
* Callbacks of this type are used to serve the result of submitting a
- * reserve status request to a donau.
+ * charity status request to a donau.
*
* @param cls closure
* @param rs HTTP response data
*/
typedef void
-(*TALER_DONAU_ReservesStatusCallback) (
+(*TALER_DONAU_charitysStatusCallback) (
void *cls,
- const struct TALER_DONAU_ReserveStatus *rs);
+ const struct TALER_DONAU_charityStatus *rs);
/**
- * Submit a request to obtain the reserve status.
+ * Submit a request to obtain the charity status.
*
* @param ctx curl context
* @param url donau base URL
* @param keys donau keys
- * @param reserve_priv private key of the reserve to inspect
+ * @param charity_priv private key of the charity 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_DONAU_ReservesStatusHandle *
-TALER_DONAU_reserves_status (
+struct TALER_DONAU_charitysStatusHandle *
+TALER_DONAU_charitys_status (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
- TALER_DONAU_ReservesStatusCallback cb,
+ const struct TALER_charityPrivateKeyP *charity_priv,
+ TALER_DONAU_charitysStatusCallback cb,
void *cb_cls);
/**
- * Cancel a reserve status request. This function cannot be used
+ * Cancel a charity status request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param rsh the reserve request handle
+ * @param rsh the charity request handle
*/
void
-TALER_DONAU_reserves_status_cancel (
- struct TALER_DONAU_ReservesStatusHandle *rsh);
+TALER_DONAU_charitys_status_cancel (
+ struct TALER_DONAU_charitysStatusHandle *rsh);
/**
- * @brief A /reserves/$RID/history Handle
+ * @brief A /charitys/$RID/history Handle
*/
-struct TALER_DONAU_ReservesHistoryHandle;
+struct TALER_DONAU_charitysHistoryHandle;
/**
- * @brief Reserve history details.
+ * @brief charity history details.
*/
-struct TALER_DONAU_ReserveHistory
+struct TALER_DONAU_charityHistory
{
/**
@@ -1387,10 +1188,10 @@ struct TALER_DONAU_ReserveHistory
struct GNUNET_TIME_Timestamp ts;
/**
- * Reserve signature affirming the history request
+ * charity signature affirming the history request
* (generated as part of the request).
*/
- const struct TALER_ReserveSignatureP *reserve_sig;
+ const struct TALER_charitySignatureP *charity_sig;
/**
* Details depending on @e hr.http_status.
@@ -1406,7 +1207,7 @@ struct TALER_DONAU_ReserveHistory
{
/**
- * Reserve balance. May not be the difference between
+ * charity balance. May not be the difference between
* @e total_in and @e total_out because the @e may be truncated
* due to expiration.
*/
@@ -1423,9 +1224,9 @@ struct TALER_DONAU_ReserveHistory
struct TALER_Amount total_out;
/**
- * Reserve history.
+ * charity history.
*/
- const struct TALER_DONAU_ReserveHistoryEntry *history;
+ const struct TALER_DONAU_charityHistoryEntry *history;
/**
* Length of the @e history array.
@@ -1441,63 +1242,63 @@ struct TALER_DONAU_ReserveHistory
/**
* Callbacks of this type are used to serve the result of submitting a
- * reserve history request to a donau.
+ * charity history request to a donau.
*
* @param cls closure
* @param rs HTTP response data
*/
typedef void
-(*TALER_DONAU_ReservesHistoryCallback) (
+(*TALER_DONAU_charitysHistoryCallback) (
void *cls,
- const struct TALER_DONAU_ReserveHistory *rs);
+ const struct TALER_DONAU_charityHistory *rs);
/**
- * Submit a request to obtain the reserve history.
+ * Submit a request to obtain the charity history.
*
* @param ctx curl context
* @param url donau base URL
* @param keys donau keys
- * @param reserve_priv private key of the reserve to inspect
+ * @param charity_priv private key of the charity 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_DONAU_ReservesHistoryHandle *
-TALER_DONAU_reserves_history (
+struct TALER_DONAU_charitysHistoryHandle *
+TALER_DONAU_charitys_history (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
- TALER_DONAU_ReservesHistoryCallback cb,
+ const struct TALER_charityPrivateKeyP *charity_priv,
+ TALER_DONAU_charitysHistoryCallback cb,
void *cb_cls);
/**
- * Cancel a reserve history request. This function cannot be used
+ * Cancel a charity history request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param rsh the reserve request handle
+ * @param rsh the charity request handle
*/
void
-TALER_DONAU_reserves_history_cancel (
- struct TALER_DONAU_ReservesHistoryHandle *rsh);
+TALER_DONAU_charitys_history_cancel (
+ struct TALER_DONAU_charitysHistoryHandle *rsh);
-/* ********************* POST /reserves/$RESERVE_PUB/issue_receipts
*********************** */
+/* ********************* POST /charitys/$CHARITY_PUB/batch-issue
*********************** */
/**
- * @brief A /reserves/$RESERVE_PUB/issue_receipts Handle
+ * @brief A /charitys/$CHARITY_PUB/batch-issue Handle
*/
-struct TALER_DONAU_IssueReceiptsHandle;
+struct TALER_DONAU_BatchIssueHandle;
/**
- * Information input into the issue_receipts process per coin.
+ * Information input into the batch-issue process per coin.
*/
-struct TALER_DONAU_IssueReceiptsCoinInput
+struct TALER_DONAU_BatchIssueCoinInput
{
/**
*donation unit of the coin.
@@ -1541,16 +1342,16 @@ struct TALER_DONAU_PrivateCoinDetails
/**
* Values contributed from the donau during the
- * issue_receipts protocol.
+ * batch-issue protocol.
*/
- struct TALER_DonauIssueReceiptsValues donau_vals;
+ struct TALER_DonauBatchIssueValues donau_vals;
};
/**
- * Details about a response for a issue_receipts request.
+ * Details about a response for a batch-issue request.
*/
-struct TALER_DONAU_IssueReceiptsResponse
+struct TALER_DONAU_BatchIssueResponse
{
/**
* HTTP response data.
@@ -1607,21 +1408,21 @@ struct TALER_DONAU_IssueReceiptsResponse
/**
* Callbacks of this type are used to serve the result of submitting a
- * issue_receipts request to a donau.
+ * batch-issue request to a donau.
*
* @param cls closure
* @param wr response details
*/
typedef void
-(*TALER_DONAU_IssueReceiptsCallback) (
+(*TALER_DONAU_BatchIssueCallback) (
void *cls,
- const struct TALER_DONAU_IssueReceiptsResponse *wr);
+ const struct TALER_DONAU_BatchIssueResponse *wr);
/**
- * IssueReceipts a coin from the donau using a
/reserves/$RESERVE_PUB/issueReceipts
- * request. This API is typically used by a wallet to issue_receipts from a
- * reserve.
+ * BatchIssue a coin from the donau using a
/charitys/$CHARITY_PUB/issueReceipts
+ * request. This API is typically used by a wallet to batch-issue from a
+ * charity.
*
* Note that to ensure that no money is lost in case of hardware
* failures, the caller must have committed (most of) the arguments to
@@ -1631,7 +1432,7 @@ typedef void
* @param curl_ctx The curl context to use
* @param donau_url The base-URL of the donau
* @param keys The /keys material from the donau
- * @param reserve_priv private key of the reserve to issue_receipts from
+ * @param charity_priv private key of the charity to batch-issue from
* @param wci inputs that determine the planchet
* @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
@@ -1639,37 +1440,37 @@ typedef void
* if the inputs are invalid (i.e.donation unit key not with this
donau).
* In this case, the callback is not called.
*/
-struct TALER_DONAU_IssueReceiptsHandle *
-TALER_DONAU_issue_receipts (
+struct TALER_DONAU_BatchIssueHandle *
+TALER_DONAU_batch-issue (
struct GNUNET_CURL_Context *curl_ctx,
const char *donau_url,
struct TALER_DONAU_Keys *keys,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
- const struct TALER_DONAU_IssueReceiptsCoinInput *wci,
- TALER_DONAU_IssueReceiptsCallback res_cb,
+ const struct TALER_charityPrivateKeyP *charity_priv,
+ const struct TALER_DONAU_BatchIssueCoinInput *wci,
+ TALER_DONAU_BatchIssueCallback res_cb,
void *res_cb_cls);
/**
- * Cancel a issue_receipts status request. This function cannot be used
+ * Cancel a batch-issue status request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param wh the issue_receipts handle
+ * @param wh the batch-issue handle
*/
void
-TALER_DONAU_issue_receipts_cancel (struct TALER_DONAU_IssueReceiptsHandle *wh);
+TALER_DONAU_batch-issue_cancel (struct TALER_DONAU_BatchIssueHandle *wh);
/**
- * @brief A /reserves/$RESERVE_PUB/batch-issue_receipts Handle
+ * @brief A /charitys/$CHARITY_PUB/batch-batch-issue Handle
*/
-struct TALER_DONAU_BatchIssueReceiptsHandle;
+struct TALER_DONAU_BatchBatchIssueHandle;
/**
- * Details about a response for a batch issue_receipts request.
+ * Details about a response for a batch batch-issue request.
*/
-struct TALER_DONAU_BatchIssueReceiptsResponse
+struct TALER_DONAU_BatchBatchIssueResponse
{
/**
* HTTP response data.
@@ -1688,7 +1489,7 @@ struct TALER_DONAU_BatchIssueReceiptsResponse
{
/**
- * Array of coins returned by the batch issue_receipts operation.
+ * Array of coins returned by the batch batch-issue operation.
*/
struct TALER_DONAU_PrivateCoinDetails *coins;
@@ -1738,21 +1539,21 @@ struct TALER_DONAU_BatchIssueReceiptsResponse
/**
* Callbacks of this type are used to serve the result of submitting a
- * batch issue_receipts request to a donau.
+ * batch batch-issue request to a donau.
*
* @param cls closure
* @param wr response details
*/
typedef void
-(*TALER_DONAU_BatchIssueReceiptsCallback) (
+(*TALER_DONAU_BatchBatchIssueCallback) (
void *cls,
- const struct TALER_DONAU_BatchIssueReceiptsResponse *wr);
+ const struct TALER_DONAU_BatchBatchIssueResponse *wr);
/**
- * IssueReceipts multiple coins from the donau using a
/reserves/$RESERVE_PUB/batch-withdraw
- * request. This API is typically used by a wallet to issue_receipts many
coins from a
- * reserve.
+ * BatchIssue multiple coins from the donau using a
/charitys/$CHARITY_PUB/batch-withdraw
+ * request. This API is typically used by a wallet to batch-issue many coins
from a
+ * charity.
*
* Note that to ensure that no money is lost in case of hardware
* failures, the caller must have committed (most of) the arguments to
@@ -1762,7 +1563,7 @@ typedef void
* @param curl_ctx The curl context to use
* @param donau_url The base-URL of the donau
* @param keys The /keys material from the donau
- * @param reserve_priv private key of the reserve to issue_receipts from
+ * @param charity_priv private key of the charity to batch-issue from
* @param wci_length number of entries in @a wcis
* @param wcis inputs that determine the planchets
* @param res_cb the callback to call when the final result for this request
is available
@@ -1771,33 +1572,33 @@ typedef void
* if the inputs are invalid (i.e.donation unit key not with this
donau).
* In this case, the callback is not called.
*/
-struct TALER_DONAU_BatchIssueReceiptsHandle *
-TALER_DONAU_batch_issue_receipts (
+struct TALER_DONAU_BatchBatchIssueHandle *
+TALER_DONAU_batch_batch-issue (
struct GNUNET_CURL_Context *curl_ctx,
const char *donau_url,
const struct TALER_DONAU_Keys *keys,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
+ const struct TALER_charityPrivateKeyP *charity_priv,
unsigned int wci_length,
- const struct TALER_DONAU_IssueReceiptsCoinInput wcis[static wci_length],
- TALER_DONAU_BatchIssueReceiptsCallback res_cb,
+ const struct TALER_DONAU_BatchIssueCoinInput wcis[static wci_length],
+ TALER_DONAU_BatchBatchIssueCallback res_cb,
void *res_cb_cls);
/**
- * Cancel a batch issue_receipts status request. This function cannot be used
on a
+ * Cancel a batch batch-issue status request. This function cannot be used on
a
* request handle if a response is already served for it.
*
- * @param wh the batch issue_receipts handle
+ * @param wh the batch batch-issue handle
*/
void
-TALER_DONAU_batch_issue_receipts_cancel (
- struct TALER_DONAU_BatchIssueReceiptsHandle *wh);
+TALER_DONAU_batch_batch-issue_cancel (
+ struct TALER_DONAU_BatchBatchIssueHandle *wh);
/**
* Response from a withdraw2 request.
*/
-struct TALER_DONAU_IssueReceipts2Response
+struct TALER_DONAU_BatchIssue2Response
{
/**
* HTTP response data
@@ -1825,30 +1626,30 @@ struct TALER_DONAU_IssueReceipts2Response
/**
* Callbacks of this type are used to serve the result of submitting a
- * issue_receipts request to a donau without the (un)blinding factor.
+ * batch-issue request to a donau without the (un)blinding factor.
*
* @param cls closure
* @param w2r response data
*/
typedef void
-(*TALER_DONAU_IssueReceipts2Callback) (
+(*TALER_DONAU_BatchIssue2Callback) (
void *cls,
- const struct TALER_DONAU_IssueReceipts2Response *w2r);
+ const struct TALER_DONAU_BatchIssue2Response *w2r);
/**
- * @brief A /reserves/$RESERVE_PUB/issue_receipts Handle, 2nd variant.
+ * @brief A /charitys/$CHARITY_PUB/batch-issue Handle, 2nd variant.
* This variant does not do the blinding/unblinding and only
* fetches the blind signature on the already blinded planchet.
- * Used internally by the `struct TALER_DONAU_IssueReceiptsHandle`
+ * Used internally by the `struct TALER_DONAU_BatchIssueHandle`
* implementation as well as for the tipping logic of charities.
*/
-struct TALER_DONAU_IssueReceipts2Handle;
+struct TALER_DONAU_BatchIssue2Handle;
/**
- * IssueReceipts a coin from the donau using a /reserves/$RESERVE_PUB/withdraw
- * request. This API is typically used by a charity to issue_receipts a tip
+ * BatchIssue a coin from the donau using a /charitys/$CHARITY_PUB/withdraw
+ * request. This API is typically used by a charity to batch-issue a tip
* where the blinding factor is unknown to the charity.
*
* Note that to ensure that no money is lost in case of hardware
@@ -1860,38 +1661,38 @@ struct TALER_DONAU_IssueReceipts2Handle;
* @param donau_url The base-URL of the donau
* @param keys The /keys material from the donau
* @param pd planchet details of the planchet to withdraw
- * @param reserve_priv private key of the reserve to issue_receipts from
+ * @param charity_priv private key of the charity to batch-issue from
* @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.donation unit key not with this
donau).
* In this case, the callback is not called.
*/
-struct TALER_DONAU_IssueReceipts2Handle *
-TALER_DONAU_issue_receipts2 (
+struct TALER_DONAU_BatchIssue2Handle *
+TALER_DONAU_batch-issue2 (
struct GNUNET_CURL_Context *curl_ctx,
const char *donau_url,
struct TALER_DONAU_Keys *keys,
const struct TALER_PlanchetDetail *pd,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
- TALER_DONAU_IssueReceipts2Callback res_cb,
+ const struct TALER_charityPrivateKeyP *charity_priv,
+ TALER_DONAU_BatchIssue2Callback res_cb,
void *res_cb_cls);
/**
- * Cancel a issue_receipts status request. This function cannot be used
+ * Cancel a batch-issue status request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param wh the issue_receipts handle
+ * @param wh the batch-issue handle
*/
void
-TALER_DONAU_issue_receipts2_cancel (struct TALER_DONAU_IssueReceipts2Handle
*wh);
+TALER_DONAU_batch-issue2_cancel (struct TALER_DONAU_BatchIssue2Handle *wh);
/**
- * Response from a batch-issue_receipts request (2nd variant).
+ * Response from a batch-batch-issue request (2nd variant).
*/
-struct TALER_DONAU_BatchIssueReceipts2Response
+struct TALER_DONAU_BatchBatchIssue2Response
{
/**
* HTTP response data
@@ -1926,30 +1727,30 @@ struct TALER_DONAU_BatchIssueReceipts2Response
/**
* Callbacks of this type are used to serve the result of submitting a batch
- * issue_receipts request to a donau without the (un)blinding factor.
+ * batch-issue request to a donau without the (un)blinding factor.
*
* @param cls closure
* @param bw2r response data
*/
typedef void
-(*TALER_DONAU_BatchIssueReceipts2Callback) (
+(*TALER_DONAU_BatchBatchIssue2Callback) (
void *cls,
- const struct TALER_DONAU_BatchIssueReceipts2Response *bw2r);
+ const struct TALER_DONAU_BatchBatchIssue2Response *bw2r);
/**
- * @brief A /reserves/$RESERVE_PUB/batch-issue_receipts Handle, 2nd variant.
+ * @brief A /charitys/$CHARITY_PUB/batch-batch-issue Handle, 2nd variant.
* This variant does not do the blinding/unblinding and only
* fetches the blind signatures on the already blinded planchets.
- * Used internally by the `struct TALER_DONAU_BatchIssueReceiptsHandle`
+ * Used internally by the `struct TALER_DONAU_BatchBatchIssueHandle`
* implementation as well as for the tipping logic of charities.
*/
-struct TALER_DONAU_BatchIssueReceipts2Handle;
+struct TALER_DONAU_BatchBatchIssue2Handle;
/**
- * IssueReceipts a coin from the donau using a
/reserves/$RESERVE_PUB/batch-withdraw
- * request. This API is typically used by a charity to issue_receipts a tip
+ * BatchIssue a coin from the donau using a
/charitys/$CHARITY_PUB/batch-withdraw
+ * request. This API is typically used by a charity to batch-issue a tip
* where the blinding factor is unknown to the charity.
*
* Note that to ensure that no money is lost in case of hardware
@@ -1962,747 +1763,163 @@ struct TALER_DONAU_BatchIssueReceipts2Handle;
* @param keys The /keys material from the donau
* @param pds array of planchet details of the planchet to withdraw
* @param pds_length number of entries in the @a pds array
- * @param reserve_priv private key of the reserve to issue_receipts from
+ * @param charity_priv private key of the charity to batch-issue from
* @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.donation unit key not with this
donau).
* In this case, the callback is not called.
*/
-struct TALER_DONAU_BatchIssueReceipts2Handle *
-TALER_DONAU_batch_issue_receipts2 (
+struct TALER_DONAU_BatchBatchIssue2Handle *
+TALER_DONAU_batch_batch-issue2 (
struct GNUNET_CURL_Context *curl_ctx,
const char *donau_url,
const struct TALER_DONAU_Keys *keys,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
+ const struct TALER_charityPrivateKeyP *charity_priv,
unsigned int pds_length,
const struct TALER_PlanchetDetail pds[static pds_length],
- TALER_DONAU_BatchIssueReceipts2Callback res_cb,
+ TALER_DONAU_BatchBatchIssue2Callback res_cb,
void *res_cb_cls);
/**
- * Cancel a batch issue_receipts request. This function cannot be used
+ * Cancel a batch batch-issue request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param wh the issue_receipts handle
+ * @param wh the batch-issue handle
*/
void
-TALER_DONAU_batch_issue_receipts2_cancel (
- struct TALER_DONAU_BatchIssueReceipts2Handle *wh);
-
+TALER_DONAU_batch_batch-issue2_cancel (
+ struct TALER_DONAU_BatchBatchIssue2Handle *wh);
-/* ********************* /reserve/$RESERVE_PUB/age-issue_receipts
*************** */
-
-/**
- * @brief Information needed to issue_receipts (and reveal) age restricted
coins.
- */
-struct TALER_DONAU_AgeIssueReceiptsCoinInput
-{
- /**
- * The master secret from which we derive all other relevant values for
- * the coin: private key, nonces (if applicable) and age restriction
- */
- struct TALER_PlanchetMasterSecretP secrets[TALER_CNC_KAPPA];
- /**
- * Thedonation unit of the coin. Must support age restriction, i.e
- * its .keys.age_mask MUST not be 0
- */
- struct TALER_DONAU_DonationUnitPublicKey *donation_unit_pub;
-};
+/* ********************* GET /batch-issue/ *********************** */
/**
- * All the details about a coin that are generated during age-withdrawal and
- * that may be needed for future operations on the coin.
+ * @brief A /batch-issue/ GET Handle
*/
-struct TALER_DONAU_AgeIssueReceiptsCoinPrivateDetails
-{
- /**
- * Private key of the coin.
- */
- struct TALER_CoinSpendPrivateKeyP coin_priv;
-
- /**
- * Hash of the public key of the coin.
- */
- struct TALER_CoinPubHashP h_coin_pub;
-
- /**
- * Value used to blind the key for the signature.
- * Needed for recoup operations.
- */
- union TALER_DonationUnitBlindingKeyP blinding_key;
-
- /**
- * The age commitment, proof for the coin, derived from the
- * Master secret and maximum age in the originating request
- */
- struct TALER_AgeCommitmentProof age_commitment_proof;
-
- /**
- * The hash of the age commitment
- */
- struct TALER_AgeCommitmentHash h_age_commitment;
-
- /**
- * Values contributed from the donau during the
- * issue_receipts protocol.
- */
- struct TALER_DonauIssueReceiptsValues alg_values;
-
- /**
- * The planchet constructed
- */
- struct TALER_PlanchetDetail planchet;
-};
+struct TALER_DONAU_SubmitGetHandle;
-/**
- * @brief A handle to a /reserves/$RESERVE_PUB/age-issue_receipts request
- */
-struct TALER_DONAU_AgeIssueReceiptsHandle;
/**
- * @brief Details about the response for a age issue_receipts request.
+ * Data returned for a successful GET /batch-issue/ request.
*/
-struct TALER_DONAU_AgeIssueReceiptsResponse
+struct TALER_DONAU_GetSubmitResponse
{
+
/**
* HTTP response data.
*/
struct TALER_DONAU_HttpResponse hr;
/**
- * Details about the response
+ * Details about the response.
*/
union
{
+
/**
- * Details if the status is #MHD_HTTP_OK.
+ * Response if the status was #MHD_HTTP_OK
*/
- struct
+ struct TALER_DONAU_SubmitData
{
/**
- * Index that should not be revealed during the age-issue_receipts reveal
- * phase.
+ * donau key used to sign, all zeros if donau did not
+ * yet execute the transaction
+ */
+ struct TALER_DonauPublicKeyP donau_pub;
+
+ /**
+ * signature from the donau over the data, all zeros if donau did not
+ * yet execute the transaction
+ */
+ struct TALER_DonauSignatureP donau_sig;
+
+ /**
+ * wire transfer identifier used by the donau, all zeros if donau did not
+ * yet execute the transaction
+ */
+ struct TALER_WireTransferIdentifierRawP wtid;
+
+ /**
+ * actual execution time for the wire transfer
*/
- uint8_t noreveal_index;
+ struct GNUNET_TIME_Timestamp execution_time;
/**
- * The commitment of the age-issue_receipts request, needed for the
- * subsequent call to /age-withdraw/$ACH/reveal
+ * contribution to the total amount by this coin, all zeros if donau did
not
+ * yet execute the transaction
*/
- struct TALER_AgeIssueReceiptsCommitmentHashP h_commitment;
+ struct TALER_Amount coin_contribution;
+
+ } ok;
+
+ /**
+ * Response if the status was #MHD_HTTP_ACCEPTED
+ */
+ struct
+ {
/**
- * The number of elements in @e coins, each referring to
- * TALER_CNC_KAPPA elements
+ * planned execution time for the wire transfer
*/
- size_t num_coins;
+ struct GNUNET_TIME_Timestamp execution_time;
/**
- * The computed details of the non-revealed @e num_coins coins to keep.
+ * KYC legitimization requirement that the charity should use to check
+ * for its KYC status.
*/
- const struct TALER_DONAU_AgeIssueReceiptsCoinPrivateDetails
*coin_details;
+ uint64_t requirement_row;
/**
- * The array of blinded hashes of the non-revealed
- * @e num_coins coins, needed for the reveal step;
+ * Current AML state for the account. May explain why transfers are
+ * not happening.
*/
- const struct TALER_BlindedCoinHashP *blinded_coin_hs;
+ enum TALER_AmlDecisionState aml_decision;
/**
- * Key used by the donau to sign the response.
+ * Set to 'true' if the KYC check is already finished and
+ * the donau is merely waiting for the @e execution_time.
*/
- struct TALER_DonauPublicKeyP donau_pub;
- } ok;
+ bool kyc_ok;
+ } accepted;
+
} details;
};
-typedef void
-(*TALER_DONAU_AgeIssueReceiptsCallback)(
- void *cls,
- const struct TALER_DONAU_AgeIssueReceiptsResponse *awr);
-
-/**
- * Submit an age-issue_receipts request to the donau and get the donau'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 @a rd should be committed to persistent storage
- * prior to calling this function.
- *
- * @param curl_ctx The curl context
- * @param donau_url The base url of the donau
- * @param keys Thedonation unit keys from the donau
- * @param reserve_priv The pivate key to the reserve
- * @param num_coins The number of elements in @e coin_inputs
- * @param coin_inputs The input for the coins to withdraw
- * @param max_age The maximum age we commit to.
- * @param res_cb A callback for the result, maybe NULL
- * @param res_cb_cls A closure for @e res_cb, maybe NULL
- * @return a handle for this request; NULL if the argument was invalid.
- * In this case, the callback will not be called.
- */
-struct TALER_DONAU_AgeIssueReceiptsHandle *
-TALER_DONAU_age_issue_receipts (
- struct GNUNET_CURL_Context *curl_ctx,
- struct TALER_DONAU_Keys *keys,
- const char *donau_url,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
- size_t num_coins,
- const struct TALER_DONAU_AgeIssueReceiptsCoinInput coin_inputs[static
- num_coins],
- uint8_t max_age,
- TALER_DONAU_AgeIssueReceiptsCallback res_cb,
- void *res_cb_cls);
/**
- * Cancel a age-issue_receipts request. This function cannot be used
- * on a request handle if a response is already served for it.
+ * Function called with detailed wire transfer data.
*
- * @param awh the age-issue_receipts handle
+ * @param cls closure
+ * @param dr details about the response
*/
-void
-TALER_DONAU_age_issue_receipts_cancel (
- struct TALER_DONAU_AgeIssueReceiptsHandle *awh);
-
-
-/* ********************* /refreshes/$RCH/reveal *****************************
*/
+typedef void
+(*TALER_DONAU_SubmitGetCallback)(
+ void *cls,
+ const struct TALER_DONAU_GetSubmitResponse *dr);
/**
- * Information about a coin obtained via /refreshes/$RCH/reveal.
+ * Obtain the wire transfer details for a given transaction. Tells the client
+ * which aggregate wire transfer the operation identified by @a coin_pub,
+ * @a charity_priv and @a h_contract_terms contributed to.
+ *
+ * @param ctx curl context
+ * @param url donau base URL
+ * @param keys donau keys
+ * @param charity_priv the charity's private key
+ * @param h_wire hash of charity's wire transfer details
+ * @param h_contract_terms hash of the proposal data
+ * @param coin_pub public key of the coin
+ * @param timeout timeout to use for long-polling, 0 for no long polling
+ * @param cb function to call with the result
+ * @param cb_cls closure for @a cb
+ * @return handle to abort request
*/
-struct TALER_DONAU_RevealedCoinInfo
-{
- /**
- * Private key of the coin.
- */
- struct TALER_CoinSpendPrivateKeyP coin_priv;
-
- /**
- * Master secret of this coin.
- */
- struct TALER_PlanchetMasterSecretP ps;
-
- /**
- * Age commitment and its hash of the coin, might be NULL.
- */
- struct TALER_AgeCommitmentProof *age_commitment_proof;
- struct TALER_AgeCommitmentHash h_age_commitment;
-
- /**
- * Blinding keys used to blind the fresh coin.
- */
- union TALER_DonationUnitBlindingKeyP bks;
-
- /**
- * Signature affirming the validity of the coin.
- */
- struct TALER_DonationUnitSignature sig;
-
-};
-
-
-/**
- * Result of a /refreshes/$RCH/reveal request.
- */
-struct TALER_DONAU_RevealResult
-{
- /**
- * HTTP status.
- */
- struct TALER_DONAU_HttpResponse hr;
-
- /**
- * Parsed response details, variant depending on the
- * @e hr.http_status.
- */
- union
- {
- /**
- * Results for status #MHD_HTTP_OK.
- */
- struct
- {
- /**
- * Array of @e num_coins values about the coins obtained via the refresh
- * operation. The array give the coins in the same order (and should
- * have the same length) in which the original melt request specified the
- * respectivedonation unit keys.
- */
- const struct TALER_DONAU_RevealedCoinInfo *coins;
-
- /**
- * Number of coins returned.
- */
- unsigned int num_coins;
- } ok;
-
- } details;
-
-};
-
-
-/**
- * Callbacks of this type are used to return the final result of
- * submitting a refresh request to a donau. If the operation was
- * successful, this function returns the signatures over the coins
- * that were remelted.
- *
- * @param cls closure
- * @param rr result of the reveal operation
- */
-typedef void
-(*TALER_DONAU_RefreshesRevealCallback)(
- void *cls,
- const struct TALER_DONAU_RevealResult *rr);
-
-
-/**
- * @brief A /refreshes/$RCH/reveal Handle
- */
-struct TALER_DONAU_RefreshesRevealHandle;
-
-
-/**
- * Submit a /refreshes/$RCH/reval request to the donau and get the donau'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
- * arguments should have been committed to persistent storage
- * prior to calling this function.
- *
- * @param ctx curl context
- * @param url donau base URL
- * @param rms the fresh secret that defines the refresh operation
- * @param rd the refresh data that characterizes the refresh operation
- * @param num_coins number of fresh coins to be created, length of the @a
donau_vals array, must match value in @a rd
- * @param alg_values array @a num_coins of donau values contributed to the
refresh operation
- * @param noreveal_index response from the donau to the
- * #TALER_DONAU_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_DONAU_RefreshesRevealHandle *
-TALER_DONAU_refreshes_reveal (
- struct GNUNET_CURL_Context *ctx,
- const char *url,
- const struct TALER_RefreshMasterSecretP *rms,
- const struct TALER_DONAU_RefreshData *rd,
- unsigned int num_coins,
- const struct TALER_DonauIssueReceiptsValues alg_values[static num_coins],
- uint32_t noreveal_index,
- TALER_DONAU_RefreshesRevealCallback reveal_cb,
- void *reveal_cb_cls);
-
-
-/**
- * Cancel a refresh reveal request. This function cannot be used
- * on a request handle if the callback was already invoked.
- *
- * @param rrh the refresh reval handle
- */
-void
-TALER_DONAU_refreshes_reveal_cancel (
- struct TALER_DONAU_RefreshesRevealHandle *rrh);
-
-
-/* ********************* /coins/$COIN_PUB/link ***************************** */
-
-
-/**
- * @brief A /coins/$COIN_PUB/link Handle
- */
-struct TALER_DONAU_LinkHandle;
-
-
-/**
- * Information about a coin obtained via /link.
- */
-struct TALER_DONAU_LinkedCoinInfo
-{
- /**
- * Private key of the coin.
- */
- struct TALER_CoinSpendPrivateKeyP coin_priv;
-
- /**
- * Age commitment and its hash, if applicable.
- */
- bool has_age_commitment;
- struct TALER_AgeCommitmentProof age_commitment_proof;
- struct TALER_AgeCommitmentHash h_age_commitment;
-
- /**
- * Master secret of this coin.
- */
- struct TALER_PlanchetMasterSecretP ps;
-
- /**
- * Signature affirming the validity of the coin.
- */
- struct TALER_DonationUnitSignature sig;
-
- /**
- *donation unit public key of the coin.
- */
- struct TALER_DonationUnitPublicKey pub;
-};
-
-
-/**
- * Result of a /link request.
- */
-struct TALER_DONAU_LinkResult
-{
- /**
- * HTTP status.
- */
- struct TALER_DONAU_HttpResponse hr;
-
- /**
- * Parsed response details, variant depending on the
- * @e hr.http_status.
- */
- union
- {
- /**
- * Results for status #MHD_HTTP_OK.
- */
- struct
- {
- /**
- * Array of @e num_coins values about the
- * coins obtained via linkage.
- */
- const struct TALER_DONAU_LinkedCoinInfo *coins;
-
- /**
- * Number of coins returned.
- */
- unsigned int num_coins;
- } ok;
-
- } details;
-
-};
-
-
-/**
- * Callbacks of this type are used to return the final result of submitting a
- * /coins/$COIN_PUB/link request to a donau. 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 lr result of the /link operation
- */
-typedef void
-(*TALER_DONAU_LinkCallback) (
- void *cls,
- const struct TALER_DONAU_LinkResult *lr);
-
-
-/**
- * Submit a link request to the donau and get the donau'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 ctx CURL context
- * @param url donau base URL
- * @param coin_priv private key to request link data for
- * @param age_commitment_proof age commitment to the corresponding coin, might
be NULL
- * @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_DONAU_LinkHandle *
-TALER_DONAU_link (
- struct GNUNET_CURL_Context *ctx,
- const char *url,
- const struct TALER_CoinSpendPrivateKeyP *coin_priv,
- const struct TALER_AgeCommitmentProof *age_commitment_proof,
- TALER_DONAU_LinkCallback link_cb,
- void *link_cb_cls);
-
-
-/**
- * Cancel a link request. This function cannot be used
- * on a request handle if the callback was already invoked.
- *
- * @param lh the link handle
- */
-void
-TALER_DONAU_link_cancel (struct TALER_DONAU_LinkHandle *lh);
-
-
-/* ********************* /transfers/$WTID *********************** */
-
-/**
- * @brief A /transfers/$WTID Handle
- */
-struct TALER_DONAU_TransfersGetHandle;
-
-
-/**
- * Information the donau returns per wire transfer.
- */
-struct TALER_DONAU_TransferData
-{
-
- /**
- * donau key used to sign
- */
- struct TALER_DonauPublicKeyP donau_pub;
-
- /**
- * donau signature over the transfer data
- */
- struct TALER_DonauSignatureP donau_sig;
-
- /**
- * hash of the payto:// URI the transfer went to
- */
- struct TALER_PaytoHashP h_payto;
-
- /**
- * time when the donau claims to have performed the wire transfer
- */
- struct GNUNET_TIME_Timestamp execution_time;
-
- /**
- * Actual amount of the wire transfer, excluding the wire fee.
- */
- struct TALER_Amount total_amount;
-
- /**
- * wire fee that was charged by the donau
- */
- struct TALER_Amount wire_fee;
-
- /**
- * length of the @e details array
- */
- unsigned int details_length;
-
- /**
- * array with details about the combined transactions
- */
- const struct TALER_TrackTransferDetails *details;
-
-};
-
-
-/**
- * Response for a GET /transfers request.
- */
-struct TALER_DONAU_TransfersGetResponse
-{
- /**
- * HTTP response.
- */
- struct TALER_DONAU_HttpResponse hr;
-
- /**
- * Details depending on HTTP status code.
- */
- union
- {
- /**
- * Details if status code is #MHD_HTTP_OK.
- */
- struct
- {
- struct TALER_DONAU_TransferData td;
- } ok;
-
- } details;
-};
-
-
-/**
- * Function called with detailed wire transfer data, including all
- * of the coin transactions that were combined into the wire transfer.
- *
- * @param cls closure
- * @param tgr response data
- */
-typedef void
-(*TALER_DONAU_TransfersGetCallback)(
- void *cls,
- const struct TALER_DONAU_TransfersGetResponse *tgr);
-
-
-/**
- * Query the donau about which transactions were combined
- * to create a wire transfer.
- *
- * @param ctx curl context
- * @param url donau base URL
- * @param keys donau keys
- * @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_DONAU_TransfersGetHandle *
-TALER_DONAU_transfers_get (
- struct GNUNET_CURL_Context *ctx,
- const char *url,
- struct TALER_DONAU_Keys *keys,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- TALER_DONAU_TransfersGetCallback cb,
- void *cb_cls);
-
-
-/**
- * Cancel wire deposits request. This function cannot be used on a request
- * handle if a response is already served for it.
- *
- * @param wdh the wire deposits request handle
- */
-void
-TALER_DONAU_transfers_get_cancel (
- struct TALER_DONAU_TransfersGetHandle *wdh);
-
-
-/* ********************* GET /deposits/ *********************** */
-
-
-/**
- * @brief A /deposits/ GET Handle
- */
-struct TALER_DONAU_DepositGetHandle;
-
-
-/**
- * Data returned for a successful GET /deposits/ request.
- */
-struct TALER_DONAU_GetDepositResponse
-{
-
- /**
- * HTTP response data.
- */
- struct TALER_DONAU_HttpResponse hr;
-
- /**
- * Details about the response.
- */
- union
- {
-
- /**
- * Response if the status was #MHD_HTTP_OK
- */
- struct TALER_DONAU_DepositData
- {
- /**
- * donau key used to sign, all zeros if donau did not
- * yet execute the transaction
- */
- struct TALER_DonauPublicKeyP donau_pub;
-
- /**
- * signature from the donau over the deposit data, all zeros if donau
did not
- * yet execute the transaction
- */
- struct TALER_DonauSignatureP donau_sig;
-
- /**
- * wire transfer identifier used by the donau, all zeros if donau did not
- * yet execute the transaction
- */
- struct TALER_WireTransferIdentifierRawP wtid;
-
- /**
- * actual execution time for the wire transfer
- */
- struct GNUNET_TIME_Timestamp execution_time;
-
- /**
- * contribution to the total amount by this coin, all zeros if donau did
not
- * yet execute the transaction
- */
- struct TALER_Amount coin_contribution;
-
- } ok;
-
- /**
- * Response if the status was #MHD_HTTP_ACCEPTED
- */
- struct
- {
-
- /**
- * planned execution time for the wire transfer
- */
- struct GNUNET_TIME_Timestamp execution_time;
-
- /**
- * KYC legitimization requirement that the charity should use to check
- * for its KYC status.
- */
- uint64_t requirement_row;
-
- /**
- * Current AML state for the account. May explain why transfers are
- * not happening.
- */
- enum TALER_AmlDecisionState aml_decision;
-
- /**
- * Set to 'true' if the KYC check is already finished and
- * the donau is merely waiting for the @e execution_time.
- */
- bool kyc_ok;
- } accepted;
-
- } details;
-};
-
-
-/**
- * Function called with detailed wire transfer data.
- *
- * @param cls closure
- * @param dr details about the deposit response
- */
-typedef void
-(*TALER_DONAU_DepositGetCallback)(
- void *cls,
- const struct TALER_DONAU_GetDepositResponse *dr);
-
-
-/**
- * Obtain the wire transfer details for a given transaction. Tells the client
- * which aggregate wire transfer the deposit operation identified by @a
coin_pub,
- * @a charity_priv and @a h_contract_terms contributed to.
- *
- * @param ctx curl context
- * @param url donau base URL
- * @param keys donau keys
- * @param charity_priv the charity's private key
- * @param h_wire hash of charity's wire transfer details
- * @param h_contract_terms hash of the proposal data
- * @param coin_pub public key of the coin
- * @param timeout timeout to use for long-polling, 0 for no long polling
- * @param cb function to call with the result
- * @param cb_cls closure for @a cb
- * @return handle to abort request
- */
-struct TALER_DONAU_DepositGetHandle *
-TALER_DONAU_deposits_get (
+struct TALER_DONAU_SubmitGetHandle *
+TALER_DONAU_s_get (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
@@ -2711,19 +1928,19 @@ TALER_DONAU_deposits_get (
const struct TALER_PrivateContractHashP *h_contract_terms,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
struct GNUNET_TIME_Relative timeout,
- TALER_DONAU_DepositGetCallback cb,
+ TALER_DONAU_SubmitGetCallback cb,
void *cb_cls);
/**
- * Cancel deposit wtid request. This function cannot be used on a request
+ * Cancel wtid request. This function cannot be used on a request
* handle if a response is already served for it.
*
- * @param dwh the wire deposits request handle
+ * @param dwh the wire s request handle
*/
void
-TALER_DONAU_deposits_get_cancel (
- struct TALER_DONAU_DepositGetHandle *dwh);
+TALER_DONAU_s_get_cancel (
+ struct TALER_DONAU_SubmitGetHandle *dwh);
/**
@@ -2750,10 +1967,10 @@ TALER_DONAU_verify_coin_history (
*
* @param keys donau keys
* @param history JSON array with the history
- * @param reserve_pub public key of the reserve to inspect
+ * @param charity_pub public key of the charity to inspect
* @param currency currency we expect the balance to be in
- * @param[out] total_in set to value of credits to reserve
- * @param[out] total_out set to value of debits from reserve
+ * @param[out] total_in set to value of credits to charity
+ * @param[out] total_out set to value of debits from charity
* @param history_length number of entries in @a history
* @param[out] rhistory array of length @a history_length, set to the
* parsed history entries
@@ -2762,226 +1979,28 @@ TALER_DONAU_verify_coin_history (
* #GNUNET_SYSERR if there was a protocol violation in @a history
*/
enum GNUNET_GenericReturnValue
-TALER_DONAU_parse_reserve_history (
+TALER_DONAU_parse_charity_history (
const struct TALER_DONAU_Keys *keys,
const json_t *history,
- const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_charityPublicKeyP *charity_pub,
const char *currency,
struct TALER_Amount *total_in,
struct TALER_Amount *total_out,
unsigned int history_length,
- struct TALER_DONAU_ReserveHistoryEntry rhistory[static history_length]);
+ struct TALER_DONAU_charityHistoryEntry rhistory[static history_length]);
/**
- * Free memory (potentially) allocated by #TALER_DONAU_parse_reserve_history().
+ * Free memory (potentially) allocated by #TALER_DONAU_parse_charity_history().
*
* @param len number of entries in @a rhistory
* @param[in] rhistory result to free
*/
void
-TALER_DONAU_free_reserve_history (
+TALER_DONAU_free_charity_history (
unsigned int len,
- struct TALER_DONAU_ReserveHistoryEntry rhistory[static len]);
-
-
-/* ********************* /recoup *********************** */
-
-
-/**
- * @brief A /recoup Handle
- */
-struct TALER_DONAU_RecoupHandle;
-
-
-/**
- * Response from a recoup request.
- */
-struct TALER_DONAU_RecoupResponse
-{
- /**
- * HTTP response data
- */
- struct TALER_DONAU_HttpResponse hr;
-
- /**
- * Response details depending on the HTTP status.
- */
- union
- {
- /**
- * Details if HTTP status is #MHD_HTTP_OK.
- */
- struct
- {
- /**
- * public key of the reserve receiving the recoup
- */
- struct TALER_ReservePublicKeyP reserve_pub;
-
- } ok;
- } details;
-
-};
-
-
-/**
- * Callbacks of this type are used to return the final result of
- * submitting a recoup request to a donau. If the operation was
- * successful, this function returns the @a reserve_pub of the
- * reserve that was credited.
- *
- * @param cls closure
- * @param rr response data
- */
-typedef void
-(*TALER_DONAU_RecoupResultCallback) (
- void *cls,
- const struct TALER_DONAU_RecoupResponse *rr);
-
-
-/**
- * Ask the donau to pay back a coin due to the donau triggering
- * the emergency recoup protocol for a givendonation unit. The value
- * of the coin will be refunded to the original donor (without fees).
- *
- * @param ctx curl context
- * @param url donau base URL
- * @param keys donau keys
- * @param pk kind of coin to pay back
- * @param donation_unit_sig signature over the coin by the donau using @a pk
- * @param donau_vals contribution from the donau on the withdraw
- * @param ps secret internals of the original planchet
- * @param recoup_cb the callback to call when the final result for this
request is available
- * @param recoup_cb_cls closure for @a recoup_cb
- * @return NULL
- * if the inputs are invalid (i.e.donation unit key not with this
donau).
- * In this case, the callback is not called.
- */
-struct TALER_DONAU_RecoupHandle *
-TALER_DONAU_recoup (
- struct GNUNET_CURL_Context *ctx,
- const char *url,
- struct TALER_DONAU_Keys *keys,
- const struct TALER_DONAU_DonationUnitPublicKey *pk,
- const struct TALER_DonationUnitSignature *donation_unit_sig,
- const struct TALER_DonauIssueReceiptsValues *donau_vals,
- const struct TALER_PlanchetMasterSecretP *ps,
- TALER_DONAU_RecoupResultCallback recoup_cb,
- void *recoup_cb_cls);
-
-
-/**
- * Cancel a recoup request. This function cannot be used on a
- * request handle if the callback was already invoked.
- *
- * @param ph the recoup handle
- */
-void
-TALER_DONAU_recoup_cancel (struct TALER_DONAU_RecoupHandle *ph);
-
-
-/* ********************* /recoup-refresh *********************** */
-
-
-/**
- * @brief A /recoup-refresh Handle
- */
-struct TALER_DONAU_RecoupRefreshHandle;
-
-
-/**
- * Response from a /recoup-refresh request.
- */
-struct TALER_DONAU_RecoupRefreshResponse
-{
- /**
- * HTTP response data
- */
- struct TALER_DONAU_HttpResponse hr;
-
- /**
- * Response details depending on the HTTP status.
- */
- union
- {
- /**
- * Details if HTTP status is #MHD_HTTP_OK.
- */
- struct
- {
- /**
- * public key of the dirty coin that was credited
- */
- struct TALER_CoinSpendPublicKeyP old_coin_pub;
-
- } ok;
- } details;
-
-};
-
-
-/**
- * Callbacks of this type are used to return the final result of
- * submitting a recoup-refresh request to a donau.
- *
- * @param cls closure
- * @param rrr response data
- */
-typedef void
-(*TALER_DONAU_RecoupRefreshResultCallback) (
- void *cls,
- const struct TALER_DONAU_RecoupRefreshResponse *rrr);
-
-
-/**
- * Ask the donau to pay back a coin due to the donau triggering
- * the emergency recoup protocol for a givendonation unit. The value
- * of the coin will be refunded to the original coin that the
- * revoked coin was refreshed from. The original coin is then
- * considered a zombie.
- *
- * @param ctx curl context
- * @param url donau base URL
- * @param keys donau keys
- * @param pk kind of coin to pay back
- * @param donation_unit_sig signature over the coin by the donau using @a pk
- * @param donau_vals contribution from the donau on the withdraw
- * @param rms melt secret of the refreshing operation
- * @param ps coin-specific secrets derived for this coin during the refreshing
operation
- * @param idx index of the fresh coin in the refresh operation that is now
being recouped
- * @param recoup_cb the callback to call when the final result for this
request is available
- * @param recoup_cb_cls closure for @a recoup_cb
- * @return NULL
- * if the inputs are invalid (i.e.donation unit key not with this
donau).
- * In this case, the callback is not called.
- */
-struct TALER_DONAU_RecoupRefreshHandle *
-TALER_DONAU_recoup_refresh (
- struct GNUNET_CURL_Context *ctx,
- const char *url,
- struct TALER_DONAU_Keys *keys,
- const struct TALER_DONAU_DonationUnitPublicKey *pk,
- const struct TALER_DonationUnitSignature *donation_unit_sig,
- const struct TALER_DonauIssueReceiptsValues *donau_vals,
- const struct TALER_RefreshMasterSecretP *rms,
- const struct TALER_PlanchetMasterSecretP *ps,
- unsigned int idx,
- TALER_DONAU_RecoupRefreshResultCallback recoup_cb,
- void *recoup_cb_cls);
-
-
-/**
- * Cancel a recoup-refresh request. This function cannot be used on a request
- * handle if the callback was already invoked.
- *
- * @param ph the recoup handle
- */
-void
-TALER_DONAU_recoup_refresh_cancel (
- struct TALER_DONAU_RecoupRefreshHandle *ph);
+ struct TALER_DONAU_charityHistoryEntry rhistory[static len]);
-struct TALER_DONAU_KycProofHandle;
/* ********************* /management *********************** */
@@ -3019,7 +2038,7 @@ struct TALER_DONAU_FutureSigningPublicKey
/**
- * @brief Public information about a future donau'sdonation unit key
+ * @brief Public information about a future donau's donation unit key
*/
struct TALER_DONAU_FutureDonationUnitPublicKey
{
@@ -3040,21 +2059,21 @@ struct TALER_DONAU_FutureDonationUnitPublicKey
/**
* Timestamp indicating when thedonation unit key can’t be used anymore to
- * issue_receipts new coins.
+ * batch-issue new coins.
*/
- struct GNUNET_TIME_Timestamp issue_receipts_valid_until;
+ struct GNUNET_TIME_Timestamp batch-issue_valid_until;
/**
* Timestamp indicating when coins of thisdonation unit become invalid.
*/
- struct GNUNET_TIME_Timestamp expire_deposit;
+ struct GNUNET_TIME_Timestamp expire_;
/**
* When do signatures with thisdonation unit key become invalid?
* After this point, these signatures cannot be used in (legal)
* disputes anymore, as the Donau is then allowed to destroy its side
* of the evidence. @e expire_legal is expected to be significantly
- * larger than @e expire_deposit (by a year or more).
+ * larger than @e expire_ (by a year or more).
*/
struct GNUNET_TIME_Timestamp expire_legal;
@@ -3066,12 +2085,12 @@ struct TALER_DONAU_FutureDonationUnitPublicKey
/**
* The applicable fee for withdrawing a coin of thisdonation unit
*/
- struct TALER_Amount fee_issue_receipts;
+ struct TALER_Amount fee_batch-issue;
/**
* The applicable fee to spend a coin of thisdonation unit
*/
- struct TALER_Amount fee_deposit;
+ struct TALER_Amount fee_;
/**
* The applicable fee to melt/refresh a coin of thisdonation unit
@@ -4463,7 +3482,7 @@ struct TALER_DONAU_ManagementSetGlobalFeeHandle;
* @param validity_end end date for the provided wire fees
* @param fees the wire fees for this time period
* @param purse_timeout when do purses time out
- * @param history_expiration how long are account histories preserved
+ * @param history_expiration how long are account histories pcharityd
* @param purse_account_limit how many purses are free per account
* @param master_sig signature affirming the wire fees;
* of purpose #TALER_SIGNATURE_MASTER_GLOBAL_FEES
@@ -4681,15 +3700,15 @@ struct TALER_DONAU_PurseGetResponse
struct GNUNET_TIME_Timestamp merge_timestamp;
/**
- * Time when the full amount was deposited into
+ * Time when the full amount was ed into
* the purse (or zero if a sufficient amount
- * was not yet deposited).
+ * was not yet ed).
*/
- struct GNUNET_TIME_Timestamp deposit_timestamp;
+ struct GNUNET_TIME_Timestamp _timestamp;
/**
- * Reserve balance (how much was deposited in
- * total into the reserve, minus deposit fees).
+ * charity balance (how much was ed in
+ * total into the charity, minus fees).
*/
struct TALER_Amount balance;
@@ -4731,7 +3750,7 @@ struct TALER_DONAU_PurseGetHandle;
* @param keys donau keys
* @param purse_pub public key of the purse
* @param timeout how long to wait for a change to happen
- * @param wait_for_merge true to wait for a merge event, otherwise wait for a
deposit event
+ * @param wait_for_merge true to wait for a merge event, otherwise wait for a
event
* @param cb function to call with the donau's result
* @param cb_cls closure for @a cb
* @return the request handle; NULL upon error
@@ -4761,7 +3780,7 @@ TALER_DONAU_purse_get_cancel (
/**
* Response generated for a purse creation request.
*/
-struct TALER_DONAU_PurseCreateDepositResponse
+struct TALER_DONAU_PurseCreateSubmitResponse
{
/**
* Full HTTP response.
@@ -4781,13 +3800,13 @@ struct TALER_DONAU_PurseCreateDepositResponse
{
/**
* Signing key used by the donau to sign the
- * purse create with deposit confirmation.
+ * purse create with confirmation.
*/
struct TALER_DonauPublicKeyP donau_pub;
/**
* Signature from the donau on the
- * purse create with deposit confirmation.
+ * purse create with confirmation.
*/
struct TALER_DonauSignatureP donau_sig;
@@ -4806,21 +3825,21 @@ struct TALER_DONAU_PurseCreateDepositResponse
* @param pcr HTTP response data
*/
typedef void
-(*TALER_DONAU_PurseCreateDepositCallback) (
+(*TALER_DONAU_PurseCreateSubmitCallback) (
void *cls,
- const struct TALER_DONAU_PurseCreateDepositResponse *pcr);
+ const struct TALER_DONAU_PurseCreateSubmitResponse *pcr);
/**
* @brief Handle for a POST /purses/$PID/create request.
*/
-struct TALER_DONAU_PurseCreateDepositHandle;
+struct TALER_DONAU_PurseCreateSubmitHandle;
/**
- * Information about a coin to be deposited into a purse or reserve.
+ * Information about a coin to be ed into a purse or charity.
*/
-struct TALER_DONAU_PurseDeposit
+struct TALER_DONAU_PurseSubmit
{
/**
* Age commitment data, might be NULL.
@@ -4852,7 +3871,7 @@ struct TALER_DONAU_PurseDeposit
/**
* Inform the donau that a purse should be created
- * and coins deposited into it.
+ * and coins ed into it.
*
* @param ctx curl context
* @param url donau base URL
@@ -4861,17 +3880,17 @@ struct TALER_DONAU_PurseDeposit
* @param merge_priv the merge credential
* @param contract_priv key needed to obtain and decrypt the contract
* @param contract_terms contract the purse is about
- * @param num_deposits length of the @a deposits array
- * @param deposits array of deposits to make into the purse
+ * @param num_s length of the @a deposits array
+ * @param s array of deposits to make into the purse
* @param upload_contract true to upload the contract; must
* be FALSE for repeated calls to this API for the
- * same purse (i.e. when adding more deposits).
+ * same purse (i.e. when adding more s).
* @param cb function to call with the donau's result
* @param cb_cls closure for @a cb
* @return the request handle; NULL upon error
*/
-struct TALER_DONAU_PurseCreateDepositHandle *
-TALER_DONAU_purse_create_with_deposit (
+struct TALER_DONAU_PurseCreateSubmitHandle *
+TALER_DONAU_purse_create_with_ (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
@@ -4879,21 +3898,21 @@ TALER_DONAU_purse_create_with_deposit (
const struct TALER_PurseMergePrivateKeyP *merge_priv,
const struct TALER_ContractDiffiePrivateP *contract_priv,
const json_t *contract_terms,
- unsigned int num_deposits,
- const struct TALER_DONAU_PurseDeposit deposits[static num_deposits],
+ unsigned int num_s,
+ const struct TALER_DONAU_PurseSubmit s[static num_deposits],
bool upload_contract,
- TALER_DONAU_PurseCreateDepositCallback cb,
+ TALER_DONAU_PurseCreateSubmitCallback cb,
void *cb_cls);
/**
- * Cancel #TALER_DONAU_purse_create_with_deposit() operation.
+ * Cancel #TALER_DONAU_purse_create_with_() operation.
*
* @param pch handle of the operation to cancel
*/
void
-TALER_DONAU_purse_create_with_deposit_cancel (
- struct TALER_DONAU_PurseCreateDepositHandle *pch);
+TALER_DONAU_purse_create_with__cancel (
+ struct TALER_DONAU_PurseCreateSubmitHandle *pch);
/**
@@ -4968,9 +3987,9 @@ struct TALER_DONAU_AccountMergeResponse
struct TALER_DONAU_HttpResponse hr;
/**
- * Reserve signature affirming the merge.
+ * charity signature affirming the merge.
*/
- const struct TALER_ReserveSignatureP *reserve_sig;
+ const struct TALER_charitySignatureP *charity_sig;
/**
* Details depending on the HTTP status.
@@ -5036,17 +4055,17 @@ struct TALER_DONAU_AccountMergeHandle;
/**
* Inform the donau that a purse should be merged
- * with a reserve.
+ * with a charity.
*
* @param ctx curl context
* @param url donau base URL
* @param keys donau keys
- * @param reserve_donau_url base URL of the donau with the reserve
- * @param reserve_priv private key of the reserve to merge into
+ * @param charity_donau_url base URL of the donau with the charity
+ * @param charity_priv private key of the charity to merge into
* @param purse_pub public key of the purse to merge
* @param merge_priv private key granting us the right to merge
* @param h_contract_terms hash of the purses' contract
- * @param min_age minimum age of deposits into the purse
+ * @param min_age minimum age of s into the purse
* @param purse_value_after_fees amount that should be in the purse
* @param purse_expiration when will the purse expire
* @param merge_timestamp when is the merge happening (current time)
@@ -5059,8 +4078,8 @@ TALER_DONAU_account_merge (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
- const char *reserve_donau_url,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
+ const char *charity_donau_url,
+ const struct TALER_charityPrivateKeyP *charity_priv,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseMergePrivateKeyP *merge_priv,
const struct TALER_PrivateContractHashP *h_contract_terms,
@@ -5093,10 +4112,10 @@ struct TALER_DONAU_PurseCreateMergeResponse
struct TALER_DONAU_HttpResponse hr;
/**
- * Reserve signature generated for the request
+ * charity signature generated for the request
* (client-side).
*/
- const struct TALER_ReserveSignatureP *reserve_sig;
+ const struct TALER_charitySignatureP *charity_sig;
/**
* Details depending on the HTTP status.
@@ -5141,19 +4160,19 @@ typedef void
/**
- * @brief Handle for a POST /reserves/$RID/purse request.
+ * @brief Handle for a POST /charitys/$RID/purse request.
*/
struct TALER_DONAU_PurseCreateMergeHandle;
/**
* Inform the donau that a purse should be created
- * and merged with a reserve.
+ * and merged with a charity.
*
* @param ctx curl context
* @param url donau base URL
* @param keys donau keys
- * @param reserve_priv private key of the reserve
+ * @param charity_priv private key of the charity
* @param purse_priv private key of the purse
* @param merge_priv private key of the merge capability
* @param contract_priv private key to get the contract
@@ -5170,7 +4189,7 @@ TALER_DONAU_purse_create_with_merge (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
+ const struct TALER_charityPrivateKeyP *charity_priv,
const struct TALER_PurseContractPrivateKeyP *purse_priv,
const struct TALER_PurseMergePrivateKeyP *merge_priv,
const struct TALER_ContractDiffiePrivateP *contract_priv,
@@ -5193,9 +4212,9 @@ TALER_DONAU_purse_create_with_merge_cancel (
/**
- * Response generated for purse deposit request.
+ * Response generated for purse request.
*/
-struct TALER_DONAU_PurseDepositResponse
+struct TALER_DONAU_PurseSubmitResponse
{
/**
* Full HTTP response.
@@ -5219,9 +4238,9 @@ struct TALER_DONAU_PurseDepositResponse
struct GNUNET_TIME_Timestamp purse_expiration;
/**
- * How much was actually deposited into the purse.
+ * How much was actually ed into the purse.
*/
- struct TALER_Amount total_deposited;
+ struct TALER_Amount total_ed;
/**
* How much should be in the purse in total in the end.
@@ -5239,26 +4258,26 @@ struct TALER_DONAU_PurseDepositResponse
};
/**
- * Function called with information about a purse-deposit
+ * Function called with information about a purse-
* operation.
*
* @param cls closure
* @param pdr HTTP response data
*/
typedef void
-(*TALER_DONAU_PurseDepositCallback) (
+(*TALER_DONAU_PurseSubmitCallback) (
void *cls,
- const struct TALER_DONAU_PurseDepositResponse *pdr);
+ const struct TALER_DONAU_PurseSubmitResponse *pdr);
/**
- * @brief Handle for a POST /purses/$PID/deposit request.
+ * @brief Handle for a POST /purses/$PID/ request.
*/
-struct TALER_DONAU_PurseDepositHandle;
+struct TALER_DONAU_PurseSubmitHandle;
/**
- * Inform the donau that a deposit should be made into
+ * Inform the donau that a should be made into
* a purse.
*
* @param ctx curl context
@@ -5267,49 +4286,49 @@ struct TALER_DONAU_PurseDepositHandle;
* @param purse_donau_url base URL of the donau hosting the purse
* @param purse_pub public key of the purse to merge
* @param min_age minimum age we need to prove for the purse
- * @param num_deposits length of the @a deposits array
- * @param deposits array of deposits to make into the purse
+ * @param num_s length of the @a deposits array
+ * @param s array of deposits to make into the purse
* @param cb function to call with the donau's result
* @param cb_cls closure for @a cb
* @return the request handle; NULL upon error
*/
-struct TALER_DONAU_PurseDepositHandle *
-TALER_DONAU_purse_deposit (
+struct TALER_DONAU_PurseSubmitHandle *
+TALER_DONAU_purse_ (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
const char *purse_donau_url,
const struct TALER_PurseContractPublicKeyP *purse_pub,
uint8_t min_age,
- unsigned int num_deposits,
- const struct TALER_DONAU_PurseDeposit deposits[static num_deposits],
- TALER_DONAU_PurseDepositCallback cb,
+ unsigned int num_s,
+ const struct TALER_DONAU_PurseSubmit s[static num_deposits],
+ TALER_DONAU_PurseSubmitCallback cb,
void *cb_cls);
/**
- * Cancel #TALER_DONAU_purse_deposit() operation.
+ * Cancel #TALER_DONAU_purse_() operation.
*
* @param amh handle of the operation to cancel
*/
void
-TALER_DONAU_purse_deposit_cancel (
- struct TALER_DONAU_PurseDepositHandle *amh);
+TALER_DONAU_purse__cancel (
+ struct TALER_DONAU_PurseSubmitHandle *amh);
-/* ********************* /reserves/$RID/open *********************** */
+/* ********************* /charitys/$RID/open *********************** */
/**
- * @brief A /reserves/$RID/open Handle
+ * @brief A /charitys/$RID/open Handle
*/
-struct TALER_DONAU_ReservesOpenHandle;
+struct TALER_DONAU_charitysOpenHandle;
/**
- * @brief Reserve open result details.
+ * @brief charity open result details.
*/
-struct TALER_DONAU_ReserveOpenResult
+struct TALER_DONAU_charityOpenResult
{
/**
@@ -5349,7 +4368,7 @@ struct TALER_DONAU_ReserveOpenResult
struct
{
/**
- * Current expiration time of the reserve.
+ * Current expiration time of the charity.
*/
struct GNUNET_TIME_Timestamp expiration_time;
@@ -5387,74 +4406,74 @@ struct TALER_DONAU_ReserveOpenResult
/**
* Callbacks of this type are used to serve the result of submitting a
- * reserve open request to a donau.
+ * charity open request to a donau.
*
* @param cls closure
* @param ror HTTP response data
*/
typedef void
-(*TALER_DONAU_ReservesOpenCallback) (
+(*TALER_DONAU_charitysOpenCallback) (
void *cls,
- const struct TALER_DONAU_ReserveOpenResult *ror);
+ const struct TALER_DONAU_charityOpenResult *ror);
/**
- * Submit a request to open a reserve.
+ * Submit a request to open a charity.
*
* @param ctx curl context
* @param url donau base URL
* @param keys donau keys
- * @param reserve_priv private key of the reserve to open
- * @param reserve_contribution amount to pay from the reserve's balance for
the operation
+ * @param charity_priv private key of the charity to open
+ * @param charity_contribution amount to pay from the charity's balance for
the operation
* @param coin_payments_length length of the @a coin_payments array
- * @param coin_payments array of coin payments to use for opening the reserve
- * @param expiration_time desired new expiration time for the reserve
- * @param min_purses minimum number of purses to allow being concurrently
opened per reserve
+ * @param coin_payments array of coin payments to use for opening the charity
+ * @param expiration_time desired new expiration time for the charity
+ * @param min_purses minimum number of purses to allow being concurrently
opened per charity
* @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_DONAU_ReservesOpenHandle *
-TALER_DONAU_reserves_open (
+struct TALER_DONAU_charitysOpenHandle *
+TALER_DONAU_charitys_open (
struct GNUNET_CURL_Context *ctx,
const char *url,
struct TALER_DONAU_Keys *keys,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
- const struct TALER_Amount *reserve_contribution,
+ const struct TALER_charityPrivateKeyP *charity_priv,
+ const struct TALER_Amount *charity_contribution,
unsigned int coin_payments_length,
- const struct TALER_DONAU_PurseDeposit coin_payments[
+ const struct TALER_DONAU_PurseSubmit coin_payments[
static coin_payments_length],
struct GNUNET_TIME_Timestamp expiration_time,
uint32_t min_purses,
- TALER_DONAU_ReservesOpenCallback cb,
+ TALER_DONAU_charitysOpenCallback cb,
void *cb_cls);
/**
- * Cancel a reserve status request. This function cannot be used
+ * Cancel a charity status request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param[in] roh the reserve open request handle
+ * @param[in] roh the charity open request handle
*/
void
-TALER_DONAU_reserves_open_cancel (
- struct TALER_DONAU_ReservesOpenHandle *roh);
+TALER_DONAU_charitys_open_cancel (
+ struct TALER_DONAU_charitysOpenHandle *roh);
-/* ********************* /reserves/$RID/attest *********************** */
+/* ********************* /charitys/$RID/attest *********************** */
/**
- * @brief A Get /reserves/$RID/attest Handle
+ * @brief A Get /charitys/$RID/attest Handle
*/
-struct TALER_DONAU_ReservesGetAttestHandle;
+struct TALER_DONAU_charitysGetAttestHandle;
/**
- * @brief Reserve GET attest result details.
+ * @brief charity GET attest result details.
*/
-struct TALER_DONAU_ReserveGetAttestResult
+struct TALER_DONAU_charityGetAttestResult
{
/**
@@ -5494,34 +4513,34 @@ struct TALER_DONAU_ReserveGetAttestResult
/**
* Callbacks of this type are used to serve the result of submitting a
- * reserve attest request to a donau.
+ * charity attest request to a donau.
*
* @param cls closure
* @param ror HTTP response data
*/
typedef void
-(*TALER_DONAU_ReservesGetAttestCallback) (
+(*TALER_DONAU_charitysGetAttestCallback) (
void *cls,
- const struct TALER_DONAU_ReserveGetAttestResult *ror);
+ const struct TALER_DONAU_charityGetAttestResult *ror);
/**
- * Submit a request to get the list of attestable attributes for a reserve.
+ * Submit a request to get the list of attestable attributes for a charity.
*
* @param ctx CURL context
* @param url donau base URL
- * @param reserve_pub public key of the reserve to get available attributes for
+ * @param charity_pub public key of the charity to get available attributes for
* @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_DONAU_ReservesGetAttestHandle *
-TALER_DONAU_reserves_get_attestable (
+struct TALER_DONAU_charitysGetAttestHandle *
+TALER_DONAU_charitys_get_attestable (
struct GNUNET_CURL_Context *ctx,
const char *url,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- TALER_DONAU_ReservesGetAttestCallback cb,
+ const struct TALER_charityPublicKeyP *charity_pub,
+ TALER_DONAU_charitysGetAttestCallback cb,
void *cb_cls);
@@ -5529,23 +4548,23 @@ TALER_DONAU_reserves_get_attestable (
* Cancel a request to get attestable attributes. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param rgah the reserve get attestable request handle
+ * @param rgah the charity get attestable request handle
*/
void
-TALER_DONAU_reserves_get_attestable_cancel (
- struct TALER_DONAU_ReservesGetAttestHandle *rgah);
+TALER_DONAU_charitys_get_attestable_cancel (
+ struct TALER_DONAU_charitysGetAttestHandle *rgah);
/**
- * @brief A POST /reserves/$RID/attest Handle
+ * @brief A POST /charitys/$RID/attest Handle
*/
-struct TALER_DONAU_ReservesPostAttestHandle;
+struct TALER_DONAU_charitysPostAttestHandle;
/**
- * @brief Reserve attest result details.
+ * @brief charity attest result details.
*/
-struct TALER_DONAU_ReservePostAttestResult
+struct TALER_DONAU_charityPostAttestResult
{
/**
@@ -5599,23 +4618,23 @@ struct TALER_DONAU_ReservePostAttestResult
/**
* Callbacks of this type are used to serve the result of submitting a
- * reserve attest request to a donau.
+ * charity attest request to a donau.
*
* @param cls closure
* @param ror HTTP response data
*/
typedef void
-(*TALER_DONAU_ReservesPostAttestCallback) (
+(*TALER_DONAU_charitysPostAttestCallback) (
void *cls,
- const struct TALER_DONAU_ReservePostAttestResult *ror);
+ const struct TALER_DONAU_charityPostAttestResult *ror);
/**
- * Submit a request to attest attributes about the owner of a reserve.
+ * Submit a request to attest attributes about the owner of a charity.
*
* @param ctx CURL context
* @param url donau base URL
- * @param reserve_priv private key of the reserve to attest
+ * @param charity_priv private key of the charity to attest
* @param attributes_length length of the @a attributes array
* @param attributes array of names of attributes to get attestations for
* @param cb the callback to call when a reply for this request is available
@@ -5623,41 +4642,41 @@ typedef void
* @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_DONAU_ReservesAttestHandle *
-TALER_DONAU_reserves_attest (
+struct TALER_DONAU_charitysAttestHandle *
+TALER_DONAU_charitys_attest (
struct GNUNET_CURL_Context *ctx,
const char *url,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
+ const struct TALER_charityPrivateKeyP *charity_priv,
unsigned int attributes_length,
const char *attributes[const static attributes_length],
- TALER_DONAU_ReservesPostAttestCallback cb,
+ TALER_DONAU_charitysPostAttestCallback cb,
void *cb_cls);
/**
- * Cancel a reserve attestation request. This function cannot be used
+ * Cancel a charity attestation request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param rah the reserve attest request handle
+ * @param rah the charity attest request handle
*/
void
-TALER_DONAU_reserves_attest_cancel (
- struct TALER_DONAU_ReservesAttestHandle *rah);
+TALER_DONAU_charitys_attest_cancel (
+ struct TALER_DONAU_charitysAttestHandle *rah);
-/* ********************* /reserves/$RID/close *********************** */
+/* ********************* /charitys/$RID/close *********************** */
/**
- * @brief A /reserves/$RID/close Handle
+ * @brief A /charitys/$RID/close Handle
*/
-struct TALER_DONAU_ReservesCloseHandle;
+struct TALER_DONAU_charitysCloseHandle;
/**
- * @brief Reserve close result details.
+ * @brief charity close result details.
*/
-struct TALER_DONAU_ReserveCloseResult
+struct TALER_DONAU_charityCloseResult
{
/**
@@ -5710,47 +4729,47 @@ struct TALER_DONAU_ReserveCloseResult
/**
* Callbacks of this type are used to serve the result of submitting a
- * reserve close request to a donau.
+ * charity close request to a donau.
*
* @param cls closure
* @param ror HTTP response data
*/
typedef void
-(*TALER_DONAU_ReservesCloseCallback) (
+(*TALER_DONAU_charitysCloseCallback) (
void *cls,
- const struct TALER_DONAU_ReserveCloseResult *ror);
+ const struct TALER_DONAU_charityCloseResult *ror);
/**
- * Submit a request to close a reserve.
+ * Submit a request to close a charity.
*
* @param ctx curl context
* @param url donau base URL
- * @param reserve_priv private key of the reserve to close
- * @param target_payto_uri where to send the payment, NULL to send to reserve
origin
+ * @param charity_priv private key of the charity to close
+ * @param target_payto_uri where to send the payment, NULL to send to charity
origin
* @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_DONAU_ReservesCloseHandle *
-TALER_DONAU_reserves_close (
+struct TALER_DONAU_charitysCloseHandle *
+TALER_DONAU_charitys_close (
struct GNUNET_CURL_Context *ctx,
const char *url,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
+ const struct TALER_charityPrivateKeyP *charity_priv,
const char *target_payto_uri,
- TALER_DONAU_ReservesCloseCallback cb,
+ TALER_DONAU_charitysCloseCallback cb,
void *cb_cls);
/**
- * Cancel a reserve status request. This function cannot be used
+ * Cancel a charity status request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param rch the reserve request handle
+ * @param rch the charity request handle
*/
void
-TALER_DONAU_reserves_close_cancel (
- struct TALER_DONAU_ReservesCloseHandle *rch);
+TALER_DONAU_charitys_close_cancel (
+ struct TALER_DONAU_charitysCloseHandle *rch);
#endif /* _TALER_DONAU_SERVICE_H */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-donau] branch master updated: [header] try to map api,
gnunet <=