Skip to main content
Solana Name Service (SNS) domains give wallets a human-readable .sol identity. Instead of showing only a base58 wallet address, you can display names like solanatracker.sol, resolve a domain back to its owner, or fetch every .sol name a wallet owns. The Ridge custom RPC SNS methods resolve this data in one RPC call. You do not need to manually chain account lookups, decode name registry accounts, or maintain a client-side cache just to show wallet identity.
Each SNS RPC method costs 1 credit per call. Twitter/X handles (.twitter) are not supported.

What you can build

Use the SNS methods for:
  • Wallet labels in dashboards, leaderboards, and portfolio views.
  • Batch identity enrichment for lists of traders or holders.
  • Profile pages that show every .sol domain owned by a wallet.
  • Search boxes that accept name.sol and resolve it to a wallet.
GoalMethod
Get one wallet’s primary .sol domaingetPrimaryDomain
Resolve primary domains for many walletsgetMultiplePrimaryDomains
List all .sol domains owned by a walletgetAllDomains
Resolve name.sol to an owner walletresolveSolDomain

RPC endpoint

All examples use JSON-RPC 2.0 over HTTP:
https://rpc-mainnet.solanatracker.io/?api_key=YOUR_API_KEY

Get a wallet’s primary domain

Use getPrimaryDomain when you want the display label most users expect: the wallet’s primary or favourite .sol domain.
curl "https://rpc-mainnet.solanatracker.io/?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getPrimaryDomain",
    "params": ["9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p"]
  }'
When a domain exists:
{
  "context": { "slot": 423867852, "apiVersion": "3.0.0" },
  "value": {
    "wallet": "9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p",
    "domain": "solanatracker.sol"
  }
}
When no primary domain exists, domain is null:
{
  "context": { "slot": 423867852, "apiVersion": "3.0.0" },
  "value": {
    "wallet": "FMmaHPDL47V1gXsfh9WjgAT7Er3dfDvarQubTU1Jxc1r",
    "domain": null
  }
}
In UI, use the domain as the label when present, and fall back to a shortened wallet address when domain is null.

Batch primary domains

Use getMultiplePrimaryDomains when rendering lists of wallets: holders, traders, leaderboard rows, copy-trading candidates, or activity feeds. The method accepts up to 100 wallets and returns results in the same order as the input list.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultiplePrimaryDomains",
  "params": [
    [
      "9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p",
      "FMmaHPDL47V1gXsfh9WjgAT7Er3dfDvarQubTU1Jxc1r"
    ]
  ]
}
Example response:
{
  "context": { "slot": 423867852, "apiVersion": "3.0.0" },
  "value": {
    "results": [
      {
        "wallet": "9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p",
        "domain": "solanatracker.sol"
      },
      {
        "wallet": "FMmaHPDL47V1gXsfh9WjgAT7Er3dfDvarQubTU1Jxc1r",
        "domain": null
      }
    ]
  }
}
Because the response preserves input order, you can merge it back into a wallet list by array index:
const wallets = [
  "9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p",
  "FMmaHPDL47V1gXsfh9WjgAT7Er3dfDvarQubTU1Jxc1r"
];

const { result } = await fetch(rpcUrl, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getMultiplePrimaryDomains",
    params: [wallets]
  })
}).then(r => r.json());

const rows = wallets.map((wallet, i) => ({
  wallet,
  displayName: result.value.results[i].domain ?? `${wallet.slice(0, 4)}...${wallet.slice(-4)}`
}));

Get all domains owned by a wallet

Use getAllDomains for wallet profile pages, domain portfolios, or account settings screens where the user expects to see every .sol name they own.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAllDomains",
  "params": ["9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p"]
}
Response:
{
  "context": { "slot": 423867852, "apiVersion": "3.0.0" },
  "value": {
    "wallet": "9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p",
    "domains": ["solanatracker.sol", "othername.sol"]
  }
}
If the wallet has no domains, domains is an empty array.

Resolve a domain to an owner

Use resolveSolDomain when a user types a .sol name and you need the owner wallet.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "resolveSolDomain",
  "params": ["solanatracker.sol"]
}
Response:
{
  "context": { "slot": 423867852, "apiVersion": "3.0.0" },
  "value": {
    "domain": "solanatracker.sol",
    "owner": "9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p",
    "nameAccount": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
  }
}
If the domain is not found, value is null. resolveSolDomain supports root .sol domains like name.sol and one-level subdomains like sub.parent.sol.

Example: wallet identity helper

This helper uses primary domains for display and keeps the wallet address available for linking, copying, or transaction actions.
function shortWallet(wallet) {
  return `${wallet.slice(0, 4)}...${wallet.slice(-4)}`;
}

async function getWalletIdentity(wallet) {
  const { result } = await fetch(
    "https://rpc-mainnet.solanatracker.io/?api_key=YOUR_API_KEY",
    {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        jsonrpc: "2.0",
        id: 1,
        method: "getPrimaryDomain",
        params: [wallet]
      })
    }
  ).then(r => r.json());

  return {
    wallet,
    label: result.value.domain ?? shortWallet(wallet),
    domain: result.value.domain
  };
}

Choosing the right SNS method

SituationRecommendation
Single wallet profile headergetPrimaryDomain
Leaderboard or holder tablegetMultiplePrimaryDomains
Domain portfolio pagegetAllDomains
Search input accepts .sol namesresolveSolDomain
PnL V2 response already includes identity.snsUse the included PnL V2 identity field
PnL V2 already includes SNS identity in supported wallet and token analytics responses. Use these RPC methods when you need SNS resolution directly from the Solana RPC surface.

UI and product tips

  • Always keep the wallet address available, even when showing a domain.
  • Treat domain: null as a normal result, not an error.
  • Use batch resolution for tables and feeds instead of calling getPrimaryDomain in a loop.
  • Show .sol names as labels, but copy and link the underlying wallet address.
  • For user search, resolve .sol names first, then continue with the returned owner wallet.

getMultiplePrimaryDomains

Batch primary .sol domains for up to 100 wallets.

PnL V2 SNS Identity

See where SNS identity appears in PnL V2 responses.