How do I list the addesses in my keypool?

2

I want to list all of the addresses in my wallet, even the ones that aren't being used right now. I know that I can change the number of addresses with -keypool, but I want to list all of the addresses.

Nick ODell

Posted 2014-10-19T09:59:33.130

Reputation: 26 536

Answers

3

Providing that you're referring to BitcoinCore, and that by "not being used right now" you mean there's no transaction associated with them yet, you can use this command to list them:

bitcoin-cli listreceivedbyaddress 0 true

The parameters are:

  • minconf = 0
  • includeempty = true

Jozef

Posted 2014-10-19T09:59:33.130

Reputation: 1 374

2This command will return the already assigned (by getnewaddress) addresses, not the ones in the key pool.George Kimionis 2014-10-19T14:34:02.277

Oh, you're right, thanks for pointing it out. Apart from that though, I have no other suggestion but try to manually extract it from the wallet file.Jozef 2014-10-19T18:33:07.030

3

That's a tricky one.

If you haven't modified the 'keypool' parameter then your key pool will contain 100 "unassigned" addresses. These addresses are controlled by your wallet but remain in a latent state in your client until you explicitly request for a new address.

The thing is that every time you request for a new address, a new one will be added to your key pool, so there will always be X number of latent addresses (where X: your keypool size) that cannot be accessed (by design) in an obvious way through the client.

Provided that there are 2^160 possible bitcoin addresses (while there is a total of 2^63 grains of sand on earth) a collision is practically impossible, therefore it is of little to no value to try to gain control over your keypool addresses which really only serve as a buffer so that you won't have to back-up your wallet after every single transaction.

George Kimionis

Posted 2014-10-19T09:59:33.130

Reputation: 2 824