diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_responses.h')
-rw-r--r-- | src/backend/taler-merchant-httpd_responses.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_responses.h b/src/backend/taler-merchant-httpd_responses.h index 19690cc3..c1bd5c8f 100644 --- a/src/backend/taler-merchant-httpd_responses.h +++ b/src/backend/taler-merchant-httpd_responses.h @@ -65,6 +65,67 @@ struct MHD_Response * TMH_RESPONSE_make_json_pack (const char *fmt, ...); +/** + * Information about a coin aggregated in a wire transfer for a + * /track/transaction response. + */ +struct TMH_CoinWireTransfer +{ + + /** + * Public key of the coin. + */ + struct TALER_CoinSpendPublicKeyP coin_pub; + + /** + * Value of the coin including deposit fee. + */ + struct TALER_Amount amount_with_fee; + + /** + * Deposit fee for the coin. + */ + struct TALER_Amount deposit_fee; + +}; + +/** + * Information about a wire transfer for a /track/transaction response. + */ +struct TMH_TransactionWireTransfer +{ + + /** + * Wire transfer identifier this struct is about. + */ + struct TALER_WireTransferIdentifierRawP wtid; + + /** + * Number of coins of the selected transaction that + * is covered by this wire transfer. + */ + unsigned int num_coins; + + /** + * Information about the coins of the selected transaction + * that are part of the wire transfer. + */ + struct TMH_CoinWireTransfer *coins; + +}; + + +/** + * Generate /track/transaction response. + * + * @param num_transfers how many wire transfers make up the transaction + * @param transfers data on each wire transfer + * @return MHD response object + */ +struct MHD_Response * +TMH_RESPONSE_make_track_transaction_ok (unsigned int num_transfers, + const struct TMH_TransactionWireTransfer *transfers); + /** * Function to call to handle the request by building a JSON |