{"eip":7231,"title":"Identity-aggregated NFT","description":"The aggregation of web2 \u0026 web3 identities to NFTs, authorized by individuals, gives attributes of ownerships, relationships, experiences.","authors":["Chloe Gu \u003cchloe@carv.io\u003e","Navid X. (@xuxinlai2002)","Victor Yu \u003cvictor@carv.io\u003e","Archer H."],"status":"Final","type":"Standards Track","category":"ERC","created":"2023-06-25","requires":[165,721,1271],"discussionsTo":"https://ethereum-magicians.org/t/erc7231-identity-aggregated-nft/15062","repo":"ERCs","label":"ERC-7231","officialUrl":"https://eips.ethereum.org/EIPS/eip-7231","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7231.md","url":"https://eips.huatuo.xyz/eip-7231/","tldr":{"en":"An ERC-721 extension that binds a hashed bundle of a user's Web2 and Web3 identities to an NFT, so apps can verify which accounts belong to the token's owner.","ja":"ユーザーの Web2 と Web3 のアイデンティティをまとめたハッシュを NFT に紐づける ERC-721 拡張。アプリがどのアカウントがそのトークンの所有者のものかを検証できるようにする。","ko":"사용자의 Web2와 Web3 신원을 묶은 해시를 NFT에 연결하는 ERC-721 확장. 앱이 어떤 계정이 해당 토큰 소유자의 것인지 검증할 수 있게 한다.","zh":"ERC-721 扩展：把用户的 Web2 和 Web3 身份的哈希绑定到一个 NFT 上，使应用可以验证哪些账户属于该代币的所有者。"},"tags":["nft","identity","did","erc721"],"explainers":{"en":{"lang":"en","tldr":"An ERC-721 extension that binds a hashed bundle of a user's Web2 and Web3 identities to an NFT, so apps can verify which accounts belong to the token's owner.","tags":["nft","identity","did","erc721"],"related":[721,1271,165,5192],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7231/","markdown":"## What problem does it solve?\n\nPeople carry many identities: a wallet address, an ENS name, a DID, accounts on social networks and other Web2 services. Applications that want to know \"this wallet also owns that account\" have no common, verifiable way to ask. ENS gives names but no proof of off-chain accounts; soulbound tokens usually depend on a central attester.\n\nERC-7231 lets the owner of an NFT (or soulbound token) attach a list of their identities to it. The list lives in the token's metadata, and only a hash of it (the *identities root*) is stored on-chain, so anyone can check that the off-chain list has not been tampered with and was signed by the owner.\n\n## How it works\n\n1. **Metadata.** The token's JSON metadata gains a `MultiIdentities` array. Each entry has a `userID` (a Web2 account or a DID), a `verifierUri` describing how to verify it, an optional `memo`, and free-form `properties`.\n2. **On-chain root.** The owner calls `setIdentitiesRoot(id, root)`, where `root` is a hash over the user IDs. The contract stores it and emits `SetIdentitiesRoot`.\n3. **Verification.** Anyone can call `verifyIdentitiesBinding(id, owner, userIDs, root, signature)`. Per the spec it checks:\n   - that `owner` actually owns NFT `id`,\n   - that the user IDs are well formed,\n   - that `root` matches what is stored for the token,\n   - that `signature` over the root comes from the owner, using [ERC-1271](/eip-1271/) so smart-contract wallets can sign too.\n\nThe function returns `true` or `false` and must not change state. How each individual identity is proven (OAuth, OpenID, zk-based DID proofs, etc.) is left to the verifier named in `verifierUri`.\n\n## Sample code\n\nThe interface defined by the standard:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.15;\n\ninterface IERC7231 {\n    event SetIdentitiesRoot(uint256 id, bytes32 identitiesRoot);\n\n    function setIdentitiesRoot(uint256 id, bytes32 identitiesRoot) external;\n\n    function getIdentitiesRoot(uint256 id) external returns (bytes32);\n\n    function verifyIdentitiesBinding(\n        uint256 id,\n        address nftOwnerAddress,\n        string[] memory userIDs,\n        bytes32 identitiesRoot,\n        bytes calldata signature\n    ) external returns (bool);\n}\n```\n\nA metadata fragment carrying two identities (values are illustrative):\n\n```json\n{\n  \"name\": \"Profile #42\",\n  \"image\": \"ipfs://.../42.png\",\n  \"MultiIdentities\": [\n    { \"userID\": \"did:example:alice\", \"verifierUri\": \"https://verifier.example/did\", \"memo\": \"main DID\" },\n    { \"userID\": \"github:alice\", \"verifierUri\": \"https://verifier.example/github\" }\n  ]\n}\n```\n\n## Things to know\n\n- Status is **Final**. It requires [ERC-165](/eip-165/), [ERC-721](/eip-721/) and [ERC-1271](/eip-1271/).\n- Only the hash is on-chain. The privacy of the identity list depends on where the metadata is hosted; anyone who can read the metadata can read the user IDs.\n- The on-chain check proves the *owner signed this list*, not that each Web2 account really belongs to them. That second step depends on the off-chain verifier.\n- Works with transferable NFTs and with soulbound tokens such as [ERC-5192](/eip-5192/). Because verification checks the signature against the current owner, a binding signed by a previous owner stops verifying after a transfer.\n"},"ja":{"lang":"ja","tldr":"ユーザーの Web2 と Web3 のアイデンティティをまとめたハッシュを NFT に紐づける ERC-721 拡張。アプリがどのアカウントがそのトークンの所有者のものかを検証できるようにする。","tags":["nft","identity","did","erc721"],"related":[721,1271,165,5192],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7231/","markdown":"## 何を解決するのか\n\n人は多くのアイデンティティを持っています。ウォレットアドレス、ENS 名、DID、ソーシャルネットワークやその他の Web2 サービスのアカウントなどです。「このウォレットはあのアカウントも所有している」ことを知りたいアプリケーションには、共通で検証可能な問い合わせ方法がありません。ENS は名前を提供しますが、オフチェーンのアカウントの証明にはなりません。ソウルバウンドトークンは通常、中央集権的な証明者に依存します。\n\nERC-7231 では、NFT（またはソウルバウンドトークン）の所有者が、自分のアイデンティティの一覧をそれに紐づけられます。一覧はトークンのメタデータに置かれ、そのハッシュ（*identities root*）だけがオンチェーンに保存されるため、誰でもオフチェーンの一覧が改ざんされておらず、所有者によって署名されたものであることを確認できます。\n\n## 仕組み\n\n1. **メタデータ。** トークンの JSON メタデータに `MultiIdentities` 配列が加わります。各エントリには、`userID`（Web2 アカウントまたは DID）、検証方法を示す `verifierUri`、任意の `memo`、自由形式の `properties` があります。\n2. **オンチェーンのルート。** 所有者は `setIdentitiesRoot(id, root)` を呼び出します。`root` はユーザー ID に対するハッシュです。コントラクトはこれを保存し、`SetIdentitiesRoot` を emit します。\n3. **検証。** 誰でも `verifyIdentitiesBinding(id, owner, userIDs, root, signature)` を呼び出せます。仕様では次の点を確認します。\n   - `owner` が実際に NFT `id` を所有していること、\n   - ユーザー ID の形式が正しいこと、\n   - `root` がそのトークンに保存されている値と一致すること、\n   - ルートに対する `signature` が所有者によるものであること（[ERC-1271](/eip-1271/) を使うので、スマートコントラクトウォレットも署名できます）。\n\nこの関数は `true` または `false` を返し、状態を変更してはなりません。個々のアイデンティティをどう証明するか（OAuth、OpenID、zk ベースの DID 証明など）は、`verifierUri` で指定された検証者に委ねられます。\n\n## サンプルコード\n\n標準が定義するインターフェース:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.15;\n\ninterface IERC7231 {\n    event SetIdentitiesRoot(uint256 id, bytes32 identitiesRoot);\n\n    function setIdentitiesRoot(uint256 id, bytes32 identitiesRoot) external;\n\n    function getIdentitiesRoot(uint256 id) external returns (bytes32);\n\n    function verifyIdentitiesBinding(\n        uint256 id,\n        address nftOwnerAddress,\n        string[] memory userIDs,\n        bytes32 identitiesRoot,\n        bytes calldata signature\n    ) external returns (bool);\n}\n```\n\n2 つのアイデンティティを持つメタデータの断片（値は説明用）:\n\n```json\n{\n  \"name\": \"Profile #42\",\n  \"image\": \"ipfs://.../42.png\",\n  \"MultiIdentities\": [\n    { \"userID\": \"did:example:alice\", \"verifierUri\": \"https://verifier.example/did\", \"memo\": \"main DID\" },\n    { \"userID\": \"github:alice\", \"verifierUri\": \"https://verifier.example/github\" }\n  ]\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Final** です。[ERC-165](/eip-165/)、[ERC-721](/eip-721/)、[ERC-1271](/eip-1271/) が必要です。\n- オンチェーンにあるのはハッシュだけです。アイデンティティ一覧のプライバシーはメタデータをどこにホストするかに依存し、メタデータを読める人はユーザー ID も読めます。\n- オンチェーンでの確認が証明するのは「所有者がこの一覧に署名した」ことであり、各 Web2 アカウントが本当に本人のものであることではありません。その 2 つ目のステップはオフチェーンの検証者に依存します。\n- 譲渡可能な NFT でも、[ERC-5192](/eip-5192/) のようなソウルバウンドトークンでも動作します。検証では署名を現在の所有者に対して確認するため、以前の所有者が署名した紐づけは、譲渡後には検証に通らなくなります。\n"},"ko":{"lang":"ko","tldr":"사용자의 Web2와 Web3 신원을 묶은 해시를 NFT에 연결하는 ERC-721 확장. 앱이 어떤 계정이 해당 토큰 소유자의 것인지 검증할 수 있게 한다.","tags":["nft","identity","did","erc721"],"related":[721,1271,165,5192],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7231/","markdown":"## 어떤 문제를 해결하나요?\n\n사람들은 많은 신원을 가지고 있습니다. 지갑 주소, ENS 이름, DID, 소셜 네트워크와 기타 Web2 서비스의 계정 등입니다. \"이 지갑이 저 계정도 소유한다\"는 것을 알고 싶은 애플리케이션에는 공통적이고 검증 가능한 질의 방법이 없습니다. ENS는 이름을 제공하지만 오프체인 계정의 증명은 제공하지 않고, 소울바운드 토큰은 보통 중앙화된 증명자에 의존합니다.\n\nERC-7231은 NFT(또는 소울바운드 토큰)의 소유자가 자신의 신원 목록을 거기에 붙일 수 있게 합니다. 목록은 토큰의 메타데이터에 있고 그 해시(*identities root*)만 온체인에 저장되므로, 누구나 오프체인 목록이 변조되지 않았고 소유자가 서명했음을 확인할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n1. **메타데이터.** 토큰의 JSON 메타데이터에 `MultiIdentities` 배열이 추가됩니다. 각 항목에는 `userID`(Web2 계정 또는 DID), 검증 방법을 설명하는 `verifierUri`, 선택 사항인 `memo`, 자유 형식의 `properties`가 있습니다.\n2. **온체인 루트.** 소유자가 `setIdentitiesRoot(id, root)`를 호출합니다. `root`는 사용자 ID들에 대한 해시입니다. 컨트랙트는 이를 저장하고 `SetIdentitiesRoot`를 emit합니다.\n3. **검증.** 누구나 `verifyIdentitiesBinding(id, owner, userIDs, root, signature)`를 호출할 수 있습니다. 명세에 따르면 다음을 확인합니다.\n   - `owner`가 실제로 NFT `id`를 소유하는지,\n   - 사용자 ID의 형식이 올바른지,\n   - `root`가 해당 토큰에 저장된 값과 일치하는지,\n   - 루트에 대한 `signature`가 소유자의 것인지([ERC-1271](/eip-1271/)을 사용하므로 스마트 컨트랙트 지갑도 서명할 수 있습니다).\n\n이 함수는 `true` 또는 `false`를 반환하며 상태를 변경해서는 안 됩니다. 개별 신원을 어떻게 증명할지(OAuth, OpenID, zk 기반 DID 증명 등)는 `verifierUri`에 명시된 검증자에게 맡겨집니다.\n\n## 샘플 코드\n\n표준이 정의하는 인터페이스:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.15;\n\ninterface IERC7231 {\n    event SetIdentitiesRoot(uint256 id, bytes32 identitiesRoot);\n\n    function setIdentitiesRoot(uint256 id, bytes32 identitiesRoot) external;\n\n    function getIdentitiesRoot(uint256 id) external returns (bytes32);\n\n    function verifyIdentitiesBinding(\n        uint256 id,\n        address nftOwnerAddress,\n        string[] memory userIDs,\n        bytes32 identitiesRoot,\n        bytes calldata signature\n    ) external returns (bool);\n}\n```\n\n신원 두 개를 담은 메타데이터 조각(값은 예시):\n\n```json\n{\n  \"name\": \"Profile #42\",\n  \"image\": \"ipfs://.../42.png\",\n  \"MultiIdentities\": [\n    { \"userID\": \"did:example:alice\", \"verifierUri\": \"https://verifier.example/did\", \"memo\": \"main DID\" },\n    { \"userID\": \"github:alice\", \"verifierUri\": \"https://verifier.example/github\" }\n  ]\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Final**입니다. [ERC-165](/eip-165/), [ERC-721](/eip-721/), [ERC-1271](/eip-1271/)이 필요합니다.\n- 온체인에는 해시만 있습니다. 신원 목록의 프라이버시는 메타데이터를 어디에 호스팅하느냐에 달려 있으며, 메타데이터를 읽을 수 있는 사람은 사용자 ID도 읽을 수 있습니다.\n- 온체인 검사가 증명하는 것은 \"소유자가 이 목록에 서명했다\"는 사실이지, 각 Web2 계정이 정말 그들의 것이라는 사실이 아닙니다. 그 두 번째 단계는 오프체인 검증자에 달려 있습니다.\n- 양도 가능한 NFT와 [ERC-5192](/eip-5192/) 같은 소울바운드 토큰 모두에서 동작합니다. 검증은 서명을 현재 소유자에 대해 확인하므로, 이전 소유자가 서명한 바인딩은 양도 후에는 더 이상 검증을 통과하지 못합니다.\n"},"zh":{"lang":"zh","tldr":"ERC-721 扩展：把用户的 Web2 和 Web3 身份的哈希绑定到一个 NFT 上，使应用可以验证哪些账户属于该代币的所有者。","tags":["nft","identity","did","erc721"],"related":[721,1271,165,5192],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7231/","markdown":"## 它解决什么问题？\n\n人们拥有许多身份：钱包地址、ENS 名称、DID，以及社交网络和其他 Web2 服务上的账户。想知道\"这个钱包是否也拥有那个账户\"的应用，没有通用且可验证的询问方式。ENS 提供名称，但无法证明链下账户；灵魂绑定代币通常依赖中心化的证明方。\n\nERC-7231 让 NFT（或灵魂绑定代币）的所有者把自己的身份列表附加到它上面。该列表存放在代币的元数据中，链上只存储它的哈希（*identities root*），因此任何人都可以检查链下列表没有被篡改，并且确实由所有者签名。\n\n## 它如何运作\n\n1. **元数据。** 代币的 JSON 元数据新增一个 `MultiIdentities` 数组。每个条目包含 `userID`（Web2 账户或 DID）、说明如何验证的 `verifierUri`、可选的 `memo`，以及自由格式的 `properties`。\n2. **链上根。** 所有者调用 `setIdentitiesRoot(id, root)`，其中 `root` 是对这些用户 ID 计算的哈希。合约存储它并触发 `SetIdentitiesRoot` 事件。\n3. **验证。** 任何人都可以调用 `verifyIdentitiesBinding(id, owner, userIDs, root, signature)`。按规范，它会检查：\n   - `owner` 确实拥有 NFT `id`，\n   - 用户 ID 格式正确，\n   - `root` 与该代币所存储的值一致，\n   - 对根的 `signature` 来自所有者，使用 [ERC-1271](/eip-1271/)，因此智能合约钱包也可以签名。\n\n该函数返回 `true` 或 `false`，并且不得更改状态。每个具体身份如何证明（OAuth、OpenID、基于零知识的 DID 证明等），交由 `verifierUri` 所指定的验证方处理。\n\n## 示例代码\n\n该标准定义的接口：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.15;\n\ninterface IERC7231 {\n    event SetIdentitiesRoot(uint256 id, bytes32 identitiesRoot);\n\n    function setIdentitiesRoot(uint256 id, bytes32 identitiesRoot) external;\n\n    function getIdentitiesRoot(uint256 id) external returns (bytes32);\n\n    function verifyIdentitiesBinding(\n        uint256 id,\n        address nftOwnerAddress,\n        string[] memory userIDs,\n        bytes32 identitiesRoot,\n        bytes calldata signature\n    ) external returns (bool);\n}\n```\n\n携带两个身份的元数据片段（数值仅作示意）：\n\n```json\n{\n  \"name\": \"Profile #42\",\n  \"image\": \"ipfs://.../42.png\",\n  \"MultiIdentities\": [\n    { \"userID\": \"did:example:alice\", \"verifierUri\": \"https://verifier.example/did\", \"memo\": \"main DID\" },\n    { \"userID\": \"github:alice\", \"verifierUri\": \"https://verifier.example/github\" }\n  ]\n}\n```\n\n## 需要注意\n\n- 状态为 **Final**。它需要 [ERC-165](/eip-165/)、[ERC-721](/eip-721/) 和 [ERC-1271](/eip-1271/)。\n- 只有哈希在链上。身份列表的隐私取决于元数据托管在哪里；任何能读取元数据的人都能读取用户 ID。\n- 链上检查证明的是\"所有者签署了这个列表\"，而不是每个 Web2 账户确实属于他们。第二步取决于链下验证方。\n- 适用于可转让的 NFT，也适用于 [ERC-5192](/eip-5192/) 之类的灵魂绑定代币。由于验证是针对当前所有者检查签名，由前任所有者签署的绑定在转让后将无法再通过验证。\n"}}}
