lookup_kyc_requirement_by_row.h (3304B)
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 src/include/exchange-database/lookup_kyc_requirement_by_row.h 18 * @brief implementation of the lookup_kyc_requirement_by_row function for Postgres 19 * @author Christian Grothoff 20 */ 21 #ifndef EXCHANGE_DATABASE_LOOKUP_KYC_REQUIREMENT_BY_ROW_H 22 #define EXCHANGE_DATABASE_LOOKUP_KYC_REQUIREMENT_BY_ROW_H 23 24 #include "taler/taler_util.h" 25 #include "taler/taler_json_lib.h" 26 #include "exchangedb_lib.h" 27 28 29 /** 30 * Lookup KYC requirement. 31 * 32 * @param pg the database context 33 * @param h_payto identifies account to look up requirement for 34 * @param account_pub set to public key of the account 35 * needed to authorize access 36 * @param[out] is_wallet set to #GNUNET_YES if the account is 37 * that of a wallet (#GNUNET_SYSERR is used if unknown) 38 * @param[out] access_token set to the access token to begin 39 * work on KYC processes for this account 40 * @param[out] rule_gen row ID of the last decision this 41 * response is based on (for long-polling by clients) 42 * @param[out] jrules set to active ``LegitimizationRuleSet`` 43 * of the account impacted by the requirement 44 * @param[out] aml_review set to true if the account is under 45 * active review by AML staff 46 * @param[out] kyc_required set to true if the user must pass 47 * some KYC check before some previous operation may continue 48 * @return database transaction status 49 */ 50 enum GNUNET_DB_QueryStatus 51 TALER_EXCHANGEDB_lookup_kyc_requirement_by_row (struct 52 TALER_EXCHANGEDB_PostgresContext 53 *pg 54 , 55 const struct 56 TALER_NormalizedPaytoHashP * 57 h_payto, 58 const union 59 TALER_AccountPublicKeyP * 60 account_pub, 61 enum GNUNET_GenericReturnValue * 62 is_wallet, 63 struct TALER_AccountAccessTokenP 64 * 65 access_token, 66 uint64_t *rule_gen, 67 json_t **jrules, 68 bool *aml_review, 69 bool *kyc_required); 70 71 72 #endif