@neus/sdk 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/SECURITY.md +38 -38
- package/cli/neus.mjs +2150 -2166
- package/package.json +1 -1
- package/types.d.ts +3 -3
- package/widgets/README.md +36 -36
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npx -y -p @neus/sdk neus setup
|
|
|
21
21
|
npx -y -p @neus/sdk neus doctor --live
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Open your MCP client and ask the assistant to use NEUS Trust.
|
|
25
25
|
|
|
26
26
|
## MCP docs
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ Call `neus_context` in your MCP client. For agent workflows, call `neus_agent_li
|
|
|
30
30
|
| Setup, JSON snippets, and headers | [MCP setup](https://docs.neus.network/mcp/setup) |
|
|
31
31
|
| Tools and session order | [MCP overview](https://docs.neus.network/mcp/overview) |
|
|
32
32
|
| Discovery URLs | [Discovery and endpoints](https://docs.neus.network/mcp/endpoints) |
|
|
33
|
-
| NEUS
|
|
33
|
+
| Install NEUS Trust | [Install NEUS Trust](https://docs.neus.network/install) |
|
|
34
34
|
|
|
35
35
|
Prefer `neus setup` over hand-editing config files so every host stays on **`https://mcp.neus.network/mcp`**.
|
|
36
36
|
|
|
@@ -50,7 +50,7 @@ Use Hosted Verify when you want NEUS to handle the signing/verification flow out
|
|
|
50
50
|
import { getHostedCheckoutUrl } from '@neus/sdk';
|
|
51
51
|
|
|
52
52
|
const url = getHostedCheckoutUrl({
|
|
53
|
-
gateId: '
|
|
53
|
+
gateId: 'gate_your-app-name',
|
|
54
54
|
returnUrl: 'https://yourapp.com/auth/callback'
|
|
55
55
|
});
|
|
56
56
|
|
|
@@ -103,7 +103,7 @@ import { VerifyGate } from '@neus/sdk/widgets';
|
|
|
103
103
|
export function Page() {
|
|
104
104
|
return (
|
|
105
105
|
<VerifyGate
|
|
106
|
-
gateId="
|
|
106
|
+
gateId="gate_your-app-name"
|
|
107
107
|
onVerified={result => {
|
|
108
108
|
console.log(result.qHash || result.qHashes);
|
|
109
109
|
}}
|
|
@@ -124,7 +124,7 @@ import { NeusClient } from '@neus/sdk';
|
|
|
124
124
|
const client = new NeusClient();
|
|
125
125
|
|
|
126
126
|
const result = await client.gateCheck({
|
|
127
|
-
gateId: '
|
|
127
|
+
gateId: 'gate_your-app-name',
|
|
128
128
|
address: '0x...'
|
|
129
129
|
});
|
|
130
130
|
|
|
@@ -172,7 +172,14 @@ Codex owns its local MCP OAuth session. Use `npx -y -p @neus/sdk neus setup --cl
|
|
|
172
172
|
|
|
173
173
|
Integrators embedding install UX in apps should import **`@neus/sdk/mcp-hosts`** (setup commands, deeplinks, host labels) instead of duplicating strings.
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
Claude Code users can install **`neus-trust@neus`** for the bundled session workflow:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
/plugin marketplace add https://github.com/neus/network
|
|
179
|
+
/plugin install neus-trust@neus
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Other hosts: [Install NEUS Trust](https://docs.neus.network/install).
|
|
176
183
|
|
|
177
184
|
## Docs
|
|
178
185
|
|
package/SECURITY.md
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
# NEUS SDK security notes
|
|
2
|
-
|
|
3
|
-
Treat **wallet signatures** and **API keys** as secrets. Do not log them, expose them to clients, or store them in analytics.
|
|
4
|
-
|
|
5
|
-
## Authentication model
|
|
6
|
-
|
|
7
|
-
- **Verification requests** are authenticated with a wallet signature over the **CAIP-380 Portable Proof** six-line signing string. Never roll your own message format in production—use the SDK or the hosted preparation step documented for HTTP integrations.
|
|
8
|
-
- **Proof lookups by `qHash`** are safe for public proofs. Private proofs return a minimal payload unless the caller proves ownership (authenticated owner or signed request).
|
|
9
|
-
- **Owner-only reads** of private proof payloads require an extra owner-signed request. The SDK attaches the required signed headers for you.
|
|
10
|
-
|
|
11
|
-
## Do not
|
|
12
|
-
|
|
13
|
-
- Do not treat proof signatures as bearer tokens (they are request-bound).
|
|
14
|
-
- Do not embed API keys in browser apps. Keep API keys server-side only.
|
|
15
|
-
- Do not log or persist proof signatures, API keys, or third-party auth credentials (if your integration uses them).
|
|
16
|
-
|
|
17
|
-
## Privacy defaults
|
|
18
|
-
|
|
19
|
-
**`client.verify()`** defaults to **private**.
|
|
20
|
-
|
|
21
|
-
**`VerifyGate`** create mode also defaults to **private**.
|
|
22
|
-
|
|
23
|
-
Use public visibility only when you need proof reuse without owner-authenticated access:
|
|
24
|
-
|
|
25
|
-
- unlisted public: `privacyLevel: 'public'`, `publicDisplay: false`
|
|
26
|
-
- listed public: `privacyLevel: 'public'`, `publicDisplay: true`
|
|
27
|
-
|
|
28
|
-
Do not treat unlisted public proofs as secret.
|
|
29
|
-
|
|
30
|
-
`storeOriginalContent` is an advanced storage control. Most integrations should leave the default as-is.
|
|
31
|
-
|
|
32
|
-
Controls:
|
|
33
|
-
|
|
34
|
-
- `privacyLevel` - private by default; switch to public only for intentional public reuse
|
|
35
|
-
- `publicDisplay` - discovery vs unlisted
|
|
36
|
-
- `storeOriginalContent` - advanced content-storage control
|
|
37
|
-
|
|
38
|
-
Discoverable listings require **`privacyLevel: 'public'`** and **`publicDisplay: true`**.
|
|
1
|
+
# NEUS SDK security notes
|
|
2
|
+
|
|
3
|
+
Treat **wallet signatures** and **API keys** as secrets. Do not log them, expose them to clients, or store them in analytics.
|
|
4
|
+
|
|
5
|
+
## Authentication model
|
|
6
|
+
|
|
7
|
+
- **Verification requests** are authenticated with a wallet signature over the **CAIP-380 Portable Proof** six-line signing string. Never roll your own message format in production—use the SDK or the hosted preparation step documented for HTTP integrations.
|
|
8
|
+
- **Proof lookups by `qHash`** are safe for public proofs. Private proofs return a minimal payload unless the caller proves ownership (authenticated owner or signed request).
|
|
9
|
+
- **Owner-only reads** of private proof payloads require an extra owner-signed request. The SDK attaches the required signed headers for you.
|
|
10
|
+
|
|
11
|
+
## Do not
|
|
12
|
+
|
|
13
|
+
- Do not treat proof signatures as bearer tokens (they are request-bound).
|
|
14
|
+
- Do not embed API keys in browser apps. Keep API keys server-side only.
|
|
15
|
+
- Do not log or persist proof signatures, API keys, or third-party auth credentials (if your integration uses them).
|
|
16
|
+
|
|
17
|
+
## Privacy defaults
|
|
18
|
+
|
|
19
|
+
**`client.verify()`** defaults to **private**.
|
|
20
|
+
|
|
21
|
+
**`VerifyGate`** create mode also defaults to **private**.
|
|
22
|
+
|
|
23
|
+
Use public visibility only when you need proof reuse without owner-authenticated access:
|
|
24
|
+
|
|
25
|
+
- unlisted public: `privacyLevel: 'public'`, `publicDisplay: false`
|
|
26
|
+
- listed public: `privacyLevel: 'public'`, `publicDisplay: true`
|
|
27
|
+
|
|
28
|
+
Do not treat unlisted public proofs as secret.
|
|
29
|
+
|
|
30
|
+
`storeOriginalContent` is an advanced storage control. Most integrations should leave the default as-is.
|
|
31
|
+
|
|
32
|
+
Controls:
|
|
33
|
+
|
|
34
|
+
- `privacyLevel` - private by default; switch to public only for intentional public reuse
|
|
35
|
+
- `publicDisplay` - discovery vs unlisted
|
|
36
|
+
- `storeOriginalContent` - advanced content-storage control
|
|
37
|
+
|
|
38
|
+
Discoverable listings require **`privacyLevel: 'public'`** and **`publicDisplay: true`**.
|