Skip to content

Commit 33dc682

Browse files
authored
Update EIP-5792: Add showCallsStatus
Merged by EIP-Bot.
1 parent b6b2b84 commit 33dc682

File tree

1 file changed

+53
-24
lines changed

1 file changed

+53
-24
lines changed

EIPS/eip-5792.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
eip: 5792
33
title: Wallet Call API
44
description: Adds JSON-RPC methods for sending multiple calls from the user's wallet, and checking their status
5-
author: Moody Salem (@moodysalem), Lukas Rosario (@lukasrosario), Wilson Cusack (@wilsoncusack), Dror Tirosh (@drortirosh), Jake Moxey (@jxom)
5+
author: Moody Salem (@moodysalem), Lukas Rosario (@lukasrosario), Wilson Cusack (@wilsoncusack), Dror Tirosh (@drortirosh), Jake Moxey (@jxom), Derek Rein (@arein)
66
discussions-to: https://ethereum-magicians.org/t/eip-5792-wallet-abstract-transaction-send-api/11374
77
status: Draft
88
type: Standards Track
@@ -32,7 +32,9 @@ We define one capability related to call execution atomicity.
3232

3333
### `wallet_getCapabilities`
3434

35-
RPC for an application to receive information about the capabilities that a connected wallet supports (e.g. batch transactions, paymaster communication).
35+
RPC for an application to receive information about the capabilities that a provided wallet supports (e.g. batch transactions, paymaster communication).
36+
37+
This method SHOULD return an error if the user has not already approved a connection to the app with the provided address.
3638

3739
The key of each item per chain is the name of a capability and the value can be of any shape. Capabilities are returned per chain because wallets may support different capabilities across chains.
3840

@@ -41,11 +43,17 @@ We expect the community to align on the definition of capabilities in separate E
4143
#### `wallet_getCapabilities` RPC Specification
4244

4345
```typescript
44-
type GetCapabilitiesParams = [];
46+
type GetCapabilitiesParams = [`0x${string}`]; // Wallet address
4547

4648
type GetCapabilitiesResult = Record<`0x${string}`, <Record<string, any>>; // Hex chain id
4749
```
4850
51+
##### `wallet_getCapabilities` Example Parameters
52+
53+
```json
54+
["0xd46e8dd67c5d32be8058bb8eb970870f07244567"]
55+
```
56+
4957
##### `wallet_getCapabilities` Example Return Value
5058
5159
The capabilities below are for illustrative purposes.
@@ -125,6 +133,7 @@ type SendCallsResult = string;
125133
}
126134
],
127135
"capabilities": {
136+
// Illustrative
128137
"paymasterService": {
129138
"url": "https://..."
130139
}
@@ -135,43 +144,43 @@ type SendCallsResult = string;
135144
136145
##### `wallet_sendCalls` Example Return Value
137146
138-
The identifier can be any string. The only requirement is that for a given session, users should be able to call `wallet_getCallsReceipt` with this value and get a call batch status.
147+
The identifier can be any string. The only requirement is that for a given session, users should be able to call `wallet_getCallsStatus` with this value and get a call batch status.
139148
140149
```json
141150
"0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
142151
```
143152
144-
### `wallet_getCallsReceipt`
153+
### `wallet_getCallsStatus`
145154
146155
Returns the status of a call batch that was sent via `wallet_sendCalls`. The identifier of the transaction is the value returned from the `wallet_sendCalls` RPC. Note this method only returns a subset of fields that `eth_getTransactionReceipt` returns, excluding any fields that may differ across wallet implementations.
147156
148157
* If a wallet does not execute multiple calls atomically (i.e. in multiple transactions), the receipts in the `receipts` field MUST be in order of the calls sent.
149-
* If a wallet executes multiple calls atomically (i.e. in a single transaction), `wallet_getCallsReceipt` MUST return a single receipt, corresponding to the transaction in which the calls were included.
158+
* If a wallet executes multiple calls atomically (i.e. in a single transaction), `wallet_getCallsStatus` MUST return a single receipt, corresponding to the transaction in which the calls were included.
150159
* The `logs` in the receipt objects MUST only include logs relevant to the calls submitted using `wallet_sendCalls`. For example, in the case of a transaction submitted onchain by an [ERC-4337](./eip-4337.md) bundler, the logs must only include those relevant to the user operation constructed using the calls submitted via `wallet_sendCalls`. I.e. the logs should not include those from other unrelated user operations submitted in the same bundle.
151160
152-
#### `wallet_getCallsReceipt` RPC Specification
161+
#### `wallet_getCallsStatus` RPC Specification
153162
154163
```typescript
155-
type GetCallsParams = string
164+
type GetCallsParams = string;
156165

157166
type GetCallsResult = {
158-
status: 'PENDING' | 'CONFIRMED'
167+
status: 'PENDING' | 'CONFIRMED';
159168
receipts?: {
160169
logs: {
161-
address: `0x${string}`
162-
data: `0x${string}`
163-
topics: `0x${string}`[]
164-
}[]
165-
status: `0x${string}` // Hex 1 or 0 for success or failure, respectively
166-
blockHash: `0x${string}`
167-
blockNumber: `0x${string}`
168-
gasUsed: `0x${string}`
169-
transactionHash: `0x${string}`
170-
}[]
171-
}
170+
address: `0x${string}`;
171+
data: `0x${string}`;
172+
topics: `0x${string}`[];
173+
}[];
174+
status: `0x${string}`; // Hex 1 or 0 for success or failure, respectively
175+
blockHash: `0x${string}`;
176+
blockNumber: `0x${string}`;
177+
gasUsed: `0x${string}`;
178+
transactionHash: `0x${string}`;
179+
}[];
180+
};
172181
```
173182
174-
##### `wallet_getCallsReceipt` Example Parameters
183+
##### `wallet_getCallsStatus` Example Parameters
175184
176185
As with the return value of `wallet_sendCalls`, the batch identifier may be any string.
177186
@@ -181,7 +190,7 @@ As with the return value of `wallet_sendCalls`, the batch identifier may be any
181190
]
182191
```
183192
184-
##### `wallet_getCallsReceipt` Example Return Value
193+
##### `wallet_getCallsStatus` Example Return Value
185194
186195
```json
187196
{
@@ -207,6 +216,26 @@ As with the return value of `wallet_sendCalls`, the batch identifier may be any
207216
}
208217
```
209218
219+
### `wallet_showCallsStatus`
220+
221+
Requests that a wallet shows information about a given call bundle that was sent with `wallet_sendCalls`. Note that this method does not return anything.
222+
223+
#### `wallet_showCallsStatus` RPC Specification
224+
225+
```typescript
226+
type ShowCallsParams = string; // Call bundle identifier returned by wallet_sendCalls
227+
```
228+
229+
##### `wallet_showCallsStatus` Example Parameters
230+
231+
This method accepts a call bundle identifier returned by a `wallet_sendCalls` call.
232+
233+
```json
234+
[
235+
"0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
236+
]
237+
```
238+
210239
### `atomicBatch` Capability
211240
212241
Indicates that a wallet can execute multiple calls atomically as part of a single transaction.
@@ -217,8 +246,8 @@ If a wallet indicates it supports the `atomicBatch` capability, it MUST submit c
217246
218247
```typescript
219248
type AtomicBatchCapability = {
220-
supported: true
221-
}
249+
supported: true;
250+
};
222251
```
223252
224253
##### `wallet_getCapabilities` Example Return Value

0 commit comments

Comments
 (0)