# Class: MoneroTxQuery

## MoneroTxQuery(config)

Configuration to query transactions.

## Constructor

#### new MoneroTxQuery(config)

Construct the transaction query.

Example:

`// get transactions with unlocked incoming transfers to account 0
let txs = await wallet.getTxs({
isLocked: false,
transferQuery: {
isIncoming: true,
accountIndex: 0
}
});`

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | object | tx query configuration ###### Properties
Name | Type | Description
--- | --- | ---
`hash` | string | get a tx with this hash
`txHashes` | Array.<string> | get txs with these hashes
`height` | int | get txs with this height
`minHeight` | int | get txs with height greater than or equal to this height
`maxHeight` | int | get txs with height less than or equal to this height
`isConfirmed` | boolean | get confirmed or unconfirmed txs
`inTxPool` | boolean | get txs in or out of the tx pool
`relay` | boolean | get txs with the same relay status
`isRelayed` | boolean | get relayed or non-relayed txs
`isFailed` | boolean | get failed or non-failed txs
`isMinerTx` | boolean | get miner or non-miner txs
`isLocked` | boolean | get locked or unlocked txs
`isIncoming` | boolean | get txs with or without incoming transfers
`isOutgoing` | boolean | get txs with or without outgoing transfers
`paymentId` | string | get txs with this payment ID
`paymentIds` | string | get txs with a payment ID among these payment IDs
`hasPaymentId` | boolean | get txs with or without payment IDs
`transferQuery` | object | MoneroTransferQuery | get txs with transfers matching this transfer query
`inputQuery` | object | MoneroOutputQuery | get txs with inputs matching this input query
`outputQuery` | object | MoneroOutputQuery | get txs with outputs matching this output query

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 12

### Extends

- MoneroTxWallet

### Methods

#### copy()

Overrides:
  - MoneroTxWallet#copy
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 74

#### filterOutputs()

Overrides:
  - MoneroTxWallet#filterOutputs
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 208

#### filterTransfers()

Overrides:
  - MoneroTxWallet#filterTransfers
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 129

#### getBlock()

Overrides:
  - MoneroTxWallet#getBlock
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 50

#### getChangeAddress()

Overrides:
  - MoneroTxWallet#getChangeAddress
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 260

#### getChangeAmount()

Overrides:
  - MoneroTxWallet#getChangeAmount
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 269

#### getExtra()

Overrides:
  - MoneroTxWallet#getExtra
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 325

#### getExtraHex()

Overrides:
  - MoneroTxWallet#getExtraHex
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 287

#### getFee()

Overrides:
  - MoneroTxWallet#getFee
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 99

#### getFullHex() → {string}

Get full transaction hex. Full hex = pruned hex + prunable hex.

Overrides:
  - MoneroTxWallet#getFullHex
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 224

##### Returns:

is full transaction hex

Type
  string

#### getHash()

Overrides:
  - MoneroTxWallet#getHash
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 63

#### getHashes()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 105

#### getHeight()

Overrides:
  - MoneroTxWallet#getHeight
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 144

#### getIncludeOutputs()

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

#### getIncomingAmount()

Overrides:
  - MoneroTxWallet#getIncomingAmount
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 107

#### getIncomingTransfers()

Overrides:
  - MoneroTxWallet#getIncomingTransfers
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 152

#### getInputQuery()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 190

#### getInputSum()

Overrides:
  - MoneroTxWallet#getInputSum
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 242

#### getInputs()

Overrides:
  - MoneroTxWallet#getInputs
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 170

#### getKey()

Overrides:
  - MoneroTxWallet#getKey
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 210

#### getLastFailedHash()

Overrides:
  - MoneroTxWallet#getLastFailedHash
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 379

#### getLastFailedHeight()

Overrides:
  - MoneroTxWallet#getLastFailedHeight
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 370

#### getLastRelayedTimestamp()

Overrides:
  - MoneroTxWallet#getLastRelayedTimestamp
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 183

#### getMaxHeight()

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

#### getMaxUsedBlockHash()

Overrides:
  - MoneroTxWallet#getMaxUsedBlockHash
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 397

#### getMaxUsedBlockHeight()

Overrides:
  - MoneroTxWallet#getMaxUsedBlockHeight
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 388

#### getMetadata()

Overrides:
  - MoneroTxWallet#getMetadata
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 316

#### getMinHeight()

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

#### getNote()

Overrides:
  - MoneroTxWallet#getNote
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 224

#### getNumConfirmations()

Overrides:
  - MoneroTxWallet#getNumConfirmations
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 153

#### getNumDummyOutputs()

Overrides:
  - MoneroTxWallet#getNumDummyOutputs
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 278

#### getOutgoingAmount()

Overrides:
  - MoneroTxWallet#getOutgoingAmount
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 114

