Skip to main content

GET /resolve/:domain

Resolve a full .sns or .sol domain to its effective target public key.

Request

GET /resolve/:domain

Path parameters

domain

Required. A full domain ending in .sns or .sol. The value before the suffix must contain one non-empty label, such as name.sns, or two non-empty labels, such as team.name.sns.

The route trims surrounding whitespace and converts the value to lowercase. Bare names, unsupported suffixes, empty labels, and deeper subdomains are rejected.

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 with the effective target as a base58 public key:

type ResolveResponse = {
s: "ok";
result: string;
};

For .sns, resolution checks an active tokenized-domain owner, a valid V2 SOL record, a valid V1 SOL record, and then the registry owner, in that order.

For .sol, the SDK uses SNS-backed resolution while the selected RPC reports a finalized slot below 452,825,395. At or after that slot, the SDK automatically pauses .sol resolution and the route returns 400 Unsupported TLD.

For .sol requests that must require matching SRS and SNS targets when SRS-backed resolution is enabled, use GET /safe-resolve/:domain.

Example

curl "https://sdk-proxy-v2.sns.id/resolve/bonfida.sns"
{
"s": "ok",
"result": "<TARGET_PUBLIC_KEY>"
}

Errors

Error responses use { "s": "error", "result": string }.

StatusresultWhen
400Invalid inputThe value before the suffix has empty labels or more than two labels.
400Unsupported TLDThe suffix is missing or unsupported, or SDK-managed .sol resolution has paused.
404Domain not foundThe requested domain registry does not exist.
422Record is malformedA selected resolution record has malformed content or unsupported validation.
502RPC unavailableThe selected Solana RPC returns a JSON-RPC error.
500Internal errorNo RPC endpoint is configured, or resolution fails for another unmapped reason.