hd-wallet-addrs is a command-line tool that performs Bip32 wallet address discovery. It finds all addresses in an HD-wallet that have ever been used (received funds). There is also a simple web frontend available.
I appreciate any testing, feedback, suggestions you can provide. So far I have tested with Copay and mycelium android. Reports with other wallets would be great!
GitHub:
https://github.com/dan-da/hd-wallet-addrsWeb Frontend:
https://mybitprices.info/hd-wallet-addrs.htmlI initially wrote this utility to find wallet addresses for an auditing tool I was working on. But I realized it could be useful for other people and purposes as well.
Many (most?) HD Wallets do not provide a complete list of addresses that have been used, but do provide the master XPub key. So this tool empowers users by providing information kept hidden by their own wallet software.
This can be useful for bitcoin developers or anyone wishing to audit their wallet software in some fashion. Or just for record keeping purposes.
Both regular HD wallets (single address) and multi-sig wallets (eg Copay) are supported.
Reports are available in json, plaintext, and html. Columns can be changed or re-ordered via command-line.
Here's an example:
$ ./hd-wallet-addrs.php -g --xpub=xpub6BfKpqjTwvH21wJGWEfxLppb8sU7C6FJge2kWb9315oP4ZVqCXG29cdUtkyu7YQhHyfA5nt63nzcNZHYmqXYHDxYo8mm1Xq1dAC7YtodwUR --logfile=/tmp/log.txt
--- Wallet Discovery Report ---
Found 3 Receive addresses and 2 Change addresses.
Receive -- Used: 3 Unused: 0
Change -- Used: 2 Unused: 0
+------------------------------------+---------+----------------+------------+------------+---------+
| addr | type | total_received | total_sent | balance | relpath |
+------------------------------------+---------+----------------+------------+------------+---------+
| 1Ge6rDuyCdYVGhXZjcK4251q67GXMKx6xK | Receive | 0.00120000 | 0.00100000 | 0.00020000 | 0/0 |
| 1NVsB73WmDGXSxv77sh9PZENH2x3RRnkDY | Receive | 0.00130000 | 0.00100000 | 0.00030000 | 0/1 |
| 1BkgqiHcvfnQ2wrPN5D2ycrvZas3nibMjC | Receive | 0.00040000 | 0.00000000 | 0.00040000 | 0/2 |
| 12SisoiXLUEbkytL5Pzia1jBY8gJP5XN8D | Change | 0.00184874 | 0.00000000 | 0.00184874 | 1/0 |
| 1CkvACVpFwkPnMG13w9kXXE9YcsiyL4pcY | Change | 0.00194876 | 0.00000000 | 0.00194876 | 1/1 |
+------------------------------------+---------+----------------+------------+------------+---------+
or to generate a simple list for copy/paste:
$ ./hd-wallet-addrs.php -g --format=addrlist --xpub=xpub6BfKpqjTwvH21wJGWEfxLppb8sU7C6FJge2kWb9315oP4ZVqCXG29cdUtkyu7YQhHyfA5nt63nzcNZHYmqXYHDxYo8mm1Xq1dAC7YtodwUR --logfile=/tmp/log.txt
--- Wallet Discovery Report ---
Found 3 Receive addresses and 2 Change addresses.
Receive -- Used: 3 Unused: 0
Change -- Used: 2 Unused: 0
1Ge6rDuyCdYVGhXZjcK4251q67GXMKx6xK
1NVsB73WmDGXSxv77sh9PZENH2x3RRnkDY
1BkgqiHcvfnQ2wrPN5D2ycrvZas3nibMjC
12SisoiXLUEbkytL5Pzia1jBY8gJP5XN8D
1CkvACVpFwkPnMG13w9kXXE9YcsiyL4pcY
I plan to add a couple simple features in the next few days:
+ a flag to find all addresses up to <limit>, regardless if used or not. ( no need to query blockchain for this. )
+ a flag to find only change addresses or only receive addresses.
+ a flag to enable round-robin of blockchain API providers for improved privacy.