solana-age-verify-sdk 2.0.0-beta.5 → 2.0.0-beta.7
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 +2 -2
- package/dist/security.js +2 -1
- package/dist/verify.js +6 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Solana Age Verify is a client-side biometric SDK that estimates user age and per
|
|
|
7
7
|
- **Privacy First**: No facial images are ever stored or transmitted. All AI inference happens in the user's browser (client-side).
|
|
8
8
|
- **On-Chain**: Verification results are immutable and publicly verifiable via the Solana blockchain (MemoSq4gqABAXib96qFbncnscymPme7yS4AtGf4Vb7).
|
|
9
9
|
- **Biometric**: Uses geometric face landmarks and texture analysis for liveness.
|
|
10
|
-
- **Sybil Resistance**: A
|
|
10
|
+
- **Sybil Resistance**: A minimal protocol fee (0.001 SOL) is required for each successful verification to prevent spam and fund the decentralized registry.
|
|
11
11
|
|
|
12
12
|
## Security Architecture
|
|
13
13
|
|
|
@@ -183,7 +183,7 @@ interface VerifyResult {
|
|
|
183
183
|
### "Protocol fee payment failed"
|
|
184
184
|
- User must approve the protocol fee transaction.
|
|
185
185
|
- Ensure the wallet has sufficient SOL (typically 0.001 - 0.01 SOL depending on app configuration).
|
|
186
|
-
- The default SDK fee is 0.001 SOL.
|
|
186
|
+
- The default SDK fee is **0.001 SOL** (approx. $0.15).
|
|
187
187
|
|
|
188
188
|
### "SafeToAutoRun" errors
|
|
189
189
|
- This is an internal AI error, disregard.
|
package/dist/security.js
CHANGED
|
@@ -18,7 +18,8 @@ export function getPlatformPublicKey() {
|
|
|
18
18
|
return _cachedPlatformPubKey;
|
|
19
19
|
// In a production build, this would be swapped or populated from env
|
|
20
20
|
// For now, we use the VITE environment variable if available (Vite/Vercel)
|
|
21
|
-
|
|
21
|
+
// We check VITE_TREASURY_ADDRESS first as per configuration, then fallback to legacy VITE_PLATFORM_PUBLIC_KEY
|
|
22
|
+
const envKey = import.meta.env?.VITE_TREASURY_ADDRESS || import.meta.env?.VITE_PLATFORM_PUBLIC_KEY;
|
|
22
23
|
if (envKey) {
|
|
23
24
|
_cachedPlatformPubKey = new PublicKey(envKey);
|
|
24
25
|
return _cachedPlatformPubKey;
|
package/dist/verify.js
CHANGED
|
@@ -668,6 +668,11 @@ export async function verifyHost18Plus(options) {
|
|
|
668
668
|
if (embedding.length > 0) {
|
|
669
669
|
facehash = await computeFaceHash(options.walletPubkeyBase58, salt, embedding);
|
|
670
670
|
}
|
|
671
|
+
console.log('[DEBUG] Fee Payment Init', {
|
|
672
|
+
fromPubkey: fromPubkey?.toString(),
|
|
673
|
+
platformPubKey: platformPubKey?.toString(),
|
|
674
|
+
protocolFeeSol
|
|
675
|
+
});
|
|
671
676
|
const transaction = new Transaction();
|
|
672
677
|
// 0. Prioritization Fees & Compute Limits (Crucial for Mainnet reliability)
|
|
673
678
|
transaction.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 50000 }), ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 100000 }) // Priority fee
|
|
@@ -706,6 +711,7 @@ export async function verifyHost18Plus(options) {
|
|
|
706
711
|
});
|
|
707
712
|
if (!signResponse.ok) {
|
|
708
713
|
const signError = await signResponse.json();
|
|
714
|
+
console.error('[DEBUG] Sign API Error:', signError);
|
|
709
715
|
throw new Error(signError.message || 'Platform signing failed');
|
|
710
716
|
}
|
|
711
717
|
const { transaction: platformSignedTxBase64 } = await signResponse.json();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solana-age-verify-sdk",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Solana Age Verify is a premium, client-side SDK for privacy-preserving age verification and liveness detection. It generates a deterministic Face Hash linked to a wallet without storing facial data.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"dist",
|
|
11
11
|
"public"
|
|
12
12
|
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/TrenchChef/solana-age-verify-sdk.git"
|
|
16
|
+
},
|
|
13
17
|
"homepage": "https://talkchain.live",
|
|
14
18
|
"keywords": [
|
|
15
19
|
"solana",
|