Skip to content
This repository was archived by the owner on Sep 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# AGENTS.md

## Cursor Cloud specific instructions

This is a JavaScript SDK + docs monorepo. There is no database, Docker, or local backend; the SDK is a client for the remote NEUS API (`https://api.neus.network`).

### Repository layout

| Directory | Purpose |
|-----------|---------|
| `sdk/` | Main `@neus/sdk` package (JS, ESM). All lint/test/build commands run here. |
| `docs/` | Mintlify-powered documentation site + OpenAPI spec |
| `contracts/` | Reference Solidity contracts (no Hardhat/Foundry tooling) |
| `examples/` | Node.js, React, curl usage examples |
| `spec/` | Verifier JSON schemas |

### 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 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)
- **Docs dev server:** `npm run docs:dev` (from repo root; starts Mintlify dev server — optional)

### 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.
- 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).
85 changes: 58 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# NEUS Network
# 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)

**Verify once. Prove everywhere.**
**Verify once. Reuse everywhere.**

NEUS replaces fragmented verification with one reusable proof receipt.
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.

## Quick Start
## Use NEUS to

- **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

## 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.

## Quick start

```bash
npm install @neus/sdk
Expand All @@ -24,52 +38,69 @@ const proof = await client.verify({
wallet: window.ethereum,
});

// Save this ID — reuse it everywhere
const proofId = proof.proofId;
const proofId = proof.proofId; // save this — reuse it everywhere
```

## What NEUS Does
## What you can build

| Problem | Solution |
|---------|----------|
| Verification built per feature | One proof, many uses |
| No reusable identity | Portable proof receipts |
| Custom verification infrastructure | Hosted UI + API |
| 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` |

## Integration paths
## Start here

**Builders:** [Get started](https://docs.neus.network/get-started) (platform, app link, credits), then [choose an integration path](https://docs.neus.network/choose-an-integration-path).
| 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) |

| Path | Best For |
## Integration paths

| Path | Best for |
|------|----------|
| [Hosted Verify](https://docs.neus.network/cookbook/auth-hosted-verify) | Login, social linking |
| [Widgets](https://docs.neus.network/widgets/overview) | React gating |
| [SDK](https://docs.neus.network/sdks/overview) | Custom flows |
| [API](https://docs.neus.network/api/overview) | Server checks |
| [MCP](https://docs.neus.network/mcp/overview) | AI agents |
| [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.) |

## AI agents (MCP)

Add NEUS to any MCP-compatible agent with one URL:

## AI assistants (MCP)
```
https://mcp.neus.network/mcp
```

**`https://mcp.neus.network/mcp`** — [setup](https://docs.neus.network/mcp/setup) is one JSON block; users verify via **hosted links** tools return.
[Setup guide](https://docs.neus.network/mcp/setup) — one JSON block, then agents verify users via hosted links.

## Documentation

| Resource | Description |
|----------|-------------|
| [Quickstart](https://docs.neus.network/quickstart) | First proof in 5 minutes |
| [Verifier Catalog](https://docs.neus.network/verification/verifiers) | All capabilities |
| [API Reference](https://docs.neus.network/api/overview) | HTTP endpoints |
| [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 |

## Support

| Channel | Use For |
| Channel | Use for |
|---------|---------|
| [GitHub Discussions](https://github.com/neus/network/discussions) | Questions |
| [GitHub Issues](https://github.com/neus/network/issues) | Bug reports |
| [dev@neus.network](mailto:dev@neus.network) | Security |

## License

- **Smart Contracts:** BUSL-1.1 → Apache-2.0 (Aug 2028)
- **SDK & Tools:** Apache-2.0
- **SDK & tools:** Apache-2.0
- **Smart contracts:** BUSL-1.1 → Apache-2.0 (Aug 2028)
2 changes: 1 addition & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@
"group": "Essentials",
"icon": "compass",
"pages": [
"get-started",
"index",
"quickstart",
"get-started",
"choose-an-integration-path",
"integration",
"examples"
Expand Down
74 changes: 39 additions & 35 deletions docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,63 +1,67 @@
---
title: Overview
description: Verify once. Prove everywhere. Portable proof receipts for login, trust, access, and agent workflows.
title: NEUS Documentation
description: Verify once. Reuse everywhere. Portable proof receipts for apps, APIs, and agents.
icon: house
---

**One proof receipt** — reusable across apps, APIs, and agents.
**Verify once. Reuse everywhere.**

## Start here

**Building a product?** **[Get started](./get-started)** — platform profile, link app, credits, `appId`, sponsor grants, then **[choose an integration path](./choose-an-integration-path)**.

**Choosing an integration path?** **[Choose an integration path](./choose-an-integration-path)** — Hosted Verify, Widgets, SDK, API, or MCP.

## How it works
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.

1. **Verify** — User completes verification (hosted UI, wallet, or social).
2. **Save** — You store the proof receipt ID.
3. **Reuse** — Same proof for login, gating, policy, and agents.
## Start here

<CardGroup cols={2}>
<Card title="Get started" icon="rocket" href="./get-started">
Builders: platform, app link, billing, first integration.
</Card>
<Card title="Choose your path" icon="route" href="./choose-an-integration-path">
Pick Hosted Verify, Widgets, SDK, API, or MCP.
</Card>
<CardGroup cols={3}>
<Card title="Quickstart" icon="code" href="./quickstart">
First proof with the SDK (code).
</Card>
<Card title="Hosted Verify" icon="key" href="./cookbook/auth-hosted-verify">
No custom verification UI — redirect or popup.
First proof in 5 minutes.
</Card>
<Card title="Verifier catalog" icon="list-tree" href="./verification/verifiers">
What you can verify.
<Card title="Get started" icon="rocket" href="./get-started">
Platform setup, billing, app linking.
</Card>
<Card title="Billing" icon="credit-card" href="./platform/billing">
Who pays — deep reference.
<Card title="Hosted Verify" icon="key" href="./cookbook/auth-hosted-verify">
No-code verification UI.
</Card>
</CardGroup>

## Integration paths
## 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` |
| Proof-backed content and posts | `ownership-basic` |
| 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

| Path | Best for |
|------|----------|
| [Hosted Verify](./cookbook/auth-hosted-verify) | Login, guided verification, least UI work |
| [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) | HTTP from your servers |
| [MCP](./mcp/overview) | Cursor, Claude, agents — browser links first |
| [API](./api/overview) | Server-side checks |
| [MCP](./mcp/overview) | AI agents (Cursor, Claude, etc.) |

Not sure? [Choose an integration path →](./choose-an-integration-path)

## URLs you’ll use
## URLs

| What | URL |
|------|-----|
| Hosted verification | `https://neus.network/verify` |
| Platform (`/hub`) | `https://neus.network/hub` |
| Platform | `https://neus.network/hub` |
| API | `https://api.neus.network` |
| MCP | `https://mcp.neus.network/mcp` |

## Examples

[Examples](./examples) — React, Node, curl.
[React, Node.js, curl →](./examples)
43 changes: 28 additions & 15 deletions docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ description: Create your first proof in under 5 minutes.
icon: rocket
---

**~5 min:** install SDK → verify → save receipt ID → optional gate.
Install the SDK, create a proof, and reuse it.

<Tip>
**Shipping an app?** Do **[Get started](./get-started)** first (platform → Apps → credits → `appId` / sponsor). Then come back here for code.
**Shipping an app?** Do **[Get started](./get-started)** first (platform → app link → credits → `appId`). Then come back here for code.
</Tip>

## 1. Install
## 1. Install the SDK

```bash
npm install @neus/sdk
```

## 2. Client + proof
## 2. Create a proof

```javascript
import { NeusClient } from '@neus/sdk';

const client = new NeusClient({ appId: 'my-app' });
const client = new NeusClient();

const proof = await client.verify({
verifier: 'ownership-basic',
Expand All @@ -33,7 +33,7 @@ const proofId = proof.proofId; // save this
```

<Tip>
**No in-app wallet?** Use [Hosted Verify](./cookbook/auth-hosted-verify) + session instead of `window.ethereum`.
**No in-app wallet?** Use [Hosted Verify](./cookbook/auth-hosted-verify) — redirect or popup, no wallet code needed.
</Tip>

## 3. Wait for completion
Expand All @@ -45,7 +45,7 @@ const status = await client.pollProofStatus(proofId, {
});
```

## 4. Optional: Gate in React
## 4. Reuse: gate content in React

```jsx
import { VerifyGate } from '@neus/sdk/widgets';
Expand All @@ -55,12 +55,25 @@ import { VerifyGate } from '@neus/sdk/widgets';
</VerifyGate>
```

## Next
## 5. Reuse: check eligibility from your server

| I want… | Go to |
|---------|--------|
| Platform + billing setup | [Get started](./get-started) |
| Hosted UI | [Hosted Verify](./cookbook/auth-hosted-verify) |
| Pick integration | [Choose your path](./choose-an-integration-path) |
| Verifier list | [Verifier catalog](./verification/verifiers) |
| Production | [Integration](./integration) |
```javascript
const result = await client.gateCheck({
address: '0x...',
verifierIds: ['ownership-basic'],
});

if (result.data?.eligible) {
// allow access
}
```

## Next steps

| I want to… | Go to |
|-------------|-------|
| Set up platform and billing | [Get started](./get-started) |
| Use hosted UI (no wallet code) | [Hosted Verify](./cookbook/auth-hosted-verify) |
| Pick an integration path | [Choose your path](./choose-an-integration-path) |
| See all verification types | [Verifier catalog](./verification/verifiers) |
| Go to production | [Integration checklist](./integration) |
2 changes: 1 addition & 1 deletion funding.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"opRetro": {
"projectId": "0x42c02a0db1888dae5c82e31ddf707d7d3bc6018a9dd45931b6d4f146550faa10"
"projectId": "0x42c02a0db1888dae5c82e31ddf707d7d3bc6018a9dd45931b6d4f146550faa10"
}
}
16 changes: 15 additions & 1 deletion sdk/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"object-curly-spacing": ["warn", "always"],
"array-bracket-spacing": ["warn", "never"],
"comma-dangle": ["warn", "never"],
"max-len": ["warn", { "code": 120, "ignoreComments": true }],
"max-len": ["warn", { "code": 120, "ignoreComments": true, "ignoreUrls": true, "ignoreStrings": true }],
"eqeqeq": ["error", "always"],
"no-trailing-spaces": "warn",
"no-multiple-empty-lines": ["warn", { "max": 1 }],
Expand All @@ -40,9 +40,23 @@
"require-await": "off",
"no-return-await": "warn"
},
"overrides": [
{
"files": ["widgets/verify-gate/standalone.js"],
"parserOptions": {
"sourceType": "script"
},
"rules": {
"no-var": "off",
"prefer-const": "off",
"prefer-template": "off"
}
}
],
"ignorePatterns": [
"node_modules/",
"dist/",
"cjs/",
"build/",
"*.min.js"
]
Expand Down
Loading
Loading