cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
645 stars 330 forks source link

Add Client class to serve as a general purpose base without message types #1486

Open webmaster128 opened 11 months ago

jgimeno commented 6 months ago

Hi Simon, I wonder if this can also solve the oposite scenario. Imagine that I have some data in proto format coming from a query, in the SDK I can use reflection and the interfaceRegistry to get back at least the json representation of that code.

Do you know if this is something that can be done with cosmjs?

webmaster128 commented 6 months ago

Do you know if this is something that can be done with cosmjs?

We designed CosmJS with a lot of type safety in mind. A fully dynamic approach would give you no guarantees at compile time. I think both approaches are valid but a client-library focussed on reflections would be a different projects with different trade-offs. I'm happy if someone builds that but it's out of scope for CosmJS.