aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_refresh.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd_refresh.h')
-rw-r--r--src/mint/taler-mint-httpd_refresh.h43
1 files changed, 29 insertions, 14 deletions
diff --git a/src/mint/taler-mint-httpd_refresh.h b/src/mint/taler-mint-httpd_refresh.h
index 20e7d97c2..8ee03b956 100644
--- a/src/mint/taler-mint-httpd_refresh.h
+++ b/src/mint/taler-mint-httpd_refresh.h
@@ -29,7 +29,10 @@
/**
- * Handle a "/refresh/melt" request
+ * Handle a "/refresh/melt" request. Parses the request into the JSON
+ * components and then hands things of to #handle_referesh_melt_json()
+ * to validate the melted coins, the signature and execute the melt
+ * using TALER_MINT_db_execute_refresh_melt().
*
* @param rh context of the handler
* @param connection the MHD connection to handle
@@ -47,7 +50,13 @@ TALER_MINT_handler_refresh_melt (struct RequestHandler *rh,
/**
- * Handle a "/refresh/commit" request
+ * Handle a "/refresh/commit" request. Parses the top-level JSON to
+ * determine the dimensions of the problem and then handles handing
+ * off to #handle_refresh_commit_json() to parse the details of the
+ * JSON arguments. Once the signature has been verified, the
+ * commit data is written to the database via
+ * #TALER_MINT_db_execute_refresh_commit() and the cut-and-choose value
+ * is then returned to the client.
*
* @param rh context of the handler
* @param connection the MHD connection to handle
@@ -65,7 +74,13 @@ TALER_MINT_handler_refresh_commit (struct RequestHandler *rh,
/**
- * Handle a "/refresh/link" request
+ * Handle a "/refresh/reveal" request. This time, the client reveals
+ * the private transfer keys except for the cut-and-choose value
+ * returned from "/refresh/commit". This function parses the revealed
+ * keys and secrets and ultimately passes everything to
+ * #TALER_MINT_db_execute_refresh_reveal() which will verify that the
+ * revealed information is valid then returns the signed refreshed
+ * coins.
*
* @param rh context of the handler
* @param connection the MHD connection to handle
@@ -75,15 +90,15 @@ TALER_MINT_handler_refresh_commit (struct RequestHandler *rh,
* @return MHD result code
*/
int
-TALER_MINT_handler_refresh_link (struct RequestHandler *rh,
- struct MHD_Connection *connection,
- void **connection_cls,
- const char *upload_data,
- size_t *upload_data_size);
+TALER_MINT_handler_refresh_reveal (struct RequestHandler *rh,
+ struct MHD_Connection *connection,
+ void **connection_cls,
+ const char *upload_data,
+ size_t *upload_data_size);
/**
- * Handle a "/refresh/reveal" request
+ * Handle a "/refresh/link" request
*
* @param rh context of the handler
* @param connection the MHD connection to handle
@@ -93,11 +108,11 @@ TALER_MINT_handler_refresh_link (struct RequestHandler *rh,
* @return MHD result code
*/
int
-TALER_MINT_handler_refresh_reveal (struct RequestHandler *rh,
- struct MHD_Connection *connection,
- void **connection_cls,
- const char *upload_data,
- size_t *upload_data_size);
+TALER_MINT_handler_refresh_link (struct RequestHandler *rh,
+ struct MHD_Connection *connection,
+ void **connection_cls,
+ const char *upload_data,
+ size_t *upload_data_size);
#endif