mte/test/offline_management.sh

50 lines
1.2 KiB
Bash
Raw Normal View History

2026-02-03 12:52:19 +01:00
#!/bin/bash
set -e
2026-02-03 22:03:25 +01:00
a="tmp_a.json"
b="tmp_b.json"
2026-02-10 05:04:28 +01:00
auditor_pub=$(<"./test/auditor_public_key")
2026-02-10 14:41:57 +01:00
master_key="./default/master_offline_private_key"
zero_euro="EUR:0.0"
2026-02-03 22:03:25 +01:00
dune exec offline -- download --output $a
2026-02-10 14:41:57 +01:00
dune exec offline -- sign --master_key $master_key --input $a --output $b
2026-02-03 22:03:25 +01:00
dune exec offline -- upload --input $b --url "/management/keys"
2026-02-03 22:03:25 +01:00
dune exec offline -- enable-auditor \
2026-02-10 14:41:57 +01:00
--master_key $master_key \
2026-02-03 22:03:25 +01:00
--output $b \
--auditor_url "auditor.example.com" \
--auditor_name "auditor example" \
--auditor_pub $auditor_pub \
--validity_start 0
2026-02-03 22:03:25 +01:00
dune exec offline -- upload --input $b --url "/management/auditors"
2026-02-03 22:03:25 +01:00
dune exec offline -- wire-fee \
2026-02-10 14:41:57 +01:00
--master_key $master_key \
2026-02-03 22:03:25 +01:00
--output $b \
2026-02-07 01:01:05 +01:00
--wire_method "xxx" \
--fee_start 0 \
--fee_end 99999999 \
--closing_fee $zero_euro \
--wire_fee $zero_euro
2026-02-03 22:03:25 +01:00
dune exec offline -- upload --input $b --url "/management/wire-fee"
2026-02-03 22:03:25 +01:00
dune exec offline -- global-fees \
2026-02-10 14:41:57 +01:00
--master_key $master_key \
2026-02-03 22:03:25 +01:00
--output $b \
--start_date 0 \
--end_date 99999999 \
--history_fee $zero_euro \
--account_fee $zero_euro \
--purse_fee $zero_euro \
--history_expiration 9999999 \
2026-02-03 22:03:25 +01:00
--purse_account_limit 1 \
--purse_timeout 9999999
2026-02-03 22:03:25 +01:00
dune exec offline -- upload --input $b --url "/management/global-fees"
rm $a
rm $b