task

package
v0.15.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State uint8
const (
	StateInvalid State = iota
	StatePacked
	StateDispatched

	StateProved

	StateOutputted
	StateFailed
)

func (State) String

func (s State) String() string

type StateLog

type StateLog struct {
	TaskID    uint64
	ProjectID uint64
	State     State
	Comment   string
	Result    []byte
	Signature string
	ProverID  uint64
	CreatedAt time.Time
}

func (*StateLog) SignerAddress

func (l *StateLog) SignerAddress(task *Task) (common.Address, error)

type Task

type Task struct {
	ID             common.Hash    `json:"id"`
	ProjectID      uint64         `json:"projectID"`
	ProjectVersion string         `json:"projectVersion"`
	DeviceID       common.Address `json:"deviceID"`
	Payloads       [][]byte       `json:"payloads"`
	Signature      []byte         `json:"signature,omitempty"`
}

func (*Task) Sign added in v0.15.2

func (t *Task) Sign(prv *ecdsa.PrivateKey) ([]byte, error)

func (*Task) VerifySignature

func (t *Task) VerifySignature(pubKey []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL