JavaScript/TypeScript REST API client for Cosmos SDK blockchain. Current stable version is 0.42.14, with the first two version digits matching the targeted Cosmos SDK release (0.42.x). Release cadence follows Cosmos SDK releases for minor versions, with independent patch updates. Key differentiators: provides full TypeScript types, generates protobuf definitions on-the-fly, supports account generation from mnemonics, transaction building and signing, and broadcasting. It uses Long for 64-bit integers and requires a running Cosmos SDK node with REST API enabled.
npm install cosmos-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a CosmosSDK instance, queries account info for an address, and prints it.
Use version that matches your target Cosmos SDK version (e.g., 0.44.x for SDK v0.44.x).
Consider using @cosmjs/stargate for gRPC-web based clients.
Use cosmosclient.Long.fromString('200000') instead of 200000.Ensure imports include { proto } from 'cosmos-client'.Add optional chaining or type guard: res.data?.account && cosmosclient.codec.unpackCosmosAny(res.data.account)
Use cosmosclient.Long.fromString('200000') instead of 200000Import from the correct path: import { codes } from 'cosmos-client/x/...