Skip to main content
The eth_signUserOperation method allows you to sign an ERC-4337 UserOperation using your client’s MPC key without broadcasting it to the network. The signed UserOperation can then be submitted through a separate backend such as Pimlico or a custom bundler endpoint.
This method requires your client to be created with Account Abstraction enabled (isAccountAbstracted: true). Non-AA clients will receive a METHOD_UNSUPPORTED error.

Prerequisites

Before using eth_signUserOperation, ensure that:
  1. Your organization has Account Abstraction enabled. See the Account Abstraction guide for setup instructions.
  2. Your client was created with isAccountAbstracted: true via the Create a new client endpoint.
  3. Your client has a wallet created and backed up.

Signing a UserOperation

Use the request method with the eth_signUserOperation RPC method. The params array takes a single object with standard Ethereum transaction fields.
The chainId must be a CAIP-2 compliant Chain ID for a supported Account Abstraction network.

Transaction Parameters

The params object supports the following fields:

Response

The method returns a PortalProviderResponse where result is a hex-encoded JSON string containing the signed UserOperation. You can decode this result and submit it to a bundler of your choice.

EIP-1559 Gas Parameters

You can specify EIP-1559 gas parameters for finer control over fees:

Error Handling

Related Documentation