# EIP 634: ENS 文本记录的存储

作者 类型 分类 状态 创建时间
Richard Moore me@ricmoo.com Standards Track ERC Draft 2017-05-17

# 摘要

This EIP defines a resolver profile for ENS that permits the lookup of arbitrary key-value text data. This allows ENS name holders to associate e-mail addresses, URLs and other informational data with a ENS name.

# 动机

There is often a desire for human-readable metadata to be associated with otherwise machine-driven data; used for debugging, maintenance, reporting and general information.

In this EIP we define a simple resolver profile for ENS that permits ENS names to associate arbitrary key-value text.

# 规范

# Resolver Profile

A new resolver interface is defined, consisting of the following method:

function text(bytes32 node, string key) constant returns (string text);

The interface ID of this interface is 0x59d1d43c.

The text data may be any arbitrary UTF-8 string. If the key is not present, the empty string must be returned.

Keys must be made up of lowercase letters, numbers and the hyphen (-). Vendor specific services must be prefixed with vnd..

  • email - an e-mail address
  • url - a URL
  • avatar - a URL to an image used as an avatar or logo
  • description - A description of the name
  • notice - A notice regarding this name;
  • keywords - A list of comma-separated keywords, ordered by most significant first; clients that interpresent this field may choose a threshold beyond which to ignore
  • vnd.twitter - a twitter username (SHOULD not be prefixed with an @ symbol)
  • vnd.github - a GitHub username (SHOULD not be prefixed with an @ symbol)

# 原理阐述

# Application-specific vs general-purpose record types

Rather than define a large number of specific record types (each for generally human-readable data) such as url and email, we follow an adapted model of DNS's TXT records, which allow for a general keys and values, allowing future extension without adjusting the resolver, while allowing applications to use custom keys for their own purposes.

# 向后兼容

Not applicable.

# 测试用例

TBD

# 实现

None yet.

# 版权

Copyright and related rights waived via CC0.