aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-10-15 16:19:14 +0200
committerChristian Grothoff <christian@grothoff.org>2022-10-15 16:19:14 +0200
commit38876c503ff53f7adf44bc82be4fec3ae9b02d01 (patch)
tree2727ceb2b71a86bcabb959b232d0af49c7847aa8 /src/include/taler_crypto_lib.h
parenteebc030f6cf61d36b80e3273709fd9f254b155c3 (diff)
downloadexchange-38876c503ff53f7adf44bc82be4fec3ae9b02d01.tar.xz
-refactor DB for reserve history/status routines
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h49
1 files changed, 47 insertions, 2 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index a861563b2..df992c6ee 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -3835,6 +3835,51 @@ TALER_exchange_online_melt_confirmation_verify (
/**
+ * Create exchange purse refund confirmation signature.
+ *
+ * @param scb function to call to create the signature
+ * @param amount_without_fee refunded amount
+ * @param refund_fee refund fee charged
+ * @param coin_pub coin that was refunded
+ * @param purse_pub public key of the expired purse
+ * @param[out] pub where to write the public key
+ * @param[out] sig where to write the signature
+ * @return #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TALER_exchange_online_purse_refund_sign (
+ TALER_ExchangeSignCallback scb,
+ const struct TALER_Amount *amount_without_fee,
+ const struct TALER_Amount *refund_fee,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_PurseContractPublicKeyP *purse_pub,
+ struct TALER_ExchangePublicKeyP *pub,
+ struct TALER_ExchangeSignatureP *sig);
+
+
+/**
+ * Verify signature of exchange affirming purse refund
+ * from purse expiration.
+ *
+ * @param amount_without_fee refunded amount
+ * @param refund_fee refund fee charged
+ * @param coin_pub coin that was refunded
+ * @param purse_pub public key of the expired purse
+ * @param pub public key to verify signature against
+ * @param sig signature to verify
+ * @return #GNUNET_OK if the signature is valid
+ */
+enum GNUNET_GenericReturnValue
+TALER_exchange_online_purse_refund_verify (
+ const struct TALER_Amount *amount_without_fee,
+ const struct TALER_Amount *refund_fee,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_PurseContractPublicKeyP *purse_pub,
+ const struct TALER_ExchangePublicKeyP *pub,
+ const struct TALER_ExchangeSignatureP *sig);
+
+
+/**
* Create exchange key set signature.
*
* @param scb function to call to create the signature
@@ -3860,8 +3905,8 @@ TALER_exchange_online_key_set_sign (
*
* @param timestamp time when the key set was issued
* @param hc hash over all the keys
- * @param pub where to write the public key
- * @param sig where to write the signature
+ * @param pub public key to verify signature against
+ * @param sig signature to verify
* @return #GNUNET_OK if the signature is valid
*/
enum GNUNET_GenericReturnValue