Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create package structure for stargate (Cosmos SDK 0.39) client lib #237

Closed
3 tasks done
webmaster128 opened this issue Jun 22, 2020 · 2 comments · Fixed by #252
Closed
3 tasks done

Create package structure for stargate (Cosmos SDK 0.39) client lib #237

webmaster128 opened this issue Jun 22, 2020 · 2 comments · Fixed by #252

Comments

@webmaster128
Copy link
Member

webmaster128 commented Jun 22, 2020

In order to provide a module and fully features client experience for Cosmos SDK 0.39 based blockchains, I suggest the following packages:

  • @cosmjs/sdk39: Analogue to @cosmjs/sdk38. The high level CosmosClient with signing capabilities. Possible connectors: RestClient, TendermintClient, GrpcClient (optional, see https://docs.cosmos.network/master/architecture/adr-021-protobuf-query-encoding.html#grpc-protocol-support).
  • @cosmjs/tendermint-rpc: for TendermintClient
  • @cosmjs/proto-signing: Decorators allowing users to add support for custom types. Statically generated container types (maybe some messages for testing decorator implementations); everything for signing in direct mode

stargate-dependencies


@webmaster128
Copy link
Member Author

Thinking about this more, I wonder if we really need to have decorators separate. The light/minimal versions of protobufjs should only make a difference if you load the full library into the browser. But with any app optimizer as the one bundled in the React tooling, the unused symbols are stripped off anyways.

The advantage of using our decorators for standard and custom messages is:

  • no static code generation needed for standard messages
  • the same type/experience for standard and custom types

@webmaster128
Copy link
Member Author

webmaster128 commented Jun 23, 2020

#241 shows how easy it is to create real world messages using decorators. This supports the idea of making decoratorsthe primary way to add message types, both internally and externally. I will update the original descriton to only use 3 packages instead of 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant