taler-exchange-httpd_reveal-withdraw.h (2016B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2023 Taler Systems SA 4 5 TALER is free software; you can redistribute it and/or modify it under the 6 terms of the GNU Affero 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 Affero General Public License for more details. 12 13 You should have received a copy of the GNU Affero General Public License along with 14 TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 */ 16 /** 17 * @file taler-exchange-httpd_reveal-withdraw.h 18 * @brief Handle /reveal-withdraw/$ACH requests 19 * @author Özgür Kesim 20 */ 21 #ifndef TALER_EXCHANGE_HTTPD_REVEAL_WITHDRAW_H 22 #define TALER_EXCHANGE_HTTPD_REVEAL_WITHDRAW_H 23 24 #include <microhttpd.h> 25 #include "taler-exchange-httpd.h" 26 27 28 /** 29 * Handle a "/reveal-withdraw" request. 30 * 31 * The client got a noreveal_index in response to a previous request 32 * /withdraw. It now has to reveal all n*(kappa-1) 33 * coin's private keys (except for the noreveal_index), from which all other 34 * coin-relevant data (blinding, age restriction, nonce) is derived from. 35 * 36 * The exchange computes those values, ensures that the maximum age is 37 * correctly applied, calculates the hash of the blinded envelopes, and - 38 * together with the non-disclosed blinded envelopes - compares the hash of 39 * the calculated withdraw commitment against the original. 40 * 41 * If all those checks and the used denominations turn out to be correct, the 42 * exchange signs all blinded envelopes with their appropriate denomination 43 * keys. 44 * 45 * @param rc request context 46 * @param root uploaded JSON data 47 * @param args not used 48 * @return MHD result code 49 */ 50 MHD_RESULT 51 TEH_handler_reveal_withdraw ( 52 struct TEH_RequestContext *rc, 53 const json_t *root, 54 const char *const args[0]); 55 56 #endif