rollback on master pub sigs refacto

This commit is contained in:
swrup 2026-02-23 04:35:42 +01:00 committed by Swrup
parent 05f4b39a7b
commit 4a66ce5932
2 changed files with 40 additions and 49 deletions

View file

@ -145,33 +145,33 @@ end
(* --- Packed Signatures --- *)
module type R = sig
module MK (R : sig
type r
val bin : r Bin.t
end
module type SIGNATURE = sig
end) : sig
open Crypto
type r
type t
(* record type of data to sign *)
type r = R.r
val signf : (string -> EddsaSignature.t) -> r -> t
(* type of signature over r *)
type t
(* todo
- type for unknown/verified signatures? (nk/ok) *)
val verify : EddsaPublicKey.t -> t -> r -> (unit, string) result
val signf : (string -> EddsaSignature.t) -> r -> t
val jsont : t Jsont.t
val caqti : t Caqti_type.t
(* escape hatch, only needed for /keys `exchange_sig` (signature over contatentation of all of the master_sigs) *)
(* only needed for /keys `exchange_sig`
(signature over contatentation of all of the master_sigs) *)
val to_octets : t -> string
end
module MK (R : R) : SIGNATURE with type r := R.r = struct
end = struct
open Crypto
type r = R.r
type t = EddsaSignature.t
let to_string = Bin.to_string R.bin
@ -182,12 +182,6 @@ module MK (R : R) : SIGNATURE with type r := R.r = struct
let to_octets t = EddsaSignature.to_octets t
end
module MK_master_sig (R : R) = struct
include MK (R)
let verify = verify Config.Exchange.master_public_key
end
(* ---- *)
module DenominationKeyAnnouncement = struct
@ -309,7 +303,7 @@ module DenominationKeyValidity = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module ExchangeSigningKeyValidity = struct
@ -336,7 +330,7 @@ module ExchangeSigningKeyValidity = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterDenominationKeyRevocation = struct
@ -354,7 +348,7 @@ module MasterDenominationKeyRevocation = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterSigningKeyRevocation = struct
@ -372,7 +366,7 @@ module MasterSigningKeyRevocation = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterAddAuditor = struct
@ -396,7 +390,7 @@ module MasterAddAuditor = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterDelAuditor = struct
@ -417,7 +411,7 @@ module MasterDelAuditor = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module GlobalFees = struct
@ -472,7 +466,7 @@ module GlobalFees = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterWireDetails = struct
@ -510,7 +504,7 @@ module MasterWireDetails = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterAddWire = struct
@ -552,7 +546,7 @@ module MasterAddWire = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterDelWire = struct
@ -573,7 +567,7 @@ module MasterDelWire = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterDrainProfit = struct
@ -601,7 +595,7 @@ module MasterDrainProfit = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module MasterAmlOfficerStatus = struct
@ -627,7 +621,7 @@ module MasterAmlOfficerStatus = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module PartnerConfiguration = struct
@ -666,7 +660,7 @@ module PartnerConfiguration = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module WadPartnerSignature = struct
@ -742,7 +736,7 @@ module MasterWireFee = struct
|> sealr
end
include MK_master_sig (R)
include MK (R)
end
module ExchangeKeyValidity = struct