diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-09-27 15:21:51 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-09-27 15:21:51 +0200 |
commit | 0de4db77551458ad338bda8a76ec2c70484550f8 (patch) | |
tree | b73c3a4148e7ab51cd0eddb630179a332fe38c0a /src/include | |
parent | 7d8c49b3c74865331fb9d269a9efdb9ba0f52eab (diff) | |
download | exchange-0de4db77551458ad338bda8a76ec2c70484550f8.tar.xz |
implement libtalerexchange:reserve_close API
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_crypto_lib.h | 40 | ||||
-rw-r--r-- | src/include/taler_exchange_service.h | 23 |
2 files changed, 59 insertions, 4 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 2977ccf39..4ad9eed05 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -3059,7 +3059,16 @@ TALER_wallet_account_merge_verify ( /** - * FIXME. + * Sign a request to keep a reserve open. + * + * @param reserve_payment how much to pay from the + * reserve's own balance for opening the reserve + * @param request_timestamp when was the request created + * @param reserve_expiration desired expiration time for the reserve + * @param purse_limit minimum number of purses the client + * wants to have concurrently open for this reserve + * @param reserve_priv key identifying the reserve + * @param[out] reserve_sig resulting signature */ void TALER_wallet_reserve_open_sign ( @@ -3072,7 +3081,17 @@ TALER_wallet_reserve_open_sign ( /** - * FIXME. + * Verify a request to keep a reserve open. + * + * @param reserve_payment how much to pay from the + * reserve's own balance for opening the reserve + * @param request_timestamp when was the request created + * @param reserve_expiration desired expiration time for the reserve + * @param purse_limit minimum number of purses the client + * wants to have concurrently open for this reserve + * @param reserve_pub key identifying the reserve + * @param reserve_sig resulting signature + * @return #GNUNET_OK if the signature is valid */ enum GNUNET_GenericReturnValue TALER_wallet_reserve_open_verify ( @@ -3085,7 +3104,13 @@ TALER_wallet_reserve_open_verify ( /** - * FIXME. + * Sign to deposit coin to pay for keeping a reserve open. + * + * @param coin_contribution how much the coin should contribute + * @param reserve_pub public key of the reserve + * @param request_timestamp time of the open request + * @param coin_priv private key of the coin + * @param[out] coin_sig signature by the coin */ void TALER_wallet_reserve_open_deposit_sign ( @@ -3097,7 +3122,14 @@ TALER_wallet_reserve_open_deposit_sign ( /** - * FIXME. + * Verify signature that deposits coin to pay for keeping a reserve open. + * + * @param coin_contribution how much the coin should contribute + * @param reserve_pub public key of the reserve + * @param request_timestamp time of the open request + * @param coin_pub public key of the coin + * @param coin_sig signature by the coin + * @return #GNUNET_OK if the signature is valid */ enum GNUNET_GenericReturnValue TALER_wallet_reserve_open_deposit_verify ( diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index d59fcaef1..7949dbbf4 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -5538,8 +5538,31 @@ struct TALER_EXCHANGE_ReserveCloseResult struct { + /** + * Amount wired to the target account. + */ + struct TALER_Amount wire_amount; } ok; + /** + * Information returned if KYC is required to proceed, set if + * @e hr.http_status is #MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS. + */ + struct + { + /** + * Requirement row that the merchant should use + * to check for its KYC status. + */ + uint64_t requirement_row; + + /** + * Hash of the payto-URI of the account to KYC; + */ + struct TALER_PaytoHashP h_payto; + + } unavailable_for_legal_reasons; + } details; }; |