Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: how to find unused addresses #1

Open
coolaj86 opened this issue Aug 7, 2024 · 0 comments
Open

Doc: how to find unused addresses #1

coolaj86 opened this issue Aug 7, 2024 · 0 comments

Comments

@coolaj86
Copy link
Member

coolaj86 commented Aug 7, 2024

Create a new address:

dash-cli -testnet getnewaddress

Get a list of all* addresses:

dash-cli -testnet getaddressesbylabel '' | jq -r 'keys[]'

* Obviously if you actually use labels (such as in the GUI), this won't give you all addresses.

Get a list of used addresses:

dash-cli -testnet listaddressbalances | jq -r 'keys[]'

Get a list of unused addresses:

dash-cli -testnet getaddressesbylabel '' |
    jq -r 'keys[]' |
    xargs -I % sh -c '
        printf %:
        dash-cli -testnet getaddresstxids "{\"addresses\":[\"%\"]}" |
            jq -c
    '

Load an address

Send 1.0 DASH to an Address

dash-cli -testnet sendtoaddress "${address}" 1.0

Get the Private Key

dash-cli -testnet dumpprivkey "${address}" > "${address}.wif"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant