# Class: MoneroTxConfig

## MoneroTxConfig(config)

Configures a transaction to send, sweep, or create a payment URI.

## Constructor

#### new MoneroTxConfig(config)

Generic request to transfer funds from a wallet.

Examples:

`let config1 = new MoneroTxConfig({
accountIndex: 0,
address: "59aZULsUF3YN...",
amount: new BigInteger("500000"),
priority: MoneroTxPriority.NORMAL,
relay: true
});
`

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | MoneroTxConfig | object | configures the transaction to create (optional) ###### Properties
Name | Type | Description
--- | --- | ---
`address` | string | single destination address
`amount` | BigInteger | single destination amount
`accountIndex` | int | source account index to transfer funds from
`subaddressIndex` | int | source subaddress index to transfer funds from
`subaddressIndices` | Array.<int> | source subaddress indices to transfer funds from
`relay` | boolean | relay the transaction to peers to commit to the blockchain
`priority` | MoneroTxPriority | transaction priority (default MoneroTxPriority.NORMAL)
`destinations` | Array.<MoneroDestination> | addresses and amounts in a multi-destination tx
`paymentId` | string | transaction payment ID
`unlockHeight` | int | minimum height for the transaction to unlock (default 0)
`note` | string | transaction note saved locally with the wallet
`recipientName` | string | recipient name saved locally with the wallet
`canSplit` | boolean | allow funds to be transferred using multiple transactions
`belowAmount` | BigInteger | for sweep requests, include outputs below this amount when sweeping wallet, account, subaddress, or all unlocked funds
`sweepEachSubaddress` | boolean | for sweep requests, sweep each subaddress individually instead of together if true
`keyImage` | string | key image to sweep (ignored except in sweepOutput() requests)

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

### Methods

#### addDestination()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 144

#### copy()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 78

#### getAccountIndex()

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

#### getAddress() → {string}

Get the address of a single-destination configuration.

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 111

##### Returns:

the address of the single destination

Type
  string

#### getAmount() → {BigInteger}

Get the amount of a single-destination configuration.

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 139

##### Returns:

the amount of the single destination

Type
  BigInteger

#### getBelowAmount()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 264

#### getCanSplit()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 235

#### getDestinations()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 152

#### getFee()

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

#### getKeyImage()

Get the key image hex of the output to sweep. return {string} is the key image hex of the output to sweep

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 287

#### getNote()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 244

#### getPaymentId()

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

#### getPriority()

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

#### getRecipientName()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 253

#### getRelay()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 226

#### getSubaddressIndices()

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

#### getSweepEachSubaddress()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 273

#### getUnlockHeight()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 217

#### setAccountIndex()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 197

#### setAddress(address) → {MoneroTxConfig}

Set the address of a single-destination configuration.

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | the address to set for the single destination

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

##### Returns:

this configuration for chaining

Type
  MoneroTxConfig

#### setAmount(amount) → {MoneroTxConfig}

Set the amount of a single-destination configuration.

##### Parameters:

Name | Type | Description
--- | --- | ---
`amount` | BigInteger | string | the amount to set for the single destination

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 122

##### Returns:

this configuration for chaining

Type
  MoneroTxConfig

#### setBelowAmount()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 268

#### setCanSplit()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 239

#### setDestination()

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

#### setDestinations()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 156

#### setFee()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 188

#### setKeyImage(keyImage)

Set the key image hex of the output to sweep.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyImage` | string | is the key image hex of the output to sweep

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 296

#### setNote()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 248

#### setPaymentId()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 170

#### setPriority()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 179

#### setRecipientName()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 257

#### setRelay()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 230

#### setSubaddressIndex()

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

#### setSubaddressIndices()

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

#### setSweepEachSubaddress()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 277

#### setUnlockHeight()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 221

#### toJson()

Source:
  - src/main/js/wallet/model/MoneroTxConfig.js, line 82