cc_sponsorUserOperation 🔒
"Authorization" header required with a valid JWT token
Sponsor a user operation. This step locks the required credit for the user operation. And returns paymasterAndData
which is the key data to pay gas.
request example
{
"method": "cc_sponsorUserOperation",
"params": [
{
"sender": "0x2aE4CA6C56FEb873e7D60F3dee3388C9eAB09837",
"to": "0x4bc54260ec3617b3f73fdb1fa22417ed109f372c",
"value": "0",
"callData": "0x0fe1597f0000000000000000000000000d3f6ec061a5565512c2bb04897d7190c88e822c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000002ae4ca6c56feb873e7d60f3dee3388c9eab09837000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
"maxFeePerGas": "0x80ec14c",
"maxPriorityFeePerGas": "0x6422c40",
"nonce": null,
"ep": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
},
{
"owner": "0x777a85ca007c49a85ea1a69dd381a6c3009a7777"
}
],
"id": 1,
"jsonrpc": "2.0"
}
response exmaple
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"userOperation": {
"sender": "0x2aE4CA6C56FEb873e7D60F3dee3388C9eAB09837",
"nonce": "0x943b65046f8e438e8cb465c30be7f1a40000000000000000",
"initCode": "0x",
"callData": "0x519454470000000000000000000000004bc54260ec3617b3f73fdb1fa22417ed109f372c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e40fe1597f0000000000000000000000000d3f6ec061a5565512c2bb04897d7190c88e822c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000002ae4ca6c56feb873e7d60f3dee3388c9eab09837000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"callGasLimit": "0x19000",
"verificationGasLimit": "0x17f96",
"preVerificationGas": "0x65791",
"maxFeePerGas": "0x80ec14c",
"maxPriorityFeePerGas": "0x6422c40",
"paymasterAndData": "0x4fd9098af9ddcb41da48a1d78f91f1398965addc0000651f82c70000651f83f300000000000000000000000000000000000000000118e7a4aaca3e04dd53d87e6ea746d5c4067a7f9adc15e06b64745784e3ce5c114a316053f9cee3677dcac993c5fd6485365c49727991f7de23145ee9f26ffe1c",
"signature": "0x"
},
"userOperationHash": "0xb905da41a1aa6d5359c90234a4716dd0c1335cf1c2b4bcd2355cefde2eba9f1f",
"pmAndDataExpireAt": 1696564211,
"signBeforeAt": 1696564091,
"refundAt": 1696564331
}
}