summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_db.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-29 14:43:54 +0200
committerChristian Grothoff <christian@grothoff.org>2017-03-29 14:43:54 +0200
commitb38134ea4a2a90fdce6d9f661ed58df47a17bcfe (patch)
tree73c8fea2ad079d468032e20e67fce882c1783247 /src/exchange/taler-exchange-httpd_db.h
parent8d9dc14227350eb93f89c56c774ed377b633bc88 (diff)
downloadexchange-b38134ea4a2a90fdce6d9f661ed58df47a17bcfe.tar.gz
exchange-b38134ea4a2a90fdce6d9f661ed58df47a17bcfe.tar.bz2
exchange-b38134ea4a2a90fdce6d9f661ed58df47a17bcfe.zip
implement /payback parsing and signature verification
Diffstat (limited to 'src/exchange/taler-exchange-httpd_db.h')
-rw-r--r--src/exchange/taler-exchange-httpd_db.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.h b/src/exchange/taler-exchange-httpd_db.h
index 47afaadcb..67c8665f2 100644
--- a/src/exchange/taler-exchange-httpd_db.h
+++ b/src/exchange/taler-exchange-httpd_db.h
@@ -214,7 +214,7 @@ TEH_DB_execute_admin_add_incoming (struct MHD_Connection *connection,
*/
int
TEH_DB_execute_track_transfer (struct MHD_Connection *connection,
- const struct TALER_WireTransferIdentifierRawP *wtid);
+ const struct TALER_WireTransferIdentifierRawP *wtid);
/**
@@ -230,10 +230,29 @@ TEH_DB_execute_track_transfer (struct MHD_Connection *connection,
*/
int
TEH_DB_execute_track_transaction (struct MHD_Connection *connection,
- const struct GNUNET_HashCode *h_proposal_data,
- const struct GNUNET_HashCode *h_wire,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- const struct TALER_MerchantPublicKeyP *merchant_pub);
+ const struct GNUNET_HashCode *h_proposal_data,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_MerchantPublicKeyP *merchant_pub);
+
+
+/**
+ * Execute a "/payback". The validity of the coin and signature have
+ * already been checked. The database must now check that the coin is
+ * not (double) spent, and execute the transaction (record details,
+ * generate success or failure response).
+ *
+ * @param connection the MHD connection to handle
+ * @param coin information about the coin
+ * @param coin_bks blinding data of the coin (to be checked)
+ * @param coin_sig signature of the coin
+ * @return MHD result code
+ */
+int
+TEH_DB_execute_payback (struct MHD_Connection *connection,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_DenominationBlindingKeyP *coin_bks,
+ const struct TALER_CoinSpendSignatureP *coin_sig);
#endif