add hash.ml
This commit is contained in:
parent
55ccc6f18a
commit
98e5937981
11 changed files with 138 additions and 141 deletions
|
|
@ -1,5 +1,6 @@
|
|||
open Syntax
|
||||
open Api
|
||||
open Hash
|
||||
|
||||
module Keys_get = struct
|
||||
let mk_future_denom (module Sm : Secmod.S) ~section_name
|
||||
|
|
@ -26,7 +27,7 @@ module Keys_get = struct
|
|||
let denom_secmod_sig =
|
||||
let open Bin_sig.DenominationKeyAnnouncement in
|
||||
let h_denom_pub = h_pub in
|
||||
let h_section_name = Bin_type.Hash_64_cstr.hash section_name in
|
||||
let h_section_name = Hash_64_cstr.hash section_name in
|
||||
let anchor_time = stamp_start in
|
||||
let duration_withdraw =
|
||||
Timestamp.diff stamp_start stamp_expire_withdraw
|
||||
|
|
@ -293,7 +294,7 @@ module Auditors = struct
|
|||
{
|
||||
start_date= validity_start;
|
||||
auditor_pub;
|
||||
h_auditor_url= Bin_type.Hash_64_cstr.hash auditor_url;
|
||||
h_auditor_url= Hash_64_cstr.hash auditor_url;
|
||||
}
|
||||
|
||||
(* TODO timestamps last_change +/- checks *)
|
||||
|
|
@ -389,7 +390,7 @@ module Wire_fee = struct
|
|||
let open Bin_sig.MasterWireFee in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig_wire
|
||||
{
|
||||
h_wire_method= Bin_type.Hash_64_cstr.hash wire_method;
|
||||
h_wire_method= Hash_64_cstr.hash wire_method;
|
||||
start_date= fee_start;
|
||||
end_date= fee_end;
|
||||
wire_fee;
|
||||
|
|
@ -527,7 +528,6 @@ module Wire = struct
|
|||
let conversion_url = "" in
|
||||
let credit_restrictions = "" in
|
||||
let debit_restrictions = "" in
|
||||
let open Bin_type in
|
||||
let* () =
|
||||
let open Bin_sig.MasterWireDetails in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig_wire
|
||||
|
|
@ -596,7 +596,7 @@ module Wire_disable = struct
|
|||
WireTeardownMessage.{ payto_uri; master_sig_del; validity_end } =
|
||||
let open Bin_sig.MasterDelWire in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig_del
|
||||
{ end_date= validity_end; h_wire= Bin_type.FullPaytoHash.hash payto_uri }
|
||||
{ end_date= validity_end; h_wire= FullPaytoHash.hash payto_uri }
|
||||
|
||||
let do_ ~db_conn
|
||||
WireTeardownMessage.{ payto_uri; master_sig_del= _; validity_end } =
|
||||
|
|
@ -638,7 +638,6 @@ module Drain = struct
|
|||
amount;
|
||||
} =
|
||||
let open Bin_sig.MasterDrainProfit in
|
||||
let open Bin_type in
|
||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||
{
|
||||
wtid;
|
||||
|
|
@ -684,7 +683,7 @@ module AmlOfficer = struct
|
|||
{
|
||||
change_date;
|
||||
officer_pub;
|
||||
h_officer_name= Bin_type.Hash_64_cstr.hash officer_name;
|
||||
h_officer_name= Hash_64_cstr.hash officer_name;
|
||||
is_active;
|
||||
}
|
||||
|
||||
|
|
@ -727,7 +726,7 @@ module Partners = struct
|
|||
end_date;
|
||||
wad_frequency;
|
||||
wad_fee;
|
||||
h_url= Bin_type.Hash_64_cstr.hash partner_base_url;
|
||||
h_url= Hash_64_cstr.hash partner_base_url;
|
||||
}
|
||||
|
||||
let do_ ~db_conn v =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue