You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It this moment we have a one general schema - RpcQueryResponseSchema - for all request_type options - view_account, view_access_key etc.
Would be nice to create a separate shema per option, for example RpcQueryViewAccountResponseSchema - it will return the exact type instead of union, and eliminate a need to use if to get a real response type.
const parsed = RpcQueryResponseSchema().parse(camelCased);
if (!('keys' in parsed)) throw new Error('Invalid query response');