[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: [header] try to map api 2
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: [header] try to map api 2 |
Date: |
Tue, 10 Oct 2023 11:18:13 +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 d1095d8 [header] try to map api 2
d1095d8 is described below
commit d1095d824f8da80db82de6355869c6052215fcc1
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Tue Oct 10 11:18:06 2023 +0200
[header] try to map api 2
---
src/include/taler_donau_service.h | 273 +++++---------------------------------
1 file changed, 30 insertions(+), 243 deletions(-)
diff --git a/src/include/taler_donau_service.h
b/src/include/taler_donau_service.h
index 7993462..a73b736 100644
--- a/src/include/taler_donau_service.h
+++ b/src/include/taler_donau_service.h
@@ -502,12 +502,12 @@ struct TALER_DONAU_BatchSubmitResult
/**
* Eddsa signature provided by the donau
*/
- const struct TALER_DonauSignatureP donau_sigs;
+ const struct TALER_DonauSignatureP donau_sig;
/**
* total amount over all donation receipts of a year specified by the
request.
*/
- const struct TALER_Amount donau_amount
+ const struct TALER_Amount total_amount
} ok;
@@ -660,8 +660,8 @@ typedef void
* 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
- * @param pk Whichdonation unit key is the /csr request for
+ * @param donau_url Base-URL to the donau
+ * @param pk Which donation unit key is the /csr request for
* @param nonce client nonce for the request
* @param res_cb the callback to call when the final result for this request
is available
* @param res_cb_cls closure for the above callback
@@ -694,11 +694,15 @@ TALER_DONAU_csr_batch-issue_cancel (
/* ********************* GET /charities/$CHARITY_ID *********************** */
/**
- * actual information about a charity
+ * information about a charity for a specific year
*/
-struct TALER_DONAU_CHARITY
+struct TALER_DONAU_CHARITY_YEAR
{
-
+ /**
+ * year of validity.
+ */
+ unsigned int year;
+
/**
* charity id.
*/
@@ -707,261 +711,44 @@ struct TALER_DONAU_CHARITY
/**
* max allowed donation amount per year.
*/
- struct Taler_Amount amount;
+ struct Taler_Amount max_amount;
/**
* total donation amount for the current year
*/
+ struct Taler_Amount current_amount;
+
}
/**
- * @brief Entry in the charity's transaction history.
+ * Charity issue receipt transaction.
*/
-struct TALER_DONAU_charityHistoryEntry
+struct CharityIssueReceiptTransaction
{
-
/**
- * Type of the transaction.
+ * Amount issued.
*/
- enum TALER_DONAU_charityTransactionType type;
+ struct TALER_Amount amount;
/**
- * Amount transferred (in or out).
+ * Year of validity.
*/
- struct TALER_Amount amount;
+ unsigned int year;
/**
- * Details depending on @e type.
+ * Hash of the BDIDs to be signed
*/
- union
- {
-
- /**
- * Information about a that filled this charity.
- * @e type is #TALER_DONAU_RTT_CREDIT.
- */
- struct
- {
- /**
- * Sender account payto://-URL of the incoming transfer.
- */
- char *sender_url;
-
- /**
- * Information that uniquely identifies the wire transfer.
- */
- uint64_t wire_reference;
-
- /**
- * When did the wire transfer happen?
- */
- struct GNUNET_TIME_Timestamp timestamp;
-
- } in_details;
-
- /**
- * Information about batch-issue operation.
- * @e type is #TALER_DONAU_RTT_WITHDRAWAL.
- */
- struct
- {
- /**
- * Signature authorizing the withdrawal for outgoing transaction.
- */
- json_t *out_authorization_sig;
-
- } withdraw;
-
- /**
- * Information about a close operation of the charity.
- * @e type is #TALER_DONAU_RTT_CLOSE.
- */
- struct
- {
- /**
- * Receiver account information for the outgoing wire transfer.
- */
- const char *receiver_account_details;
-
- /**
- * Wire transfer details for the outgoing wire transfer.
- */
- struct TALER_WireTransferIdentifierRawP wtid;
-
- /**
- * Signature of the coin of type
- * #TALER_SIGNATURE_DONAU_CHARITY_CLOSED.
- */
- 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 wire transfer happen?
- */
- struct GNUNET_TIME_Timestamp timestamp;
-
- /**
- * Fee that was charged for the closing.
- */
- struct TALER_Amount fee;
-
- } close_details;
-
- /**
- * Information about a history operation of the charity.
- * @e type is #TALER_DONAU_RTT_HISTORY.
- */
- struct
- {
-
- /**
- * When was the request made.
- */
- struct GNUNET_TIME_Timestamp request_timestamp;
-
- /**
- * Signature by the charity approving the history request.
- */
- struct TALER_charitySignatureP charity_sig;
-
- } history_details;
-
- /**
- * Information about a merge operation on the charity.
- * @e type is #TALER_DONAU_RTT_MERGE.
- */
- struct
- {
-
- /**
- * Fee paid for the purse.
- */
- struct TALER_Amount purse_fee;
+ struct TALER_EnvelopeHash h_blinded_bdids;
- /**
- * Hash over the contract.
- */
- struct TALER_PrivateContractHashP h_contract_terms;
-
- /**
- * Merge capability key.
- */
- struct TALER_PurseMergePublicKeyP merge_pub;
-
- /**
- * Purse public key.
- */
- struct TALER_PurseContractPublicKeyP purse_pub;
-
- /**
- * Signature by the charity approving the merge.
- */
- struct TALER_charitySignatureP charity_sig;
-
- /**
- * When was the merge made.
- */
- struct GNUNET_TIME_Timestamp merge_timestamp;
-
- /**
- * When was the purse set to expire.
- */
- struct GNUNET_TIME_Timestamp purse_expiration;
-
- /**
- * Minimum age required for ing into the purse.
- */
- uint32_t min_age;
-
- /**
- * Flags of the purse.
- */
- enum TALER_WalletAccountMergeFlags flags;
-
- /**
- * True if the purse was actually merged, false
- * if only the @e purse_fee was charged.
- */
- bool merged;
-
- } merge_details;
-
- /**
- * Information about an open request operation on the charity.
- * @e type is #TALER_DONAU_RTT_OPEN.
- */
- struct
- {
-
- /**
- * Signature by the charity approving the open.
- */
- struct TALER_charitySignatureP charity_sig;
-
- /**
- * Amount to be paid from the charity balance to open
- * the charity.
- */
- struct TALER_Amount charity_payment;
-
- /**
- * When was the request created.
- */
- struct GNUNET_TIME_Timestamp request_timestamp;
-
- /**
- * For how long should the charity be kept open.
- * (Determines amount to be paid.)
- */
- struct GNUNET_TIME_Timestamp charity_expiration;
-
- /**
- * How many open purses should be included with the
- * open charity?
- * (Determines amount to be paid.)
- */
- uint32_t purse_limit;
-
- } open_request;
-
- /**
- * Information about an close request operation on the charity.
- * @e type is #TALER_DONAU_RTT_CLOSE.
- */
- struct
- {
-
- /**
- * Signature by the charity approving the close.
- */
- struct TALER_charitySignatureP charity_sig;
-
- /**
- * When was the request created.
- */
- struct GNUNET_TIME_Timestamp request_timestamp;
-
- /**
- * Hash of the payto://-URI of the target account
- * for the closure, or all zeros for the charity
- * origin account.
- */
- struct TALER_PaytoHashP target_account_h_payto;
-
- } close_request;
-
-
- } details;
-
-};
+ /**
+ * Charity's eddsa signature.
+ */
+ struct TALER_DonauSignatureP donau_sig;
+}
/**
- * @brief A /charitys/ GET Handle
+ * @brief A /charities/ GET Handle
*/
struct TALER_DONAU_charitysGetHandle;
@@ -991,9 +778,9 @@ struct TALER_DONAU_charitySummary
{
/**
- * charity balance.
+ * Charity status information.
*/
- struct TALER_Amount balance;
+ struct struct TALER_DONAU_CHARITY_YEAR charity_info;
} ok;
--
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 2,
gnunet <=