donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

insert_issued_receipt.h (1799B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 2023 Taler Systems SA
      4 
      5    TALER is free software; you can redistribute it and/or modify it under the
      6    terms of the GNU General Public License as published by the Free Software
      7    Foundation; either version 3, or (at your option) any later version.
      8 
      9    TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11    A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     12 
     13    You should have received a copy of the GNU General Public License along with
     14    TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15  */
     16 /**
     17  * @file src/include/donau-database/insert_issued_receipt.h
     18  * @brief implementation of the insert_issued_receipt function for Postgres
     19  * @author Johannes Casaburi
     20  */
     21 #ifndef DONAU_DATABASE_INSERT_ISSUED_RECEIPT_H
     22 #define DONAU_DATABASE_INSERT_ISSUED_RECEIPT_H
     23 
     24 #include "donaudb_lib.h"
     25 
     26 
     27 /**
     28  * Insert issued blinded donation receipt to the charity.
     29  *
     30  * @param cls closure
     31  * @param num_blinded_sig
     32  * @param signatures blinded signatures
     33  * @param charity_id identifier of the charity
     34  * @param h_receipt hash of the donation receipt
     35  * @param amount_receipts_request donation amount
     36  * @param smaller_than_max_per_year new receipts to day smaller than the max?
     37  * @return transaction status code
     38  */
     39 enum GNUNET_DB_QueryStatus
     40 DONAUDB_insert_issued_receipt (
     41   struct DONAUDB_PostgresContext *ctx,
     42   const size_t num_blinded_sig,
     43   const struct DONAU_BlindedDonationUnitSignature signatures[num_blinded_sig],
     44   const uint64_t charity_id,
     45   const struct DONAU_DonationReceiptHashP *h_receipt,
     46   const struct TALER_Amount *amount_receipts_request,
     47   bool *smaller_than_max_per_year);
     48 
     49 #endif