Account Abstraction RPC
createUserOp
Learn how to use the createUserOp JSON-RPC method.
POST
/
#particle_aa_createUserOp
Understanding createUserOp
createUserOp
will construct and return a UserOperation object and hash using a transaction or collection of transactions, alongside smart account and fee payment information. It takes:- Account config object:
name
- string, eitherBICONOMY
,CYBERCONNECT
, orSIMPLE
.version
- string, either1.0.0
or2.0.0
.ownerAddress
- string.biconomyApiKey
- (optional, for using Biconomy’s Paymaster), string.
- Array of transactions:
- Standard transaction object.
- Optionally, a token
feeQuote
object, retrieved fromgetFeeQuotes
, only used if you’re paying the gas fee in an ERC-20 token. - Token paymaster address - (optional), string.
- Account config object:
Query example
JSON
Authorizations
Authorization
string
headerrequiredBasic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Body
application/json
jsonrpc
string
default: 2.0requiredVersion of the JSON-RPC protocol, should be 2.0.
id
integer
default: 1requiredThe request identifier.
method
enum<string>
requiredAPI method being called.
Available options:
particle_aa_createUserOp
params
array
requiredParameters for creating a user operation.
Response
200 - application/json
jsonrpc
string
default: 2.0requiredVersion of the JSON-RPC protocol, should be 2.0.
id
integer
default: 1requiredThe request identifier.
result
object
requiredchainId
integer
The blockchain chain ID.
Was this page helpful?