diff --git a/README.md b/README.md index 2c2dd459..51a125bb 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,57 @@ -# NEUS +

+ + NEUS + +

-[![npm](https://img.shields.io/npm/v/%40neus%2Fsdk?logo=npm&label=@neus/sdk)](https://www.npmjs.com/package/@neus/sdk) -[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE) +

NEUS

-**Verify once. Reuse everywhere.** +

+ Verify once. Prove everywhere.
+ Portable proof receipts for apps, APIs, and agents. +

-NEUS gives apps, APIs, and agents a reusable proof receipt for identity, ownership, risk, and access. Run a check once, get a portable receipt, and use it to gate, share, or automate anywhere. +

+ npm + License + Discussions +

-## Use NEUS to +

+ Quickstart · + Docs · + API Reference · + MCP · + Examples +

-- **Verify users once** and reuse the result across your product -- **Gate access** by proof instead of custom auth logic -- **Attach proof to content**, listings, and agent actions -- **Register agents** and give them scoped permissions -- **Share verification results** without exposing raw private data +--- + +Every app makes you re-verify. That's why bots win and users lose. + +NEUS fixes it: **verify once, get a portable proof receipt, reuse it everywhere.** Gate access, attach proof to content, register agents with scoped permissions — private by default, public when you choose. + +> Auth got standardized (OAuth). Payments got standardized (Stripe). **Verification is still bespoke.** NEUS standardizes it into one receipt. + +## Why NEUS + +- **Stop re-verifying.** One check produces a receipt your whole stack can trust +- **Gate access with proof, not auth spaghetti.** One line of code replaces custom verification logic +- **Proof travels, data stays private.** Share the result without exposing underlying data +- **Ship trust in minutes.** Drop-in SDK, widgets, and API — not months of infra +- **Works for people and agents.** Same receipt format for human users and AI agents ## How it works -1. **Verify** — User completes a check (wallet, social, identity, or risk). -2. **Get a receipt** — You receive a portable proof ID. -3. **Reuse it** — Gate content, check eligibility, share badges, or automate with it. +``` + ┌──────────┐ ┌──────────────┐ ┌──────────────────┐ + │ Verify │ ──▶ │ Get receipt │ ──▶ │ Reuse anywhere │ + │ │ │ (proofId) │ │ │ + │ wallet, │ │ portable, │ │ gate, share, │ + │ social, │ │ private by │ │ post, automate, │ + │ identity │ │ default │ │ delegate │ + └──────────┘ └──────────────┘ └──────────────────┘ +``` ## Quick start @@ -32,73 +64,100 @@ import { NeusClient } from '@neus/sdk'; const client = new NeusClient(); +// 1. Verify const proof = await client.verify({ verifier: 'ownership-basic', content: 'My content', wallet: window.ethereum, }); -const proofId = proof.proofId; // save this — reuse it everywhere +// 2. Save the receipt +const proofId = proof.proofId; + +// 3. Reuse — check eligibility from anywhere +const check = await client.gateCheck({ + address: '0x...', + verifierIds: ['ownership-basic'], +}); +// check.data.eligible → true/false ``` +> **No wallet in your app?** Use [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) — redirect or popup, zero wallet code. + ## What you can build -| Use case | How | -|----------|-----| -| Human-only signup or access | `proof-of-human` verifier | -| Token / NFT gated products | `nft-ownership`, `token-holding` | -| Verified creator or org badges | `ownership-basic`, `ownership-org-oauth` | -| Proof-backed content and posts | Attach `proofId` to any content | -| Agent identity and delegation | `agent-identity`, `agent-delegation` | -| Domain-verified organizations | `ownership-dns-txt` | +| Use case | How | Verifier | +|----------|-----|----------| +| 🛡️ Human-only access | Block bots at signup | `proof-of-human` | +| 🎨 NFT / token gated products | Gate by on-chain holdings | `nft-ownership` · `token-holding` | +| ✅ Verified creator badges | Prove authorship, bind to wallet | `ownership-basic` | +| 🏢 Org-verified teams | Prove domain or org membership | `ownership-dns-txt` · `ownership-org-oauth` | +| 🤖 Agent identity + delegation | Register agents, scope permissions | `agent-identity` · `agent-delegation` | +| 📝 Proof-backed content | Attach proof to posts and listings | `ownership-basic` + `proofId` | ## Start here | I want to… | Go to | |-------------|-------| -| Try it in 5 minutes | [Quickstart](https://docs.neus.network/quickstart) | -| Use hosted UI (no wallet code) | [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) | -| Gate content in React | [Widgets](https://docs.neus.network/widgets/overview) | -| Check proofs from my server | [API](https://docs.neus.network/api/overview) | -| Add verification to AI agents | [MCP](https://docs.neus.network/mcp/overview) | -| Set up billing and apps | [Get started](https://docs.neus.network/get-started) | +| **Try it in 5 minutes** | [Quickstart](https://docs.neus.network/quickstart) | +| **Add verification with no code** | [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) | +| **Gate content in React** | [Widgets](https://docs.neus.network/widgets/overview) | +| **Check proofs from my server** | [API Reference](https://docs.neus.network/api/overview) | +| **Add trust to AI agents** | [MCP](https://docs.neus.network/mcp/overview) | +| **Set up platform + billing** | [Get Started](https://docs.neus.network/get-started) | ## Integration paths -| Path | Best for | -|------|----------| -| [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) | Login, social linking — no custom UI needed | -| [Widgets](https://docs.neus.network/widgets/overview) | React gating and badges | -| [SDK](https://docs.neus.network/sdks/overview) | Custom browser or server flows | -| [API](https://docs.neus.network/api/overview) | Server-side checks | -| [MCP](https://docs.neus.network/mcp/overview) | AI agents (Cursor, Claude, etc.) | +| Path | Best for | Effort | +|------|----------|--------| +| [**Hosted Verify**](https://docs.neus.network/cookbook/auth-hosted-verify) | Login, guided verification | Redirect / popup — no UI to build | +| [**Widgets**](https://docs.neus.network/widgets/overview) | React gating + badges | `` — one component | +| [**SDK**](https://docs.neus.network/sdks/overview) | Custom flows | Full programmatic control | +| [**API**](https://docs.neus.network/api/overview) | Server-side checks | HTTP from any language | +| [**MCP**](https://docs.neus.network/mcp/overview) | AI agents (Cursor, Claude) | One URL — `https://mcp.neus.network/mcp` | + +## Gate content in React + +```jsx +import { VerifyGate } from '@neus/sdk/widgets'; + + + + +``` ## AI agents (MCP) Add NEUS to any MCP-compatible agent with one URL: -``` -https://mcp.neus.network/mcp +```json +{ + "mcpServers": { + "neus": { "url": "https://mcp.neus.network/mcp" } + } +} ``` -[Setup guide](https://docs.neus.network/mcp/setup) — one JSON block, then agents verify users via hosted links. +Agents verify users via hosted links that tools return. [Setup guide →](https://docs.neus.network/mcp/setup) ## Documentation | Resource | Description | |----------|-------------| -| [Quickstart](https://docs.neus.network/quickstart) | First proof in 5 minutes | -| [Verifier catalog](https://docs.neus.network/verification/verifiers) | All verification types | -| [API reference](https://docs.neus.network/api/overview) | HTTP endpoints | -| [Examples](./examples/) | React, Node.js, curl | +| [**Quickstart**](https://docs.neus.network/quickstart) | First proof in 5 minutes | +| [**Verifier catalog**](https://docs.neus.network/verification/verifiers) | All verification types | +| [**API reference**](https://docs.neus.network/api/overview) | HTTP endpoints | +| [**SDK reference**](https://docs.neus.network/sdks/javascript) | JavaScript SDK | +| [**Examples**](./examples/) | React, Node.js, curl | -## Support +## Community -| Channel | Use for | -|---------|---------| -| [GitHub Discussions](https://github.com/neus/network/discussions) | Questions | +| Channel | | +|---------|---| +| [GitHub Discussions](https://github.com/neus/network/discussions) | Questions and ideas | | [GitHub Issues](https://github.com/neus/network/issues) | Bug reports | -| [dev@neus.network](mailto:dev@neus.network) | Security | +| [dev@neus.network](mailto:dev@neus.network) | Security disclosures | ## License diff --git a/docs/index.mdx b/docs/index.mdx index 09cf340d..a9b724da 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -1,55 +1,53 @@ --- title: NEUS Documentation -description: Verify once. Reuse everywhere. Portable proof receipts for apps, APIs, and agents. +description: Verify once. Prove everywhere. Portable proof receipts for apps, APIs, and agents. icon: house --- -**Verify once. Reuse everywhere.** +**Every app makes you re-verify. NEUS fixes it.** -NEUS gives your app a reusable proof receipt for identity, ownership, risk, and access. Run a check once, get a receipt, and use it to gate, share, or automate anywhere. - -## Start here +Verify once, get a portable proof receipt, reuse it everywhere — gate access, attach proof to content, register agents, share results without exposing raw data. Private by default. First proof in 5 minutes. - - Platform setup, billing, app linking. - No-code verification UI. + + Platform, billing, app setup. + +## How it works + +1. **Verify** — User completes a check (wallet, social, identity, or risk). +2. **Get a receipt** — You receive a portable proof ID. Private by default. +3. **Reuse it** — Gate content, check eligibility, share badges, delegate to agents. + ## What you can build | Use case | Verifier | |----------|----------| | Human-only signup or access | `proof-of-human` | -| Token / NFT gated products | `nft-ownership`, `token-holding` | -| Verified creator or org badges | `ownership-basic`, `ownership-org-oauth` | +| Token / NFT gated products | `nft-ownership` · `token-holding` | +| Verified creator or org badges | `ownership-basic` · `ownership-org-oauth` | | Proof-backed content and posts | `ownership-basic` | -| Agent identity and delegation | `agent-identity`, `agent-delegation` | +| Agent identity and delegation | `agent-identity` · `agent-delegation` | | Domain-verified organizations | `ownership-dns-txt` | [Full verifier catalog →](./verification/verifiers) -## How it works - -1. **Verify** — User completes a check (wallet, social, identity, or risk). -2. **Get a receipt** — You receive a portable proof ID. -3. **Reuse it** — Gate content, check eligibility, share badges, or automate with it. - -## Choose your integration +## Choose your path -| Path | Best for | -|------|----------| -| [Hosted Verify](./cookbook/auth-hosted-verify) | Login, social linking — no custom UI | -| [Widgets](./widgets/overview) | React gating and badges | -| [SDK](./sdks/overview) | Custom browser or server flows | -| [API](./api/overview) | Server-side checks | -| [MCP](./mcp/overview) | AI agents (Cursor, Claude, etc.) | +| Path | Best for | Effort | +|------|----------|--------| +| [Hosted Verify](./cookbook/auth-hosted-verify) | Login, guided verification | Redirect / popup | +| [Widgets](./widgets/overview) | React gating + badges | One component | +| [SDK](./sdks/overview) | Custom flows | Full control | +| [API](./api/overview) | Server-side checks | HTTP | +| [MCP](./mcp/overview) | AI agents (Cursor, Claude) | One URL | Not sure? [Choose an integration path →](./choose-an-integration-path) diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 4e0f7f24..0389ca61 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -4,10 +4,10 @@ description: Create your first proof in under 5 minutes. icon: rocket --- -Install the SDK, create a proof, and reuse it. +Install the SDK, create a proof, and reuse it — 5 minutes. - **Shipping an app?** Do **[Get started](./get-started)** first (platform → app link → credits → `appId`). Then come back here for code. + **Shipping a product?** Do **[Get started](./get-started)** first (platform → app link → credits). Then come back here for code. ## 1. Install the SDK @@ -29,11 +29,11 @@ const proof = await client.verify({ wallet: window.ethereum, }); -const proofId = proof.proofId; // save this +const proofId = proof.proofId; // save this — reuse it everywhere ``` - **No in-app wallet?** Use [Hosted Verify](./cookbook/auth-hosted-verify) — redirect or popup, no wallet code needed. + **No wallet in your app?** Use [Hosted Verify](./cookbook/auth-hosted-verify) — redirect or popup, zero wallet code. ## 3. Wait for completion @@ -45,7 +45,7 @@ const status = await client.pollProofStatus(proofId, { }); ``` -## 4. Reuse: gate content in React +## 4. Gate content in React ```jsx import { VerifyGate } from '@neus/sdk/widgets'; @@ -55,7 +55,7 @@ import { VerifyGate } from '@neus/sdk/widgets'; ``` -## 5. Reuse: check eligibility from your server +## 5. Check eligibility from your server ```javascript const result = await client.gateCheck({ diff --git a/sdk/README.md b/sdk/README.md index 433a165c..02dc74be 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -1,6 +1,8 @@ # @neus/sdk -JavaScript SDK for NEUS — verify once, reuse everywhere. +[![npm](https://img.shields.io/npm/v/%40neus%2Fsdk?logo=npm&label=%40neus%2Fsdk&color=98C0EF)](https://www.npmjs.com/package/@neus/sdk) + +**Verify once. Prove everywhere.** JavaScript SDK for portable proof receipts. ## Install @@ -8,7 +10,7 @@ JavaScript SDK for NEUS — verify once, reuse everywhere. npm install @neus/sdk ``` -## Quick start +## 30-second example ```javascript import { NeusClient } from '@neus/sdk'; @@ -22,11 +24,18 @@ const proof = await client.verify({ wallet: window.ethereum, }); -// Save this ID — reuse it anywhere +// Save this — reuse it everywhere const proofId = proof.proofId; + +// Check eligibility from anywhere +const check = await client.gateCheck({ + address: '0x...', + verifierIds: ['ownership-basic'], +}); +// check.data.eligible → true/false ``` -**No in-app wallet?** Use [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) instead — redirect or popup, no wallet code needed. +> **No wallet?** Use [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) — redirect or popup, zero wallet code. ## Core methods @@ -39,16 +48,6 @@ const proofId = proof.proofId; | `client.checkGate()` | Evaluate requirements against proofs | | `getHostedCheckoutUrl()` | Generate a hosted verify URL | -## Configuration - -```javascript -const client = new NeusClient({ - apiUrl: 'https://api.neus.network', // default - appId: 'my-app', // links to your platform app - timeout: 30000, -}); -``` - ## Gate content in React ```jsx @@ -59,24 +58,20 @@ import { VerifyGate } from '@neus/sdk/widgets'; ``` -## Check eligibility from your server +## Configuration ```javascript -const result = await client.gateCheck({ - address: '0x...', - verifierIds: ['ownership-basic'], +const client = new NeusClient({ + apiUrl: 'https://api.neus.network', // default + appId: 'my-app', // links to your platform app + timeout: 30000, }); - -if (result.data?.eligible) { - // allow access -} ``` -## Documentation +## Docs -- [Quickstart](https://docs.neus.network/quickstart) — first proof in 5 minutes -- [SDK overview](https://docs.neus.network/sdks/overview) — full SDK guide -- [JavaScript SDK](https://docs.neus.network/sdks/javascript) — detailed reference -- [Widgets](https://docs.neus.network/widgets/overview) — React components -- [API reference](https://docs.neus.network/api/overview) — HTTP endpoints -- [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) — no-code verification UI +- [**Quickstart**](https://docs.neus.network/quickstart) — first proof in 5 minutes +- [**SDK guide**](https://docs.neus.network/sdks/javascript) — full reference +- [**Widgets**](https://docs.neus.network/widgets/overview) — React components +- [**API reference**](https://docs.neus.network/api/overview) — HTTP endpoints +- [**Hosted Verify**](https://docs.neus.network/cookbook/auth-hosted-verify) — no-code verification UI