A modular TypeScript/JavaScript library for building clients for Cosmos SDK and CosmWasm blockchain applications.
CosmJS is a TypeScript/JavaScript library that serves as a Swiss Army knife for building client applications in the Cosmos blockchain ecosystem. It provides the essential tools and client libraries needed to interact with Cosmos SDK and CosmWasm-based blockchains, enabling the development of web apps, explorers, browser extensions, and server-side clients like faucets. The project solves the problem of fragmented tooling by offering a unified, modular suite of packages for blockchain interaction.
JavaScript/TypeScript developers building client-side applications, tools, or services for Cosmos-based blockchains, including those creating wallets, explorers, dApp frontends, or backend utilities.
Developers choose CosmJS for its comprehensive, modular approach that covers the full spectrum of client needs in the Cosmos ecosystem, from low-level cryptography to high-level SDK clients, all maintained with a focus on clean dependencies and multi-environment support without requiring Internet Explorer compatibility.
The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Consists of many smaller, focused npm packages such as @cosmjs/stargate and @cosmjs/crypto, enabling developers to include only necessary components and maintain a clean dependency tree, as highlighted in the dependency diagram.
Runs in Node.js 20+, modern browsers, and browser extensions, with WebAssembly for cryptographic functions, ensuring wide compatibility across client environments without IE support.
Provides client libraries for Cosmos SDK 0.40+ (Stargate) and chains with CosmWasm module enabled, making it a go-to for building applications like wallets and explorers in the Cosmos network.
Allows integration with custom Stargate modules for extended blockchain functionality, documented in the CUSTOM_PROTOBUF_CODECS.md file, supporting tailored implementations.
Requires explicit webpack configurations for different versions, and the dependency tree is intricate, which can be daunting for new users, as evidenced by the provided webpack configs and dependency diagrams.
The API documentation is hosted separately, tricky to navigate, and requires basic TypeScript understanding, potentially hindering quick adoption for JavaScript-focused developers, as admitted in the README.
Known issues include verified queries failing with Cosmos SDK 0.44+ backends and unsupported decoding for blocks of height 1 in older versions, indicating compatibility concerns and breaking changes that require workarounds.