JJ: Description from the destination commit:

+ test disable auditor

JJ: Description from source commit:
+ wire + drain
This commit is contained in:
swrup 2026-02-25 20:12:13 +01:00
parent 05cfa7a5b1
commit f2d1fba932
9 changed files with 386 additions and 193 deletions

View file

@ -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
@ -199,35 +192,26 @@ let enable_auditor_cmd =
let auditor_pub =
Arg.(required & opt (some eddsa_pub) None & info [ "auditor_pub" ])
in
let validity_start =
Arg.(required & opt (some timestamp) None & info [ "validity_start" ])
in
Cmd.make (Cmd.info "enable-auditor" ~doc)
@@
let+ output = output
and+ master_key = master_key
and+ auditor_url = auditor_url
and+ auditor_name = auditor_name
and+ auditor_pub = auditor_pub
and+ validity_start = validity_start in
and+ auditor_pub = auditor_pub in
enable_auditor ~output ~master_key ~auditor_url ~auditor_name ~auditor_pub
~validity_start
let disable_auditor_cmd =
let doc = "Disable auditor." in
let auditor_pub =
Arg.(required & opt (some eddsa_pub) None & info [ "auditor_pub" ])
in
let validity_end =
Arg.(required & opt (some timestamp) None & info [ "validity_end" ])
in
Cmd.make (Cmd.info "disable-auditor" ~doc)
@@
let+ output = output
and+ master_key = master_key
and+ auditor_pub = auditor_pub
and+ validity_end = validity_end in
disable_auditor ~output ~master_key ~auditor_pub ~validity_end
and+ auditor_pub = auditor_pub in
disable_auditor ~output ~master_key ~auditor_pub
let wire_fee_cmd =
let doc = "Provides wire fee configuration." in
@ -301,6 +285,36 @@ let global_fees_cmd =
~account_fee ~purse_fee ~history_expiration ~purse_account_limit
~purse_timeout
let enable_wire_cmd =
let doc = "Enable wire method." in
let payto_uri =
Arg.(required & opt (some string) None & info [ "payto_uri" ])
in
let bank_label =
Arg.(value & opt (some string) None & info [ "bank_label" ])
in
let priority = Arg.(value & opt (some int) None & info [ "priority" ]) in
Cmd.make (Cmd.info "enable-wire" ~doc)
@@
let+ output = output
and+ master_key = master_key
and+ payto_uri = payto_uri
and+ bank_label = bank_label
and+ priority = priority in
enable_wire ~output ~master_key ~payto_uri ~bank_label ~priority
let disable_wire_cmd =
let doc = "Disable wire method." in
let payto_uri =
Arg.(required & opt (some string) None & info [ "payto_uri" ])
in
Cmd.make (Cmd.info "disable-wire" ~doc)
@@
let+ output = output
and+ master_key = master_key
and+ payto_uri = payto_uri in
disable_wire ~output ~master_key ~payto_uri
let drain_cmd =
let doc =
"Drain profits from the exchange. The actual drain requires running the \
@ -344,7 +358,10 @@ let cli =
disable_auditor_cmd;
wire_fee_cmd;
global_fees_cmd;
enable_wire_cmd;
disable_wire_cmd;
drain_cmd;
(* - *)
test_hash64_cmd;
]