fix currency bin encoding

This commit is contained in:
swrup 2025-11-28 19:17:25 +01:00
parent ab82a357a9
commit 760e6de1fb
8 changed files with 89 additions and 20 deletions

View file

@ -120,7 +120,11 @@ module Hash_64 = struct
| false -> Fmt.failwith "Hash.of_octets failure: data is not 64 bytes"
| true -> Digestif.SHA512.of_raw_string s
let to_octets = Digestif.SHA512.to_raw_string
let to_octets v =
let s = Digestif.SHA512.to_raw_string v in
match String.length s = 64 with
| false -> Fmt.failwith "Hash.to_octets failure: data is not 64 bytes"
| true -> s
let bin =
let open Bin in