{"_id":"@capitalthought/marc-zone-check","_rev":"2-4fcec358834a7dcb5d869f69c497cc92","name":"@capitalthought/marc-zone-check","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@capitalthought/marc-zone-check","version":"0.1.0","keywords":["czds","icann","dns","domain","trademark","zone-file","domain-search","claude-code"],"author":{"name":"Capital Thought, LLC"},"license":"MIT","_id":"@capitalthought/marc-zone-check@0.1.0","maintainers":[{"name":"joshuabaer","email":"npmjs@joshspam.com"}],"homepage":"https://github.com/capitalthought/marc/tree/main/packages/marc-zone-check","bugs":{"url":"https://github.com/capitalthought/marc/issues"},"bin":{"marc-zone-check":"dist/cli.js"},"dist":{"shasum":"a5df09af57906a9df382a708910adfac4462de3b","tarball":"https://registry.npmjs.org/@capitalthought/marc-zone-check/-/marc-zone-check-0.1.0.tgz","fileCount":8,"integrity":"sha512-F//1TIpc/1e45i5nD45VJx7j+frl4oq6g7KntCmtFxZueNaqDiv2d/VQdoWfpuG+OJuXR8xYtJfKB5/xOITAjA==","signatures":[{"sig":"MEYCIQCbPsNOC6orl6hxcRo0BseeggZo+JYUbf1tcFOhPh35DgIhALbkDCIDl4tv5ejqo+7Fl1HTNbnL0sf/fne7wLPDmfO0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40717},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"32179aca25f283a2be5393406a876487ddbffcb6","scripts":{"build":"tsc -p .","prepublishOnly":"npm run build"},"_npmUser":{"name":"joshuabaer","email":"npmjs@joshspam.com"},"repository":{"url":"git+https://github.com/capitalthought/marc.git","type":"git","directory":"packages/marc-zone-check"},"_npmVersion":"11.12.1","description":"Lightning-fast domain-registration check via ICANN CZDS zone files. Used by the /domain-search Claude Code skill as Tier 1.5 between DoH NS scans and WHOIS+RDAP.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/marc-zone-check_0.1.0_1778814324114_0.9320245486884986","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capitalthought/marc-zone-check","version":"0.1.1","description":"Lightning-fast domain-registration check via ICANN CZDS zone files. Used by the /domain-search Claude Code skill as Tier 1.5 between DoH NS scans and WHOIS+RDAP.","type":"module","bin":{"marc-zone-check":"dist/cli.js"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc -p .","prepublishOnly":"npm run build"},"keywords":["czds","icann","dns","domain","trademark","zone-file","domain-search","claude-code"],"author":{"name":"Capital Thought, LLC"},"license":"MIT","homepage":"https://github.com/capitalthought/marc/tree/main/packages/marc-zone-check","repository":{"type":"git","url":"git+https://github.com/capitalthought/marc.git","directory":"packages/marc-zone-check"},"publishConfig":{"access":"public"},"engines":{"node":">=20"},"dependencies":{"zod":"^3.23.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.4.0"},"gitHead":"32179aca25f283a2be5393406a876487ddbffcb6","_id":"@capitalthought/marc-zone-check@0.1.1","bugs":{"url":"https://github.com/capitalthought/marc/issues"},"_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-Rvu8u9qiKEi1sh1GIYu+h+NnUKx0f8qxSHrR1r6KOIdKEJzMbm+FYQaiTcdhUGQ6Ur0cGF4uimXio15/7oC6OA==","shasum":"0872222b2630e7c6c28737b4c809fabf7d4a763b","tarball":"https://registry.npmjs.org/@capitalthought/marc-zone-check/-/marc-zone-check-0.1.1.tgz","fileCount":8,"unpackedSize":40717,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDdfw78H4mqEKUXZpQNAtXnjuBvk9PV8wR3sByxv4+fkwIhAN39kMoKFcV6vJ+7Ks5Nmd53gw7zil3WtlVVJ3tD8IlX"}]},"_npmUser":{"name":"joshuabaer","email":"npmjs@joshspam.com"},"directories":{},"maintainers":[{"name":"joshuabaer","email":"npmjs@joshspam.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/marc-zone-check_0.1.1_1778814463576_0.9729082813255321"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-15T03:05:24.040Z","modified":"2026-05-15T03:07:43.855Z","0.1.0":"2026-05-15T03:05:24.255Z","0.1.1":"2026-05-15T03:07:43.719Z"},"bugs":{"url":"https://github.com/capitalthought/marc/issues"},"author":{"name":"Capital Thought, LLC"},"license":"MIT","homepage":"https://github.com/capitalthought/marc/tree/main/packages/marc-zone-check","keywords":["czds","icann","dns","domain","trademark","zone-file","domain-search","claude-code"],"repository":{"type":"git","url":"git+https://github.com/capitalthought/marc.git","directory":"packages/marc-zone-check"},"description":"Lightning-fast domain-registration check via ICANN CZDS zone files. Used by the /domain-search Claude Code skill as Tier 1.5 between DoH NS scans and WHOIS+RDAP.","maintainers":[{"name":"joshuabaer","email":"npmjs@joshspam.com"}],"readme":"# @capitalthought/marc-zone-check\n\nLightning-fast domain-registration check via ICANN CZDS zone files.\n\nPowers the **Tier 1.5** step in Josh's `/domain-search` Claude Code skill — between Cloudflare DoH NS scanning (Tier 1) and per-domain WHOIS+RDAP (Tier 2). For TLDs you have CZDS approval for, the answer is authoritative (every registered domain appears in the registry's zone file, even those without DNS configured — solves the \"registered without nameservers\" false-positive class that DNS-only checks miss).\n\n## Install\n\n```bash\nnpm i -g @capitalthought/marc-zone-check\n# or one-shot:\nnpx -y @capitalthought/marc-zone-check --domain acme.app\n```\n\n## Get CZDS access\n\nCZDS is ICANN's [Centralized Zone Data Service](https://czds.icann.org/). You need an approved account for each TLD whose zone files you want to read. Sign up at https://czds.icann.org/, request access per-TLD (most approvals take 1-30 days). Once approved, you have:\n\n- **Username + password** — your ICANN account creds\n- **24h JWT** — minted via `POST https://account-api.icann.org/api/authenticate`\n\n## CLI\n\n```bash\n# Auth via env: pre-minted JWT\nexport CZDS_JWT='eyJraWQi...'\nmarc-zone-check --domain acme.app --domain multipov.dev\n\n# Auth via env: username + password (mints fresh JWT per run)\nexport CZDS_USERNAME='you@example.com'\nexport CZDS_PASSWORD='...'\nmarc-zone-check --domains \"acme.app,multipov.dev,foo.xyz\"\n\n# Bare positional args also work\nmarc-zone-check acme.app multipov.dev\n```\n\nOutput (JSON array on stdout):\n\n```json\n[\n  {\"fqdn\":\"acme.app\",\"tld\":\"app\",\"registered\":true,\"source\":\"czds_zone\"},\n  {\"fqdn\":\"multipov.dev\",\"tld\":\"dev\",\"registered\":false,\"source\":\"czds_zone\"},\n  {\"fqdn\":\"foo.com\",\"tld\":\"com\",\"registered\":null,\"source\":\"no_coverage_too_big\",\"compressed_bytes\":26000000000}\n]\n```\n\n`-v` adds per-step progress to stderr.\n\n## Library\n\n```typescript\nimport {\n  ZoneChecker,\n  createCzdsHttpFetcher,\n  mintCzdsJwt,\n} from '@capitalthought/marc-zone-check';\n\nconst jwt = await mintCzdsJwt({ username: '...', password: '...' });\nconst fetcher = createCzdsHttpFetcher({ jwt });\nconst checker = new ZoneChecker({ fetcher });\n\nconst result = await checker.check('acme.app');\n// → { fqdn: 'acme.app', tld: 'app', registered: true, source: 'czds_zone' }\n```\n\n### `source` field\n\n| Value | Meaning |\n|---|---|\n| `czds_zone` | Authoritative — TLD is in CZDS coverage. `registered: true|false`. |\n| `no_coverage_no_approval` | You are not approved for this TLD (or it's not in CZDS at all). Fall through to WHOIS. |\n| `no_coverage_too_big` | TLD zone exceeds the in-memory cap (default 200 MB compressed — covers most gTLDs but excludes `.com`, `.net`, `.org`, `.info`). For these, use `checker.checkFiltered()` which streams without caching, OR fall through to WHOIS. `compressed_bytes` is populated. |\n| `no_coverage_invalid_fqdn` | Input has no dot or is malformed. |\n| `fetch_failed` | HTTP / parse / network error. `error` field is populated. |\n\n### Memory model\n\nTwo parse strategies live alongside each other:\n\n- **Full-Set caching** (`checker.check()`) — stream-parse the zone file once, cache the full `Set<string>` of registered SLDs in memory, then O(1) lookups for the lifetime of the process. Used by default. Capped at 200 MB compressed input (configurable via `createCzdsHttpFetcher({ maxCompressedBytes })`) — over that, `no_coverage_too_big`.\n\n- **Filtered streaming** (`checker.checkFiltered(fqdns)`) — stream-parse the zone, only retain `true`/`false` answers for the specific FQDNs you asked about. Memory is O(N candidates), not O(M registered SLDs). Use this for `.com`/`.net`/`.org` where the full-Set variant would OOM. NB: every call streams fresh; no cache.\n\nMost use cases want the default. Mega-TLDs need the filtered path.\n\n## Live test (.pro is ~33 MB compressed)\n\n```bash\n$ time marc-zone-check -v --domain marc.pro --domain zzznever12345.pro\n[jwt] using $CZDS_JWT\n[check] marc.pro              → TAKEN_ZONE\n[check] zzznever12345.pro     → UNREG_ZONE\n[{\"fqdn\":\"marc.pro\",\"tld\":\"pro\",\"registered\":true,\"source\":\"czds_zone\"},\n {\"fqdn\":\"zzznever12345.pro\",\"tld\":\"pro\",\"registered\":false,\"source\":\"czds_zone\"}]\nreal    0m6.0s\n```\n\nvs. ~20s for the equivalent WHOIS+RDAP fan-out.\n\n## License\n\nMIT. (c) Capital Thought, LLC.\n","readmeFilename":"README.md"}