solana-age-verify-sdk 2.0.0-beta.14 → 2.0.0-beta.15

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 CHANGED
@@ -1,4 +1,4 @@
1
- # Solana Age Verify SDK (Beta 2.0)
1
+ # Solana Age Verify SDK (Beta)
2
2
 
3
3
  **Verify users as 18+ on-chain. Privacy-safe, no ID needed, run entirely in the browser.**
4
4
 
package/dist/types.d.ts CHANGED
@@ -17,7 +17,11 @@ export interface VerifyConfig {
17
17
  challenges: string[];
18
18
  minLivenessScore: number;
19
19
  minAgeConfidence: number;
20
- minAgeEstimate: number;
20
+ /**
21
+ * Minimum age required to pass verification.
22
+ * Default: 18
23
+ */
24
+ minAgeThreshold?: number;
21
25
  timeoutMs: number;
22
26
  maxRetries: number;
23
27
  cooldownMinutes: number;
package/dist/verify.js CHANGED
@@ -601,14 +601,14 @@ export async function verifyHost18Plus(options) {
601
601
  const avgTextureScore = textureAnalysisCount > 0
602
602
  ? textureScoreAccumulator / textureAnalysisCount
603
603
  : undefined;
604
- const isAgeValid = ageEstimate >= config.minAgeEstimate;
604
+ const isAgeValid = ageEstimate >= (config.minAgeThreshold || 18);
605
605
  const isLivenessValid = livenessScore >= config.minLivenessScore;
606
606
  const isConfidenceValid = ageConfidence >= config.minAgeConfidence;
607
607
  // DEBUG LOGGING
608
608
  console.log('═══════════════════════════════════════════');
609
609
  console.log('VERIFICATION VALIDATION SUMMARY');
610
610
  console.log('═══════════════════════════════════════════');
611
- console.log(`Age Estimate: ${ageEstimate.toFixed(1)} (threshold: ${config.minAgeEstimate}) → ${isAgeValid ? '✓ PASS' : '✗ FAIL'}`);
611
+ console.log(`Age Estimate: ${ageEstimate.toFixed(1)} (threshold: ${config.minAgeThreshold}) → ${isAgeValid ? '✓ PASS' : '✗ FAIL'}`);
612
612
  console.log(`Age Confidence: ${(ageConfidence * 100).toFixed(1)}% (threshold: ${config.minAgeConfidence * 100}%) → ${isConfidenceValid ? '✓ PASS' : '✗ FAIL'}`);
613
613
  console.log(`Liveness Score: ${(livenessScore * 100).toFixed(1)}% (threshold: ${config.minLivenessScore * 100}%) → ${isLivenessValid ? '✓ PASS' : '✗ FAIL'}`);
614
614
  console.log(`Age Method: ${ageMethod}`);
@@ -618,7 +618,7 @@ export async function verifyHost18Plus(options) {
618
618
  let failureReason = '';
619
619
  if (!isOver18) {
620
620
  if (!isAgeValid)
621
- failureReason = `Estimated age (${Math.round(ageEstimate)}) is below the required ${config.minAgeEstimate}.`;
621
+ failureReason = `Estimated age (${Math.round(ageEstimate)}) is below the required ${config.minAgeThreshold}.`;
622
622
  else if (!isLivenessValid)
623
623
  failureReason = 'Liveness detection failed.';
624
624
  else if (!isConfidenceValid)
@@ -937,7 +937,7 @@ export async function verifyHost18Plus(options) {
937
937
  // Detailed Log for Developer
938
938
  console.log('--- VERIFICATION FAILED ---');
939
939
  console.log('Reason: Liveness or Age below threshold');
940
- console.log(`Detected Age: ${ageEstimate.toFixed(1)} (Threshold: ${config.minAgeEstimate})`);
940
+ console.log(`Detected Age: ${ageEstimate.toFixed(1)} (Threshold: ${config.minAgeThreshold})`);
941
941
  console.log(`Age Confidence: ${(ageConfidence * 100).toFixed(1)}%`);
942
942
  console.log(`Liveness Score: ${(livenessScore * 100).toFixed(1)}%`);
943
943
  console.log(`Attempt: ${updatedRetries} / ${config.maxRetries} (Session: ${currentCooldownCount + 1} / 3)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-age-verify-sdk",
3
- "version": "2.0.0-beta.14",
3
+ "version": "2.0.0-beta.15",
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",