exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

taler-exchange-httpd_reserves_purse.h (1747B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2022 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero 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 Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 */
     16 /**
     17  * @file taler-exchange-httpd_reserves_purse.h
     18  * @brief Handle /reserves/$RID/purse requests
     19  * @author Christian Grothoff
     20  */
     21 #ifndef TALER_EXCHANGE_HTTPD_RESERVES_PURSE_H
     22 #define TALER_EXCHANGE_HTTPD_RESERVES_PURSE_H
     23 
     24 #include <gnunet/gnunet_util_lib.h>
     25 #include <microhttpd.h>
     26 #include "taler-exchange-httpd.h"
     27 
     28 
     29 /**
     30  * Resume suspended connections, we are shutting down.
     31  */
     32 void
     33 TEH_reserves_purse_cleanup (void);
     34 
     35 
     36 /**
     37  * Handle a "/reserves/$RESERVE_PUB/purse" request.  Parses the JSON, and, if
     38  * successful, passes the JSON data to #create_transaction() to further check
     39  * the details of the operation specified.  If everything checks out, this
     40  * will ultimately lead to the "purses create" being executed, or rejected.
     41  *
     42  * @param rc request context
     43  * @param reserve_pub public key of the reserve
     44  * @param root uploaded JSON data
     45  * @return MHD result code
     46  */
     47 MHD_RESULT
     48 TEH_handler_reserves_purse (
     49   struct TEH_RequestContext *rc,
     50   const struct TALER_ReservePublicKeyP *reserve_pub,
     51   const json_t *root);
     52 
     53 #endif