@entros/pulse-sdk 3.0.0 → 3.2.0

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
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@entros/pulse-sdk.svg)](https://www.npmjs.com/package/@entros/pulse-sdk)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@entros/pulse-sdk.svg)](https://www.npmjs.com/package/@entros/pulse-sdk)
5
5
 
6
- Client-side SDK for the Entros Protocol. Captures behavioral biometrics (voice, motion, touch), extracts a 308-dimensional statistical feature vector (v3 expansion: MFCCs with pre-emphasis (C1-C12, MFCC[0] dropped), LPC coefficients, formant trajectories, voice quality, pitch contour shape, IMU FFT-band tremor, cross-axis covariance, mouse-derived FFT / autocorrelation analogues for desktop, touch curvature, gap distribution, path efficiency — see `docs/master/BLUEPRINT-feature-pipeline-v2.md`), generates a Groth16 zero-knowledge proof, and submits for on-chain verification on Solana. Raw biometric data stays on-device — only derived features and the proof are transmitted.
6
+ Client-side SDK for the Entros Protocol. Captures behavioral biometrics (voice, motion, touch), extracts a 308-dimensional statistical feature vector (v3 expansion: MFCCs with pre-emphasis (C1-C12, MFCC[0] dropped), LPC coefficients, formant trajectories, voice quality, pitch contour shape, IMU FFT-band tremor, cross-axis covariance, mouse-derived FFT / autocorrelation analogues for desktop, touch curvature, gap distribution, path efficiency — see `docs/master/BLUEPRINT-feature-pipeline-v2.md`), generates a Groth16 zero-knowledge proof, and submits for on-chain verification on Solana. Raw biometric data never persists — only derived features and the proof are retained.
7
7
 
8
8
  > **Looking for a drop-in?** Most integrators want [`@entros/verify`](https://github.com/entros-protocol/entros-verify) — a popup-pattern React component that wraps this SDK and ships verification in five lines of JSX. Use this package directly when you need to own the verification UX (custom capture canvas, branded loading states, mobile-native).
9
9
 
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ declare const DEFAULT_THRESHOLD = 96;
3
3
  declare const DEFAULT_MIN_DISTANCE = 3;
4
4
  declare const MIN_CAPTURE_MS = 2000;
5
5
  declare const MAX_CAPTURE_MS = 60000;
6
- declare const DEFAULT_CAPTURE_MS = 7000;
6
+ declare const DEFAULT_CAPTURE_MS = 12000;
7
7
  declare const PROGRAM_IDS: {
8
8
  readonly entrosAnchor: "GZYwTp2ozeuRA5Gof9vs4ya961aANcJBdUzB7LN6q4b2";
9
9
  readonly entrosVerifier: "4F97jNoxQzT2qRbkWpW3ztC3Nz2TtKj3rnKG8ExgnrfV";
@@ -316,23 +316,6 @@ interface FeatureVector {
316
316
  /** Concatenated feature vector for SimHash input */
317
317
  type FusedFeatureVector = number[];
318
318
 
319
- declare function mean(values: number[]): number;
320
- declare function variance(values: number[], mu?: number): number;
321
- declare function skewness(values: number[]): number;
322
- declare function kurtosis(values: number[]): number;
323
- declare function condense(values: number[]): StatsSummary;
324
- /**
325
- * Shannon entropy over histogram bins. Measures information density.
326
- * Real human data has moderate entropy (varied but structured).
327
- * Synthetic data is either too uniform (high entropy) or too structured (low entropy).
328
- */
329
- declare function entropy(values: number[], bins?: number): number;
330
- /**
331
- * Autocorrelation at a given lag. Detects periodic synthetic patterns.
332
- * Real human data has low autocorrelation at most lags (chaotic/noisy).
333
- * Synthetic data often has high autocorrelation (periodic/smooth).
334
- */
335
- declare function autocorrelation(values: number[], lag?: number): number;
336
319
  /**
337
320
  * Concatenate raw features without normalization.
338
321
  * Used for server-side validation where physical units matter.
@@ -383,6 +366,8 @@ declare function extractSpeakerFeaturesDetailed(audio: AudioCapture): Promise<{
383
366
  */
384
367
  declare function extractSpeakerFeatures(audio: AudioCapture): Promise<number[]>;
385
368
 
369
+ declare const MOTION_FEATURE_COUNT: number;
370
+ declare const TOUCH_FEATURE_COUNT: number;
386
371
  /**
387
372
  * Compute per-sample acceleration magnitude |a| = √(ax² + ay² + az²) and
388
373
  * linearly resample to a target frame count. Surfaced for server-side
@@ -785,4 +770,4 @@ declare function fetchChallenge(executorUrl: string, walletAddress: string, apiK
785
770
  */
786
771
  declare function encodeAudioAsBase64(samples: Float32Array): string;
787
772
 
788
- export { type AgentHumanOperator, type AudioCapture, type CaptureOptions, type CaptureStage, type ChallengeResponse, type CircuitInput, DEFAULT_CAPTURE_MS, DEFAULT_MIN_DISTANCE, DEFAULT_THRESHOLD, type EntrosAttestation, FINGERPRINT_BITS, type FeatureVector, type FusedFeatureVector, type IdentityState, type LissajousParams, MAX_CAPTURE_MS, MIN_AUDIO_SAMPLES, MIN_CAPTURE_MS, MIN_MOTION_SAMPLES, MIN_TOUCH_SAMPLES, type MotionSample, PROGRAM_IDS, type PackedFingerprint, type Point2D, type ProofResult, type PulseConfig, PulseSDK, PulseSession, SPEAKER_FEATURE_COUNT, type SensorData, type SolanaProof, type StageState, type StatsSummary, type StoredVerificationData, type SubmissionResult, type TBH, type TemporalFingerprint, type TouchSample, type VerificationResult, attestAgentOperator, autocorrelation, bigintToBytes32, computeCommitment, condense, encodeAudioAsBase64, entropy, extractAccelerationMagnitude, extractMotionFeatures, extractMouseDynamics, extractSpeakerFeatures, extractSpeakerFeaturesDetailed, extractTouchFeatures, fetchChallenge, fetchIdentityState, fuseFeatures, fuseRawFeatures, generateLissajousPoints, generateLissajousSequence, generatePhrase, generatePhraseSequence, generateProof, generateSalt, generateSolanaProof, generateTBH, getAgentHumanOperator, hammingDistance, kurtosis, loadVerificationData, mean, packBits, prepareCircuitInput, randomLissajousParams, serializeProof, simhash, skewness, storeVerificationData, submitResetViaWallet, submitViaRelayer, submitViaWallet, toBigEndian32, variance, verifyEntrosAttestation };
773
+ export { type AgentHumanOperator, type AudioCapture, type CaptureOptions, type CaptureStage, type ChallengeResponse, type CircuitInput, DEFAULT_CAPTURE_MS, DEFAULT_MIN_DISTANCE, DEFAULT_THRESHOLD, type EntrosAttestation, FINGERPRINT_BITS, type FeatureVector, type FusedFeatureVector, type IdentityState, type LissajousParams, MAX_CAPTURE_MS, MIN_AUDIO_SAMPLES, MIN_CAPTURE_MS, MIN_MOTION_SAMPLES, MIN_TOUCH_SAMPLES, MOTION_FEATURE_COUNT, type MotionSample, PROGRAM_IDS, type PackedFingerprint, type Point2D, type ProofResult, type PulseConfig, PulseSDK, PulseSession, SPEAKER_FEATURE_COUNT, type SensorData, type SolanaProof, type StageState, type StatsSummary, type StoredVerificationData, type SubmissionResult, type TBH, TOUCH_FEATURE_COUNT, type TemporalFingerprint, type TouchSample, type VerificationResult, attestAgentOperator, bigintToBytes32, computeCommitment, encodeAudioAsBase64, extractAccelerationMagnitude, extractMotionFeatures, extractMouseDynamics, extractSpeakerFeatures, extractSpeakerFeaturesDetailed, extractTouchFeatures, fetchChallenge, fetchIdentityState, fuseFeatures, fuseRawFeatures, generateLissajousPoints, generateLissajousSequence, generatePhrase, generatePhraseSequence, generateProof, generateSalt, generateSolanaProof, generateTBH, getAgentHumanOperator, hammingDistance, loadVerificationData, packBits, prepareCircuitInput, randomLissajousParams, serializeProof, simhash, storeVerificationData, submitResetViaWallet, submitViaRelayer, submitViaWallet, toBigEndian32, verifyEntrosAttestation };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ declare const DEFAULT_THRESHOLD = 96;
3
3
  declare const DEFAULT_MIN_DISTANCE = 3;
4
4
  declare const MIN_CAPTURE_MS = 2000;
5
5
  declare const MAX_CAPTURE_MS = 60000;
6
- declare const DEFAULT_CAPTURE_MS = 7000;
6
+ declare const DEFAULT_CAPTURE_MS = 12000;
7
7
  declare const PROGRAM_IDS: {
8
8
  readonly entrosAnchor: "GZYwTp2ozeuRA5Gof9vs4ya961aANcJBdUzB7LN6q4b2";
9
9
  readonly entrosVerifier: "4F97jNoxQzT2qRbkWpW3ztC3Nz2TtKj3rnKG8ExgnrfV";
@@ -316,23 +316,6 @@ interface FeatureVector {
316
316
  /** Concatenated feature vector for SimHash input */
317
317
  type FusedFeatureVector = number[];
318
318
 
319
- declare function mean(values: number[]): number;
320
- declare function variance(values: number[], mu?: number): number;
321
- declare function skewness(values: number[]): number;
322
- declare function kurtosis(values: number[]): number;
323
- declare function condense(values: number[]): StatsSummary;
324
- /**
325
- * Shannon entropy over histogram bins. Measures information density.
326
- * Real human data has moderate entropy (varied but structured).
327
- * Synthetic data is either too uniform (high entropy) or too structured (low entropy).
328
- */
329
- declare function entropy(values: number[], bins?: number): number;
330
- /**
331
- * Autocorrelation at a given lag. Detects periodic synthetic patterns.
332
- * Real human data has low autocorrelation at most lags (chaotic/noisy).
333
- * Synthetic data often has high autocorrelation (periodic/smooth).
334
- */
335
- declare function autocorrelation(values: number[], lag?: number): number;
336
319
  /**
337
320
  * Concatenate raw features without normalization.
338
321
  * Used for server-side validation where physical units matter.
@@ -383,6 +366,8 @@ declare function extractSpeakerFeaturesDetailed(audio: AudioCapture): Promise<{
383
366
  */
384
367
  declare function extractSpeakerFeatures(audio: AudioCapture): Promise<number[]>;
385
368
 
369
+ declare const MOTION_FEATURE_COUNT: number;
370
+ declare const TOUCH_FEATURE_COUNT: number;
386
371
  /**
387
372
  * Compute per-sample acceleration magnitude |a| = √(ax² + ay² + az²) and
388
373
  * linearly resample to a target frame count. Surfaced for server-side
@@ -785,4 +770,4 @@ declare function fetchChallenge(executorUrl: string, walletAddress: string, apiK
785
770
  */
786
771
  declare function encodeAudioAsBase64(samples: Float32Array): string;
787
772
 
788
- export { type AgentHumanOperator, type AudioCapture, type CaptureOptions, type CaptureStage, type ChallengeResponse, type CircuitInput, DEFAULT_CAPTURE_MS, DEFAULT_MIN_DISTANCE, DEFAULT_THRESHOLD, type EntrosAttestation, FINGERPRINT_BITS, type FeatureVector, type FusedFeatureVector, type IdentityState, type LissajousParams, MAX_CAPTURE_MS, MIN_AUDIO_SAMPLES, MIN_CAPTURE_MS, MIN_MOTION_SAMPLES, MIN_TOUCH_SAMPLES, type MotionSample, PROGRAM_IDS, type PackedFingerprint, type Point2D, type ProofResult, type PulseConfig, PulseSDK, PulseSession, SPEAKER_FEATURE_COUNT, type SensorData, type SolanaProof, type StageState, type StatsSummary, type StoredVerificationData, type SubmissionResult, type TBH, type TemporalFingerprint, type TouchSample, type VerificationResult, attestAgentOperator, autocorrelation, bigintToBytes32, computeCommitment, condense, encodeAudioAsBase64, entropy, extractAccelerationMagnitude, extractMotionFeatures, extractMouseDynamics, extractSpeakerFeatures, extractSpeakerFeaturesDetailed, extractTouchFeatures, fetchChallenge, fetchIdentityState, fuseFeatures, fuseRawFeatures, generateLissajousPoints, generateLissajousSequence, generatePhrase, generatePhraseSequence, generateProof, generateSalt, generateSolanaProof, generateTBH, getAgentHumanOperator, hammingDistance, kurtosis, loadVerificationData, mean, packBits, prepareCircuitInput, randomLissajousParams, serializeProof, simhash, skewness, storeVerificationData, submitResetViaWallet, submitViaRelayer, submitViaWallet, toBigEndian32, variance, verifyEntrosAttestation };
773
+ export { type AgentHumanOperator, type AudioCapture, type CaptureOptions, type CaptureStage, type ChallengeResponse, type CircuitInput, DEFAULT_CAPTURE_MS, DEFAULT_MIN_DISTANCE, DEFAULT_THRESHOLD, type EntrosAttestation, FINGERPRINT_BITS, type FeatureVector, type FusedFeatureVector, type IdentityState, type LissajousParams, MAX_CAPTURE_MS, MIN_AUDIO_SAMPLES, MIN_CAPTURE_MS, MIN_MOTION_SAMPLES, MIN_TOUCH_SAMPLES, MOTION_FEATURE_COUNT, type MotionSample, PROGRAM_IDS, type PackedFingerprint, type Point2D, type ProofResult, type PulseConfig, PulseSDK, PulseSession, SPEAKER_FEATURE_COUNT, type SensorData, type SolanaProof, type StageState, type StatsSummary, type StoredVerificationData, type SubmissionResult, type TBH, TOUCH_FEATURE_COUNT, type TemporalFingerprint, type TouchSample, type VerificationResult, attestAgentOperator, bigintToBytes32, computeCommitment, encodeAudioAsBase64, extractAccelerationMagnitude, extractMotionFeatures, extractMouseDynamics, extractSpeakerFeatures, extractSpeakerFeaturesDetailed, extractTouchFeatures, fetchChallenge, fetchIdentityState, fuseFeatures, fuseRawFeatures, generateLissajousPoints, generateLissajousSequence, generatePhrase, generatePhraseSequence, generateProof, generateSalt, generateSolanaProof, generateTBH, getAgentHumanOperator, hammingDistance, loadVerificationData, packBits, prepareCircuitInput, randomLissajousParams, serializeProof, simhash, storeVerificationData, submitResetViaWallet, submitViaRelayer, submitViaWallet, toBigEndian32, verifyEntrosAttestation };
package/dist/index.js CHANGED
@@ -39,17 +39,16 @@ __export(index_exports, {
39
39
  MIN_CAPTURE_MS: () => MIN_CAPTURE_MS,
40
40
  MIN_MOTION_SAMPLES: () => MIN_MOTION_SAMPLES,
41
41
  MIN_TOUCH_SAMPLES: () => MIN_TOUCH_SAMPLES,
42
+ MOTION_FEATURE_COUNT: () => MOTION_FEATURE_COUNT,
42
43
  PROGRAM_IDS: () => PROGRAM_IDS,
43
44
  PulseSDK: () => PulseSDK,
44
45
  PulseSession: () => PulseSession,
45
46
  SPEAKER_FEATURE_COUNT: () => SPEAKER_FEATURE_COUNT,
47
+ TOUCH_FEATURE_COUNT: () => TOUCH_FEATURE_COUNT,
46
48
  attestAgentOperator: () => attestAgentOperator,
47
- autocorrelation: () => autocorrelation,
48
49
  bigintToBytes32: () => bigintToBytes32,
49
50
  computeCommitment: () => computeCommitment,
50
- condense: () => condense,
51
51
  encodeAudioAsBase64: () => encodeAudioAsBase64,
52
- entropy: () => entropy,
53
52
  extractAccelerationMagnitude: () => extractAccelerationMagnitude,
54
53
  extractMotionFeatures: () => extractMotionFeatures,
55
54
  extractMouseDynamics: () => extractMouseDynamics,
@@ -70,21 +69,17 @@ __export(index_exports, {
70
69
  generateTBH: () => generateTBH,
71
70
  getAgentHumanOperator: () => getAgentHumanOperator,
72
71
  hammingDistance: () => hammingDistance,
73
- kurtosis: () => kurtosis,
74
72
  loadVerificationData: () => loadVerificationData,
75
- mean: () => mean,
76
73
  packBits: () => packBits,
77
74
  prepareCircuitInput: () => prepareCircuitInput,
78
75
  randomLissajousParams: () => randomLissajousParams,
79
76
  serializeProof: () => serializeProof,
80
77
  simhash: () => simhash,
81
- skewness: () => skewness,
82
78
  storeVerificationData: () => storeVerificationData,
83
79
  submitResetViaWallet: () => submitResetViaWallet,
84
80
  submitViaRelayer: () => submitViaRelayer,
85
81
  submitViaWallet: () => submitViaWallet,
86
82
  toBigEndian32: () => toBigEndian32,
87
- variance: () => variance,
88
83
  verifyEntrosAttestation: () => verifyEntrosAttestation
89
84
  });
90
85
  module.exports = __toCommonJS(index_exports);
@@ -107,7 +102,7 @@ var TOTAL_PROOF_SIZE = 256;
107
102
  var SIMHASH_SEED = "IAM-PROTOCOL-SIMHASH-V1";
108
103
  var MIN_CAPTURE_MS = 2e3;
109
104
  var MAX_CAPTURE_MS = 6e4;
110
- var DEFAULT_CAPTURE_MS = 7e3;
105
+ var DEFAULT_CAPTURE_MS = 12e3;
111
106
  var PROGRAM_IDS = {
112
107
  entrosAnchor: "GZYwTp2ozeuRA5Gof9vs4ya961aANcJBdUzB7LN6q4b2",
113
108
  entrosVerifier: "4F97jNoxQzT2qRbkWpW3ztC3Nz2TtKj3rnKG8ExgnrfV",
@@ -6433,17 +6428,16 @@ async function fetchChallenge(executorUrl, walletAddress, apiKey) {
6433
6428
  MIN_CAPTURE_MS,
6434
6429
  MIN_MOTION_SAMPLES,
6435
6430
  MIN_TOUCH_SAMPLES,
6431
+ MOTION_FEATURE_COUNT,
6436
6432
  PROGRAM_IDS,
6437
6433
  PulseSDK,
6438
6434
  PulseSession,
6439
6435
  SPEAKER_FEATURE_COUNT,
6436
+ TOUCH_FEATURE_COUNT,
6440
6437
  attestAgentOperator,
6441
- autocorrelation,
6442
6438
  bigintToBytes32,
6443
6439
  computeCommitment,
6444
- condense,
6445
6440
  encodeAudioAsBase64,
6446
- entropy,
6447
6441
  extractAccelerationMagnitude,
6448
6442
  extractMotionFeatures,
6449
6443
  extractMouseDynamics,
@@ -6464,21 +6458,17 @@ async function fetchChallenge(executorUrl, walletAddress, apiKey) {
6464
6458
  generateTBH,
6465
6459
  getAgentHumanOperator,
6466
6460
  hammingDistance,
6467
- kurtosis,
6468
6461
  loadVerificationData,
6469
- mean,
6470
6462
  packBits,
6471
6463
  prepareCircuitInput,
6472
6464
  randomLissajousParams,
6473
6465
  serializeProof,
6474
6466
  simhash,
6475
- skewness,
6476
6467
  storeVerificationData,
6477
6468
  submitResetViaWallet,
6478
6469
  submitViaRelayer,
6479
6470
  submitViaWallet,
6480
6471
  toBigEndian32,
6481
- variance,
6482
6472
  verifyEntrosAttestation
6483
6473
  });
6484
6474
  //# sourceMappingURL=index.js.map