A TypeScript-based asset registry for the BitBadges Cosmos SDK chain, following the Osmosis Zone List format.
✅ TypeScript Support - Full type safety and IntelliSense
✅ JSON Schema Validation - Comprehensive validation against the schema
✅ Custom Validation Rules - Additional checks beyond JSON schema
✅ Testing Framework - Jest-based test suite
✅ Development Tools - ESLint, Prettier, and TypeScript configuration
✅ Osmosis Zone Compatible - Follows the exact format used by Osmosis Zone
bitbadges-asset-registry/
├── src/
│ ├── types.ts # TypeScript type definitions
│ ├── validator.ts # Asset registry validator class
│ ├── validate.ts # CLI validation script
│ ├── index.ts # Main entry point
│ └── __tests__/
│ └── validator.test.ts # Test suite
├── zone_assets.schema.json # JSON Schema for validation
├── assets.json # Asset registry data
├── package.json # Node.js dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── jest.config.js # Jest test configuration
├── .eslintrc.js # ESLint configuration
├── .prettierrc # Prettier configuration
└── README.md # This file
# Install dependencies
npm install
# Build the project
npm run build
# Run validation
npm run validate
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run format# Validate the asset registry
npm run validateimport { AssetRegistryValidator, AssetRegistry } from 'bitbadges-asset-registry';
// Create validator instance
const validator = new AssetRegistryValidator();
// Validate from file
const result = validator.validateFile('./assets.json');
// Validate from object
const registry: AssetRegistry = {
$schema: './zone_assets.schema.json',
chain_name: 'bitbadges',
assets: [
{
chain_name: 'bitbadges',
base_denom: 'ubadge',
categories: ['defi'],
override_properties: {
symbol: 'BADGE',
name: 'BitBadges Token'
}
}
]
};
const validationResult = validator.validate(registry);
if (validationResult.isValid) {
console.log('✅ Registry is valid!');
} else {
console.log('❌ Validation errors:', validationResult.errors);
}The asset registry follows the Osmosis Zone List format and includes:
chain_name- The name of the chain as used in the Cosmos Chain Registrybase_denom- The base denomination (e.g., "ubadge" for BitBadges token)
path- The IBC path for the assetosmosis_verified- Whether the asset has verified status on Osmosis Zoneosmosis_unstable- Whether the asset can reliably be transferred to/from Osmosisosmosis_disabled- Whether deposit/withdraw functions are disabledis_alloyed- Whether the asset is an Alloyed Asset on Osmosisosmosis_unlisted- Whether the asset should be temporarily unlistedosmosis_validated- Whether the asset has been confirmed to work correctlylisting_date_time_utc- When the asset was listed (ISO 8601 format)categories- Array of categories the asset belongs tooverride_properties- Properties that override Chain Registry defaults
defi- DeFi protocolsmeme- Meme tokensliquid_staking- Liquid staking tokenssail_initiative- Sail initiative tokensbridges- Bridge tokensnft_protocol- NFT protocol tokensdepin- DePIN tokensai- AI-related tokensstablecoin- Stablecoinsprivacy- Privacy-focused tokenssocial- Social tokensoracles- Oracle tokensdweb- Decentralized web tokensrwa- Real-world asset tokensgaming- Gaming tokensbuilt_on_osmosis- Tokens built on Osmosis
Replace "bitbadges" with your actual chain name in both the schema reference and the chain_name field.
Update the first asset entry with your chain's native token information:
{
"chain_name": "yourchain",
"base_denom": "uyourtoken",
"path": "transfer/channel-0/uyourtoken",
"override_properties": {
"symbol": "YOURTOKEN",
"name": "Your Chain Token",
"coingecko_id": "your-token-id"
}
}For each IBC connection, add an asset entry with the correct:
chain_nameof the source chainbase_denomof the assetpathwith the correct IBC channel information
Replace the logo URIs with actual paths to your token images in the Cosmos Chain Registry format.
npm run build- Compile TypeScript to JavaScriptnpm run dev- Watch mode for developmentnpm run validate- Validate the asset registrynpm test- Run the test suitenpm run lint- Lint the codenpm run format- Format the codenpm run clean- Clean build artifacts
When adding new assets:
- Ensure all required fields are present
- Use the correct base denominations (e.g., "uatom" not "atom")
- Verify IBC paths are correct
- Add appropriate categories
- Include proper logo URIs
- Run validation:
npm run validate - Run tests:
npm test
This asset registry format is compatible with Osmosis Zone and can be used to:
- List your assets on Osmosis Zone
- Enable IBC transfers between your chain and Osmosis
- Provide asset metadata for wallets and explorers
- Enable trading pairs on Osmosis DEX