Skip to content

Commit

Permalink
Merge pull request #67 from RandyMcMillan/play-bitcoin-wallets
Browse files Browse the repository at this point in the history
play-bitcoin: some wallet functions
  • Loading branch information
rsafier authored Nov 11, 2021
2 parents 7184b14 + e6b57eb commit 2d5c287
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions scripts/play-bitcoin
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,39 @@ do
docker exec $BITCOIND_ID sh -c "bitcoin-cli getmininginfo"
exit

elif [[ ${!i} = listwallets ]]; then
((i++))
#docker exec $BITCOIND_ID sh -c "bitcoin-cli listwallets"
docker exec $BITCOIND_ID sh -c "ls /root/.bitcoin/signet/wallets"
exit

elif [[ ${!i} = createwallet ]]; then
((i++))
docker exec $BITCOIND_ID sh -c "bitcoin-cli createwallet $2 $3 $4 $5 $6 $7"
exit

elif [[ ${!i} = getbalance ]]; then
((i++))
docker exec $BITCOIND_ID sh -c "bitcoin-cli -rpcwallet=$2 getbalance"
exit

elif [[ ${!i} = getbalances ]]; then
((i++))
docker exec $BITCOIND_ID sh -c "bitcoin-cli -rpcwallet=$2 getbalances"
exit

elif [[ ${!i} = getnewaddress ]]; then
((i++))
# bitcoin-cli -rpcwallet=plebnet1 getnewaddress
docker exec $BITCOIND_ID sh -c "bitcoin-cli -rpcwallet=$2 getnewaddress"
exit

elif [[ ${!i} = sendtoaddress ]]; then
((i++))
# bitcoin-cli -rpcwallet=plebnet1 sendtoaddress amount feerate
docker exec $BITCOIND_ID sh -c "bitcoin-cli -rpcwallet=$2 sendtoaddress $3 $4"
exit

elif [[ ${!i} = start ]]; then
((i++))
docker-compose up bitcoind
Expand Down

0 comments on commit 2d5c287

Please sign in to comment.