diff options
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r-- | src/include/taler_json_lib.h | 30 |
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_ */ |