Skip to main content
Connecting to a new Cosmos SDK chain typically involves configuring a few chain-specific parameters. CosmJS auto-detects the CometBFT version (0.37, 0.38, or 1.x), so transport setup is usually automatic.

Chain Configuration

The minimum configuration you need for a new chain:
The key parameters are:

Chains with Custom Modules

Most application-specific chains (Osmosis, dYdX, Stride, etc.) define custom modules beyond the standard Cosmos SDK set. Register their types and converters as described in the Custom Modules guide:
Many popular chains have pre-built TypeScript libraries generated with Telescope: OsmoJS for Osmosis, stargazejs for Stargaze, stridejs for Stride, and others. Check if one exists for your chain before writing custom module code.

Custom Account Parsers

Some chains use non-standard account types (e.g. EthAccount on EVM-compatible chains). The default accountFromAny parser won’t recognize them, causing account lookups to fail. Pass a custom accountParser to handle these:
The accountParser option is available on both StargateClient (read-only) and SigningStargateClient (signing). The parser receives an Any-encoded account from the auth module and must return an Account object with address, pubkey, accountNumber, and sequence.

HD Derivation Paths

Different chains may use different BIP-44 coin types in their HD derivation path. The default is m/44'/118'/0'/0/0 (coin type 118, the Cosmos Hub standard). Override this for chains that use a different coin type:
Common coin types:

Multiple Accounts

To derive multiple accounts from the same mnemonic, pass multiple HD paths:

Next Steps

Custom Modules

Build a complete module integration for your chain’s custom message types.

Code Generation

Use Telescope or ts-proto to generate TypeScript types from your chain’s protobuf definitions.

Cosmos EVM Chains

Special considerations for EVM-compatible Cosmos chains.