Closed mibuono closed 1 month ago
After some investigation, what I can confirm is that, we cannot use the protojson
library to convert the ProtoMessage to Json formatted output. Because,
1) It turns out the authors of the repo from google, dont want people building on it, so they introduce inconsistencies in the json output. Thus it is not useful for encoding and decoding in json reliably.
2) Library is that it encodes the values into base64, and that cannot be changed and our RPC outputs have a hex reliance.
Thus only way we can move forward with using proto as a json encoding is if we can find a reliable library that does this and lets us also have hex encoding.
I confirmed with @kiltsonfire and we will make the changes suggested in the google doc but use the existing marshling techniques to make the changes.
This PR has been merged, only things that is left is the transaction fields clean up which is coming with the gas price
Here's our RPC typing proposal: https://docs.google.com/document/d/1HVyvg6Ka91HWsJvvzqvg23I9FKjKXCMOGKMX8QCOVHw/edit
I've attached examples of each of the proposed changes in JSON