@permissionless-technologies/upp-sdk 0.3.5 → 0.3.6

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.
@@ -1601,7 +1601,7 @@ function usePoolTransfer(config) {
1601
1601
  const recipientNote = await createNoteForSelf(amount, origin, token);
1602
1602
  const changeNote = await createNoteForSelf(changeAmount, origin, token);
1603
1603
  const [transferModule, proofModule, aspModule] = await Promise.all([
1604
- import('../transfer-P4D57KJ5.js'),
1604
+ import('../transfer-F6YOQTUL.js'),
1605
1605
  import('../proof-C4YBP6RY.js'),
1606
1606
  import('../asp-ZA3RGN7G.js')
1607
1607
  ]);
@@ -1760,7 +1760,7 @@ function useWithdraw(config) {
1760
1760
  const token = BigInt(selectedNote.token);
1761
1761
  setStage("creating_outputs");
1762
1762
  const [transferModule, proofModule, sdk] = await Promise.all([
1763
- import('../transfer-P4D57KJ5.js'),
1763
+ import('../transfer-F6YOQTUL.js'),
1764
1764
  import('../proof-C4YBP6RY.js'),
1765
1765
  import('../index.js')
1766
1766
  ]);
@@ -1988,6 +1988,7 @@ function storePersonalASPId(chainId, address, aspId) {
1988
1988
  }
1989
1989
  init_poseidon();
1990
1990
  var STATE_TREE_DEPTH2 = 32;
1991
+ var ASP_TREE_DEPTH3 = 20;
1991
1992
  function padToDepth2(arr, padValue, depth) {
1992
1993
  if (arr.length >= depth) return arr.slice(0, depth);
1993
1994
  return [...arr, ...Array(depth - arr.length).fill(padValue)];
@@ -2139,7 +2140,7 @@ function useSwap(config) {
2139
2140
  }
2140
2141
  setStage("creating_outputs");
2141
2142
  const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
2142
- import('../transfer-P4D57KJ5.js'),
2143
+ import('../transfer-F6YOQTUL.js'),
2143
2144
  import('../proof-C4YBP6RY.js'),
2144
2145
  import('../index.js'),
2145
2146
  import('../asp-ZA3RGN7G.js')
@@ -2202,8 +2203,8 @@ function useSwap(config) {
2202
2203
  inputLeafIndex: actualLeafIndex.toString(),
2203
2204
  inputPathElements: padToDepth2(merkleProof.pathElements.map(String), "0", STATE_TREE_DEPTH2),
2204
2205
  inputPathIndices: padToDepth2(merkleProof.pathIndices.map(String), "0", STATE_TREE_DEPTH2),
2205
- aspPathElements: aspProofData.aspPathElements.map(String),
2206
- aspPathIndices: aspProofData.aspPathIndices.map(String)
2206
+ aspPathElements: padToDepth2(aspProofData.aspPathElements.map(String), "0", ASP_TREE_DEPTH3),
2207
+ aspPathIndices: padToDepth2(aspProofData.aspPathIndices.map(String), "0", ASP_TREE_DEPTH3)
2207
2208
  };
2208
2209
  const { proof } = await generateUPPProof(
2209
2210
  "withdraw",
@@ -2291,7 +2292,7 @@ function useSwap(config) {
2291
2292
  }
2292
2293
  setStage("creating_outputs");
2293
2294
  const [transferModule, proofModule, sdk, aspModule] = await Promise.all([
2294
- import('../transfer-P4D57KJ5.js'),
2295
+ import('../transfer-F6YOQTUL.js'),
2295
2296
  import('../proof-C4YBP6RY.js'),
2296
2297
  import('../index.js'),
2297
2298
  import('../asp-ZA3RGN7G.js')
@@ -2360,8 +2361,8 @@ function useSwap(config) {
2360
2361
  inputLeafIndex: actualLeafIndex.toString(),
2361
2362
  inputPathElements: padToDepth2(merkleProof.pathElements.map(String), "0", STATE_TREE_DEPTH2),
2362
2363
  inputPathIndices: padToDepth2(merkleProof.pathIndices.map(String), "0", STATE_TREE_DEPTH2),
2363
- aspPathElements: aspProofData.aspPathElements.map(String),
2364
- aspPathIndices: aspProofData.aspPathIndices.map(String)
2364
+ aspPathElements: padToDepth2(aspProofData.aspPathElements.map(String), "0", ASP_TREE_DEPTH3),
2365
+ aspPathIndices: padToDepth2(aspProofData.aspPathIndices.map(String), "0", ASP_TREE_DEPTH3)
2365
2366
  };
2366
2367
  const { proof } = await generateUPPProof(
2367
2368
  "withdraw",
@@ -2521,7 +2522,7 @@ function useSwap(config) {
2521
2522
  createNoteForSelf(changeAmount, origin, token)
2522
2523
  ]);
2523
2524
  const [transferModule, proofModule, aspModule] = await Promise.all([
2524
- import('../transfer-P4D57KJ5.js'),
2525
+ import('../transfer-F6YOQTUL.js'),
2525
2526
  import('../proof-C4YBP6RY.js'),
2526
2527
  import('../asp-ZA3RGN7G.js')
2527
2528
  ]);