add hash.ml
This commit is contained in:
parent
55ccc6f18a
commit
98e5937981
11 changed files with 138 additions and 141 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_64_cstr.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_64_cstr.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_64_cstr.hash debit_account_section;
|
||||
h_payto= FullPaytoHash.hash credit_payto_uri;
|
||||
}
|
||||
in
|
||||
let v =
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
open Crypto
|
||||
open Bin_type
|
||||
open Hash
|
||||
open Api
|
||||
|
||||
let verify_future_keys_response =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue