59 lines
1.4 KiB
Bash
Executable file
59 lines
1.4 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
a="/tmp/a.json"
|
|
b="/tmp/b.json"
|
|
|
|
url="http://localhost:3434"
|
|
auditor_pub="A17JXR3E6J4CXDPYT7S1H25PGJ3ABS26TQ38654QCX0TB59RPMF0"
|
|
master_key="./default/master_offline_private_key"
|
|
zero_euro="KUDO:0.0"
|
|
|
|
offline_tool() {
|
|
dune exec offline -- "$@" > /dev/null
|
|
sleep 0.1
|
|
}
|
|
|
|
offline_tool download --output $a --url $url"/management/keys"
|
|
offline_tool sign \
|
|
--master_key $master_key \
|
|
--input $a \
|
|
--output $b
|
|
offline_tool upload --input $b --url $url"/management/keys"
|
|
echo "[OK] /management/keys"
|
|
|
|
offline_tool enable-auditor \
|
|
--master_key $master_key \
|
|
--output $b \
|
|
--auditor_url "auditor.example.com" \
|
|
--auditor_name "auditor example" \
|
|
--auditor_pub $auditor_pub \
|
|
--validity_start 0
|
|
offline_tool upload --input $b --url $url"/management/auditors"
|
|
echo "[OK] /management/auditors"
|
|
|
|
offline_tool 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
|
|
offline_tool upload --input $b --url $url"/management/wire-fee"
|
|
echo "[OK] /management/wire-fee"
|
|
|
|
offline_tool 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
|
|
offline_tool upload --input $b --url $url"/management/global-fees"
|
|
echo "[OK] /management/global-fees"
|