@iam-protocol/pulse-sdk 0.3.8 → 0.3.9

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
@@ -1449,11 +1449,15 @@ async function processSensorData(sensorData, config, wallet, connection) {
1449
1449
  const audioNZ = features.slice(0, 44).filter((v) => v !== 0).length;
1450
1450
  const motionNZ = features.slice(44, 98).filter((v) => v !== 0).length;
1451
1451
  const touchNZ = features.slice(98, 134).filter((v) => v !== 0).length;
1452
+ const rawAudio = sensorData.audio?.samples.length ?? 0;
1453
+ const rawMotion = sensorData.motion.length;
1454
+ const rawTouch = sensorData.touch.length;
1455
+ const sig = features.slice(0, 3).map((v) => v.toFixed(4)).join(",");
1452
1456
  return {
1453
1457
  success: false,
1454
1458
  commitment: tbh.commitmentBytes,
1455
1459
  isFirstVerification: false,
1456
- error: `Proof failed (distance=${distance}, audio=${audioNZ}/44, motion=${motionNZ}/54, touch=${touchNZ}/36): ${proofErr?.message ?? proofErr}`
1460
+ error: `Proof failed (dist=${distance}, feat=${audioNZ}/${motionNZ}/${touchNZ}, raw=${rawAudio}/${rawMotion}/${rawTouch}, sig=${sig}): ${proofErr?.message ?? proofErr}`
1457
1461
  };
1458
1462
  }
1459
1463
  }