{"eip":6662,"title":"AA Account Metadata For Authentication","description":"An ERC-4337 extension to define a new authentication model","authors":["Shu Dong (@dongshu2013)","Zihao Chen (@zihaoccc)","Peter Chen (@pette1999)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2023-03-09","requires":[4337,4804],"discussionsTo":"https://ethereum-magicians.org/t/eip-6662-account-metadata-for-aa-account-authentication/13232","repo":"ERCs","label":"ERC-6662","officialUrl":"https://eips.ethereum.org/EIPS/eip-6662","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6662.md","url":"https://eips.huatuo.xyz/eip-6662/","tldr":{"en":"Draft ERC-4337 extension where a smart account publishes on-chain where its authenticator lives and what request format it accepts, so dApps can ask it to sign without a pre-connected wallet.","ja":"ERC-4337 のドラフト拡張。スマートアカウントが、認証器（authenticator）の場所と受け付けるリクエスト形式をオンチェーンで公開し、事前に接続されたウォレットがなくても dApp が署名を依頼できるようにする。","ko":"ERC-4337 초안 확장. 스마트 계정이 인증기(authenticator)의 위치와 받아들이는 요청 형식을 온체인에 공개해, 미리 연결된 지갑 없이도 dApp이 서명을 요청할 수 있게 한다.","zh":"ERC-4337 的草案扩展：智能账户在链上公布其认证器所在位置和接受的请求格式，使 dApp 无需预先连接钱包即可请求签名。"},"tags":["account-abstraction","authentication","erc4337","smart-account","metadata"],"explainers":{"en":{"lang":"en","tldr":"Draft ERC-4337 extension where a smart account publishes on-chain where its authenticator lives and what request format it accepts, so dApps can ask it to sign without a pre-connected wallet.","tags":["account-abstraction","authentication","erc4337","smart-account","metadata"],"related":[4337,4804,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-6662/","markdown":"## What problem does it solve?\n\nToday a dApp only learns about your account after you \"connect wallet\": the wallet pushes your address to the site, and every signing request goes back through that live connection. With smart contract accounts ([ERC-4337](/eip-4337/)), the thing that actually authorizes operations could be anything: a phone app, a cloud signer, a hardware device. A dApp has no standard way to discover it.\n\nERC-6662 lets an account publish its authentication details once, on-chain. Given only your account address, a dApp can look up where to send a signing request and in what format.\n\n## How it works\n\nThere are three roles:\n\n- **Authenticator**: whatever holds the key that signs your user operations (mobile app, online service, …).\n- **Relay**: an online service that forwards requests from dApps to the authenticator. An online authenticator can be its own relay.\n- **dApp**: reads the account's metadata and sends an `AuthenticationRequest` to a relay.\n\nThe smart account implements `IAccountMetadata` alongside ERC-4337's `IAccount`:\n\n- `getAuthenticationInfo()` returns a list of `AuthenticatorInfo { string[] relayURI; string schema; }`.\n- `relayURI` lists relay endpoints; the dApp tries them in order and uses the first that works.\n- `schema` is a JSON Schema (inline, or a URI, using [ERC-4804](/eip-4804/) `web3://` if stored on-chain) describing the `AuthenticationRequest`. A typical request carries the entry point address, chain ID, and an unsigned `UserOperation`.\n\nSeveral `AuthenticatorInfo` entries can enable multisig: each authenticator signs independently and an ERC-4337 aggregator combines the signatures.\n\n## Sample code\n\nThe interface and a dApp-side lookup (ethers v6):\n\n```solidity\ninterface IAccountMetadata {\n    struct AuthenticatorInfo {\n        string[] relayURI; // where to send requests\n        string schema;     // JSON schema or URI for AuthenticationRequest\n    }\n    function getAuthenticationInfo() external view returns (AuthenticatorInfo[] memory);\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst account = new Contract(smartAccountAddr, [\n  \"function getAuthenticationInfo() view returns ((string[] relayURI, string schema)[])\",\n], provider);\n\nconst [first] = await account.getAuthenticationInfo();\nconst request = {\n  entrypoint: ENTRYPOINT_ADDRESS,\n  chainId: \"0x1\",\n  userOp: unsignedUserOp, // ERC-4337 UserOperation without signature\n};\nfor (const uri of first.relayURI) {\n  const res = await fetch(uri, { method: \"POST\", body: JSON.stringify(request) });\n  if (res.ok) break; // first working relay wins\n}\n```\n\n## Things to know\n\n- **Status: Draft.** No relay protocol, transport or authentication of the dApp itself is standardized; the schema is account-defined.\n- Relays can see requests. The spec recommends end-to-end encryption, e.g. JWE, with the content key encrypted to the signer, so relays cannot read or front-run them.\n- On-chain metadata is public: publishing relay URIs reveals which services back your account.\n- The sample's request fields follow the example schema in the spec; real accounts may require different fields.\n"},"ja":{"lang":"ja","tldr":"ERC-4337 のドラフト拡張。スマートアカウントが、認証器（authenticator）の場所と受け付けるリクエスト形式をオンチェーンで公開し、事前に接続されたウォレットがなくても dApp が署名を依頼できるようにする。","tags":["account-abstraction","authentication","erc4337","smart-account","metadata"],"related":[4337,4804,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-6662/","markdown":"## 何を解決するのか\n\n現在、dApp が自分のアカウントを知るのは「ウォレットを接続」した後です。ウォレットがサイトにアドレスを渡し、署名リクエストはすべてその接続経由で返されます。スマートコントラクトアカウント（[ERC-4337](/eip-4337/)）では、操作を実際に承認するものは何でもよく、スマートフォンアプリ、クラウド署名サービス、ハードウェアデバイスなどが考えられます。dApp がそれを発見する標準的な方法はありません。\n\nERC-6662 は、アカウントが認証に関する情報をオンチェーンに一度だけ公開できるようにします。アカウントのアドレスさえ分かれば、dApp は署名リクエストをどこへ、どの形式で送ればよいかを調べられます。\n\n## 仕組み\n\n役割は 3 つあります。\n\n- **Authenticator（認証器）**: ユーザーオペレーションに署名する鍵を保持するもの（モバイルアプリ、オンラインサービスなど）。\n- **Relay（リレー）**: dApp からのリクエストを認証器に転送するオンラインサービス。オンラインの認証器は自分自身がリレーになることもできます。\n- **dApp**: アカウントのメタデータを読み取り、リレーに `AuthenticationRequest` を送ります。\n\nスマートアカウントは、ERC-4337 の `IAccount` に加えて `IAccountMetadata` を実装します。\n\n- `getAuthenticationInfo()` は `AuthenticatorInfo { string[] relayURI; string schema; }` のリストを返します。\n- `relayURI` はリレーのエンドポイントの一覧で、dApp は順に試し、最初に動作したものを使います。\n- `schema` は `AuthenticationRequest` を記述する JSON Schema です（インラインか URI。オンチェーンに保存する場合は [ERC-4804](/eip-4804/) の `web3://` を使用）。典型的なリクエストには、エントリーポイントのアドレス、チェーン ID、未署名の `UserOperation` が含まれます。\n\n複数の `AuthenticatorInfo` エントリを使うとマルチシグを実現できます。各認証器が独立して署名し、ERC-4337 のアグリゲーターが署名を結合します。\n\n## サンプルコード\n\nインターフェースと、dApp 側での参照例（ethers v6）:\n\n```solidity\ninterface IAccountMetadata {\n    struct AuthenticatorInfo {\n        string[] relayURI; // where to send requests\n        string schema;     // JSON schema or URI for AuthenticationRequest\n    }\n    function getAuthenticationInfo() external view returns (AuthenticatorInfo[] memory);\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst account = new Contract(smartAccountAddr, [\n  \"function getAuthenticationInfo() view returns ((string[] relayURI, string schema)[])\",\n], provider);\n\nconst [first] = await account.getAuthenticationInfo();\nconst request = {\n  entrypoint: ENTRYPOINT_ADDRESS,\n  chainId: \"0x1\",\n  userOp: unsignedUserOp, // ERC-4337 UserOperation without signature\n};\nfor (const uri of first.relayURI) {\n  const res = await fetch(uri, { method: \"POST\", body: JSON.stringify(request) });\n  if (res.ok) break; // first working relay wins\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** リレーのプロトコル、トランスポート、dApp 自身の認証は標準化されておらず、スキーマはアカウントごとに定義されます。\n- リレーはリクエストの内容を見ることができます。仕様では、リレーが読み取ったりフロントランしたりできないよう、JWE などによるエンドツーエンド暗号化（コンテンツ鍵を署名者宛てに暗号化）を推奨しています。\n- オンチェーンのメタデータは公開されます。リレーの URI を公開すると、どのサービスがあなたのアカウントを支えているかが分かります。\n- サンプルのリクエストフィールドは仕様内の例のスキーマに従ったものです。実際のアカウントでは別のフィールドが必要になる場合があります。\n"},"ko":{"lang":"ko","tldr":"ERC-4337 초안 확장. 스마트 계정이 인증기(authenticator)의 위치와 받아들이는 요청 형식을 온체인에 공개해, 미리 연결된 지갑 없이도 dApp이 서명을 요청할 수 있게 한다.","tags":["account-abstraction","authentication","erc4337","smart-account","metadata"],"related":[4337,4804,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-6662/","markdown":"## 어떤 문제를 해결하나요?\n\n오늘날 dApp은 \"지갑 연결\"을 한 뒤에야 내 계정을 알게 됩니다. 지갑이 사이트에 주소를 넘겨 주고, 모든 서명 요청은 그 연결을 통해 돌아옵니다. 스마트 컨트랙트 계정([ERC-4337](/eip-4337/))에서는 작업을 실제로 승인하는 주체가 무엇이든 될 수 있습니다. 휴대폰 앱, 클라우드 서명 서비스, 하드웨어 기기 등이 그 예입니다. dApp이 이를 찾아낼 표준 방법은 없습니다.\n\nERC-6662는 계정이 인증 정보를 온체인에 한 번만 공개하게 해 줍니다. 계정 주소만 있으면 dApp은 서명 요청을 어디로, 어떤 형식으로 보내야 하는지 조회할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n역할은 세 가지입니다.\n\n- **Authenticator(인증기)**: 사용자 오퍼레이션에 서명하는 키를 가진 주체(모바일 앱, 온라인 서비스 등).\n- **Relay(릴레이)**: dApp의 요청을 인증기로 전달하는 온라인 서비스. 온라인 인증기는 스스로 릴레이가 될 수 있습니다.\n- **dApp**: 계정의 메타데이터를 읽고 릴레이에 `AuthenticationRequest`를 보냅니다.\n\n스마트 계정은 ERC-4337의 `IAccount`와 함께 `IAccountMetadata`를 구현합니다.\n\n- `getAuthenticationInfo()`는 `AuthenticatorInfo { string[] relayURI; string schema; }`의 목록을 반환합니다.\n- `relayURI`는 릴레이 엔드포인트 목록이며, dApp은 순서대로 시도해 처음으로 동작하는 것을 사용합니다.\n- `schema`는 `AuthenticationRequest`를 설명하는 JSON Schema입니다(인라인이거나 URI이며, 온체인에 저장할 경우 [ERC-4804](/eip-4804/)의 `web3://`를 사용). 일반적인 요청에는 엔트리포인트 주소, 체인 ID, 서명되지 않은 `UserOperation`이 담깁니다.\n\n`AuthenticatorInfo` 항목을 여러 개 두면 멀티시그가 가능합니다. 각 인증기가 독립적으로 서명하고 ERC-4337 어그리게이터가 서명을 합칩니다.\n\n## 샘플 코드\n\n인터페이스와 dApp 쪽 조회 코드(ethers v6):\n\n```solidity\ninterface IAccountMetadata {\n    struct AuthenticatorInfo {\n        string[] relayURI; // where to send requests\n        string schema;     // JSON schema or URI for AuthenticationRequest\n    }\n    function getAuthenticationInfo() external view returns (AuthenticatorInfo[] memory);\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst account = new Contract(smartAccountAddr, [\n  \"function getAuthenticationInfo() view returns ((string[] relayURI, string schema)[])\",\n], provider);\n\nconst [first] = await account.getAuthenticationInfo();\nconst request = {\n  entrypoint: ENTRYPOINT_ADDRESS,\n  chainId: \"0x1\",\n  userOp: unsignedUserOp, // ERC-4337 UserOperation without signature\n};\nfor (const uri of first.relayURI) {\n  const res = await fetch(uri, { method: \"POST\", body: JSON.stringify(request) });\n  if (res.ok) break; // first working relay wins\n}\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 릴레이 프로토콜, 전송 방식, dApp 자체의 인증은 표준화되어 있지 않으며 스키마는 계정이 정의합니다.\n- 릴레이는 요청 내용을 볼 수 있습니다. 명세는 릴레이가 읽거나 프런트런하지 못하도록 JWE 같은 종단 간 암호화(콘텐츠 키를 서명자에게 암호화)를 권장합니다.\n- 온체인 메타데이터는 공개됩니다. 릴레이 URI를 공개하면 어떤 서비스가 내 계정을 뒷받침하는지 드러납니다.\n- 샘플의 요청 필드는 명세의 예시 스키마를 따른 것이며, 실제 계정은 다른 필드를 요구할 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"ERC-4337 的草案扩展：智能账户在链上公布其认证器所在位置和接受的请求格式，使 dApp 无需预先连接钱包即可请求签名。","tags":["account-abstraction","authentication","erc4337","smart-account","metadata"],"related":[4337,4804,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-6662/","markdown":"## 它解决什么问题？\n\n如今，dApp 只有在你\"连接钱包\"之后才知道你的账户：钱包把你的地址推送给网站，所有签名请求都通过这条实时连接返回。对于智能合约账户（[ERC-4337](/eip-4337/)），真正授权操作的可以是任何东西：手机应用、云端签名服务、硬件设备。dApp 没有标准方式去发现它。\n\nERC-6662 让账户把认证信息一次性公布在链上。只要知道你的账户地址，dApp 就能查到应该把签名请求发到哪里、用什么格式。\n\n## 它如何运作\n\n涉及三种角色：\n\n- **Authenticator（认证器）**：持有为你的用户操作签名的密钥的任何东西（手机应用、在线服务等）。\n- **Relay（中继）**：把 dApp 的请求转发给认证器的在线服务。在线认证器可以兼作自己的中继。\n- **dApp**：读取账户的元数据，并向中继发送 `AuthenticationRequest`。\n\n智能账户在 ERC-4337 的 `IAccount` 之外还实现 `IAccountMetadata`：\n\n- `getAuthenticationInfo()` 返回 `AuthenticatorInfo { string[] relayURI; string schema; }` 的列表。\n- `relayURI` 列出中继端点；dApp 按顺序尝试，使用第一个可用的。\n- `schema` 是描述 `AuthenticationRequest` 的 JSON Schema（内联，或 URI；若存储在链上则使用 [ERC-4804](/eip-4804/) 的 `web3://`）。典型的请求包含入口点地址、链 ID 和未签名的 `UserOperation`。\n\n多个 `AuthenticatorInfo` 条目可以实现多重签名：每个认证器独立签名，再由 ERC-4337 聚合器合并签名。\n\n## 示例代码\n\n接口以及 dApp 端的查询（ethers v6）：\n\n```solidity\ninterface IAccountMetadata {\n    struct AuthenticatorInfo {\n        string[] relayURI; // where to send requests\n        string schema;     // JSON schema or URI for AuthenticationRequest\n    }\n    function getAuthenticationInfo() external view returns (AuthenticatorInfo[] memory);\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst account = new Contract(smartAccountAddr, [\n  \"function getAuthenticationInfo() view returns ((string[] relayURI, string schema)[])\",\n], provider);\n\nconst [first] = await account.getAuthenticationInfo();\nconst request = {\n  entrypoint: ENTRYPOINT_ADDRESS,\n  chainId: \"0x1\",\n  userOp: unsignedUserOp, // ERC-4337 UserOperation without signature\n};\nfor (const uri of first.relayURI) {\n  const res = await fetch(uri, { method: \"POST\", body: JSON.stringify(request) });\n  if (res.ok) break; // first working relay wins\n}\n```\n\n## 需要注意\n\n- **状态：Draft。** 中继协议、传输方式以及 dApp 自身的认证都没有标准化；schema 由账户自行定义。\n- 中继可以看到请求内容。规范建议使用端到端加密，例如 JWE，并把内容密钥加密给签名者，这样中继既无法读取也无法抢跑。\n- 链上元数据是公开的：公布中继 URI 会暴露哪些服务在支撑你的账户。\n- 示例中的请求字段遵循规范里的示例 schema；实际的账户可能要求不同的字段。\n"}}}
