This commit is contained in:
Swrup 2025-09-13 15:56:19 +02:00
commit 099cd80670
48 changed files with 4951 additions and 0 deletions

27
src/amount.mli Normal file
View file

@ -0,0 +1,27 @@
type sign =
| Sign_plus
| Sign_minus
type t = private {
sign: sign option;
currency: string;
value: Int64.t;
fraction: Int32.t;
}
val make :
sign:sign option ->
currency:string ->
value:Int64.t ->
fraction:Int32.t ->
(t, string) result
val pp : Format.formatter -> t -> unit
val to_string : t -> string
val of_string : string -> (t, string) result
val currency_len : int
val jsont : t Jsont.t
(* only for encoding *)
val bin : t Bin.t
val bin_nbo : t Bin.t