#### getOutgoingTransfer()

Overrides:
  - MoneroTxWallet#getOutgoingTransfer
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 161

#### getOutputIndices()

Overrides:
  - MoneroTxWallet#getOutputIndices
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 307

#### getOutputQuery()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 200

#### getOutputSum()

Overrides:
  - MoneroTxWallet#getOutputSum
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 251

#### getOutputs()

Overrides:
  - MoneroTxWallet#getOutputs
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 189

#### getPaymentId()

Overrides:
  - MoneroTxWallet#getPaymentId
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 90

#### getPaymentIds()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 129

#### getPrunableHash()

Overrides:
  - MoneroTxWallet#getPrunableHash
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 262

#### getPrunableHex() → {string}

Get prunable transaction hex which is hex that is removed from a pruned transaction. Full hex = pruned hex + prunable hex.

Overrides:
  - MoneroTxWallet#getPrunableHex
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 253

##### Returns:

is the prunable transaction hex

Type
  string

#### getPrunedHex() → {string}

Get pruned transaction hex. Full hex = pruned hex + prunable hex.

Overrides:
  - MoneroTxWallet#getPrunedHex
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 238

##### Returns:

is pruned transaction hex

Type
  string

#### getRctSigPrunable()

Overrides:
  - MoneroTxWallet#getRctSigPrunable
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 343

#### getRctSignatures()

Overrides:
  - MoneroTxWallet#getRctSignatures
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 334

#### getReceivedTimestamp()

Overrides:
  - MoneroTxWallet#getReceivedTimestamp
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 192

#### getRelay()

Overrides:
  - MoneroTxWallet#getRelay
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 117

#### getRingSize()

Overrides:
  - MoneroTxWallet#getRingSize
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 108

#### getSignatures()

Overrides:
  - MoneroTxWallet#getSignatures
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 406

#### getSize()

Overrides:
  - MoneroTxWallet#getSize
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 271

#### getTransferQuery()

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

#### getTransfers()

Overrides:
  - MoneroTxWallet#getTransfers
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 118

#### getTxSet()

Overrides:
  - MoneroTxWallet#getTxSet
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 80

#### getUnlockTime() → {BigInteger}

Get the minimum height or timestamp for the transactions to unlock.

Overrides:
  - MoneroTxWallet#getUnlockTime
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 167

##### Returns:

the minimum height or timestamp for the transactin to unlock

Type
  BigInteger

#### getVersion()

Overrides:
  - MoneroTxWallet#getVersion
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 72

#### getWeight()

Overrides:
  - MoneroTxWallet#getWeight
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 280

#### hasPaymentId()

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

#### inTxPool()

Overrides:
  - MoneroTxWallet#inTxPool
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 144

#### isConfirmed()

Overrides:
  - MoneroTxWallet#isConfirmed
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 135

#### isDoubleSpendSeen()

Overrides:
  - MoneroTxWallet#isDoubleSpendSeen
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 201

#### isFailed()

Overrides:
  - MoneroTxWallet#isFailed
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 361

#### isIncoming()

Overrides:
  - MoneroTxWallet#isIncoming
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 87

#### isKeptByBlock()

Overrides:
  - MoneroTxWallet#isKeptByBlock
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 352

#### isLocked()

Overrides:
  - MoneroTxWallet#isLocked
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 233

#### isMinerTx()

Overrides:
  - MoneroTxWallet#isMinerTx
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 81

#### isOutgoing()

Overrides:
  - MoneroTxWallet#isOutgoing
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 96

#### isRelayed()

Overrides:
  - MoneroTxWallet#isRelayed
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 126

#### meetsCriteria()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 210

#### merge(tx)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`tx` |  | is the transaction to merge into this transaction

Overrides:
  - MoneroTxWallet#merge
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 309

#### setBlock()

Overrides:
  - MoneroTxWallet#setBlock
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 54

#### setChangeAddress()

Overrides:
  - MoneroTxWallet#setChangeAddress
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 264

#### setChangeAmount()

Overrides:
  - MoneroTxWallet#setChangeAmount
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 273

#### setExtra()

Overrides:
  - MoneroTxWallet#setExtra
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 329

#### setExtraHex()

Overrides:
  - MoneroTxWallet#setExtraHex
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 291

#### setFee()

Overrides:
  - MoneroTxWallet#setFee
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 103

#### setFullHex()

Overrides:
  - MoneroTxWallet#setFullHex
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 228

#### setHasPaymentId()

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

#### setHash()

Overrides:
  - MoneroTxWallet#setHash
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 114

#### setHashes()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 109

#### setHeight()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 148

#### setInTxPool()

Overrides:
  - MoneroTxWallet#setInTxPool
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 148

#### setIncludeOutputs()

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

#### setIncomingTransfers()

