@iam-protocol/pulse-sdk 0.3.0 → 0.3.1
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 +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/pulse.ts +9 -0
package/dist/index.mjs
CHANGED
|
@@ -14304,6 +14304,10 @@ async function processSensorData(sensorData, config, wallet, connection) {
|
|
|
14304
14304
|
};
|
|
14305
14305
|
}
|
|
14306
14306
|
const features = await extractFeatures(sensorData);
|
|
14307
|
+
const nonZero = features.filter((v) => v !== 0).length;
|
|
14308
|
+
console.log(
|
|
14309
|
+
`[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.`
|
|
14310
|
+
);
|
|
14307
14311
|
const fingerprint = simhash(features);
|
|
14308
14312
|
const tbh = await generateTBH(fingerprint);
|
|
14309
14313
|
const previousData = loadVerificationData();
|