mte/test/offline_management.sh
2026-02-10 22:07:45 +01:00

49 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
set -e
a="tmp_a.json"
b="tmp_b.json"
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 -- enable-auditor \
--master_key $master_key \
--output $b \
--auditor_url "auditor.example.com" \
--auditor_name "auditor example" \
--auditor_pub $auditor_pub \
--validity_start 0
dune exec offline -- upload --input $b --url "/management/auditors"
dune exec offline -- wire-fee \
--master_key $master_key \
--output $b \
--wire_method "xxx" \
--fee_start 0 \
--fee_end 99999999 \
--closing_fee $zero_euro \
--wire_fee $zero_euro
dune exec offline -- upload --input $b --url "/management/wire-fee"
dune exec offline -- global-fees \
--master_key $master_key \
--output $b \
--start_date 0 \
--end_date 99999999 \
--history_fee $zero_euro \
--account_fee $zero_euro \
--purse_fee $zero_euro \
--history_expiration 9999999 \
--purse_account_limit 1 \
--purse_timeout 9999999
dune exec offline -- upload --input $b --url "/management/global-fees"
rm $a
rm $b