Some checks are pending
Docs Deploy / build_and_deploy (push) Waiting to run
Generate Docs / cli (push) Waiting to run
Generate Config Doc / cli (push) Waiting to run
Go formatting / go-formatting (push) Waiting to run
Check links / markdown-link-check (push) Waiting to run
Integration / pre-test (push) Waiting to run
Integration / test on (push) Blocked by required conditions
Integration / status (push) Blocked by required conditions
Lint / Lint Go code (push) Waiting to run
Test / test (ubuntu-latest) (push) Waiting to run
1.3 KiB
1.3 KiB
| sidebar_position | title | slug |
|---|---|---|
| 3 | Chain Registry Types (chainregistry) | /packages/chainregistry |
Chain Registry Types (chainregistry)
The chainregistry package defines strongly-typed Go structs for Cosmos chain-registry data (chain.json and assetlist.json).
For full API details, see the
chainregistry Go package documentation.
When to use
- Parse chain-registry JSON into typed values.
- Build tooling that reads chain metadata (APIs, fees, staking tokens, assets).
- Validate or transform registry documents before writing them back.
Key APIs
type Chain struct{ ... }type APIs struct{ ... }type APIProvider struct{ ... }type AssetList struct{ ... }type Asset struct{ ... }type Fees struct{ ... }type Staking struct{ ... }type Codebase struct{ ... }type ChainStatus stringtype ChainType string
Common Tasks
- Decode
chain.jsondata into aChainvalue and inspect RPC/REST metadata. - Decode
assetlist.jsonintoAssetListto access denom units and logo URIs. - Use enum-like types (
ChainStatus,NetworkType,ChainType) to keep metadata checks explicit.
Basic import
import "github.com/ignite/cli/v29/ignite/pkg/chainregistry"