JavaScript SDK API Reference / Address / getSnsDomainsForOwner
Function: getSnsDomainsForOwner()
getSnsDomainsForOwner(
connection,wallet):Promise<SnsDomain[]>
Defined in: utils/getSnsDomainsForOwner.ts:37
Retrieves directly registry-owned top-level .sns domains for a wallet.
Tokenized domains and subdomains are not included.
Parameters
connection
Connection
Solana RPC connection
wallet
PublicKey
Wallet whose directly registry-owned domains are retrieved
Returns
Promise<SnsDomain[]>
Domain records containing the domain name and its name account public key
Example
const domains = await getSnsDomainsForOwner(connection, wallet);