Class: MoneroNetworkType

MoneroNetworkType

Defines the Monero network types (mainnet, testnet, and stagenet).

Members

(static) MAINNET

Mainnet (value=0).
Source:

(static) STAGENET

Stagnet (value=2).
Source:

(static) TESTNET

Testnet (value=1).
Source:

Methods

(static) isValid(networkType) → {boolean}

Indicates if the given network type is valid or not.
Parameters:
Name Type Description
networkType int the network type to validate as a numeric
Source:
Returns:
true if the network type is valid, false otherwise
Type
boolean

(static) parse(networkTypeStr) → {int}

Parse the given string as a network type.
Parameters:
Name Type Description
networkTypeStr string "mainnet", "testnet", or "stagenet" (case insensitive)
Source:
Returns:
the network type as a numeric
Type
int

(static) toString() → {string}

Get the network type in human-readable form.
Source:
Returns:
the network type in human-readable form
Type
string

(static) validate(networkType)

Validates the given network type.
Parameters:
Name Type Description
networkType int the network type to validate as a numeric
Source: