@neus/sdk 1.0.2 → 1.0.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/widgets/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # NEUS Widgets (VerifyGate + ProofBadge)
1
+ # NEUS Widgets
2
2
 
3
- React components for NEUS verification and access gating.
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
4
 
5
5
  ## Install
6
6
 
@@ -10,7 +10,7 @@ npm install @neus/sdk react react-dom
10
10
 
11
11
  ## VerifyGate
12
12
 
13
- Gate UI behind verification requirements.
13
+ Create mode defaults to **unlisted public** for gate-friendly reuse. Override `proofOptions` when you need listed public or private.
14
14
 
15
15
  ```jsx
16
16
  import { VerifyGate } from '@neus/sdk/widgets';
@@ -18,9 +18,10 @@ import { VerifyGate } from '@neus/sdk/widgets';
18
18
  export function Page() {
19
19
  return (
20
20
  <VerifyGate
21
+ appId="your-app-id"
21
22
  requiredVerifiers={['nft-ownership']}
22
23
  verifierData={{
23
- 'nft-ownership': { contractAddress: '0x...', tokenId: '1', chainId: 1 }
24
+ 'nft-ownership': { contractAddress: '0x...', tokenId: '1', chainId: 8453 }
24
25
  }}
25
26
  >
26
27
  <div>Unlocked</div>
@@ -29,25 +30,16 @@ export function Page() {
29
30
  }
30
31
  ```
31
32
 
32
- ### Key props
33
-
34
- - `requiredVerifiers`: `string[]` (default: `['ownership-basic']`)
35
- - `verifierData`: object keyed by verifier id
36
- - `strategy`: `'reuse-or-create' | 'reuse' | 'fresh'` (default: `'reuse-or-create'`)
37
- - `proofOptions`: `{ privacyLevel, publicDisplay, storeOriginalContent, enableIpfs? }` (defaults: private)
38
- - `mode`: `'create' | 'access'` (default: `'create'`)
39
- - `qHash`: string (required for `mode="access"`)
40
-
41
- Notes:
42
- - Reuse without prompting can only see **public + discoverable** proofs.
43
- - Reusing private proofs requires an **owner signature** (wallet grants read access).
44
-
45
33
  ## ProofBadge
46
34
 
47
- Display verification status by Proof ID (`qHash`).
48
-
49
35
  ```jsx
50
36
  import { ProofBadge } from '@neus/sdk/widgets';
51
37
 
52
- <ProofBadge qHash="0x..." showChains />
38
+ <ProofBadge proofId="0x..." showChains />
53
39
  ```
40
+
41
+ ## Docs
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)
package/widgets/index.js CHANGED
@@ -1,9 +1,9 @@
1
- /**
2
- * NEUS Widgets
3
- *
4
- * Core Widgets:
5
- * - VerifyGate: Universal verification gate component
6
- * - ProofBadge: Display verification status
7
- */
8
-
9
- export * from './verify-gate/index.js';
1
+ /**
2
+ * NEUS Widgets
3
+ *
4
+ * Core Widgets:
5
+ * - VerifyGate: Universal verification gate component
6
+ * - ProofBadge: Display verification status
7
+ */
8
+
9
+ export * from './verify-gate/index.js';