Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ENSIP-5, which enables arbitrary text information, including email addresses and social media accounts, to be associated with ENS names.
This explanation is based on the following specification.
For other EIPs, BIPs, SLIPs, CAIPs, and ENSIPs, see the following page.
Overview
ENSIP-5 defines an Ethereum Name Service (ENS) resolver interface for storing and retrieving arbitrary key-value pairs.
An ENS name owner can associate additional information with a name, including email addresses and website URLs.
ENS originally provides human-readable names for machine-oriented data, such as blockchain addresses. Text records extend this capability by making human-readable supplementary information available through the same name.
Motivation
An ENS name becomes more useful when it is associated with information that people can understand directly.
For example, storing an email address or contact URL allows someone encountering the name to retrieve relevant contact information.
Such metadata can also support debugging, system administration, and presentation of information to users.
The aim is to extend ENS beyond address resolution into a mechanism for connecting names with additional information.
How It Works
ENSIP-5 defines a resolver interface for associating arbitrary text strings with ENS names.
Applications can retrieve email addresses, profile information, external service usernames, and other text associated with a name.
Text records use UTF-8 encoding. A nonexistent record returns an empty string.
Resolver Interface
The interface is defined as follows.
interface IERC634 {
/// @notice ENS名に紐づけられたキーのテキストデータを返す
/// @param node ENS名のnodehash
/// @param key 検索したいキー
/// @return text テキストデータ
function text(bytes32 node, string key) view returns (string text);
}The comments in the original example describe the ENS node hash, the lookup key, and the returned text value.
The ERC-165 interface identifier is 0x59d1d43c.
For more information about ERC-165, see the following article.
ERC-165: Checking Whether a Contract Supports an Interface
Key Categories
A key identifies each text record. The specification describes three categories: global keys, service keys, and legacy keys.
Global Keys
Global keys represent commonly used information. They consist only of lowercase letters, digits, and hyphens.
Examples include avatar URLs, descriptions, and email addresses.
| Key | Meaning |
|---|---|
avatar |
URL of an avatar or logo image |
description |
Description associated with the ENS name |
display |
Preferred display name, with case differences ignored |
email |
Email address |
keywords |
Comma-separated keywords |
mail |
Physical mailing address |
notice |
Notice or announcement |
location |
Location, such as Tokyo, Japan |
phone |
Telephone number in E.164 international format |
url |
Website URL |
Service Keys
Service keys associate information with a specific service or platform.
They follow reverse-domain notation and must contain at least one dot. This allows services to define distinct keys and avoid namespace collisions.
Examples described in the original article include the following.
| Key | Meaning |
|---|---|
com.github |
GitHub username |
com.linkedin |
LinkedIn username |
com.twitter |
Twitter username |
org.telegram |
Telegram username |
Additional levels can provide finer distinctions, such as com.example.groups.public.
Legacy Keys
Some keys were used in earlier versions of the specification. Although they are not widely used, applications seeking backward compatibility can use them as fallbacks.
vnd.github(replaced bycom.github)vnd.peepeth(replaced bycom.peepeth)vnd.twitter(replaced bycom.twitter)
Additional Considerations
ENSIP-5 uses general-purpose key-value pairs rather than defining a separate record type for every application.
Instead of introducing dedicated record types for email addresses, website URLs, and every future use case, the approach draws inspiration from DNS TXT records and provides a flexible representation for textual information.
New applications and services can define their own keys without requiring changes to the resolver interface.
ENS can therefore support common profile fields while remaining extensible to future and custom use cases.
Conclusion
ENSIP-5 allows ENS names to be associated with arbitrary text records, including contact information, website URLs, and service usernames.
