@verifiedonchain-protocol/sdk 0.1.0 → 0.1.1
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 +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# VerifiedOnchain SDK (
|
|
1
|
+
# VerifiedOnchain SDK (`@verifiedonchain-protocol/sdk`)
|
|
2
2
|
|
|
3
3
|
A lightweight, framework-agnostic React SDK for integrating the **Proof of Humanity** face verification, social connections, and wallet abstractions into your dApp.
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ This SDK captures biometric telemetry, performs local sequential liveness detect
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install
|
|
10
|
+
npm install @verifiedonchain-protocol/sdk
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
*(Note: If you are using React 18, you might need to install peer dependencies like `framer-motion` for animations, `@solana/wallet-adapter-react` for Solana support, and `wagmi` + `viem` for EVM support if you haven't already).*
|
|
@@ -20,15 +20,15 @@ The SDK requires two things to function correctly:
|
|
|
20
20
|
|
|
21
21
|
### 1. Hosting the ML Models
|
|
22
22
|
|
|
23
|
-
Download the standard Human.js models (or copy them from the SDK's `node_modules/
|
|
23
|
+
Download the standard Human.js models (or copy them from the SDK's `node_modules/@verifiedonchain-protocol/sdk/models` if available) and place them in your web root under `/models`. The required models typically include `blazeface.json`, `faceres.json`, etc.
|
|
24
24
|
|
|
25
25
|
### 2. Basic Usage
|
|
26
26
|
|
|
27
27
|
The easiest way to integrate the SDK is using the `VerifiedOnchainFlow` component, which provides a complete turn-key UI for wallet connection, social linking, and biometric scanning.
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
|
-
import { VerifiedOnchainFlow } from '
|
|
31
|
-
import '
|
|
30
|
+
import { VerifiedOnchainFlow } from '@verifiedonchain-protocol/sdk';
|
|
31
|
+
import '@verifiedonchain-protocol/sdk/dist/index.css'; // Optional if you are compiling Tailwind yourself
|
|
32
32
|
|
|
33
33
|
export default function VerificationPage() {
|
|
34
34
|
const handleSuccess = (data) => {
|
|
@@ -79,7 +79,7 @@ If you need complete control over the user experience, styling, or the order of
|
|
|
79
79
|
A plug-and-play UI for wallet connections across both EVM and Solana ecosystems.
|
|
80
80
|
|
|
81
81
|
```tsx
|
|
82
|
-
import { WalletSelection } from '
|
|
82
|
+
import { WalletSelection } from '@verifiedonchain-protocol/sdk';
|
|
83
83
|
|
|
84
84
|
<WalletSelection
|
|
85
85
|
requiredWallets={['phantom', 'metamask', 'backpack']}
|
|
@@ -93,7 +93,7 @@ import { WalletSelection } from 'vo-sdk';
|
|
|
93
93
|
Handles OAuth flows and API integrations for social verification.
|
|
94
94
|
|
|
95
95
|
```tsx
|
|
96
|
-
import { SocialConnection } from '
|
|
96
|
+
import { SocialConnection } from '@verifiedonchain-protocol/sdk';
|
|
97
97
|
|
|
98
98
|
<SocialConnection
|
|
99
99
|
requiredSocials={['x', 'farcaster']}
|
|
@@ -107,7 +107,7 @@ import { SocialConnection } from 'vo-sdk';
|
|
|
107
107
|
The core biometric scanners. `ProofOfHumanity` provides a structured UI wrapper around the raw `FaceZK` scanner.
|
|
108
108
|
|
|
109
109
|
```tsx
|
|
110
|
-
import { ProofOfHumanity } from '
|
|
110
|
+
import { ProofOfHumanity } from '@verifiedonchain-protocol/sdk';
|
|
111
111
|
|
|
112
112
|
<ProofOfHumanity
|
|
113
113
|
onNextStep={() => console.log("User clicked continue")}
|
|
@@ -122,8 +122,8 @@ import { ProofOfHumanity } from 'vo-sdk';
|
|
|
122
122
|
|
|
123
123
|
If you are using the **Headless / Modular Approach**, you are responsible for submitting the biometric payload to the backend using the `VerifiedRelayerClient`.
|
|
124
124
|
|
|
125
|
-
```
|
|
126
|
-
import { VerifiedRelayerClient } from '
|
|
125
|
+
```typescript
|
|
126
|
+
import { VerifiedRelayerClient } from '@verifiedonchain-protocol/sdk';
|
|
127
127
|
|
|
128
128
|
// Initialize the client
|
|
129
129
|
const client = new VerifiedRelayerClient({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verifiedonchain-protocol/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Headless Identity Onboarding SDK for Web3. Features composable components for Wallet Connection, Social Logins, and Biometric Proof of Humanity.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"identity",
|