pub struct TaskInfo {Show 21 fields
pub task_id: String,
pub title: String,
pub description: String,
pub task_type: TaskType,
pub poster: Address,
pub assignee: Option<Address>,
pub max_price: u128,
pub quoted_price: Option<u128>,
pub status: TaskStatus,
pub created_at: Timestamp,
pub deadline: Option<u64>,
pub required_model: Option<String>,
pub preferred_model_id: Option<String>,
pub input: String,
pub output: Option<String>,
pub priority: TaskPriority,
pub metadata: HashMap<String, String>,
pub tx_hash: Option<String>,
pub acceptance_criteria: Option<AcceptanceCriteria>,
pub escrow_id: Option<String>,
pub dispute: Option<TaskDispute>,
}Expand description
A task posted to the Tenzro Network task marketplace
Fields§
§task_id: StringUnique task identifier (UUID v4)
title: StringShort title describing the task
description: StringDetailed description of the task and expected output
task_type: TaskTypeType of task
poster: AddressAddress of the entity that posted the task
assignee: Option<Address>Optional: agent assigned to fulfill the task
max_price: u128Maximum price the poster is willing to pay (in TNZO micro-units)
quoted_price: Option<u128>Actual price quoted/agreed (set when task is assigned)
status: TaskStatusCurrent status of the task
created_at: TimestampWhen the task was posted
deadline: Option<u64>Deadline for task completion (Unix timestamp seconds)
required_model: Option<String>Minimum model capability required (e.g., “7b”, “70b”, “any”)
preferred_model_id: Option<String>Specific model ID to use (if None, any capable model is acceptable)
input: StringInput data or prompt for the task
output: Option<String>Output/result (populated when completed)
priority: TaskPriorityTask priority level
metadata: HashMap<String, String>Additional task-specific metadata
tx_hash: Option<String>Transaction hash of the task posting (for escrow reference)
acceptance_criteria: Option<AcceptanceCriteria>Structured acceptance criteria / proof spec (Stage 1, P1). When present,
completion must satisfy these constraints and, if required_proof is
set, carry a proof verified by the SettlementEngine.
escrow_id: Option<String>Escrow id that locks the reward once the task is assigned (Stage 3, P0).
None until tenzro_assignTask funds the escrow vault.
dispute: Option<TaskDispute>Dispute state (P4). None unless tenzro_disputeTask was called.
Implementations§
Source§impl TaskInfo
impl TaskInfo
Sourcepub fn new(
title: String,
description: String,
task_type: TaskType,
poster: Address,
max_price: u128,
input: String,
) -> Self
pub fn new( title: String, description: String, task_type: TaskType, poster: Address, max_price: u128, input: String, ) -> Self
Creates a new open task
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Returns true if the task can still be accepted by an agent
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if the task is in a terminal state