> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# getPrimaryDomain

> Resuelve el nombre SNS .sol principal de una wallet, cuando existe.

Resuelve el dominio `.sol` principal de una wallet (dominio favorito estilo Solscan) en una sola llamada RPC. Devuelve el nombre con sufijo `.sol`, o `null` si no hay dominio principal o el favorito ya no es propiedad de la wallet.

Elimina la necesidad de encadenar `getAccountInfo` y `getMultipleAccounts` para resolución SNS.

<Note>
  Este método cuesta **1 crédito** por llamada.
</Note>

Configuración y errores: [inicio rápido RPC](/es/solana-rpc/quickstart). Facturación: [créditos y límites](/es/solana-rpc/credits-and-rate-limits).


## OpenAPI

````yaml getprimarydomain post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
  description: Solana RPC HTTP method reference.
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: getPrimaryDomain
      description: Resolve a wallet’s primary SNS .sol name, when one is set.
      operationId: getprimarydomain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                  description: The JSON-RPC protocol version.
                id:
                  type: string
                  example: '1'
                  default: '1'
                  description: A unique identifier for the request.
                method:
                  type: string
                  enum:
                    - getPrimaryDomain
                  example: getPrimaryDomain
                  default: getPrimaryDomain
                  description: The name of the RPC method to invoke.
                params:
                  type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                    description: Wallet public key.
                    example: 9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p
            examples:
              default:
                summary: Primary domain for wallet
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getPrimaryDomain
                  params:
                    - 9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                  result:
                    type: object
                    properties:
                      context:
                        type: object
                        properties:
                          slot:
                            type: integer
                            example: 423867852
                          apiVersion:
                            type: string
                            example: 3.0.0
                      value:
                        type: object
                        properties:
                          wallet:
                            type: string
                          domain:
                            type: string
                            nullable: true
                            description: >-
                              Primary .sol domain, or null if none is set or no
                              longer owned.
              examples:
                found:
                  summary: Domain found
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        slot: 423867852
                        apiVersion: 3.0.0
                      value:
                        wallet: 9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p
                        domain: solanatracker.sol
                notFound:
                  summary: No domain
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        slot: 423867852
                        apiVersion: 3.0.0
                      value:
                        wallet: FMmaHPDL47V1gXsfh9WjgAT7Er3dfDvarQubTU1Jxc1r
                        domain: null
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
        '401':
          description: Unauthorized - Invalid or missing API key.
        '429':
          description: Too Many Requests - Rate limit exceeded.
        '503':
          description: Service Unavailable - The server is temporarily unavailable.
        '504':
          description: Gateway Timeout - The request timed out.
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.