> 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/deleteaccount.md).

# DeleteAccount

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

***

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

## Class: DeleteAccount

A delete account promise action.

### Extends

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

### Constructors

#### new DeleteAccount()

> **new DeleteAccount**(`beneficiaryId`): [`DeleteAccount`](/near-sdk-js/promise/classes/deleteaccount.md)

**Parameters**

• **beneficiaryId**: `string`

The beneficiary of the account deletion - the account to receive all of the remaining funds of the deleted account.

**Returns**

[`DeleteAccount`](/near-sdk-js/promise/classes/deleteaccount.md)

**Overrides**

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

**Defined in**

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

### Properties

#### beneficiaryId

> **beneficiaryId**: `string`

The beneficiary of the account deletion - the account to receive all of the remaining funds of the deleted account.

**Defined in**

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

### Methods

#### add()

> **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`

**Overrides**

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

**Defined in**

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