Requests coverage for a UserOperation
. Returns paymasterAndData
if approved, errors if not.
We recommend using
alchemy_requestGasAndPaymasterAndData
While you can use
alchemy_requestPaymasterAndData
to request a paymaster signature, it's important to note that this function requires gas fields to be part of theUserOperation
passed as a parameter. These gas fields are influenced by the response of this endpoint, creating a circular dependency.To simplify this process, we recommend using
alchemy_requestGasAndPaymasterAndData
. This function not only provides a gas estimation, but also returns a signedpaymasterAndData
(if using EntryPoint v0.6) or signedpaymaster
andpaymasterData
fields (if using EntryPoint v0.7) containing that gas estimation, therefore resolving the circular dependency.
Supported EntryPoints
alchemy_requestPaymasterAndData
supports versions v0.6 and v0.7 of ERC-4337. Check our FAQs to determine which version you should use.