For example, I have a BTC address. Can I (using RPC) get information is this address my local or remote?
The validateaddress
RPC will do precisely that. Here's sample output from a testnet address with Bitcoin Core 0.10.0:
{
"isvalid" : true,
"address" : "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe",
"ismine" : true,
"iswatchonly" : false,
"isscript" : false,
"pubkey" : "03bacb84c6464a58b3e0a53cc0ba4cb3b82848cd7bed25a7724b3cc75d76c9c1ba",
"iscompressed" : true,
"account" : "test label"
}
If the field ismine
is false, the address doesn't belong to the currently-running Bitcoin Core wallet.
-
1
-
@theymos thanks for editing. Karaslov: It was validateaddress; see the edit. (And sorry about the confusion.) – David A. Harding Jan 17 '15 at 21:19