project

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Code         string       `json:"code"`
	CodeExpParam string       `json:"codeExpParam,omitempty"`
	VMType       types.VM     `json:"vmType"`
	Output       OutputConfig `json:"output,omitempty"`
	Version      string       `json:"version"`
}

func (*Config) GetOutput added in v0.5.1

func (c *Config) GetOutput(privateKeyECDSA, privateKeyED25519 string) (output.Output, error)

type Manager

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

func NewManager

func NewManager(chainEndpoint, contractAddress, projectFileDirectory string) (*Manager, error)

func (*Manager) Get

func (m *Manager) Get(projectID uint64, version string) (*Config, error)

func (*Manager) GetAllProjectID

func (m *Manager) GetAllProjectID() []uint64

TODO will delete when node konw how to fetch message

type Monitor added in v0.5.1

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

func NewDefaultMonitor added in v0.5.1

func NewDefaultMonitor(chainEndpoint string, addresses []string, topics []string) (*Monitor, error)

func NewMonitor added in v0.5.1

func NewMonitor(chainEndpoint string, addresses []string, topics []string, from, step int64, interval time.Duration) (*Monitor, error)

func (*Monitor) Err added in v0.5.1

func (m *Monitor) Err() <-chan error

func (*Monitor) Events added in v0.5.1

func (m *Monitor) Events(topic string) (<-chan *types.Log, bool)

func (*Monitor) MustEvents added in v0.5.1

func (m *Monitor) MustEvents(topic string) <-chan *types.Log

func (*Monitor) Unsubscribe added in v0.5.1

func (m *Monitor) Unsubscribe()

type OutputConfig added in v0.4.1

type OutputConfig struct {
	Type types.Output `json:"type"`

	Ethereum struct {
		ChainEndpoint   string `json:"chainEndpoint"`
		ContractAddress string `json:"contractAddress"`
		ContractMethod  string `json:"contractMethod"`
		ContractAbiJSON string `json:"contractAbiJSON"`
	} `json:"ethereum,omitempty"`

	Solana struct {
		ChainEndpoint  string `json:"chainEndpoint"`
		ProgramID      string `json:"programID"`
		StateAccountPK string `json:"stateAccountPK"`
	} `json:"solana,omitempty"`
}

type ProjectMeta added in v0.5.0

type ProjectMeta struct {
	ProjectID uint64
	Uri       string
	Hash      [32]byte
	Paused    bool
}

func (*ProjectMeta) GetConfigs added in v0.5.1

func (m *ProjectMeta) GetConfigs() ([]*Config, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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