POST
/
#particle_aa_validateSession

Contextualizing validateSession

  • validateSession returns a Boolean, result, indicating the validity of a given session key instance. 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.

Query example

JSON
{
    "chainId": 80001,
    "jsonrpc": "2.0",
    "id": "0a7a18a1-53af-45b1-8a7f-4ece06c09e04",
    "method": "particle_aa_validateSession",
    "params": [
        { "name": "BICONOMY", "version": "2.0.0", "ownerAddress": "0xc19dd1f3e212b39a30036EF3DE3F83dEf5a66E41" },
        {
            "sessions": [
                {
                    "validUntil": 0,
                    "validAfter": 0,
                    "sessionValidationModule": "0x4b7f018Fa27a97b6a17b6d4d8Cb3c0e2D9340133",
                    "sessionKeyDataInAbi": [ // or use sessionKeyData to replace
                        ["address", "address", "address", "uint256"],
                        [
                            "0x1dacDa1087C4048774bEce7784EB8EC4CfBeDB2c",
                            "0x909E30bdBCb728131E3F8d17150eaE740C904649",
                            "0x11D266772b85C2C5D4f84A41ca3E08e9f04Fb5D3",
                            1
                        ]
                    ]
                }
            ],
            "targetSession": {
                "validUntil": 0,
                "validAfter": 0,
                "sessionValidationModule": "0x4b7f018Fa27a97b6a17b6d4d8Cb3c0e2D9340133",
                "sessionKeyDataInAbi": [ // or use sessionKeyData to replace
                    ["address", "address", "address", "uint256"],
                    [
                        "0x1dacDa1087C4048774bEce7784EB8EC4CfBeDB2c",
                        "0x909E30bdBCb728131E3F8d17150eaE740C904649",
                        "0x11D266772b85C2C5D4f84A41ca3E08e9f04Fb5D3",
                        1
                    ]
                ]
            }
        }
    ]
}

Authorizations

Authorization
string
headerrequired

Basic 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.0required

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

id
integer
default: 1required

The request identifier.

method
enum<string>
required

API method being called.

Available options:
particle_aa_validateSession
params
object[]
required

Parameters for validating a session.

Response

200 - application/json
jsonrpc
string
default: 2.0required

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

id
integer
default: 1required

The request identifier.

result
boolean
required

Indicates if the session is valid.

chainId
integer

Blockchain chain ID.