From cf20d60bb6f9c4a6b704c6c288531dc8e617889d Mon Sep 17 00:00:00 2001 From: swrup Date: Sun, 7 Dec 2025 08:03:00 +0100 Subject: [PATCH] mv bin aliases --- src/bin_sig.ml | 43 ++++++++++++++++++++++++++++++++++++++++++- src/bin_type.ml | 40 ---------------------------------------- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/src/bin_sig.ml b/src/bin_sig.ml index 757cbbbb..89e97930 100644 --- a/src/bin_sig.ml +++ b/src/bin_sig.ml @@ -1,7 +1,48 @@ (* Packed Signature *) open Bin_type -open Bin_type.Aliases + +(* TODO keep this? + some of those are actuall ecdhe, or union of eddsa|ecdhe *) +module Aliases = struct + module TimestampNBO : Time_S = struct + type t = Timestamp.t + + let bin = Timestamp.bin_nbo + end + + module AmountNBO = struct + type t = Amount.t + + let bin = Amount.bin_nbo + end + + (* - Keys - *) + open Crypto + module PursePublicKey = EddsaPublicKey + module AuditorPublicKeyP = EddsaPublicKey + module ReservePublicKeyP = EddsaPublicKey + module MerchantPublicKeyP = EddsaPublicKey + module TransferPublicKeyP = EddsaPublicKey + module AmlOfficerPublicKeyP = EddsaPublicKey + module ExchangePublicKeyP = EddsaPublicKey + module MasterPublicKeyP = EddsaPublicKey + module CoinSpendPublicKeyP = EddsaPublicKey + module TokenPublicKeyP = EddsaPublicKey + module ReservePrivateKeyP = EddsaPrivateKey + module MerchantPrivateKeyP = EddsaPrivateKey + module TransferPrivateKeyP = EddsaPrivateKey + module AmlOfficerPrivateKeyP = EddsaPrivateKey + module ExchangePrivateKeyP = EddsaPrivateKey + module MasterPrivateKeyP = EddsaPrivateKey + module CoinSpendPrivateKeyP = EddsaPrivateKey + module MasterSignatureP = EddsaSignature + module ReserveSignatureP = EddsaSignature + module ExchangeSignatureP = EddsaSignature + module CoinSpendSignatureP = EddsaSignature +end + +open Aliases (* EccSignaturePurpose *) module Purpose = struct diff --git a/src/bin_type.ml b/src/bin_type.ml index 38d047b5..7370141a 100644 --- a/src/bin_type.ml +++ b/src/bin_type.ml @@ -41,7 +41,6 @@ *) module Taler_signatures = Include.Taler_signatures -open Crypto let int32_size = 4 let int64_size = 8 @@ -228,42 +227,3 @@ module AgeMask = struct let open Bin in record (fun mask -> { mask }) |+ field beint32 (fun t -> t.mask) |> sealr end - -(* TODO keep this? - some of those are actuall ecdhe, or union of eddsa|ecdhe *) -module Aliases = struct - module TimestampNBO : Time_S = struct - type t = Timestamp.t - - let bin = Timestamp.bin_nbo - end - - module AmountNBO = struct - type t = Amount.t - - let bin = Amount.bin_nbo - end - - (* - Keys - *) - module PursePublicKey = EddsaPublicKey - module AuditorPublicKeyP = EddsaPublicKey - module ReservePublicKeyP = EddsaPublicKey - module MerchantPublicKeyP = EddsaPublicKey - module TransferPublicKeyP = EddsaPublicKey - module AmlOfficerPublicKeyP = EddsaPublicKey - module ExchangePublicKeyP = EddsaPublicKey - module MasterPublicKeyP = EddsaPublicKey - module CoinSpendPublicKeyP = EddsaPublicKey - module TokenPublicKeyP = EddsaPublicKey - module ReservePrivateKeyP = EddsaPrivateKey - module MerchantPrivateKeyP = EddsaPrivateKey - module TransferPrivateKeyP = EddsaPrivateKey - module AmlOfficerPrivateKeyP = EddsaPrivateKey - module ExchangePrivateKeyP = EddsaPrivateKey - module MasterPrivateKeyP = EddsaPrivateKey - module CoinSpendPrivateKeyP = EddsaPrivateKey - module MasterSignatureP = EddsaSignature - module ReserveSignatureP = EddsaSignature - module ExchangeSignatureP = EddsaSignature - module CoinSpendSignatureP = EddsaSignature -end