How do I check if a particular address is 'owned' by a loaded wallet in Bitcoin Core? I'm interested in knowing if there is an rpc method to determine whether or not an address was generated, and thus is owned by, a loaded Bitcoin Core wallet.
I have a few addresses that I generated a month or so ago using getnewaddress. These have been stored in a relatively secure encrypted location. In my paranoia, I am reluctant to now use the addresses to receive funds in the wallet, since as far as I know there is no benefit in doing so (besides increasing the gap between used addresses - but I am in no way approaching any gap limit, so this is irrelevant) over simply generating a new address which I can be sure is indeed owned by the loaded wallet. That said, I am curious to know if this is possible (since it may in some cases be useful, if sufficiently trustworthy - which if it were an rpc method for a trusted Bitcoin Corre instance, I'd assume to be the case) and after searching bitcoin.org RPC docs and on here, I have not been able to find an answer to this yet.
Note - I am aware of the validateaddress rpc, but as far as I understand, this only validates whether or not a Bitcoin address is valid, not whether it is associated with the loaded (or any particular) wallet.
You want the getaddressinfo wallet RPC. It will tell you whether an address is considers &quot;yours&quot;, along with various other information like whether you have the keys, whether it's a payment address or change, what its label is, and how it was derived.