Skip to main content

JavaScript SDK API Reference / Bindings / transferDomain

Function: transferDomain()

transferDomain(connection, domain, newOwner): Promise<TransactionInstruction>

Defined in: bindings/transferDomain.ts:23

Builds an instruction to transfer a top-level .sns domain.

Parameters

connection

Connection

Solana RPC connection

domain

string

Full .sns domain name

newOwner

PublicKey

New owner of the domain

Returns

Promise<TransactionInstruction>

Transaction instruction.

Example

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