@iam-protocol/pulse-sdk 0.3.0 → 0.3.2

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/dist/index.mjs CHANGED
@@ -13128,10 +13128,12 @@ function captureTouch(element, options = {}) {
13128
13128
  clearTimeout(maxTimer);
13129
13129
  element.removeEventListener("pointermove", handler);
13130
13130
  element.removeEventListener("pointerdown", handler);
13131
+ console.log(`[IAM SDK] Touch capture stopped: ${samples.length} samples collected`);
13131
13132
  resolve(samples);
13132
13133
  }
13133
13134
  element.addEventListener("pointermove", handler);
13134
13135
  element.addEventListener("pointerdown", handler);
13136
+ console.log(`[IAM SDK] Touch capture started on <${element.tagName}>, listening for pointer events`);
13135
13137
  const maxTimer = setTimeout(stopCapture, maxDurationMs);
13136
13138
  if (signal) {
13137
13139
  if (signal.aborted) {
@@ -14304,6 +14306,10 @@ async function processSensorData(sensorData, config, wallet, connection) {
14304
14306
  };
14305
14307
  }
14306
14308
  const features = await extractFeatures(sensorData);
14309
+ const nonZero = features.filter((v) => v !== 0).length;
14310
+ console.log(
14311
+ `[IAM SDK] Feature vector: ${features.length} dimensions, ${nonZero} non-zero. Audio[0..43]: ${features.slice(0, 44).filter((v) => v !== 0).length} non-zero. Motion/Mouse[44..97]: ${features.slice(44, 98).filter((v) => v !== 0).length} non-zero. Touch[98..133]: ${features.slice(98, 134).filter((v) => v !== 0).length} non-zero.`
14312
+ );
14307
14313
  const fingerprint = simhash(features);
14308
14314
  const tbh = await generateTBH(fingerprint);
14309
14315
  const previousData = loadVerificationData();