Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Get list of addresses and store in array (may include send addresses not belonging to this wallet)
- mapfile -t ADDRESS_LIST < <(dash-cli -rpcuser=username -rpcpassword=password listreceivedbyaddress 0 true | jq -r '.[].address')
- # Check each address to see if it is mine and output only those that are
- for addr in "${ADDRESS_LIST[@]}"
- do
- MINE=$(dash-cli -rpcuser=username -rpcpassword=password validateaddress "$addr" | jq .ismine)
- if [ "$MINE" == "true" ]; then
- echo "$addr"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement