usePrepareCalls
Hook for preparing calls to a smart account.
This hook provides functionality to prepare calls for execution on a smart account. It handles the preparation step of the Account Abstraction flow, but does not support EOA wallets.
Import
Usage
Parameters
params
UsePrepareCallsParams
- Configuration parameters for the hook
params.client
GetSmartWalletClientResult<Address>
- Smart wallet client instance
Returns
UsePrepareCallsResult
An object containing:
prepareCalls
: Function to prepare calls synchronously (returns void)prepareCallsAsync
: Async function to prepare calls (returns Promise)preparedCalls
: The result of the last successful call preparationisPreparingCalls
: Boolean indicating if calls are currently being preparederror
: Error from the last failed call preparation, if any