Lux SDKGoPackages

application

Package application provides application context and configuration management.

import "github.com/luxfi/sdk/application"

Package application provides application context and configuration management.

Types

Downloader

Downloader is a generic interface for performing highly testable downloads. All methods here involve external http requests. To write tests using these functions, provide a mocked version of this interface to your application object.

func NewDownloader() Downloader

LastActions

Lux

func New() *Lux
func (app *Lux) AddDefaultBlockchainRPCsToSidecar(
	blockchainName string,
	network models.Network,
	nodeURIs []string,
) (bool, error)
func (app *Lux) BlockchainConfigExists(blockchainName string) bool
func (app *Lux) CaptureYesNo(prompt string) (bool, error)
func (app *Lux) ChainConfigExists(chainName string) bool
func (app *Lux) ChainConfigFileExists(chainName string) bool
func (app *Lux) ClustersConfigExists() bool
func (app *Lux) ConfigFileExists() bool
func (app *Lux) CopyGenesisFile(inputFilename string, chainName string) error
func (app *Lux) CopyKeyFile(inputFilename string, keyName string) error
func (app *Lux) CopyVMBinary(inputFilename string, chainName string) error
func (app *Lux) CreateElasticChainConfig(chainName string, es *models.ElasticChainConfig) error
func (app *Lux) CreateSidecar(sc *models.Sidecar) error
func (app *Lux) GenesisExists(chainName string) bool
func (app *Lux) GetAnsibleInventoryDirPath(clusterName string) string
func (app *Lux) GetBaseDir() string
func (app *Lux) GetBasePath() string
func (app *Lux) GetBlockchainNamesOnNetwork(network models.Network, onlySOV bool) ([]string, error)
func (app *Lux) GetChainConfigDir() string
func (app *Lux) GetChainConfigPath(chainName string) string
func (app *Lux) GetChainDir() string
func (app *Lux) GetChainsDir() string
func (app *Lux) GetClusterConfig(clusterName string) (map[string]interface{}, error)
func (app *Lux) GetClusterNetwork(clusterName string) (models.Network, error)
func (app *Lux) GetConfigPath() string
func (app *Lux) GetCurrentPluginsDir() string
func (app *Lux) GetCustomVMDir() string
func (app *Lux) GetCustomVMPath(chainName string) string
func (app *Lux) GetDevDir() string
func (app *Lux) GetDownloader() Downloader
func (app *Lux) GetEVMBinDir() string
func (app *Lux) GetElasticChainConfigPath(chainName string) string
func (app *Lux) GetGenesisPath(chainName string) string
func (app *Lux) GetKey(keyName string) (string, error)
func (app *Lux) GetKeyDir() string
func (app *Lux) GetKeyPath(keyName string) string
func (app *Lux) GetLPMBaseDir() string
func (app *Lux) GetLPMLog() string
func (app *Lux) GetLPMPluginDir() string
func (app *Lux) GetLPMVMPath(vmid string) string
func (app *Lux) GetLocalClusterDir(clusterName string) string
func (app *Lux) GetLocalClustersDir() string
func (app *Lux) GetLocalRelayerConfigPath() string
func (app *Lux) GetLocalRelayerLogPath(network models.Network) string
func (app *Lux) GetLocalRelayerRunPath(network models.Network) string
func (app *Lux) GetLocalRelayerStorageDir(network models.Network) string
func (app *Lux) GetLogDir() string
func (app *Lux) GetLuxBinDir() string
func (*Lux) GetLuxCompatibilityURL() string
func (app *Lux) GetLuxdChainConfigPath(chainName string) string
func (app *Lux) GetLuxdNodeConfigPath(chainName string) string
func (app *Lux) GetLuxgoBinDir() string
func (app *Lux) GetMonitoringInventoryDir(clusterName string) string
func (app *Lux) GetNetDir() string
func (app *Lux) GetNetworkFromSidecarNetworkName(name string) (models.Network, error)
func (app *Lux) GetNetworkPluginsDir(networkType string) string
func (app *Lux) GetNodesDir() string
func (app *Lux) GetPerNodeBlockchainConfig(chainName string) map[string]interface{}
func (app *Lux) GetPluginsDir() string
func (app *Lux) GetReposDir() string
func (app *Lux) GetRunDir() string
func (app *Lux) GetRunFile() string
func (app *Lux) GetSidecarNames() ([]string, error)
func (app *Lux) GetSidecarPath(chainName string) string
func (app *Lux) GetSnapshotPath(snapshotName string) string
func (app *Lux) GetSnapshotsDir() string
func (*Lux) GetTmpPluginDir() string
func (app *Lux) GetTokenName(chainName string) string
func (app *Lux) GetUpgradeBytesFilePath(chainName string) string
func (app *Lux) GetUpgradeBytesFilepath(chainName string) string
func (app *Lux) GetVersion() string
func (app *Lux) IsLocalNetworkRunning() bool
func (app *Lux) IsPathProtected(path string) bool
func (app *Lux) KeyExists(keyName string) bool
func (app *Lux) ListClusterNames() ([]string, error)
func (app *Lux) LoadClusterNodeConfig(clusterName string, nodeID string) (map[string]interface{}, error)
func (app *Lux) LoadClustersConfig() (map[string]interface{}, error)
func (app *Lux) LoadConfig() (types.Config, error)
func (app *Lux) LoadElasticChainConfig(chainName string) (models.ElasticChainConfig, error)
func (app *Lux) LoadEvmGenesis(chainName string) (core.Genesis, error)
func (app *Lux) LoadRawChainConfig(chainName string) ([]byte, error)
func (app *Lux) LoadRawGenesis(chainName string) ([]byte, error)
func (app *Lux) LoadRawLuxdChainConfig(chainName string) ([]byte, error)
func (app *Lux) LoadRawNetworkUpgrades(chainName string) ([]byte, error)
func (app *Lux) LoadSidecar(chainName string) (models.Sidecar, error)
func (app *Lux) LuxdChainConfigExists(chainName string) bool
func (app *Lux) LuxdNodeConfigExists(chainName string) bool
func (app *Lux) NetworkUpgradeExists(chainName string) bool
func (app *Lux) ProtectedDirectories() []string
func (app *Lux) ReadLastActionsFile() (*LastActions, error)
func (app *Lux) ReadLockUpgradeFile(chainName string) ([]byte, error)
func (app *Lux) ReadUpgradeFile(chainName string) ([]byte, error)
func (app *Lux) ResetPluginsDir() error
func (app *Lux) SafeRemoveAll(path string) error
func (app *Lux) Setup(baseDir string, log luxlog.Logger, conf *config.Config, prompt Prompter, downloader Downloader)
func (app *Lux) SidecarExists(chainName string) bool
func (app *Lux) UpdateSidecar(sc *models.Sidecar) error
func (app *Lux) UpdateSidecarElasticChain(
	sc *models.Sidecar,
	network models.Network,
	chainID ids.ID,
	assetID ids.ID,
	pchainTXID ids.ID,
	tokenName string,
	tokenSymbol string,
) error
func (app *Lux) UpdateSidecarElasticChainPartialTx(
	sc *models.Sidecar,
	network models.Network,
	txName string,
	txID ids.ID,
) error
func (app *Lux) UpdateSidecarNetworks(
	sc *models.Sidecar,
	network models.Network,
	chainID ids.ID,
	blockchainID ids.ID,
) error
func (app *Lux) UpdateSidecarPermissionlessValidator(
	sc *models.Sidecar,
	network models.Network,
	nodeID string,
	txID ids.ID,
) error
func (app *Lux) WriteConfigFile(data []byte) error
func (app *Lux) WriteGenesisFile(chainName string, genesisBytes []byte) error
func (app *Lux) WriteLastActionsFile(acts *LastActions)
func (app *Lux) WriteLockUpgradeFile(chainName string, bytes []byte) error
func (app *Lux) WriteSidecarFile(sc *models.Sidecar) error
func (app *Lux) WriteUpgradeFile(chainName string, bytes []byte) error

Prompter

Prompter is an alias for the prompts.Prompter interface