Isn't there a way in Bitcoin Core console to list all the wallet addresses?
I'm, not aware of any.
Most of the commands require to sync the node to update the wallet's transactions or rely on the "
already-seen" addresses via GUI or command.
Getting the entire keypool from the dumpwallet is the only way if you do not want to sync it.
And I just remembered, since you do not know which addresses have bitcoins.
If it's no too old, you have to specify which address type prior to using dummpwallet command because it'll associate such address type to the private keys in the dump file,
Excluding those with associated transaction history saved in the wallet file that's for another address type.
For example: If you set
addresstype=bech32 in bitcoin.conf or arg, the dump file will only contain "
bc1q" addresses if the WIF private keys aren't uncompressed.
If
addresstype=p2sh-segwit it'll contain SegWit "
3" addresses instead.
For example, here's a sample keys and address part of the dump file from the same wallet but with different
addresstype= setting;
addresstype=p2sh-segwit (
testnet):
-snip-
cNAwvEHcp4wkmWzFwG72httRYXxKLyRhohKF43rg5PoB7BkZGRzK 2022-05-16T13:24:06Z reserve=1 # addr=2N4goens89eLn67Ed48u6rDAxzyK1xm71EK hdkeypath=m/0'/0'/1360'
cRP2Kkso2RUrWEcYisHUjMfFhdqbgTcfJDrKuq2NPeeQWZqtibX9 2022-05-16T13:24:06Z change=1 # addr=2MsJyecsfSBoAfggNfEuxDBh8YbaYDJ5Yfv hdkeypath=m/0'/0'/1042'
cPcfaVDxLdp35fpts2BsEWZQGVxqr1Qz7w9dLLUsNrxC1kgrrwL5 2022-05-16T13:24:06Z reserve=1 # addr=2N7GwvBz1PgwnsK8AKUhdYveTvCPQk2hgp4 hdkeypath=m/0'/0'/1396'
cPafqzpXmtEDJoPKXx67rUoWDdnvdXDJ5jq8w9zCNAR5Kzpnenbw 2022-05-16T13:24:06Z change=1 # addr=2NC5o8svHHFEDZ6GMLVreLM8Ho4srtRsdTy hdkeypath=m/0'/0'/1134'
cPhJX6BiYY9KEjShsYYvosVHynnj5amMes5Zxce2k4VXTp8N7uBv 2022-05-16T13:24:06Z reserve=1 # addr=2MunSQxSVK6iQkJkZeLEXb3voDedbr8uoyW hdkeypath=m/0'/0'/1461'
cVxKGpvaHjtcFyL3nvx26MpmqWu81BpXVVzB2d43nJHrCFkxt2Ls 2022-05-16T13:24:06Z reserve=1 # addr=2N5xCx4XGqThAqaFM9fc1EuViQxQBgWZ86r hdkeypath=m/0'/0'/1383'
-snip-
addresstype=bech32 (
testnet), after restarting the node:
-snip-
cNAwvEHcp4wkmWzFwG72httRYXxKLyRhohKF43rg5PoB7BkZGRzK 2022-05-16T13:24:06Z reserve=1 # addr=bcrt1qqq0hztd8gjhxjrc2a27rdj29gshsgddx7cwlv8 hdkeypath=m/0'/0'/1360'
cRP2Kkso2RUrWEcYisHUjMfFhdqbgTcfJDrKuq2NPeeQWZqtibX9 2022-05-16T13:24:06Z change=1 # addr=bcrt1qqqeut3n977pmlzpdzl0j3ccrthvranlgxvzmv6 hdkeypath=m/0'/0'/1042'
cPcfaVDxLdp35fpts2BsEWZQGVxqr1Qz7w9dLLUsNrxC1kgrrwL5 2022-05-16T13:24:06Z reserve=1 # addr=bcrt1qqpdez6rsp6gjyadtn8y2vmlj7ykljhgnqcjrcd hdkeypath=m/0'/0'/1396'
cPafqzpXmtEDJoPKXx67rUoWDdnvdXDJ5jq8w9zCNAR5Kzpnenbw 2022-05-16T13:24:06Z change=1 # addr=bcrt1qqfhnlhecg54f7caesyc73ud5temfrf7zr8zx9z hdkeypath=m/0'/0'/1134'
cPhJX6BiYY9KEjShsYYvosVHynnj5amMes5Zxce2k4VXTp8N7uBv 2022-05-16T13:24:06Z reserve=1 # addr=bcrt1qqtp6a42epm3x6kqdemg96x8973kx8kvjp0ael8 hdkeypath=m/0'/0'/1461'
cVxKGpvaHjtcFyL3nvx26MpmqWu81BpXVVzB2d43nJHrCFkxt2Ls 2022-05-16T13:24:06Z reserve=1 # addr=bcrt1qqwt6z8n4f5ly0h24tlra5gcsak4edek2s7yz4c hdkeypath=m/0'/0'/1383'
-snip-