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)

Last updated