Registry / devops / cosmscript

cosmscript

JSON →
library0.0.18jsnpmunverified

A TypeScript transpiler for CosmWasm smart contracts that generates type-safe client libraries from Protobuf schemas. Current stable version is 0.0.18, with irregular releases. It differentiates from other code generators by focusing on end-to-end TypeScript support and integration with the Cosmos ecosystem. Note: The version is very early (0.0.18) and the package may have limited stability.

devopsserialization
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Package is ESM-only; CommonJS require will fail.

import { cosmscript } from 'cosmscript'

CosmWasmClient is not part of cosmscript; it comes from @cosmjs/cosmwasm-stargate.

import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'

generate is a named export, not default.

import { generate } from 'cosmscript'

Install cosmscript globally, generate client code from a CosmWasm schema, then use the generated client to query a contract.

// Install cosmscript globally // npm install -g cosmscript // Generate TypeScript types from schema // cosmscript generate \ // --schema ./schema \ // --out ./src \ // --name MyContract // Example using generated code: import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'; import { MyContractQueryClient } from './src/MyContract.client'; const client = await CosmWasmClient.connect('https://rpc.cosmos.network'); const queryClient = new MyContractQueryClient(client, 'cosmos1...'); const config = await queryClient.config(); console.log(config);
cosmscript --version
Debug
Known footguns
gotchacosmscript version 0.0.18 is very early; API may break without notice.
breakingPackage is ESM-only; does not support CommonJS require.
gotchaGenerated code depends on @cosmjs/cosmwasm-stargate and @cosmjs/proto-signing; these must be installed separately.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources