@hinkal/common 0.0.75 → 0.0.77
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/{snarkjsWorkerLauncher-Bdl5N2Nh.js → snarkjsWorkerLauncher-ZcAEynda.js} +3 -2
- package/assets/{snarkjsWorkerLogic-_NrgKt7n.js → snarkjsWorkerLogic-BR-lyrT3.js} +8 -4
- package/assets/{snarkjsWorkerLogic-DBACYRYM.js → snarkjsWorkerLogic-CLmQBQI9.js} +11 -7
- package/assets/{utxoWorkerLogic-DOAyE2Ma.js → utxoWorkerLogic-UDGsvkm4.js} +2 -2
- package/assets/viteWorkerURL.constant-DZnJ0Y9S.js +11 -0
- package/assets/{zkProofWorkerLauncher-BFtv6oo6.js → zkProofWorkerLauncher-CPx9PW_l.js} +1 -1
- package/assets/{zkProofWorkerLogic-CAu7zHKp.js → zkProofWorkerLogic-QFkJtjMT.js} +60762 -60818
- package/{index-CIA6_WBh.mjs → index-DjCgJVBU.mjs} +60807 -60764
- package/index.mjs +19 -19
- package/package.json +1 -1
- package/{snarkjsWorkerLogic-CCOjAZoq.mjs → snarkjsWorkerLogic-DLQqaBAP.mjs} +14 -10
- package/{utxoWorkerLogic-DNxsPKY9.mjs → utxoWorkerLogic-DQkkQZ3p.mjs} +2 -2
- package/viteWorkerURL.constant-CjSmMcLQ.mjs +9 -0
- package/{workerProxy-XOEFHnOv.mjs → workerProxy-CUu8m4yW.mjs} +1 -1
- package/{zkProofWorkerLogic-BzExIZ4E.mjs → zkProofWorkerLogic-RbjoYA3K.mjs} +2 -2
- package/assets/viteWorkerURL.constant-M-vZ09UI.js +0 -11
- package/viteWorkerURL.constant-Bnl1C6Xb.mjs +0 -9
|
@@ -1192,10 +1192,11 @@ const It = /* @__PURE__ */ dt(mt), Ft = () => {
|
|
|
1192
1192
|
};
|
|
1193
1193
|
globalThis.process = It;
|
|
1194
1194
|
globalThis.Buffer = gr;
|
|
1195
|
-
const Tt = import("./snarkjsWorkerLogic-
|
|
1195
|
+
const Tt = import("./snarkjsWorkerLogic-BR-lyrT3.js");
|
|
1196
1196
|
addEventListener("message", async (h) => {
|
|
1197
|
+
console.log("a1");
|
|
1197
1198
|
const { onWorkerMessage: f } = await Tt;
|
|
1198
|
-
f(h.data);
|
|
1199
|
+
console.log("a2"), f(h.data), console.log("a3");
|
|
1199
1200
|
});
|
|
1200
1201
|
Ft();
|
|
1201
1202
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, d as dist, B as Buffer$C } from "./snarkjsWorkerLauncher-
|
|
1
|
+
import { p as process$1, d as dist, B as Buffer$C } from "./snarkjsWorkerLauncher-ZcAEynda.js";
|
|
2
2
|
class WorkerProxy {
|
|
3
3
|
isNode = !1;
|
|
4
4
|
/**
|
|
@@ -37322,11 +37322,15 @@ const isWebpack = (
|
|
|
37322
37322
|
// @ts-expect-error webpack check is done like this
|
|
37323
37323
|
typeof __webpack_require__ < "u"
|
|
37324
37324
|
), workerProxy = new WorkerProxy(), onWorkerMessage = async (u) => {
|
|
37325
|
+
console.log("1");
|
|
37325
37326
|
const { input: t, wasmFilePath: a, zKeyFilePath: n, chainId: d } = u.payload.data;
|
|
37326
|
-
u.metadata;
|
|
37327
|
-
let c = a
|
|
37328
|
-
console.log(
|
|
37327
|
+
console.log("2", { input: t, wasmFilePath: a, zKeyFilePath: n }), u.metadata, console.log("3");
|
|
37328
|
+
let c = a;
|
|
37329
|
+
console.log("4");
|
|
37330
|
+
let A = n;
|
|
37331
|
+
console.log({ isWebpack }), console.log({ wasmFilePath: a }), console.log("5"), console.log("6"), console.log({ wasmFullFilePath: c });
|
|
37329
37332
|
try {
|
|
37333
|
+
console.log("7");
|
|
37330
37334
|
const { proof: M, publicSignals: S } = await groth16FullProve(t, c, A), B = await groth16ExportSolidityCallData(M, S), _ = JSON.parse(`[${B}]`);
|
|
37331
37335
|
workerProxy.postMessageToMainThread({ zkCallData: _, proof: M, publicSignals: S });
|
|
37332
37336
|
} catch (M) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as Se, B as ho } from "./zkProofWorkerLauncher-
|
|
2
|
-
import { r as sn, g as Ua, a as Lo, b as mo, c as en,
|
|
1
|
+
import { p as Se, B as ho } from "./zkProofWorkerLauncher-CPx9PW_l.js";
|
|
2
|
+
import { r as sn, g as Ua, a as Lo, b as mo, c as en, e as ja, d as $a, u as zn, f as bo } from "./zkProofWorkerLogic-QFkJtjMT.js";
|
|
3
3
|
const yo = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4];
|
|
4
4
|
function rn(c, t) {
|
|
5
5
|
if (!t || t == 10)
|
|
@@ -12331,7 +12331,7 @@ var ta = Yn.exports, Qr = { exports: {} };
|
|
|
12331
12331
|
error: "err"
|
|
12332
12332
|
}, c.exports.endArray = c.exports.endPrefix + c.exports.array, c.exports.endObject = c.exports.endPrefix + c.exports.object, c.exports.endLine = `${c.exports.endPrefix}line`, c.exports.dataError = `${c.exports.error}-data`;
|
|
12333
12333
|
})(Qr);
|
|
12334
|
-
ja
|
|
12334
|
+
ja.EventEmitter;
|
|
12335
12335
|
const Jr = zn, Zi = $a().Readable, Ra = ta;
|
|
12336
12336
|
Jr.inherits(cn, Zi);
|
|
12337
12337
|
var Wi = cn;
|
|
@@ -15567,7 +15567,7 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : at =
|
|
|
15567
15567
|
})(tl);
|
|
15568
15568
|
$a();
|
|
15569
15569
|
sn();
|
|
15570
|
-
ja
|
|
15570
|
+
ja.EventEmitter;
|
|
15571
15571
|
const el = ta, Vi = Wi, nl = zn;
|
|
15572
15572
|
nl.inherits(Nn, Vi);
|
|
15573
15573
|
function Nn(c, t) {
|
|
@@ -15659,11 +15659,15 @@ const al = (
|
|
|
15659
15659
|
// @ts-expect-error webpack check is done like this
|
|
15660
15660
|
typeof __webpack_require__ < "u"
|
|
15661
15661
|
), Hi = new bo(), il = async (c) => {
|
|
15662
|
+
console.log("1");
|
|
15662
15663
|
const { input: t, wasmFilePath: e, zKeyFilePath: n, chainId: a } = c.payload.data;
|
|
15663
|
-
c.metadata;
|
|
15664
|
-
let s = e
|
|
15665
|
-
console.log(
|
|
15664
|
+
console.log("2", { input: t, wasmFilePath: e, zKeyFilePath: n }), c.metadata, console.log("3");
|
|
15665
|
+
let s = e;
|
|
15666
|
+
console.log("4");
|
|
15667
|
+
let g = n;
|
|
15668
|
+
console.log({ isWebpack: al }), console.log({ wasmFilePath: e }), console.log("5"), console.log("6"), console.log({ wasmFullFilePath: s });
|
|
15666
15669
|
try {
|
|
15670
|
+
console.log("7");
|
|
15667
15671
|
const { proof: d, publicSignals: C } = await Sr(t, s, g), l = await Ir(d, C), o = JSON.parse(`[${l}]`);
|
|
15668
15672
|
Hi.postMessageToMainThread({ zkCallData: o, proof: d, publicSignals: C });
|
|
15669
15673
|
} catch (d) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as U } from "./zkProofWorkerLauncher-
|
|
2
|
-
import { U as l, h as T, f, i as I, j as y, k as m, l as h, p as S } from "./zkProofWorkerLogic-
|
|
1
|
+
import { B as U } from "./zkProofWorkerLauncher-CPx9PW_l.js";
|
|
2
|
+
import { U as l, h as T, f, i as I, j as y, k as m, l as h, p as S } from "./zkProofWorkerLogic-QFkJtjMT.js";
|
|
3
3
|
const g = (e) => {
|
|
4
4
|
const t = T.decode(
|
|
5
5
|
["uint256", "address", "tuple(uint256, uint256, uint256, uint256)", "uint256", "uint256"],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { W as r } from "./zkProofWorkerLogic-QFkJtjMT.js";
|
|
2
|
+
import "./zkProofWorkerLauncher-CPx9PW_l.js";
|
|
3
|
+
var o = self.location.href, e = "" + new URL("snarkjsWorkerLauncher-ZcAEynda.js", import.meta.url).href, a = "" + new URL("utxoWorkerLauncher-DnwHvvqe.js", import.meta.url).href;
|
|
4
|
+
const k = {
|
|
5
|
+
[r.ZKProof]: o,
|
|
6
|
+
[r.SnarkJS]: e,
|
|
7
|
+
[r.UTXO]: a
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
k as workerViteURL
|
|
11
|
+
};
|
|
@@ -1192,7 +1192,7 @@ const It = /* @__PURE__ */ dt(mt), Ft = () => {
|
|
|
1192
1192
|
};
|
|
1193
1193
|
globalThis.process = It;
|
|
1194
1194
|
globalThis.Buffer = gr;
|
|
1195
|
-
const Tt = import("./zkProofWorkerLogic-
|
|
1195
|
+
const Tt = import("./zkProofWorkerLogic-QFkJtjMT.js").then(function(h) {
|
|
1196
1196
|
return h.z;
|
|
1197
1197
|
});
|
|
1198
1198
|
addEventListener("message", async (h) => {
|