sendUserOp

:airplane: 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

{
  "jsonrpc": "2.0",
  "id": "89916c65-2a47-4933-aa4c-55f7e29edbf0",
  "chainId": 80001,
  "method": "particle_aa_sendUserOp",
  "params": [
    // account config
    {
      "name": "BICONOMY",
      "version": "1.0.0",
      "ownerAddress": "0xA60123a1056e9D38B64c4993615F27cCe9A9E8D5",
      "biconomyApiKey": "LdF-gC43H.6f0ec763-fde5-4d5e-89f6-1b9ef12ba4a4" // optional
    },
    // user op
    {
      "sender": "0x8fb859e944561678be40cdd2db16551396c0b074",
      "nonce": "0x64",
      "initCode": "0x",
      "callData": "0x912ccaa3000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000020000000000000000000000009c3c9283d3e44854697cd22d3faa240cfb032889000000000000000000000000329a7f8b91ce7479035cb1b5d62ab41845830ce80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000000000f7365ca6c59a2c93719ad53d567ed49c14c0000000000000000000000000000000000000000000000000001548a5fd39873000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "signature": "0xf173083acfa6ddfdbbb84023ebdeb07ff2a38aa1a2e7f7b1b2eb27e180ff13987c14d72273b82f448b8e89066045aebb9e5423eea3c2314136cc9c75d7bb716f1b",
      "verificationGasLimit": "0x163b8",
      "callGasLimit": "0xd1e7",
      "preVerificationGas": "50736",
      "paymasterAndData": "0x00000f7365ca6c59a2c93719ad53d567ed49c14c000000000000000000000000000000000000000000000000000000000064d2762e0000000000000000000000000000000000000000000000000000000064d26f260000000000000000000000009c3c9283d3e44854697cd22d3faa240cfb03288900000000000000000000000000000f7748595e46527413574a9327942e744e910000000000000000000000000000000000000000000000000de567836c0e69c0000000000000000000000000000000000000000000000000000000000010c8e09292fc583c0427b08765e4eccc030122182d141b6dbc5bb539fc4de726935042106faec9ee5b7537cf15c5f7d317fc355a0ff41877815fcbf9c906e0b584c4b61b",
      "maxFeePerGas": "1500000034",
      "maxPriorityFeePerGas": "1500000000"
    },
    // Optional
    {
      "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
              ]
          ]
      }
    }
  ]
}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!