models
Package models provides data structures and types used throughout the SDK.
import "github.com/luxfi/sdk/models"Package models provides data structures and types used throughout the SDK.
Copyright (C) 2022, Lux Partners Limited All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Lux Partners Limited All rights reserved. See the file LICENSE for licensing terms.
Functions
GetRPCEndpoint
func GetRPCEndpoint(baseEndpoint string, blockchainID string) stringGetRPCEndpoint returns the RPC endpoint for a given base endpoint and blockchain ID
GetWSEndpoint
func GetWSEndpoint(baseEndpoint string, blockchainID string) stringGetWSEndpoint returns the WebSocket endpoint for a given base endpoint and blockchain ID
HostAnsibleIDToCloudID
func HostAnsibleIDToCloudID(hostAnsibleID string) (string, string, error)HostAnsibleIDToCloudID converts a host Ansible ID to a cloud ID.
HostCloudIDToAnsibleID
func HostCloudIDToAnsibleID(cloudService string, hostCloudID string) (string, error)NewHostConnection
func NewHostConnection(h *Host, port uint) (*goph.Client, error)Types
BaseMigration
BaseMigration represents a base chain migration
BridgeRoute
BridgeRoute represents a cross-chain route
CLIDependencyMap
CLIDependencyMap represents CLI dependency versions
ChainValidator
ChainValidator is a backward compatibility alias for Validator.
CloudConfig
func (ccm *CloudConfig) GetAPIInstanceIDsForRegion(region string) []stringfunc (ccm *CloudConfig) GetAllAPIInstanceIDs() []stringfunc (ccm *CloudConfig) GetAllInstanceIDs() []stringfunc (ccm *CloudConfig) GetInstanceIDsForRegion(region string) []stringfunc (ccm *CloudConfig) GetRegions() []stringClusterConfig
func (cc *ClusterConfig) GetAPIHosts(hosts []*Host) []*Hostfunc (cc *ClusterConfig) GetCloudIDs() []stringfunc (cc *ClusterConfig) GetHostRoles(nodeConf NodeConfig) []stringfunc (cc *ClusterConfig) GetValidatorHosts(hosts []*Host) []*Hostfunc (cc *ClusterConfig) IsAPIHost(hostCloudID string) boolfunc (cc *ClusterConfig) IsLuxdHost(hostCloudID string) boolClustersConfig
ClustersConfigV0
ElasticChain
ElasticChainConfig
ElasticNet
ElasticNet is an alias for ElasticChain (deprecated)
ElasticNetConfig
ElasticNetConfig is an alias for backward compatibility (deprecated)
ExportCluster
ExportNode
Exportable
ExtraNetworkData
GCPConfig
GenesisParams
GenesisParams represents network genesis parameters
GovernanceProposal
GovernanceProposal for base migrations and upgrades
Host
func (h *Host) Command(script string, env []string, timeout time.Duration) ([]byte, error)func (h *Host) Connect(port uint) errorfunc (h *Host) Connected() boolfunc (h *Host) CreateTempDir() (string, error)func (h *Host) CreateTempFile() (string, error)func (h *Host) Disconnect() errorfunc (h *Host) Download(remoteFile string, localFile string, timeout time.Duration) errorfunc (h *Host) ExpandHome(path string) stringfunc (h *Host) FileExists(path string) (bool, error)func (h *Host) Forward(httpRequest string, timeout time.Duration) ([]byte, error)func (h *Host) GetAnsibleInventoryRecord() stringfunc (h *Host) GetCloudID() stringfunc (h *Host) IsSystemD() boolfunc (h *Host) MkdirAll(remoteDir string, timeout time.Duration) errorfunc (h *Host) ReadFileBytes(remoteFile string, timeout time.Duration) ([]byte, error)func (h *Host) Remove(path string, recursive bool) errorfunc (h *Host) StreamSSHCommand(command string, env []string, timeout time.Duration) errorfunc (h *Host) UntimedForward(httpRequest string) ([]byte, error)func (h *Host) UntimedMkdirAll(remoteDir string) errorfunc (h *Host) Upload(localFile string, remoteFile string, timeout time.Duration) errorfunc (h *Host) UploadBytes(data []byte, remoteFile string, timeout time.Duration) errorfunc (h *Host) WaitForPort(port uint, timeout time.Duration) errorfunc (h *Host) WaitForSSHShell(timeout time.Duration) errorL2Config
L2Config represents a based rollup configuration
L3Config
L3Config for nested rollups
LuxCompatiblity
LuxdCompatiblity
LuxdCompatiblity is an alias for backward compatibility
MigrationTx
MigrationTx represents a chain to L1 migration transaction
MultisigTxInfo
Network
func ConvertClusterToNetwork(network Network) Networkfunc GetNetworkFromSidecarNetworkName(name string) Networkfunc NetworkFromNetworkID(networkID uint32) Networkfunc NetworkFromString(s string) Networkfunc NewDevnetNetwork() Networkfunc NewLocalNetwork() Networkfunc NewMainnetNetwork() Networkfunc NewNetworkFromCluster(network Network, clusterName string) Networkfunc NewTestnetNetwork() Networkfunc (s Network) BlockchainEndpoint(blockchainID string) stringfunc (s Network) BootstrappingContext() (context.Context, func())func (s Network) CChainEndpoint() stringfunc (s Network) CChainWSEndpoint() stringfunc (s Network) ClusterName() stringfunc (s Network) Endpoint() stringfunc (s Network) Equals(other Network) boolfunc (s Network) GenesisParams() *GenesisParamsfunc (s Network) HandlePublicNetworkSimulation() boolfunc (s Network) ID() uint32func (s Network) Kind() Networkfunc (s Network) Name() stringfunc (s Network) NetworkID() (uint32, error)func (s Network) NetworkIDFlagValue() stringfunc (s Network) SDKNetwork() interface{}func (s Network) String() stringfunc (s Network) WSEndpoints() []stringNetworkData
NetworkVersions
NetworkVersions represents versions for a network
NodeConfig
NodeResult
NodeResults
func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error)func (nr *NodeResults) GetErrorHostMap() map[string]errorfunc (nr *NodeResults) GetErrorHosts() []stringfunc (nr *NodeResults) GetNodeList() []stringfunc (nr *NodeResults) GetResultMap() map[string]interface{}func (nr *NodeResults) GetResults() []NodeResultfunc (nr *NodeResults) HasErrors() boolfunc (nr *NodeResults) HasIDWithError(id string) boolfunc (nr *NodeResults) Len() intPermissionlessValidators
PreconfirmConfig
PreconfirmConfig represents pre-confirmation settings
RegionConfig
Sidecar
func (sc Sidecar) GetVMID() (string, error)func (sc *Sidecar) NetworkDataIsEmpty() boolTokenInfo
VMCompatibility
VMType
func VMTypeFromString(s string) VMTypefunc (v VMType) Org() stringfunc (v VMType) RepoName() stringValidator
Validator represents a validator on any network layer (primary, L1, L2, L3) As above, so below - validators are unified across all network layers