From 0013da910d9c4aa0497369b1f880d756c1e07201 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Tue, 11 Feb 2025 16:36:35 -0800 Subject: [PATCH 01/13] Add EIP-5792 methods --- openrpc.yaml | 261 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) diff --git a/openrpc.yaml b/openrpc.yaml index 7b1652b..7c1cbc4 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -521,6 +521,267 @@ methods: schema: type: string title: QR code string + - name: wallet_sendCalls + tags: + - $ref: '#/components/tags/MetaMask' + summary: Sends a batch of calls. + description: >- + Requests that the wallet submits a batch of multiple calls. All calls should + be sent from the same sender and on the same chain. Specified by + [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). + params: + - name: Calls + required: true + schema: + type: object + description: A batch of calls to send. + required: + - from + - calls + properties: + from: + description: The sender's address. + $ref: '#/components/schemas/address' + calls: + description: An array of call objects. + schema: + type: array + items: + title: Call + type: object + description: An object containing information about the call. + properties: + to: + description: The address of the call's recipient. + $ref: '#/components/schemas/address' + data: + description: The data to send with the call. + $ref: '#/components/schemas/bytes' + value: + description: The value to send with the call. + $ref: '#/components/schemas/uint' + chainId: + description: The chain ID of the call. + $ref: '#/components/schemas/uint' + capabilities: + type: object + description: >- + An object specifying the wallet capabilities to use when executing + the calls. + properties: + capability_name: + type: object + description: >- + An object containing information about the capability. + `capability_name` is the name of the capability. + additionalProperties: true + additionalProperties: true + result: + name: Batch ID + description: The ID of the batch of calls. + type: string + examples: + - name: wallet_sendCalls example + params: + - name: Calls + value: + from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + calls: + - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + value: '0x9184e72a' + data: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' + chainId: '0x01' + - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + value: '0x182183' + data: '0xfbadbaf01' + chainId: '0x01' + capabilities: + paymasterService: + url: 'https://paymaster.example.com' + result: + name: Batch ID + value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' + - name: wallet_getCallsStatus + tags: + - $ref: '#/components/tags/MetaMask' + summary: Gets the status of a call batch. + description: >- + Gets the status of a batch of calls that was previously sent using + `wallet_sendCalls`. Specified by + [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). + params: + - name: Batch ID + required: true + description: The ID of a batch of calls. + type: string + result: + name: Batch result + description: >- + An object containing the status of the batch of calls. + type: object + properties: + status: + type: string + description: The status of the batch of calls. + enum: + - PENDING + - CONFIRMED + receipts: + type: array + description: >- + An array of transaction receipts, each corresponding to a transaction + in the batch. If the wallet executed multiple calls atomically (that is, + in a single transaction), a single receipt is returned. + items: + title: Receipt + type: object + description: A transaction receipt object. + properties: + logs: + type: array + description: An array of log objects. + items: + title: Log + type: object + description: An object containing information about the log. + properties: + address: + description: The address of the contract that emitted the log. + $ref: '#/components/schemas/address' + data: + description: The data of the log. + $ref: '#/components/schemas/bytes' + topics: + type: array + description: An array of log topics. + items: + title: Topic + description: A log topic. + type: string + pattern: '^0x[0-9a-f]*$' + status: + type: string + description: >- + The status of the transaction. `0x1` indicates success, and `0x0` + indicates failure. + pattern: '^0x[0-1]$' + chainId: + description: The chain ID of the transaction. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + blockHash: + description: The hash of the block containing the transaction. + type: string + pattern: '^0x[0-9a-f]{64}$' + blockNumber: + description: The number of the block containing the transaction. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + gasUsed: + description: The amount of gas used by the transaction. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + transactionHash: + description: The hash of the transaction. + type: string + pattern: '^0x[0-9a-f]{64}$' + examples: + - name: wallet_getCallsStatus example + params: + - name: Batch ID + value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' + result: + name: Batch result + value: + status: CONFIRMED + receipts: + - logs: + - address: '0xa922b54716264130634d6ff183747a8ead91a40b' + topics: + - '0x5a2a90727cc9d000dd060b1132a5c977c9702bb3a52afe360c9c22f0e9451a68' + data: '0xabcd' + status: '0x1' + chainId: '0x01' + blockHash: '0xf19bbafd9fd0124ec110b848e8de4ab4f62bf60c189524e54213285e7f540d4a' + blockNumber: '0xabcd' + gasUsed: '0xdef' + transactionHash: '0x9b7bb827c2e5e3c1a0a44dc53e573aa0b3af3bd1f9f5ed03071b100bb039eaff' + - name: wallet_showCallsStatus + tags: + - $ref: '#/components/tags/MetaMask' + summary: Requests that the wallet shows the status of a call batch. + description: >- + Requests that the wallet shows the status of a batch of calls that was + previously sent using `wallet_sendCalls`. Specified by + [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). + params: + - name: Batch ID + required: true + description: The ID of a batch of calls. + type: string + result: + description: This method doesn't return anything. + examples: + - name: wallet_showCallsStatus example + params: + - name: Batch ID + value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' + - name: wallet_getCapabilities + tags: + - $ref: '#/components/tags/MetaMask' + summary: Gets the capabilities of the wallet. + description: >- + Gets the capabilities supported by the wallet for a specific address, + such as paymaster communication or atomic batch calls. Specified + by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). + params: + - name: Address + required: true + description: A wallet address. + type: string + pattern: '^0x[0-9a-fA-F]{40}$' + result: + name: Capabilities + description: >- + An object containing the capabilities supported by the wallet. + type: object + properties: + chain_id: + type: object + description: >- + An object containing the capabilities supported by the wallet for a + specific chain ID. `chain_id` is the + [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID in + hexadecimal format. + properties: + capability_name: + type: object + description: >- + An object containing information about the capability. + `capability_name` is the name of the capability. + properties: + supported: + type: boolean + description: >- + `true` if the capability is supported. + additionalProperties: true + additionalProperties: true + examples: + - name: wallet_getCapabilities example + params: + - name: Wallet address + value: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + result: + name: Capabilities + value: + '0x2105': + paymasterService: + supported: true + sessionKeys: + supported: true + '0x14A34': + atomicBatch: + supported: true - name: eth_requestAccounts tags: - $ref: '#/components/tags/MetaMask' From 48202389fdbec7c5b491b31fb4bf06fb16aaa9f3 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Tue, 11 Feb 2025 17:16:15 -0800 Subject: [PATCH 02/13] fixes --- openrpc.yaml | 222 ++++++++++++++++++++++++++------------------------- 1 file changed, 114 insertions(+), 108 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 7c1cbc4..f001f45 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -568,18 +568,12 @@ methods: description: >- An object specifying the wallet capabilities to use when executing the calls. - properties: - capability_name: - type: object - description: >- - An object containing information about the capability. - `capability_name` is the name of the capability. - additionalProperties: true additionalProperties: true result: name: Batch ID description: The ID of the batch of calls. - type: string + schema: + type: string examples: - name: wallet_sendCalls example params: @@ -613,78 +607,82 @@ methods: - name: Batch ID required: true description: The ID of a batch of calls. - type: string + schema: + type: string result: name: Batch result - description: >- - An object containing the status of the batch of calls. - type: object - properties: - status: - type: string - description: The status of the batch of calls. - enum: - - PENDING - - CONFIRMED - receipts: - type: array - description: >- - An array of transaction receipts, each corresponding to a transaction - in the batch. If the wallet executed multiple calls atomically (that is, - in a single transaction), a single receipt is returned. - items: - title: Receipt - type: object - description: A transaction receipt object. - properties: - logs: - type: array - description: An array of log objects. - items: - title: Log - type: object - description: An object containing information about the log. - properties: - address: - description: The address of the contract that emitted the log. - $ref: '#/components/schemas/address' - data: - description: The data of the log. - $ref: '#/components/schemas/bytes' - topics: - type: array - description: An array of log topics. - items: - title: Topic - description: A log topic. + schema: + type: object + description: >- + An object containing the status of the batch of calls. + properties: + status: + type: string + description: The status of the batch of calls. + enum: + - PENDING + - CONFIRMED + receipts: + type: array + description: >- + An array of transaction receipts, each corresponding to a transaction + in the batch. If the wallet executed multiple calls atomically (that is, + in a single transaction), a single receipt is returned. + items: + title: Receipt + type: object + description: A transaction receipt object. + properties: + logs: + type: array + description: An array of log objects. + items: + title: Log + type: object + description: An object containing information about the log. + properties: + address: + description: The address of the contract that emitted the log. + type: string + pattern: '^0x[0-9a-fA-F]{40}$' + data: + description: The data of the log. type: string pattern: '^0x[0-9a-f]*$' - status: - type: string - description: >- - The status of the transaction. `0x1` indicates success, and `0x0` - indicates failure. - pattern: '^0x[0-1]$' - chainId: - description: The chain ID of the transaction. - type: string - pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' - blockHash: - description: The hash of the block containing the transaction. - type: string - pattern: '^0x[0-9a-f]{64}$' - blockNumber: - description: The number of the block containing the transaction. - type: string - pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' - gasUsed: - description: The amount of gas used by the transaction. - type: string - pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' - transactionHash: - description: The hash of the transaction. - type: string - pattern: '^0x[0-9a-f]{64}$' + topics: + type: array + description: An array of log topics. + items: + title: Topic + description: A log topic. + type: string + pattern: '^0x[0-9a-f]*$' + status: + type: string + description: >- + The status of the transaction. `0x1` indicates success, and `0x0` + indicates failure. + pattern: '^0x[0-1]$' + chainId: + description: The chain ID of the transaction. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + blockHash: + description: The hash of the block containing the transaction. + type: string + pattern: '^0x[0-9a-f]{64}$' + blockNumber: + description: The number of the block containing the transaction. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + gasUsed: + description: The amount of gas used by the transaction. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + transactionHash: + description: The hash of the transaction. + type: string + pattern: '^0x[0-9a-f]{64}$' examples: - name: wallet_getCallsStatus example params: @@ -718,54 +716,62 @@ methods: - name: Batch ID required: true description: The ID of a batch of calls. - type: string + schema: + type: string result: + name: No result description: This method doesn't return anything. + schema: {} examples: - name: wallet_showCallsStatus example params: - - name: Batch ID - value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' + - name: Batch ID + value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' + result: + name: No result + value: {} - name: wallet_getCapabilities tags: - $ref: '#/components/tags/MetaMask' summary: Gets the capabilities of the wallet. description: >- - Gets the capabilities supported by the wallet for a specific address, - such as paymaster communication or atomic batch calls. Specified - by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). + Gets the capabilities supported by the wallet for a specific address, such + as paymaster communication or atomic batch calls. Specified by + [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). params: - name: Address required: true description: A wallet address. - type: string - pattern: '^0x[0-9a-fA-F]{40}$' + schema: + type: string + pattern: '^0x[0-9a-fA-F]{40}$' result: name: Capabilities - description: >- - An object containing the capabilities supported by the wallet. - type: object - properties: - chain_id: - type: object - description: >- - An object containing the capabilities supported by the wallet for a - specific chain ID. `chain_id` is the - [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID in - hexadecimal format. - properties: - capability_name: - type: object - description: >- - An object containing information about the capability. - `capability_name` is the name of the capability. - properties: - supported: - type: boolean - description: >- - `true` if the capability is supported. - additionalProperties: true - additionalProperties: true + schema: + type: object + description: >- + An object containing the capabilities supported by the wallet. + properties: + chain_id: + type: object + description: >- + An object containing the capabilities supported by the wallet for a + specific chain ID. `chain_id` is the + [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID in + hexadecimal format. + properties: + capability_name: + type: object + description: >- + An object containing information about the capability. + `capability_name` is the name of the capability. + properties: + supported: + type: boolean + description: >- + `true` if the capability is supported. + additionalProperties: true + additionalProperties: true examples: - name: wallet_getCapabilities example params: From 5844aaeb10e9a804030cabe06619cd03ea67b683 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Wed, 12 Feb 2025 15:07:18 -0800 Subject: [PATCH 03/13] minor edits --- openrpc.yaml | 81 +++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index f001f45..5534fb3 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -526,19 +526,21 @@ methods: - $ref: '#/components/tags/MetaMask' summary: Sends a batch of calls. description: >- - Requests that the wallet submits a batch of multiple calls. All calls should - be sent from the same sender and on the same chain. Specified by + Requests that the wallet submits a batch of calls. Specified by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). params: - name: Calls required: true schema: + description: An object containing information about a batch of calls. type: object - description: A batch of calls to send. required: - from - calls properties: + version: + description: The version of the request format. + type: string from: description: The sender's address. $ref: '#/components/schemas/address' @@ -548,8 +550,8 @@ methods: type: array items: title: Call - type: object description: An object containing information about the call. + type: object properties: to: description: The address of the call's recipient. @@ -561,13 +563,15 @@ methods: description: The value to send with the call. $ref: '#/components/schemas/uint' chainId: - description: The chain ID of the call. + description: >- + The chain ID of the call. If specified, this must match the + currently selected network in the wallet. $ref: '#/components/schemas/uint' capabilities: - type: object description: >- - An object specifying the wallet capabilities to use when executing - the calls. + Dapps can use this object to communicate with the wallet about + supported capabilities. + type: object additionalProperties: true result: name: Batch ID @@ -579,19 +583,15 @@ methods: params: - name: Calls value: + version: '1.0' from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' calls: - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' value: '0x9184e72a' data: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' - chainId: '0x01' - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' value: '0x182183' data: '0xfbadbaf01' - chainId: '0x01' - capabilities: - paymasterService: - url: 'https://paymaster.example.com' result: name: Batch ID value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' @@ -606,43 +606,44 @@ methods: params: - name: Batch ID required: true - description: The ID of a batch of calls. + description: >- + The ID of a batch of calls (the value returned by `wallet_sendCalls`). schema: type: string result: - name: Batch result + name: Batch status schema: - type: object description: >- - An object containing the status of the batch of calls. + An object containing status information of the batch of calls. + type: object properties: status: - type: string description: The status of the batch of calls. + type: string enum: - PENDING - CONFIRMED receipts: - type: array description: >- - An array of transaction receipts, each corresponding to a transaction - in the batch. If the wallet executed multiple calls atomically (that is, - in a single transaction), a single receipt is returned. + An array of transaction receipts. If the wallet executed the calls + atomically (that is, in a single transaction), a single receipt is + returned. + type: array items: title: Receipt - type: object description: A transaction receipt object. + type: object properties: logs: - type: array description: An array of log objects. + type: array items: title: Log - type: object description: An object containing information about the log. + type: object properties: address: - description: The address of the contract that emitted the log. + description: The address that generated the log. type: string pattern: '^0x[0-9a-fA-F]{40}$' data: @@ -650,18 +651,18 @@ methods: type: string pattern: '^0x[0-9a-f]*$' topics: - type: array description: An array of log topics. + type: array items: title: Topic description: A log topic. type: string pattern: '^0x[0-9a-f]*$' status: - type: string description: >- The status of the transaction. `0x1` indicates success, and `0x0` indicates failure. + type: string pattern: '^0x[0-1]$' chainId: description: The chain ID of the transaction. @@ -683,6 +684,7 @@ methods: description: The hash of the transaction. type: string pattern: '^0x[0-9a-f]{64}$' + additionalProperties: true examples: - name: wallet_getCallsStatus example params: @@ -714,8 +716,8 @@ methods: [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). params: - name: Batch ID - required: true description: The ID of a batch of calls. + required: true schema: type: string result: @@ -735,41 +737,41 @@ methods: - $ref: '#/components/tags/MetaMask' summary: Gets the capabilities of the wallet. description: >- - Gets the capabilities supported by the wallet for a specific address, such - as paymaster communication or atomic batch calls. Specified by + Gets the capabilities supported by the wallet, such as atomic batch + transactions. Specified by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). params: - name: Address - required: true description: A wallet address. + required: true schema: type: string pattern: '^0x[0-9a-fA-F]{40}$' result: name: Capabilities schema: - type: object description: >- An object containing the capabilities supported by the wallet. + type: object properties: chain_id: - type: object description: >- An object containing the capabilities supported by the wallet for a specific chain ID. `chain_id` is the [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID in hexadecimal format. + type: object properties: capability_name: - type: object description: >- An object containing information about the capability. `capability_name` is the name of the capability. + type: object properties: supported: - type: boolean description: >- `true` if the capability is supported. + type: boolean additionalProperties: true additionalProperties: true examples: @@ -780,12 +782,7 @@ methods: result: name: Capabilities value: - '0x2105': - paymasterService: - supported: true - sessionKeys: - supported: true - '0x14A34': + '0x01': atomicBatch: supported: true - name: eth_requestAccounts From e686dd5bf9b65ca1dadc67a5c1e06e2a453fcf7b Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Wed, 12 Feb 2025 17:06:10 -0800 Subject: [PATCH 04/13] minor edits --- openrpc.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openrpc.yaml b/openrpc.yaml index 5534fb3..d98e4b4 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -535,6 +535,7 @@ methods: description: An object containing information about a batch of calls. type: object required: + - version - from - calls properties: @@ -691,7 +692,7 @@ methods: - name: Batch ID value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' result: - name: Batch result + name: Batch status value: status: CONFIRMED receipts: From c774fc73ca8c6f38e079dc2d9dedf6e4c9297738 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Tue, 18 Feb 2025 15:33:04 -0800 Subject: [PATCH 05/13] update wallet_getCapabilities --- openrpc.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index d98e4b4..51d975e 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -738,9 +738,9 @@ methods: - $ref: '#/components/tags/MetaMask' summary: Gets the capabilities of the wallet. description: >- - Gets the capabilities supported by the wallet, such as atomic batch - transactions. Specified by - [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). + Returns the `atomicBatch` capability if the wallet supports sending + multiple calls in one transaction using `wallet_sendCalls`. Specified + by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). params: - name: Address description: A wallet address. @@ -752,21 +752,21 @@ methods: name: Capabilities schema: description: >- - An object containing the capabilities supported by the wallet. + An object containing the `atomicBatch` capability if the wallet + supports it. type: object properties: chain_id: description: >- - An object containing the capabilities supported by the wallet for a - specific chain ID. `chain_id` is the + An object containing the `atomicBatch` capability supported for + a specific chain ID. `chain_id` is the [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID in hexadecimal format. type: object properties: - capability_name: + atomicBatch: description: >- - An object containing information about the capability. - `capability_name` is the name of the capability. + The atomic batch capability object. type: object properties: supported: From ae34ebe89e43c0b412e5faa262955c06a672b597 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Tue, 25 Feb 2025 11:29:33 -0800 Subject: [PATCH 06/13] Remove wallet_showCallsStatus --- openrpc.yaml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 51d975e..0ef27cc 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -707,32 +707,6 @@ methods: blockNumber: '0xabcd' gasUsed: '0xdef' transactionHash: '0x9b7bb827c2e5e3c1a0a44dc53e573aa0b3af3bd1f9f5ed03071b100bb039eaff' - - name: wallet_showCallsStatus - tags: - - $ref: '#/components/tags/MetaMask' - summary: Requests that the wallet shows the status of a call batch. - description: >- - Requests that the wallet shows the status of a batch of calls that was - previously sent using `wallet_sendCalls`. Specified by - [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). - params: - - name: Batch ID - description: The ID of a batch of calls. - required: true - schema: - type: string - result: - name: No result - description: This method doesn't return anything. - schema: {} - examples: - - name: wallet_showCallsStatus example - params: - - name: Batch ID - value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' - result: - name: No result - value: {} - name: wallet_getCapabilities tags: - $ref: '#/components/tags/MetaMask' From f792b20f2f41c0d6788b0ec4684ca73b409710d7 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Wed, 12 Mar 2025 19:14:50 -0700 Subject: [PATCH 07/13] 5792 updates --- openrpc.yaml | 122 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 93 insertions(+), 29 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 4a10a56..695a220 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -537,14 +537,23 @@ methods: required: - version - from + - chainId - calls properties: version: description: The version of the request format. type: string + id: + description: The ID of the batch of calls. + $ref: '#/components/schemas/uint' from: description: The sender's address. $ref: '#/components/schemas/address' + chainId: + description: >- + The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID + of the calls. + $ref: '#/components/schemas/uint' calls: description: An array of call objects. schema: @@ -563,22 +572,52 @@ methods: value: description: The value to send with the call. $ref: '#/components/schemas/uint' - chainId: + capabilities: description: >- - The chain ID of the call. If specified, this must match the - currently selected network in the wallet. - $ref: '#/components/schemas/uint' + Dapps can use this object to communicate with the wallet about + supported capabilities. + type: object + patternProperties: + '^[a-zA-Z0-9_]*$': + description: >- + An object containing information about a specific capability. + type: object + properties: + optional: + description: >- + `true` if the capability is optional. + type: boolean + additionalProperties: true capabilities: description: >- Dapps can use this object to communicate with the wallet about supported capabilities. type: object - additionalProperties: true + patternProperties: + '^[a-zA-Z0-9_]*$': + description: >- + An object containing information about a specific capability. + type: object + properties: + optional: + description: >- + `true` if the capability is optional. + type: boolean + additionalProperties: true result: - name: Batch ID - description: The ID of the batch of calls. + name: Batch result schema: - type: string + description: An object containing information about the sent batch. + type: object + properties: + id: + description: The ID of the batch of calls. + $ref: '#/components/schemas/uint' + capabilities: + description: >- + Wallets can use this object to attach capability-specific metadata. + type: object + additionalProperties: true examples: - name: wallet_sendCalls example params: @@ -586,6 +625,7 @@ methods: value: version: '1.0' from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + chainId: '0x01' calls: - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' value: '0x9184e72a' @@ -594,8 +634,9 @@ methods: value: '0x182183' data: '0xfbadbaf01' result: - name: Batch ID - value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' + name: Batch result + value: + id: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' - name: wallet_getCallsStatus tags: - $ref: '#/components/tags/MetaMask' @@ -608,7 +649,7 @@ methods: - name: Batch ID required: true description: >- - The ID of a batch of calls (the value returned by `wallet_sendCalls`). + The ID of a batch of calls (the `id` value returned by `wallet_sendCalls`). schema: type: string result: @@ -618,12 +659,27 @@ methods: An object containing status information of the batch of calls. type: object properties: - status: - description: The status of the batch of calls. + version: + description: The version of the response format. type: string - enum: - - PENDING - - CONFIRMED + id: + description: The ID of the batch of calls. + $ref: '#/components/schemas/uint' + chainId: + description: The chain ID of the calls. + $ref: '#/components/schemas/uint' + status: + description: >- + The status code of the batch of calls. Possible values are: +

