Skip to main content

JavaScript SDK API Reference / Bindings / setBackground

Function: setBackground()

setBackground(connection, domain, bg, owner): Promise<TransactionInstruction[]>

Defined in: bindings/setBackground.ts:36

Builds the instructions to set an issued custom background for a top-level .sns domain.

Parameters​

connection​

Connection

Solana RPC connection

domain​

string

Full .sns domain name

bg​

CustomBg

The issued custom background to set

owner​

PublicKey

Current owner of the domain

Returns​

Promise<TransactionInstruction[]>

Transaction instructions.

Example​

const instructions = await setBackground(connection, "example.sns", CustomBg.DegenPoet1, owner);