This guide explains how to add a new Cosmos SDK-based blockchain to The Extension Wallet.
The wallet uses the Cosmos Chain Registry as the authoritative source for chain and asset data. This community-maintained repository contains configuration for 200+ Cosmos chains.
┌─────────────────────────────────────────────────────────────────┐
│ Cosmos Chain Registry (github.com/cosmos/chain-registry) │
│ ├── osmosis/ │
│ │ ├── chain.json → Network config (RPC, REST, fees) │
│ │ └── assetlist.json → Token definitions (denoms, logos) │
│ ├── cosmoshub/ │
│ └── ... 200+ chains │
└─────────────────────────────────────────────────────────────────┘
↓
npm run sync:chains
↓
┌─────────────────────────────────────────────────────────────────┐
│ Generated Wallet Config │
│ ├── src/lib/networks/cosmos-registry.ts (chain configs) │
│ └── src/lib/assets/cosmos-registry.ts (asset definitions) │
└─────────────────────────────────────────────────────────────────┘
If the chain isn't already in the registry, submit a PR to the Cosmos Chain Registry first:
- Fork cosmos/chain-registry
- Create a directory for your chain (e.g.,
mychain/) - Add
chain.jsonwith network configuration - Add
assetlist.jsonwith token definitions - Submit a PR following their contribution guidelines
Once merged, run the sync script to pull the chain into the wallet:
# Sync your chain (and other defaults)
npm run sync:chains -- --chains mychain,osmosis,cosmoshub
# Or add to the DEFAULT_CHAINS in scripts/sync-chain-registry.ts
# then run:
npm run sync:chainschain.json (required fields):
{
"chain_name": "mychain",
"chain_id": "mychain-1",
"pretty_name": "My Chain",
"status": "live",
"network_type": "mainnet",
"bech32_prefix": "mychain",
"slip44": 118,
"fees": {
"fee_tokens": [
{
"denom": "umytoken",
"average_gas_price": 0.025
}
]
},
"apis": {
"rpc": [
{ "address": "https://rpc.mychain.io", "provider": "MyChain" },
{ "address": "https://mychain-rpc.polkachu.com", "provider": "Polkachu" }
],
"rest": [
{ "address": "https://api.mychain.io", "provider": "MyChain" },
{ "address": "https://mychain-api.polkachu.com", "provider": "Polkachu" }
]
},
"explorers": [
{
"kind": "mintscan",
"url": "https://www.mintscan.io/mychain",
"tx_page": "https://www.mintscan.io/mychain/tx/${txHash}",
"account_page": "https://www.mintscan.io/mychain/account/${accountAddress}"
}
]
}assetlist.json:
{
"chain_name": "mychain",
"assets": [
{
"denom_units": [
{ "denom": "umytoken", "exponent": 0 },
{ "denom": "mytoken", "exponent": 6 }
],
"base": "umytoken",
"name": "My Token",
"display": "mytoken",
"symbol": "MYT",
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/mychain/images/mytoken.png"
},
"coingecko_id": "my-token"
}
]
}For chains in the registry but not pre-bundled, users can enable them at runtime:
import { chainRegistryClient } from '@/lib/networks';
// Fetch chain config dynamically
const chain = await chainRegistryClient.fetchChain('juno');
// Search available chains
const results = await chainRegistryClient.searchChains('terra');
// Get list of all available chains
const available = await chainRegistryClient.getAvailableChains();The dynamic client:
- Fetches from the chain registry on-demand
- Caches results in
browser.storage.localfor 24 hours - Works for any chain in the registry
For chains not in the registry, or for custom/private networks, you can still add manual configurations.
Add the network configuration in src/lib/networks/cosmos.ts:
export const NEW_CHAIN_MAINNET: CosmosNetworkConfig = {
id: 'newchain-1',
name: 'New Chain',
type: 'cosmos',
enabled: true,
symbol: 'NEW',
decimals: 6,
coinType: 118,
rpc: ['https://rpc.newchain.io', 'https://rpc-2.newchain.io'],
rest: ['https://api.newchain.io', 'https://api-2.newchain.io'],
bech32Prefix: 'new',
feeDenom: 'unew',
gasPrice: '0.025',
features: ['stargate', 'ibc-transfer', 'no-legacy-stdTx'],
explorerUrl: 'https://explorer.newchain.io',
explorerAccountPath: '/account/{address}',
explorerTxPath: '/tx/{txHash}',
};
// Register in the networks array
export const COSMOS_NETWORKS: CosmosNetworkConfig[] = [
// ... existing networks
NEW_CHAIN_MAINNET,
];In src/lib/assets/chainRegistry.ts:
const chainNameMap: Record<string, string> = {
// ... existing mappings
'newchain-1': 'newchain',
};
const fallbackAssets: Record<string, RegistryAsset[]> = {
// ... existing assets
'newchain-1': [
{
symbol: 'NEW',
name: 'New Chain',
denom: 'unew',
decimals: 6,
coingeckoId: 'newchain',
},
],
};| Field | Description | Example |
|---|---|---|
id |
Chain ID (unique identifier) | cosmoshub-4 |
name |
Human-readable name | Cosmos Hub |
symbol |
Native token ticker | ATOM |
decimals |
Token decimal places | 6 |
coinType |
BIP44 coin type | 118 |
rpc |
Tendermint RPC endpoints (array for failover) | ['https://rpc.cosmos.network', ...] |
rest |
REST/LCD API endpoints (array for failover) | ['https://api.cosmos.network', ...] |
bech32Prefix |
Address prefix | cosmos |
feeDenom |
Fee token denomination | uatom |
gasPrice |
Default gas price | 0.025 |
features |
Supported features array | See below |
stargate- Stargate-compatible chain (most modern chains)ibc-transfer- IBC token transfers supportedno-legacy-stdTx- Uses new transaction formatcosmwasm- CosmWasm smart contracts (if supported)
The wallet automatically handles endpoint failover:
- Endpoints are tried in order of preference
- Failed endpoints are temporarily marked unhealthy
- Healthy endpoints are preferred for subsequent requests
- Include at least 2-3 endpoints for reliability
Recommended RPC providers:
- Polkachu
- Notional
- Lavender.Five
- Chain's official endpoints
# Sync default chains (defined in DEFAULT_CHAINS)
npm run sync:chains
# Sync specific chains
npm run sync:chains -- --chains osmosis,juno,stargaze
# View available chains
# Check: https://github.com/cosmos/chain-registry (directory names)The sync script generates:
src/lib/networks/cosmos-registry.ts- Chain configurationssrc/lib/assets/cosmos-registry.ts- Asset definitions with logos
After adding a chain:
- Run
npm run sync:chains(if using registry method) - Build the extension:
npm run build - Load the unpacked extension in Chrome
- Verify the network appears in the network selector
- Test address derivation
- Test balance fetching
- Test sending transactions (on testnet first if available)
- Ensure the chain has
status: "live"andnetwork_type: "mainnet"in the registry - Check the sync script output for errors
- Verify the chain name matches the registry directory
- Check that REST endpoints are accessible
- Verify the
feeDenommatches the chain's actual fee token
- Ensure
bech32_prefixis correct in the chain registry - Check
slip44coin type matches (118 for most Cosmos chains)
- Cosmos Chain Registry - Source of truth for chain data
- Chain Registry NPM Package - TypeScript types and utilities
- BIP44 Coin Types
- Cosmos SDK Documentation