Skip to main content

GET /favorite-domain/:owner

Return the same primary-domain result as GET /primary-domain/:owner.

Request

GET /favorite-domain/:owner

Path parameters

owner

Required. The wallet's base58 public key.

Query parameters

rpc

Optional. A non-empty Solana RPC URL that overrides the proxy Worker's RPC_URL binding for this request.

Response

A successful request returns 200 OK:

type FavoriteDomainResponse = {
s: "ok";
result: {
domain: string;
reverse: string;
stale: boolean;
} | null;
};

The fields and null behavior are identical to GET /primary-domain/:owner.

Example

curl "https://sdk-proxy-v2.sns.id/favorite-domain/<OWNER_PUBLIC_KEY>"
{
"s": "ok",
"result": {
"domain": "<DOMAIN_ACCOUNT_PUBLIC_KEY>",
"reverse": "name",
"stale": false
}
}

Errors

StatusresultWhen
400Invalid inputowner is not a valid Solana public key.
404Resource not foundA configured primary-domain account or referenced domain is absent.
502RPC unavailableThe selected RPC returns a JSON-RPC error.
500Internal errorNo RPC is configured, or another failure occurs.

Status

Compatibility alias. New integrations should use GET /primary-domain/:owner.