get_current_kyc_attributes.h (1941B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2026 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 get_current_kyc_attributes.h 18 * @brief implementation of the get_current_kyc_attributes function for Postgres 19 */ 20 #ifndef EXCHANGE_DATABASE_GET_CURRENT_KYC_ATTRIBUTES_H 21 #define EXCHANGE_DATABASE_GET_CURRENT_KYC_ATTRIBUTES_H 22 23 #include "taler/taler_util.h" 24 #include "taler/taler_json_lib.h" 25 #include "exchangedb_lib.h" 26 27 28 /** 29 * Lookup the current KYC attributes of an account: those of the 30 * legitimization process that stored attributes last, and if that 31 * process stored several attribute sets, its primary one (form index 0). 32 * 33 * Primary test table: `kyc_attributes` (see test_kyc_attributes.c). 34 * 35 * @param pg the database context 36 * @param h_payto account to look up 37 * @param[out] enc_attributes_size set to the number of bytes in 38 * @a enc_attributes 39 * @param[out] enc_attributes set to the encrypted attributes, to be 40 * freed by the caller 41 * @return database transaction status, #GNUNET_DB_STATUS_SUCCESS_NO_RESULTS 42 * if the account has no attributes 43 */ 44 enum GNUNET_DB_QueryStatus 45 TALER_EXCHANGEDB_get_current_kyc_attributes ( 46 struct TALER_EXCHANGEDB_PostgresContext *pg, 47 const struct TALER_NormalizedPaytoHashP *h_payto, 48 size_t *enc_attributes_size, 49 void **enc_attributes); 50 51 52 #endif