From b25c9398b763c22021b5b18f4c093dea4d426469 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 28 Mar 2022 17:50:23 +0200 Subject: starting work on purse-create endpoint --- src/lib/exchange_api_purse_create_with_deposit.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/lib') diff --git a/src/lib/exchange_api_purse_create_with_deposit.c b/src/lib/exchange_api_purse_create_with_deposit.c index e39cb076f..5ce91e0e3 100644 --- a/src/lib/exchange_api_purse_create_with_deposit.c +++ b/src/lib/exchange_api_purse_create_with_deposit.c @@ -212,6 +212,7 @@ TALER_EXCHANGE_purse_create_with_deposit ( json_t *deposit_arr; CURL *eh; struct TALER_PurseMergePublicKeyP merge_pub; + struct TALER_PurseContractSignatureP purse_sig; struct TALER_PurseContractPublicKeyP purse_pub; struct TALER_ContractDiffiePublicP contract_pub; struct TALER_PrivateContractHashP h_contract_terms; @@ -335,6 +336,13 @@ TALER_EXCHANGE_purse_create_with_deposit ( jdeposit)); } GNUNET_free (url); + TALER_wallet_purse_create_sign (purse_expiration, + &h_contract_terms, + &merge_pub, + min_age, + &purse_value_after_fees, + purse_priv, + &purse_sig); { void *econtract = NULL; size_t econtract_size = 0; @@ -357,10 +365,14 @@ TALER_EXCHANGE_purse_create_with_deposit ( econtract_size)), GNUNET_JSON_pack_data_auto ("contract_pub", &contract_pub), + GNUNET_JSON_pack_data_auto ("purse_sig", + &purse_sig), GNUNET_JSON_pack_data_auto ("merge_pub", &merge_pub), GNUNET_JSON_pack_data_auto ("h_contract_terms", &h_contract_terms), + GNUNET_JSON_pack_timestamp ("purse_expiration", + purse_expiration), GNUNET_JSON_pack_array_steal ("deposits", deposit_arr)); GNUNET_free (econtract); -- cgit v1.2.3