Skip to main content

JavaScript SDK API Reference / Domain / getAllSnsDomains

Function: getAllSnsDomains()

getAllSnsDomains(connection): Promise<GetProgramAccountsResponse>

Defined in: utils/getAllSnsDomains.ts:17

Retrieves all registered top-level .sns domain accounts.

The account data is sliced to avoid enormous payloads and only the owner is returned.

Parameters

connection

Connection

Solana RPC connection

Returns

Promise<GetProgramAccountsResponse>

Registered domain accounts with sliced account data.

Example

const domains = await getAllSnsDomains(connection);