> For the complete documentation index, see [llms.txt](https://near-sdk-js.gitbook.io/near-sdk-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://near-sdk-js.gitbook.io/near-sdk-js/promise/classes/promiseaction.md).

# PromiseAction

[**promise**](/near-sdk-js/promise.md) • **Docs**

***

[near-sdk-js v2.0.0](/near-sdk-js/packages.md) / [promise](/near-sdk-js/promise.md) / PromiseAction

## Class: `abstract` PromiseAction

A promise action which can be executed on the NEAR blockchain.

### Extended by

* [`CreateAccount`](/near-sdk-js/promise/classes/createaccount.md)
* [`DeployContract`](/near-sdk-js/promise/classes/deploycontract.md)
* [`FunctionCall`](/near-sdk-js/promise/classes/functioncall.md)
* [`FunctionCallRaw`](/near-sdk-js/promise/classes/functioncallraw.md)
* [`FunctionCallWeight`](/near-sdk-js/promise/classes/functioncallweight.md)
* [`FunctionCallWeightRaw`](/near-sdk-js/promise/classes/functioncallweightraw.md)
* [`Transfer`](/near-sdk-js/promise/classes/transfer.md)
* [`Stake`](/near-sdk-js/promise/classes/stake.md)
* [`AddFullAccessKey`](/near-sdk-js/promise/classes/addfullaccesskey.md)
* [`AddAccessKey`](/near-sdk-js/promise/classes/addaccesskey.md)
* [`DeleteKey`](/near-sdk-js/promise/classes/deletekey.md)
* [`DeleteAccount`](/near-sdk-js/promise/classes/deleteaccount.md)

### Constructors

#### new PromiseAction()

> **new PromiseAction**(): [`PromiseAction`](/near-sdk-js/promise/classes/promiseaction.md)

**Returns**

[`PromiseAction`](/near-sdk-js/promise/classes/promiseaction.md)

### Methods

#### add()

> `abstract` **add**(`promiseIndex`): `void`

The method that describes how a promise action adds it's *action* to the promise batch with the provided index.

**Parameters**

• **promiseIndex**: [`PromiseIndex`](/near-sdk-js/utils/type-aliases/promiseindex.md)

The index of the promise batch to attach the action to.

**Returns**

`void`

**Defined in**

[packages/near-sdk-js/src/promise.ts:15](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L15)
