A CLI tool and library for generating TypeScript types, message composers, and React query hooks from CosmWasm smart contract JSON schemas. Version 0.3.9 is an older release; the project has been renamed to @cosmwasm/ts-codegen (current v0.35.x) with breaking changes in plugin names and React Query defaults. It provides a code-first approach for Cosmos ecosystem dApp development, generating fully typed client-side code from Rust contract schemas. Compared to manual type definitions, it automates type safety and reduces boilerplate for CosmWasm frontends.
npm install cosmwasm-typescript-genNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates TypeScript client code from a CosmWasm contract schema, including types, message builders, and optionally React Query or Recoil hooks.
Migrate to @cosmwasm/ts-codegen (npm install --save-dev @cosmwasm/ts-codegen). Update command usage accordingly.
Update any imports referencing MessageComposer to MsgComposer.
Pass --reactQueryVersion=3 flag during generation if using React Query v3, or update your React Query to v4.
Ensure your Rust contract generates JSON schemas via cosmwasm-schema. Run 'cargo schema' in the contract directory before using this tool.
npm install @cosmjs/stargate @cosmjs/cosmwasm-stargate
Use npx cosmwasm-typescript-gen generate ... or install locally: npm install --save-dev cosmwasm-typescript-gen@0.3.9
Verify the schema directory exists and contains .json files. Ensure you've run 'cargo schema' in your contract project.
Install required CosmJS packages: npm install @cosmjs/stargate @cosmjs/cosmwasm-stargate
No dependency data recorded yet.