26 lines
403 B
Bash
Executable File
26 lines
403 B
Bash
Executable File
#!/bin/bash
|
|
|
|
_utxo() {
|
|
if test "$1" = 'address'; then
|
|
curl -s "http://localhost:8080/utxo/address/$2"
|
|
else
|
|
curl -s "http://localhost:8080/utxo/$1/$2"
|
|
fi
|
|
}
|
|
|
|
_tx() {
|
|
if test "$1" = 'address'; then
|
|
curl -s "http://localhost:8080/tx/address/$2"
|
|
else
|
|
curl -s "http://localhost:8080/tx/$1"
|
|
fi
|
|
}
|
|
|
|
_block() {
|
|
curl -s "http://localhost:8080/block/$1"
|
|
}
|
|
|
|
cmd=$1
|
|
shift
|
|
"_${cmd}" "$@"
|