Skip to main content

web3names

In short, web3names are user-friendly aliases for KILT DIDs. They serve the same purpose that domain names do for IP addresses: who knows the IP address under the kilt.io domain name? 🤷🏽‍♀️ There is a one-to-one relationship between DIDs and web3names. This means that a KILT DID can be linked to only one web3name, and a web3name can be claimed only by one DID.

Each web3name is globally unique within the KILT space, and is composed of a sequence of a minimum of 3 to a maximum of 32 characters taken from a specific character set to enhance human readability and reduce the chances of two web3names looking the same, despite being different. The character set includes only:

  • lowercase letters, from a to z
  • digits from 0 to 9
  • the symbols - and _

A regex that would match all and only the allowed web3names would be the following:

^[a-z0-9_-]{3,32}$

In the global URI space, web3names are prefixed with the w3n: URI namespace. For example, the full URI for the web3name example-web3name is w3n:example-web3name.

Linking Multiple Accounts to a web3name

Beyond linking a web3name, KILT allows DID owners to link multiple accounts to a single DID. These accounts are not specific to the KILT blockchain; they can reference any chain within the Polkadot ecosystem. Each account to DID link requires the payment of a small deposit.

For DIDs that have also claimed a web3name, the linking feature opens up the way to a host of possibilities, e.g., showing the web3name of a collator's account on the KILT Stakeboard.

DID lookup diagramDID lookup diagram

For a detailed developer-oriented guide to web3names and account linking, see our web3name Cookbook section and our account linking Cookbook section.

caution

While multiple accounts can be linked to a DID, it is important to notice the difference between the two.

KILT accounts are classical blockchain accounts, that can be used to hold and send KILT tokens, as well as to sign and submit transactions. On the other hand, KILT DIDs are a higher level construct which are derived from KILT accounts, but are completely separated from them. This means that KILT DIDs cannot hold any KILT tokens. DIDs are used to authorize (sign) some operations, but the resulting signature must then be submitted to the blockchain by a KILT account, which must pay for the transaction fees.

A DID did:kilt:4rp4rcDHP71YrBNvDhcH5iRoM3YzVoQVnCZvQPwPom9bjo2e is not to be considered the same as the account 4rp4rcDHP71YrBNvDhcH5iRoM3YzVoQVnCZvQPwPom9bjo2e, although they share the same identifier. There is no (immediate) relationship between the two, thus the DID should always be considered a DID and never used as an account. Therefore, if instructed to "send some funds to the DID by using the account after the did:kilt prefix", please ignore the advice, as without the required technical expertise, sending funds to a DID can result in those funds being lost.

Storing web3name

Storing a web3name in the blockchain requires providing a constant deposit, which is currently around 0.11 KILT. The deposit amount is calculated based on the worst-case scenario for a web3name, which is when a user provides a name with 32 characters. The deposit serves as a security measure to ensure the integrity of the blockchain and incentivize users to manage their web3names responsibly. By requiring a deposit, it discourages spamming or unnecessary creation of web3names. The deposit can be reclaimed by the user by deleting their web3name.