prepareCalls
Prepares a set of contract calls for execution by building a user operation. Returns the built user operation and a signature request that needs to be signed before submitting to sendPreparedCalls.
Import
Usage
Parameters
client
InnerWalletApiClient<TAccount>
- The wallet API client to use for the request
params
PrepareCallsParams<TAccount>
- Parameters for preparing calls
params.calls
Array<{to: Address, data?: Hex, value?: Hex}>
- Array of contract calls to execute
params.from
Address
- The address to execute the calls from (required if the client wasn’t initialized with an account)
params.capabilities
object
- Optional capabilities to include with the request
Returns
Promise<PrepareCallsResult>
A Promise that resolves to the prepared calls result containing
the user operation data and signature request