Allowing to specify a different Encoding on GetAccountInfoWithConfig#122
Allowing to specify a different Encoding on GetAccountInfoWithConfig#122pegartillo95 wants to merge 4 commits into
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.