Skip to main content
POST
sendUserOp

Understanding sendUserOp

  • sendUserOp pushes a structured and signed UserOperation to the network, also handling session keys, sender management, etc. It takes:
    • Account config object:
      • name - string.
      • version - string.
      • ownerAddress - string.
      • biconomyApiKey - (optional), string. Should only be used if you’d like to use a Biconomy Paymaster.
    • UserOp object. This should be signed by the user and if applicable, the Paymaster as well.
    • Optionally, sessions array - Session key object(s).

Query example

JSON

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request to send a user operation.

jsonrpc
string
default:2.0
required

Version of the JSON-RPC protocol, should be 2.0.

Example:

"2.0"

id
integer
default:1
required

The request identifier.

Example:

1

method
enum<string>
required

API method being called.

Available options:
particle_aa_sendUserOp
params
(string | object)[]
required

Parameters for sending a user operation.

Response

200 - application/json

Successful response with the result of the user operation.

jsonrpc
string
default:2.0
required

Version of the JSON-RPC protocol, should be 2.0.

Example:

"2.0"

id
integer
default:1
required

The request identifier.

Example:

1

result
string
required

Result of the user operation.

Example:

"0xResult"

chainId
integer

The blockchain chain ID.

Example:

80001