Skip to main content

JavaScript SDK API Reference / Bindings / transferSubdomain

Function: transferSubdomain()

transferSubdomain(connection, subdomain, newOwner, isParentOwnerSigner?, owner?): Promise<TransactionInstruction>

Defined in: bindings/transferSubdomain.ts:23

Builds an instruction to transfer a .sns subdomain.

Parameters​

connection​

Connection

Solana RPC connection

subdomain​

string

Full .sns subdomain name

newOwner​

PublicKey

New owner of the subdomain

isParentOwnerSigner?​

boolean

Whether the parent name owner signs the transfer

owner?​

PublicKey

Current owner of the subdomain. Resolved automatically when omitted

Returns​

Promise<TransactionInstruction>

Transaction instruction.

Example​

const instruction = await transferSubdomain(connection, "sub.example.sns", newOwner);