From 5e0c822856f9bd6eef798922dc58237d350aeb94 Mon Sep 17 00:00:00 2001 From: swrup Date: Fri, 17 Oct 2025 16:16:50 +0200 Subject: [PATCH] --- src/binary_formats.ml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/binary_formats.ml b/src/binary_formats.ml index 4037a7eb..7547bb34 100644 --- a/src/binary_formats.ml +++ b/src/binary_formats.ml @@ -466,6 +466,26 @@ module DenominationKeyAnnouncementPS = struct |> sealr end +module SigningKeyAnnouncementPS = struct + (* purpose.purpose = TALER_SIGNATURE_SM_SIGNING_KEY *) + type t = { + exchange_pub: ExchangePublicKeyP.t; + anchor_time: TimeAbsoluteNBO.t; + duration: TimeRelativeNBO.t; + } + + let bin = + let open Bin in + Purpose.make_bin Taler_signatures.sm_signing_key @@ fun purpose -> + record (fun _purpose exchange_pub anchor_time duration -> + { exchange_pub; anchor_time; duration }) + |+ Purpose.field purpose + |+ field ExchangePublicKeyP.bin (fun t -> t.exchange_pub) + |+ field TimeAbsoluteNBO.bin (fun t -> t.anchor_time) + |+ field TimeRelativeNBO.bin (fun t -> t.duration) + |> sealr +end + module SingleWithdrawRequestPS = struct (* purpose.purpose = TALER_SIGNATURE_WALLET_RESERVE_WITHDRAW *) type t = { @@ -947,15 +967,6 @@ module CoinPurseRefundConfirmationPS = struct } end -module SigningKeyAnnouncementPS = struct - (* purpose.purpose = TALER_SIGNATURE_SM_SIGNING_KEY *) - type t = { - exchange_pub: ExchangePublicKeyP.t; - anchor_time: TimeAbsoluteNBO.t; - duration: TimeRelativeNBO.t; - } -end - module MasterDenominationKeyRevocationPS = struct (* purpose.purpose = TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED *) type t = { h_denom_pub: DenominationHash.t }