summaryrefslogtreecommitdiff
path: root/src/include/taler_json_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-03-09 12:29:41 +0100
committerChristian Grothoff <christian@grothoff.org>2015-03-09 12:29:41 +0100
commit579f465c9b2ed1cd4602ee102073d633fda60cb9 (patch)
tree99b546c629bfa876ccbe4f829a68c3fe8d80624a /src/include/taler_json_lib.h
parent7b0ae9c1d0a3c3165a8cef8cc12d04d207a49ce2 (diff)
downloadexchange-579f465c9b2ed1cd4602ee102073d633fda60cb9.tar.gz
exchange-579f465c9b2ed1cd4602ee102073d633fda60cb9.tar.bz2
exchange-579f465c9b2ed1cd4602ee102073d633fda60cb9.zip
implementing #3632: generate proof of insufficient funds by converting transaction history to JSON
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r--src/include/taler_json_lib.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index f0ae923f4..2b9d51875 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -60,8 +60,20 @@ TALER_JSON_from_abs (struct GNUNET_TIME_Absolute stamp);
* @return the JSON reporesentation of the signature with purpose
*/
json_t *
-TALER_JSON_from_sig (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
- const struct GNUNET_CRYPTO_EddsaSignature *signature);
+TALER_JSON_from_eddsa_sig (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
+ const struct GNUNET_CRYPTO_EddsaSignature *signature);
+
+
+/**
+ * Convert a signature (with purpose) to a JSON object representation.
+ *
+ * @param purpose purpose of the signature
+ * @param signature the signature
+ * @return the JSON reporesentation of the signature with purpose
+ */
+json_t *
+TALER_JSON_from_ecdsa_sig (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
+ const struct GNUNET_CRYPTO_EcdsaSignature *signature);
/**
@@ -77,6 +89,17 @@ TALER_JSON_from_data (const void *data, size_t size);
/**
+ * Convert binary hash to a JSON string with the base32crockford
+ * encoding.
+ *
+ * @param hc binary data
+ * @return json string that encodes @a hc
+ */
+json_t *
+TALER_JSON_from_hash (const struct GNUNET_HashCode *hc);
+
+
+/**
* Parse given JSON object to Amount
*
* @param json the json object representing Amount
@@ -119,7 +142,8 @@ TALER_JSON_to_data (json_t *json,
* @return 1 if correctly formatted; 0 if not
*/
int
-TALER_JSON_validate_wireformat (const char *type, json_t *wire);
+TALER_JSON_validate_wireformat (const char *type,
+ json_t *wire);
#endif /* TALER_JSON_LIB_H_ */