diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-05-05 14:43:13 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-05-05 14:43:13 +0200 |
commit | 6b1f4904ef011760f2a5c30698ab62652594fa6c (patch) | |
tree | 4d1f8d363d98b05b86d0f479d77dc1759811964d /src/include/taler_exchange_service.h | |
parent | 48863ce93578ea656fe5342f0f4da1bd2bab8139 (diff) | |
download | exchange-6b1f4904ef011760f2a5c30698ab62652594fa6c.tar.xz |
export transaction history check function
Diffstat (limited to 'src/include/taler_exchange_service.h')
-rw-r--r-- | src/include/taler_exchange_service.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 4fbadb79b..09cbd7868 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -1212,4 +1212,21 @@ void TALER_EXCHANGE_deposit_wtid_cancel (struct TALER_EXCHANGE_DepositWtidHandle *dwh); + +/** + * Convenience function. Verifies a coin's transaction history as + * returned by the exchange. + * + * @param currency expected currency for the coin + * @param coin_pub public key of the coin + * @param history history of the coin in json encoding + * @param[out] total how much of the coin has been spent according to @a history + * @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not + */ +int +TALER_EXCHANGE_verify_coin_history (const char *currency, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + json_t *history, + struct TALER_Amount *total); + #endif /* _TALER_EXCHANGE_SERVICE_H */ |