SDKs & Client Libraries

Use ResolveDB from standard DNS and HTTP clients while official SDKs are prepared for release.

No SDK Required

ResolveDB uses DNS, DoH, DoT, and a JSON DNS endpoint. Any language with a DNS or HTTP client can query it directly.

Live DNS Query
dig TXT
Query breakdown:
operation:getparams:quebecresource:weathernamespace:publicversion:v1
dig TXT get.quebec.weather.public.v1.resolvedb.net +short
const name = 'get.quebec.weather.public.v1.resolvedb.net';
const response = await fetch(
  `https://doh.resolvedb.io/resolve?name=${encodeURIComponent(name)}&type=TXT`,
);
const dns = await response.json();

See the DoH JSON guide for correct TXT character-string joining and UQRP payload decoding.

Official SDK Status

Current official clients are not yet published. Do not install packages that claim to be the current ResolveDB SDK unless a release is linked from this page. The older public Go v0.1.0 client predates the production protocol and is not compatible with the current service.

Preview SDKs implement typed public-service queries, private query-token support, redaction, and response parsing. Go supports DNS and DoH; JavaScript uses DoH. Publication is a separate release gate.

The repository's preview Go/JavaScript clients now preserve actual hosted payloads, including terminal semicolons, quotes, backslashes, UTF-8 and arbitrary binary. TXT e=b64 is standard padded Base64. Raw decoded bytes are available as Response.Data (Go) / response.data (JavaScript). Flat ordinary fields and dataset envelopes remain distinct. Payload ttl metadata is a hint, not the effective DNS cache lifetime. MCP retains these payloads as redacted UTF-8 or Base64 alongside fields; package publication remains pending.

Preview clients also preserve DNS outcomes through Go UDP/TCP/DoH, JavaScript DoH, and MCP:

DNS outcomeGo (errors.Is)JavaScript / MCP code
Eligible TXT valueDecoded responseDecoded response
Empty NOERRORErrNotFoundNotFoundError
FORMERRErrInvalidQueryInvalidQueryError
REFUSEDErrRefusedRefusedError
SERVFAILErrServerServerError

Other RCODEs retain their numeric identity in DNSResponseError (Go) / DnsResponseError (JavaScript). MCP errors include structuredContent.error.code and a generic redacted message. HTTP, media, redirect, and network failures remain separate from product DNS outcomes. DoH is HTTPS-only, rejects redirects, and never falls back to cleartext DNS. DNSSEC support records are not additional product TXT values or automatic SDK verification. Actual all-family public/hosted/schema/dataset-temporal response conformance is verified, including hosted binary payloads, absence, expiry, and corrupt-state failure. Location conformance also covers weather/forecast/sun/GeoIP through native/DoH and generic consumers, plus typed weather/forecast/GeoIP MCP tools. Weather and forecast retain payload TTL hints distinct from DNS TTLs. Case-stable encoding is implemented: Go B32Param and JavaScript b32Param emit lowercase unpadded RFC4648 Base32; hex and direct coordinate/IP/w3w remain supported. Retired Base64 query encoders are removed. Structured coordinate JSON and ordered encoded hosted keys are covered by native/DoH/client conformance. MCP's raw tool blocks encoder prefixes before its one SDK call; use typed location tools for direct forms. Canonical resource versions are implemented: v[1-9][0-9]*, up to 63 ASCII bytes, DNS-case-insensitive, with exact hosted selection and explicitly supported public versions (currently v1).

Use the generic query operation for computed services. Their ordinary results keep resource values in fields (Go: Fields), with no d= payload or payload TTL hint. The stdio MCP uqrp_query tool retains those flat fields. BTC height's ts is available as the SDK response timestamp; src=mock identifies its source.

ResolveDB does not currently provide hosted blob fallback, DNS write operations, or automatic large-record chunk reassembly. Hosted record writes use the REST API, and each decoded record payload is limited to 2,586 bytes.

Write Hosted Records

Use the customer REST API or dashboard. The REST data field is strict Base64; the 2,586-byte limit applies after decoding.

curl -X POST https://api.resolvedb.com/api/v1/records \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "record": {
      "key": "config.your-namespace.v1",
      "data": "eyJoZWxsbyI6IndvcmxkIn0="
    }
  }'

Private DNS reads require a namespace query token as described in the Quickstart.

Stay Updated

Create an account or return to this page for release links.