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.