diff --git a/AGENTS.md b/AGENTS.md index 1b1f5e13..a8164ea5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,7 +17,7 @@ This is a JavaScript SDK + docs monorepo. There is no database, Docker, or local ### Key commands - **SDK dependencies:** `cd sdk && npm install` (uses `package-lock.json`) -- **SDK lint:** `cd sdk && npm run lint` (ESLint 8; the repo has pre-existing warnings/errors in committed code — this is expected) +- **SDK lint:** `cd sdk && npm run lint` (ESLint 8 — should report 0 errors, 0 warnings) - **SDK test:** `cd sdk && npm test` (Vitest — 73 unit tests, all mocked, no network needed) - **SDK build:** `cd sdk && npm run build` (esbuild: widgets + CJS bundles) - **Docs validation:** `npm run docs:validate` (from repo root; runs markdownlint + Redocly OpenAPI lint) @@ -26,7 +26,9 @@ This is a JavaScript SDK + docs monorepo. There is no database, Docker, or local ### Notes - The root `package.json` only has docs scripts; the SDK has its own `package.json` in `sdk/`. -- ESLint reports warnings and errors on committed code. This is the repo's baseline state — do not try to fix pre-existing lint issues unless specifically asked. +- Lint should be clean (0 errors, 0 warnings). If you introduce lint issues, fix them before committing. - Live integration tests are opt-in via `NEUS_SDK_LIVE_TESTS=1`. Unit tests mock `fetch` and run fully offline. - `constructVerificationMessage()` requires a `chainId` parameter (not just `walletAddress` and `verifierIds`). - Node.js >= 20 is required (CI uses 20.19.0). +- The standalone widget (`sdk/widgets/verify-gate/standalone.js`) is an intentional ES5 IIFE — `var` usage there is correct, not an error. ESLint has an override for it. +- MCP server (`@neus/mcp-server`) lives in the separate `protocol` repo, not in this repo. The docs reference it at `https://mcp.neus.network/mcp`. diff --git a/docs/choose-an-integration-path.mdx b/docs/choose-an-integration-path.mdx index d78918ce..e630a433 100644 --- a/docs/choose-an-integration-path.mdx +++ b/docs/choose-an-integration-path.mdx @@ -4,34 +4,32 @@ description: Pick the fastest path for your product. icon: route --- -**New integration?** Complete **[Get started](./get-started)** (platform profile, app link, credits) before you choose an integration path. +Not sure where to start? Pick the path that matches what you need. -## Options + + **New here?** Complete **[Get started](./get-started)** first (platform profile, app link, credits). + -| You need | Use | Why | -|----------|-----|-----| -| Guided verification / login | [Hosted Verify](./cookbook/auth-hosted-verify) | Users finish in NEUS; you use `returnUrl` + session | -| React gating or badges | [Widgets](./widgets/overview) | `VerifyGate`, `ProofBadge` | -| Custom flow in code | [SDK](./sdks/overview) | Full control | -| Server-only | [API](./api/overview) | HTTP from your servers | -| AI / IDE tools | [MCP](./mcp/overview) | Add one URL; **open hosted links** tools return; optional Bearer like the SDK | +## Pick your path -**MCP:** URL alone does not sign the IDE in — for “who am I” after login, same **`Authorization: Bearer`** as [SDK Authentication](./sdks/authentication). +| You need | Use | Effort | +|----------|-----|--------| +| Guided verification / login | [Hosted Verify](./cookbook/auth-hosted-verify) | Redirect or popup — no UI to build | +| React gating or badges | [Widgets](./widgets/overview) | One component — `` | +| Custom flow in code | [SDK](./sdks/overview) | Full programmatic control | +| Server-side checks | [API](./api/overview) | HTTP from any language | +| AI agents (Cursor, Claude) | [MCP](./mcp/overview) | One URL — `https://mcp.neus.network/mcp` | -**Partner / domain setup:** [Partner setup](./cookbook/hub-integrator). +## Quick links -**Who pays:** [Get started](./get-started) checklist + [Billing](./platform/billing) reference. - -## Deep links - - + + + First proof in 5 minutes. + Platform, app, credits, billing. - - First proof in code. - - Pick verifiers. + All verification types. diff --git a/sdk/package.json b/sdk/package.json index e6e9f74a..e5a6e917 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -79,7 +79,7 @@ }, "homepage": "https://neus.network", "engines": { - "node": ">=16.0.0" + "node": ">=20.0.0" }, "peerDependencies": { "ethers": "^6.0.0",