Overrides:
  - MoneroTxWallet#setIncomingTransfers
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 156

#### setInputQuery()

Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 194

#### setInputSum()

Overrides:
  - MoneroTxWallet#setInputSum
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 246

#### setInputs()

Overrides:
  - MoneroTxWallet#setInputs
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 177

#### setIsConfirmed()

Overrides:
  - MoneroTxWallet#setIsConfirmed
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 139

#### setIsDoubleSpend()

Overrides:
  - MoneroTxWallet#setIsDoubleSpend
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 205

#### setIsFailed()

Overrides:
  - MoneroTxWallet#setIsFailed
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 365

#### setIsIncoming()

Overrides:
  - MoneroTxWallet#setIsIncoming
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 91

#### setIsKeptByBlock()

Overrides:
  - MoneroTxWallet#setIsKeptByBlock
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 356

#### setIsLocked()

Overrides:
  - MoneroTxWallet#setIsLocked
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 237

#### setIsMinerTx()

Overrides:
  - MoneroTxWallet#setIsMinerTx
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 85

#### setIsOutgoing()

Overrides:
  - MoneroTxWallet#setIsOutgoing
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 100

#### setIsRelayed()

Overrides:
  - MoneroTxWallet#setIsRelayed
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 130

#### setKey()

Overrides:
  - MoneroTxWallet#setKey
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 214

#### setLastFailedHash()

Overrides:
  - MoneroTxWallet#setLastFailedHash
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 383

#### setLastFailedHeight()

Overrides:
  - MoneroTxWallet#setLastFailedHeight
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 374

#### setLastRelayedTimestamp()

Overrides:
  - MoneroTxWallet#setLastRelayedTimestamp
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 187

#### setMaxHeight()

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

#### setMaxUsedBlockHash()

Overrides:
  - MoneroTxWallet#setMaxUsedBlockHash
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 401

#### setMaxUsedBlockHeight()

Overrides:
  - MoneroTxWallet#setMaxUsedBlockHeight
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 392

#### setMetadata()

Overrides:
  - MoneroTxWallet#setMetadata
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 320

#### setMinHeight()

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

#### setNote()

Overrides:
  - MoneroTxWallet#setNote
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 228

#### setNumConfirmations()

Overrides:
  - MoneroTxWallet#setNumConfirmations
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 157

#### setNumDummyOutputs()

Overrides:
  - MoneroTxWallet#setNumDummyOutputs
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 282

#### setOutgoingTransfer()

Overrides:
  - MoneroTxWallet#setOutgoingTransfer
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 165

#### setOutputIndices()

Overrides:
  - MoneroTxWallet#setOutputIndices
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 311

#### setOutputQuery()

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

#### setOutputSum()

Overrides:
  - MoneroTxWallet#setOutputSum
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 255

#### setOutputs()

Overrides:
  - MoneroTxWallet#setOutputs
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 196

#### setPaymentId()

Overrides:
  - MoneroTxWallet#setPaymentId
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 138

#### setPaymentIds()

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

#### setPrunableHash()

Overrides:
  - MoneroTxWallet#setPrunableHash
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 266

#### setPrunableHex()

Overrides:
  - MoneroTxWallet#setPrunableHex
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 257

#### setPrunedHex()

Overrides:
  - MoneroTxWallet#setPrunedHex
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 242

#### setRctSigPrunable()

Overrides:
  - MoneroTxWallet#setRctSigPrunable
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 347

#### setRctSignatures()

Overrides:
  - MoneroTxWallet#setRctSignatures
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 338

#### setReceivedTimestamp()

Overrides:
  - MoneroTxWallet#setReceivedTimestamp
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 196

#### setRelay()

Overrides:
  - MoneroTxWallet#setRelay
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 121

#### setRingSize()

Overrides:
  - MoneroTxWallet#setRingSize
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 112

#### setSignatures()

Overrides:
  - MoneroTxWallet#setSignatures
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 410

#### setSize()

Overrides:
  - MoneroTxWallet#setSize
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 275

#### setTransferQuery()

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

#### setTxSet()

Overrides:
  - MoneroTxWallet#setTxSet
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 84

#### setUnlockTime()

Overrides:
  - MoneroTxWallet#setUnlockTime
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 171

#### setVersion()

Overrides:
  - MoneroTxWallet#setVersion
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 76

#### setWeight()

Overrides:
  - MoneroTxWallet#setWeight
Source:
  - src/main/js/daemon/model/MoneroTx.js, line 284

#### toJson()

Overrides:
  - MoneroTxWallet#toJson
Source:
  - src/main/js/wallet/model/MoneroTxQuery.js, line 78

#### toString()

Overrides:
  - MoneroTxWallet#toString
Source:
  - src/main/js/wallet/model/MoneroTxWallet.js, line 360