{"eip":2256,"title":"wallet_getOwnedAssets JSON-RPC Method","description":"This is a proposal for a new JSON-RPC call for retrieving from a wallet a selection of owned assets by an Ethereum address, with the user's permission.","authors":["Loredana Cirstea (@loredanacirstea)"],"status":"Stagnant","type":"Standards Track","category":"Interface","created":"2019-08-29","requires":[55,155,1474],"discussionsTo":"https://ethereum-magicians.org/t/eip-2256-add-wallet-getownedassets-json-rpc-method/3600","repo":"EIPs","label":"EIP-2256","officialUrl":"https://eips.ethereum.org/EIPS/eip-2256","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2256.md","url":"https://eips.huatuo.xyz/eip-2256/","tldr":{"en":"Proposes a wallet_getOwnedAssets RPC method so a dapp can ask the user's wallet, with permission, for the tokens the user holds instead of scanning token lists itself.","ja":"dapp がトークンリストを自前でスキャンする代わりに、許可を得たうえでユーザーのウォレットに保有トークンを尋ねられるようにする wallet_getOwnedAssets RPC メソッドを提案する。","ko":"dapp이 토큰 목록을 직접 스캔하는 대신, 허락을 받아 사용자의 지갑에 보유 토큰을 물어볼 수 있게 하는 wallet_getOwnedAssets RPC 메서드를 제안한다.","zh":"提出 wallet_getOwnedAssets RPC 方法，使 dapp 能在获得许可后向用户钱包询问用户持有的代币，而不必自己扫描代币列表。"},"tags":["json-rpc","wallet","assets","tokens","privacy"],"explainers":{"en":{"lang":"en","tldr":"Proposes a wallet_getOwnedAssets RPC method so a dapp can ask the user's wallet, with permission, for the tokens the user holds instead of scanning token lists itself.","tags":["json-rpc","wallet","assets","tokens","privacy"],"related":[747,1193,1474,155,3085],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2256/","markdown":"## What problem does it solve?\n\nA dapp that needs to know a user's tokens, for tax calculation or to offer a choice of payment token, has no standard way to ask. It must keep its own list of popular token contracts and query a balance for each one. Every dapp duplicates this work, and the result is either incomplete (missing tokens) or cluttered with unwanted airdrops.\n\nThe user's wallet already knows which assets the user cares about. EIP-2256 proposes letting the dapp ask the wallet directly, with the user approving what is shared. It complements [EIP-747](/eip-747/) (`wallet_watchAsset`), which goes the other way: a dapp suggesting a token for the wallet to track.\n\n## How it works\n\nThe dapp calls `wallet_getOwnedAssets` with:\n\n- `address`: the account whose assets are requested.\n- An optional options object:\n  - `chainId`: restrict to one chain ([EIP-155](/eip-155/) chain ID).\n  - `limit`: maximum number of assets the dapp wants back.\n  - `types`: interface identifiers such as `[\"ERC20\", \"ERC721\"]`.\n  - `justification`: human-readable reason shown to the user (recommended).\n\nThe wallet shows a prompt. The user can accept, reject, or narrow the selection. The result is an array of records containing `address`, `chainId`, `type`, and asset-specific `options` (for ERC-20: `name`, `symbol`, `icon`, `balance`, `decimals`). Only assets the wallet already tracks for that account are returned.\n\n## Sample code\n\nRequest:\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"wallet_getOwnedAssets\",\n  \"params\": [\n    \"0x3333333333333333333333333333333333333333\",\n    {\n      \"chainId\": 1,\n      \"limit\": 1,\n      \"types\": [\"ERC20\"],\n      \"justification\": \"Select the token you want to pay with.\"\n    }\n  ]\n}\n```\n\nExample response:\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": [\n    {\n      \"address\": \"0x0000000000000000000000000000000000000001\",\n      \"chainId\": 1,\n      \"type\": \"ERC20\",\n      \"options\": { \"name\": \"TokenA\", \"symbol\": \"TKA\", \"balance\": 1000000000000, \"decimals\": 18 }\n    }\n  ]\n}\n```\n\nCalling it through an [EIP-1193](/eip-1193/) provider, with a fallback:\n\n```ts\nasync function getOwnedAssets(account: string) {\n  try {\n    return await window.ethereum.request({\n      method: \"wallet_getOwnedAssets\",\n      params: [account, { types: [\"ERC20\"], justification: \"Show your balances\" }],\n    });\n  } catch {\n    return null; // method not supported or user rejected: fall back to your own token list\n  }\n}\n```\n\n## Things to know\n\n- **Status: Stagnant.** Mainstream wallets do not generally implement this method, so always handle \"method not found\" and user rejection.\n- Returned balances come from the wallet, not the chain. Re-read balances on-chain before relying on them for anything important.\n- A list of holdings is sensitive. The spec makes user consent and the `justification` text central for this reason; dapps should request only what they need (`types`, `chainId`, `limit`).\n- The spec builds on the JSON-RPC conventions of [EIP-1474](/eip-1474/). Related wallet methods include [EIP-3085](/eip-3085/) `wallet_addEthereumChain`.\n"},"ja":{"lang":"ja","tldr":"dapp がトークンリストを自前でスキャンする代わりに、許可を得たうえでユーザーのウォレットに保有トークンを尋ねられるようにする wallet_getOwnedAssets RPC メソッドを提案する。","tags":["json-rpc","wallet","assets","tokens","privacy"],"related":[747,1193,1474,155,3085],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2256/","markdown":"## 何を解決するのか\n\nユーザーのトークンを知る必要がある dapp（税額の計算や、支払いトークンの選択肢の提示など）には、それを尋ねる標準的な方法がありません。人気のあるトークンコントラクトの一覧を自前で持ち、1 つずつ残高を照会しなければなりません。すべての dapp が同じ作業を重複して行い、その結果は不完全（トークンの漏れ）になるか、不要なエアドロップで散らかったものになります。\n\nユーザーのウォレットは、ユーザーが関心を持つ資産をすでに把握しています。EIP-2256 は、ユーザーが共有内容を承認したうえで、dapp がウォレットに直接尋ねられるようにすることを提案します。これは [EIP-747](/eip-747/)（`wallet_watchAsset`）を補完するもので、EIP-747 は逆に、dapp がウォレットに追跡すべきトークンを提案する方向です。\n\n## 仕組み\n\ndapp は次の引数で `wallet_getOwnedAssets` を呼びます。\n\n- `address`: 資産を要求する対象のアカウント。\n- 任意のオプションオブジェクト:\n  - `chainId`: 1 つのチェーンに限定します（[EIP-155](/eip-155/) のチェーン ID）。\n  - `limit`: dapp が受け取りたい資産の最大数。\n  - `types`: `[\"ERC20\", \"ERC721\"]` のようなインターフェース識別子。\n  - `justification`: ユーザーに表示される、人が読める理由（推奨）。\n\nウォレットはプロンプトを表示します。ユーザーは承認、拒否、または選択範囲の絞り込みができます。結果は、`address`、`chainId`、`type`、資産固有の `options`（ERC-20 の場合は `name`、`symbol`、`icon`、`balance`、`decimals`）を含むレコードの配列です。返されるのは、そのアカウントについてウォレットがすでに追跡している資産だけです。\n\n## サンプルコード\n\nリクエスト:\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"wallet_getOwnedAssets\",\n  \"params\": [\n    \"0x3333333333333333333333333333333333333333\",\n    {\n      \"chainId\": 1,\n      \"limit\": 1,\n      \"types\": [\"ERC20\"],\n      \"justification\": \"Select the token you want to pay with.\"\n    }\n  ]\n}\n```\n\nレスポンスの例:\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": [\n    {\n      \"address\": \"0x0000000000000000000000000000000000000001\",\n      \"chainId\": 1,\n      \"type\": \"ERC20\",\n      \"options\": { \"name\": \"TokenA\", \"symbol\": \"TKA\", \"balance\": 1000000000000, \"decimals\": 18 }\n    }\n  ]\n}\n```\n\n[EIP-1193](/eip-1193/) プロバイダー経由で、フォールバック付きで呼び出す:\n\n```ts\nasync function getOwnedAssets(account: string) {\n  try {\n    return await window.ethereum.request({\n      method: \"wallet_getOwnedAssets\",\n      params: [account, { types: [\"ERC20\"], justification: \"Show your balances\" }],\n    });\n  } catch {\n    return null; // method not supported or user rejected: fall back to your own token list\n  }\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** 主要なウォレットはこのメソッドを一般には実装していないため、「メソッドが見つからない」場合とユーザーによる拒否を必ず処理してください。\n- 返される残高はチェーンではなくウォレットから得たものです。重要な用途に使う前に、オンチェーンで残高を読み直してください。\n- 保有資産の一覧はセンシティブな情報です。このため仕様ではユーザーの同意と `justification` のテキストを中心に据えています。dapp は必要なものだけ（`types`、`chainId`、`limit`）を要求するべきです。\n- この仕様は [EIP-1474](/eip-1474/) の JSON-RPC の規約に基づいています。関連するウォレットのメソッドには、[EIP-3085](/eip-3085/) の `wallet_addEthereumChain` があります。\n"},"ko":{"lang":"ko","tldr":"dapp이 토큰 목록을 직접 스캔하는 대신, 허락을 받아 사용자의 지갑에 보유 토큰을 물어볼 수 있게 하는 wallet_getOwnedAssets RPC 메서드를 제안한다.","tags":["json-rpc","wallet","assets","tokens","privacy"],"related":[747,1193,1474,155,3085],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2256/","markdown":"## 어떤 문제를 해결하나요?\n\n사용자의 토큰을 알아야 하는 dapp(세금 계산이나 결제 토큰 선택지 제공 등)에는 이를 물어볼 표준적인 방법이 없습니다. 인기 있는 토큰 컨트랙트 목록을 직접 관리하고 하나씩 잔액을 조회해야 합니다. 모든 dapp이 이 작업을 중복해서 하고, 결과는 불완전하거나(누락된 토큰) 원치 않는 에어드롭으로 어수선해집니다.\n\n사용자의 지갑은 사용자가 관심을 두는 자산을 이미 알고 있습니다. EIP-2256은 사용자가 공유할 내용을 승인하는 조건으로 dapp이 지갑에 직접 물어볼 수 있게 하자고 제안합니다. 이는 반대 방향인 [EIP-747](/eip-747/)(`wallet_watchAsset`)을 보완합니다. EIP-747은 dapp이 지갑에 추적할 토큰을 제안하는 방식입니다.\n\n## 어떻게 동작하나요?\n\ndapp은 다음 인자로 `wallet_getOwnedAssets`를 호출합니다.\n\n- `address`: 자산을 요청할 계정.\n- 선택적 옵션 객체:\n  - `chainId`: 하나의 체인으로 제한합니다([EIP-155](/eip-155/) 체인 ID).\n  - `limit`: dapp이 돌려받고 싶은 자산의 최대 개수.\n  - `types`: `[\"ERC20\", \"ERC721\"]` 같은 인터페이스 식별자.\n  - `justification`: 사용자에게 표시되는, 사람이 읽을 수 있는 사유(권장).\n\n지갑은 프롬프트를 표시합니다. 사용자는 수락하거나, 거부하거나, 선택 범위를 좁힐 수 있습니다. 결과는 `address`, `chainId`, `type`, 자산별 `options`(ERC-20의 경우 `name`, `symbol`, `icon`, `balance`, `decimals`)를 담은 레코드의 배열입니다. 해당 계정에 대해 지갑이 이미 추적하고 있는 자산만 반환됩니다.\n\n## 샘플 코드\n\n요청:\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"wallet_getOwnedAssets\",\n  \"params\": [\n    \"0x3333333333333333333333333333333333333333\",\n    {\n      \"chainId\": 1,\n      \"limit\": 1,\n      \"types\": [\"ERC20\"],\n      \"justification\": \"Select the token you want to pay with.\"\n    }\n  ]\n}\n```\n\n응답 예시:\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": [\n    {\n      \"address\": \"0x0000000000000000000000000000000000000001\",\n      \"chainId\": 1,\n      \"type\": \"ERC20\",\n      \"options\": { \"name\": \"TokenA\", \"symbol\": \"TKA\", \"balance\": 1000000000000, \"decimals\": 18 }\n    }\n  ]\n}\n```\n\n[EIP-1193](/eip-1193/) provider를 통해 폴백과 함께 호출하기:\n\n```ts\nasync function getOwnedAssets(account: string) {\n  try {\n    return await window.ethereum.request({\n      method: \"wallet_getOwnedAssets\",\n      params: [account, { types: [\"ERC20\"], justification: \"Show your balances\" }],\n    });\n  } catch {\n    return null; // method not supported or user rejected: fall back to your own token list\n  }\n}\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 주요 지갑은 대체로 이 메서드를 구현하지 않으므로, \"메서드를 찾을 수 없음\"과 사용자 거부를 항상 처리하세요.\n- 반환되는 잔액은 체인이 아니라 지갑에서 온 값입니다. 중요한 용도에 쓰기 전에 온체인에서 잔액을 다시 읽으세요.\n- 보유 자산 목록은 민감한 정보입니다. 그래서 명세는 사용자 동의와 `justification` 텍스트를 핵심으로 삼습니다. dapp은 필요한 것만(`types`, `chainId`, `limit`) 요청해야 합니다.\n- 이 명세는 [EIP-1474](/eip-1474/)의 JSON-RPC 규약을 기반으로 합니다. 관련 지갑 메서드로는 [EIP-3085](/eip-3085/)의 `wallet_addEthereumChain`이 있습니다.\n"},"zh":{"lang":"zh","tldr":"提出 wallet_getOwnedAssets RPC 方法，使 dapp 能在获得许可后向用户钱包询问用户持有的代币，而不必自己扫描代币列表。","tags":["json-rpc","wallet","assets","tokens","privacy"],"related":[747,1193,1474,155,3085],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2256/","markdown":"## 它解决什么问题？\n\n需要了解用户持有哪些代币的 dapp（例如用于税务计算，或让用户选择支付代币）没有标准方式去询问。它必须自己维护一份热门代币合约的列表，并逐个查询余额。每个 dapp 都在重复这项工作，结果要么不完整（遗漏代币），要么被不想要的空投搞得杂乱。\n\n用户的钱包本来就知道用户关心哪些资产。EIP-2256 提议让 dapp 直接向钱包询问，并由用户批准共享的内容。它是对 [EIP-747](/eip-747/)（`wallet_watchAsset`）的补充，后者的方向相反：由 dapp 向钱包建议一个需要追踪的代币。\n\n## 它如何运作\n\ndapp 调用 `wallet_getOwnedAssets`，参数为：\n\n- `address`：被请求资产的账户。\n- 一个可选的选项对象：\n  - `chainId`：限制在某一条链上（[EIP-155](/eip-155/) 链 ID）。\n  - `limit`：dapp 希望返回的资产数量上限。\n  - `types`：接口标识符，例如 `[\"ERC20\", \"ERC721\"]`。\n  - `justification`：向用户展示的、人类可读的理由（建议提供）。\n\n钱包会弹出提示。用户可以接受、拒绝，或缩小选择范围。返回结果是一个记录数组，包含 `address`、`chainId`、`type` 以及资产特定的 `options`（对于 ERC-20：`name`、`symbol`、`icon`、`balance`、`decimals`）。只会返回钱包已经为该账户追踪的资产。\n\n## 示例代码\n\n请求：\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"wallet_getOwnedAssets\",\n  \"params\": [\n    \"0x3333333333333333333333333333333333333333\",\n    {\n      \"chainId\": 1,\n      \"limit\": 1,\n      \"types\": [\"ERC20\"],\n      \"justification\": \"Select the token you want to pay with.\"\n    }\n  ]\n}\n```\n\n响应示例：\n\n```json\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": [\n    {\n      \"address\": \"0x0000000000000000000000000000000000000001\",\n      \"chainId\": 1,\n      \"type\": \"ERC20\",\n      \"options\": { \"name\": \"TokenA\", \"symbol\": \"TKA\", \"balance\": 1000000000000, \"decimals\": 18 }\n    }\n  ]\n}\n```\n\n通过 [EIP-1193](/eip-1193/) provider 调用，并带有回退：\n\n```ts\nasync function getOwnedAssets(account: string) {\n  try {\n    return await window.ethereum.request({\n      method: \"wallet_getOwnedAssets\",\n      params: [account, { types: [\"ERC20\"], justification: \"Show your balances\" }],\n    });\n  } catch {\n    return null; // method not supported or user rejected: fall back to your own token list\n  }\n}\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 主流钱包通常没有实现该方法，因此务必处理\"方法未找到\"和用户拒绝的情况。\n- 返回的余额来自钱包，而不是链上。在将其用于任何重要用途之前，请在链上重新读取余额。\n- 持仓列表属于敏感信息。因此规范将用户同意和 `justification` 文本放在核心位置；dapp 应只请求自己需要的内容（`types`、`chainId`、`limit`）。\n- 该规范建立在 [EIP-1474](/eip-1474/) 的 JSON-RPC 约定之上。相关的钱包方法包括 [EIP-3085](/eip-3085/) 的 `wallet_addEthereumChain`。\n"}}}