+
    +
  • `100` - Pending
  • +
  • `200` - Confirmed
  • +
  • `400` - Failed offchain
  • +
  • `500` - Reverted
  • +
  • `600` - Partially reverted
  • +
+ type: number receipts: description: >- An array of transaction receipts. If the wallet executed the calls @@ -665,10 +721,6 @@ methods: indicates failure. type: string pattern: '^0x[0-1]$' - chainId: - description: The chain ID of the transaction. - type: string - pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' blockHash: description: The hash of the block containing the transaction. type: string @@ -686,6 +738,10 @@ methods: type: string pattern: '^0x[0-9a-f]{64}$' additionalProperties: true + capabilities: + description: Capabilities associated with the batch of calls. + type: object + additionalProperties: true examples: - name: wallet_getCallsStatus example params: @@ -694,7 +750,10 @@ methods: result: name: Batch status value: - status: CONFIRMED + version: '1.0' + chainId: '0x01' + id: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' + status: 200 receipts: - logs: - address: '0xa922b54716264130634d6ff183747a8ead91a40b' @@ -702,7 +761,6 @@ methods: - '0x5a2a90727cc9d000dd060b1132a5c977c9702bb3a52afe360c9c22f0e9451a68' data: '0xabcd' status: '0x1' - chainId: '0x01' blockHash: '0xf19bbafd9fd0124ec110b848e8de4ab4f62bf60c189524e54213285e7f540d4a' blockNumber: '0xabcd' gasUsed: '0xdef' @@ -722,6 +780,16 @@ methods: schema: type: string pattern: '^0x[0-9a-fA-F]{40}$' + - name: Chain IDs + description: An array of chain IDs to get capabilities for. + schema: + type: array + items: + title: Chain ID + description: >- + An [EIP-155](https://eips.ethereum.org/EIPS/eip-155) + chain ID in hexadecimal format. + $ref: '#/components/schemas/uint' result: name: Capabilities schema: @@ -729,13 +797,11 @@ methods: An object containing the `atomicBatch` capability if the wallet supports it. type: object - properties: - chain_id: + patternProperties: + '^0x[0-9a-fA-F]+$': description: >- An object containing the `atomicBatch` capability supported for - a specific chain ID. `chain_id` is the - [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID in - hexadecimal format. + a specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID. type: object properties: atomicBatch: @@ -747,8 +813,6 @@ methods: description: >- `true` if the capability is supported. type: boolean - additionalProperties: true - additionalProperties: true examples: - name: wallet_getCapabilities example params: From 2680f86618e6ddbcee788f06d57a08513d8fd2c6 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Fri, 4 Apr 2025 11:46:14 -0700 Subject: [PATCH 08/13] atomicity updates --- openrpc.yaml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 695a220..1cbdbe5 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -538,6 +538,7 @@ methods: - version - from - chainId + - atomicRequired - calls properties: version: @@ -552,8 +553,15 @@ methods: chainId: description: >- The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID - of the calls. + of the calls. This must match the currently selected network in + the wallet. $ref: '#/components/schemas/uint' + atomicRequired: + description: >- + `true` if the wallet must execute all calls atomically. If `false`, the + wallet may execute the calls sequentially without atomicity. If `false` + and the wallet is capable of executing the calls atomically, it may do so. + type: boolean calls: description: An array of call objects. schema: @@ -626,6 +634,7 @@ methods: version: '1.0' from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' chainId: '0x01' + atomicRequired: true calls: - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' value: '0x9184e72a' @@ -680,11 +689,16 @@ methods:
  • `600` - Partially reverted
  • type: number + atomic: + description: >- + `true` if the wallet executed the calls atomically. `false` if the + wallet executed the calls non-atomically. + type: boolean receipts: description: >- An array of transaction receipts. If the wallet executed the calls - atomically (that is, in a single transaction), a single receipt is - returned. + atomically, a single receipt or an array of receipts may be returned, + corresponding to how the batch of calls were included onchain. type: array items: title: Receipt @@ -754,6 +768,7 @@ methods: chainId: '0x01' id: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' status: 200 + atomic: true receipts: - logs: - address: '0xa922b54716264130634d6ff183747a8ead91a40b' @@ -770,9 +785,9 @@ methods: - $ref: '#/components/tags/MetaMask' summary: Gets the capabilities of the wallet. description: >- - Returns the `atomicBatch` capability if the wallet supports sending - multiple calls in one transaction using `wallet_sendCalls`. Specified - by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). + Returns the `atomic` capability if the wallet supports sending multiple + calls atomically using `wallet_sendCalls`. Specified by + [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). params: - name: Address description: A wallet address. @@ -794,19 +809,19 @@ methods: name: Capabilities schema: description: >- - An object containing the `atomicBatch` capability if the wallet + An object containing the `atomic` capability if the wallet supports it. type: object patternProperties: '^0x[0-9a-fA-F]+$': description: >- - An object containing the `atomicBatch` capability supported for - a specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID. + An object containing the `atomic` capability supported for a + specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID. type: object properties: - atomicBatch: + atomic: description: >- - The atomic batch capability object. + The atomic capability object. type: object properties: supported: @@ -822,7 +837,7 @@ methods: name: Capabilities value: '0x01': - atomicBatch: + atomic: supported: true - name: eth_requestAccounts tags: From d34210797bebf726e9651ddc7fcc808fd643c5b1 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Mon, 14 Apr 2025 11:30:03 -0700 Subject: [PATCH 09/13] error codes and other updates --- openrpc.yaml | 81 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 66 insertions(+), 15 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 1cbdbe5..880ad9d 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -626,14 +626,34 @@ methods: Wallets can use this object to attach capability-specific metadata. type: object additionalProperties: true + errors: + - $ref: '#/components/errors/InvalidParams' + - $ref: '#/components/errors/UserRejected' + - $ref: '#/components/errors/Unauthorized' + - code: 5700 + message: >- + The wallet does not support a capability that was not marked as optional. + - code: 5710 + message: The wallet does not support the specified chain ID. + - code: 5720 + message: There is already a batch submitted with the specified batch ID. + - code: 5740 + message: The batch is too large for the wallet to process. + - code: 5750 + message: >- + The wallet can support atomicity after an upgrade, but the user + rejected the upgrade. + - code: 5760 + message: >- + The wallet does not support atomicity, but the request requires it. examples: - name: wallet_sendCalls example params: - name: Calls value: - version: '1.0' + version: '2.0.0' from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' - chainId: '0x01' + chainId: '0x2105' atomicRequired: true calls: - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' @@ -756,6 +776,10 @@ methods: description: Capabilities associated with the batch of calls. type: object additionalProperties: true + errors: + - $ref: '#/components/errors/InvalidParams' + - code: 5730 + message: The specified batch ID is unknown or has not been submitted. examples: - name: wallet_getCallsStatus example params: @@ -764,8 +788,8 @@ methods: result: name: Batch status value: - version: '1.0' - chainId: '0x01' + version: '2.0.0' + chainId: '0x2105' id: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' status: 200 atomic: true @@ -785,8 +809,10 @@ methods: - $ref: '#/components/tags/MetaMask' summary: Gets the capabilities of the wallet. description: >- - Returns the `atomic` capability if the wallet supports sending multiple - calls atomically using `wallet_sendCalls`. Specified by + Returns information about the wallet's support for the `atomic` + capability. The `atomic` capability specifies how the wallet will + execute batches of transactions sent using `wallet_sendCalls`. + `wallet_getCapabilities` is specified by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792). params: - name: Address @@ -809,14 +835,13 @@ methods: name: Capabilities schema: description: >- - An object containing the `atomic` capability if the wallet - supports it. + An object specifying whether the wallet supports the `atomic` capability. type: object patternProperties: '^0x[0-9a-fA-F]+$': description: >- - An object containing the `atomic` capability supported for a - specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID. + An object specifying whether the wallet supports the `atomic` capability + for a specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID. type: object properties: atomic: @@ -824,21 +849,41 @@ methods: The atomic capability object. type: object properties: - supported: + status: description: >- - `true` if the capability is supported. - type: boolean + The status of the wallet's support for the `atomic` capability on + this chain. `supported` means the wallet will execute calls sent + using `wallet_sendCalls` atomically. `ready` means the wallet + can upgrade to `supported` pending user approval (for example, via + [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702)). `unsupported` + means the wallet will not execute calls atomically or suggest an + upgrade to the user. + type: string + enum: + - supported + - ready + - unsupported + errors: + - $ref: '#/components/errors/InvalidParams' + - $ref: '#/components/errors/Unauthorized' examples: - name: wallet_getCapabilities example params: - - name: Wallet address + - name: Address value: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + - name: Chain IDs + value: + - '0x2105' + - '0x14A34' result: name: Capabilities value: - '0x01': + '0x2105': atomic: supported: true + '0x14A34': + atomic: + supported: false - name: eth_requestAccounts tags: - $ref: '#/components/tags/MetaMask' @@ -1404,3 +1449,9 @@ components: UserRejected: code: 4001 message: User rejected the request. + InvalidParams: + code: -32602 + message: The wallet cannot parse the request. + Unauthorized: + code: 4100 + message: The specified address is not connected or not in the wallet. From 1a0c955eda42bf375c0396386f72c26581fd6e2e Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Mon, 14 Apr 2025 11:37:43 -0700 Subject: [PATCH 10/13] minor fix --- openrpc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 880ad9d..4fe8f11 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -880,10 +880,10 @@ methods: value: '0x2105': atomic: - supported: true + status: supported '0x14A34': atomic: - supported: false + status: unsupported - name: eth_requestAccounts tags: - $ref: '#/components/tags/MetaMask' From 6471dc7c00dde32fe399d66eac8be1cfab8a941b Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Fri, 2 May 2025 13:31:13 -0700 Subject: [PATCH 11/13] fixes --- openrpc.yaml | 213 +++++++++++++++++++++------------------------------ 1 file changed, 88 insertions(+), 125 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 4fe8f11..1c3adb1 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -532,86 +532,7 @@ methods: - name: Calls required: true schema: - description: An object containing information about a batch of calls. - type: object - required: - - version - - from - - chainId - - atomicRequired - - calls - properties: - version: - description: The version of the request format. - type: string - id: - description: The ID of the batch of calls. - $ref: '#/components/schemas/uint' - from: - description: The sender's address. - $ref: '#/components/schemas/address' - chainId: - description: >- - The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID - of the calls. This must match the currently selected network in - the wallet. - $ref: '#/components/schemas/uint' - atomicRequired: - description: >- - `true` if the wallet must execute all calls atomically. If `false`, the - wallet may execute the calls sequentially without atomicity. If `false` - and the wallet is capable of executing the calls atomically, it may do so. - type: boolean - calls: - description: An array of call objects. - schema: - type: array - items: - title: Call - description: An object containing information about the call. - type: object - properties: - to: - description: The address of the call's recipient. - $ref: '#/components/schemas/address' - data: - description: The data to send with the call. - $ref: '#/components/schemas/bytes' - value: - description: The value to send with the call. - $ref: '#/components/schemas/uint' - capabilities: - description: >- - Dapps can use this object to communicate with the wallet about - supported capabilities. - type: object - patternProperties: - '^[a-zA-Z0-9_]*$': - description: >- - An object containing information about a specific capability. - type: object - properties: - optional: - description: >- - `true` if the capability is optional. - type: boolean - additionalProperties: true - capabilities: - description: >- - Dapps can use this object to communicate with the wallet about - supported capabilities. - type: object - patternProperties: - '^[a-zA-Z0-9_]*$': - description: >- - An object containing information about a specific capability. - type: object - properties: - optional: - description: >- - `true` if the capability is optional. - type: boolean - additionalProperties: true + $ref: '#/components/schemas/SendCallsParameter' result: name: Batch result schema: @@ -620,12 +541,11 @@ methods: properties: id: description: The ID of the batch of calls. - $ref: '#/components/schemas/uint' + type: string capabilities: description: >- Wallets can use this object to attach capability-specific metadata. type: object - additionalProperties: true errors: - $ref: '#/components/errors/InvalidParams' - $ref: '#/components/errors/UserRejected' @@ -653,15 +573,13 @@ methods: value: version: '2.0.0' from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' - chainId: '0x2105' + chainId: '0xaa36a7' atomicRequired: true calls: - - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' - value: '0x9184e72a' - data: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' - - to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' - value: '0x182183' - data: '0xfbadbaf01' + - to: '0x54f1C1965B355e1AB9ec3465616136be35bb5Ff7' + value: '0x0' + - to: '0x2D48e6f5Ae053e4E918d2be53570961D880905F2' + value: '0x0' result: name: Batch result value: @@ -700,7 +618,7 @@ methods: status: description: >- The status code of the batch of calls. Possible values are: -

    +
    • `100` - Pending
    • `200` - Confirmed
    • @@ -789,7 +707,7 @@ methods: name: Batch status value: version: '2.0.0' - chainId: '0x2105' + chainId: '0xaa36a7' id: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' status: 200 atomic: true @@ -835,34 +753,19 @@ methods: name: Capabilities schema: description: >- - An object specifying whether the wallet supports the `atomic` capability. + An object specifying whether the wallet supports the `atomic` capability + for specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain IDs. + For each chain, the `atomic` capability can have a `status` of: +
      +
        +
      • `supported` - The wallet will execute calls sent using + `wallet_sendCalls` atomically.
      • +
      • `ready` - The wallet can upgrade to `supported` pending user + approval (for example, via EIP-7702).
      • +
      • `unsupported` - The wallet will not execute calls atomically or suggest + an upgrade to the user.
      • +
      type: object - patternProperties: - '^0x[0-9a-fA-F]+$': - description: >- - An object specifying whether the wallet supports the `atomic` capability - for a specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID. - type: object - properties: - atomic: - description: >- - The atomic capability object. - type: object - properties: - status: - description: >- - The status of the wallet's support for the `atomic` capability on - this chain. `supported` means the wallet will execute calls sent - using `wallet_sendCalls` atomically. `ready` means the wallet - can upgrade to `supported` pending user approval (for example, via - [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702)). `unsupported` - means the wallet will not execute calls atomically or suggest an - upgrade to the user. - type: string - enum: - - supported - - ready - - unsupported errors: - $ref: '#/components/errors/InvalidParams' - $ref: '#/components/errors/Unauthorized' @@ -873,17 +776,13 @@ methods: value: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' - name: Chain IDs value: - - '0x2105' - - '0x14A34' + - '0xaa36a7' result: name: Capabilities value: - '0x2105': - atomic: - status: supported - '0x14A34': + '0xaa36a7': atomic: - status: unsupported + status: ready - name: eth_requestAccounts tags: - $ref: '#/components/tags/MetaMask' @@ -1300,6 +1199,70 @@ components: message: type: object description: The message you're proposing the user to sign. + SendCallsParameter: + title: Calls + description: An object containing information about a batch of calls. + type: object + required: + - version + - from + - chainId + - atomicRequired + - calls + properties: + version: + description: The version of the request format. + type: string + id: + description: The ID of the batch of calls. + type: string + from: + description: The sender's address. + type: string + pattern: '^0x[0-9a-fA-F]{40}$' + chainId: + description: >- + The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID + of the calls. This must match the currently selected network in + the wallet. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + atomicRequired: + description: >- + `true` if the wallet must execute all calls atomically. If `false`, the + wallet may execute the calls sequentially without atomicity. If `false` + and the wallet is capable of executing the calls atomically, it may do so. + type: boolean + calls: + type: array + description: An array of call objects. + items: + title: Call + description: An object containing information about the call. + type: object + properties: + to: + description: The address of the call's recipient. + type: string + pattern: '^0x[0-9a-fA-F]{40}$' + data: + description: The data to send with the call. + type: string + pattern: '^0x[0-9a-f]*$' + value: + description: The value to send with the call. + type: string + pattern: '^0x([1-9a-f]+[0-9a-f]*|0)$' + capabilities: + description: >- + Dapps can use this object to communicate with the wallet about + supported capabilities. + type: object + capabilities: + description: >- + Dapps can use this object to communicate with the wallet about + supported capabilities. + type: object AddEthereumChainParameter: title: Chain description: Object containing information about the chain to add. From 91da54b7e256904674717ffe979e6f9db7fc553d Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Mon, 5 May 2025 12:19:58 -0700 Subject: [PATCH 12/13] updates --- openrpc.yaml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 1c3adb1..69e5a0a 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -547,6 +547,8 @@ methods: Wallets can use this object to attach capability-specific metadata. type: object errors: + - code: -32603 + message: User rejected account upgrade. - $ref: '#/components/errors/InvalidParams' - $ref: '#/components/errors/UserRejected' - $ref: '#/components/errors/Unauthorized' @@ -554,18 +556,11 @@ methods: message: >- The wallet does not support a capability that was not marked as optional. - code: 5710 - message: The wallet does not support the specified chain ID. + message: EIP-7702 not supported on the specified chain ID. - code: 5720 message: There is already a batch submitted with the specified batch ID. - code: 5740 message: The batch is too large for the wallet to process. - - code: 5750 - message: >- - The wallet can support atomicity after an upgrade, but the user - rejected the upgrade. - - code: 5760 - message: >- - The wallet does not support atomicity, but the request requires it. examples: - name: wallet_sendCalls example params: @@ -607,7 +602,7 @@ methods: type: object properties: version: - description: The version of the response format. + description: The version of the API format. type: string id: description: The ID of the batch of calls. @@ -697,7 +692,7 @@ methods: errors: - $ref: '#/components/errors/InvalidParams' - code: 5730 - message: The specified batch ID is unknown or has not been submitted. + message: No matching bundle found. examples: - name: wallet_getCallsStatus example params: @@ -753,18 +748,18 @@ methods: name: Capabilities schema: description: >- - An object specifying whether the wallet supports the `atomic` capability - for specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain IDs. + An object specifying the status of the `atomic` capability for + specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain IDs. For each chain, the `atomic` capability can have a `status` of:
      • `supported` - The wallet will execute calls sent using `wallet_sendCalls` atomically.
      • `ready` - The wallet can upgrade to `supported` pending user - approval (for example, via EIP-7702).
      • -
      • `unsupported` - The wallet will not execute calls atomically or suggest - an upgrade to the user.
      • + approval to upgrade their account via EIP-7702.
      + If the `atomic` capability is not `supported` or `ready` for a + specified chain ID, the wallet will not return anything for that chain ID. type: object errors: - $ref: '#/components/errors/InvalidParams' @@ -1211,7 +1206,8 @@ components: - calls properties: version: - description: The version of the request format. + description: >- + The version of the API format. This must be `2.0.0`. type: string id: description: The ID of the batch of calls. @@ -1417,4 +1413,4 @@ components: message: The wallet cannot parse the request. Unauthorized: code: 4100 - message: The specified address is not connected or not in the wallet. + message: The requested account and/or method has not been authorized by the user. From f8776dd0672777565bec7e622e11ad96256a27cb Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Mon, 5 May 2025 19:01:27 -0700 Subject: [PATCH 13/13] address reviewer comments --- openrpc.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openrpc.yaml b/openrpc.yaml index 69e5a0a..20ce8e4 100644 --- a/openrpc.yaml +++ b/openrpc.yaml @@ -547,9 +547,9 @@ methods: Wallets can use this object to attach capability-specific metadata. type: object errors: - - code: -32603 - message: User rejected account upgrade. - $ref: '#/components/errors/InvalidParams' + - code: -32000 + message: Version not supported. - $ref: '#/components/errors/UserRejected' - $ref: '#/components/errors/Unauthorized' - code: 5700 @@ -561,6 +561,8 @@ methods: message: There is already a batch submitted with the specified batch ID. - code: 5740 message: The batch is too large for the wallet to process. + - code: 5750 + message: EIP-7702 upgrade rejected for this chain and account. examples: - name: wallet_sendCalls example params: @@ -691,6 +693,7 @@ methods: additionalProperties: true errors: - $ref: '#/components/errors/InvalidParams' + - $ref: '#/components/errors/Unauthorized' - code: 5730 message: No matching bundle found. examples: