Skip to main content

Get Task Output Preimage

Retrieves the output tree root preimage for a specific HDP task. This endpoint does not require authentication.

Endpoint

GET /tasks/{task_uuid}/output_preimage

Path Parameters

ParameterTypeDescription
task_uuidstringThe unique identifier (UUID) of the task

Example Request

curl -X GET https://staging.hdp.api.herodotus.cloud/tasks/01JPJ03YJT1A93D6NF56G4GVEQ/output_preimage \
  -H "Content-Type: application/json"

Response

Success Response (200 OK)

{
  "taskId": "01JPJ03YJT1A93D6NF56G4GVEQ",
  "outputPreimage": ["0x1", "0x2", "0x3", "0x4"]
}

Not Found Response (404)

{
  "error": "Task not found",
  "taskId": "01JPJ03YJT1A93D6NF56G4GVEQ"
}

Response Fields

FieldTypeDescription
taskIdstringThe unique identifier of the task
outputPreimagearray | nullArray of preimage values (hex strings) or null if not available

Notes

  • No authentication is required for this endpoint
  • The output preimage is only available for completed tasks
  • Returns null if the task doesn’t have an output preimage stored
  • The preimage values are hex-encoded strings representing the output tree root preimage