Packages
CosmJS is published as a set of scoped npm packages. Use the ones that match your needs:| Package | Description |
|---|---|
@cosmjs/stargate | High-level client for querying and broadcasting on Cosmos SDK 0.40+ chains |
@cosmjs/proto-signing | Wallet primitives and Protobuf-based transaction signing |
@cosmjs/cosmwasm | Client for CosmWasm-enabled chains |
@cosmjs/amino | Amino signing support for legacy compatibility |
@cosmjs/tendermint-rpc | Low-level Tendermint/CometBFT RPC client |
@cosmjs/encoding | Encoding utilities (hex, base64, bech32, UTF-8) |
@cosmjs/math | Integer and decimal math for blockchain amounts |
@cosmjs/crypto | Cryptographic primitives (secp256k1, SHA-256, etc.) |
Key Features
- Query chain state — balances, accounts, staking, governance, and arbitrary module queries via Tendermint/CometBFT RPC
- Sign transactions — Protobuf (
SIGN_MODE_DIRECT) and Amino (SIGN_MODE_LEGACY_AMINO_JSON) signing - Broadcast transactions — submit signed transactions and monitor results
- Wallet support — generate wallets from mnemonics or integrate browser extensions like Keplr and Leap
- Custom modules — register custom message types for application-specific chains
- CosmWasm — first-class support for deploying, instantiating, and executing smart contracts
Getting Started
Quick Start
Install CosmJS, connect to a node, query state, and send your first transaction.
Clients
Understand read-only and signing clients.
Querying
Query balances, accounts, staking, governance, and more.
Transactions
Send tokens and broadcast arbitrary messages.