{"eip":5792,"title":"Wallet Call API","description":"Adds JSON-RPC methods for sending multiple calls from the user's wallet, and checking their status","authors":["Moody Salem (@moodysalem)","Lukas Rosario (@lukasrosario)","Wilson Cusack (@wilsoncusack)","Dror Tirosh (@drortirosh)","Jake Moxey (@jxom)","Derek Rein (@arein)","Alex Forshtat (@forshtat)","Sam Wilson (@SamWilsn) \u003csam@binarycake.ca\u003e","Borislav Itskov (@Oxbobby)","Joao Tavares (@cryptotavares)","Adam Fuller (@azf20)","Philip Liao (@phil-ociraptor)","bumblefudge (@bumblefudge)"],"status":"Final","type":"Standards Track","category":"Interface","created":"2022-10-17","requires":[1193],"discussionsTo":"https://ethereum-magicians.org/t/eip-5792-wallet-abstract-transaction-send-api/11374","repo":"EIPs","label":"EIP-5792","officialUrl":"https://eips.ethereum.org/EIPS/eip-5792","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-5792.md","url":"https://eips.huatuo.xyz/eip-5792/","tldr":{"en":"Adds wallet_sendCalls and companion RPC methods so a dApp can ask a wallet to send a batch of calls, optionally atomically, and use wallet features like paymasters.","ja":"wallet_sendCalls と関連する RPC メソッドを追加し、dApp がウォレットに複数の呼び出しのバッチ送信（任意でアトミック）を依頼したり、Paymaster などのウォレット機能を使えるようにする。","ko":"wallet_sendCalls와 관련 RPC 메서드를 추가해, dApp이 지갑에 호출 묶음(선택적으로 원자적)을 보내 달라고 요청하고 페이마스터 같은 지갑 기능을 쓸 수 있게 한다.","zh":"新增 wallet_sendCalls 及配套的 RPC 方法，使 dApp 可以请求钱包发送一批调用（可选择原子执行），并使用 paymaster 等钱包功能。"},"tags":["wallet","json-rpc","batching","account-abstraction","interface"],"explainers":{"en":{"lang":"en","tldr":"Adds wallet_sendCalls and companion RPC methods so a dApp can ask a wallet to send a batch of calls, optionally atomically, and use wallet features like paymasters.","tags":["wallet","json-rpc","batching","account-abstraction","interface"],"related":[1193,4337,7702,6963],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-5792/","markdown":"## What problem does it solve?\n\ndApps talk to wallets mostly through `eth_sendTransaction` and `eth_getTransactionReceipt`. Those methods send exactly one transaction and know nothing about smart accounts. A simple \"approve then swap\" takes two pop-ups and two transactions, and an app cannot ask the wallet to use a paymaster (gas sponsorship) even if the wallet supports one.\n\nEIP-5792 defines a new `wallet_` API: the app hands over a list of calls, the wallet decides how to execute them (one batched transaction for a smart account, or several for a plain EOA), and the app can discover what extra features the wallet supports.\n\n## How it works\n\nFour JSON-RPC methods:\n\n- **`wallet_sendCalls`**: takes `version`, `chainId`, optional `from`, `atomicRequired`, a list of `{to, data, value}` calls, and optional `capabilities`. Returns a batch `id`. Calls must run in order, on the given chain, from the given address.\n- **`wallet_getCallsStatus(id)`**: returns a numeric `status` (100 pending, 200 confirmed, 400 off-chain failure, 500 fully reverted, 600 partially reverted), whether the batch ran `atomic`ally, and receipts with only the logs from your calls.\n- **`wallet_showCallsStatus(id)`**: asks the wallet to display the batch to the user.\n- **`wallet_getCapabilities(address, chainIds?)`**: returns supported capabilities per chain (hex chain ID keys; `\"0x0\"` means all chains).\n\n**Atomicity** is a built-in capability with status `supported`, `ready` (can upgrade, for example an EOA via [EIP-7702](/eip-7702/), after user approval) or `unsupported`. If `atomicRequired: true`, the wallet must execute all calls atomically and contiguously, or reject.\n\n**Capabilities** are extensible. A capability the wallet doesn't know causes rejection (error 5700) unless the app marks it `optional: true`. Paymaster services for [ERC-4337](/eip-4337/) accounts are the typical example. New capabilities are defined in separate ERCs.\n\n## Sample code\n\nApprove and swap in one request, falling back if batching isn't available:\n\n```ts\nconst [from] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\nconst chainId = \"0x1\";\n\nconst caps = await window.ethereum.request({\n  method: \"wallet_getCapabilities\",\n  params: [from, [chainId]],\n});\nconst atomic = caps?.[chainId]?.atomic?.status; // \"supported\" | \"ready\" | \"unsupported\"\n\nconst { id } = await window.ethereum.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"2.0.0\",\n    chainId,\n    from,\n    atomicRequired: atomic === \"supported\" || atomic === \"ready\",\n    calls: [\n      { to: TOKEN, data: approveCalldata },\n      { to: ROUTER, data: swapCalldata },\n    ],\n  }],\n});\n\nconst status = await window.ethereum.request({\n  method: \"wallet_getCallsStatus\",\n  params: [id],\n});\nif (status.status === 200) console.log(status.receipts);\n```\n\n## Things to know\n\n- **Status: Final.** Apps should still fall back to `eth_sendTransaction` when a wallet does not implement these methods.\n- Without `atomicRequired`, an EOA wallet may send the calls as separate transactions, so later calls can run after earlier ones failed. Check `atomic` and the per-receipt status.\n- Wallets should keep batch status queryable for at least 24 hours after submission.\n- Batch IDs must be unique per sender per app; reusing one is rejected (error 5720).\n- `wallet_getCapabilities` should only answer for addresses already connected to the app, to limit fingerprinting. Wallets may also expose capabilities out-of-band (e.g. alongside [EIP-6963](/eip-6963/) discovery).\n"},"ja":{"lang":"ja","tldr":"wallet_sendCalls と関連する RPC メソッドを追加し、dApp がウォレットに複数の呼び出しのバッチ送信（任意でアトミック）を依頼したり、Paymaster などのウォレット機能を使えるようにする。","tags":["wallet","json-rpc","batching","account-abstraction","interface"],"related":[1193,4337,7702,6963],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-5792/","markdown":"## 何を解決するのか\n\ndApp は主に `eth_sendTransaction` と `eth_getTransactionReceipt` を通じてウォレットとやり取りします。これらのメソッドは正確に 1 つのトランザクションを送るだけで、スマートアカウントについては何も知りません。単純な「approve してからスワップ」でも、ポップアップとトランザクションが 2 回ずつ必要で、ウォレットが Paymaster（ガスのスポンサー）に対応していても、アプリがそれを使うよう依頼することはできません。\n\nEIP-5792 は新しい `wallet_` API を定義します。アプリが呼び出しのリストを渡し、ウォレットがその実行方法（スマートアカウントなら 1 つのバッチトランザクション、通常の EOA なら複数）を決め、アプリはウォレットがサポートする追加機能を調べられます。\n\n## 仕組み\n\n4 つの JSON-RPC メソッドがあります。\n\n- **`wallet_sendCalls`**: `version`、`chainId`、任意の `from`、`atomicRequired`、`{to, data, value}` の呼び出しのリスト、任意の `capabilities` を受け取り、バッチの `id` を返します。呼び出しは、指定されたチェーン上で、指定されたアドレスから、順番に実行されなければなりません。\n- **`wallet_getCallsStatus(id)`**: 数値の `status`（100 は保留中、200 は確認済み、400 はオフチェーンの失敗、500 は完全に revert、600 は部分的に revert）、バッチが `atomic` に実行されたかどうか、そしてあなたの呼び出しのログだけを含むレシートを返します。\n- **`wallet_showCallsStatus(id)`**: ウォレットに、バッチをユーザーに表示するよう依頼します。\n- **`wallet_getCapabilities(address, chainIds?)`**: チェーンごとのサポート済み capability を返します（キーは 16 進のチェーン ID。`\"0x0\"` はすべてのチェーンを意味します）。\n\n**アトミック性** は組み込みの capability で、ステータスは `supported`、`ready`（ユーザーの承認後にアップグレード可能。たとえば [EIP-7702](/eip-7702/) による EOA）、`unsupported` のいずれかです。`atomicRequired: true` の場合、ウォレットはすべての呼び出しをアトミックかつ連続して実行するか、拒否しなければなりません。\n\n**Capability** は拡張可能です。ウォレットが知らない capability は、アプリが `optional: true` を指定していない限り拒否されます（エラー 5700）。[ERC-4337](/eip-4337/) アカウント向けの Paymaster サービスが代表例です。新しい capability は、別個の ERC で定義されます。\n\n## サンプルコード\n\n1 回のリクエストで approve とスワップを行い、バッチ処理が使えない場合はフォールバックする:\n\n```ts\nconst [from] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\nconst chainId = \"0x1\";\n\nconst caps = await window.ethereum.request({\n  method: \"wallet_getCapabilities\",\n  params: [from, [chainId]],\n});\nconst atomic = caps?.[chainId]?.atomic?.status; // \"supported\" | \"ready\" | \"unsupported\"\n\nconst { id } = await window.ethereum.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"2.0.0\",\n    chainId,\n    from,\n    atomicRequired: atomic === \"supported\" || atomic === \"ready\",\n    calls: [\n      { to: TOKEN, data: approveCalldata },\n      { to: ROUTER, data: swapCalldata },\n    ],\n  }],\n});\n\nconst status = await window.ethereum.request({\n  method: \"wallet_getCallsStatus\",\n  params: [id],\n});\nif (status.status === 200) console.log(status.receipts);\n```\n\n## 知っておくべきこと\n\n- **ステータス: Final。** ウォレットがこれらのメソッドを実装していない場合、アプリは `eth_sendTransaction` へのフォールバックを行うべきです。\n- `atomicRequired` がない場合、EOA ウォレットは呼び出しを別々のトランザクションとして送ることがあり、前の呼び出しが失敗した後に後の呼び出しが実行される可能性があります。`atomic` と、レシートごとのステータスを確認してください。\n- ウォレットは、送信後少なくとも 24 時間は、バッチのステータスを照会できる状態に保つべきです。\n- バッチ ID は、送信者ごと・アプリごとに一意でなければなりません。再利用は拒否されます（エラー 5720）。\n- `wallet_getCapabilities` は、フィンガープリンティングを抑えるため、既にアプリに接続されているアドレスに対してのみ応答すべきです。ウォレットは、アウトオブバンドで（たとえば [EIP-6963](/eip-6963/) のディスカバリーと併せて）capability を公開することもあります。\n"},"ko":{"lang":"ko","tldr":"wallet_sendCalls와 관련 RPC 메서드를 추가해, dApp이 지갑에 호출 묶음(선택적으로 원자적)을 보내 달라고 요청하고 페이마스터 같은 지갑 기능을 쓸 수 있게 한다.","tags":["wallet","json-rpc","batching","account-abstraction","interface"],"related":[1193,4337,7702,6963],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-5792/","markdown":"## 어떤 문제를 해결하나요?\n\ndApp은 주로 `eth_sendTransaction`과 `eth_getTransactionReceipt`로 지갑과 소통합니다. 이 메서드들은 정확히 하나의 트랜잭션만 보내며 스마트 계정에 대해서는 아무것도 모릅니다. 단순한 \"approve 후 swap\"도 팝업 두 번과 트랜잭션 두 번이 필요하고, 지갑이 페이마스터(가스 대납)를 지원하더라도 앱이 이를 사용해 달라고 요청할 수 없습니다.\n\nEIP-5792는 새로운 `wallet_` API를 정의합니다. 앱이 호출 목록을 넘기면 지갑이 실행 방식(스마트 계정은 하나의 묶음 트랜잭션, 일반 EOA는 여러 트랜잭션)을 결정하고, 앱은 지갑이 지원하는 추가 기능을 알아낼 수 있습니다.\n\n## 어떻게 동작하나요?\n\n네 가지 JSON-RPC 메서드가 있습니다.\n\n- **`wallet_sendCalls`**: `version`, `chainId`, 선택적 `from`, `atomicRequired`, `{to, data, value}` 호출 목록, 선택적 `capabilities`를 받아 묶음 `id`를 반환합니다. 호출은 지정된 체인에서, 지정된 주소로부터, 순서대로 실행되어야 합니다.\n- **`wallet_getCallsStatus(id)`**: 숫자 `status`(100 대기 중, 200 확인됨, 400 오프체인 실패, 500 완전 되돌림, 600 부분 되돌림), 묶음이 `atomic`하게 실행되었는지 여부, 그리고 여러분의 호출에서 나온 로그만 담은 영수증을 반환합니다.\n- **`wallet_showCallsStatus(id)`**: 지갑에 묶음을 사용자에게 보여 달라고 요청합니다.\n- **`wallet_getCapabilities(address, chainIds?)`**: 체인별로 지원되는 capability를 반환합니다(키는 16진수 체인 ID이며 `\"0x0\"`은 모든 체인을 의미).\n\n**원자성**은 내장 capability이며 상태는 `supported`, `ready`(사용자 승인 후 업그레이드 가능, 예: [EIP-7702](/eip-7702/)를 통한 EOA), `unsupported` 중 하나입니다. `atomicRequired: true`이면 지갑은 모든 호출을 원자적이고 연속적으로 실행하거나 거부해야 합니다.\n\n**Capability**는 확장 가능합니다. 지갑이 모르는 capability는 앱이 `optional: true`로 표시하지 않는 한 거부됩니다(오류 5700). [ERC-4337](/eip-4337/) 계정용 페이마스터 서비스가 대표적인 예입니다. 새 capability는 별도의 ERC에서 정의됩니다.\n\n## 샘플 코드\n\n한 번의 요청으로 approve와 swap을 실행하고, 묶음 처리를 쓸 수 없으면 폴백하기:\n\n```ts\nconst [from] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\nconst chainId = \"0x1\";\n\nconst caps = await window.ethereum.request({\n  method: \"wallet_getCapabilities\",\n  params: [from, [chainId]],\n});\nconst atomic = caps?.[chainId]?.atomic?.status; // \"supported\" | \"ready\" | \"unsupported\"\n\nconst { id } = await window.ethereum.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"2.0.0\",\n    chainId,\n    from,\n    atomicRequired: atomic === \"supported\" || atomic === \"ready\",\n    calls: [\n      { to: TOKEN, data: approveCalldata },\n      { to: ROUTER, data: swapCalldata },\n    ],\n  }],\n});\n\nconst status = await window.ethereum.request({\n  method: \"wallet_getCallsStatus\",\n  params: [id],\n});\nif (status.status === 200) console.log(status.receipts);\n```\n\n## 알아둘 점\n\n- **상태: Final.** 지갑이 이 메서드들을 구현하지 않은 경우 앱은 여전히 `eth_sendTransaction`으로 폴백해야 합니다.\n- `atomicRequired`가 없으면 EOA 지갑은 호출을 별도 트랜잭션으로 보낼 수 있으므로, 앞선 호출이 실패한 뒤에도 뒤의 호출이 실행될 수 있습니다. `atomic`과 영수증별 상태를 확인하세요.\n- 지갑은 제출 후 최소 24시간 동안 묶음 상태를 조회할 수 있게 유지해야 합니다.\n- 묶음 ID는 발신자별, 앱별로 고유해야 합니다. 재사용하면 거부됩니다(오류 5720).\n- `wallet_getCapabilities`는 핑거프린팅을 제한하기 위해 이미 앱에 연결된 주소에 대해서만 응답해야 합니다. 지갑은 capability를 대역 외로(예: [EIP-6963](/eip-6963/) 탐색과 함께) 노출할 수도 있습니다.\n"},"zh":{"lang":"zh","tldr":"新增 wallet_sendCalls 及配套的 RPC 方法，使 dApp 可以请求钱包发送一批调用（可选择原子执行），并使用 paymaster 等钱包功能。","tags":["wallet","json-rpc","batching","account-abstraction","interface"],"related":[1193,4337,7702,6963],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-5792/","markdown":"## 它解决什么问题？\n\ndApp 主要通过 `eth_sendTransaction` 和 `eth_getTransactionReceipt` 与钱包交互。这些方法恰好只发送一笔交易，并且对智能账户一无所知。一次简单的\"先 approve 再 swap\"需要两次弹窗和两笔交易；即使钱包支持 paymaster（gas 代付），应用也无法要求钱包使用它。\n\nEIP-5792 定义了一套新的 `wallet_` API：应用交出一个调用列表，由钱包决定如何执行（智能账户用一笔批量交易，普通 EOA 则用多笔），应用还可以发现钱包支持哪些额外功能。\n\n## 它如何运作\n\n四个 JSON-RPC 方法：\n\n- **`wallet_sendCalls`**：接收 `version`、`chainId`、可选的 `from`、`atomicRequired`、一个由 `{to, data, value}` 组成的调用列表，以及可选的 `capabilities`。返回一个批次 `id`。调用必须按顺序、在指定的链上、从指定的地址执行。\n- **`wallet_getCallsStatus(id)`**：返回数字 `status`（100 待处理，200 已确认，400 链下失败，500 完全回滚，600 部分回滚）、该批次是否以 `atomic` 方式运行，以及仅包含你的调用所产生日志的收据。\n- **`wallet_showCallsStatus(id)`**：请求钱包向用户展示该批次。\n- **`wallet_getCapabilities(address, chainIds?)`**：按链返回支持的 capability（键为十六进制链 ID；`\"0x0\"` 表示所有链）。\n\n**原子性**是一项内置 capability，状态为 `supported`、`ready`（经用户批准后可以升级，例如通过 [EIP-7702](/eip-7702/) 升级 EOA）或 `unsupported`。如果设置 `atomicRequired: true`，钱包必须原子且连续地执行所有调用，否则拒绝。\n\n**Capability** 是可扩展的。钱包不认识的 capability 会导致拒绝（错误 5700），除非应用将其标记为 `optional: true`。面向 [ERC-4337](/eip-4337/) 账户的 paymaster 服务是典型例子。新的 capability 由单独的 ERC 定义。\n\n## 示例代码\n\n在一次请求中完成 approve 和 swap，并在不支持批量时回退：\n\n```ts\nconst [from] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\nconst chainId = \"0x1\";\n\nconst caps = await window.ethereum.request({\n  method: \"wallet_getCapabilities\",\n  params: [from, [chainId]],\n});\nconst atomic = caps?.[chainId]?.atomic?.status; // \"supported\" | \"ready\" | \"unsupported\"\n\nconst { id } = await window.ethereum.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"2.0.0\",\n    chainId,\n    from,\n    atomicRequired: atomic === \"supported\" || atomic === \"ready\",\n    calls: [\n      { to: TOKEN, data: approveCalldata },\n      { to: ROUTER, data: swapCalldata },\n    ],\n  }],\n});\n\nconst status = await window.ethereum.request({\n  method: \"wallet_getCallsStatus\",\n  params: [id],\n});\nif (status.status === 200) console.log(status.receipts);\n```\n\n## 需要注意\n\n- **状态：Final。** 当钱包没有实现这些方法时，应用仍应回退到 `eth_sendTransaction`。\n- 没有 `atomicRequired` 时，EOA 钱包可能把这些调用作为独立交易发送，因此后面的调用可能在前面的调用失败之后仍然执行。请检查 `atomic` 以及每个收据的状态。\n- 钱包应在提交后至少 24 小时内保持批次状态可查询。\n- 批次 ID 必须在每个发送者、每个应用内唯一；重复使用会被拒绝（错误 5720）。\n- 为了限制指纹识别，`wallet_getCapabilities` 应当只对已连接到该应用的地址作出回应。钱包也可以通过带外方式公开 capability（例如配合 [EIP-6963](/eip-6963/) 的发现机制）。\n"}},"requiredBy":[7677,7682,7795,7811,7836,7867,7871,7896,7902]}
