# Class: MoneroOutputQuery

## MoneroOutputQuery(config)

Configuration to query wallet outputs.

## Constructor

#### new MoneroOutputQuery(config)

Construct the output query.

Example:

`// get available outputs in account 0 with a minimum amount
let outputs = await wallet.getOutputs({
isSpent: false,
isLocked: false,
accountIndex: 0,
minAmount: new BigInteger("750000")
});`

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | object | output query configuration (optional) ###### Properties
Name | Type | Description
--- | --- | ---
`accountIndex` | int | get outputs in this account index
`subaddressIndex` | int | get outputs in this subaddress index
`subaddressIndices` | Array.<int> | get outputs in these subaddress indices
`amount` | BigInteger | get outputs with this amount
`minAmount` | BigInteger | get outputs with amount greater than or equal to this amount
`maxAmount` | BigInteger | get outputs with amount less than or equal to this amount
`isSpent` | boolean | get spent xor unspent outputs
`isFrozen` | boolean | get frozen xor thawed outputs
`keyImage` | object | MoneroKeyImage | get outputs with a key image matching fields defined in this key image ###### Properties
Name | Type | Description
--- | --- | ---
`hex` | string | get outputs with this key image hex
`signature` | string | get outputs with this key image signature
`txQuery` | object | MoneroTxQuery | get outputs whose tx match this tx query

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 10

### Extends

- MoneroOutputWallet

### Methods

#### copy()

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

#### getAccountIndex()

Overrides:
  - MoneroOutputWallet#getAccountIndex
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 22

#### getAmount()

Overrides:
  - MoneroOutputWallet#getAmount
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 51

#### getIndex()

Overrides:
  - MoneroOutputWallet#getIndex
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 60

#### getKeyImage()

Overrides:
  - MoneroOutputWallet#getKeyImage
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 41

#### getMaxAmount()

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 76

#### getMinAmount()

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 67

#### getRingOutputIndices()

Overrides:
  - MoneroOutputWallet#getRingOutputIndices
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 69

#### getStealthPublicKey()

Overrides:
  - MoneroOutputWallet#getStealthPublicKey
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 78

#### getSubaddressIndex()

Overrides:
  - MoneroOutputWallet#getSubaddressIndex
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 31

#### getSubaddressIndices()

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 95

#### getTx()

Overrides:
  - MoneroOutputWallet#getTx
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 32

#### getTxQuery()

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

#### isFrozen()

Indicates if this output has been deemed 'malicious' and will therefore not be spent by the wallet.

Overrides:
  - MoneroOutputWallet#isFrozen
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 55

##### Returns:

Boolean is whether or not this output is frozen

#### isLocked()

Overrides:
  - MoneroOutputWallet#isLocked
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 64

#### isSpent()

Overrides:
  - MoneroOutputWallet#isSpent
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 40

#### meetsCriteria()

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 104

#### merge(output)

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

##### Parameters:

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

Overrides:
  - MoneroOutputWallet#merge
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 88

#### setAccountIndex()

Overrides:
  - MoneroOutputWallet#setAccountIndex
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 26

#### setAmount()

Overrides:
  - MoneroOutputWallet#setAmount
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 55

#### setIndex()

Overrides:
  - MoneroOutputWallet#setIndex
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 64

#### setIsFrozen()

Overrides:
  - MoneroOutputWallet#setIsFrozen
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 59

#### setIsSpent()

Overrides:
  - MoneroOutputWallet#setIsSpent
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 44

#### setKeyImage()

Overrides:
  - MoneroOutputWallet#setKeyImage
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 45

#### setMaxAmount()

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 80

#### setMinAmount()

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 71

#### setRingOutputIndices()

Overrides:
  - MoneroOutputWallet#setRingOutputIndices
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 73

#### setStealthPublicKey()

Overrides:
  - MoneroOutputWallet#setStealthPublicKey
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 82

#### setSubaddressIndex()

Overrides:
  - MoneroOutputWallet#setSubaddressIndex
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 35

#### setSubaddressIndices()

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

#### setTx()

Overrides:
  - MoneroOutputWallet#setTx
Source:
  - src/main/js/daemon/model/MoneroOutput.js, line 36

#### setTxQuery()

Source:
  - src/main/js/wallet/model/MoneroOutputQuery.js, line 89

#### toJson()

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

#### toString()

Overrides:
  - MoneroOutputWallet#toString
Source:
  - src/main/js/wallet/model/MoneroOutputWallet.js, line 99