{"_id":"@agtnames/resolver","_rev":"3-d6971edd2fc88fabbef4761a60fe72ca","name":"@agtnames/resolver","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@agtnames/resolver","version":"1.0.0","license":"MIT","_id":"@agtnames/resolver@1.0.0","maintainers":[{"name":"agtceo","email":"contact@agtdomains.com"}],"bin":{"agt-resolve":"dist/cli.js"},"dist":{"shasum":"0bb475944866beeb62f9176e867d971ddd25bcb3","tarball":"https://registry.npmjs.org/@agtnames/resolver/-/resolver-1.0.0.tgz","fileCount":17,"integrity":"sha512-QI+KYPub7eEwaQa5YCgBVBayunhH7OZbcfO3oHzAmA2X9btWd2BYHKAvTdMka29Dv7HbFZ7SLwxFQDtiTreTfw==","signatures":[{"sig":"MEUCIQC01Ew3EK9+14gvz1m5cBUHo2oxyzch4mh91YEOhq0LyQIgWHjJrcHWtnhAIqjU88CLjVm0fZiesclpgn3wUSkpPu8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43055},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"323f6880d941afb3079d083726ed452448d66400","scripts":{"test":"node --test dist/*.test.js","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"agtceo","email":"contact@agtdomains.com"},"_npmVersion":"11.8.0","description":"Resolve and verify .agt agent names against AGT Registry v2 (raw JSON-RPC, no wallet library needed)","directories":{},"_nodeVersion":"23.3.0","dependencies":{"@noble/curves":"^1.6.0","@noble/hashes":"^1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resolver_1.0.0_1789170205996_0.21380530209413795","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@agtnames/resolver","version":"1.0.1","license":"MIT","_id":"@agtnames/resolver@1.0.1","maintainers":[{"name":"agtceo","email":"contact@agtdomains.com"}],"bin":{"agt-resolve":"dist/cli.js"},"dist":{"shasum":"47a7dfc541bfcea7fd72a50e8a0621303e9e7fe0","tarball":"https://registry.npmjs.org/@agtnames/resolver/-/resolver-1.0.1.tgz","fileCount":16,"integrity":"sha512-656bXs24L/Rt/7uhFHGxdP32eZzZo41SkQuh+Mxi8dbwsfjhdC8hzRlxRI1lrPHQTP6OMcMKotWwZdpx79WC1g==","signatures":[{"sig":"MEYCIQDq4iFEjG9BzkWqfVzb2sqhHTiNzgueLRmLZtn2TKWrEQIhAPObSHaWViRxa+Eoxz5JBaRCMrGGwhdqhnvCEcM4ylmk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41524},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b6b8253583bec6c0ae00ed3f77802ec1a58b6718","scripts":{"test":"node --test dist/*.test.js","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"agtceo","email":"contact@agtdomains.com"},"_npmVersion":"11.8.0","description":"Resolve and verify .agt agent names against AGT Registry v2 (raw JSON-RPC, no wallet library needed)","directories":{},"_nodeVersion":"23.3.0","dependencies":{"@noble/curves":"^1.6.0","@noble/hashes":"^1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resolver_1.0.1_1789184671928_0.11694734126404294","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@agtnames/resolver","version":"1.0.2","description":"Resolve and verify .agt agent names against AGT Registry v2 (raw JSON-RPC, no wallet library needed)","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"bin":{"agt-resolve":"dist/cli.js"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.json","test":"node --test dist/*.test.js"},"dependencies":{"@noble/curves":"^1.6.0","@noble/hashes":"^1.5.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.6.0"},"license":"MIT","gitHead":"a9539e95d1110c526bfef4c9de82507a8d38fa3d","_id":"@agtnames/resolver@1.0.2","_nodeVersion":"23.3.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-IE6JolMfk+gvipMJBP1MQWBry4SwlsJJoezVGG5d5hr31RS1BoFlFmlxtUZ4rGDv2Vm43akgMKwvhYxDdFVtVQ==","shasum":"85f5748fb296098f9db2009609a84ef543555981","tarball":"https://registry.npmjs.org/@agtnames/resolver/-/resolver-1.0.2.tgz","fileCount":16,"unpackedSize":43685,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDqEjrUJBv/TxCopBl5krtr5jbzJIynu+Nxu9PHkzdvbwIhAJhaTLtPxnSQzJJ13dEk6SHmx3TvlrI5JIsFnBa9YKb3"}]},"_npmUser":{"name":"agtceo","email":"contact@agtdomains.com"},"directories":{},"maintainers":[{"name":"agtceo","email":"contact@agtdomains.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resolver_1.0.2_1789197913498_0.4812770954673822"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-11T23:43:25.796Z","modified":"2026-09-12T07:25:13.805Z","1.0.0":"2026-09-11T23:43:26.128Z","1.0.1":"2026-09-12T03:44:32.078Z","1.0.2":"2026-09-12T07:25:13.651Z"},"license":"MIT","description":"Resolve and verify .agt agent names against AGT Registry v2 (raw JSON-RPC, no wallet library needed)","maintainers":[{"name":"agtceo","email":"contact@agtdomains.com"}],"readme":"# @agtnames/resolver\n\nResolve and verify `.agt` agent names against the AGT Registry (Polygon). Reads the registry over raw JSON-RPC — no wallet library — and verifies the agent manifest three ways: the signer, the manifest's declared owner, and the on-chain owner must all agree. Works in Node.js, Deno, Bun, and browsers.\n\n## Install\n\n```\nnpm install @agtnames/resolver\n```\n\n## Quick start\n\n```ts\nimport { AgtResolver } from \"@agtnames/resolver\";\n\nconst agt = new AgtResolver({ chain: \"polygon\" });   // or { rpcUrl, registry }\nconst r = await agt.resolveAgent(\"exampleagent.agt\");\n\nr.owner                 // '0x…' — current on-chain owner\nr.active                // registered and not expired\nr.verified              // manifest passed all checks\nr.records.endpoints.mcp // 'https://…/mcp'\nr.records.addr          // primary address record\nr.manifest              // the full signed manifest (or null)\n```\n\n## API\n\n### `new AgtResolver(options)`\n\n| Option | Description |\n|---|---|\n| `chain` | Named chain: `\"polygon\"` (mainnet; the CLI/MCP default), `\"amoy\"`, `\"localhost\"`. Fills `rpcUrl`, `registry`, `resolver`, `fns` defaults |\n| `rpcUrl` | Override the JSON-RPC endpoint |\n| `registry` | Override the registry contract address (needed only for `localhost` or a custom deployment) |\n| `ipfsGateway` | Gateway for `ipfs://` manifests |\n| `timeoutMs` | Per-request timeout |\n| `maxManifestBytes` | Cap on manifest size (default 256 KiB) |\n| `legacyDns`, `dohUrl` | Opt-in DNS-over-HTTPS fallback for names that predate the registry (off by default) |\n\n### `resolveAgent(name) → AgentResolution`\n\nReturns `owner`, `registered` / `active` / `perpetual`, `records` (`addr`, `manifestUri`, `wallet`, `endpoints`, `texts`), `manifest` (+ `manifestSource`), `verified` / `reasons` / `signer`, and `source`.\n\n### `isAgent(name) → boolean`\n\nResolves a name and returns whether it has a valid, verified manifest.\n\n## Chains\n\n`CHAINS` exports the deployed Registry v2 addresses, so `new AgtResolver({ chain: \"polygon\" })` is a complete configuration:\n\n| Chain | Registry | Resolver | Migration claim |\n|---|---|---|---|\n| `polygon` (137) | `0x5B9386C47395B0551c814cC03b69cbD20eb0C87A` | `0x66Ae037d2A6a770B4772b889b6cA1704504399f2` | `0x4276d03AcbcA433D257FBd90c53F090F4B16d38E` |\n| `amoy` (80002) | `0xd08E0d9BCB26572Eaa22fe27Df53a5D2721D3BCD` | `0xE02f88b9BC0394742bBBe5c590E043B647B83419` | `0xC79A3fb86BcC3637BB58cDcd1f6E12Cf3fFDCBc8` |\n\n`localhost` has no defaults; pass `{ rpcUrl, registry }`.\n\n## How resolution works\n\n1. Derive the token ID from the name; read ownership, status, and the manifest pointer from the registry over JSON-RPC.\n2. Fetch the manifest from its URI (`ipfs://`, `https://`, or `data:`) and verify it — signer, declared owner, and on-chain owner must agree, and `ipfs://` bytes must hash to the CID.\n3. Optionally fall back to DNS-over-HTTPS for legacy names with no on-chain manifest (off by default).\n\n## CLI\n\n```\nnpx agt-resolve exampleagent.agt\n```\n\nPrints a name's resolution as JSON.\n\n## Dependencies & runtimes\n\nNo wallet library, no framework — resolution is raw JSON-RPC plus `fetch`. The only dependencies are the audited `@noble/curves` and `@noble/hashes` primitives (signature recovery and hashing). Runs in Node.js, Deno, Bun, and browsers.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}