This commit is contained in:
swrup 2026-02-03 20:07:10 +01:00
parent 1af3718b1e
commit f1840ad9ac
2 changed files with 27 additions and 4 deletions

View file

@ -2,6 +2,9 @@ open Cmdliner
open Cmdliner.Term.Syntax
open Offline_impl
let base_url = Uri.of_string "http://localhost:3434/"
let default_master_offline_key_file = "data/master_offline_private_key"
module Arg = struct
include Arg
@ -16,9 +19,16 @@ module Arg = struct
let amount =
Arg.Conv.make ~docv:"amount argument" ~parser:Amount.of_string ~pp:Amount.pp
()
let url =
let parser path =
let full_url path =
Uri.with_path base_url path |> Uri.to_string
in
Arg.Conv.make ~docv:"amount argument" ~parser ~pp
()
end
let default_master_offline_key_file = "data/master_offline_private_key"
(*
let default_response_file = "response.json"
let default_request_file = "request.json"
@ -103,6 +113,18 @@ let revoke_signkey_cmd =
let+ output = output and+ master_key = master_key and+ signkey = signkey in
revoke_signkey ~output ~master_key ~signkey
let enable_auditor_cmd =
let doc = "Enable an auditor." in
let auditor_url =
Arg.(required & opt (some url) None & info [ "auditor_url" ])
in
Cmd.make (Cmd.info "global-fees" ~doc)
@@
let+ output = output
and+ master_key = master_key
and+ auditor_url = auditor_url in
enable_auditor ~output ~master_key ~auditor_url
let global_fees_cmd =
let doc = "Provides global fee configuration." in
let start_date =