@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.js
CHANGED
|
@@ -14391,6 +14391,10 @@ async function processSensorData(sensorData, config, wallet, connection) {
|
|
|
14391
14391
|
};
|
|
14392
14392
|
}
|
|
14393
14393
|
const features = await extractFeatures(sensorData);
|
|
14394
|
+
const nonZero = features.filter((v) => v !== 0).length;
|
|
14395
|
+
console.log(
|
|
14396
|
+
`[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.`
|
|
14397
|
+
);
|
|
14394
14398
|
const fingerprint = simhash(features);
|
|
14395
14399
|
const tbh = await generateTBH(fingerprint);
|
|
14396
14400
|
const previousData = loadVerificationData();
|