This commit is contained in:
parent
86be1c51a5
commit
cccebea04b
1 changed files with 32 additions and 0 deletions
|
|
@ -51,6 +51,14 @@ module Hash_code = struct
|
|||
record (fun hash -> { hash }) |+ field (bytes 64) (fun t -> t.hash) |> sealr
|
||||
end
|
||||
|
||||
module Short_hash_code = struct
|
||||
type t = { hash: string }
|
||||
|
||||
let bin =
|
||||
let open Bin in
|
||||
record (fun hash -> { hash }) |+ field (bytes 32) (fun t -> t.hash) |> sealr
|
||||
end
|
||||
|
||||
module Denomination_hash = struct
|
||||
type t = { hash: Hash_code.t }
|
||||
|
||||
|
|
@ -91,6 +99,30 @@ module Merchant_wire_hash = struct
|
|||
|> sealr
|
||||
end
|
||||
|
||||
module Full_payto_hash = struct
|
||||
(* Hash over a full payto://-URI, including receiver-name
|
||||
(and possibly BIC and other optional fields). *)
|
||||
type t = { hash: Short_hash_code.t }
|
||||
|
||||
let bin =
|
||||
let open Bin in
|
||||
record (fun hash -> { hash })
|
||||
|+ field Short_hash_code.bin (fun t -> t.hash)
|
||||
|> sealr
|
||||
end
|
||||
|
||||
module Normalized_payto_hash = struct
|
||||
(* Hash over a normalized payto://-URI, including all optional
|
||||
fields and also with account-part canonicalized (so no BIC). *)
|
||||
type t = { hash: Short_hash_code.t }
|
||||
|
||||
let bin =
|
||||
let open Bin in
|
||||
record (fun hash -> { hash })
|
||||
|+ field Short_hash_code.bin (fun t -> t.hash)
|
||||
|> sealr
|
||||
end
|
||||
|
||||
(* -- Signatures -- *)
|
||||
|
||||
module Purpose = struct
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue