Name service endpoints
Resolve ENS
GET /api/v1/ens/resolve/:name returns ENS + meta-address details.
Resolve SuiNS
GET /api/v1/suins/resolve/:name returns SuiNS + meta-address details.
Endpoints
GET /api/v1/ens/resolve/:nameGET /api/v1/suins/resolve/:name
Resolution behavior
Read name service record
ENS checks specter text record first and falls back to ENS content hash when needed. SuiNS reads content hash.
Extract CID and fetch from IPFS
Resolver parses CID formats (ipfs://, /ipfs/, raw CID) and downloads raw bytes from configured gateway.
Decode and validate
Backend decodes bytes into MetaAddress and validates key structure before responding.
Request params
ENS name like alice.eth or SuiNS name like alice.sui.
Supported on SuiNS resolve endpoint. If present, clears resolver cache before lookup.
Response schema
Hex-encoded SPECTER meta-address.
Hex-encoded spending public key.
Hex-encoded viewing public key.
CID where meta-address bytes were fetched.
ENS-specific response field
ENS responses include ens_name.
SuiNS-specific response field
SuiNS responses include suins_name.
Example calls
- ENS
- SuiNS
- JavaScript
curl -s "https://backend.specterpq.com/api/v1/ens/resolve/alice.eth" | jq .
curl -s "https://backend.specterpq.com/api/v1/suins/resolve/alice.sui?no_cache=1" | jq .
const ensRes = await fetch("https://backend.specterpq.com/api/v1/ens/resolve/alice.eth");
const ensData = await ensRes.json();
console.log(ensData.meta_address);
Name-service lookups are always fresh. IPFS downloads can be cached by CID in resolver clients.