This commit is contained in:
swrup 2026-02-10 14:51:09 +01:00
parent a0340bd100
commit b66d47cfae
2 changed files with 7 additions and 5 deletions

View file

@ -5,13 +5,14 @@ set -e
a="tmp_a.json"
b="tmp_b.json"
base_url="http://localhost:3434"
auditor_pub=$(<"./test/auditor_public_key")
master_key="./default/master_offline_private_key"
zero_euro="EUR:0.0"
dune exec offline -- download --output $a
dune exec offline -- sign --master_key $master_key --input $a --output $b
dune exec offline -- upload --input $b --url "/management/keys"
dune exec offline -- upload --input $b --url $base_url"/management/keys"
dune exec offline -- enable-auditor \
--master_key $master_key \
@ -20,7 +21,7 @@ dune exec offline -- enable-auditor \
--auditor_name "auditor example" \
--auditor_pub $auditor_pub \
--validity_start 0
dune exec offline -- upload --input $b --url "/management/auditors"
dune exec offline -- upload --input $b --url $base_url"/management/auditors"
dune exec offline -- wire-fee \
--master_key $master_key \
@ -30,7 +31,7 @@ dune exec offline -- wire-fee \
--fee_end 99999999 \
--closing_fee $zero_euro \
--wire_fee $zero_euro
dune exec offline -- upload --input $b --url "/management/wire-fee"
dune exec offline -- upload --input $b --url $base_url"/management/wire-fee"
dune exec offline -- global-fees \
--master_key $master_key \
@ -43,7 +44,7 @@ dune exec offline -- global-fees \
--history_expiration 9999999 \
--purse_account_limit 1 \
--purse_timeout 9999999
dune exec offline -- upload --input $b --url "/management/global-fees"
dune exec offline -- upload --input $b --url $base_url"/management/global-fees"
rm $a
rm $b

View file

@ -161,7 +161,8 @@ let read_master_key_file filename =
let* master_key = read_file filename in
Crypto.EddsaPrivateKey.of_octets master_key
let base_url = Uri.of_string "http://localhost:3434/"
let base_url = Uri.of_string
"http://localhost:3434/"
let full_url path = Uri.with_path base_url path |> Uri.to_string
let download ~output =