@neus/sdk 1.1.1 → 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 +191 -206
- package/SECURITY.md +38 -38
- package/cjs/client.cjs +23 -15
- package/cjs/index.cjs +23 -15
- package/cjs/mcp-hosts.cjs +125 -0
- package/cli/neus.mjs +2150 -1895
- package/client.js +32 -17
- package/mcp-hosts.js +121 -0
- package/package.json +147 -142
- package/types.d.ts +39 -8
- package/widgets/README.md +41 -45
- package/widgets/verify-gate/dist/ProofBadge.js +14 -4
- package/widgets/verify-gate/dist/VerifyGate.js +66 -203
package/widgets/README.md
CHANGED
|
@@ -1,45 +1,41 @@
|
|
|
1
|
-
# NEUS Widgets
|
|
2
|
-
|
|
3
|
-
**Proof-aware React components** (VerifyGate, ProofBadge) so your UI can show verified state and gate content **using the same checks your server already trusts** - avoid re-implementing verifier rules only in the browser.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @neus/sdk react react-dom
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## VerifyGate
|
|
12
|
-
|
|
13
|
-
Create mode
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
import { VerifyGate } from '@neus/sdk/widgets';
|
|
17
|
-
|
|
18
|
-
export function Page() {
|
|
19
|
-
return (
|
|
20
|
-
<VerifyGate
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- [Widgets Overview](https://docs.neus.network/widgets/overview)
|
|
44
|
-
- [Verify Component](https://docs.neus.network/widgets/verifygate)
|
|
45
|
-
- [Quickstart](https://docs.neus.network/quickstart)
|
|
1
|
+
# NEUS Widgets
|
|
2
|
+
|
|
3
|
+
**Proof-aware React components** (VerifyGate, ProofBadge) so your UI can show verified state and gate content **using the same checks your server already trusts** - avoid re-implementing verifier rules only in the browser.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @neus/sdk react react-dom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## VerifyGate
|
|
12
|
+
|
|
13
|
+
Create mode opens Hosted Verify. The published gate owns verifier inputs, pricing, and checkout policy.
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
import { VerifyGate } from '@neus/sdk/widgets';
|
|
17
|
+
|
|
18
|
+
export function Page() {
|
|
19
|
+
return (
|
|
20
|
+
<VerifyGate
|
|
21
|
+
gateId="gate_your-app-name"
|
|
22
|
+
>
|
|
23
|
+
<div>Unlocked</div>
|
|
24
|
+
</VerifyGate>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ProofBadge
|
|
30
|
+
|
|
31
|
+
```jsx
|
|
32
|
+
import { ProofBadge } from '@neus/sdk/widgets';
|
|
33
|
+
|
|
34
|
+
<ProofBadge qHash={proof.qHash} showChains />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Docs
|
|
38
|
+
|
|
39
|
+
- [Widgets Overview](https://docs.neus.network/widgets/overview)
|
|
40
|
+
- [Verify Component](https://docs.neus.network/widgets/verifygate)
|
|
41
|
+
- [Quickstart](https://docs.neus.network/quickstart)
|