exchange

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

fakebank_common_make_admin_transfer.h (2619B)


      1 /*
      2   This file is part of TALER
      3   (C) 2016-2024 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or
      6   modify it under the terms of the GNU General Public License
      7   as published by the Free Software Foundation; either version 3,
      8   or (at your option) any later version.
      9 
     10   TALER is distributed in the hope that it will be useful,
     11   but WITHOUT ANY WARRANTY; without even the implied warranty of
     12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13   GNU General Public License for more details.
     14 
     15   You should have received a copy of the GNU General Public
     16   License along with TALER; see the file COPYING.  If not,
     17   see <http://www.gnu.org/licenses/>
     18 */
     19 /**
     20  * @file bank-lib/fakebank_common_make_admin_transfer.h
     21  * @brief routines to create transfers to the exchange
     22  * @author Christian Grothoff <christian@grothoff.org>
     23  */
     24 #ifndef FAKEBANK_COMMON_MAKE_ADMIN_TRANSFER_H
     25 #define FAKEBANK_COMMON_MAKE_ADMIN_TRANSFER_H
     26 
     27 #include "taler/taler_fakebank_lib.h"
     28 #include "taler/taler_bank_service.h"
     29 #include "taler/taler_mhd_lib.h"
     30 #include <gnunet/gnunet_mhd_compat.h>
     31 #include "fakebank.h"
     32 
     33 
     34 /**
     35  * Tell the fakebank to create another wire transfer *to* an exchange.
     36  *
     37  * @param h fake bank handle
     38  * @param debit_account account to debit
     39  * @param credit_account account to credit
     40  * @param amount amount to transfer
     41  * @param reserve_pub reserve public key to use in subject
     42  * @param[out] row_id serial_id of the transfer
     43  * @param[out] timestamp when was the transfer made
     44  * @return #GNUNET_OK on success
     45  */
     46 enum GNUNET_GenericReturnValue
     47 TALER_FAKEBANK_make_admin_transfer_ (
     48   struct TALER_FAKEBANK_Handle *h,
     49   const char *debit_account,
     50   const char *credit_account,
     51   const struct TALER_Amount *amount,
     52   const struct TALER_ReservePublicKeyP *reserve_pub,
     53   uint64_t *row_id,
     54   struct GNUNET_TIME_Timestamp *timestamp);
     55 
     56 
     57 /**
     58  * Tell the fakebank to create a KYCAUTH wire transfer *to* an exchange.
     59  *
     60  * @param h fake bank handle
     61  * @param debit_account account to debit
     62  * @param credit_account account to credit
     63  * @param amount amount to transfer
     64  * @param account_pub account public key to use in subject
     65  * @param[out] row_id serial_id of the transfer
     66  * @param[out] timestamp when was the transfer made
     67  * @return #GNUNET_OK on success
     68  */
     69 enum GNUNET_GenericReturnValue
     70 TALER_FAKEBANK_make_kycauth_transfer_ (
     71   struct TALER_FAKEBANK_Handle *h,
     72   const char *debit_account,
     73   const char *credit_account,
     74   const struct TALER_Amount *amount,
     75   const union TALER_AccountPublicKeyP *account_pub,
     76   uint64_t *row_id,
     77   struct GNUNET_TIME_Timestamp *timestamp);
     78 
     79 #endif