# 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
`subtractFeeFrom` | Array.<int> | list of destination indices to split the transaction fee
`paymentId` | string | transaction payment ID
`unlockTime` | BigInteger | minimum height or timestamp 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 10

### Methods

#### addDestination()

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

#### copy()

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

#### getAccountIndex()

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

#### getAddress() → {string}

Get the address of a single-destination configuration.

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

##### 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 158

##### Returns:

the amount of the single destination

Type
  BigInteger

#### getBelowAmount()

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

#### getCanSplit()

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

#### getDestinations()

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

#### getFee()

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

#### 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 323

#### getNote()

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

#### getPaymentId()

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

#### getPriority()

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

#### getRecipientName()

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

#### getRelay()

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

#### getSubaddressIndices()

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

#### getSubtractFeeFrom()

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

#### getSweepEachSubaddress()

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

#### getUnlockTime()

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

#### setAccountIndex()

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

#### 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 118

##### 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 141

##### Returns:

this configuration for chaining

Type
  MoneroTxConfig

#### setBelowAmount()

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

#### setCanSplit()

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

#### setDestination()

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

#### setDestinations()

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

#### setFee()

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

#### 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 332

#### setNote()

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

#### setPaymentId()

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

#### setPriority()

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

#### setRecipientName()

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

#### setRelay()

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

#### setSubaddressIndex()

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

#### setSubaddressIndices()

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

#### setSubtractFeeFrom()

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

#### setSweepEachSubaddress()

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

#### setUnlockTime()

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

#### toJson()

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