12 lines
432 B

#!/bin/bash
echo "unlocking the wallet"
echo ""
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"walletpassphrase\",\"password\":\"kashifAli!123\",\"timeout\":300}"
echo ""
echo "Generating new address"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"getnewaddress\",\"account\":\"kashif\"}" >/tmp/newAddresses
echo ""
./json_extract /tmp/newAddresses address