aboutsummaryrefslogtreecommitdiff
path: root/src/json
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-09-01 11:09:28 +0200
committerChristian Grothoff <christian@grothoff.org>2024-09-01 11:09:46 +0200
commit24876d531bd38a101bba12ef356147faa01af3f4 (patch)
treea846675315dbc5fc300d79d474420b0fdad96058 /src/json
parentdad550ab17c089dac787a12c0cd5664e75f23867 (diff)
implement #9131
Diffstat (limited to 'src/json')
-rw-r--r--src/json/json_helper.c4
-rw-r--r--src/json/json_pack.c41
2 files changed, 45 insertions, 0 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
index db0a425db..2d1037ef6 100644
--- a/src/json/json_helper.c
+++ b/src/json/json_helper.c
@@ -1475,6 +1475,10 @@ parse_kycte (void *cls,
.val = TALER_KYCLOGIC_KYC_TRIGGER_RESERVE_CLOSE },
{ .name = "AGGREGATE",
.val = TALER_KYCLOGIC_KYC_TRIGGER_AGGREGATE },
+ { .name = "TRANSACTION",
+ .val = TALER_KYCLOGIC_KYC_TRIGGER_TRANSACTION },
+ { .name = "REFUND",
+ .val = TALER_KYCLOGIC_KYC_TRIGGER_REFUND },
{ .name = NULL,
.val = TALER_KYCLOGIC_KYC_TRIGGER_NONE },
};
diff --git a/src/json/json_pack.c b/src/json/json_pack.c
index 85c9c5686..859976acb 100644
--- a/src/json/json_pack.c
+++ b/src/json/json_pack.c
@@ -97,6 +97,47 @@ TALER_JSON_pack_age_commitment (
struct GNUNET_JSON_PackSpec
+TALER_JSON_pack_kycte (const char *name,
+ enum TALER_KYCLOGIC_KycTriggerEvent event)
+{
+ const char *str = "INVALID";
+
+ switch (event)
+ {
+ case TALER_KYCLOGIC_KYC_TRIGGER_NONE:
+ str = "NONE";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_WITHDRAW:
+ str = "WITHDRAW";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_DEPOSIT:
+ str = "DEPOSIT";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_P2P_RECEIVE:
+ str = "MERGE";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_WALLET_BALANCE:
+ str = "BALANCE";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_RESERVE_CLOSE:
+ str = "CLOSE";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_AGGREGATE:
+ str = "AGGREGATE";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_TRANSACTION:
+ str = "TRANSACTION";
+ break;
+ case TALER_KYCLOGIC_KYC_TRIGGER_REFUND:
+ str = "REFUND";
+ break;
+ }
+ return GNUNET_JSON_pack_string (name,
+ str);
+}
+
+
+struct GNUNET_JSON_PackSpec
TALER_JSON_pack_denom_pub (
const char *name,
const struct TALER_DenominationPublicKey *pk)