default7702UserOpSigner
Provides a default middleware function for signing user operations with a client account when using EIP-7702 delegated accounts.
If the signer doesn’t support signAuthorization
, then this just runs the provided signUserOperation
middleware.
This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in getImplementationAddress()
.
Import
Usage
Parameters
userOpSigner
ClientMiddlewareFn
Optional user operation signer function
Returns
Function
A middleware function that signs EIP-7702 authorization tuples if necessary, and also uses the provided or default user operation signer to generate the user op signature.