# Class: MoneroNetworkType

## MoneroNetworkType

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

Source:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 8

### Members

#### (static) MAINNET

Mainnet (value=0).

Source:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 61

#### (static) STAGENET

Stagnet (value=2).

Source:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 71

#### (static) TESTNET

Testnet (value=1).

Source:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 66

### 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:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 25

##### 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:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 35

##### Returns:

the network type as a numeric

Type
  int

#### (static) toString() → {string}

Get the network type in human-readable form.

Source:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 50

##### 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:
  - src/main/js/daemon/model/MoneroNetworkType.js, line 15