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

# DeleteKey

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

***

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

## Class: DeleteKey

A delete key promise action.

### Extends

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

### Constructors

#### new DeleteKey()

> **new DeleteKey**(`publicKey`): [`DeleteKey`](/near-sdk-js/promise/classes/deletekey.md)

**Parameters**

• **publicKey**: [`PublicKey`](/near-sdk-js/types/public_key/classes/publickey.md)

The public key to delete from the account.

**Returns**

[`DeleteKey`](/near-sdk-js/promise/classes/deletekey.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:289](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L289)

### Properties

#### publicKey

> **publicKey**: [`PublicKey`](/near-sdk-js/types/public_key/classes/publickey.md)

The public key to delete from the account.

**Defined in**

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

### 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:293](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L293)
