From bc9abec87a82520fe0670dfbb9ec355fc80f1c36 Mon Sep 17 00:00:00 2001 From: swrup Date: Fri, 17 Oct 2025 17:14:27 +0200 Subject: [PATCH] --- src/json.ml | 17 ++--------------- src/types.ml | 21 ++++++--------------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/src/json.ml b/src/json.ml index 73a1c7c4..6c0d02de 100644 --- a/src/json.ml +++ b/src/json.ml @@ -86,29 +86,16 @@ module RsaDenominationKey = struct |> Jsont.Object.finish end -module CSDenominationKey = struct - open CSDenominationKey - - let jsont = - let make age_mask cs_pub = { age_mask; cs_pub } in - let age_mask v = v.age_mask in - let cs_pub v = v.cs_pub in - Jsont.Object.map ~kind:"CSDenominationKey" make - |> Jsont.Object.mem "age_mask" Jsont.int ~enc:age_mask - |> Jsont.Object.mem "cs_pub" Jsont.string ~enc:cs_pub - |> Jsont.Object.finish -end - module DenominationKey = struct open DenominationKey let rsa v = Rsa v - let cs v = CS v + let cs _v = Fmt.failwith "CS denomination not implemented" let jsont = let open Jsont.Object in let rsa = Case.map "RSA" RsaDenominationKey.jsont ~dec:rsa in - let cs = Case.map "CS" CSDenominationKey.jsont ~dec:cs in + let cs = Case.map "CS" Jsont.string ~dec:cs in let enc_case = function | Rsa v -> Case.value rsa v | CS v -> Case.value cs v diff --git a/src/types.ml b/src/types.ml index 6c401bda..4cf5875e 100644 --- a/src/types.ml +++ b/src/types.ml @@ -30,6 +30,10 @@ module Config_types = struct end end +module HashCode = struct + type t = string +end + (* https://docs.taler.net/core/api-common.html#tsref-type-ErrorDetail *) module ErrorDetail = struct (* TODO GANA error codes @@ -162,11 +166,6 @@ end = struct let jsont = Jsont.of_of_string ~kind:"RsaSignature" of_b32 ~enc:to_b32 end -module HashCode = struct - (* 32-byte value representing a point on Curve25519. *) - type cs25519Point = string -end - module RsaDenominationKey = struct type t = { age_mask: int; @@ -174,19 +173,11 @@ module RsaDenominationKey = struct } end -(* not implemented *) -module CSDenominationKey = struct - (* Clause Schnorr *) - type t = { - age_mask: int; - cs_pub: string; - } -end - module DenominationKey = struct type t = | Rsa of RsaDenominationKey.t - | CS of CSDenominationKey.t + (* not implemented: *) + | CS of string end module FutureSignKey = struct