-
Notifications
You must be signed in to change notification settings - Fork 112
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
Allowing to specify a different Encoding on GetAccountInfoWithConfig #122
base: main
Are you sure you want to change the base?
Conversation
Thanks for the contributing. Also, could you share the use case with me? I'm not sure why users need to specify the attribute cuz the data will be transferred into bytes eventually. No matter what users pass, the output data always be If you would like to get the encoded data, I think you can either
|
So maybe I understood wrong the Encoding field for that RPC method. Does it change the way the whole returned payload is encoded or it only does for the |
yeah. you can take a look at https://docs.solana.com/developing/clients/jsonrpc-api#getaccountinfo |
And out of curiosity how would you get the json information from the base64 data if you do not specify parsing to be |
Added the parsing of the response when you specify it to be jsonParsed. I still think it is needed but I might be missing something |
You can decode data to get it. Seems you would like to get a token account. You can either jsonParsed not only decodes for token account but also mint, vote, stake ... |
I got it, thanks a lot for your help. Then you are completely right and there is no need to add my code. |
This will keep the base GetAccount info to still use base64 encoding but allow users to specify a different one if they want to do so.