For the complete documentation index, see llms.txt. This page is also available as Markdown.

Resolve Domains

Resolving a domain involves finding its corresponding owner wallet address. Learn more about SNS resolution methodology and the steps involved to finally resolve an address from a domain here: On-Chain Resolution.

import { resolve } from "@bonfida/spl-name-service";

const domain = "bonfida.sol" // With or without .sol

// The config argument to resolve is optional
// If allowPDA is true, a list of program IDs is required
const resolveConfig = { allowPDA: true, programIds: ["..."] }

// Final argument is optional
const resolvedAddress = await resolve(connection, domain, resolveConfig)
import { resolveDomain } from "@solana-name-service/sns-sdk-kit";

const domain = "sns.sol" // With or without .sol

// The options argument is not required to be passed
// If allowPDA is true, a list of program IDs is required.
const resolveOptions = { allowPda: true, programIds: ["..."] }

const resolvedAddress = await resolveDomain({ rpc, domain, options:resolveOptions });

Last updated