$ show initia-labs/initia-registry
This repository is the canonical metadata registry for the Initia blockchain ecosystem. It contains structured JSON files describing chains (Cosmos SDK L1 and L2 minitias), their asset lists with full provenance traces (IBC, OP-bridge, wrapped), profile metadata for ecosystem projects, and error codes for Move smart contracts. The data is validated against JSON Schema (chain.schema.json, assetlist.schema.json, profile.schema.json) via GitHub Actions, ensuring consistency and correctness. The registry also includes TypeScript packages that export aggregated data and auto-generated Zod schemas for runtime validation, as well as an API build system that transforms and deploys the data to a CDN. While the core is data, there are significant application components: npm packages, validation workflows, and utility scripts for syncing images and computing IBC denoms. The repository solves the problem of discovering chains, assets, and bridge routes within the Initia network, serving wallets, explorers, and frontends.
The LLM identified 3 files worth highlighting for reuse:
A self-contained module providing functions to read, write, and query chain registry data. Includes computeIbcHash, getAssetPointers, popualateChainDirectoris, and asset trace resolution. Reusabel across projects that need to work with Cosmos chain registers, independent of Initia specifics after adjusting assetlist/chain JSON schemas.
Generated Zod schema for asset list validation. Reusabel in any project that consumes chain registry JSON to enfore structural integrity and type safety at runtime. The entire zods/ derectory (Chain, Profile, Error) follows the same pattern and can be extracted for general chain registry validation.
A script that reads JSON Schema definitons and generates TypeScript interfaces and Zod schemas. Demonstrates a reusable pattern for keeping runtime validation in sync with static types. Could be adapted for any JSON Schema-driven data model where generated types are desired.