Skip to main content

JavaScript SDK API Reference / Instructions / deleteInstruction

Function: deleteInstruction()

deleteInstruction(nameProgramId, nameAccountKey, refundTargetKey, nameOwnerKey): TransactionInstruction

Defined in: instructions/deleteInstruction.ts:18

Builds an SPL Name Service instruction that deletes a name registry account.

Parameters​

nameProgramId​

PublicKey

SPL Name Service program address.

nameAccountKey​

PublicKey

Registry address to delete.

refundTargetKey​

PublicKey

Account that receives the reclaimed lamports.

nameOwnerKey​

PublicKey

Signer authorized to delete the registry.

Returns​

TransactionInstruction

A transaction instruction that deletes the name registry.

Example​

const instruction = deleteInstruction(nameProgramId, nameAccount, refundTarget, owner);