zeldwallet 0.1.4 → 0.1.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.
- package/bin/setup.js +0 -0
- package/dist/wasm/package.json +1 -1
- package/dist/wasm/zeldhash_miner_wasm_bg.wasm +0 -0
- package/dist/worker.js +153 -138
- package/dist/zeldwallet.es.js +1 -1
- package/package.json +5 -4
package/bin/setup.js
CHANGED
|
File without changes
|
package/dist/wasm/package.json
CHANGED
|
Binary file
|
package/dist/worker.js
CHANGED
|
@@ -43,21 +43,21 @@ const R = (1n << 64n) - 1n, K = (t) => {
|
|
|
43
43
|
const n = t + BigInt(e - 1);
|
|
44
44
|
if (n > R)
|
|
45
45
|
throw new Error("nonce range exceeds u64");
|
|
46
|
-
const
|
|
47
|
-
let
|
|
48
|
-
for (;
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
46
|
+
const i = [];
|
|
47
|
+
let r = t;
|
|
48
|
+
for (; r <= n; ) {
|
|
49
|
+
const s = K(r), o = X(s), a = n < o ? n : o, l = a - r + 1n;
|
|
50
|
+
if (l > BigInt(Number.MAX_SAFE_INTEGER))
|
|
51
51
|
throw new Error("segment size exceeds safe integer range");
|
|
52
|
-
if (
|
|
53
|
-
start:
|
|
54
|
-
size: Number(
|
|
55
|
-
nonceLength:
|
|
56
|
-
}),
|
|
52
|
+
if (i.push({
|
|
53
|
+
start: r,
|
|
54
|
+
size: Number(l),
|
|
55
|
+
nonceLength: s
|
|
56
|
+
}), a === n)
|
|
57
57
|
break;
|
|
58
|
-
|
|
58
|
+
r = a + 1n;
|
|
59
59
|
}
|
|
60
|
-
return
|
|
60
|
+
return i;
|
|
61
61
|
}, J = (t, e) => {
|
|
62
62
|
if (t < 0n)
|
|
63
63
|
throw new Error("startNonce must be non-negative");
|
|
@@ -66,48 +66,55 @@ const R = (1n << 64n) - 1n, K = (t) => {
|
|
|
66
66
|
const n = t + BigInt(e - 1);
|
|
67
67
|
if (n > R)
|
|
68
68
|
throw new Error("nonce range exceeds u64");
|
|
69
|
-
const
|
|
70
|
-
let
|
|
71
|
-
for (;
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
69
|
+
const i = [];
|
|
70
|
+
let r = t;
|
|
71
|
+
for (; r <= n; ) {
|
|
72
|
+
const s = H(r), o = j(s), a = n < o ? n : o, l = a - r + 1n;
|
|
73
|
+
if (l > BigInt(Number.MAX_SAFE_INTEGER))
|
|
74
74
|
throw new Error("segment size exceeds safe integer range");
|
|
75
|
-
if (
|
|
76
|
-
start:
|
|
77
|
-
size: Number(
|
|
78
|
-
nonceLength:
|
|
79
|
-
}),
|
|
75
|
+
if (i.push({
|
|
76
|
+
start: r,
|
|
77
|
+
size: Number(l),
|
|
78
|
+
nonceLength: s
|
|
79
|
+
}), a === n)
|
|
80
80
|
break;
|
|
81
|
-
|
|
81
|
+
r = a + 1n;
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return i;
|
|
84
84
|
}, Q = {};
|
|
85
|
-
|
|
85
|
+
if (typeof globalThis.__ZELDMINER_WASM_BASE__ > "u")
|
|
86
|
+
try {
|
|
87
|
+
const t = typeof window < "u" && window.location?.origin ? window.location.origin : typeof self < "u" && self.location?.origin ? self.location.origin : "http://localhost";
|
|
88
|
+
globalThis.__ZELDMINER_WASM_BASE__ = new URL("/wasm/", t).href;
|
|
89
|
+
} catch {
|
|
90
|
+
globalThis.__ZELDMINER_WASM_BASE__ = "/wasm/";
|
|
91
|
+
}
|
|
92
|
+
let y = null, d = null, O = !1;
|
|
86
93
|
const Z = () => {
|
|
87
|
-
if (
|
|
88
|
-
|
|
94
|
+
if (O) return;
|
|
95
|
+
O = !0;
|
|
89
96
|
const t = globalThis.GPUAdapter?.prototype, e = t?.requestDevice;
|
|
90
|
-
!t || typeof e != "function" || (t.requestDevice = function(
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
for (const
|
|
94
|
-
(!(
|
|
97
|
+
!t || typeof e != "function" || (t.requestDevice = function(i) {
|
|
98
|
+
if (i?.requiredLimits && typeof this.limits == "object") {
|
|
99
|
+
const r = i.requiredLimits, s = this.limits;
|
|
100
|
+
for (const o of Object.keys(r))
|
|
101
|
+
(!(o in s) || s[o] === void 0) && delete r[o];
|
|
95
102
|
}
|
|
96
|
-
return e.call(this,
|
|
103
|
+
return e.call(this, i);
|
|
97
104
|
});
|
|
98
|
-
},
|
|
105
|
+
}, U = (t) => t.endsWith("/") ? t : `${t}/`, A = (t) => {
|
|
99
106
|
const e = t.trim();
|
|
100
|
-
return e && (typeof window < "u" && typeof window.location?.origin == "string" ?
|
|
107
|
+
return e && (typeof window < "u" && typeof window.location?.origin == "string" ? U(new URL(e, window.location.origin).href) : U(new URL(e, import.meta.url).href));
|
|
101
108
|
}, tt = () => {
|
|
102
109
|
const t = globalThis.__ZELDMINER_WASM_BASE__;
|
|
103
110
|
if (typeof t == "string" && t.trim())
|
|
104
|
-
return
|
|
111
|
+
return A(t);
|
|
105
112
|
const e = Q?.VITE_ZELDMINER_WASM_BASE;
|
|
106
113
|
if (typeof e == "string" && e.trim())
|
|
107
|
-
return
|
|
108
|
-
const n = "
|
|
109
|
-
return n.trim() ?
|
|
110
|
-
},
|
|
114
|
+
return A(e);
|
|
115
|
+
const n = "./";
|
|
116
|
+
return n.trim() ? A(`${U(n.trim())}wasm/`) : A("/wasm/");
|
|
117
|
+
}, z = tt(), W = `${z}zeldhash_miner_wasm.js`, et = `${z}zeldhash_miner_wasm_bg.wasm`, x = (t) => t instanceof Error ? t.message : String(t), nt = async () => {
|
|
111
118
|
Z();
|
|
112
119
|
let t;
|
|
113
120
|
try {
|
|
@@ -115,20 +122,20 @@ const Z = () => {
|
|
|
115
122
|
/* @vite-ignore */
|
|
116
123
|
W
|
|
117
124
|
);
|
|
118
|
-
} catch (
|
|
125
|
+
} catch (i) {
|
|
119
126
|
throw new Error(
|
|
120
|
-
`Failed to import WASM bundle (${W}). Did you run ./scripts/build-wasm.sh? (${
|
|
127
|
+
`Failed to import WASM bundle (${W}). Did you run ./scripts/build-wasm.sh? (${x(i)})`
|
|
121
128
|
);
|
|
122
129
|
}
|
|
123
130
|
const e = t.default;
|
|
124
131
|
if (typeof e != "function")
|
|
125
132
|
throw new Error("WASM init function is missing from the bundle.");
|
|
126
133
|
try {
|
|
127
|
-
const
|
|
128
|
-
await e({ module_or_path:
|
|
129
|
-
} catch (
|
|
134
|
+
const i = new URL(et, import.meta.url);
|
|
135
|
+
await e({ module_or_path: i });
|
|
136
|
+
} catch (i) {
|
|
130
137
|
throw new Error(
|
|
131
|
-
`Failed to initialize WASM bundle: ${
|
|
138
|
+
`Failed to initialize WASM bundle: ${x(i)}`
|
|
132
139
|
);
|
|
133
140
|
}
|
|
134
141
|
const n = t;
|
|
@@ -137,69 +144,77 @@ const Z = () => {
|
|
|
137
144
|
} catch {
|
|
138
145
|
}
|
|
139
146
|
return n;
|
|
140
|
-
},
|
|
147
|
+
}, it = async () => y || (d || (d = nt().then((t) => (y = t, t)).catch((t) => {
|
|
141
148
|
throw d = null, t;
|
|
142
|
-
})), d)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
})), d);
|
|
150
|
+
if (typeof globalThis.__ZELDMINER_WASM_BASE__ > "u")
|
|
151
|
+
try {
|
|
152
|
+
const t = typeof self < "u" && self.location?.origin ? self.location.origin : "http://localhost";
|
|
153
|
+
globalThis.__ZELDMINER_WASM_BASE__ = new URL("/wasm/", t).href;
|
|
154
|
+
} catch {
|
|
155
|
+
globalThis.__ZELDMINER_WASM_BASE__ = "/wasm/";
|
|
156
|
+
}
|
|
157
|
+
const B = self, rt = B.name ?? void 0, I = (t) => t instanceof Error ? t.message : String(t);
|
|
158
|
+
let N = "cpu", b = null;
|
|
159
|
+
const w = (t) => {
|
|
160
|
+
B.postMessage({ ...t, workerId: rt });
|
|
161
|
+
}, h = (t, e = u.WORKER_ERROR, n) => {
|
|
162
|
+
w({ type: "error", message: t, code: e, details: n });
|
|
163
|
+
}, ot = (t) => typeof t == "object" && t !== null && "ok" in t, st = (t) => typeof t == "object" && t !== null && "nonce" in t && "txid" in t, at = (t) => {
|
|
149
164
|
const e = BigInt(Number.MAX_SAFE_INTEGER);
|
|
150
165
|
return t > e ? Number.MAX_SAFE_INTEGER : t < -e ? -Number.MAX_SAFE_INTEGER : Number(t);
|
|
151
|
-
},
|
|
166
|
+
}, ct = (t) => ({
|
|
152
167
|
nonceLength: t.nonceLength,
|
|
153
168
|
prefix: new Uint8Array(t.prefix),
|
|
154
169
|
suffix: new Uint8Array(t.suffix),
|
|
155
170
|
useCborNonce: t.useCborNonce
|
|
156
171
|
}), F = (t, e) => {
|
|
157
|
-
t.set(e.nonceLength,
|
|
158
|
-
}, ut = async (t, e, n,
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
return
|
|
162
|
-
const
|
|
172
|
+
t.set(e.nonceLength, ct(e));
|
|
173
|
+
}, ut = async (t, e, n, i, r) => {
|
|
174
|
+
const s = t.get(i.nonceLength);
|
|
175
|
+
if (s)
|
|
176
|
+
return s;
|
|
177
|
+
const o = e.build_mining_template(
|
|
163
178
|
n.inputs,
|
|
164
179
|
n.outputs,
|
|
165
|
-
|
|
180
|
+
r,
|
|
166
181
|
BigInt(n.satsPerVbyte),
|
|
167
|
-
|
|
168
|
-
|
|
182
|
+
i.start,
|
|
183
|
+
i.size,
|
|
169
184
|
n.distribution ?? null
|
|
170
|
-
),
|
|
171
|
-
...
|
|
172
|
-
nonceLength:
|
|
173
|
-
useCborNonce:
|
|
185
|
+
), a = {
|
|
186
|
+
...o,
|
|
187
|
+
nonceLength: i.nonceLength,
|
|
188
|
+
useCborNonce: o.useCborNonce ?? n.useCborNonce
|
|
174
189
|
};
|
|
175
|
-
return F(t,
|
|
176
|
-
},
|
|
190
|
+
return F(t, a), a;
|
|
191
|
+
}, lt = async (t, e, n, i, r, s, o, a) => {
|
|
177
192
|
if (e === "gpu") {
|
|
178
193
|
if (!t.mine_batch_gpu)
|
|
179
194
|
throw new Error("GPU mining requested but mine_batch_gpu is unavailable");
|
|
180
195
|
return t.mine_batch_gpu(
|
|
181
196
|
n,
|
|
182
|
-
r,
|
|
183
197
|
i,
|
|
184
|
-
|
|
198
|
+
r,
|
|
185
199
|
s,
|
|
186
|
-
|
|
200
|
+
o,
|
|
201
|
+
a
|
|
187
202
|
);
|
|
188
203
|
}
|
|
189
204
|
return t.mine_batch_wasm(
|
|
190
205
|
n,
|
|
191
|
-
r,
|
|
192
206
|
i,
|
|
193
|
-
|
|
207
|
+
r,
|
|
194
208
|
s,
|
|
195
|
-
|
|
209
|
+
o,
|
|
210
|
+
a
|
|
196
211
|
);
|
|
197
|
-
},
|
|
212
|
+
}, ft = async (t, e) => {
|
|
198
213
|
let n;
|
|
199
214
|
try {
|
|
200
|
-
if (n = await
|
|
215
|
+
if (n = await it(), N === "gpu") {
|
|
201
216
|
if (!n.mine_batch_gpu) {
|
|
202
|
-
|
|
217
|
+
h(
|
|
203
218
|
"GPU mining requested but mine_batch_gpu is unavailable",
|
|
204
219
|
u.WEBGPU_NOT_AVAILABLE
|
|
205
220
|
);
|
|
@@ -207,27 +222,27 @@ const E = (t) => {
|
|
|
207
222
|
}
|
|
208
223
|
n.init_gpu && await n.init_gpu();
|
|
209
224
|
}
|
|
210
|
-
} catch (
|
|
211
|
-
const
|
|
212
|
-
|
|
225
|
+
} catch (m) {
|
|
226
|
+
const g = I(m), E = N === "gpu" ? u.WEBGPU_NOT_AVAILABLE : u.WORKER_ERROR;
|
|
227
|
+
h(`Failed to initialize WASM: ${g}`, E);
|
|
213
228
|
return;
|
|
214
229
|
}
|
|
215
|
-
const
|
|
216
|
-
F(
|
|
217
|
-
const
|
|
218
|
-
let
|
|
230
|
+
const i = /* @__PURE__ */ new Map(), r = t.template.useCborNonce ?? !!(t.distribution && t.distribution.length > 0);
|
|
231
|
+
F(i, { ...t.template, useCborNonce: r });
|
|
232
|
+
const s = t.nonceStep ?? BigInt(t.batchSize), o = t.network === "signet" ? "testnet" : t.network;
|
|
233
|
+
let a = t.startNonce, l = 0n;
|
|
219
234
|
const G = performance.now();
|
|
220
235
|
for (; !e.signal.aborted; ) {
|
|
221
|
-
const
|
|
222
|
-
let
|
|
223
|
-
for (;
|
|
224
|
-
const
|
|
225
|
-
let
|
|
236
|
+
const m = a;
|
|
237
|
+
let g = t.batchSize, E = 0n;
|
|
238
|
+
for (; g > 0 && !e.signal.aborted; ) {
|
|
239
|
+
const D = m + E;
|
|
240
|
+
let c;
|
|
226
241
|
try {
|
|
227
|
-
|
|
228
|
-
} catch (
|
|
229
|
-
|
|
230
|
-
`Invalid nonce range: ${
|
|
242
|
+
c = (r ? J(D, g) : Y(D, g))[0];
|
|
243
|
+
} catch (_) {
|
|
244
|
+
h(
|
|
245
|
+
`Invalid nonce range: ${I(_)}`,
|
|
231
246
|
u.INVALID_INPUT
|
|
232
247
|
), e.abort();
|
|
233
248
|
return;
|
|
@@ -235,102 +250,102 @@ const E = (t) => {
|
|
|
235
250
|
let S;
|
|
236
251
|
try {
|
|
237
252
|
S = await ut(
|
|
238
|
-
|
|
253
|
+
i,
|
|
239
254
|
n,
|
|
240
255
|
{
|
|
241
256
|
inputs: t.inputs,
|
|
242
257
|
outputs: t.outputs,
|
|
243
258
|
satsPerVbyte: t.satsPerVbyte,
|
|
244
259
|
distribution: t.distribution,
|
|
245
|
-
useCborNonce:
|
|
260
|
+
useCborNonce: r
|
|
246
261
|
},
|
|
247
|
-
|
|
248
|
-
|
|
262
|
+
c,
|
|
263
|
+
o
|
|
249
264
|
);
|
|
250
|
-
} catch (
|
|
251
|
-
|
|
252
|
-
`Failed to build mining template: ${
|
|
265
|
+
} catch (_) {
|
|
266
|
+
h(
|
|
267
|
+
`Failed to build mining template: ${I(_)}`,
|
|
253
268
|
u.WORKER_ERROR
|
|
254
269
|
), e.abort();
|
|
255
270
|
return;
|
|
256
271
|
}
|
|
257
|
-
let
|
|
272
|
+
let f;
|
|
258
273
|
const k = performance.now();
|
|
259
274
|
try {
|
|
260
|
-
|
|
275
|
+
f = await lt(
|
|
261
276
|
n,
|
|
262
|
-
|
|
277
|
+
N,
|
|
263
278
|
S.prefix,
|
|
264
279
|
S.suffix,
|
|
265
|
-
|
|
266
|
-
|
|
280
|
+
c.start,
|
|
281
|
+
c.size,
|
|
267
282
|
t.targetZeros,
|
|
268
|
-
|
|
283
|
+
r
|
|
269
284
|
);
|
|
270
|
-
} catch (
|
|
271
|
-
const p =
|
|
272
|
-
|
|
285
|
+
} catch (_) {
|
|
286
|
+
const p = I(_);
|
|
287
|
+
h(
|
|
273
288
|
`Batch mining failed: ${p}`,
|
|
274
289
|
u.WORKER_ERROR
|
|
275
290
|
), e.abort();
|
|
276
291
|
return;
|
|
277
292
|
}
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
if (!
|
|
281
|
-
|
|
282
|
-
|
|
293
|
+
const P = performance.now() - k;
|
|
294
|
+
if (ot(f)) {
|
|
295
|
+
if (!f.ok) {
|
|
296
|
+
h(
|
|
297
|
+
f.error ?? "Validation failed",
|
|
283
298
|
u.INVALID_INPUT
|
|
284
299
|
), e.abort();
|
|
285
300
|
return;
|
|
286
301
|
}
|
|
287
|
-
} else if (
|
|
288
|
-
const
|
|
302
|
+
} else if (st(f)) {
|
|
303
|
+
const _ = l + E, p = BigInt(f.nonce) - c.start + 1n, L = _ + p, T = performance.now() - G, M = T > 0 ? at(L) / (T / 1e3) : 0, q = c.start + p - 1n, C = {
|
|
289
304
|
psbt: "",
|
|
290
|
-
txid:
|
|
291
|
-
nonce: BigInt(
|
|
292
|
-
attempts:
|
|
293
|
-
duration:
|
|
294
|
-
hashRate:
|
|
305
|
+
txid: f.txid,
|
|
306
|
+
nonce: BigInt(f.nonce),
|
|
307
|
+
attempts: L,
|
|
308
|
+
duration: T,
|
|
309
|
+
hashRate: M
|
|
295
310
|
};
|
|
296
|
-
|
|
311
|
+
w({
|
|
297
312
|
type: "found",
|
|
298
313
|
result: C,
|
|
299
|
-
hashesProcessed:
|
|
300
|
-
hashRate:
|
|
314
|
+
hashesProcessed: L,
|
|
315
|
+
hashRate: M,
|
|
301
316
|
lastNonce: q
|
|
302
317
|
}), e.abort();
|
|
303
318
|
return;
|
|
304
319
|
}
|
|
305
|
-
|
|
306
|
-
const v =
|
|
307
|
-
|
|
320
|
+
l += BigInt(c.size), E += BigInt(c.size), g -= c.size;
|
|
321
|
+
const v = P > 0 ? c.size / (P / 1e3) : c.size, $ = c.start + BigInt(c.size) - 1n;
|
|
322
|
+
w({ type: "progress", hashesProcessed: l, hashRate: v, lastNonce: $ });
|
|
308
323
|
}
|
|
309
324
|
if (e.signal.aborted)
|
|
310
325
|
break;
|
|
311
|
-
const V =
|
|
312
|
-
|
|
326
|
+
const V = m + BigInt(t.batchSize) - 1n;
|
|
327
|
+
w({ type: "batch_complete", lastNonce: V }), a = m + s;
|
|
313
328
|
}
|
|
314
|
-
},
|
|
329
|
+
}, _t = (t) => {
|
|
315
330
|
const e = new AbortController();
|
|
316
|
-
|
|
317
|
-
|
|
331
|
+
b?.abort(), b = e, ft(t, e).finally(() => {
|
|
332
|
+
b === e && (b = null);
|
|
318
333
|
});
|
|
319
334
|
};
|
|
320
335
|
B.addEventListener("message", (t) => {
|
|
321
336
|
const e = t.data;
|
|
322
337
|
switch (e.type) {
|
|
323
338
|
case "init":
|
|
324
|
-
|
|
339
|
+
N = e.mode, w({ type: "ready" });
|
|
325
340
|
break;
|
|
326
341
|
case "mine":
|
|
327
|
-
|
|
342
|
+
_t(e);
|
|
328
343
|
break;
|
|
329
344
|
case "stop":
|
|
330
|
-
|
|
345
|
+
b?.abort();
|
|
331
346
|
break;
|
|
332
347
|
default:
|
|
333
|
-
|
|
348
|
+
h(
|
|
334
349
|
`Unknown message type: ${e.type}`,
|
|
335
350
|
u.WORKER_ERROR
|
|
336
351
|
);
|
package/dist/zeldwallet.es.js
CHANGED
|
@@ -15476,7 +15476,7 @@ class UC {
|
|
|
15476
15476
|
`, document.head.appendChild(t);
|
|
15477
15477
|
}
|
|
15478
15478
|
}
|
|
15479
|
-
const OC = "0.1.
|
|
15479
|
+
const OC = "0.1.6", zC = {
|
|
15480
15480
|
version: OC
|
|
15481
15481
|
}, LC = zC.version, gg = ["getInfo", "getAddresses", "signMessage", "signPsbt"], qC = ["WBIP004", "WBIP005", "WBIP006"];
|
|
15482
15482
|
class KC {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"overrides": {
|
|
4
4
|
"valibot": "^1.2.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.6",
|
|
7
7
|
"description": "Lightweight JavaScript library for creating a Bitcoin wallet directly in the browser",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist/zeldwallet.es.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^18.2.0 || ^19.0.0",
|
|
27
27
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
28
|
-
"zeldhash-miner": "
|
|
28
|
+
"zeldhash-miner": "0.2.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
31
31
|
"react": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
-
"copy-wasm": "
|
|
42
|
+
"copy-wasm": "node -e \"const fs=require('fs'),path=require('path');const minerPath='node_modules/zeldhash-miner';if(!fs.existsSync(minerPath)){console.log('zeldhash-miner not installed, skipping wasm copy');process.exit(0);}fs.mkdirSync('public/wasm',{recursive:true});const wasmDir=path.join(minerPath,'wasm');if(fs.existsSync(wasmDir)){fs.readdirSync(wasmDir).forEach(f=>fs.copyFileSync(path.join(wasmDir,f),path.join('public/wasm',f)));}const workerSrc=path.join(minerPath,'dist/worker.js');if(fs.existsSync(workerSrc)){let c=fs.readFileSync(workerSrc,'utf8').replace(/\\n?\\/\\/# sourceMappingURL=worker\\.js\\.map\\s*$/,'');fs.writeFileSync('public/worker.js',c);}\"",
|
|
43
43
|
"dev": "npm run copy-wasm && vite",
|
|
44
44
|
"build": "npm run copy-wasm && npm run lint && tsc && vite build",
|
|
45
45
|
"preview": "vite preview",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"vite-plugin-dts": "^4.5.4",
|
|
101
101
|
"vite-plugin-top-level-await": "^1.6.0",
|
|
102
102
|
"vite-plugin-wasm": "^3.5.0",
|
|
103
|
-
"vitest": "^4.0.16"
|
|
103
|
+
"vitest": "^4.0.16",
|
|
104
|
+
"zeldhash-miner": "^0.2.2"
|
|
104
105
|
}
|
|
105
106
|
}
|