# Class: MoneroWalletConfig

## MoneroWalletConfig(config)

Configuration to create a Monero wallet.

## Constructor

#### new MoneroWalletConfig(config)

Construct a configuration to open or create a wallet.

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | object | MoneroWalletConfig | MoneroWalletConfig or equivalent config object ###### Properties
Name | Type | Description
--- | --- | ---
`path` | string | path of the wallet to open or create
`password` | string | password of the wallet to open
`networkType` | string | number | network type of the wallet to open (one of "mainnet", "testnet", "stagenet" or MoneroNetworkType.MAINNET|TESTNET|STAGENET)
`seed` | string | seed of the wallet to create (optional, random wallet created if neither seed nor keys given)
`seedOffset` | string | the offset used to derive a new seed from the given seed to recover a secret wallet from the seed phrase
`isMultisig` | boolean | restore multisig wallet from seed
`primaryAddress` | string | primary address of the wallet to create (only provide if restoring from keys)
`privateViewKey` | string | private view key of the wallet to create (optional)
`privateSpendKey` | string | private spend key of the wallet to create (optional)
`restoreHeight` | number | block height to start scanning from (defaults to 0 unless generating random wallet)
`language` | string | language of the wallet's seed phrase (defaults to "English" or auto-detected)
`accountLookahead` | number | number of accounts to scan (optional)
`subaddressLookahead` | number | number of subaddresses to scan per account (optional)
`server` | MoneroRpcConnection | object | MoneroRpcConnection or equivalent JS object configuring the server connection (optional)
`serverUri` | string | uri of the wallet's server (optional)
`serverUsername` | string | username of the wallet's server (optional)
`serverPassword` | string | password of the wallet's server (optional)
`connectionManager` | MoneroConnectionManager | manage connections to monerod (optional)
`rejectUnauthorized` | boolean | reject self-signed server certificates if true (default true)
`keysData` | Uint8Array | wallet keys data to open (optional)
`cacheData` | Uint8Array | wallet cache data to open (optional)
`proxyToWorker` | boolean | proxies wallet operations to a worker in order to not block the main thread (default true)
`fs` | fs | Node.js compatible file system to use (defaults to disk or in-memory FS if browser)
`saveCurrent` | boolean | specifies if the current RPC wallet should be saved before being closed
`accountLookahead` | number | number of accounts to scan (optional)
`subaddressLookahead` | number | number of subaddresses to scan per account (optional)

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 9

### Methods

#### copy()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 69

#### getAccountLookahead()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 289

#### getCacheData()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 280

#### getConnectionManager()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 153

#### getFs()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 262

#### getKeysData()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 271

#### getLanguage()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 234

#### getNetworkType()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 99

#### getPassword()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 90

#### getPath()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 81

#### getPrimaryAddress()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 198

#### getPrivateSpendKey()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 216

#### getPrivateViewKey()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 207

#### getProxyToWorker()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 252

#### getRejectUnauthorized()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 162

#### getRestoreHeight()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 225

#### getSaveCurrent()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 243

#### getSeed()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 171

#### getSeedOffset()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 180

#### getServer()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 108

#### getServerPassword()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 143

#### getServerUri()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 120

#### getServerUsername()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 133

#### getSubaddressLookahead()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 298

#### isMultisig()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 189

#### setAccountLookahead()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 293

#### setCacheData()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 284

#### setConnectionManager()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 157

#### setFs()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 266

#### setIsMultisig()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 193

#### setKeysData()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 275

#### setLanguage()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 238

#### setNetworkType()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 103

#### setPassword()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 94

#### setPath()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 85

#### setPrimaryAddress()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 202

#### setPrivateSpendKey()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 220

#### setPrivateViewKey()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 211

#### setProxyToWorker()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 256

#### setRejectUnauthorized()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 166

#### setRestoreHeight()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 229

#### setSaveCurrent()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 247

#### setSeed()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 175

#### setSeedOffset()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 184

#### setServer()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 112

#### setServerPassword()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 147

#### setServerUri()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 124

#### setServerUsername()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 137

#### setSubaddressLookahead()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 302

#### toJson()

Source:
  - src/main/js/wallet/model/MoneroWalletConfig.js, line 73