exchange

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

pg_lookup_transfer_by_deposit.h (2663B)


      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 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 exchangedb/pg_lookup_transfer_by_deposit.h
     18  * @brief implementation of the lookup_transfer_by_deposit function for Postgres
     19  * @author Christian Grothoff
     20  */
     21 #ifndef PG_LOOKUP_TRANSFER_BY_DEPOSIT_H
     22 #define PG_LOOKUP_TRANSFER_BY_DEPOSIT_H
     23 
     24 #include "taler/taler_util.h"
     25 #include "taler/taler_json_lib.h"
     26 #include "taler/taler_exchangedb_plugin.h"
     27 
     28 /**
     29  * Try to find the wire transfer details for a deposit operation.
     30  * If we did not execute the deposit yet, return when it is supposed
     31  * to be executed.
     32  *
     33  * @param cls closure
     34  * @param h_contract_terms hash of the proposal data
     35  * @param h_wire hash of merchant wire details
     36  * @param coin_pub public key of deposited coin
     37  * @param merchant_pub merchant public key
     38  * @param[out] pending set to true if the transaction is still pending
     39  * @param[out] wtid wire transfer identifier, only set if @a pending is false
     40  * @param[out] exec_time when was the transaction done, or
     41  *         when we expect it to be done (if @a pending is false)
     42  * @param[out] amount_with_fee set to the total deposited amount
     43  * @param[out] deposit_fee set to how much the exchange did charge for the deposit
     44  * @param[out] kyc set to the kyc status of the receiver (if @a pending)
     45  * @param[out] account_pub set to public key that is authorized to start the KYC process; unchanged if no such key is known
     46  * @return transaction status code
     47  */
     48 enum GNUNET_DB_QueryStatus
     49 TEH_PG_lookup_transfer_by_deposit (
     50   void *cls,
     51   const struct TALER_PrivateContractHashP *h_contract_terms,
     52   const struct TALER_MerchantWireHashP *h_wire,
     53   const struct TALER_CoinSpendPublicKeyP *coin_pub,
     54   const struct TALER_MerchantPublicKeyP *merchant_pub,
     55   bool *pending,
     56   struct TALER_WireTransferIdentifierRawP *wtid,
     57   struct GNUNET_TIME_Timestamp *exec_time,
     58   struct TALER_Amount *amount_with_fee,
     59   struct TALER_Amount *deposit_fee,
     60   struct TALER_EXCHANGEDB_KycStatus *kyc,
     61   union TALER_AccountPublicKeyP *account_pub);
     62 
     63 #endif