tendermint / go-amino

Protobuf3 with Interface support - Designed for blockchains (deterministic, upgradeable, fast, and compact)
Other
260 stars 84 forks source link

Getters for data on Codec #291

Closed jackzampolin closed 4 years ago

jackzampolin commented 4 years ago

Expose read on typeInfos data to allow for client side code generation. Allowing users read access to these types would allow for generation of (for example) typescript definitions.

jackzampolin commented 4 years ago

I believe that the mutexs don't matter if the codec is locked. Also can you point out where we can expose those interfaces?

ethanfrey commented 4 years ago

What about accepting an interface in RegisterCodec, instead of a concrete struct (all throughout the sdk code).

Then one could pass in a RecordingCodec implementation that serializes all calls to some file, and if you pass that to the root RegisterCodec function in your app, you will get an output of all concrete types and interfaces.

hschoenburg commented 4 years ago

just following up here. This would be a huge help for a cosmos typescript client lib. Not sure I know how to implement properly but with some guidance im happy to try.