# Class: MoneroTransferQuery

## MoneroTransferQuery(config)

Configuration to query wallet transfers.

## Constructor

#### new MoneroTransferQuery(config)

Construct the transfer query.

Example:

`// get incoming transfers to account 0, subaddress 1
let transfers = await wallet.getTransfers({
accountIndex: 0,
subaddressIndex: 0
});`

All configuration is optional. All transfers are returned except those that don't meet criteria defined in this query.

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | object | transfer query configuration (optional) ###### Properties
Name | Type | Description
--- | --- | ---
`amount` | BigInteger | get transfers with this amount
`accountIndex` | int | get transfers to/from this account index
`subaddressIndex` | int | get transfers to/from this subaddress index
`subaddressIndices` | Array.<int> | get transfers to/from these subaddress indices
`address` | string | get transfers to/from this wallet address
`addresses` | Array.<string> | get transfers to/from these wallet addresses
`isIncoming` | boolean | get transfers which are incoming if true
`isOutgoing` | boolean | get transfers which are outgoing if true
`hasDestinations` | boolean | get transfers with known destinations if true (destinations are only stored locally with the wallet)
`txQuery` | object | MoneroTxQuery | get transfers whose tx match this tx query

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 11

### Extends

- MoneroTransfer

### Methods

#### copy()

Overrides:
  - MoneroTransfer#copy
Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 55

#### getAccountIndex()

Overrides:
  - MoneroTransfer#getAccountIndex
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 63

#### getAddress()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 93

#### getAddresses()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 102

#### getAmount()

Overrides:
  - MoneroTransfer#getAmount
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 73

#### getDestinations()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 131

#### getSubaddressIndex()

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

#### getSubaddressIndices()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 121

#### getTx()

Overrides:
  - MoneroTransfer#getTx
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 44

#### getTxQuery()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 65

#### hasDestinations()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 140

#### isIncoming()

Overrides:
  - MoneroTransfer#isIncoming
Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 75

#### isOutgoing()

Overrides:
  - MoneroTransfer#isOutgoing
Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 84

#### meetsCriteria()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 161

#### merge(transfer) → {MoneroTransfer}

Updates this transaction by merging the latest information from the given transaction. Merging can modify or build references to the transfer given so it should not be re-used or it should be copied before calling this method.

##### Parameters:

Name | Type | Description
--- | --- | ---
`transfer` |  | is the transfer to merge into this one

Overrides:
  - MoneroTransfer#merge
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 92

##### Returns:

the merged transfer

Type
  MoneroTransfer

#### setAccountIndex()

Overrides:
  - MoneroTransfer#setAccountIndex
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 67

#### setAddress()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 97

#### setAddresses()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 106

#### setAmount()

Overrides:
  - MoneroTransfer#setAmount
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 77

#### setDestinations()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 135

#### setHasDestinations()

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

#### setIsIncoming()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 79

#### setIsLocked(isLocked) → {MoneroOutputQuery}

Convenience method to query outputs by the locked state of their tx.

##### Parameters:

Name | Type | Description
--- | --- | ---
`isLocked` |  | specifies if the output's tx must be locked or unlocked (optional)

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 155

##### Returns:

this query for chaining

Type
  MoneroOutputQuery

#### setIsOutgoing()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 88

#### setSubaddressIndex()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 115

#### setSubaddressIndices()

Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 125

#### setTx()

Overrides:
  - MoneroTransfer#setTx
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 48

#### setTxQuery()

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

#### toJson()

Overrides:
  - MoneroTransfer#toJson
Source:
  - src/main/js/wallet/model/MoneroTransferQuery.js, line 59

#### toString()

Overrides:
  - MoneroTransfer#toString
Source:
  - src/main/js/wallet/model/MoneroTransfer.js, line 115