//
The token aliases registrar
Search
Duplicate
Try Notion
The token aliases registrar
Concept
The Token Aliases enables the creation of friendly on-chain metadata for various cryptocurrencies on the KIRA network. The network governance is responsible for associating metadata with tokens, ensuring the integrity of this information for use in frontend applications. This makes it easier to identify and track different cryptocurrencies on the network.
Governance
In order to create a proposal to add or modify aliases, an account must possess permission 🟢14 or 6 . Similarly, for voting on any alias proposals, an account must have permission 🟢15 .
Parameters
NAME
DESCRIPTION
symbol
The currency code or otherwise short abbreviation of a "single" token in its default denomination. For example: KEX, ETH, BTC, DOT, ATOM ....
name
Full, explicit name of the currency, for example: Bitcoin, Ethereum...
icon
URL to .SVG image (256kB max) representing currency or network logo
decimals
Number of currency decimals in the base of 10. For example value 3 would imply that the smallest unit of currency in it's default denomination would be 0.001
denoms
Array of possible denomination names of the token, such as ukex, satoshi, cent ...
📌
Removal of a token from the token aliases registry will automatically disable it by setting its Token Registrar properties stake_token and fee_token properties to false.
CLI functions description
tx tokens
proposal-upsert-alias - Create a proposal to upsert token alias
upsert-alias - Upsert token alias with sudo permission
query tokens
all-aliases - Get all token aliases
alias - Get the token alias by symbol
aliases-by-denom - Get token aliases by denom
Syntax & examples
📌
Each CLI command and proposal process in KIRA requires specific permissions. These permissions must be added to the account's whitelist or obtained as sudo permissions for direct changes. Refer to the Roles & Permissions documentation for more details. $SIGNER represents the transaction signer's account name or address. For instructions on setting common flags as environment variables, such as $FLAGS_TX and $FLAGS_QR, see the CLI flags configuration section
Transactions
$TITLE*
string
The title of the proposal
$DESCRIPTION*
string
The description of the proposal
$SYM*
string
The symbol of the token, e.g: BTC
$NAME*
string
The name of the token alias, e.g: Bitcoin
$ICON*
string
The icon URL of the token
$DEC*
int
The number of decimals of the token
$DENOM*
string
The denom values of the token e.g: satoshi
Creating & updating a token alias
The proposal-upsert-alias CLI can be used by accounts with permission 🟢14 to create or update a token alias through a proposal process. To vote on an alias proposal, an account must have permission 🟢15 .
Bash
Copy
sekaid tx tokens proposal-upsert-alias \ --from=$SIGNER $FLAGS_TX \ --title=$TITLE --description=$DESCRIPTION\ --symbol=$SYM --name=$NAME --icon=$ICON \ --decimals=$DEC --denoms=$DENOM
​
Bash
Copy
# Example sekaid tx tokens proposal-upsert-alias \ --from=$SIGNER $FLAGS_TX \ --title="Upsert Test TestCoin icon URL link" --description="Initial Setup From KIRA Manager" \ --symbol="TEST" --name="Test TestCoin" --icon="http://example.com/icon.svg" \ --decimals=8 --denoms="test"
​
Accounts with sudo permission 6 can use the upsert-alias CLI to create or modify token aliases without a proposal.
Bash
Copy
sekaid tx tokens upsert-alias \ --from=$SIGNER $FLAGS_TX \ --symbol=$SYM --name=$NAME --icon=$ICON --decimals=$DEC --denoms=$DENOM
​
Queries
List all existing aliases
Bash
Copy
sekaid query tokens all-aliases $FLAGS_QR | jq
​
Query a token alias using its symbol
Bash
Copy
sekaid query tokens alias $SYM $FLAGS_QR | jq
​
Query a token alias using its denom
Bash
Copy
sekaid query tokens aliases-by-denom $DENOM $FLAGS_QR | jq
​