~ offline tool
This commit is contained in:
parent
52b149b590
commit
9b3ca164da
5 changed files with 184 additions and 179 deletions
|
|
@ -2,27 +2,37 @@
|
|||
|
||||
set -e
|
||||
|
||||
a="tmp_a.json"
|
||||
b="tmp_b.json"
|
||||
a="/tmp/a.json"
|
||||
b="/tmp/b.json"
|
||||
|
||||
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"
|
||||
offline_tool() {
|
||||
dune exec offline -- "$@" > /dev/null
|
||||
}
|
||||
|
||||
dune exec offline -- enable-auditor \
|
||||
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
|
||||
dune exec offline -- upload --input $b --url "/management/auditors"
|
||||
offline_tool upload --input $b --url $url"/management/auditors"
|
||||
echo "[OK] /management/auditors"
|
||||
|
||||
dune exec offline -- wire-fee \
|
||||
offline_tool wire-fee \
|
||||
--master_key $master_key \
|
||||
--output $b \
|
||||
--wire_method "xxx" \
|
||||
|
|
@ -30,9 +40,10 @@ 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"
|
||||
offline_tool upload --input $b --url $url"/management/wire-fee"
|
||||
echo "[OK] /management/wire-fee"
|
||||
|
||||
dune exec offline -- global-fees \
|
||||
offline_tool global-fees \
|
||||
--master_key $master_key \
|
||||
--output $b \
|
||||
--start_date 0 \
|
||||
|
|
@ -43,7 +54,5 @@ 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"
|
||||
|
||||
rm $a
|
||||
rm $b
|
||||
offline_tool upload --input $b --url $url"/management/global-fees"
|
||||
echo "[OK] /management/global-fees"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue