add time.ml, similar to libgnunetutil's

This commit is contained in:
swrup 2026-02-05 15:31:49 +01:00
parent 5eba5f2265
commit cec0e6afa9
17 changed files with 336 additions and 321 deletions

View file

@ -2,10 +2,34 @@
open Bin_type
(* TODO keep this?
some of those are actuall ecdhe, or union of eddsa|ecdhe *)
module Aliases = struct
module TimestampNBO = TimeAbsoluteNBO
module Timestamp = struct
type t = Time.Timestamp.t
let bin = Time.Timestamp.bin
end
module TimestampNBO = struct
type t = Time.Timestamp.t
let bin = Time.Timestamp.bin_nbo
end
module TimeRelative = struct
type t = Time.Relative.t
let bin = Time.Relative.bin
end
module TimeRelativeNBO = struct
type t = Time.Relative.t
let bin = Time.Relative.bin_nbo
end
(* TODO rm? *)
module TimeAbsolute = Timestamp
module TimeAbsoluteNBO = TimestampNBO
module AmountNBO = struct
type t = Amount.t
@ -14,6 +38,9 @@ module Aliases = struct
end
(* - Keys - *)
(* TODO keep this?
some of those are actuall ecdhe, or union of eddsa|ecdhe *)
open Crypto
module PursePublicKey = EddsaPublicKey
module AuditorPublicKeyP = EddsaPublicKey