project

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Paused                bool
	RequestedProverAmount uint64
}

type Config

type Config struct {
	Version             string      `json:"version"`
	VMTypeID            uint64      `json:"vmTypeID"`
	ProofType           string      `json:"proofType"` // liveness, movement
	SignedKeys          []SignedKey `json:"signedKeys"`
	SignatureAlgorithm  string      `json:"signatureAlgorithm"`
	HashAlgorithm       string      `json:"hashAlgorithm"`
	TaskProcessingBatch uint64      `json:"taskProcessingBatch"`
	Metadata            string      `json:"metadata,omitempty"`
	MetadataHash        string      `json:"metadataHash,omitempty"`
	Code                string      `json:"code"`
	CodeHash            string      `json:"codeHash,omitempty"`
}

type ContractProject

type ContractProject func(projectID string) (string, common.Hash, error)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(cp ContractProject, pf ProjectFile, upf UpsertProjectFile) *Manager

func (*Manager) Project

func (m *Manager) Project(projectID string) (*Project, error)

type Project

type Project struct {
	DefaultVersion string    `json:"defaultVersion,omitempty"`
	Configs        []*Config `json:"config"`
}

TODO: prefer protobuf for serialization and deserialization

func (*Project) Config

func (p *Project) Config(version string) (*Config, error)

func (*Project) DefaultConfig

func (p *Project) DefaultConfig() (*Config, error)

func (*Project) Marshal added in v0.21.0

func (p *Project) Marshal() ([]byte, error)

func (*Project) Unmarshal added in v0.21.0

func (p *Project) Unmarshal(data []byte) error

type ProjectFile added in v0.16.0

type ProjectFile func(projectID string) ([]byte, common.Hash, error)

type SignedKey added in v0.23.0

type SignedKey struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type UpsertProjectFile added in v0.16.0

type UpsertProjectFile func(projectID string, file []byte, hash common.Hash) error

Jump to

Keyboard shortcuts

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