Asset balance for watch-only addresses

0 votes

I'm trying to get the asset balance for a watch only address. I've added the address to an extra account in the wallet. 

I can get the balance for the address in the wallet with getaddressbalances but not for a watch-only address. Maybe I'm doing something wrong but I don't know what. 

Regards, Joost

I've included some command-line info on what I'm trying to do:

root@ShadowNode:~/multichain# multichain-cli chain0 validateaddress 1Udrg6fZCkbuQATmf9ugQQXRfMPhE9fMLZ9cSc

{"method":"validateaddress","params":["1Udrg6fZCkbuQATmf9ugQQXRfMPhE9fMLZ9cSc"],"id":1,"chain_name":"chain0"}

 

{

"isvalid" : true,

"address" : "1Udrg6fZCkbuQATmf9ugQQXRfMPhE9fMLZ9cSc",

"ismine" : true,

"iswatchonly" : false,

"isscript" : false,

"pubkey" : "03847ef770c8ebc780064688608087d9fd24e76a239abc2010644c4d2985400fd6",

"iscompressed" : true,

"account" : ""

}

root@ShadowNode:~/multichain# multichain-cli chain0 getaddressbalances 1Udrg6fZCkbuQATmf9ugQQXRfMPhE9fMLZ9cSc

{"method":"getaddressbalances","params":["1Udrg6fZCkbuQATmf9ugQQXRfMPhE9fMLZ9cSc"],"id":1,"chain_name":"chain0"}

 

[

{

"name" : "asset1",

"assetref" : "112-265-21489",

"qty" : 999594.00000000

}

]

root@ShadowNode:~/multichain# multichain-cli chain0 validateaddress 1A5NAdx687vnZky9MSxdpZSyKjrsGZZJ39wwYu

{"method":"validateaddress","params":["1A5NAdx687vnZky9MSxdpZSyKjrsGZZJ39wwYu"],"id":1,"chain_name":"chain0"}

 

{

"isvalid" : true,

"address" : "1A5NAdx687vnZky9MSxdpZSyKjrsGZZJ39wwYu",

"ismine" : false,

"iswatchonly" : true,

"isscript" : false,

"account" : "Counterpart"

}

root@ShadowNode:~/multichain# multichain-cli chain0 getaddressbalances 1A5NAdx687vnZky9MSxdpZSyKjrsGZZJ39wwYu

{"method":"getaddressbalances","params":["1A5NAdx687vnZky9MSxdpZSyKjrsGZZJ39wwYu"],"id":1,"chain_name":"chain0"}

 

[

 

asked Nov 13, 2015 by Joost

2 Answers

0 votes
Thanks. It sounds like you may have uncovered a simple problem we need to fix. I'll talk to the developers and let you know.
answered Nov 13, 2015 by MultiChain
0 votes

This issue should be fixed in alpha 11 just released, i.e. you should now be able to call getaddressbalances with a watch-only address.

answered Nov 19, 2015 by MultiChain
Grant,
This update is very helpfull
getaddressbalances of non wallet addresses
...