Skip to main content

JavaScript SDK API Reference / Instructions / SetPrimaryInstruction

Class: SetPrimaryInstruction

Defined in: instructions/setPrimaryInstruction.ts:7

Serializable registrar instruction for setting a wallet primary domain.

Constructors​

Constructor​

new SetPrimaryInstruction(): SetPrimaryInstruction

Defined in: instructions/setPrimaryInstruction.ts:15

Returns​

SetPrimaryInstruction

Properties​

tag​

tag: number

Defined in: instructions/setPrimaryInstruction.ts:9

Instruction discriminator.


schema​

static schema: object

Defined in: instructions/setPrimaryInstruction.ts:10

struct​

struct: object

struct.tag​

tag: string = "u8"

Methods​

getInstruction()​

getInstruction(programId, nameAccount, primaryAccount, owner, systemProgram, optParent?): TransactionInstruction

Defined in: instructions/setPrimaryInstruction.ts:23

Builds the transaction instruction with the required primary-domain accounts.

Parameters​

programId​

PublicKey

nameAccount​

PublicKey

primaryAccount​

PublicKey

owner​

PublicKey

systemProgram​

PublicKey

optParent?​

PublicKey

Returns​

TransactionInstruction


serialize()​

serialize(): Uint8Array

Defined in: instructions/setPrimaryInstruction.ts:19

Serializes the registrar instruction payload.

Returns​

Uint8Array