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() DownloaderLastActions
Lux
func New() *Luxfunc (app *Lux) AddDefaultBlockchainRPCsToSidecar(
blockchainName string,
network models.Network,
nodeURIs []string,
) (bool, error)func (app *Lux) BlockchainConfigExists(blockchainName string) boolfunc (app *Lux) CaptureYesNo(prompt string) (bool, error)func (app *Lux) ChainConfigExists(chainName string) boolfunc (app *Lux) ChainConfigFileExists(chainName string) boolfunc (app *Lux) ClustersConfigExists() boolfunc (app *Lux) ConfigFileExists() boolfunc (app *Lux) CopyGenesisFile(inputFilename string, chainName string) errorfunc (app *Lux) CopyKeyFile(inputFilename string, keyName string) errorfunc (app *Lux) CopyVMBinary(inputFilename string, chainName string) errorfunc (app *Lux) CreateElasticChainConfig(chainName string, es *models.ElasticChainConfig) errorfunc (app *Lux) CreateSidecar(sc *models.Sidecar) errorfunc (app *Lux) GenesisExists(chainName string) boolfunc (app *Lux) GetAnsibleInventoryDirPath(clusterName string) stringfunc (app *Lux) GetBaseDir() stringfunc (app *Lux) GetBasePath() stringfunc (app *Lux) GetBlockchainNamesOnNetwork(network models.Network, onlySOV bool) ([]string, error)func (app *Lux) GetChainConfigDir() stringfunc (app *Lux) GetChainConfigPath(chainName string) stringfunc (app *Lux) GetChainDir() stringfunc (app *Lux) GetChainsDir() stringfunc (app *Lux) GetClusterConfig(clusterName string) (map[string]interface{}, error)func (app *Lux) GetClusterNetwork(clusterName string) (models.Network, error)func (app *Lux) GetConfigPath() stringfunc (app *Lux) GetCurrentPluginsDir() stringfunc (app *Lux) GetCustomVMDir() stringfunc (app *Lux) GetCustomVMPath(chainName string) stringfunc (app *Lux) GetDevDir() stringfunc (app *Lux) GetDownloader() Downloaderfunc (app *Lux) GetEVMBinDir() stringfunc (app *Lux) GetElasticChainConfigPath(chainName string) stringfunc (app *Lux) GetGenesisPath(chainName string) stringfunc (app *Lux) GetKey(keyName string) (string, error)func (app *Lux) GetKeyDir() stringfunc (app *Lux) GetKeyPath(keyName string) stringfunc (app *Lux) GetLPMBaseDir() stringfunc (app *Lux) GetLPMLog() stringfunc (app *Lux) GetLPMPluginDir() stringfunc (app *Lux) GetLPMVMPath(vmid string) stringfunc (app *Lux) GetLocalClusterDir(clusterName string) stringfunc (app *Lux) GetLocalClustersDir() stringfunc (app *Lux) GetLocalRelayerConfigPath() stringfunc (app *Lux) GetLocalRelayerLogPath(network models.Network) stringfunc (app *Lux) GetLocalRelayerRunPath(network models.Network) stringfunc (app *Lux) GetLocalRelayerStorageDir(network models.Network) stringfunc (app *Lux) GetLogDir() stringfunc (app *Lux) GetLuxBinDir() stringfunc (*Lux) GetLuxCompatibilityURL() stringfunc (app *Lux) GetLuxdChainConfigPath(chainName string) stringfunc (app *Lux) GetLuxdNodeConfigPath(chainName string) stringfunc (app *Lux) GetLuxgoBinDir() stringfunc (app *Lux) GetMonitoringInventoryDir(clusterName string) stringfunc (app *Lux) GetNetDir() stringfunc (app *Lux) GetNetworkFromSidecarNetworkName(name string) (models.Network, error)func (app *Lux) GetNetworkPluginsDir(networkType string) stringfunc (app *Lux) GetNodesDir() stringfunc (app *Lux) GetPerNodeBlockchainConfig(chainName string) map[string]interface{}func (app *Lux) GetPluginsDir() stringfunc (app *Lux) GetReposDir() stringfunc (app *Lux) GetRunDir() stringfunc (app *Lux) GetRunFile() stringfunc (app *Lux) GetSidecarNames() ([]string, error)func (app *Lux) GetSidecarPath(chainName string) stringfunc (app *Lux) GetSnapshotPath(snapshotName string) stringfunc (app *Lux) GetSnapshotsDir() stringfunc (*Lux) GetTmpPluginDir() stringfunc (app *Lux) GetTokenName(chainName string) stringfunc (app *Lux) GetUpgradeBytesFilePath(chainName string) stringfunc (app *Lux) GetUpgradeBytesFilepath(chainName string) stringfunc (app *Lux) GetVersion() stringfunc (app *Lux) IsLocalNetworkRunning() boolfunc (app *Lux) IsPathProtected(path string) boolfunc (app *Lux) KeyExists(keyName string) boolfunc (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) boolfunc (app *Lux) LuxdNodeConfigExists(chainName string) boolfunc (app *Lux) NetworkUpgradeExists(chainName string) boolfunc (app *Lux) ProtectedDirectories() []stringfunc (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() errorfunc (app *Lux) SafeRemoveAll(path string) errorfunc (app *Lux) Setup(baseDir string, log luxlog.Logger, conf *config.Config, prompt Prompter, downloader Downloader)func (app *Lux) SidecarExists(chainName string) boolfunc (app *Lux) UpdateSidecar(sc *models.Sidecar) errorfunc (app *Lux) UpdateSidecarElasticChain(
sc *models.Sidecar,
network models.Network,
chainID ids.ID,
assetID ids.ID,
pchainTXID ids.ID,
tokenName string,
tokenSymbol string,
) errorfunc (app *Lux) UpdateSidecarElasticChainPartialTx(
sc *models.Sidecar,
network models.Network,
txName string,
txID ids.ID,
) errorfunc (app *Lux) UpdateSidecarNetworks(
sc *models.Sidecar,
network models.Network,
chainID ids.ID,
blockchainID ids.ID,
) errorfunc (app *Lux) UpdateSidecarPermissionlessValidator(
sc *models.Sidecar,
network models.Network,
nodeID string,
txID ids.ID,
) errorfunc (app *Lux) WriteConfigFile(data []byte) errorfunc (app *Lux) WriteGenesisFile(chainName string, genesisBytes []byte) errorfunc (app *Lux) WriteLastActionsFile(acts *LastActions)func (app *Lux) WriteLockUpgradeFile(chainName string, bytes []byte) errorfunc (app *Lux) WriteSidecarFile(sc *models.Sidecar) errorfunc (app *Lux) WriteUpgradeFile(chainName string, bytes []byte) errorPrompter
Prompter is an alias for the prompts.Prompter interface