Skip to main content

JavaScript SDK API Reference / Bindings / deleteNameRegistry

Function: deleteNameRegistry()

deleteNameRegistry(connection, name, refundTargetKey, nameClass?, nameParent?): Promise<TransactionInstruction>

Defined in: bindings/deleteNameRegistry.ts:23

Builds an instruction to delete a name account and transfer reclaimed rent.

Parameters​

connection​

Connection

Solana RPC connection

name​

string

Name of the name account

refundTargetKey​

PublicKey

Refund destination address

nameClass?​

PublicKey

Optional class of the name account

nameParent?​

PublicKey

Optional parent name account

Returns​

Promise<TransactionInstruction>

Transaction instruction.

Example​

const instruction = await deleteNameRegistry(connection, "example", refundTarget);