exchange

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

pg_get_kyc_rules.h (2785B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 2022-2024 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_get_kyc_rules.h
     18  * @brief implementation of the get_kyc_rules function for Postgres
     19  * @author Christian Grothoff
     20  */
     21 #ifndef PG_GET_KYC_RULES_H
     22 #define PG_GET_KYC_RULES_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 /**
     30  * Return KYC rules that apply to the given account.
     31  *
     32  * @param cls the @e cls of this struct with the plugin-specific state
     33  * @param h_payto account identifier
     34  * @param merchant_pub merchant public key used by the client, or NULL
     35  *   if not available; if multiple @a reserve_pub values could be returned,
     36  *   we should use this one
     37  * @param[out] no_account_pub set to true if no @a account_pub is available
     38  * @param[out] account_pub set to account public key the rules
     39  *   apply to (because this key was used in KYC auth)
     40  * @param[out] no_reserve_pub set to true if no @a reserve_pub is available
     41  * @param[out] reserve_pub set to last incoming reserve public key
     42  *   of a wire transfer to the exchange from the given @a h_payto
     43  *   apply to (because this key was used in KYC auth)
     44  * @param[out] jrules set to the active KYC rules for the
     45  *    given account, set to NULL if no custom rules are active
     46  * @return transaction status code
     47  */
     48 enum GNUNET_DB_QueryStatus
     49 TEH_PG_get_kyc_rules (
     50   void *cls,
     51   const struct TALER_NormalizedPaytoHashP *h_payto,
     52   const struct TALER_MerchantPublicKeyP *merchant_pub,
     53   bool *no_account_pub,
     54   union TALER_AccountPublicKeyP *account_pub,
     55   bool *no_reserve_pub,
     56   struct TALER_ReservePublicKeyP *reserve_pub,
     57   json_t **jrules);
     58 
     59 
     60 /**
     61  * Return only the KYC rules that apply to the given account.
     62  *
     63  * @param cls the @e cls of this struct with the plugin-specific state
     64  * @param h_payto account identifier
     65  * @param[out] jrules set to the active KYC rules for the
     66  *    given account, set to NULL if no custom rules are active
     67  * @return transaction status code
     68  */
     69 enum GNUNET_DB_QueryStatus
     70 TEH_PG_get_kyc_rules2 (
     71   void *cls,
     72   const struct TALER_NormalizedPaytoHashP *h_payto,
     73   json_t **jrules);
     74 
     75 #endif