@neus/sdk 1.0.7 → 1.0.9
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 +23 -26
- package/SECURITY.md +38 -38
- package/cjs/client.cjs +40 -44
- package/cjs/index.cjs +40 -44
- package/client.js +1820 -1837
- package/package.json +135 -136
- package/types.d.ts +904 -915
- package/widgets/README.md +45 -45
- package/widgets/verify-gate/dist/ProofBadge.js +41 -37
- package/widgets/verify-gate/dist/VerifyGate.js +142 -70
package/widgets/README.md
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
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 defaults to **private**. Override `proofOptions` only when you intentionally need public visibility for link-based or public checks.
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
import { VerifyGate } from '@neus/sdk/widgets';
|
|
17
|
-
|
|
18
|
-
export function Page() {
|
|
19
|
-
return (
|
|
20
|
-
<VerifyGate
|
|
21
|
-
appId="your-app-id"
|
|
22
|
-
requiredVerifiers={['nft-ownership']}
|
|
23
|
-
verifierData={{
|
|
24
|
-
'nft-ownership': { contractAddress: '0x...', tokenId: '1', chainId: 8453 }
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
<div>Unlocked</div>
|
|
28
|
-
</VerifyGate>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## ProofBadge
|
|
34
|
-
|
|
35
|
-
```jsx
|
|
36
|
-
import { ProofBadge } from '@neus/sdk/widgets';
|
|
37
|
-
|
|
38
|
-
<ProofBadge
|
|
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)
|
|
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 defaults to **private**. Override `proofOptions` only when you intentionally need public visibility for link-based or public checks.
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
import { VerifyGate } from '@neus/sdk/widgets';
|
|
17
|
+
|
|
18
|
+
export function Page() {
|
|
19
|
+
return (
|
|
20
|
+
<VerifyGate
|
|
21
|
+
appId="your-app-id"
|
|
22
|
+
requiredVerifiers={['nft-ownership']}
|
|
23
|
+
verifierData={{
|
|
24
|
+
'nft-ownership': { contractAddress: '0x...', tokenId: '1', chainId: 8453 }
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
27
|
+
<div>Unlocked</div>
|
|
28
|
+
</VerifyGate>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## ProofBadge
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
import { ProofBadge } from '@neus/sdk/widgets';
|
|
37
|
+
|
|
38
|
+
<ProofBadge qHash="0x..." showChains />
|
|
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)
|