Token Aliases Registrar
Overview
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.
Parameters
Removal of a token from the token aliases registry will automatically disable it by setting its Token Rates Registrar properties stake_token
and fee_token
properties to false
.
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 satoshi , cent ... |
CLI 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 Guide page.
- Transactions
- Queries
- Governance
Transactions
upsert-alias | Create or modify token aliases with sudo permission. |
---|
Upsert Token Alias With Sudo Permission
The upsert-alias
CLI command allows accounts with sudo permission to create or modify token aliases without a proposal.
Flags
$SYM
: The symbol of the token.$NAME
: The name of the token alias.$ICON
: The icon URL of the token.$DEC
: The number of decimals of the token.$DENOM
: The denom values of the token.
sekaid tx tokens upsert-alias \
--from=$SIGNER $FLAGS_TX \
--symbol=$SYM --name=$NAME --icon=$ICON --decimals=$DEC --denoms=$DENOM
Queries
all-aliases | List all existing token aliases. |
---|---|
alias | Query a token alias using its symbol. |
aliases-by-denom | Query a token alias using its denomination. |
List All Existing Aliases
Use the all-aliases
command to retrieve all token aliases.
sekaid query tokens all-aliases $FLAGS_QR | jq
Query a Token Alias Using Its Symbol
To query a token alias using its symbol, use the alias
command.
Args
$SYM
: The symbol of the token whose alias is to be queried.
sekaid query tokens alias $SYM $FLAGS_QR | jq
Query a Token Alias Using Its Denom
The aliases-by-denom
command allows querying a token alias using its denomination.
Args
$DENOM
: The denomination of the token whose alias is to be queried.
sekaid query tokens aliases-by-denom $DENOM $FLAGS_QR | jq
Governance
In order to create a proposal to add or modify aliases, an account must possess permission 14[broken link] or 6[broken link] . Similarly, for voting on any alias proposals, an account must have permission 15[broken link] .
proposal-upsert-alias | Create or update a token alias through a proposal process. |
---|
Proposal to Upsert Token Alias
The proposal-upsert-alias
CLI command is used to create or update a token alias through a proposal process.
Flags
$TITLE
: The title of the proposal.$DESCRIPTION
: The description of the proposal.$SYM
: The symbol of the token (e.g.,BTC
).$NAME
: The name of the token alias (e.g.,Bitcoin
).$ICON
: The icon URL of the token.$DEC
: The number of decimals of the token.$DENOM
: The denom values of the token (e.g.,satoshi
).
sekaid tx tokens proposal-upsert-alias \
--from=$SIGNER $FLAGS_TX \
--title=$TITLE --description=$DESCRIPTION \
--symbol=$SYM --name=$NAME --icon=$ICON \
--decimals=$DEC --denoms=$DENOM