Skip to main content

GET /safe-resolve/:domain

Resolve a full .sns or .sol domain using the same routing as GET /resolve/:domain, with an additional consistency check for SRS-backed .sol resolution.

Request

GET /safe-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 SafeResolveResponse = {
s: "ok";
result: string;
};

When SRS-backed .sol resolution is enabled, the TLD-trimmed name is resolved through both SRS and SNS. The target is returned only when both systems resolve to the same public key. For .sns, or while SRS-backed resolution is disabled, the route follows ordinary /resolve/:domain behavior.

Example

curl "https://sdk-proxy-v2.sns.id/safe-resolve/bonfida.sol"
{
"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.
409SRS and SNS resolution mismatchEnabled SRS and SNS resolution return different targets.
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.