get_legitimization_requirement_by_row.h (3858B)
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/get_legitimization_requirement_by_row.h 18 * @brief implementation of the get_legitimization_requirement_by_row function for Postgres 19 * @author Christian Grothoff 20 */ 21 #ifndef EXCHANGE_DATABASE_GET_LEGITIMIZATION_REQUIREMENT_BY_ROW_H 22 #define EXCHANGE_DATABASE_GET_LEGITIMIZATION_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 * Primary test table: `legitimization_measures` (see test_legitimization_measures.c). 33 * 34 * @param pg the database context 35 * @param h_payto identifies account to look up requirement for 36 * @param account_pub set to public key of the account 37 * needed to authorize access 38 * @param[out] is_wallet set to #GNUNET_YES if the account is 39 * that of a wallet (#GNUNET_SYSERR is used if unknown) 40 * @param[out] access_token set to the access token to begin 41 * work on KYC processes for this account 42 * @param[out] rule_gen row ID of the last decision this 43 * response is based on (for long-polling by clients) 44 * @param[out] jrules set to active ``LegitimizationRuleSet`` 45 * of the account impacted by the requirement 46 * @param[out] aml_review set to true if the account is under 47 * active review by AML staff 48 * @param[out] kyc_required set to true if the user must pass 49 * some KYC check before some previous operation may continue 50 * @return database transaction status 51 */ 52 enum GNUNET_DB_QueryStatus 53 TALER_EXCHANGEDB_get_legitimization_requirement_by_row (struct 54 TALER_EXCHANGEDB_PostgresContext 55 *pg 56 , 57 const struct 58 TALER_NormalizedPaytoHashP 59 * 60 h_payto, 61 const union 62 TALER_AccountPublicKeyP 63 * 64 account_pub, 65 enum 66 GNUNET_GenericReturnValue 67 * 68 is_wallet, 69 struct 70 TALER_AccountAccessTokenP 71 * 72 access_token, 73 uint64_t *rule_gen, 74 json_t **jrules, 75 bool *aml_review, 76 bool *kyc_required); 77 78 79 #endif