Installation
Install the required packages:Connecting ZeroDev to a Para Signer
1
Required Imports
Start by importing all the necessary packages:
2
Create a custom sign message function
When working with Para MPC and AA providers, we need a function to handle the V value in signatures so that transactions can be validated correctly. This is due to the way Para handles signatures in its multi-party computation (MPC) setup. Below is the implementation of the
customSignMessage
function:3
Set up Para with Viem
Set up your Para account and Viem client:
Ensure you override the
signMessage
method of the LocalAccount
instance with the customSignMessage
function. This is crucial for ensuring that the V value in the signature is handled correctly when sending transactions through ZeroDev.4
Set up ZeroDev kernel and validator
Configure the ZeroDev kernel account with the ECDSA validator:
5
6
Send transactions with the kernel client
Now you can use the kernel client to send user operations: