{"eip":2193,"title":"dType Alias Extension - Decentralized Type System","description":"We are proposing Alias - a semantic standard for identifying on-chain resources by human-readable qualifiers, supporting any type of data.","authors":["Loredana Cirstea (@loredanacirstea)","Christian Tzurcanu (@ctzurcanu)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2019-07-16","requires":[155,1900,2157],"discussionsTo":"https://github.com/ethereum/EIPs/issues/2192","repo":"ERCs","label":"ERC-2193","officialUrl":"https://eips.ethereum.org/EIPS/eip-2193","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2193.md","url":"https://eips.huatuo.xyz/eip-2193/","tldr":{"en":"Proposes human-readable aliases such as alice@socialnetwork.profile for any on-chain data record, built on the dType type registry rather than DNS-style names.","ja":"dType 型レジストリを土台に、あらゆるオンチェーンのデータレコードに alice@socialnetwork.profile のような人間が読めるエイリアスを付けることを提案する。DNS 風の名前は使わない。","ko":"dType 타입 레지스트리를 기반으로, 모든 온체인 데이터 레코드에 alice@socialnetwork.profile 같은 사람이 읽을 수 있는 별칭을 붙이자고 제안한다. DNS 방식의 이름은 쓰지 않는다.","zh":"提议为任何链上数据记录提供人类可读的别名，例如 alice@socialnetwork.profile，基于 dType 类型注册表构建，而不是 DNS 风格的名称。"},"tags":["naming","alias","registry","dtype"],"explainers":{"en":{"lang":"en","tldr":"Proposes human-readable aliases such as alice@socialnetwork.profile for any on-chain data record, built on the dType type registry rather than DNS-style names.","tags":["naming","alias","registry","dtype"],"related":[1900,2157,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2193/","markdown":"## What problem does it solve?\n\n[ENS (EIP-137)](/eip-137/) gives human-readable names to accounts and contracts, but not to individual pieces of data inside a contract, such as one user's profile or one payment channel. ENS also uses DNS's leaf-to-root order (`sub.domain.eth`), the opposite of how a dot works in most programming languages.\n\nERC-2193 proposes an **Alias** registry that names any record stored through the dType system ([ERC-1900](/eip-1900/) for type definitions, [ERC-2157](/eip-2157/) for storage contracts), using separators that carry meaning.\n\n## How it works\n\n- An alias combines a dType type identifier, a separator, a `name`, and the `identifier` of the record in that type's storage contract.\n- Separators and their reading order:\n\n| Separator | Meaning | Example |\n| --- | --- | --- |\n| `.` | general domain, root to leaf | `domain.subdomain.resource` |\n| `@` | actor-related data, leaf to root | `alice@socialnetwork.profile` |\n| `#` | concepts, root to leaf | `topicX#postY` |\n| `/` | resource path, root to leaf | `resourceRoot/resource` |\n\n- Anyone may set an alias if they own the underlying record in the dType storage contract. They prove this with a signature over the type id, identifier, name, separator, a `nonce`, the Alias contract address and the chain id ([EIP-155](/eip-155/)), which prevents replays.\n- Owners can update or delete aliases. A record can have several aliases with different names or separators.\n- Content can be addressed either by raw `bytes32` identifiers or by the human alias; both resolve to the same record.\n\n## Sample code\n\nThe interface from the spec:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface Alias {\n    event AliasSet(bytes32 dtypeIdentifier, bytes1 separator, string name, bytes32 indexed identifier);\n\n    function setAlias(\n        bytes32 dtypeIdentifier,\n        bytes1 separator,\n        string memory name,\n        bytes32 identifier,\n        bytes memory signature\n    ) external;\n\n    function getAliased(bytes1 separator, string memory name) external view returns (bytes32 identifier);\n}\n```\n\nResolving an alias from a script (ethers v6):\n\n```ts\nconst id = await aliasRegistry.getAliased(\"0x40\", \"alice\"); // \"@\" separator\n```\n\n## Things to know\n\n- Status: **Stagnant**, as are the dType proposals it depends on ([ERC-1900](/eip-1900/), [ERC-2157](/eip-2157/)).\n- The exact signature encoding, backwards compatibility and test cases are not specified (\"will be added\").\n- It only works for data stored in dType-linked contracts; it is not a general replacement for ENS in practice.\n"},"ja":{"lang":"ja","tldr":"dType 型レジストリを土台に、あらゆるオンチェーンのデータレコードに alice@socialnetwork.profile のような人間が読めるエイリアスを付けることを提案する。DNS 風の名前は使わない。","tags":["naming","alias","registry","dtype"],"related":[1900,2157,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2193/","markdown":"## 何を解決するのか\n\n[ENS（EIP-137）](/eip-137/)はアカウントやコントラクトに人間が読める名前を付けますが、コントラクト内の個々のデータ、たとえば 1 人のユーザーのプロフィールや 1 本のペイメントチャネルには名前を付けられません。また ENS は DNS と同じ葉から根への順序（`sub.domain.eth`）を使っており、これはほとんどのプログラミング言語でのドットの働きとは逆です。\n\nERC-2193 は、dType システム（型定義は [ERC-1900](/eip-1900/)、ストレージコントラクトは [ERC-2157](/eip-2157/)）を通じて保存されたあらゆるレコードに名前を付ける **Alias** レジストリを提案します。意味を持つ区切り文字を使います。\n\n## 仕組み\n\n- エイリアスは、dType の型識別子、区切り文字、`name`、その型のストレージコントラクト内でのレコードの `identifier` を組み合わせたものです。\n- 区切り文字と読む順序：\n\n| 区切り文字 | 意味 | 例 |\n| --- | --- | --- |\n| `.` | 一般的なドメイン、根から葉へ | `domain.subdomain.resource` |\n| `@` | アクターに関するデータ、葉から根へ | `alice@socialnetwork.profile` |\n| `#` | 概念、根から葉へ | `topicX#postY` |\n| `/` | リソースパス、根から葉へ | `resourceRoot/resource` |\n\n- dType ストレージコントラクト内の元のレコードを所有していれば、誰でもエイリアスを設定できます。所有の証明には、型 ID、identifier、name、区切り文字、`nonce`、Alias コントラクトのアドレス、チェーン ID（[EIP-155](/eip-155/)）に対する署名を使い、リプレイを防ぎます。\n- 所有者はエイリアスを更新・削除できます。1 つのレコードに、異なる名前や区切り文字で複数のエイリアスを付けられます。\n- コンテンツは、生の `bytes32` の identifier でも、人間が読めるエイリアスでもアドレス指定でき、どちらも同じレコードに解決されます。\n\n## サンプルコード\n\n仕様のインターフェース:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface Alias {\n    event AliasSet(bytes32 dtypeIdentifier, bytes1 separator, string name, bytes32 indexed identifier);\n\n    function setAlias(\n        bytes32 dtypeIdentifier,\n        bytes1 separator,\n        string memory name,\n        bytes32 identifier,\n        bytes memory signature\n    ) external;\n\n    function getAliased(bytes1 separator, string memory name) external view returns (bytes32 identifier);\n}\n```\n\nスクリプトからエイリアスを解決する（ethers v6）:\n\n```ts\nconst id = await aliasRegistry.getAliased(\"0x40\", \"alice\"); // \"@\" separator\n```\n\n## 知っておくべきこと\n\n- ステータス：**Stagnant**。依存先の dType 関連の提案（[ERC-1900](/eip-1900/)、[ERC-2157](/eip-2157/)）も同様です。\n- 正確な署名のエンコード、後方互換性、テストケースは規定されていません（「追加予定」とされています）。\n- dType に紐づくコントラクトに保存されたデータにしか使えません。実際には ENS の汎用的な代替にはなりません。\n"},"ko":{"lang":"ko","tldr":"dType 타입 레지스트리를 기반으로, 모든 온체인 데이터 레코드에 alice@socialnetwork.profile 같은 사람이 읽을 수 있는 별칭을 붙이자고 제안한다. DNS 방식의 이름은 쓰지 않는다.","tags":["naming","alias","registry","dtype"],"related":[1900,2157,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2193/","markdown":"## 어떤 문제를 해결하나요?\n\n[ENS(EIP-137)](/eip-137/)는 계정과 컨트랙트에 사람이 읽을 수 있는 이름을 주지만, 컨트랙트 안의 개별 데이터, 예를 들어 한 사용자의 프로필이나 결제 채널 하나에는 이름을 줄 수 없습니다. 또한 ENS는 DNS처럼 잎에서 뿌리 순서(`sub.domain.eth`)를 쓰는데, 이는 대부분의 프로그래밍 언어에서 점이 동작하는 방식과 반대입니다.\n\nERC-2193은 dType 시스템(타입 정의는 [ERC-1900](/eip-1900/), 스토리지 컨트랙트는 [ERC-2157](/eip-2157/))을 통해 저장된 모든 레코드에 이름을 붙이는 **Alias** 레지스트리를 제안하며, 의미를 담은 구분자를 사용합니다.\n\n## 어떻게 동작하나요?\n\n- 별칭은 dType 타입 식별자, 구분자, `name`, 그리고 그 타입의 스토리지 컨트랙트 안에 있는 레코드의 `identifier`를 조합한 것입니다.\n- 구분자와 읽는 순서:\n\n| 구분자 | 의미 | 예시 |\n| --- | --- | --- |\n| `.` | 일반 도메인, 뿌리에서 잎으로 | `domain.subdomain.resource` |\n| `@` | 행위자 관련 데이터, 잎에서 뿌리로 | `alice@socialnetwork.profile` |\n| `#` | 개념, 뿌리에서 잎으로 | `topicX#postY` |\n| `/` | 리소스 경로, 뿌리에서 잎으로 | `resourceRoot/resource` |\n\n- dType 스토리지 컨트랙트의 원본 레코드를 소유한 사람이라면 누구나 별칭을 설정할 수 있습니다. 소유 증명은 타입 id, identifier, name, 구분자, `nonce`, Alias 컨트랙트 주소, 체인 id([EIP-155](/eip-155/))에 대한 서명으로 하며, 이는 재전송(replay)을 막습니다.\n- 소유자는 별칭을 갱신하거나 삭제할 수 있습니다. 하나의 레코드에 서로 다른 이름이나 구분자를 쓰는 별칭을 여러 개 붙일 수 있습니다.\n- 콘텐츠는 원시 `bytes32` 식별자로도, 사람이 읽을 수 있는 별칭으로도 지정할 수 있으며, 둘 다 같은 레코드로 해석됩니다.\n\n## 샘플 코드\n\n명세의 인터페이스:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface Alias {\n    event AliasSet(bytes32 dtypeIdentifier, bytes1 separator, string name, bytes32 indexed identifier);\n\n    function setAlias(\n        bytes32 dtypeIdentifier,\n        bytes1 separator,\n        string memory name,\n        bytes32 identifier,\n        bytes memory signature\n    ) external;\n\n    function getAliased(bytes1 separator, string memory name) external view returns (bytes32 identifier);\n}\n```\n\n스크립트에서 별칭 해석하기(ethers v6):\n\n```ts\nconst id = await aliasRegistry.getAliased(\"0x40\", \"alice\"); // \"@\" separator\n```\n\n## 알아둘 점\n\n- 상태: **Stagnant**. 의존하는 dType 제안([ERC-1900](/eip-1900/), [ERC-2157](/eip-2157/))도 마찬가지입니다.\n- 정확한 서명 인코딩, 하위 호환성, 테스트 케이스는 명시되어 있지 않습니다(\"추가될 예정\").\n- dType과 연결된 컨트랙트에 저장된 데이터에만 동작합니다. 실제로는 ENS를 범용으로 대체하지 못합니다.\n"},"zh":{"lang":"zh","tldr":"提议为任何链上数据记录提供人类可读的别名，例如 alice@socialnetwork.profile，基于 dType 类型注册表构建，而不是 DNS 风格的名称。","tags":["naming","alias","registry","dtype"],"related":[1900,2157,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2193/","markdown":"## 它解决什么问题？\n\n[ENS（EIP-137）](/eip-137/)为账户和合约提供人类可读的名称，但无法为合约内部的单条数据命名，比如某个用户的个人资料或某条支付通道。ENS 还沿用了 DNS 从叶到根的顺序（`sub.domain.eth`），这与点号在大多数编程语言中的含义正好相反。\n\nERC-2193 提议建立一个 **Alias** 注册表，为通过 dType 系统存储的任何记录命名（类型定义见 [ERC-1900](/eip-1900/)，存储合约见 [ERC-2157](/eip-2157/)），并使用带有含义的分隔符。\n\n## 它如何运作\n\n- 别名由 dType 类型标识符、分隔符、`name`，以及该类型存储合约中记录的 `identifier` 组合而成。\n- 分隔符及其阅读顺序：\n\n| 分隔符 | 含义 | 示例 |\n| --- | --- | --- |\n| `.` | 一般域名，从根到叶 | `domain.subdomain.resource` |\n| `@` | 与参与者相关的数据，从叶到根 | `alice@socialnetwork.profile` |\n| `#` | 概念，从根到叶 | `topicX#postY` |\n| `/` | 资源路径，从根到叶 | `resourceRoot/resource` |\n\n- 只要拥有 dType 存储合约中的底层记录，任何人都可以设置别名。他们用一个签名来证明这一点，签名覆盖类型 id、identifier、name、分隔符、`nonce`、Alias 合约地址和链 id（[EIP-155](/eip-155/)），以防止重放。\n- 所有者可以更新或删除别名。一条记录可以有多个使用不同名称或分隔符的别名。\n- 内容既可以用原始的 `bytes32` 标识符寻址，也可以用人类可读的别名寻址，两者解析到同一条记录。\n\n## 示例代码\n\n规范中的接口：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface Alias {\n    event AliasSet(bytes32 dtypeIdentifier, bytes1 separator, string name, bytes32 indexed identifier);\n\n    function setAlias(\n        bytes32 dtypeIdentifier,\n        bytes1 separator,\n        string memory name,\n        bytes32 identifier,\n        bytes memory signature\n    ) external;\n\n    function getAliased(bytes1 separator, string memory name) external view returns (bytes32 identifier);\n}\n```\n\n在脚本中解析别名（ethers v6）：\n\n```ts\nconst id = await aliasRegistry.getAliased(\"0x40\", \"alice\"); // \"@\" separator\n```\n\n## 需要注意\n\n- 状态：**Stagnant**，它所依赖的 dType 提案（[ERC-1900](/eip-1900/)、[ERC-2157](/eip-2157/)）也是如此。\n- 确切的签名编码、向后兼容性和测试用例都没有规定（\"将会补充\"）。\n- 它只适用于存放在与 dType 关联的合约中的数据，实际上并不能作为 ENS 的通用替代品。\n"}}}
