Unfortunately, this is not the solution that I personally would have liked.
I posted some wishes on Slack a long time ago, but unfortunately I can no longer find them. Here are a few too. Wishlist and Fixlist - #2 by Duka
What I meant by iterating is exactly what you describe here.
Every time I want to read an asset list of an account, I have to query all asset IDs to see if there is a pool and I have to query whether there are rewards for each asset. If I use the v1.0 API (KleverProxy), thatโs 21 queries for 10 assets in the portfolio.
I have made a video of my KleverTip wallet. You can see how many unnecessary queries there are, just for one account.
Here is the video:
As far as the Node API is concerned, Klever is pretty poorly equipped. We should try to fix that. If I only have to rely on the KleverProxy, itโs neither decentralised nor, in the worst case, do I have any options for querying the accounts.
- Account query with AssetIDs and balance, reward infoโs etc.
- Validator query with all necessary information