Skip to main content

Resolver Keys

Actualy, you can use any key you want in a resolving record. This doc is just a reference for well-knoewed keys in public resolver.

Keys with Canister-Side Validation

There are some keys that will be validated on the canister side when setting a resolving record.

KeyDescription
token.ethETH address
token.btcBTC address
token.icpPrincipal or AccountId for ICP. obsolete: split into two keys principal.icp and account_id.icp
token.ltcLTC address
canister.icpcanister principal you want to redirect to when resolving this name as a web domain
principal.icpICP Principal
account_id.icpICP AccountId

Keys without Canister-Side Validation

These keys are not validated on the canister side when setting a resolving record, that means you can set any value in the record.

KeyDescription
emailEmail (1)
urlA url that you want to redirect when resolving this name
avatarAvatar url (1)
descriptionDescription (1)
noticeNotice (1)
keywordsKeywords (1)
locationLocation (1)
display_nameDisplayName (1)
com.twitterTwitter url (1)
com.githubGithub url (1)
com.facebookFacebook url (1)
com.mediumMedium url (1)
com.discordDiscord url (1)
com.telegramTelegram url (1)
com.instagramInstagram url (1)
com.redditReddit url (1)
com.dscvrDscvr url (1)
com.distriktDistrikt url (1)
com.relationRelation url (1)
com.openchatOpenchat url (1)
settings.reverse_resolution.principal

(1) The value of this key is display on your name.ic.dance profile page.

Other Keys

Actually, you can use any key you want in a resolving record. There are some limitations:

  • Max length of value is 512 characters.
  • Max length of key is 64 characters.
  • Max count of resolving records in a name is 30.

For exmaple, you can set a resolving record with key phone to "123456789" if you like.

Resolving Convention

There are some rules for resolving a name to make sure every client can resolve the name as the same rule.

Resolving to Web Url

As you know, a name can be resolved to a web url to make your visit the url in a web browser or some apps.

ICNaming browser extension is one of the clients to enable users to visit the url by typing a name.

To resolve a name to a web url, you can use the following keys:

  1. Resolving with key url and redirect to it, if empty, move next.
  2. Resolving with key icp.canister and redirect to ${icp.canister}.raw.ic0.app, if empty, move next.
  3. Redirect to https://app.icnaming.com.

Resolving to ICP Ledger AccountId

A name can be resolved to an ICP Ledger AccountId to enable user to transfer ICP to the account.

To resolve a name to an ICP Ledger AccountId, you can use the following keys:

  1. Resolving with key principal.icp and use it as target accountId, if empty, move next.
  2. Resolving with key account_id.icp and use it as target accountId, if empty, move next.
  3. Failed to resolve.

Reverse Resolution Principal to Name

Reverse resolution is a feature to reverse resolve a name from a principal.

When user set a resolving record with key settings.reverse_resolution.principal, the name will be resolved to the principal.

To set this value, you need to be the owner of the principal and name.

If a user ownes multiple names, there can be only a resolveing record with key settings.reverse_resolution.principal among them.

To reverse resolve a name from a principal, you can use reverse_resolve_principal method in resolver canister.

For example, you can set a resolving record with key settings.reverse_resolution.principal to "my-principal" for name "hello.ic".

Then, the result of reverse_resolve_principal("my-principal") will be "hello.ic".