2026-02-03 12:52:19 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2026-02-03 14:04:05 +01:00
|
|
|
set -e
|
|
|
|
|
|
2026-02-03 22:03:25 +01:00
|
|
|
a="tmp_a.json"
|
|
|
|
|
b="tmp_b.json"
|
2026-02-03 17:24:19 +01:00
|
|
|
|
2026-02-10 14:51:09 +01:00
|
|
|
base_url="http://localhost:3434"
|
2026-02-10 05:04:28 +01:00
|
|
|
auditor_pub=$(<"./test/auditor_public_key")
|
2026-02-10 11:59:51 +01:00
|
|
|
master_key="./default/master_offline_private_key"
|
2026-02-05 15:31:49 +01:00
|
|
|
zero_euro="EUR:0.0"
|
2026-02-03 14:04:05 +01:00
|
|
|
|
2026-02-03 22:03:25 +01:00
|
|
|
dune exec offline -- download --output $a
|
2026-02-10 11:59:51 +01:00
|
|
|
dune exec offline -- sign --master_key $master_key --input $a --output $b
|
2026-02-10 14:51:09 +01:00
|
|
|
dune exec offline -- upload --input $b --url $base_url"/management/keys"
|
2026-02-03 17:24:19 +01:00
|
|
|
|
2026-02-03 22:03:25 +01:00
|
|
|
dune exec offline -- enable-auditor \
|
2026-02-10 11:59:51 +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 \
|
2026-02-05 15:31:49 +01:00
|
|
|
--validity_start 0
|
2026-02-10 14:51:09 +01:00
|
|
|
dune exec offline -- upload --input $b --url $base_url"/management/auditors"
|
2026-02-03 17:24:19 +01:00
|
|
|
|
2026-02-03 22:03:25 +01:00
|
|
|
dune exec offline -- wire-fee \
|
2026-02-10 11:59:51 +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" \
|
2026-02-05 15:31:49 +01:00
|
|
|
--fee_start 0 \
|
|
|
|
|
--fee_end 99999999 \
|
|
|
|
|
--closing_fee $zero_euro \
|
|
|
|
|
--wire_fee $zero_euro
|
2026-02-10 14:51:09 +01:00
|
|
|
dune exec offline -- upload --input $b --url $base_url"/management/wire-fee"
|
2026-02-03 14:04:05 +01:00
|
|
|
|
2026-02-03 22:03:25 +01:00
|
|
|
dune exec offline -- global-fees \
|
2026-02-10 11:59:51 +01:00
|
|
|
--master_key $master_key \
|
2026-02-03 22:03:25 +01:00
|
|
|
--output $b \
|
2026-02-05 15:31:49 +01:00
|
|
|
--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 \
|
2026-02-05 15:31:49 +01:00
|
|
|
--purse_timeout 9999999
|
2026-02-10 14:51:09 +01:00
|
|
|
dune exec offline -- upload --input $b --url $base_url"/management/global-fees"
|
2026-02-03 22:03:25 +01:00
|
|
|
|
|
|
|
|
rm $a
|
|
|
|
|
rm $b
|