Documentation
¶
Overview ¶
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Package models contains data structures and types used throughout the CLI.
Index ¶
- Constants
- func GetRPCEndpoint(baseEndpoint string, blockchainID string) string
- func GetWSEndpoint(baseEndpoint string, blockchainID string) string
- func HostAnsibleIDToCloudID(hostAnsibleID string) (string, string, error)
- func HostCloudIDToAnsibleID(cloudService string, hostCloudID string) (string, error)
- func NewHostConnection(h *Host, port uint) (*goph.Client, error)
- type BaseMigration
- type BridgeRoute
- type CloudConfig
- func (ccm *CloudConfig) GetAPIInstanceIDsForRegion(region string) []string
- func (ccm *CloudConfig) GetAllAPIInstanceIDs() []string
- func (ccm *CloudConfig) GetAllInstanceIDs() []string
- func (ccm *CloudConfig) GetInstanceIDsForRegion(region string) []string
- func (ccm *CloudConfig) GetRegions() []string
- type ClusterConfig
- func (cc *ClusterConfig) GetAPIHosts(hosts []*Host) []*Host
- func (cc *ClusterConfig) GetCloudIDs() []string
- func (cc *ClusterConfig) GetHostRoles(nodeConf NodeConfig) []string
- func (cc *ClusterConfig) GetValidatorHosts(hosts []*Host) []*Host
- func (cc *ClusterConfig) IsAPIHost(hostCloudID string) bool
- func (cc *ClusterConfig) IsLuxdHost(hostCloudID string) bool
- type ClustersConfig
- type ClustersConfigV0
- type ElasticChain
- type ElasticChainConfig
- type ExportCluster
- type ExportNode
- type Exportable
- type ExtraNetworkData
- type GCPConfig
- type GovernanceProposal
- type Host
- func (h *Host) Command(script string, env []string, timeout time.Duration) ([]byte, error)
- func (h *Host) Connect(port uint) error
- func (h *Host) Connected() bool
- func (h *Host) CreateTempDir() (string, error)
- func (h *Host) CreateTempFile() (string, error)
- func (h *Host) Disconnect() error
- func (h *Host) Download(remoteFile string, localFile string, timeout time.Duration) error
- func (h *Host) ExpandHome(path string) string
- func (h *Host) FileExists(path string) (bool, error)
- func (h *Host) Forward(httpRequest string, timeout time.Duration) ([]byte, error)
- func (h *Host) GetAnsibleInventoryRecord() string
- func (h *Host) GetCloudID() string
- func (h *Host) IsSystemD() bool
- func (h *Host) MkdirAll(remoteDir string, timeout time.Duration) error
- func (h *Host) ReadFileBytes(remoteFile string, timeout time.Duration) ([]byte, error)
- func (h *Host) Remove(path string, recursive bool) error
- func (h *Host) StreamSSHCommand(command string, env []string, timeout time.Duration) error
- func (h *Host) UntimedForward(httpRequest string) ([]byte, error)
- func (h *Host) UntimedMkdirAll(remoteDir string) error
- func (h *Host) Upload(localFile string, remoteFile string, timeout time.Duration) error
- func (h *Host) UploadBytes(data []byte, remoteFile string, timeout time.Duration) error
- func (h *Host) WaitForPort(port uint, timeout time.Duration) error
- func (h *Host) WaitForSSHShell(timeout time.Duration) error
- type L2Config
- type L3Config
- type MigrationTx
- type MultisigTxInfo
- type Network
- func (Network) BootstrappingContext() (context.Context, func())
- func (s Network) CChainEndpoint() string
- func (s Network) CChainWSEndpoint() string
- func (s Network) ClusterName() string
- func (s Network) Endpoint() string
- func (s Network) Equals(other Network) bool
- func (s Network) HandlePublicNetworkSimulation() bool
- func (s Network) ID() uint32
- func (s Network) Kind() Network
- func (s Network) Name() string
- func (s Network) NetworkID() (uint32, error)
- func (s Network) NetworkIDFlagValue() string
- func (s Network) SDKNetwork() interface{}
- func (s Network) String() string
- func (s Network) WSEndpoints() []string
- type NetworkData
- type NodeConfig
- type NodeResult
- type NodeResults
- func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error)
- func (nr *NodeResults) GetErrorHostMap() map[string]error
- func (nr *NodeResults) GetErrorHosts() []string
- func (nr *NodeResults) GetNodeList() []string
- func (nr *NodeResults) GetResultMap() map[string]interface{}
- func (nr *NodeResults) GetResults() []NodeResult
- func (nr *NodeResults) HasErrors() bool
- func (nr *NodeResults) HasIDWithError(id string) bool
- func (nr *NodeResults) Len() int
- type PermissionlessValidators
- type PreconfirmConfig
- type RegionConfig
- type Sidecar
- type SubnetValidator
- type TokenInfo
- type VMType
Constants ¶
const ( // EVM is the Ethereum Virtual Machine. EVM = "EVM" BlobVM = "Blob VM" TimestampVM = "Timestamp VM" QuantumVM = "Quantum VM" CustomVM = "Custom" )
VM type constants.
const UndefinedNetwork = Undefined
UndefinedNetwork is an alias for Undefined for compatibility.
Variables ¶
This section is empty.
Functions ¶
func GetRPCEndpoint ¶
GetRPCEndpoint returns the RPC endpoint for a given base endpoint and blockchain ID
func GetWSEndpoint ¶
GetWSEndpoint returns the WebSocket endpoint for a given base endpoint and blockchain ID
func HostAnsibleIDToCloudID ¶
HostAnsibleIDToCloudID converts a host Ansible ID to a cloud ID.
func HostCloudIDToAnsibleID ¶
HostCloudIDToAnsibleID converts a cloud instance ID to an Ansible inventory ID.
Types ¶
type BaseMigration ¶
type BaseMigration struct {
FromBase string `json:"fromBase"`
ToBase string `json:"toBase"`
ProposalID string `json:"proposalId"`
ExecutedAt int64 `json:"executedAt"`
HotSwap bool `json:"hotSwap"`
CheckpointBlock uint64 `json:"checkpointBlock"`
}
BaseMigration represents a base chain migration
type BridgeRoute ¶
type BridgeRoute struct {
From string `json:"from"`
To string `json:"to"`
Via string `json:"via"` // bridge provider
EstimatedTime int `json:"estimatedTime"` // seconds
EstimatedCost string `json:"estimatedCost"` // in native token
}
BridgeRoute represents a cross-chain route
type CloudConfig ¶
type CloudConfig map[string]RegionConfig
CloudConfig maps region names to their configurations.
func (*CloudConfig) GetAPIInstanceIDsForRegion ¶
func (ccm *CloudConfig) GetAPIInstanceIDsForRegion(region string) []string
GetAPIInstanceIDsForRegion returns API instance IDs for specific region
func (*CloudConfig) GetAllAPIInstanceIDs ¶
func (ccm *CloudConfig) GetAllAPIInstanceIDs() []string
GetAllAPIInstanceIDs returns all API instance IDs
func (*CloudConfig) GetAllInstanceIDs ¶
func (ccm *CloudConfig) GetAllInstanceIDs() []string
GetAllInstanceIDs returns all instance IDs
func (*CloudConfig) GetInstanceIDsForRegion ¶
func (ccm *CloudConfig) GetInstanceIDsForRegion(region string) []string
GetInstanceIDsForRegion returns instance IDs for specific region
func (*CloudConfig) GetRegions ¶
func (ccm *CloudConfig) GetRegions() []string
GetRegions returns a slice of strings representing the regions of the RegionConfig.
type ClusterConfig ¶
type ClusterConfig struct {
Nodes []string
APINodes []string
Network Network
MonitoringInstance string // instance ID of the separate monitoring instance (if any)
LoadTestInstance map[string]string // maps load test name to load test cloud instance ID of the separate load test instance (if any)
ExtraNetworkData ExtraNetworkData
Subnets []string
External bool
Local bool
HTTPAccess constants.HTTPAccess
}
ClusterConfig contains configuration for a deployment cluster.
func (*ClusterConfig) GetAPIHosts ¶
func (cc *ClusterConfig) GetAPIHosts(hosts []*Host) []*Host
GetAPIHosts returns a filtered list of API hosts from the given hosts.
func (*ClusterConfig) GetCloudIDs ¶
func (cc *ClusterConfig) GetCloudIDs() []string
GetCloudIDs returns all cloud instance IDs in the cluster.
func (*ClusterConfig) GetHostRoles ¶
func (cc *ClusterConfig) GetHostRoles(nodeConf NodeConfig) []string
GetHostRoles returns the roles assigned to a host based on its configuration.
func (*ClusterConfig) GetValidatorHosts ¶
func (cc *ClusterConfig) GetValidatorHosts(hosts []*Host) []*Host
GetValidatorHosts returns the validator hosts (non-API nodes) from the given hosts.
func (*ClusterConfig) IsAPIHost ¶
func (cc *ClusterConfig) IsAPIHost(hostCloudID string) bool
IsAPIHost returns true if the given cloud ID corresponds to an API host.
func (*ClusterConfig) IsLuxdHost ¶
func (cc *ClusterConfig) IsLuxdHost(hostCloudID string) bool
IsLuxdHost returns true if the given cloud ID corresponds to a Luxd host.
type ClustersConfig ¶
type ClustersConfig struct {
Version string
KeyPair map[string]string // maps key pair name to cert path
Clusters map[string]ClusterConfig // maps clusterName to nodeID list + network kind
GCPConfig GCPConfig // stores GCP project name and filepath to service account JSON key
}
ClustersConfig contains configuration for all deployment clusters.
type ClustersConfigV0 ¶
type ClustersConfigV0 struct {
KeyPair map[string]string // maps key pair name to cert path
Clusters map[string][]string // maps clusterName to nodeID list
GCPConfig GCPConfig // stores GCP project name and filepath to service account JSON key
}
ClustersConfigV0 is a legacy clusters configuration format for backwards compatibility.
type ElasticChain ¶ added in v1.21.41
type ElasticChain struct {
SubnetID ids.ID
AssetID ids.ID
PChainTXID ids.ID
TokenName string
TokenSymbol string
Validators map[string]PermissionlessValidators
Txs map[string]ids.ID
}
ElasticChain contains elastic subnet configuration.
type ElasticChainConfig ¶ added in v1.21.41
type ElasticChainConfig struct {
SubnetID ids.ID
AssetID ids.ID
InitialSupply uint64
MaxSupply uint64
MinConsumptionRate uint64
MaxConsumptionRate uint64
MinValidatorStake uint64
MaxValidatorStake uint64
MinStakeDuration time.Duration
MaxStakeDuration time.Duration
MinDelegationFee uint32
MinDelegatorStake uint64
MaxValidatorWeightFactor byte
UptimeRequirement uint32
}
ElasticChainConfig contains configuration for elastic subnet transformations.
type ExportCluster ¶
type ExportCluster struct {
ClusterConfig ClusterConfig `json:"clusterConfig"`
Nodes []ExportNode `json:"nodes"`
MonitorNode ExportNode `json:"monitorNode"`
LoadTestNodes []ExportNode `json:"loadTestNodes"`
}
ExportCluster represents an exportable cluster configuration.
type ExportNode ¶
type ExportNode struct {
NodeConfig NodeConfig `json:"nodeConfig"`
SignerKey string `json:"signerKey"`
StakerKey string `json:"stakerKey"`
StakerCrt string `json:"stakerCrt"`
}
ExportNode represents an exportable node configuration with keys.
type Exportable ¶
Exportable wraps sidecar and genesis data for export operations.
type ExtraNetworkData ¶
type ExtraNetworkData struct {
CChainTeleporterMessengerAddress string
CChainTeleporterRegistryAddress string
}
ExtraNetworkData contains additional network-specific data.
type GCPConfig ¶
type GCPConfig struct {
ProjectName string // name of GCP Project
ServiceAccFilePath string // location of GCP service account key file path
}
GCPConfig contains Google Cloud Platform configuration settings.
type GovernanceProposal ¶
type GovernanceProposal struct {
ID string `json:"id"`
Type string `json:"type"` // base-migration, upgrade, parameter
Title string `json:"title"`
Description string `json:"description"`
L2Name string `json:"l2Name"`
// For base migrations
CurrentBase string `json:"currentBase,omitempty"`
TargetBase string `json:"targetBase,omitempty"`
HotSwap bool `json:"hotSwap,omitempty"`
// Voting
CreatedAt int64 `json:"createdAt"`
VotingEnds int64 `json:"votingEnds"`
Executed bool `json:"executed"`
ExecutedAt int64 `json:"executedAt"`
}
GovernanceProposal for base migrations and upgrades
type Host ¶
type Host struct {
NodeID string
IP string
SSHUser string
SSHPrivateKeyPath string
SSHCommonArgs string
Connection *goph.Client
APINode bool
}
Host represents a remote host for SSH operations.
func (*Host) CreateTempDir ¶
CreateTempDir creates a temporary directory on the remote server.
func (*Host) CreateTempFile ¶
CreateTempFile creates a temporary file on the remote server.
func (*Host) Disconnect ¶
Disconnect closes the SSH connection to the host.
func (*Host) ExpandHome ¶
ExpandHome expands the ~ symbol to the home directory.
func (*Host) FileExists ¶
FileExists checks if a file exists on the remote server.
func (*Host) GetAnsibleInventoryRecord ¶
GetAnsibleInventoryRecord returns the Ansible inventory line for the host.
func (*Host) GetCloudID ¶
GetCloudID returns the node ID of the host.
func (*Host) ReadFileBytes ¶
ReadFileBytes downloads a file from the remote server to a byte array
func (*Host) StreamSSHCommand ¶
StreamSSHCommand streams the execution of an SSH command on the host.
func (*Host) UntimedForward ¶
UntimedForward forwards the TCP connection to a remote address. Does not support timeouts on the operation.
func (*Host) UntimedMkdirAll ¶
UntimedMkdirAll creates a folder on the remote server. Does not support timeouts on the operation.
func (*Host) UploadBytes ¶
UploadBytes uploads a byte array to a remote file on the host.
func (*Host) WaitForPort ¶
WaitForPort waits for the SSH port to become available on the host.
type L2Config ¶
type L2Config struct {
Name string `json:"name"`
BaseChain string `json:"baseChain"` // ethereum, lux, lux-l1, op-mainnet
RollupType string `json:"rollupType"` // optimistic, zk, hybrid
DataAvailability string `json:"dataAvailability"` // base, celestia, eigenda
IBCEnabled bool `json:"ibcEnabled"`
PreconfirmEnabled bool `json:"preconfirmEnabled"`
BasedRollup bool `json:"basedRollup"` // true for L1-sequenced
// Contracts
InboxContract string `json:"inboxContract"`
RollupContract string `json:"rollupContract"`
BridgeContract string `json:"bridgeContract"`
// Chain configuration
ChainID uint64 `json:"chainId"`
L1BlockTime int `json:"l1BlockTime"` // milliseconds
// Token info
TokenInfo TokenInfo `json:"tokenInfo"`
CongestionFeeShare int `json:"congestionFeeShare"` // percentage to rollup
// Bridge configuration
EnabledBridges []string `json:"enabledBridges"` // axelar, layerzero, wormhole, etc
IBCChannels []string `json:"ibcChannels"` // IBC channel IDs
// Deployment info
DeployedAt int64 `json:"deployedAt"`
LastMigration int64 `json:"lastMigration"`
}
L2Config represents a based rollup configuration
type L3Config ¶
type L3Config struct {
Name string `json:"name"`
L2Base string `json:"l2Base"` // which L2 is the base
// Inherits most properties from L2Config
L2Config
}
L3Config for nested rollups
type MigrationTx ¶
type MigrationTx struct {
SubnetID ids.ID `json:"subnetId"`
BlockchainID ids.ID `json:"blockchainId"`
ValidatorManagement string `json:"validatorManagement"`
RentalPlan string `json:"rentalPlan"`
Timestamp int64 `json:"timestamp"`
}
MigrationTx represents a subnet to L1 migration transaction
type MultisigTxInfo ¶
type MultisigTxInfo struct {
Threshold uint32 `json:"threshold"`
Addresses []string `json:"addresses"`
}
MultisigTxInfo contains multisig transaction information.
type Network ¶
type Network int64
Network represents a blockchain network type.
const ( // Undefined represents an undefined network. Undefined Network = iota Mainnet Testnet Local Devnet )
Network type constants.
func GetNetworkFromSidecarNetworkName ¶
GetNetworkFromSidecarNetworkName returns a network based on sidecar network name
func NetworkFromNetworkID ¶
NetworkFromNetworkID returns a Network from its numeric ID.
func NetworkFromString ¶
NetworkFromString returns a Network from its string representation.
func NewDevnetNetwork ¶
func NewDevnetNetwork() Network
NewDevnetNetwork creates a new Devnet network instance
func NewLocalNetwork ¶
func NewLocalNetwork() Network
NewLocalNetwork creates a new Local network instance
func NewMainnetNetwork ¶
func NewMainnetNetwork() Network
NewMainnetNetwork creates a new Mainnet network instance
func NewTestnetNetwork ¶
func NewTestnetNetwork() Network
NewTestnetNetwork creates a new Testnet network instance
func (Network) BootstrappingContext ¶
BootstrappingContext returns a context for bootstrapping operations
func (Network) CChainEndpoint ¶
CChainEndpoint returns the C-Chain endpoint for the network
func (Network) CChainWSEndpoint ¶
CChainWSEndpoint returns the C-Chain WebSocket endpoint for the network
func (Network) ClusterName ¶
ClusterName returns the cluster name for the network
func (Network) HandlePublicNetworkSimulation ¶
HandlePublicNetworkSimulation returns true if the network simulates a public network.
func (Network) NetworkIDFlagValue ¶
NetworkIDFlagValue returns the network ID as a string for CLI flags.
func (Network) SDKNetwork ¶
func (s Network) SDKNetwork() interface{}
SDKNetwork returns the network as an SDK network type This is for compatibility with the SDK package
func (Network) WSEndpoints ¶
WSEndpoints returns the WebSocket endpoints for the network
type NetworkData ¶
type NetworkData struct {
SubnetID ids.ID
BlockchainID ids.ID
RPCVersion int
RPCEndpoints []string // RPC endpoints for the network
WSEndpoints []string // WebSocket endpoints for the network
TeleporterRegistryAddress string // Teleporter registry address
TeleporterMessengerAddress string // Teleporter messenger address
ValidatorManagerAddress string // Validator manager contract address
BootstrapValidators []SubnetValidator // Bootstrap validators for the network
}
NetworkData contains deployment information for a network.
type NodeConfig ¶
type NodeConfig struct {
NodeID string // instance id on cloud server
Region string // region where cloud server instance is deployed
AMI string // image id for cloud server dependent on its os (e.g. ubuntu )and region deployed (e.g. us-east-1)
KeyPair string // key pair name used on cloud server
CertPath string // where the cert is stored in user's local machine ssh directory
SecurityGroup string // security group used on cloud server
ElasticIP string // public IP address of the cloud server
CloudService string // which cloud service node is hosted on (AWS / GCP)
UseStaticIP bool // node has a static IP association
IsMonitor bool // node has a monitoring dashboard
IsWarpRelayer bool // node has an Warp relayer service
IsLoadTest bool // node is used to host load test
}
NodeConfig contains cloud instance configuration for a node.
type NodeResult ¶
NodeResult contains the result of an operation on a single node.
type NodeResults ¶
type NodeResults struct {
Results []NodeResult
Lock sync.Mutex
}
NodeResults contains results from operations on multiple nodes.
func (*NodeResults) AddResult ¶
func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error)
AddResult adds a result for a node to the results collection.
func (*NodeResults) GetErrorHostMap ¶
func (nr *NodeResults) GetErrorHostMap() map[string]error
GetErrorHostMap returns a map from node ID to error for nodes with errors.
func (*NodeResults) GetErrorHosts ¶
func (nr *NodeResults) GetErrorHosts() []string
GetErrorHosts returns the list of node IDs with errors.
func (*NodeResults) GetNodeList ¶
func (nr *NodeResults) GetNodeList() []string
GetNodeList returns a list of all node IDs.
func (*NodeResults) GetResultMap ¶
func (nr *NodeResults) GetResultMap() map[string]interface{}
GetResultMap returns results as a map from node ID to value.
func (*NodeResults) GetResults ¶
func (nr *NodeResults) GetResults() []NodeResult
GetResults returns all node results.
func (*NodeResults) HasErrors ¶
func (nr *NodeResults) HasErrors() bool
HasErrors returns true if any node has an error.
func (*NodeResults) HasIDWithError ¶
func (nr *NodeResults) HasIDWithError(id string) bool
HasIDWithError returns true if the given node ID has an error.
type PermissionlessValidators ¶
PermissionlessValidators contains permissionless validator information.
type PreconfirmConfig ¶
type PreconfirmConfig struct {
Enabled bool `json:"enabled"`
Provider string `json:"provider"` // eigenlayer, builders, bonded
ConfirmationTime int `json:"confirmationTime"` // target ms
CommitteeSize int `json:"committeeSize"`
BondAmount string `json:"bondAmount"` // in LUX
}
PreconfirmConfig represents pre-confirmation settings
type RegionConfig ¶
type RegionConfig struct {
InstanceIDs []string
APIInstanceIDs []string
PublicIPs []string
KeyPair string
SecurityGroup string
CertFilePath string
ImageID string
Prefix string
CertName string
SecurityGroupName string
NumNodes int
InstanceType string
}
RegionConfig contains cloud infrastructure configuration for a specific region.
type Sidecar ¶
type Sidecar struct {
Name string
VM VMType
VMVersion string
RPCVersion int
Subnet string
SubnetID ids.ID
BlockchainID ids.ID
TokenName string
TokenSymbol string
ChainID string
Version string
Networks map[string]NetworkData
ElasticChain map[string]ElasticChain
ImportedFromLPM bool
ImportedVMID string
// Custom VM support
CustomVMRepoURL string
CustomVMBranch string
CustomVMBuildScript string
// L1/L2 Architecture (2025)
Sovereign bool `json:"sovereign"` // true for L1, false for L2/subnet
BaseChain string `json:"baseChain"` // For L2s: ethereum, lux-l1, lux, op-mainnet
BasedRollup bool `json:"basedRollup"` // true for L1-sequenced rollups
SequencerType string `json:"sequencerType"` // based, centralized, distributed
// Based Rollup Configuration
InboxContract string `json:"inboxContract"` // Contract on base chain
L1BlockTime int `json:"l1BlockTime"` // Base chain block time in ms
PreconfirmEnabled bool `json:"preconfirmEnabled"` // Fast confirmations
// Token & Economics
TokenInfo TokenInfo `json:"tokenInfo"`
RentalPlan string `json:"rentalPlan"` // For L1s: monthly, annual, perpetual
// Validator Management
ValidatorManagement string `json:"validatorManagement"` // proof-of-authority, proof-of-stake
// Migration info
MigratedAt int64 `json:"migratedAt"` // When subnet became L1
// Chain layer (1=L1, 2=L2, 3=L3)
ChainLayer int `json:"chainLayer"` // Default 2 for backward compat
}
Sidecar contains chain configuration metadata.
func (*Sidecar) NetworkDataIsEmpty ¶
NetworkDataIsEmpty checks if the sidecar has no network data
type SubnetValidator ¶
type SubnetValidator struct {
NodeID string `json:"NodeID"`
Weight uint64 `json:"Weight"`
Balance uint64 `json:"Balance"`
BLSPublicKey string `json:"BLSPublicKey"`
BLSProofOfPossession string `json:"BLSProofOfPossession"`
ChangeOwnerAddr string `json:"ChangeOwnerAddr"`
ValidationID string `json:"ValidationID"`
}
SubnetValidator represents a validator configuration for a subnet.
type TokenInfo ¶
type TokenInfo struct {
Name string `json:"name"`
Symbol string `json:"symbol"`
Decimals uint8 `json:"decimals"`
Supply string `json:"supply"`
}
TokenInfo contains token metadata.
type VMType ¶
type VMType string
VMType represents a virtual machine type.
func VMTypeFromString ¶
VMTypeFromString returns a VMType from its string representation.