Members
(static) MAINNET
Mainnet (value=0).
(static) STAGENET
Stagnet (value=2).
(static) TESTNET
Testnet (value=1).
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 |
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) |
Returns:
the network type as a numeric
- Type
- int
(static) toString() → {string}
Get the network type in human-readable form.
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 |