Documentation ¶
Index ¶
- type Genesis
- func (g *Genesis) FundCChainAddresses(addrs []common.Address, amount uint64)
- func (g *Genesis) FundXChainAddresses(addresses []string, amount uint64) *Genesis
- func (g *Genesis) ImportGenesisFunds() error
- func (g *Genesis) MoveBalanceToCChain(addr common.Address, txFee uint64)
- func (g *Genesis) MultipleFundXChainAddresses(addresses []string, amount uint64, times int) *Genesis
- func (g *Genesis) MultipleFundXChainAddresses2(addresses []string, amount uint64, times int) *Genesis
- type Node
- func (n *Node) BecomeDelegator(genesisAmount uint64, seedAmount uint64, delegatorAmount uint64, txFee uint64, ...) *Node
- func (n *Node) BecomeValidator(genesisAmount uint64, seedAmount uint64, stakeAmount uint64, txFee uint64) *Node
- func (n *Node) CreateAddress() *Node
- func (n *Node) GetClient() *avalanchegoclient.Client
- func (n *Node) GetIPAddress() string
- type Topology
- func (s *Topology) AddGenesis(nodeID string, username string, password string) *Topology
- func (s *Topology) AddNode(id string, username string, password string) *Topology
- func (s *Topology) Genesis() *Genesis
- func (s *Topology) GetAllNodes() []*Node
- func (s *Topology) LoadDefinedNetwork(definedNetwork *networkbuilder.Network) *Topology
- func (s *Topology) Node(nodeID string) *Node
- func (s *Topology) RemoveNode(id string) *Topology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Genesis ¶
type Genesis struct { Address string // contains filtered or unexported fields }
Genesis is a single attribute of the Topology (only one Genesis) that holds the Genesis data
func (*Genesis) FundCChainAddresses ¶
func (*Genesis) FundXChainAddresses ¶
FundXChainAddresses funds the genesis funds into an address on the XChain
func (*Genesis) ImportGenesisFunds ¶
ImportGenesisFunds fetches the default funded funds and imports them
func (*Genesis) MoveBalanceToCChain ¶
func (*Genesis) MultipleFundXChainAddresses ¶
type Node ¶
type Node struct { UserPass api.UserPass PAddress string XAddress string NodeID string // contains filtered or unexported fields }
Node defines the Node in the Topology
func (*Node) BecomeDelegator ¶
func (n *Node) BecomeDelegator(genesisAmount uint64, seedAmount uint64, delegatorAmount uint64, txFee uint64, stakerNodeID string) *Node
BecomeDelegator is a multi step methods that does the following - exports AVAX from the XChain + waits for acceptance in the XChain - imports the amount to the PChain + waits for acceptance in the PChain - verifies the PChain balance + verifies the XChain balance - adds nodeID as a delegator - waits Tx acceptance in the PChain - waits until the validation period begins
func (*Node) BecomeValidator ¶
func (n *Node) BecomeValidator(genesisAmount uint64, seedAmount uint64, stakeAmount uint64, txFee uint64) *Node
BecomeValidator is a multi step methods that does the following - exports AVAX from the XChain + waits for acceptance in the XChain - imports the amount to the PChain + waits for acceptance in the PChain - verifies the PChain balance + verifies the XChain balance - adds nodeID as a validator - waits Tx acceptance in the PChain - waits until the validation period begins
func (*Node) CreateAddress ¶
CreateAddress creates user and both XChain and PChain addresses for the Node
func (*Node) GetClient ¶
func (n *Node) GetClient() *avalanchegoclient.Client
GetClient returns the RPC API client to access the nodes VMS
func (*Node) GetIPAddress ¶
type Topology ¶
type Topology struct {
// contains filtered or unexported fields
}
Topology defines how the nodes behave/capabilities in the network
func (*Topology) AddGenesis ¶
AddGenesis creates the Genesis property in the Topology
func (*Topology) GetAllNodes ¶
func (*Topology) LoadDefinedNetwork ¶
func (s *Topology) LoadDefinedNetwork(definedNetwork *networkbuilder.Network) *Topology