You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
520 B
20 lines
520 B
#!/bin/bash
|
|
|
|
USERNAME="admin"
|
|
PASSWORD="pass"
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "Usage: $0 <nickname> <nickname>"
|
|
exit 1
|
|
fi
|
|
|
|
response="$(curl -u $USERNAME:$PASSWORD -s -X POST -H "Content-Type: application/json" \
|
|
--data '{"members": {"'$1'":{}, "'$2'":{}}}' \
|
|
http://localhost:8080/api/v1/multisig)"
|
|
|
|
echo $response | jq .secrets
|
|
echo ====
|
|
echo $response | jq -r .secrets.$USERNAME | base32 -d | jq .
|
|
echo $response | jq -r .secrets.$1 | base32 -d | jq .
|
|
echo $response | jq -r .secrets.$2 | base32 -d | jq .
|