insert_fountain_withdraw_sig.h (2203B)
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 src/include/merchant-database/insert_fountain_withdraw_sig.h 18 * @brief record one blind signature of a completed fountain withdrawal 19 */ 20 #ifndef MERCHANT_DATABASE_INSERT_FOUNTAIN_WITHDRAW_SIG_H 21 #define MERCHANT_DATABASE_INSERT_FOUNTAIN_WITHDRAW_SIG_H 22 #include "merchantdb_lib.h" 23 24 /** 25 * Store one blind signature of a withdrawal so that a repeated request 26 * can be answered from it. Must run in the same transaction as the 27 * quota consumption and the issued-token records, holding the fountain 28 * lock taken by TALER_MERCHANTDB_get_fountain_withdraw(). 29 * 30 * @param pg database context with the instance selected 31 * @param fountain_serial authenticated fountain 32 * @param h_request hash of the request's grants array 33 * @param grant_index offset of the grant in the request 34 * @param token_index offset of the signature within that grant 35 * @param h_issue_pub hash of the issue key used; its family slug and expiry 36 * are copied so replay survives deletion of the key or family 37 * @param blind_sig the blind signature handed to the wallet 38 * @return database result code; no result if the issue key is gone 39 */ 40 enum GNUNET_DB_QueryStatus 41 TALER_MERCHANTDB_insert_fountain_withdraw_sig ( 42 struct TALER_MERCHANTDB_PostgresContext *pg, 43 uint64_t fountain_serial, 44 const struct GNUNET_HashCode *h_request, 45 uint32_t grant_index, 46 uint32_t token_index, 47 const struct TALER_TokenIssuePublicKeyHashP *h_issue_pub, 48 const struct TALER_BlindedTokenIssueSignature *blind_sig); 49 50 #endif