Sign Transaction Hash
Overview
This API endpoint allows you to generate a hash for signing a transaction from an account. It returns a hash that can be used to track the user operation.
- HTTP Method: POST
- Endpoint:
{{BASE_URL}}/v1/userOp/signTransaction/hash
Request Body Parameters
accountId
(required): The unique identifier of the account.to
(required): The recipient's wallet address.value
(required): The value to be sent in the transaction (in smallest unit).callData
(required): The data to be sent with the transaction, in hexadecimal format.
Example Request Body
{
"accountId": "6781076148304060fd5e0dd6",
"to": "0x...",
"value": "0",
"callData": "0x....."
}
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 '{
"accountId": "6781076148304060fd5e0dd6",
"to": "0x...",
"value": "0",
"callData": "0x....."
}' {{BASE_URL}}/v1/userOp/signTransaction/hash
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.hash
(string): The hash of the user operation.data.userOpId
(string): Unique identifier for the user operation.data.validUntil
(number): Timestamp until which the estimation is valid.
Example Response
{
"status": 200,
"message": "success",
"data": {
"hash": "0x68cf969945d50ec231137a7ce53dbfc46fbee3dde6b3bd0524d79c347374070b",
"userOpId": "677cfa70ec2af072fe4312ec",
"validUntil": 1736245624
}
}