networkcmd

package
v1.22.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: BSD-3-Clause Imports: 33 Imported by: 0

Documentation

Overview

Package networkcmd provides commands for managing local network operations.

Index

Constants

View Source
const (
	// MainnetSubnetBlockchainID is the known blockchain ID for the mainnet subnet
	MainnetSubnetBlockchainID = "2G8mK7VCZX1dV8iPjkkTDMpYGZDCNLLVdTJVLmMsG5ZV7zKVmB"
)

Known blockchain IDs

Variables

This section is empty.

Functions

func AddStateFlags added in v1.9.7

func AddStateFlags(cmd *cobra.Command)

AddStateFlags adds the state-related flags to the command

func GetProxyOwnerPrivateKey added in v1.9.5

func GetProxyOwnerPrivateKey(
	app *application.Lux,
	network models.Network,
	proxyContractOwner string,
	printFunc func(msg string, args ...interface{}),
) (string, error)

GetProxyOwnerPrivateKey retrieves the private key for a proxy contract owner. If not found in managed keys, prompts the user.

func LoadExistingSubnetState added in v1.9.7

func LoadExistingSubnetState(networkDir string) error

LoadExistingSubnetState loads an existing subnet database into the network

func NewCmd

func NewCmd(injectedApp *application.Lux) *cobra.Command

NewCmd creates the network command for managing local network runtime.

func PromptNodeID added in v1.9.5

func PromptNodeID(goal string) (ids.NodeID, error)

PromptNodeID prompts the user to enter a node ID for the specified goal.

func Start

func Start(_ StartFlags, _ bool) error

Start starts the local network with the given flags.

func StartDevMode added in v1.22.6

func StartDevMode() error

StartDevMode starts a single-node development network with K=1 consensus This runs luxd directly (not through netrunner) for maximum simplicity luxd's built-in --dev flag enables: single-node consensus, no sybil protection, instant blocks

func StartDevnet added in v1.22.6

func StartDevnet() error

StartDevnet starts a devnet network with configurable validator nodes

func StartMainnet

func StartMainnet() error

StartMainnet starts a mainnet network with configurable validator nodes

func StartNetwork

func StartNetwork(*cobra.Command, []string) error

StartNetwork starts the local network.

func StartTestnet

func StartTestnet() error

StartTestnet starts a testnet network with configurable validator nodes

func StopNetwork

func StopNetwork(*cobra.Command, []string) error

StopNetwork stops the local network.

Types

type StartFlags

type StartFlags struct {
	UserProvidedLuxdVersion string
	LuxdBinaryPath          string
	NumNodes                uint32
}

StartFlags contains configuration for starting a network

Jump to

Keyboard shortcuts

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