{"eip":7803,"title":"EIP-712 Extensions for Account Abstraction","description":"Improvements for EIP-712 to support smart contract accounts.","authors":["Francisco Giordano (@frangio)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2024-10-08","requires":[712],"discussionsTo":"https://ethereum-magicians.org/t/erc-7803-eip-712-extensions-for-account-abstraction/21436","repo":"ERCs","label":"ERC-7803","officialUrl":"https://eips.ethereum.org/EIPS/eip-7803","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7803.md","url":"https://eips.huatuo.xyz/eip-7803/","tldr":{"en":"Draft extension to EIP-712 signing requests that adds signing domains (to bind a signature to a specific smart account) and auth methods (to tell wallets how the signature will be verified).","ja":"EIP-712 の署名リクエストへのドラフトの拡張。署名ドメイン（署名を特定のスマートアカウントに結び付ける）と認証方式（署名がどう検証されるかをウォレットに伝える）を追加する。","ko":"EIP-712 서명 요청에 대한 초안 확장. 서명 도메인(서명을 특정 스마트 계정에 묶음)과 인증 방식(서명이 어떻게 검증될지 지갑에 알려 줌)을 추가한다.","zh":"对 EIP-712 签名请求的草案扩展，新增签名域（signing domains，将签名绑定到特定的智能账户）和认证方法（auth methods，告诉钱包签名将如何被验证）。"},"tags":["signatures","eip-712","account-abstraction","wallets","json-rpc"],"explainers":{"en":{"lang":"en","tldr":"Draft extension to EIP-712 signing requests that adds signing domains (to bind a signature to a specific smart account) and auth methods (to tell wallets how the signature will be verified).","tags":["signatures","eip-712","account-abstraction","wallets","json-rpc"],"related":[712,1271,6492,7739,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7803/","markdown":"## What problem does it solve?\n\nSmart contract accounts sign messages through [ERC-1271](/eip-1271/) (`isValidSignature`) or [ERC-6492](/eip-6492/) for not-yet-deployed accounts. Two problems remain:\n\n1. **Replay across accounts.** One key can own several smart accounts. A signature produced by that key for account A could be replayed as if it came from account B, unless the signature is bound to the specific account. [EIP-712](/eip-712/) binds a signature to the *verifying* contract (the dapp), not to the account that signs. Workarounds such as [ERC-7739](/eip-7739/) nest the account domain inside the message, which adds complexity and struggles with accounts that control other accounts.\n2. **Unknown verification method.** Some protocols try `ecrecover` before `isValidSignature`, others the reverse. After [EIP-7702](/eip-7702/) an address can be both an EOA and a contract, so the order changes the outcome. Wallets have no way to know which method a dapp will use.\n\n## How it works\n\n`eth_signTypedData` requests gain two optional fields next to `types`, `primaryType`, `domain` and `message`:\n\n**`signingDomains`**: an array of account domains, each with its own `types` (must include `EIP712Domain`) and `domain`. It lists the chain of accounts from the outermost (first) to the one closest to the key (last). Each layer prepends its own domain as the request passes down, for example dapp → multisig → signer's smart account → hardware wallet. The hardware wallet can then show the full chain to the user.\n\nThe bytes to sign are built recursively:\n\n```text\nencode([first, ...rest], verifyingSep, msg) = \"\\x19\\x02\" ‖ first ‖ encode(rest, verifyingSep, msg)\nencode([],               verifyingSep, msg) = EIP-712 encoding of (verifyingSep, msg)\n```\n\nEach `first` is the EIP-712 `hashStruct` of that signing domain.\n\n**`authMethods`**: an ordered list of how the verifying contract will try to authenticate the signature, e.g. `{ \"id\": \"ECDSA\" }` or `{ \"id\": \"ERC-1271\" }`, with optional parameters. The wallet can return the matching kind of signature.\n\nWithout `authMethods`, the returned signature must be treated as opaque bytes of any length.\n\n## Sample code\n\nA typed-data request with both extensions (JSON):\n\n```json\n{\n  \"types\": {\n    \"EIP712Domain\": [\n      { \"name\": \"name\", \"type\": \"string\" },\n      { \"name\": \"chainId\", \"type\": \"uint256\" },\n      { \"name\": \"verifyingContract\", \"type\": \"address\" }\n    ],\n    \"Order\": [{ \"name\": \"amount\", \"type\": \"uint256\" }]\n  },\n  \"primaryType\": \"Order\",\n  \"domain\": { \"name\": \"ExampleDex\", \"chainId\": 1, \"verifyingContract\": \"0x1111111111111111111111111111111111111111\" },\n  \"message\": { \"amount\": \"1000\" },\n  \"signingDomains\": [\n    {\n      \"types\": { \"EIP712Domain\": [\n        { \"name\": \"name\", \"type\": \"string\" },\n        { \"name\": \"chainId\", \"type\": \"uint256\" },\n        { \"name\": \"verifyingContract\", \"type\": \"address\" }\n      ] },\n      \"domain\": { \"name\": \"MySmartAccount\", \"chainId\": 1, \"verifyingContract\": \"0x2222222222222222222222222222222222222222\" }\n    }\n  ],\n  \"authMethods\": [{ \"id\": \"ERC-1271\" }, { \"id\": \"ECDSA\" }]\n}\n```\n\nThe addresses above are placeholders.\n\n## Things to know\n\n- Status is **Draft**. Rationale, backwards compatibility and security sections are still marked TODO.\n- Both fields are optional, so existing EIP-712 requests are unaffected; wallets and dapps must both adopt it for any benefit.\n- `ERC-{n}` identifiers in `authMethods` must not be zero-padded (`ERC-1271`, not `ERC-01271`).\n- The `\\x19\\x02` prefix is distinct from EIP-712's `\\x19\\x01`, so a signing-domain signature cannot be confused with a plain EIP-712 signature.\n"},"ja":{"lang":"ja","tldr":"EIP-712 の署名リクエストへのドラフトの拡張。署名ドメイン（署名を特定のスマートアカウントに結び付ける）と認証方式（署名がどう検証されるかをウォレットに伝える）を追加する。","tags":["signatures","eip-712","account-abstraction","wallets","json-rpc"],"related":[712,1271,6492,7739,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7803/","markdown":"## 何を解決するのか\n\nスマートコントラクトアカウントは、[ERC-1271](/eip-1271/)（`isValidSignature`）、またはまだデプロイされていないアカウントについては [ERC-6492](/eip-6492/) を通じてメッセージに署名します。次の 2 つの問題が残っています。\n\n1. **アカウント間のリプレイ。** 1 つの鍵が複数のスマートアカウントを所有することがあります。署名がその特定のアカウントに結び付けられていなければ、その鍵がアカウント A のために作った署名を、アカウント B からのものとしてリプレイできてしまいます。[EIP-712](/eip-712/) は署名を*検証する*コントラクト（dApp）に署名を結び付けますが、署名するアカウントには結び付けません。[ERC-7739](/eip-7739/) のような回避策は、アカウントのドメインをメッセージの内側にネストしますが、複雑さが増し、他のアカウントを制御するアカウントには対応しづらくなります。\n2. **検証方法が不明。** あるプロトコルは `isValidSignature` より先に `ecrecover` を試し、別のプロトコルはその逆です。[EIP-7702](/eip-7702/) の後は、アドレスが EOA であると同時にコントラクトでもありうるため、順序が結果を変えます。ウォレットには、dApp がどちらの方法を使うかを知る手段がありません。\n\n## 仕組み\n\n`eth_signTypedData` のリクエストに、`types`、`primaryType`、`domain`、`message` に加えて、2 つの任意フィールドが追加されます。\n\n**`signingDomains`**: アカウントドメインの配列で、それぞれが独自の `types`（`EIP712Domain` を含まなければなりません）と `domain` を持ちます。最も外側（先頭）から、鍵に最も近いもの（末尾）までのアカウントの連鎖を列挙します。リクエストが下へ渡されるたびに、各レイヤーは自分のドメインを先頭に付け加えます。たとえば dApp → マルチシグ → 署名者のスマートアカウント → ハードウェアウォレットです。これにより、ハードウェアウォレットは連鎖全体をユーザーに表示できます。\n\n署名対象のバイト列は再帰的に構築されます。\n\n```text\nencode([first, ...rest], verifyingSep, msg) = \"\\x19\\x02\" ‖ first ‖ encode(rest, verifyingSep, msg)\nencode([],               verifyingSep, msg) = EIP-712 encoding of (verifyingSep, msg)\n```\n\n各 `first` は、その署名ドメインの EIP-712 `hashStruct` です。\n\n**`authMethods`**: 検証コントラクトが署名の認証をどう試みるかの順序付きリスト。たとえば `{ \"id\": \"ECDSA\" }` や `{ \"id\": \"ERC-1271\" }` で、任意のパラメーターを付けられます。ウォレットは、対応する種類の署名を返せます。\n\n`authMethods` がない場合、返される署名は任意の長さの不透明なバイト列として扱わなければなりません。\n\n## サンプルコード\n\n2 つの拡張の両方を使った typed-data リクエスト（JSON）:\n\n```json\n{\n  \"types\": {\n    \"EIP712Domain\": [\n      { \"name\": \"name\", \"type\": \"string\" },\n      { \"name\": \"chainId\", \"type\": \"uint256\" },\n      { \"name\": \"verifyingContract\", \"type\": \"address\" }\n    ],\n    \"Order\": [{ \"name\": \"amount\", \"type\": \"uint256\" }]\n  },\n  \"primaryType\": \"Order\",\n  \"domain\": { \"name\": \"ExampleDex\", \"chainId\": 1, \"verifyingContract\": \"0x1111111111111111111111111111111111111111\" },\n  \"message\": { \"amount\": \"1000\" },\n  \"signingDomains\": [\n    {\n      \"types\": { \"EIP712Domain\": [\n        { \"name\": \"name\", \"type\": \"string\" },\n        { \"name\": \"chainId\", \"type\": \"uint256\" },\n        { \"name\": \"verifyingContract\", \"type\": \"address\" }\n      ] },\n      \"domain\": { \"name\": \"MySmartAccount\", \"chainId\": 1, \"verifyingContract\": \"0x2222222222222222222222222222222222222222\" }\n    }\n  ],\n  \"authMethods\": [{ \"id\": \"ERC-1271\" }, { \"id\": \"ECDSA\" }]\n}\n```\n\n上のアドレスはプレースホルダーです。\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。根拠（Rationale）、後方互換性、セキュリティの各セクションは、まだ TODO のままです。\n- どちらのフィールドも任意なので、既存の EIP-712 リクエストは影響を受けません。ただし、メリットを得るには、ウォレットと dApp の両方が採用する必要があります。\n- `authMethods` 内の `ERC-{n}` 識別子は、ゼロ埋めしてはいけません（`ERC-01271` ではなく `ERC-1271`）。\n- `\\x19\\x02` プレフィックスは EIP-712 の `\\x19\\x01` とは別物なので、署名ドメインの署名が通常の EIP-712 署名と混同されることはありません。\n"},"ko":{"lang":"ko","tldr":"EIP-712 서명 요청에 대한 초안 확장. 서명 도메인(서명을 특정 스마트 계정에 묶음)과 인증 방식(서명이 어떻게 검증될지 지갑에 알려 줌)을 추가한다.","tags":["signatures","eip-712","account-abstraction","wallets","json-rpc"],"related":[712,1271,6492,7739,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7803/","markdown":"## 어떤 문제를 해결하나요?\n\n스마트 컨트랙트 계정은 [ERC-1271](/eip-1271/)(`isValidSignature`)을 통해, 아직 배포되지 않은 계정은 [ERC-6492](/eip-6492/)를 통해 메시지에 서명합니다. 두 가지 문제가 남아 있습니다.\n\n1. **계정 간 재생 공격.** 하나의 키가 여러 스마트 계정을 소유할 수 있습니다. 서명이 특정 계정에 묶여 있지 않으면, 그 키가 계정 A를 위해 만든 서명을 계정 B에서 나온 것처럼 재생할 수 있습니다. [EIP-712](/eip-712/)는 서명을 *검증하는* 컨트랙트(dapp)에 묶을 뿐, 서명하는 계정에는 묶지 않습니다. [ERC-7739](/eip-7739/) 같은 우회책은 계정 도메인을 메시지 안에 중첩시키는데, 복잡도가 늘고 다른 계정을 제어하는 계정에서는 어려움을 겪습니다.\n2. **알 수 없는 검증 방식.** 어떤 프로토콜은 `isValidSignature`보다 `ecrecover`를 먼저 시도하고, 어떤 프로토콜은 그 반대입니다. [EIP-7702](/eip-7702/) 이후에는 주소가 EOA이면서 동시에 컨트랙트일 수 있어 순서에 따라 결과가 달라집니다. 지갑은 dapp이 어느 방식을 쓸지 알 방법이 없습니다.\n\n## 어떻게 동작하나요?\n\n`eth_signTypedData` 요청에는 `types`, `primaryType`, `domain`, `message` 옆에 선택 필드 두 개가 추가됩니다.\n\n**`signingDomains`**: 계정 도메인의 배열로, 각각 자체 `types`(`EIP712Domain`을 포함해야 함)와 `domain`을 가집니다. 가장 바깥(첫 번째)에서 키에 가장 가까운(마지막) 계정까지의 사슬을 나열합니다. 요청이 아래로 전달되면서 각 계층은 자기 도메인을 앞에 덧붙입니다. 예를 들면 dapp → 멀티시그 → 서명자의 스마트 계정 → 하드웨어 지갑입니다. 그러면 하드웨어 지갑이 사용자에게 전체 사슬을 보여 줄 수 있습니다.\n\n서명할 바이트는 재귀적으로 만듭니다.\n\n```text\nencode([first, ...rest], verifyingSep, msg) = \"\\x19\\x02\" ‖ first ‖ encode(rest, verifyingSep, msg)\nencode([],               verifyingSep, msg) = EIP-712 encoding of (verifyingSep, msg)\n```\n\n각 `first`는 그 서명 도메인의 EIP-712 `hashStruct`입니다.\n\n**`authMethods`**: 검증 컨트랙트가 서명을 어떤 순서로 인증하려 하는지를 나타내는 순서 있는 목록입니다. 예: `{ \"id\": \"ECDSA\" }`, `{ \"id\": \"ERC-1271\" }`이며 선택적 파라미터를 붙일 수 있습니다. 지갑은 그에 맞는 종류의 서명을 돌려줄 수 있습니다.\n\n`authMethods`가 없으면 반환된 서명은 길이에 상관없이 불투명한 바이트로 취급해야 합니다.\n\n## 샘플 코드\n\n두 확장을 모두 쓴 typed-data 요청(JSON):\n\n```json\n{\n  \"types\": {\n    \"EIP712Domain\": [\n      { \"name\": \"name\", \"type\": \"string\" },\n      { \"name\": \"chainId\", \"type\": \"uint256\" },\n      { \"name\": \"verifyingContract\", \"type\": \"address\" }\n    ],\n    \"Order\": [{ \"name\": \"amount\", \"type\": \"uint256\" }]\n  },\n  \"primaryType\": \"Order\",\n  \"domain\": { \"name\": \"ExampleDex\", \"chainId\": 1, \"verifyingContract\": \"0x1111111111111111111111111111111111111111\" },\n  \"message\": { \"amount\": \"1000\" },\n  \"signingDomains\": [\n    {\n      \"types\": { \"EIP712Domain\": [\n        { \"name\": \"name\", \"type\": \"string\" },\n        { \"name\": \"chainId\", \"type\": \"uint256\" },\n        { \"name\": \"verifyingContract\", \"type\": \"address\" }\n      ] },\n      \"domain\": { \"name\": \"MySmartAccount\", \"chainId\": 1, \"verifyingContract\": \"0x2222222222222222222222222222222222222222\" }\n    }\n  ],\n  \"authMethods\": [{ \"id\": \"ERC-1271\" }, { \"id\": \"ECDSA\" }]\n}\n```\n\n위의 주소는 자리 표시자입니다.\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다. 근거(Rationale), 하위 호환성, 보안 섹션은 아직 TODO로 표시되어 있습니다.\n- 두 필드는 모두 선택 사항이므로 기존 EIP-712 요청은 영향을 받지 않습니다. 이점을 얻으려면 지갑과 dapp이 모두 채택해야 합니다.\n- `authMethods`의 `ERC-{n}` 식별자는 0으로 채우면 안 됩니다(`ERC-01271`이 아니라 `ERC-1271`).\n- `\\x19\\x02` 접두어는 EIP-712의 `\\x19\\x01`과 다르므로, 서명 도메인 서명이 일반 EIP-712 서명과 혼동될 수 없습니다.\n"},"zh":{"lang":"zh","tldr":"对 EIP-712 签名请求的草案扩展，新增签名域（signing domains，将签名绑定到特定的智能账户）和认证方法（auth methods，告诉钱包签名将如何被验证）。","tags":["signatures","eip-712","account-abstraction","wallets","json-rpc"],"related":[712,1271,6492,7739,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7803/","markdown":"## 它解决什么问题？\n\n智能合约账户通过 [ERC-1271](/eip-1271/)（`isValidSignature`）签署消息，对尚未部署的账户则通过 [ERC-6492](/eip-6492/)。仍有两个问题：\n\n1. **跨账户重放。** 一个密钥可以拥有多个智能账户。除非签名绑定到具体的账户，否则该密钥为账户 A 生成的签名可能被当作来自账户 B 而重放。[EIP-712](/eip-712/) 把签名绑定到*验证*方合约（dapp），而不是签名的账户。[ERC-7739](/eip-7739/) 之类的变通做法把账户域嵌套进消息里，这增加了复杂度，而且难以处理控制其他账户的账户。\n2. **验证方式未知。** 有些协议先尝试 `ecrecover` 再尝试 `isValidSignature`，另一些则相反。在 [EIP-7702](/eip-7702/) 之后，一个地址可以既是 EOA 又是合约，因此顺序会改变结果。钱包无法得知 dapp 会使用哪种方法。\n\n## 它如何运作\n\n`eth_signTypedData` 请求在 `types`、`primaryType`、`domain` 和 `message` 之外，新增两个可选字段：\n\n**`signingDomains`**：账户域的数组，每个域都有自己的 `types`（必须包含 `EIP712Domain`）和 `domain`。它列出从最外层（第一个）到最靠近密钥者（最后一个）的账户链。请求向下传递时，每一层都会在前面加上自己的域，例如 dapp → 多签 → 签名者的智能账户 → 硬件钱包。这样硬件钱包就能向用户展示完整的链。\n\n待签名的字节是递归构造的：\n\n```text\nencode([first, ...rest], verifyingSep, msg) = \"\\x19\\x02\" ‖ first ‖ encode(rest, verifyingSep, msg)\nencode([],               verifyingSep, msg) = EIP-712 encoding of (verifyingSep, msg)\n```\n\n每个 `first` 是该签名域的 EIP-712 `hashStruct`。\n\n**`authMethods`**：验证合约将如何尝试认证签名的有序列表，例如 `{ \"id\": \"ECDSA\" }` 或 `{ \"id\": \"ERC-1271\" }`，可带可选参数。钱包可以返回相匹配的签名类型。\n\n没有 `authMethods` 时，返回的签名必须被当作任意长度的不透明字节。\n\n## 示例代码\n\n同时使用两个扩展的 typed-data 请求（JSON）：\n\n```json\n{\n  \"types\": {\n    \"EIP712Domain\": [\n      { \"name\": \"name\", \"type\": \"string\" },\n      { \"name\": \"chainId\", \"type\": \"uint256\" },\n      { \"name\": \"verifyingContract\", \"type\": \"address\" }\n    ],\n    \"Order\": [{ \"name\": \"amount\", \"type\": \"uint256\" }]\n  },\n  \"primaryType\": \"Order\",\n  \"domain\": { \"name\": \"ExampleDex\", \"chainId\": 1, \"verifyingContract\": \"0x1111111111111111111111111111111111111111\" },\n  \"message\": { \"amount\": \"1000\" },\n  \"signingDomains\": [\n    {\n      \"types\": { \"EIP712Domain\": [\n        { \"name\": \"name\", \"type\": \"string\" },\n        { \"name\": \"chainId\", \"type\": \"uint256\" },\n        { \"name\": \"verifyingContract\", \"type\": \"address\" }\n      ] },\n      \"domain\": { \"name\": \"MySmartAccount\", \"chainId\": 1, \"verifyingContract\": \"0x2222222222222222222222222222222222222222\" }\n    }\n  ],\n  \"authMethods\": [{ \"id\": \"ERC-1271\" }, { \"id\": \"ECDSA\" }]\n}\n```\n\n上面的地址是占位符。\n\n## 需要注意\n\n- 状态为 **Draft**。设计理由（Rationale）、向后兼容性和安全性各节仍标记为 TODO。\n- 两个字段都是可选的，因此现有的 EIP-712 请求不受影响；钱包和 dapp 双方都必须采用，才能获得任何好处。\n- `authMethods` 中的 `ERC-{n}` 标识符不得补零（写作 `ERC-1271`，而不是 `ERC-01271`）。\n- `\\x19\\x02` 前缀不同于 EIP-712 的 `\\x19\\x01`，因此签名域签名不会与普通的 EIP-712 签名混淆。\n"}}}
