Skip to content

Instantly share code, notes, and snippets.

@mrmx
Created September 11, 2016 11:25
Show Gist options
  • Save mrmx/a1b9c808ca4a94fc25a298de6e46cf9d to your computer and use it in GitHub Desktop.
Save mrmx/a1b9c808ca4a94fc25a298de6e46cf9d to your computer and use it in GitHub Desktop.
Get balance of rusty bitcoin wallet.dat for all addrs in bash
#!/bin/bash
#
# Depends on:
# pywallet.py from https://github.com/pagobit/pywallet
# jq from https://stedolan.github.io/jq
for addr in $(./pywallet.py --dumpwallet | jq --raw-output ".keys[].addr"); do
echo "$addr balance:";
curl https://insight.bitpay.com/api/addr/$addr/balance;
echo "";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment