@permissionless-technologies/upp-sdk 0.4.8 → 0.4.10

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.
@@ -486,6 +486,7 @@ function UPPAccountProvider({
486
486
  const noteOwnerHash = BigInt("0x" + raw.slice(16, 80));
487
487
  const encryptedPayload = raw.slice(80);
488
488
  if (noteOwnerHash !== masterKeys.ownerHash) {
489
+ console.log(`[syncNotes] ownerHash mismatch: note=${noteOwnerHash.toString(16).slice(0, 16)}\u2026 ours=${masterKeys.ownerHash.toString(16).slice(0, 16)}\u2026`);
489
490
  skippedOwner++;
490
491
  continue;
491
492
  }
@@ -521,7 +522,7 @@ function UPPAccountProvider({
521
522
  ]);
522
523
  const expectedHex = toHex(expectedCommitment, { size: 32 });
523
524
  if (expectedHex.toLowerCase() !== candidate.commitment.toLowerCase()) {
524
- console.warn("[syncNotes] Commitment mismatch, skipping");
525
+ console.warn(`[syncNotes] Commitment mismatch: expected=${expectedHex.slice(0, 16)}\u2026 got=${candidate.commitment.slice(0, 16)}\u2026`);
525
526
  continue;
526
527
  }
527
528
  const newNote = {
@@ -603,7 +604,7 @@ function UPPAccountProvider({
603
604
  const ownerSecret = BigInt(note.ownerSecret);
604
605
  const commitment = BigInt(note.commitment);
605
606
  const nullifier = await sdk2.poseidon([
606
- ownerSecret % 2736030358979909402780800718157159386076813972158567259200215660948447373041n,
607
+ ownerSecret,
607
608
  BigInt(correctLeaf),
608
609
  commitment
609
610
  ]);
@@ -636,7 +637,7 @@ function UPPAccountProvider({
636
637
  const ownerSecret = BigInt(note.ownerSecret);
637
638
  const commitment = BigInt(note.commitment);
638
639
  const nullifier = await sdk2.poseidon([
639
- ownerSecret % 2736030358979909402780800718157159386076813972158567259200215660948447373041n,
640
+ ownerSecret,
640
641
  BigInt(correctLeaf),
641
642
  commitment
642
643
  ]);