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

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

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

#### getFullHex() → {string}

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

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

##### Returns:

is full transaction hex

Type
  string

#### getHash()

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

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

#### getLastFailedHash()

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

#### getLastFailedHeight()

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

#### getLastRelayedTimestamp()

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

#### getMaxHeight()

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

#### getMaxUsedBlockHash()

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

#### getMaxUsedBlockHeight()

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

#### getMetadata()

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

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

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

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

#### getPaymentIds()

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

#### getPrunableHash()

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

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

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

##### Returns:

is pruned transaction hex

Type
  string

#### getRctSigPrunable()

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

#### getRctSignatures()

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

#### getReceivedTimestamp()

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

#### getRelay()

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

#### getRingSize()

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

#### getSignatures()

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

#### getSize()

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

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

#### getUnlockHeight()

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

#### getVersion()

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

#### getWeight()

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

#### hasPaymentId()

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

#### inTxPool()

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

#### isConfirmed()

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

#### isDoubleSpendSeen()

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

#### isFailed()

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

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

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

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

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

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

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

#### setFullHex()

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

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

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

#### setIsDoubleSpend()

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

#### setIsFailed()

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

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

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

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

#### setKey()

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

#### setLastFailedHash()

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

#### setLastFailedHeight()

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

#### setLastRelayedTimestamp()

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

#### setMaxHeight()

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

#### setMaxUsedBlockHash()

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

#### setMaxUsedBlockHeight()

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

#### setMetadata()

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

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

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

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

#### setPrunableHex()

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

#### setPrunedHex()

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

#### setRctSigPrunable()

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

#### setRctSignatures()

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

#### setReceivedTimestamp()

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

#### setRelay()

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

#### setRingSize()

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

#### setSignatures()

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

#### setSize()

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

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

#### setUnlockHeight()

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

#### setVersion()

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

#### setWeight()

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

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