Key for account balance API

Our blockchain requires account’s “view key” in order to query the account balance.

Looks like the request schema doesn’t have it, so we are wondering what are the potential ways that we can have the view key in order to support this API.

Thanks a lot!

1 Like

I’d probably have the Rosetta API server hold some known view keys.

If all transaction data is visible, you could also have the server calculate all accounts’ balances on its own.

What’s the security goal of these view keys?

@oasis-w Thanks for your reply.

Security goal of view keys is to enable users to see their own account, not others. Viewing the balance of an arbitrary account is not possible in our blockchain.

do you have a solution for how to show blocks and transactions through rosetta?