Submit User Operation
Overview
This API endpoint allows you to submit a user operation for execution. It requires a signature and other details to process the operation.
- HTTP Method: POST
- Endpoint:
{{BASE_URL}}/api/v1/userOp/submit
Request Body Parameters
signature
(required): The cryptographic signature of the user operation.userOpId
(required): The unique identifier of the user operation.hash
(required): The hash of the user operation.isSponsored
(required): A boolean indicating whether the operation is sponsored by organization.
Example Request Body
{
"signature": "0x.....",
"userOpId": "67b1fc9a442f26832dadd881",
"hash": "0x.....",
"isSponsored": true
}
Request
Request Headers
X-CLIENT-ID
: (required): Client ID which was generated when registering in Xellar Account Abstraction API Service Dashboard.X-SIGNATURE
: (required): Calculated signature, please refer to Authorization section.X-TIMESTAMP
: (required): Request timestamp in RFC3339 format.
Example Request Syntax
curl -X POST -H "Content-Type: application/json" \
-H "x-client-id: $YOUR_CLIENT_ID" \
-H "x-signature: $CALCULATED_SIGNATURE" \
-H "x-timestamp: $TIMESTAMP" \
-d '{
"signature": "0x.....",
"userOpId": "67b1fc9a442f26832dadd881",
"hash": "0x.....",
"isSponsored": true
}' {{BASE_URL}}/api/v1/userOp/submit
Response
The response will include a JSON object with the following properties:
status
(number): The HTTP status code of the response (e.g., 200 for success).message
(string): A message providing additional information about the operation.data
(object): An object containing the operation details.data.accountId
(string): The account ID associated with the operation.data.ownerId
(string): The owner ID of the account.data.signature
(string): The signature used for the operation.data.status
(string): The current status of the operation (e.g., "on_process").data.type
(string): The type of operation (e.g., "send_token").data.network
(string): The network on which the operation is executed.data.chainId
(number): The chain ID of the network.data.data
(object): Additional data related to the user operation.data.receipt
(object|null): The transaction receipt, if available.data.validUntil
(string): The timestamp until which the operation is valid.data.failedReason
(string|null): The reason for failure, if any.data.sentAt
(string): The timestamp when the operation was sent.
Example Response
{
"status": 200,
"message": "success",
"data": {
"accountId": "67593dfb24a4f4d2bfa5510d",
"ownerId": "67593dfb24a4f4d2bfa5510b",
"signature": "0x.....",
"status": "on_process",
"type": "send_token",
"network": "sepolia",
"chainId": 11155111,
"data": {
....userOpData
},
"receipt": null,
"validUntil": "2024-12-12T03:58:37.181Z",
"failedReason": null,
"sentAt": "2024-12-12T10:30:56.955542+07:00"
}
}