summaryrefslogtreecommitdiff
path: root/src/include/taler_exchange_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-04-30 23:37:01 +0200
committerChristian Grothoff <christian@grothoff.org>2023-05-01 22:34:35 +0200
commitfaca037018820ba3c21724c7f6ab41a72206e4ff (patch)
treeb8e383ae5375e1594376f9f384be2cbddf4a5fb1 /src/include/taler_exchange_service.h
parent75f75c4a51c4700da9bde18cc9a9b5d9df1e8457 (diff)
downloadexchange-faca037018820ba3c21724c7f6ab41a72206e4ff.tar.gz
exchange-faca037018820ba3c21724c7f6ab41a72206e4ff.tar.bz2
exchange-faca037018820ba3c21724c7f6ab41a72206e4ff.zip
expose TALER_EXCHANGE_parse_accounts() in external API
Diffstat (limited to 'src/include/taler_exchange_service.h')
-rw-r--r--src/include/taler_exchange_service.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index f9330ec5c..fc5fb284b 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -910,6 +910,33 @@ struct TALER_EXCHANGE_WireAccount
/**
+ * Parse array of @a accounts of the exchange into @a was.
+ *
+ * @param master_pub master public key of the exchange, NULL to not verify signatures
+ * @param accounts array of accounts to parse
+ * @param[out] was where to write the result (already allocated)
+ * @param was_length length of the @a was array, must match the length of @a accounts
+ * @return #GNUNET_OK if parsing @a accounts succeeded
+ */
+enum GNUNET_GenericReturnValue
+TALER_EXCHANGE_parse_accounts (const struct TALER_MasterPublicKeyP *master_pub,
+ const json_t *accounts,
+ struct TALER_EXCHANGE_WireAccount was[],
+ unsigned int was_length);
+
+
+/**
+ * Free data within @a was, but not @a was itself.
+ *
+ * @param was array of wire account data
+ * @param was_len length of the @a was array
+ */
+void
+TALER_EXCHANGE_free_accounts (struct TALER_EXCHANGE_WireAccount *was,
+ unsigned int was_len);
+
+
+/**
* Response to a /wire request.
*/
struct TALER_EXCHANGE_WireResponse