Skip to main content

JS Kit SDK API Reference / Bindings / createSubdomain

Function: createSubdomain()

createSubdomain(params): Promise<Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]>

Defined in: bindings/createSubdomain.ts:61

Builds the instructions to create a .sns subdomain.

The subdomain registry instruction is always included. The reverse lookup instruction is included only when the reverse lookup account does not exist.

Parameters

params

CreateSubdomainParams

Subdomain creation parameters

Returns

Promise<Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]>

Transaction instructions.

Example

const instructions = await createSubdomain({ rpc, subdomain: "sub.example.sns", owner });