EIP-7702 Wallet API Quickstart (API)
Learn how to send user ops using EIP-7702 with any RPC client
We’ll demonstrate how to use the wallet_prepareCalls
, wallet_sendPreparedCalls
, and wallet_getCallsStatus
endpoints.
1. Prepare Your Calls
You can simply prepare whatever calls you’d like to send, being sure to include the 7702 capability.
If the account isn’t already delegated to Modular Account V2 onchain, this will return an array of calls that must be signed:
For subsequent calls, only one call will be returned (unless the owner removed or changed the delegation):
2. Sign The Call(s)
Sign the prepared calls. How exactly you do this will differ depending on your language. Here is an example using Viem in TypeScript:
3. Send The Prepared Calls
Now that you have the prepared calls & signatures, you’re ready to send the calls!
This will return the array of prepared call IDs.
4. Check The Calls Status
Now you can simply call wallet_getCallsStatus
to check the status of the calls.
See here for all of the possible results.