How to register assets
This recipe demonstrates how to register local (non-crosschain) assets using FT4 admin operations. This is essential for creating new assets that are native to a specific blockchain within the Chromia ecosystem.
- JS/TS client
Prerequisites
- Chromia CLI
- Docker (for local blockchain)
- Node.js
- FT4 client
- Postchain client
Demo script
Key Features
This recipe includes examples for:
- Local asset creation - Registering assets native to a specific blockchain
- Asset metadata - Configuring asset name, symbol, decimals, and icon URL
- Admin operations - Using FT4 admin functions for asset registration
- Asset verification - Confirming successful registration through queries
Architecture Overview
The recipe includes both server and client components:
Rell Module (Server-side)
- FT4 integration - Uses FT4 library for asset management
- Admin operations - Implements admin-level asset registration functions
- Test coverage - Unit tests demonstrating registration process and verification
JavaScript Client
- Admin authentication - Uses admin signature provider for authorization
- Asset configuration - Defines asset properties (name, symbol, decimals, icon URL)
- Registration execution - Calls the
registerAssetfunction
Registration Process
The local asset registration follows this workflow:
- Admin setup - Configure admin private/public key pair for authorization
- Asset metadata - Define asset name, symbol, decimal places, and icon URL
- Registration call - Execute the
registerAssetoperation - Verification - Confirm successful registration through asset queries
- Asset availability - The asset becomes available for use on the blockchain
Required Information
To register a local asset, you need:
- Admin credentials - Private and public key pair with admin privileges
- Asset name - A descriptive name for the asset (e.g., "TestAsset")
- Asset symbol - A short symbol identifier (e.g., "TA")
- Decimal places - Number of decimal places for the asset (typically 6-18)
- Icon URL - Optional URL pointing to the asset's icon image
Administrative Requirements
This operation requires administrative privileges:
- Admin keypair - Must have admin rights on the target blockchain
- Proper authorization - Admin signature provider must be correctly configured
- Network access - Connection to the appropriate network nodes
- Unique asset - Asset symbol must be unique on the blockchain
Asset Properties
When registering an asset, you configure:
- Name - Full descriptive name of the asset
- Symbol - Short identifier used in transactions and displays
- Decimals - Precision level for fractional amounts
- Icon URL - Visual representation for user interfaces
Use Cases
Local asset registration is essential for:
- Native tokens - Creating blockchain-specific utility tokens
- Governance tokens - Tokens for decentralized governance systems
- Reward systems - Custom tokens for incentive mechanisms
- Application tokens - Tokens specific to particular dapps
- Stablecoins - Blockchain-native stable value tokens
Learn more
- FT4 client documentation — covers FT4 operations and admin functions.
- Asset management — detailed guide on FT4 assets and local asset functionality.
- JavaScript/TypeScript client — covers setup, connection, and usage patterns.