+ drain
This commit is contained in:
parent
e716990b11
commit
2cc7bbd5fc
7 changed files with 45 additions and 20 deletions
|
|
@ -1,13 +1,6 @@
|
|||
(* TODO
|
||||
all management operations:
|
||||
/management/wire
|
||||
/management/wire/disable
|
||||
|
||||
/management/aml-officers
|
||||
-> /aml
|
||||
/management/partners
|
||||
-> /wads *)
|
||||
|
||||
(* not done:
|
||||
/management/aml-officers (for /aml)
|
||||
/management/partners (for /wads) *)
|
||||
open Cmdliner
|
||||
open Cmdliner.Term.Syntax
|
||||
open Offline_impl
|
||||
|
|
@ -365,9 +358,9 @@ let cli =
|
|||
disable_auditor_cmd;
|
||||
wire_fee_cmd;
|
||||
global_fees_cmd;
|
||||
drain_cmd;
|
||||
enable_wire_cmd;
|
||||
disable_wire_cmd;
|
||||
drain_cmd;
|
||||
(* - *)
|
||||
test_hash64_cmd;
|
||||
]
|
||||
|
|
|
|||
|
|
@ -411,6 +411,11 @@ let disable_wire ~output ~master_key ~payto_uri =
|
|||
let drain ~output ~master_key ~debit_account_section ~credit_payto_uri ~wtid
|
||||
~date ~amount =
|
||||
let* key = read_master_key_file master_key in
|
||||
let* () =
|
||||
match String.length wtid = 32 with
|
||||
| false -> Error "invalid wtid: must be 32 bytes"
|
||||
| true -> Ok ()
|
||||
in
|
||||
let master_sig =
|
||||
let open Signatures.MasterDrainProfit in
|
||||
signf (EddsaSignature.sign ~key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue