Versions in this module Expand all Collapse all v1 v1.11.13-rc.2 Dec 4, 2024 v1.0.0 Dec 4, 2024 Changes in this version + const AvalancheGoPathEnvName + const DefaultMinStakeDuration + const DefaultNetworkTimeout + const DefaultNodeCount + const DefaultNodeTickerInterval + const DefaultPollingInterval + const DefaultPreFundedKeyCount + const DefaultValidatorStartTimeDiff + const HardHatKeyStr + const NetworkDirEnvName + const RootDirEnvName + var ErrNotRunning = errors.New("not running") + var HardhatKey *secp256k1.PrivateKey + func DefaultChainConfigs() map[string]FlagsMap + func DefaultJSONMarshal(v interface{}) ([]byte, error) + func NewPrivateKeys(keyCount int) ([]*secp256k1.PrivateKey, error) + func NewTestGenesis(networkID uint32, nodes []*Node, keysToFund []*secp256k1.PrivateKey) (*genesis.UnparsedConfig, error) + func RestartNetwork(ctx context.Context, w io.Writer, dir string) error + func StartNewNetwork(ctx context.Context, w io.Writer, network *Network, rootNetworkDir string, ...) error + func StopNetwork(ctx context.Context, dir string) error + func WaitForHealthy(ctx context.Context, node *Node) error + type Chain struct + ChainID ids.ID + Config string + Genesis []byte + PreFundedKey *secp256k1.PrivateKey + VMID ids.ID + func (c *Chain) WriteConfig(chainDir string) error + type FlagsMap map[string]interface + func (f FlagsMap) GetStringVal(key string) (string, error) + func (f FlagsMap) SetDefaults(defaults FlagsMap) + func (f FlagsMap) Write(path string, description string) error + func DefaultFlags() FlagsMap + func ReadFlagsMap(path string, description string) (*FlagsMap, error) + type Network struct + ChainConfigs map[string]FlagsMap + DefaultFlags FlagsMap + DefaultRuntimeConfig NodeRuntimeConfig + Dir string + Genesis *genesis.UnparsedConfig + Nodes []*Node + Owner string + PreFundedKeys []*secp256k1.PrivateKey + Subnets []*Subnet + UUID string + func ReadNetwork(dir string) (*Network, error) + func (n *Network) AddEphemeralNode(ctx context.Context, w io.Writer, flags FlagsMap) (*Node, error) + func (n *Network) Create(rootDir string) error + func (n *Network) CreateSubnets(ctx context.Context, w io.Writer) error + func (n *Network) EnsureDefaultConfig(w io.Writer, avalancheGoPath string, pluginDir string, nodeCount int) error + func (n *Network) EnsureNodeConfig(node *Node) error + func (n *Network) EnvFileContents() string + func (n *Network) EnvFilePath() string + func (n *Network) GetNodeURIs() []NodeURI + func (n *Network) GetSubnet(name string) *Subnet + func (n *Network) GetURIForNodeID(nodeID ids.NodeID) (string, error) + func (n *Network) Read() error + func (n *Network) Restart(ctx context.Context, w io.Writer) error + func (n *Network) Start(ctx context.Context, w io.Writer) error + func (n *Network) StartNode(ctx context.Context, w io.Writer, node *Node) error + func (n *Network) Stop(ctx context.Context) error + func (n *Network) WaitForHealthy(ctx context.Context, w io.Writer) error + func (n *Network) Write() error + type Node struct + Flags FlagsMap + IsEphemeral bool + NetworkOwner string + NetworkUUID string + NodeID ids.NodeID + RuntimeConfig *NodeRuntimeConfig + StakingAddress string + URI string + func NewNode(dataDir string) *Node + func NewNodes(count int) []*Node + func ReadNode(dataDir string) (*Node, error) + func ReadNodes(networkDir string, includeEphemeral bool) ([]*Node, error) + func (n *Node) EnsureBLSSigningKey() error + func (n *Node) EnsureKeys() error + func (n *Node) EnsureNodeID() error + func (n *Node) EnsureStakingKeypair() error + func (n *Node) GetProofOfPossession() (*signer.ProofOfPossession, error) + func (n *Node) InitiateStop(ctx context.Context) error + func (n *Node) IsHealthy(ctx context.Context) (bool, error) + func (n *Node) Read() error + func (n *Node) SaveAPIPort() error + func (n *Node) SaveMetricsSnapshot(ctx context.Context) error + func (n *Node) SetNetworkingConfig(bootstrapIDs []string, bootstrapIPs []string) + func (n *Node) Start(w io.Writer) error + func (n *Node) Stop(ctx context.Context) error + func (n *Node) WaitForStopped(ctx context.Context) error + func (n *Node) Write() error + type NodeProcess struct + func (p *NodeProcess) InitiateStop() error + func (p *NodeProcess) IsHealthy(ctx context.Context) (bool, error) + func (p *NodeProcess) Start(w io.Writer) error + func (p *NodeProcess) WaitForStopped(ctx context.Context) error + type NodeRuntime interface + InitiateStop func() error + IsHealthy func(ctx context.Context) (bool, error) + Start func(w io.Writer) error + WaitForStopped func(ctx context.Context) error + type NodeRuntimeConfig struct + AvalancheGoPath string + type NodeURI struct + NodeID ids.NodeID + URI string + func GetNodeURIs(nodes []*Node) []NodeURI + type Subnet struct + Chains []*Chain + Name string + OwningKey *secp256k1.PrivateKey + SubnetID ids.ID + ValidatorIDs []ids.NodeID + func (s *Subnet) AddValidators(ctx context.Context, w io.Writer, nodes []*Node) error + func (s *Subnet) Create(ctx context.Context, uri string) error + func (s *Subnet) CreateChains(ctx context.Context, w io.Writer, uri string) error + func (s *Subnet) GetWallet(ctx context.Context, uri string) (primary.Wallet, error) + func (s *Subnet) HasChainConfig() bool + func (s *Subnet) Write(subnetDir string, chainDir string) error + type XChainBalanceMap map[ids.ShortID]uint64