{"eip":7811,"title":"Wallet Asset Discovery","description":"JSON-RPC method for wallets to share a user’s full asset list with Dapps, including assets not easily found through on-chain data alone","authors":["Luka Isailovic (@lukaisailovic)","Konrad Kopp (@kopy-kat)","Derek Rein (@arein)","Chris Smith (@chris13524)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2024-11-07","requires":[20,155,721,5792],"discussionsTo":"https://ethereum-magicians.org/t/erc-7811-wallet-asset-discovery/21639","repo":"ERCs","label":"ERC-7811","officialUrl":"https://eips.ethereum.org/EIPS/eip-7811","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7811.md","url":"https://eips.huatuo.xyz/eip-7811/","tldr":{"en":"Adds a wallet_getAssets JSON-RPC method so a wallet can tell a dapp exactly which assets a user holds across chains, including balances the wallet knows about that the dapp could not easily find onchain.","ja":"wallet_getAssets という JSON-RPC メソッドを追加し、ウォレットがユーザーの保有資産を、dapp がオンチェーンでは見つけにくい残高も含めてチェーン横断で正確に dapp に伝えられるようにする。","ko":"wallet_getAssets JSON-RPC 메서드를 추가해, 지갑이 사용자가 여러 체인에 걸쳐 보유한 자산을, dapp이 온체인에서 쉽게 찾기 어려운 잔액까지 포함해 정확히 dapp에 알려줄 수 있게 한다.","zh":"新增 wallet_getAssets JSON-RPC 方法，让钱包可以准确告诉 dapp 用户跨链持有哪些资产，包括钱包知道、而 dapp 难以在链上找到的余额。"},"tags":["wallet","json-rpc","assets","multichain","dapps"],"explainers":{"en":{"lang":"en","tldr":"Adds a wallet_getAssets JSON-RPC method so a wallet can tell a dapp exactly which assets a user holds across chains, including balances the wallet knows about that the dapp could not easily find onchain.","tags":["wallet","json-rpc","assets","multichain","dapps"],"related":[5792,155,20,721,7846],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7811/","markdown":"## What problem does it solve?\n\nDapps usually work out a user's balances by reading chain data themselves: one RPC call per token per chain, and only on the chains they think of checking. They miss assets on other chains or accounts, and may block an action (a swap or payment) the wallet could actually handle, for example by routing funds from another chain.\n\nThe wallet already knows the user's portfolio, often including assets that are hard to find onchain. ERC-7811 lets the dapp simply ask the wallet.\n\n## How it works\n\n**Request** `wallet_getAssets` with:\n\n- `account` (required): the address to report on.\n- `assetFilter` (optional): exact assets per [EIP-155](/eip-155/) chain ID, as `{ address, type }` (`address` can be `\"native\"`). If present, the wallet returns only these and **ignores the other two filters**.\n- `assetTypeFilter` (optional): e.g. `[\"erc20\", \"native\"]`.\n- `chainFilter` (optional): list of hex chain IDs.\n\nWithout `assetFilter`, the wallet should return everything it knows, ideally sorted by estimated value. Dapps are asked to filter as narrowly as possible, to keep the call cheap and fast.\n\n**Response:** an object keyed by hex chain ID, each holding a list of `{ address, balance, type, metadata }`, with `balance` as hex. Well-known types define the minimum `metadata`:\n\n- `native`: no metadata required.\n- `erc20`: `name`, `symbol`, `decimals`.\n- `erc721`: `name`, `symbol`, `tokenId`, optional `tokenURI`.\n\n**Discovery:** wallets supporting [ERC-5792](/eip-5792/) should advertise `{ \"assetDiscovery\": { \"supported\": true } }` per chain in `wallet_getCapabilities`; CAIP-25 wallets list the method in their `eip155` session scope.\n\n## Sample code\n\n```ts\n// window.ethereum: an EIP-1193 provider\nconst [account] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\n\nconst assets = await window.ethereum.request({\n  method: \"wallet_getAssets\",\n  params: [{\n    account,\n    assetTypeFilter: [\"native\", \"erc20\"],\n    chainFilter: [\"0x1\", \"0xa\"],          // Ethereum mainnet, OP Mainnet\n  }],\n});\n\nfor (const [chainId, list] of Object.entries(assets)) {\n  for (const a of list as any[]) {\n    console.log(chainId, a.type, a.metadata?.symbol ?? \"native\", BigInt(a.balance));\n  }\n}\n```\n\n## Things to know\n\n- Status is **Draft**, and the Rationale and Security Considerations sections are still TODO.\n- The data is the **wallet's** claim. Do not treat it as proof of funds for anything security-sensitive; verify onchain where that matters.\n- `type` is a free-form string. The spec's own examples mix `\"erc20\"` and `\"ERC20\"`, so compare types case-insensitively.\n- Not all wallets implement it; check `wallet_getCapabilities` first and fall back to onchain reads.\n"},"ja":{"lang":"ja","tldr":"wallet_getAssets という JSON-RPC メソッドを追加し、ウォレットがユーザーの保有資産を、dapp がオンチェーンでは見つけにくい残高も含めてチェーン横断で正確に dapp に伝えられるようにする。","tags":["wallet","json-rpc","assets","multichain","dapps"],"related":[5792,155,20,721,7846],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7811/","markdown":"## 何を解決するのか\n\ndapp は通常、チェーンのデータを自分で読んでユーザーの残高を割り出します。チェーンごと・トークンごとに RPC を 1 回ずつ呼び、しかも自分が確認しようと思いついたチェーンだけです。そのため他のチェーンやアカウントの資産を見逃し、ウォレットなら他のチェーンから資金をルーティングするなどして実行できる操作（スワップや支払い）を、dapp がブロックしてしまうことがあります。\n\nウォレットはすでにユーザーのポートフォリオを把握しており、オンチェーンでは見つけにくい資産も含まれることがよくあります。ERC-7811 は、dapp がウォレットに単に尋ねられるようにします。\n\n## 仕組み\n\n`wallet_getAssets` を次の項目で**リクエスト**します。\n\n- `account`（必須）: 報告対象のアドレス。\n- `assetFilter`（任意）: [EIP-155](/eip-155/) のチェーン ID ごとの正確な資産を `{ address, type }` で指定します（`address` は `\"native\"` も可）。指定された場合、ウォレットはこれらだけを返し、**他の 2 つのフィルターは無視します**。\n- `assetTypeFilter`（任意）: 例: `[\"erc20\", \"native\"]`。\n- `chainFilter`（任意）: 16 進のチェーン ID のリスト。\n\n`assetFilter` がない場合、ウォレットは把握しているすべてを、できれば推定価値順に返すべきです。dapp には、呼び出しを軽く速く保つため、できるだけ絞り込むことが求められます。\n\n**レスポンス:** 16 進のチェーン ID をキーとするオブジェクトで、それぞれが `{ address, balance, type, metadata }` のリストを持ちます。`balance` は 16 進です。よく知られた type は、最低限の `metadata` を定義しています。\n\n- `native`: メタデータは不要。\n- `erc20`: `name`、`symbol`、`decimals`。\n- `erc721`: `name`、`symbol`、`tokenId`、任意で `tokenURI`。\n\n**ディスカバリー:** [ERC-5792](/eip-5792/) に対応するウォレットは、`wallet_getCapabilities` でチェーンごとに `{ \"assetDiscovery\": { \"supported\": true } }` を広告すべきです。CAIP-25 のウォレットは、`eip155` セッションスコープにこのメソッドを列挙します。\n\n## サンプルコード\n\n```ts\n// window.ethereum: an EIP-1193 provider\nconst [account] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\n\nconst assets = await window.ethereum.request({\n  method: \"wallet_getAssets\",\n  params: [{\n    account,\n    assetTypeFilter: [\"native\", \"erc20\"],\n    chainFilter: [\"0x1\", \"0xa\"],          // Ethereum mainnet, OP Mainnet\n  }],\n});\n\nfor (const [chainId, list] of Object.entries(assets)) {\n  for (const a of list as any[]) {\n    console.log(chainId, a.type, a.metadata?.symbol ?? \"native\", BigInt(a.balance));\n  }\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** で、Rationale と Security Considerations のセクションはまだ TODO です。\n- このデータは**ウォレット**の主張です。セキュリティ上重要な用途では資金の証明として扱わず、重要な場面ではオンチェーンで検証してください。\n- `type` は自由形式の文字列です。仕様自身の例でも `\"erc20\"` と `\"ERC20\"` が混在しているため、type は大文字小文字を区別せずに比較してください。\n- すべてのウォレットが実装しているわけではありません。まず `wallet_getCapabilities` を確認し、オンチェーン読み取りにフォールバックしてください。\n"},"ko":{"lang":"ko","tldr":"wallet_getAssets JSON-RPC 메서드를 추가해, 지갑이 사용자가 여러 체인에 걸쳐 보유한 자산을, dapp이 온체인에서 쉽게 찾기 어려운 잔액까지 포함해 정확히 dapp에 알려줄 수 있게 한다.","tags":["wallet","json-rpc","assets","multichain","dapps"],"related":[5792,155,20,721,7846],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7811/","markdown":"## 어떤 문제를 해결하나요?\n\ndapp은 보통 체인 데이터를 직접 읽어 사용자의 잔액을 알아냅니다. 체인마다, 토큰마다 RPC 호출을 한 번씩 하고, 그것도 확인해 볼 생각이 든 체인에 대해서만 합니다. 그래서 다른 체인이나 계정의 자산을 놓치고, 지갑이라면 다른 체인의 자금을 경유하는 식으로 처리할 수 있는 작업(스왑이나 결제)을 dapp이 막아 버리기도 합니다.\n\n지갑은 이미 사용자의 포트폴리오를 알고 있으며, 온체인에서 찾기 어려운 자산이 포함되는 경우도 많습니다. ERC-7811은 dapp이 지갑에 그냥 물어볼 수 있게 합니다.\n\n## 어떻게 동작하나요?\n\n`wallet_getAssets`를 다음 항목으로 **요청**합니다.\n\n- `account`(필수): 보고할 주소.\n- `assetFilter`(선택): [EIP-155](/eip-155/) 체인 ID별로 정확한 자산을 `{ address, type }`으로 지정합니다(`address`는 `\"native\"`도 가능). 있으면 지갑은 이 자산들만 반환하고 **나머지 두 필터는 무시합니다**.\n- `assetTypeFilter`(선택): 예: `[\"erc20\", \"native\"]`.\n- `chainFilter`(선택): 16진수 체인 ID 목록.\n\n`assetFilter`가 없으면 지갑은 알고 있는 모든 것을, 가능하면 추정 가치순으로 반환해야 합니다. dapp은 호출을 가볍고 빠르게 유지하기 위해 가능한 한 좁게 필터링하도록 요구됩니다.\n\n**응답:** 16진수 체인 ID를 키로 하는 객체이며, 각각 `{ address, balance, type, metadata }` 목록을 담고 `balance`는 16진수입니다. 잘 알려진 타입은 최소한의 `metadata`를 정의합니다.\n\n- `native`: 메타데이터 불필요.\n- `erc20`: `name`, `symbol`, `decimals`.\n- `erc721`: `name`, `symbol`, `tokenId`, 선택적으로 `tokenURI`.\n\n**디스커버리:** [ERC-5792](/eip-5792/)를 지원하는 지갑은 `wallet_getCapabilities`에서 체인별로 `{ \"assetDiscovery\": { \"supported\": true } }`를 알려야 합니다. CAIP-25 지갑은 `eip155` 세션 범위에 이 메서드를 나열합니다.\n\n## 샘플 코드\n\n```ts\n// window.ethereum: an EIP-1193 provider\nconst [account] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\n\nconst assets = await window.ethereum.request({\n  method: \"wallet_getAssets\",\n  params: [{\n    account,\n    assetTypeFilter: [\"native\", \"erc20\"],\n    chainFilter: [\"0x1\", \"0xa\"],          // Ethereum mainnet, OP Mainnet\n  }],\n});\n\nfor (const [chainId, list] of Object.entries(assets)) {\n  for (const a of list as any[]) {\n    console.log(chainId, a.type, a.metadata?.symbol ?? \"native\", BigInt(a.balance));\n  }\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**이며, Rationale과 Security Considerations 섹션은 아직 TODO입니다.\n- 이 데이터는 **지갑**의 주장입니다. 보안상 민감한 용도에서는 자금 증명으로 취급하지 말고, 중요한 곳에서는 온체인에서 검증하세요.\n- `type`은 자유 형식의 문자열입니다. 사양 자체의 예시에도 `\"erc20\"`과 `\"ERC20\"`이 섞여 있으므로 타입은 대소문자를 구분하지 않고 비교하세요.\n- 모든 지갑이 구현한 것은 아니므로 먼저 `wallet_getCapabilities`를 확인하고 온체인 읽기로 폴백하세요.\n"},"zh":{"lang":"zh","tldr":"新增 wallet_getAssets JSON-RPC 方法，让钱包可以准确告诉 dapp 用户跨链持有哪些资产，包括钱包知道、而 dapp 难以在链上找到的余额。","tags":["wallet","json-rpc","assets","multichain","dapps"],"related":[5792,155,20,721,7846],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7811/","markdown":"## 它解决什么问题？\n\ndapp 通常自己读取链上数据来推算用户的余额：每条链每种代币一次 RPC 调用，而且只覆盖它们想得到要检查的链。它们会漏掉其他链或其他账户上的资产，还可能阻止某个钱包其实能够处理的操作（兑换或支付），例如从另一条链调度资金。\n\n钱包本来就知道用户的资产组合，其中往往包括很难在链上找到的资产。ERC-7811 让 dapp 直接向钱包询问即可。\n\n## 它如何运作\n\n**请求** `wallet_getAssets`，参数包括：\n\n- `account`（必填）：要报告的地址。\n- `assetFilter`（可选）：按 [EIP-155](/eip-155/) 链 ID 指定的精确资产，形式为 `{ address, type }`（`address` 可以是 `\"native\"`）。如果提供，钱包只返回这些资产，并**忽略另外两个过滤器**。\n- `assetTypeFilter`（可选）：例如 `[\"erc20\", \"native\"]`。\n- `chainFilter`（可选）：十六进制链 ID 的列表。\n\n没有 `assetFilter` 时，钱包应返回它所知道的全部资产，最好按估算价值排序。希望 dapp 尽可能收窄过滤范围，以保持调用轻量、快速。\n\n**响应：**一个以十六进制链 ID 为键的对象，每个键下是一个 `{ address, balance, type, metadata }` 的列表，其中 `balance` 为十六进制。常见类型规定了最低限度的 `metadata`：\n\n- `native`：无需元数据。\n- `erc20`：`name`、`symbol`、`decimals`。\n- `erc721`：`name`、`symbol`、`tokenId`，以及可选的 `tokenURI`。\n\n**发现：**支持 [ERC-5792](/eip-5792/) 的钱包应在 `wallet_getCapabilities` 中为每条链声明 `{ \"assetDiscovery\": { \"supported\": true } }`；使用 CAIP-25 的钱包在其 `eip155` 会话范围内列出该方法。\n\n## 示例代码\n\n```ts\n// window.ethereum: an EIP-1193 provider\nconst [account] = await window.ethereum.request({ method: \"eth_requestAccounts\" });\n\nconst assets = await window.ethereum.request({\n  method: \"wallet_getAssets\",\n  params: [{\n    account,\n    assetTypeFilter: [\"native\", \"erc20\"],\n    chainFilter: [\"0x1\", \"0xa\"],          // Ethereum mainnet, OP Mainnet\n  }],\n});\n\nfor (const [chainId, list] of Object.entries(assets)) {\n  for (const a of list as any[]) {\n    console.log(chainId, a.type, a.metadata?.symbol ?? \"native\", BigInt(a.balance));\n  }\n}\n```\n\n## 需要注意\n\n- 状态为 **Draft**，Rationale 和 Security Considerations 两节仍是 TODO。\n- 这些数据是**钱包**的声明。不要把它当作任何安全敏感场景下的资金证明；在重要的地方请在链上验证。\n- `type` 是自由格式的字符串。规范自己的示例里 `\"erc20\"` 和 `\"ERC20\"` 混用，因此比较类型时要忽略大小写。\n- 并非所有钱包都实现了它；请先检查 `wallet_getCapabilities`，并回退到链上读取。\n"}}}
