{"eip":1056,"title":"Ethereum Lightweight Identity","description":"A registry for key and attribute management of lightweight blockchain identities.","authors":["Pelle Braendgaard \u003cpelle.braendgaard@consensys.net\u003e","Joel Torstensson \u003coed@consensys.net\u003e"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2018-05-03","discussionsTo":"https://github.com/ethereum/EIPs/issues/1056","repo":"ERCs","label":"ERC-1056","officialUrl":"https://eips.ethereum.org/EIPS/eip-1056","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1056.md","url":"https://eips.huatuo.xyz/eip-1056/","tldr":{"en":"A shared registry contract that turns every Ethereum address into a free, DID-compatible identity, with rotating owners, time-limited delegate keys and attributes stored as events.","ja":"すべての Ethereum アドレスを、無料で DID 互換の ID に変える共有レジストリコントラクト。所有者のローテーション、期限付きの委任キー、イベントとして保存される属性を備える。","ko":"모든 이더리움 주소를 무료이면서 DID와 호환되는 신원으로 바꿔 주는 공유 레지스트리 컨트랙트. 소유자 교체, 기간이 있는 위임 키, 이벤트로 저장되는 속성을 지원한다.","zh":"一个共享的注册表合约，把每个以太坊地址变成免费且兼容 DID 的身份，支持所有者轮换、有时限的委托密钥，以及以事件形式存储的属性。"},"tags":["identity","did","registry","delegation"],"explainers":{"en":{"lang":"en","tldr":"A shared registry contract that turns every Ethereum address into a free, DID-compatible identity, with rotating owners, time-limited delegate keys and attributes stored as events.","tags":["identity","did","registry","delegation"],"related":[725,1812,712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1056/","markdown":"## What problem does it solve?\n\nEarlier identity proposals such as [ERC-725](/eip-725/) gave every user their own identity contract. Deploying a contract costs gas, so creating an identity was expensive and impossible offline. The uPort team behind this ERC wanted identities that:\n\n- cost nothing to create and work offline, for example in a refugee scenario,\n- keep the same identifier when keys are rotated,\n- can be used both on-chain and off-chain.\n\nERC-1056 meets this by making **any Ethereum address an identity by default**. One shared registry contract stores only the changes.\n\n## How it works\n\nOne `EthereumDIDRegistry` contract is deployed once and used by everyone. For each identity (an address) it tracks:\n\n- **Owner.** By default the identity owns itself. `changeOwner(identity, newOwner)` lets you rotate to a new key or a multisig without changing the identifier.\n- **Delegates.** `addDelegate(identity, delegateType, delegate, validity)` authorizes another key for a purpose, such as signing JWTs, for `validity` seconds. `validDelegate(...)` checks it, and `revokeDelegate` removes it.\n- **Attributes.** `setAttribute(identity, name, value, validity)` publishes data such as service endpoints or encryption keys. `revokeAttribute` removes it.\n\nEvery write function has a `…Signed` variant that takes a raw `(v, r, s)` signature from the owner, so a third party can pay the gas.\n\nTo save gas, delegates and attributes are mainly recorded as **events** (`DIDOwnerChanged`, `DIDDelegateChanged`, `DIDAttributeChanged`). Each event includes `previousChange`, the block of the identity's previous update, and the contract stores the latest one in `changed[identity]`. A resolver walks backwards through these linked blocks to rebuild the full history cheaply, then assembles a W3C **DID document**.\n\n## Sample code\n\nAdding a 30-day signing delegate (ethers v6). `REGISTRY` is the deployed registry address on your network:\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, encodeBytes32String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst owner = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst registry = new Contract(REGISTRY, [\n  \"function addDelegate(address identity, bytes32 delegateType, address delegate, uint validity)\",\n  \"function validDelegate(address identity, bytes32 delegateType, address delegate) view returns (bool)\",\n  \"function changed(address) view returns (uint)\",\n], owner);\n\nconst delegate = Wallet.createRandom().address;\nconst type = encodeBytes32String(\"veriKey\");\n\nawait (await registry.addDelegate(owner.address, type, delegate, 30 * 24 * 3600)).wait();\nconsole.log(await registry.validDelegate(owner.address, type, delegate)); // true\n```\n\n## Things to know\n\n- This ERC is **Stagnant** and never reached Final. Its reference implementation became the basis of the `did:ethr` DID method (`ethr-did-registry`, `ethr-did-resolver`).\n- The spec leaves the exact delegate types and attribute names \"to be determined\". Real resolvers follow conventions defined by the `did:ethr` method spec.\n- Data published in events is public and permanent. Never put personal data in attributes.\n- Delegates expire automatically, but revoking early still needs a transaction.\n- Related identity work includes [ERC-725](/eip-725/) (Draft) and [ERC-1812](/eip-1812/) (Stagnant).\n"},"ja":{"lang":"ja","tldr":"すべての Ethereum アドレスを、無料で DID 互換の ID に変える共有レジストリコントラクト。所有者のローテーション、期限付きの委任キー、イベントとして保存される属性を備える。","tags":["identity","did","registry","delegation"],"related":[725,1812,712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1056/","markdown":"## 何を解決するのか\n\n[ERC-725](/eip-725/) のような以前の ID 提案は、ユーザーごとに専用の ID コントラクトを持たせました。コントラクトのデプロイには gas がかかるため、ID の作成は高価で、オフラインでは不可能でした。この ERC を作った uPort チームは、次のような ID を求めていました。\n\n- 作成にコストがかからず、たとえば難民のシナリオのようなオフライン環境でも使える\n- 鍵をローテーションしても同じ識別子を保てる\n- オンチェーンでもオフチェーンでも使える\n\nERC-1056 は、**あらゆる Ethereum アドレスをデフォルトで ID にする**ことでこれを実現します。共有された 1 つのレジストリコントラクトが、変更だけを保存します。\n\n## 仕組み\n\n`EthereumDIDRegistry` コントラクトは 1 回だけデプロイされ、全員が使います。各 ID（アドレス）について、次のものを追跡します。\n\n- **所有者。** デフォルトでは、ID は自分自身を所有します。`changeOwner(identity, newOwner)` により、識別子を変えずに新しい鍵やマルチシグへローテーションできます。\n- **委任先（delegate）。** `addDelegate(identity, delegateType, delegate, validity)` は、JWT の署名などの用途のために、別の鍵を `validity` 秒間認可します。`validDelegate(...)` で確認し、`revokeDelegate` で取り消します。\n- **属性。** `setAttribute(identity, name, value, validity)` は、サービスエンドポイントや暗号鍵などのデータを公開します。`revokeAttribute` で削除します。\n\nすべての書き込み関数には、所有者の生の `(v, r, s)` 署名を受け取る `…Signed` 版があり、第三者が gas を支払えます。\n\ngas を節約するため、委任先と属性は主に**イベント**（`DIDOwnerChanged`、`DIDDelegateChanged`、`DIDAttributeChanged`）として記録されます。各イベントには、その ID の前回の更新のブロックである `previousChange` が含まれ、コントラクトは最新のものを `changed[identity]` に保存します。リゾルバーは、これらのつながったブロックを遡ることで、完全な履歴を安価に再構築し、W3C の **DID ドキュメント**を組み立てます。\n\n## サンプルコード\n\n30 日間有効な署名用の委任先を追加する例（ethers v6）。`REGISTRY` は、お使いのネットワークにデプロイされたレジストリのアドレスです。\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, encodeBytes32String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst owner = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst registry = new Contract(REGISTRY, [\n  \"function addDelegate(address identity, bytes32 delegateType, address delegate, uint validity)\",\n  \"function validDelegate(address identity, bytes32 delegateType, address delegate) view returns (bool)\",\n  \"function changed(address) view returns (uint)\",\n], owner);\n\nconst delegate = Wallet.createRandom().address;\nconst type = encodeBytes32String(\"veriKey\");\n\nawait (await registry.addDelegate(owner.address, type, delegate, 30 * 24 * 3600)).wait();\nconsole.log(await registry.validDelegate(owner.address, type, delegate)); // true\n```\n\n## 知っておくべきこと\n\n- この ERC は **Stagnant** で、Final に到達しませんでした。リファレンス実装は、`did:ethr` DID メソッド（`ethr-did-registry`、`ethr-did-resolver`）の基礎になりました。\n- 仕様は、委任先の種類や属性名の詳細を「未定（to be determined）」としています。実際のリゾルバーは、`did:ethr` メソッド仕様で定められた慣習に従います。\n- イベントで公開されたデータは公開され、永続します。属性に個人情報を入れてはいけません。\n- 委任先は自動的に失効しますが、早期に取り消すにはやはりトランザクションが必要です。\n- 関連する ID の取り組みには、[ERC-725](/eip-725/)（Draft）と [ERC-1812](/eip-1812/)（Stagnant）があります。\n"},"ko":{"lang":"ko","tldr":"모든 이더리움 주소를 무료이면서 DID와 호환되는 신원으로 바꿔 주는 공유 레지스트리 컨트랙트. 소유자 교체, 기간이 있는 위임 키, 이벤트로 저장되는 속성을 지원한다.","tags":["identity","did","registry","delegation"],"related":[725,1812,712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1056/","markdown":"## 어떤 문제를 해결하나요?\n\n[ERC-725](/eip-725/) 같은 이전의 신원 제안은 사용자마다 자신만의 신원 컨트랙트를 주었습니다. 컨트랙트를 배포하려면 gas가 들기 때문에 신원을 만드는 일은 비쌌고 오프라인에서는 불가능했습니다. 이 ERC를 만든 uPort 팀은 다음을 만족하는 신원을 원했습니다.\n\n- 생성 비용이 없고, 예를 들어 난민 시나리오처럼 오프라인에서도 동작할 것\n- 키를 교체해도 같은 식별자를 유지할 것\n- 온체인과 오프체인 모두에서 사용할 수 있을 것\n\nERC-1056은 **모든 이더리움 주소를 기본적으로 신원으로 취급**하는 방식으로 이를 충족합니다. 하나의 공유 레지스트리 컨트랙트가 변경 사항만 저장합니다.\n\n## 어떻게 동작하나요?\n\n`EthereumDIDRegistry` 컨트랙트 하나를 한 번만 배포해 모두가 사용합니다. 각 신원(주소)에 대해 다음을 추적합니다.\n\n- **소유자.** 기본적으로 신원은 자기 자신을 소유합니다. `changeOwner(identity, newOwner)`로 식별자를 바꾸지 않고 새 키나 멀티시그로 교체할 수 있습니다.\n- **위임 대상(delegate).** `addDelegate(identity, delegateType, delegate, validity)`는 JWT 서명 같은 용도로 다른 키를 `validity`초 동안 인가합니다. `validDelegate(...)`로 확인하고 `revokeDelegate`로 제거합니다.\n- **속성.** `setAttribute(identity, name, value, validity)`는 서비스 엔드포인트나 암호화 키 같은 데이터를 게시합니다. `revokeAttribute`로 제거합니다.\n\n모든 쓰기 함수에는 소유자의 원시 `(v, r, s)` 서명을 받는 `…Signed` 변형이 있어서 제3자가 gas를 대신 낼 수 있습니다.\n\ngas를 아끼기 위해 위임 대상과 속성은 주로 **이벤트**(`DIDOwnerChanged`, `DIDDelegateChanged`, `DIDAttributeChanged`)로 기록됩니다. 각 이벤트에는 해당 신원의 이전 업데이트 블록인 `previousChange`가 들어 있고, 컨트랙트는 가장 최근 것을 `changed[identity]`에 저장합니다. 리졸버는 이렇게 연결된 블록들을 거슬러 올라가며 전체 이력을 저렴하게 복원한 뒤 W3C **DID 문서**를 조립합니다.\n\n## 샘플 코드\n\n30일짜리 서명용 위임 대상을 추가하는 예(ethers v6). `REGISTRY`는 사용하는 네트워크에 배포된 레지스트리 주소입니다.\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, encodeBytes32String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst owner = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst registry = new Contract(REGISTRY, [\n  \"function addDelegate(address identity, bytes32 delegateType, address delegate, uint validity)\",\n  \"function validDelegate(address identity, bytes32 delegateType, address delegate) view returns (bool)\",\n  \"function changed(address) view returns (uint)\",\n], owner);\n\nconst delegate = Wallet.createRandom().address;\nconst type = encodeBytes32String(\"veriKey\");\n\nawait (await registry.addDelegate(owner.address, type, delegate, 30 * 24 * 3600)).wait();\nconsole.log(await registry.validDelegate(owner.address, type, delegate)); // true\n```\n\n## 알아둘 점\n\n- 이 ERC는 **Stagnant** 상태이며 Final에 도달하지 못했습니다. 참조 구현은 `did:ethr` DID 메서드(`ethr-did-registry`, `ethr-did-resolver`)의 토대가 되었습니다.\n- 명세는 정확한 위임 유형과 속성 이름을 \"미정(to be determined)\"으로 남겨 둡니다. 실제 리졸버는 `did:ethr` 메서드 명세에서 정의한 관례를 따릅니다.\n- 이벤트로 게시된 데이터는 공개되며 영구적입니다. 속성에 개인 정보를 넣지 마세요.\n- 위임 대상은 자동으로 만료되지만, 일찍 폐기하려면 여전히 트랜잭션이 필요합니다.\n- 관련된 신원 작업으로는 [ERC-725](/eip-725/)(Draft)와 [ERC-1812](/eip-1812/)(Stagnant)가 있습니다.\n"},"zh":{"lang":"zh","tldr":"一个共享的注册表合约，把每个以太坊地址变成免费且兼容 DID 的身份，支持所有者轮换、有时限的委托密钥，以及以事件形式存储的属性。","tags":["identity","did","registry","delegation"],"related":[725,1812,712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1056/","markdown":"## 它解决什么问题？\n\n此前的身份提案（如 [ERC-725](/eip-725/)）为每个用户提供各自的身份合约。部署合约需要 gas，因此创建身份成本很高，也无法离线完成。提出这个 ERC 的 uPort 团队希望身份满足：\n\n- 创建不花钱，并且可以离线使用，例如在难民场景中，\n- 轮换密钥时保持标识符不变，\n- 既能在链上使用，也能在链下使用。\n\nERC-1056 通过**默认把任何以太坊地址都当作身份**来满足这些要求。一个共享的注册表合约只存储变更。\n\n## 它如何运作\n\n只需部署一次 `EthereumDIDRegistry` 合约，所有人共用。对于每个身份（一个地址），它跟踪：\n\n- **所有者。** 默认情况下，身份拥有它自己。`changeOwner(identity, newOwner)` 让你在不改变标识符的前提下轮换到新密钥或多签。\n- **委托者（delegate）。** `addDelegate(identity, delegateType, delegate, validity)` 为某种用途（例如签署 JWT）授权另一个密钥，有效期为 `validity` 秒。`validDelegate(...)` 用于检查，`revokeDelegate` 用于移除。\n- **属性。** `setAttribute(identity, name, value, validity)` 发布服务端点或加密密钥之类的数据。`revokeAttribute` 将其移除。\n\n每个写入函数都有一个 `…Signed` 变体，接受所有者的原始 `(v, r, s)` 签名，因此第三方可以代付 gas。\n\n为了节省 gas，委托者和属性主要以**事件**（`DIDOwnerChanged`、`DIDDelegateChanged`、`DIDAttributeChanged`）的形式记录。每个事件都包含 `previousChange`，即该身份上一次更新所在的区块，合约把最新的一个存在 `changed[identity]` 中。解析器沿着这些相互链接的区块向前回溯，以较低成本重建完整历史，然后组装出 W3C **DID 文档**。\n\n## 示例代码\n\n添加一个有效期 30 天的签名委托者（ethers v6）。`REGISTRY` 是你所在网络上已部署的注册表地址：\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, encodeBytes32String } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst owner = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst registry = new Contract(REGISTRY, [\n  \"function addDelegate(address identity, bytes32 delegateType, address delegate, uint validity)\",\n  \"function validDelegate(address identity, bytes32 delegateType, address delegate) view returns (bool)\",\n  \"function changed(address) view returns (uint)\",\n], owner);\n\nconst delegate = Wallet.createRandom().address;\nconst type = encodeBytes32String(\"veriKey\");\n\nawait (await registry.addDelegate(owner.address, type, delegate, 30 * 24 * 3600)).wait();\nconsole.log(await registry.validDelegate(owner.address, type, delegate)); // true\n```\n\n## 需要注意\n\n- 该 ERC 处于 **Stagnant** 状态，从未达到 Final。它的参考实现成为 `did:ethr` DID 方法（`ethr-did-registry`、`ethr-did-resolver`）的基础。\n- 规范把具体的委托类型和属性名称留作\"待定\"（to be determined）。实际的解析器遵循 `did:ethr` 方法规范中定义的约定。\n- 通过事件发布的数据是公开且永久的。切勿把个人数据放进属性。\n- 委托者会自动过期，但提前撤销仍然需要发送一笔交易。\n- 相关的身份工作包括 [ERC-725](/eip-725/)（Draft）和 [ERC-1812](/eip-1812/)（Stagnant）。\n"}}}
