BitShares Forum
Main => Technical Support => Topic started by: tanselkaya on April 10, 2018, 07:51:49 am
-
Is it possible to know how much each account owns of a particular UIA? We would like to create a mechanism where we pay dividends to holders of our UIA. I issued some, I sent some, then there will be buys&sells. How can I know the total at each user.
If there is such a thing, what happens when confidential transactions are used?
Thanks a lot.
-
It seems that it's impossible to get such info using the standard wallets (like wallet.bitshares.org) or command line wallet. However there are websites that analyze the bitshares blockchain and provide information about asset holders. These websites are http://cryptofresh.com (http://cryptofresh.com) and http://bitshares-explorer.io/ (http://bitshares-explorer.io/)
-
Thank you very much. As you indicated bitshares-explorer.io is capable of listing the asset holders. I'm assuming it is making a call to the asset api.
https://github.com/bitshares/bitshares-core/blob/master/libraries/app/include/graphene/app/api.hpp#L314
-
https://github.com/bitshares/bitshares-core/blob/master/libraries/app/include/graphene/app/api.hpp#L352-L354
not enabled on most public nodes tho. A request would look like this:
'{"method": "call", "params": ["asset", "get_asset_holders", ["1.3.0", 0, 100]], "jsonrpc": "2.0", "id": 9}'
if the asset_api is enabled on the node
-
Use snapshot plugin if there are many holders. With asset_api, while you're fetching next page, the state (balances and etc) may have changed.
For more info, check
./witness_node --help