JJ: Description from the destination commit:
add hash.ml JJ: Description from source commit: .
This commit is contained in:
parent
55ccc6f18a
commit
6353c885f7
11 changed files with 187 additions and 188 deletions
|
|
@ -1,4 +1,5 @@
|
|||
open Syntax
|
||||
open Hash
|
||||
|
||||
let read_file fname = Bos.OS.File.read (Fpath.v fname) |> unwrap_err_msg
|
||||
|
||||
|
|
@ -60,7 +61,7 @@ let sign ~master_key ~input ~output =
|
|||
|
||||
let revoke_denom ~output ~master_key ~h_denom =
|
||||
let* key = read_master_key_file master_key in
|
||||
let* h_denom_pub = Bin_type.DenominationHash.of_b32 h_denom in
|
||||
let* h_denom_pub = DenominationHash.of_b32 h_denom in
|
||||
let denom_revoke =
|
||||
let master_sig =
|
||||
let open Bin_sig.MasterDenominationKeyRevocation in
|
||||
|
|
@ -145,7 +146,7 @@ let enable_auditor ~output ~master_key ~auditor_url ~auditor_name ~auditor_pub
|
|||
{
|
||||
start_date= validity_start;
|
||||
auditor_pub;
|
||||
h_auditor_url= Bin_type.Hash_64_cstr.hash auditor_url;
|
||||
h_auditor_url= Hash.Cstring.H64.hash auditor_url;
|
||||
}
|
||||
in
|
||||
let v =
|
||||
|
|
@ -176,7 +177,7 @@ let wire_fee ~output ~master_key ~wire_method ~fee_start ~fee_end ~closing_fee
|
|||
let open Bin_sig.MasterWireFee in
|
||||
sign_f ~f:(EddsaSignature.sign ~key)
|
||||
{
|
||||
h_wire_method= Bin_type.Hash_64_cstr.hash wire_method;
|
||||
h_wire_method= Hash.Cstring.H64.hash wire_method;
|
||||
start_date= fee_start;
|
||||
end_date= fee_end;
|
||||
closing_fee;
|
||||
|
|
@ -209,8 +210,8 @@ let drain ~output ~master_key ~debit_account_section ~credit_payto_uri ~wtid
|
|||
wtid;
|
||||
date;
|
||||
amount;
|
||||
h_section= Bin_type.Hash_64_cstr.hash debit_account_section;
|
||||
h_payto= Bin_type.FullPaytoHash.hash credit_payto_uri;
|
||||
h_section= Hash.Cstring.H64.hash debit_account_section;
|
||||
h_payto= FullPaytoHash.hash credit_payto_uri;
|
||||
}
|
||||
in
|
||||
let v =
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
open Crypto
|
||||
open Bin_type
|
||||
open Api
|
||||
|
||||
let verify_future_keys_response =
|
||||
|
|
@ -22,7 +21,7 @@ let verify_future_keys_response =
|
|||
let h_denom_pub =
|
||||
DenominationHash.hash (DenominationKey.to_octets denom_pub)
|
||||
in
|
||||
let h_section_name = Hash_64_cstr.hash section_name in
|
||||
let h_section_name = Hash.Cstring.H64.hash section_name in
|
||||
let anchor_time = stamp_start in
|
||||
let duration_withdraw = Timestamp.diff stamp_start stamp_expire_withdraw in
|
||||
let open Bin_sig.DenominationKeyAnnouncement in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue