Skip to main content

JavaScript SDK API Reference / Instructions / reallocInstruction

Function: reallocInstruction()

reallocInstruction(nameProgramId, systemProgramId, payerKey, nameAccountKey, nameOwnerKey, space): TransactionInstruction

Defined in: instructions/reallocInstruction.ts:28

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

Parameters​

nameProgramId​

PublicKey

SPL Name Service program address.

systemProgramId​

PublicKey

System Program address used for reallocation.

payerKey​

PublicKey

Signer that funds the additional account rent.

nameAccountKey​

PublicKey

Registry address to resize.

nameOwnerKey​

PublicKey

Signer authorized to resize the registry.

space​

Numberu32

New registry data size in bytes.

Returns​

TransactionInstruction

A transaction instruction that resizes the name registry.

Example​

const instruction = reallocInstruction(
nameProgramId,
systemProgramId,
payer,
nameAccount,
owner,
space,
);