project

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationConfig added in v0.6.0

type AggregationConfig struct {
	Amount uint `json:"amount,omitempty"`
}

type Config

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

func (*Config) GetOutput added in v0.5.1

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

type EthereumConfig added in v0.6.2

type EthereumConfig struct {
	ChainEndpoint   string `json:"chainEndpoint"`
	ContractAddress string `json:"contractAddress"`
	ReceiverAddress string `json:"receiverAddress,omitempty"`
	ContractMethod  string `json:"contractMethod"`
	ContractAbiJSON string `json:"contractAbiJSON"`
}

type Manager

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

func NewManager

func NewManager(chainEndpoint, contractAddress, projectFileDir, ipfsEndpoint 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

func (*Manager) GetNotify added in v0.6.1

func (m *Manager) GetNotify() <-chan uint64

func (*Manager) Set added in v0.5.5

func (m *Manager) Set(projectID uint64, version string, c *Config)

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 EthereumConfig `json:"ethereum,omitempty"`
	Solana   SolanaConfig   `json:"solana,omitempty"`
	Textile  TextileConfig  `json:"textile,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(ipfsEndpoint string) ([]*Config, error)

type SolanaConfig added in v0.6.2

type SolanaConfig struct {
	ChainEndpoint  string `json:"chainEndpoint"`
	ProgramID      string `json:"programID"`
	StateAccountPK string `json:"stateAccountPK"`
}

type TextileConfig added in v0.6.5

type TextileConfig struct {
	VaultID string `json:"vaultID"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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