@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.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/pulse.ts +9 -0
- package/src/sensor/touch.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -13215,10 +13215,12 @@ function captureTouch(element, options = {}) {
|
|
|
13215
13215
|
clearTimeout(maxTimer);
|
|
13216
13216
|
element.removeEventListener("pointermove", handler);
|
|
13217
13217
|
element.removeEventListener("pointerdown", handler);
|
|
13218
|
+
console.log(`[IAM SDK] Touch capture stopped: ${samples.length} samples collected`);
|
|
13218
13219
|
resolve(samples);
|
|
13219
13220
|
}
|
|
13220
13221
|
element.addEventListener("pointermove", handler);
|
|
13221
13222
|
element.addEventListener("pointerdown", handler);
|
|
13223
|
+
console.log(`[IAM SDK] Touch capture started on <${element.tagName}>, listening for pointer events`);
|
|
13222
13224
|
const maxTimer = setTimeout(stopCapture, maxDurationMs);
|
|
13223
13225
|
if (signal) {
|
|
13224
13226
|
if (signal.aborted) {
|
|
@@ -14391,6 +14393,10 @@ async function processSensorData(sensorData, config, wallet, connection) {
|
|
|
14391
14393
|
};
|
|
14392
14394
|
}
|
|
14393
14395
|
const features = await extractFeatures(sensorData);
|
|
14396
|
+
const nonZero = features.filter((v) => v !== 0).length;
|
|
14397
|
+
console.log(
|
|
14398
|
+
`[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.`
|
|
14399
|
+
);
|
|
14394
14400
|
const fingerprint = simhash(features);
|
|
14395
14401
|
const tbh = await generateTBH(fingerprint);
|
|
14396
14402
|
const previousData = loadVerificationData();
|