This documentation is currently being updated. Please check back later for the latest version.
type Task struct {
// This is the task unique identifier, represented as a Hash
ID common.Hash `json:"id"`
// This is the sequence number for the task to ensure ordering and prevent replay
Nonce uint64 `json:"nonce"`
// This is the DePIN Project ID, represented as a big integer
ProjectID *big.Int `json:"projectID"`
// This represent a specific version for the project file in case it's been updated
ProjectVersion string `json:"projectVersion,omitempty"`
// This is the public key of the device (or "client") that authorized the task
DevicePubKey []byte `json:"devicePublicKey"`
// This is the raw data payload containing the message(s) to be processed
Payload []byte `json:"payload"`
// This is the cryptographic signature of the task
Signature []byte `json:"signature,omitempty"`
// This is the hash of the payload data
PayloadHash common.Hash `json:"payloadHash,omitempty"`
// This is the hash of the task structure itself
TaskHash common.Hash `json:"taskHash,omitempty"`
// This points to the previous task in the sequence, forming a chain
PrevTask *Task `json:"previousTask,omitempty"`
}
https://github.com/iotexproject/w3bstream/blob/283aae188f03f9dfd0ef40027fd9ab837e41a9c9/task/task.go#L14