createKernelClientForWalletAccount
Creates a ZeroDev KernelClient instance for a given smart wallet account. The KernelClient allows you to send user operations and interact with the smart account.Usage
Parameters
Returns
Promise<KernelClient> - A promise that resolves to a ZeroDev KernelClient instance.
Examples
With gas sponsorship (default)
Without gas sponsorship
With custom gas token (ERC20)
With specific network
With pre-signed EIP-7702 authorization
This is useful for singleUse MFA flows where you need to separate the authorization signing step from the transaction step:React
Create the kernel client inside a button handler oruseEffect — it should not be created at module level as it depends on runtime wallet state:
Related functions
- signEip7702Authorization - Sign an EIP-7702 authorization for ZeroDev kernel delegation
- canSponsorTransaction - Check if a transaction can be sponsored
- estimateTransactionGas - Estimate gas for a transaction
- getSignerForSmartWalletAccount - Get the signer for a smart wallet