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
| Status | result | When |
|---|---|---|
400 | Invalid input | pubkey is not a valid Solana public key. |
404 | Account not found | The name account or required reverse account is absent. |
502 | RPC unavailable | The selected RPC returns a JSON-RPC error. |
500 | Internal error | No RPC is configured, or another failure occurs. |