pg_lookup_kyc_requirement_by_row.h (2790B)
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_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 PG_LOOKUP_KYC_REQUIREMENT_BY_ROW_H 22 #define PG_LOOKUP_KYC_REQUIREMENT_BY_ROW_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 * Lookup KYC requirement. 31 * 32 * @param cls closure 33 * @param h_payto identifies account to look up requirement for 34 * @param have_pub true if @a account_pub is provided as an input, 35 * false if it is merely provided for the public key to be returned 36 * @param[out] account_pub set to public key of the account 37 * needed to authorize access, all zeros if not known 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] reserve_pub set to last reserve public key 41 * used for a wire transfer from the account to the 42 * exchange; alternatively used to authorize access, 43 * all zeros if not known 44 * @param[out] access_token set to the access token to begin 45 * work on KYC processes for this account 46 * @param[out] rule_gen row ID of the last decision this 47 * response is based on (for long-polling by clients) 48 * @param[out] jrules set to active ``LegitimizationRuleSet`` 49 * of the account impacted by the requirement 50 * @param[out] aml_review set to true if the account is under 51 * active review by AML staff 52 * @param[out] kyc_required set to true if the user must pass 53 * some KYC check before some previous operation may continue 54 * @return database transaction status 55 */ 56 enum GNUNET_DB_QueryStatus 57 TEH_PG_lookup_kyc_requirement_by_row ( 58 void *cls, 59 const struct TALER_NormalizedPaytoHashP *h_payto, 60 bool have_pub, 61 union TALER_AccountPublicKeyP *account_pub, 62 enum GNUNET_GenericReturnValue *is_wallet, 63 struct TALER_ReservePublicKeyP *reserve_pub, 64 struct TALER_AccountAccessTokenP *access_token, 65 uint64_t *rule_gen, 66 json_t **jrules, 67 bool *aml_review, 68 bool *kyc_required); 69 70 71 #endif