alchemy_requestPaymasterAndData

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 the UserOperation 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 signed paymasterAndData (if using EntryPoint v0.6) or signed paymaster and paymasterData 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.

Language
URL
Click Try It! to start a request and see the response here!
ReadMe