Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Get list of addresses and store in array (may include send addresses not belonging to this wallet)
  4. mapfile -t ADDRESS_LIST < <(dash-cli -rpcuser=username -rpcpassword=password listreceivedbyaddress 0 true | jq -r '.[].address')
  5.  
  6. # Check each address to see if it is mine and output only those that are
  7. for addr in "${ADDRESS_LIST[@]}"
  8. do
  9. MINE=$(dash-cli -rpcuser=username -rpcpassword=password validateaddress "$addr" | jq .ismine)
  10.  
  11. if [ "$MINE" == "true" ]; then
  12. echo "$addr"
  13. fi
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement