@osmosis-labs/proto-codecs
v5.1.0
Published
This package exports generated TypeScript libraries for encoding and decoding blockchain data, such as transactions. It also facilitates the conversion of Protobufs into TypeScript libraries for seamless data handling.
Downloads
109
Readme
@osmosis-labs/proto-codecs
This package exports generated TypeScript libraries for encoding and decoding blockchain data, such as transactions. It also facilitates the conversion of Protobufs into TypeScript libraries for seamless data handling.
Generation consists of three steps:
- Getting the proto files. Handled in
./scripts/get-proto.sh
- Generating the available packages to avoid outdated proto packages in the build. Handled in
./scripts/generate-package-types.ts
- Generate the TypeScript libraries using telescope. Handled in
./scripts/codegen.ts
Generation
To generate the TypeScript libraries, you can run the following command:
yarn generate
Build
After generating files, you can build the package by running the following command:
yarn build
or you can run it in watch mode by running the following command:
yarn dev
Getting Proto files
If you have not enabled permissions for running this bash script, you can run the following command:
chmod +x ./scripts/get-proto.sh
To get the proto files, you can run the following command:
yarn generate:proto
Generating Available packages
We generate available packages to avoid including erroneous/outdated proto packages in the build.
To generate the available packages, you can run the following command:
yarn generate:packages
Generating Proto Encoders
To generate the proto encoders, you can run the following command:
yarn generate:telescope