alchemy_requestPaymasterAndData

Requests coverage for a UserOperation. Returns paymasterAndData if approved, errors if not.

This endpoint will be deprecated

Please use alchemy_requestGasAndPaymasterAndData instead.

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 introduced alchemy_requestGasAndPaymasterAndData. This function both estimates gas and provides signed paymaster and paymasterData fields, therefore resolving the circular dependency.

Path parameters

apiKeystringRequired

Request

This endpoint expects an object.
policyIdstring or list of stringsRequired

The policy ID or list of policy IDs.

entryPointstringRequiredformat: "^0[xX][0-9a-fA-F]*$"

The entrypoint address the request should be sent through. This MUST be one of the entry points returned by the supportedEntryPoints RPC call and match the version of the user operation in the userOperation field.

userOperationobjectRequired

Test Partial UserOperation object, missing paymasterAndData and signature fields. This can be either a v0.6 or v0.7 user operation, but MUST match the version of the entry point at the address in the entryPoint field.

webhookDatastringOptional

Additional data you wish to include in the request, such as proof of humanity.

Response

The response object may be one of two types: - For entrypoint v0.6: an object with property paymasterAndData. - For entrypoint v0.7: an object with properties paymasterData, paymasterVerificationGasLimit, and paymasterPostOpGasLimit.

entrypointV06Responseobject
entrypointV07Responseobject