-
Notifications
You must be signed in to change notification settings - Fork 48
@sei-js/cosmos #200
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
@sei-js/cosmos #200
Conversation
- Removed the need for telescope and instead generate TS files with buf.build and cherry pick what we want. - Adds @sei-js/cosmos/types for easy typescript types imports - Adds @sei-js/cosmos/encoding for easy proto/direct message encoding - Adds @sei-js/cosmos/rest which allows for querying cosmos REST nodes - Removes leading zeros from @sei-js/ledger bytes and bumps the sei ledger package version - Remove tsconfig in favor of biome for this package.
- Added ts-configs back - Fixed a few typescript warnings inside the encoding library. - Update README.md
- Compiled outputs for cjs, esm, and ts types imports respectively - Added @ts-nocheck to index files
Replace the old Amino type structure (module.package.type) to the more standard amino way (module/type), which is required for Ledger signing.
🦋 Changeset detectedLatest commit: dbde1da The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wanted to confirm - is /generated supposed to be checked into git?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah cuz otherwise people won't be able to view the files on github. They would have to install the module and build, which isn't ideal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I did add it to .npmignore, so that way it's only when viewing the repo it will get them.
Used the old `/gen` instead of newer `/generated`
Add @sei-js/cosmos
Adds a new package called
@sei-js/cosmoswhich is meant to replace and expand upon@sei-js/proto. It usesbufto build the protos, and then node scripts to extract only relevant into simplified libraries.Libraries
@sei-js/cosmos/typesA library exporting Typescript types for all modules used on Sei. Additionally it contains query Request/Response types, and other base types like
Coin,Account, etc.@sei-js/cosmos/encodingA replacement to the old
@sei-js/protolibrary, which was generated by telescope. Contains protobuf encoding and decoding functions for all Sei data types including all Query and Execute Msg types and all Sei base types. Additionally it includes registries and aminoConverters for easy use with@cosmjsclients. Uses types from@sei-js/cosmos/types.@sei-js/cosmos/typesA replacement to the LCD client generated in the old
@sei-js/protolibrary. This uses simple fetch requests to query the chain state. Uses types from@sei-js/cosmos/types.Review Notes
Look into the
./generatedfolder to see the output from theyarn generatecommand. See the README.md file for usage or local generation instructionsTesting
This project has been tested by me extensively, has been used to test ledger signing on the Cosmos app, has been integrated for months into QA tests, and is now used on the Sei App via the NPM internal release.