Closed leofisG closed 3 years ago
Don't want to open another issue, perhaps silly question by why not use 'jsonParsed' option (https://docs.solana.com/apps/jsonrpc-api#accountsubscribe) instead of base64? It's because it's unstable?
This will only work with the native program in Solana. The Serum program is not native so it will not get parsed (since it doesn't know the format), and base64
result will be returned even if you used the jsonParsed
option.
Got it, makes perfect sense, thanks!
I'm told this will be addressed, at least in part, by https://github.com/solana-labs/solana/issues/11214. There should be generic Solana tools to generate IDLs along with clients.
This repository has moved to https://github.com/project-serum/serum-ts/tree/master/packages/serum. Please migrate this issue over, if desired.
Currently, a huge part of the
js-serum
client codebase is doing binary parsing (which is returned by the Solana client), i.e. from a binary format to JS class. If someone is to build another client say, in Python, the developer needs to implement similar parsing logic to convert from a binary format into the language native format which is super error-prone and tedious.It will be great if the conversion from binary format to a language-specific format can be done once across various language. The team can have a conversion from binary to, say
protobuf
orjson
. So it will be easier for different language client to be built.