Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to decode the response of ABCIQuery? #76

Closed
heshuchao opened this issue Aug 6, 2019 · 1 comment
Closed

How to decode the response of ABCIQuery? #76

heshuchao opened this issue Aug 6, 2019 · 1 comment

Comments

@heshuchao
Copy link

When get account balance by node RPC API, the ABCIQuery's path "/store/acc/key" returns amino-encoded string.
S9xMJwqZAQoU2h8pqmnHMwEZj0aev9+Dl6RdX/gSCwoDQk5CEMW8zopAEg4KCEJUQ0ItMURFELDqARIRCgdDT1MtMkU0EICS+6+G2QgSEAoHR0lWLTk0RRCAoLeH6QUSEAoJVVNEU0ItMUFDELC2wwEaJuta6YchAxtKZAZBHnTpu+kOOTEacbgw1TB14nwSIZIEBc40M+6xIIH5Aij2Pg==

after base-64 decode, I tried to decode the response to struct
type ResponseQuery struct { Code uint32 Log string Info string Index int64 Key []byte Value []byte Proof *merkle.Proof Height int64 Codespace string }
but failed.

so how can I get the JSON result shown in document ?

@chainwhisper
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants