Skip to main content

GET /reverse-lookup/:pubkey

Return the stored reverse name for an SNS domain account.

Request

GET /reverse-lookup/:pubkey

Path parameters

pubkey

Required. The base58 public key of a domain name account, not a wallet owner.

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 stored reverse name:

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

Example

curl "https://sdk-proxy-v2.sns.id/reverse-lookup/<DOMAIN_ACCOUNT_PUBLIC_KEY>"
{
"s": "ok",
"result": "name"
}

Errors

StatusresultWhen
400Invalid inputpubkey is not a valid Solana public key.
404Account not foundThe name account or required reverse account is absent.
502RPC unavailableThe selected RPC returns a JSON-RPC error.
500Internal errorNo RPC is configured, or another failure occurs.