Account Abstraction RPC
createSessions
Learn how to use the createSessions JSON-RPC method.
POST
/
#particle_aa_createSessions
Contextualizing createSessions
createSessions
will generate transactions (or UserOperation objects and hashes, according to the fee payment mechanism) for initializing a session key within predefined parameters. It takes:- Account config object:
name
- string.version
- string.ownerAddress
- string.biconomyApiKey
- (optional), string. It should only be used if you’d like to use a Biconomy Paymaster.
- Array of sessions:
- Session object:
validUntil
- integer.validAfter
- integer.sessionValidationModule
- string.sessionKeyDataInAbi
(alternative:sessionKeyData
) - array.
- Session object:
- 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_createSessions
params
object[]
requiredParameters for creating sessions.
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?