Skip to main content

GET /domain-key/:domain

Derive an SNS name-account public key without making an RPC request.

Request

GET /domain-key/:domain

Path parameters

domain

Required. A TLD-less top-level domain such as bonfida, or a one-level subdomain such as team.bonfida. The route trims whitespace, converts the value to lowercase, and derives the corresponding .sns account.

Response

A successful request returns 200 OK with the derived base58 public key:

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

Example

curl "https://sdk-proxy.sns.id/domain-key/bonfida"
{
"s": "ok",
"result": "<DOMAIN_ACCOUNT_PUBLIC_KEY>"
}

Errors

StatusresultWhen
400Invalid inputThe domain has empty labels or more than two labels.
500Internal errorDerivation fails for another unmapped reason.