@hinkal/common 0.0.21 → 0.0.23
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/assets/{utxoWorkerLauncher-BEUpD_S3.js → snarkjsWorkerLauncher-DGyRhsnt.js} +2 -2
- package/assets/{snarkjsWorkerLogic-C0jhwQeU.js → snarkjsWorkerLogic-JVcROE0k.js} +1700 -1678
- package/assets/{snarkjsWorkerLogic-DbPzt8sK.js → snarkjsWorkerLogic-asV4ifKL.js} +3 -2
- package/assets/{snarkjsWorkerLauncher-Cxayz-rO.js → utxoWorkerLauncher-BHLbZZie.js} +2 -1
- package/assets/{utxoWorkerLogic-BFs3JZ0z.js → utxoWorkerLogic-B5nYEbpt.js} +7 -7
- package/assets/{utxoWorkerLogic-BIinmUe9.js → utxoWorkerLogic-DxfPxQs8.js} +26661 -26687
- package/assets/viteWorkerURL.constant-dLfAyCEb.js +11 -0
- package/assets/{zkProofWorkerLauncher-CkAXJL76.js → zkProofWorkerLauncher-D8OXlf5e.js} +23 -22
- package/assets/{zkProofWorkerLogic-DO1mhw9j.js → zkProofWorkerLogic-Ch0jn4N_.js} +69 -70
- package/{index-hawBcGgA.js → index-DcZZLkPF.js} +49593 -49625
- package/index.js +1 -1
- package/package.json +1 -1
- package/{snarkjsWorkerLogic-BSQcU9Zo.js → snarkjsWorkerLogic-2nqMU9wj.js} +5 -4
- package/{utxoWorkerLogic-Ck6_gew5.js → utxoWorkerLogic-CLCVRQ27.js} +5 -5
- package/viteWorkerURL.constant-pxNQtpI_.js +9 -0
- package/{workerProxy-Bcp7Fkbp.js → workerProxy-u1IDSczf.js} +1 -1
- package/{zkProofWorkerLogic-DP4Ejyeo.js → zkProofWorkerLogic-CQqAq0cY.js} +20 -20
- package/assets/viteWorkerURL.constant-2FqFkgj-.js +0 -11
- package/viteWorkerURL.constant-CruO8mkG.js +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as Se, B as po } from "./zkProofWorkerLauncher-
|
|
2
|
-
import { e as Ua, r as ho, g as Lo, a as mo, b as bo, c as en, d as ja, f as $a, u as zn, h as yo } from "./zkProofWorkerLogic-
|
|
1
|
+
import { p as Se, B as po } from "./zkProofWorkerLauncher-D8OXlf5e.js";
|
|
2
|
+
import { e as Ua, r as ho, g as Lo, a as mo, b as bo, c as en, d as ja, f as $a, u as zn, h as yo } from "./zkProofWorkerLogic-Ch0jn4N_.js";
|
|
3
3
|
const Co = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4];
|
|
4
4
|
function sn(c, t) {
|
|
5
5
|
if (!t || t == 10)
|
|
@@ -15655,6 +15655,7 @@ const al = typeof Se < "u" && Se.versions != null && Se.versions.node != null, v
|
|
|
15655
15655
|
// @ts-expect-error webpack check is done like this
|
|
15656
15656
|
typeof __webpack_require__ < "u"
|
|
15657
15657
|
), Vi = new yo(), il = async (c) => {
|
|
15658
|
+
console.log("onWorkerMessage snark starts");
|
|
15658
15659
|
const { input: t, wasmFilePath: e, zKeyFilePath: n, chainId: a } = c.payload.data, {
|
|
15659
15660
|
hostLocation: { origin: s },
|
|
15660
15661
|
constants: {
|
|
@@ -1192,8 +1192,9 @@ const It = /* @__PURE__ */ dt(mt), Ft = () => {
|
|
|
1192
1192
|
};
|
|
1193
1193
|
globalThis.process = It;
|
|
1194
1194
|
globalThis.Buffer = gr;
|
|
1195
|
-
const Tt = import("./
|
|
1195
|
+
const Tt = import("./utxoWorkerLogic-DxfPxQs8.js");
|
|
1196
1196
|
addEventListener("message", async (h) => {
|
|
1197
|
+
console.log("addEventListener in Utxo Launcher starts");
|
|
1197
1198
|
const { onWorkerMessage: f } = await Tt;
|
|
1198
1199
|
f(h.data);
|
|
1199
1200
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as U } from "./zkProofWorkerLauncher-
|
|
2
|
-
import { U as l, i as T, h as I, j as f, k as y, l as m, m as h, p as
|
|
1
|
+
import { B as U } from "./zkProofWorkerLauncher-D8OXlf5e.js";
|
|
2
|
+
import { U as l, i as T, h as I, j as f, k as y, l as m, m as h, p as x } from "./zkProofWorkerLogic-Ch0jn4N_.js";
|
|
3
3
|
const g = (e) => {
|
|
4
4
|
const t = T.decode(
|
|
5
5
|
["uint256", "address", "tuple(uint256, uint256, uint256, uint256)", "uint256", "uint256"],
|
|
@@ -15,7 +15,7 @@ const g = (e) => {
|
|
|
15
15
|
timeStamp: c,
|
|
16
16
|
tokenId: p
|
|
17
17
|
};
|
|
18
|
-
},
|
|
18
|
+
}, S = (e, t) => {
|
|
19
19
|
const { amount: o, erc20TokenAddress: r, timeStamp: s, tokenId: n, randomization: a } = g(e);
|
|
20
20
|
return {
|
|
21
21
|
amount: o,
|
|
@@ -25,7 +25,7 @@ const g = (e) => {
|
|
|
25
25
|
randomization: a,
|
|
26
26
|
shieldedPrivateKey: t
|
|
27
27
|
};
|
|
28
|
-
},
|
|
28
|
+
}, _ = (e, t) => {
|
|
29
29
|
const { randomization: o, H0: r, H1: s } = g(e), n = l.checkSignature(o, r, s, t);
|
|
30
30
|
if (!n)
|
|
31
31
|
throw new Error("UTXO doesn't belong to user");
|
|
@@ -41,7 +41,7 @@ const u = new I(), E = async ({ data: e }) => {
|
|
|
41
41
|
}, v = async ({ data: e }) => {
|
|
42
42
|
const t = new l(e.signature), o = t.getShieldedPrivateKey(), r = e.encryptedOutputs.map((s) => {
|
|
43
43
|
try {
|
|
44
|
-
return s.isPositive ? y(U.from(s.value.slice(2), "hex"), t) :
|
|
44
|
+
return s.isPositive ? y(U.from(s.value.slice(2), "hex"), t) : S(s.value, o);
|
|
45
45
|
} catch {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
@@ -63,14 +63,14 @@ const u = new I(), E = async ({ data: e }) => {
|
|
|
63
63
|
}
|
|
64
64
|
else
|
|
65
65
|
try {
|
|
66
|
-
|
|
66
|
+
_(s, t.getShieldedPrivateKey()) && (o.map((c) => c.value).includes(a.value) || o.push(a));
|
|
67
67
|
} catch {
|
|
68
68
|
h("Utxo not decoded");
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
u.postMessageToMainThread({ additionalEncryptedOutputs: o, lastOutput: s });
|
|
72
72
|
}, B = async (e) => {
|
|
73
|
-
console.log("onWorkerMessage starts"), await
|
|
73
|
+
console.log("onWorkerMessage Utxo starts"), await x();
|
|
74
74
|
const { type: t } = e.payload;
|
|
75
75
|
switch (t) {
|
|
76
76
|
case d.BATCH_FILTER_UTXOS_WITH_NULLIFIER:
|