> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# QiTransactionResponse

A **QiTransactionResponse** includes all properties about a Qi transaction that was sent to the network, which may or
may not be included in a block.

The TransactionResponse.isMined | **TransactionResponse.isMined** can be used to check if the transaction has
been mined as well as type guard that the otherwise possibly `null` properties are defined.

## Implements

* `QiTransactionLike`
* `QiTransactionResponseParams`

## Properties

| Property      | Modifier   | Type                                           | Description                                                                                                                        |
| :------------ | :--------- | :--------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| `blockHash`   | `readonly` | `null` \| `string`                             | The blockHash of the block that this transaction was included in.<br /><br />This is `null` for pending transactions.              |
| `blockNumber` | `readonly` | `null` \| `number`                             | The block number of the block that this transaction was included in.<br /><br />This is `null` for pending transactions.           |
| `chainId`     | `readonly` | `bigint`                                       | The chain ID.                                                                                                                      |
| `hash`        | `readonly` | `string`                                       | The transaction hash.                                                                                                              |
| `index`       | `readonly` | `bigint`                                       | The index within the block that this transaction resides at.                                                                       |
| `provider`    | `readonly` | [`Provider`](/sdk/content/interfaces/Provider) | The provider this is connected to, which will influence how its methods will resolve its async inspection<br />methods.            |
| `signature`   | `readonly` | `string`                                       | The signature.                                                                                                                     |
| `type`        | `readonly` | `number`                                       | The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction envelope type. This is `0` for legacy<br />transactions types. |

## Methods

### confirmations()

```ts theme={null}
confirmations(): Promise<number>
```

Resolve to the number of confirmations this transaction has.

#### Returns

`Promise`\<`number`>

A promise resolving to the number of confirmations.

#### Source

[providers/provider.ts:2383](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2383)

***

### getBlock()

```ts theme={null}
getBlock(shard): Promise<null | Block>
```

Resolves to the Block that this transaction was included in.

This will return null if the transaction has not been included yet.

#### Parameters

| Parameter | Type                                       | Description                        |
| :-------- | :----------------------------------------- | :--------------------------------- |
| `shard`   | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block from. |

#### Returns

`Promise`\<`null` | [`Block`](/sdk/content/classes/Block)>

A promise resolving to the block or null if not found.

#### Source

[providers/provider.ts:2344](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2344)

***

### getTransaction()

```ts theme={null}
getTransaction(): Promise<null | QiTransactionResponse>
```

Resolves to this transaction being re-requested from the provider. This can be used if you have an unmined
transaction and wish to get an up-to-date populated instance.

#### Returns

`Promise`\<`null` | [`QiTransactionResponse`](/sdk/content/classes/QiTransactionResponse)>

A promise resolving to the transaction, or null if not found.

#### Throws

If the transaction is not found.

#### Source

[providers/provider.ts:2369](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2369)

***

### isMined()

```ts theme={null}
isMined(): this is QiMinedTransactionResponse
```

Returns `true` if this transaction has been included.

This is effective only as of the time the TransactionResponse was instantiated. To get up-to-date information,
use [**getTransaction**](/sdk/content/classes/QiTransactionResponse#gettransaction).

This provides a Type Guard that this transaction will have non-null property values for properties that are null
for unmined transactions.

#### Returns

`this is QiMinedTransactionResponse`

True if the transaction has been mined or false otherwise.

#### Source

[providers/provider.ts:2462](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2462)

***

### removedEvent()

```ts theme={null}
removedEvent(): OrphanFilter
```

Returns a filter which can be used to listen for orphan events that evict this transaction.

#### Returns

[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)

The orphan filter.

#### Source

[providers/provider.ts:2471](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2471)

***

### reorderedEvent()

```ts theme={null}
reorderedEvent(other?): OrphanFilter
```

Returns a filter which can be used to listen for orphan events that re-order this event against `other`.

#### Parameters

| Parameter | Type                                                                   | Description                               |
| :-------- | :--------------------------------------------------------------------- | :---------------------------------------- |
| `other`?  | [`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | The other transaction to compare against. |

#### Returns

[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)

The orphan filter.

#### Source

[providers/provider.ts:2484](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2484)

***

### replaceableTransaction()

```ts theme={null}
replaceableTransaction(startBlock): QiTransactionResponse
```

Returns a new TransactionResponse instance which has the ability to detect (and throw an error) if the
transaction is replaced, which will begin scanning at `startBlock`.

This should generally not be used by developers and is intended primarily for internal use. Setting an incorrect
`startBlock` can have devastating performance consequences if used incorrectly.

#### Parameters

| Parameter    | Type     | Description                                          |
| :----------- | :------- | :--------------------------------------------------- |
| `startBlock` | `number` | The block number to start scanning for replacements. |

#### Returns

[`QiTransactionResponse`](/sdk/content/classes/QiTransactionResponse)

The replaceable transaction.

#### Source

[providers/provider.ts:2506](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2506)

***

### toJSON()

```ts theme={null}
toJSON(): any
```

Returns a JSON-compatible representation of this transaction.

#### Returns

`any`

#### Source

[providers/provider.ts:2318](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2318)
