Skip to main content

Onchain Endpoints

Endpoints for blockchain interactions.

Get User Operation Receipt

GET /onchain/user-op-receipt/{chainId}/{hash}

Get user operation receipt by chainId and hash.

Parameters:

  • chainId (path, required) - Chain ID (e.g., 2484)
  • hash (path, required) - The hash of the user operation

Example:

GET /onchain/user-op-receipt/2484/0x0ecf813fee38eeda0dc688c3b65eb1759851d5534be024074d1947c4aab04398

Response: 200 OK

Send Transaction

POST /onchain/send

Send an on-chain transaction.

Security: Bearer token authentication required

Request Body:

{
"chainId": 2484,
"sponsor": true,
"transactionReq": {
"to": "0xB246603EF552D8372c4c91c5BAEf2Eed9c902fF4",
"value": "1000000000000000",
"data": "0x",
"maxPriorityFeePerGas": "1800000000"
},
"appApiKey": "B246603EF552D8372c4c91c5BAEf2Eed9c902fF4"
}

Response: 201 Created

Transaction Request Fields

FieldTypeDescriptionRequired
chainIdnumberThe blockchain chain IDYes
sponsorbooleanWhether to use gas sponsorshipYes
transactionReqobjectTransaction detailsYes
appApiKeystringAPI key for the specific app that transaction needs to be sent toNo

Estimate User Operation Gas

POST /onchain/estimate-user-op-gas

Estimate gas required for a user operation.

Security: Bearer token authentication required

Request Body:

{
"chainId": 2484,
"sponsor": true,
"transactionReq": {
"to": "0xB246603EF552D8372c4c91c5BAEf2Eed9c902fF4",
"value": "1000000000000000",
"data": "0x",
"maxPriorityFeePerGas": "1800000000"
},
"appApiKey": "B246603EF552D8372c4c91c5BAEf2Eed9c902fF4"
}

Response: 201 Created