# PolymeshTransaction

Wrapper class for a Polymesh Transaction

## Type parameters

▪ **Args**: *unknown\[]*

▪ **Values**: *unknown\[]*

## Hierarchy

* [PolymeshTransactionBase](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)‹Args, Values›

  ↳ **PolymeshTransaction**

## Index

### Properties

* [blockHash](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#optional-blockhash)
* [context](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#protected-context)
* [error](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#optional-error)
* [inputArgs](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#inputargs)
* [isCritical](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#iscritical)
* [paidByThirdParty](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#paidbythirdparty)
* [receipt](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#optional-receipt)
* [status](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#status)
* [txHash](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#optional-txhash)

### Accessors

* [args](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#args)
* [tag](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#tag)

### Methods

* [getFees](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#getfees)
* [onStatusChange](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#onstatuschange)
* [run](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md#run)

## Properties

### `Optional` blockHash

• **blockHash**? : *undefined | string*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*blockHash*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#optional-blockhash)

*Defined in* [*src/base/PolymeshTransactionBase.ts:55*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L55)

hash of the block where this transaction resides (status: `Succeeded`, `Failed`)

### `Protected` context

• **context**: [*Context*](/polymesh-sdk-api-reference/docs-v7/classes/context.md)

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*context*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#protected-context)

*Defined in* [*src/base/PolymeshTransactionBase.ts:119*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L119)

### `Optional` error

• **error**? : [*PolymeshError*](/polymesh-sdk-api-reference/docs-v7/classes/polymesherror.md)

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*error*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#optional-error)

*Defined in* [*src/base/PolymeshTransactionBase.ts:40*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L40)

stores errors thrown while running the transaction (status: `Failed`, `Aborted`)

### inputArgs

• **inputArgs**: *MapMaybePostTransactionValue‹Args›*

*Defined in* [*src/base/PolymeshTransaction.ts:26*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransaction.ts#L26)

arguments for the transaction. Available after the transaction starts running (may be Post Transaction Values from a previous transaction in the queue that haven't resolved yet)

### isCritical

• **isCritical**: *boolean*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*isCritical*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#iscritical)

*Defined in* [*src/base/PolymeshTransactionBase.ts:60*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L60)

whether this tx failing makes the entire tx queue fail or not

### paidByThirdParty

• **paidByThirdParty**: *boolean*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*paidByThirdParty*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#paidbythirdparty)

*Defined in* [*src/base/PolymeshTransactionBase.ts:66*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L66)

whether the fees for this tx are paid by a third party. For example, when accepting/rejecting a request to join an Identity, fees are paid by the Identity that sent the request

### `Optional` receipt

• **receipt**? : *ISubmittableResult*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*receipt*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#optional-receipt)

*Defined in* [*src/base/PolymeshTransactionBase.ts:45*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L45)

stores the transaction receipt (if successful)

### status

• **status**: [*TransactionStatus*](/polymesh-sdk-api-reference/docs-v7/enums/transactionstatus.md) = TransactionStatus.Idle

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*status*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#status)

*Defined in* [*src/base/PolymeshTransactionBase.ts:35*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L35)

current status of the transaction

### `Optional` txHash

• **txHash**? : *undefined | string*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*txHash*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#optional-txhash)

*Defined in* [*src/base/PolymeshTransactionBase.ts:50*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L50)

transaction hash (status: `Running`, `Succeeded`, `Failed`)

## Accessors

### args

• **get args**(): *Args*

*Defined in* [*src/base/PolymeshTransaction.ts:43*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransaction.ts#L43)

Arguments for the transaction

**Returns:** *Args*

### tag

• **get tag**(): *TxTag*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*tag*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#tag)

*Defined in* [*src/base/PolymeshTransactionBase.ts:314*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L314)

type of transaction represented by this instance for display purposes. If the transaction isn't defined at design time, the tag won't be set (will be empty string) until the transaction is about to be run

**Returns:** *TxTag*

## Methods

### getFees

▸ **getFees**(): *Promise‹*[*Fees*](/polymesh-sdk-api-reference/docs-v7/interfaces/fees.md) *| null›*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*getFees*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#getfees)

*Defined in* [*src/base/PolymeshTransactionBase.ts:281*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L281)

Get all (protocol and gas) fees associated with this transaction. Returns null if the transaction is not ready yet (this can happen if it depends on the execution of a previous transaction in the queue)

**Returns:** *Promise‹*[*Fees*](/polymesh-sdk-api-reference/docs-v7/interfaces/fees.md) *| null›*

### onStatusChange

▸ **onStatusChange**(`listener`: function): *function*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*onStatusChange*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#onstatuschange)

*Defined in* [*src/base/PolymeshTransactionBase.ts:268*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L268)

Subscribe to status changes

**Parameters:**

▪ **listener**: *function*

callback function that will be called whenever the status changes

▸ (`transaction`: this): *void*

**Parameters:**

| Name          | Type |
| ------------- | ---- |
| `transaction` | this |

**Returns:** *function*

unsubscribe function

▸ (): *void*

### run

▸ **run**(): *Promise‹void›*

*Inherited from* [*PolymeshTransactionBase*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md)*.*[*run*](/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransactionbase.md#run)

*Defined in* [*src/base/PolymeshTransactionBase.ts:153*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/base/PolymeshTransactionBase.ts#L153)

Run the poly transaction and update the transaction status

**Returns:** *Promise‹void›*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/polymeshtransaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
