fcoin/bin/bcoin-get
Christopher Jeffrey d6bef43d71 add http server.
2016-02-21 22:48:42 -08:00

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}" "$@"