aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_json_lib.h
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-06-27 17:38:11 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-06-27 17:38:11 +0200
commitcddfaf007f4ac22e224f3df5f0151a0d620fb131 (patch)
tree691801af8cce13e8c4fd1adb3c53606a5e7c57fb /src/include/taler_json_lib.h
parent87025cfd178780f2e928019163ce81c1b7675c57 (diff)
age commitment: json parser helper and support for purses added
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r--src/include/taler_json_lib.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index 1300f8751..d8912e52e 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -215,6 +215,18 @@ TALER_JSON_pack_econtract (
const char *name,
const struct TALER_EncryptedContract *econtract);
+/**
+ * Generate packer instruction for a JSON field of type age_commitment
+ *
+ * @param name name of the field to add to the object
+ * @param age_commitment age commitment to add
+ * @return json pack specification
+ */
+struct GNUNET_JSON_PackSpec
+TALER_JSON_pack_age_commitment (
+ const char *name,
+ const struct TALER_AgeCommitment *age_commitment);
+
/**
* Convert a TALER amount to a JSON object.
@@ -295,6 +307,17 @@ TALER_JSON_spec_econtract (const char *name,
/**
+ * Provide specification to parse a given JSON object to an age commitment.
+ *
+ * @param name name of the age commitment field in the JSON
+ * @param[out] age_commitment where to store the age commitment
+ * @return spec for parsing an age commitment
+ */
+struct GNUNET_JSON_Specification
+TALER_JSON_spec_age_commitment (const char *name,
+ struct TALER_AgeCommitment *age_commitment);
+
+/**
* Provide specification to parse given JSON object to an amount
* in any currency in network byte order.
*