@prohetamine/redstone 0.0.1 → 0.0.21
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/dist/{ReownAuthentication-Bfv31LzI.mjs → ReownAuthentication-BeMb_QeI.mjs} +1 -1
- package/dist/{ReownAuthentication-d8aYgGOq.js → ReownAuthentication-CrOfLrLS.js} +1 -1
- package/dist/{SwapController-DjzUWRyQ.mjs → SwapController-Cy3OZ3F4.mjs} +1 -1
- package/dist/{SwapController-4lzoYsYr.js → SwapController-Rf5fHNC2.js} +1 -1
- package/dist/{ccip-TuO68NeE.mjs → ccip-C5GbuKZP.mjs} +2 -2
- package/dist/{ccip-CvwbEhki.js → ccip-Na5IwZf_.js} +1 -1
- package/dist/{data-capture-xVUNZJ2T.js → data-capture-D0fpHcf1.js} +1 -1
- package/dist/{data-capture-BwdjH2vc.mjs → data-capture-DEzYbNFK.mjs} +3 -3
- package/dist/{email-BCZObJCY.js → email-Ck8lR7Cj.js} +1 -1
- package/dist/{email-m-wo60fN.mjs → email-D5wjRjye.mjs} +2 -2
- package/dist/{embedded-wallet-DdZmv5qP.mjs → embedded-wallet-B4nCTx4R.mjs} +1 -1
- package/dist/{embedded-wallet-CGSri-4g.js → embedded-wallet-Chux8NTy.js} +1 -1
- package/dist/features-CLAc4e_e.mjs +6 -0
- package/dist/{features-BJ8kNaE8.js → features-DFGD6yzJ.js} +1 -1
- package/dist/{index-CD-QGO70.mjs → index-1SB6lfVg.mjs} +1 -1
- package/dist/{index-CMzdgE-y.mjs → index-B2d4-zSb.mjs} +2 -2
- package/dist/{index-BvUx3ULC.js → index-BKCgrBz9.js} +1 -1
- package/dist/{index-D7VuOaCI.js → index-BU2JygAb.js} +1 -1
- package/dist/{index-B6Mg114Z.mjs → index-Bdp1bQzP.mjs} +421 -401
- package/dist/{index-CjZQCcwG.js → index-BufUUVfo.js} +42 -42
- package/dist/{index-Ho06VKh2.mjs → index-C2ZIXvE5.mjs} +1 -1
- package/dist/{index-DvllakY0.mjs → index-C_XC4Tfy.mjs} +5 -5
- package/dist/{index-aamBi9Tu.js → index-Cc3jLrGo.js} +1 -1
- package/dist/{index-BYQqNbCe.js → index-ChBHXxA5.js} +1 -1
- package/dist/{index-DVf4BnNh.mjs → index-CrV8dfsL.mjs} +1 -1
- package/dist/{index-BmdHwtJo.js → index-DO7Iq_KI.js} +1 -1
- package/dist/{index-DV7SQwgn.mjs → index-DSpGrqDD.mjs} +1 -1
- package/dist/{index-DhN9vL4k.js → index-DV77zyYL.js} +1 -1
- package/dist/{index-CJtXfdoM.mjs → index-DWbY8-1l.mjs} +2 -2
- package/dist/{index-4lfXeo30.js → index-Df9DDzNq.js} +1 -1
- package/dist/{index-BX7gAgT3.mjs → index-N71MS8By.mjs} +1 -1
- package/dist/{index-a8mS2Eh1.js → index-Vluim0Nu.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{onramp-DLlhSPQg.js → onramp-BWryjQ-k.js} +1 -1
- package/dist/{onramp-k-EAEepC.mjs → onramp-CsBpZ5no.mjs} +1 -1
- package/dist/{parseSignature-D1tZHglo.js → parseSignature-7MpLezEU.js} +2 -2
- package/dist/{parseSignature-DM0lwcDr.mjs → parseSignature-B4VrgZ-L.mjs} +2 -2
- package/dist/{pay-with-exchange-CFIcUXUe.mjs → pay-with-exchange-7JIQ3rUR.mjs} +2 -2
- package/dist/{pay-with-exchange---G2M1Ag.js → pay-with-exchange-KPRwJr7L.js} +1 -1
- package/dist/{receive-B9LCljO6.mjs → receive-BNwxfwPP.mjs} +1 -1
- package/dist/{receive-E8H6GDOX.js → receive-DMStI9fK.js} +1 -1
- package/dist/{send-DZd_xhsd.mjs → send-C5KcsM6L.mjs} +4 -4
- package/dist/{send-B-AooLph.js → send-Do4uNES3.js} +1 -1
- package/dist/{socials-YSUYSh8o.js → socials-C8deQdqe.js} +1 -1
- package/dist/{socials-ChWFLEFe.mjs → socials-DNYOdLp5.mjs} +1 -1
- package/dist/{swaps-DpR9W9Ld.js → swaps-CJr670ob.js} +1 -1
- package/dist/{swaps-Du7-Ui_V.mjs → swaps-DjlcibcQ.mjs} +3 -3
- package/dist/{transactions-VPsz2OLe.js → transactions-CG40lxHR.js} +1 -1
- package/dist/{transactions-DhsK5-QJ.mjs → transactions-S7OEj83I.mjs} +1 -1
- package/dist/{w3m-modal-KuYD-zqQ.mjs → w3m-modal-B6RpiGld.mjs} +3 -3
- package/dist/{w3m-modal-DhomfjKU.js → w3m-modal-CZSJSIls.js} +1 -1
- package/package.json +2 -2
- package/readme.md +1 -1
- package/dist/features-CJ34oImB.mjs +0 -6
|
@@ -400,55 +400,55 @@ var WI = { exports: {} };
|
|
|
400
400
|
(function(n, r) {
|
|
401
401
|
t.exports = r();
|
|
402
402
|
})(An, function() {
|
|
403
|
-
var n = 1e3, r = 6e4, s = 36e5, i = "millisecond", o = "second", a = "minute", c = "hour", l = "day", u = "week", d = "month", h = "quarter", f = "year", p = "date", g = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(
|
|
404
|
-
var b = ["th", "st", "nd", "rd"], x =
|
|
405
|
-
return "[" +
|
|
406
|
-
} }, w = function(
|
|
407
|
-
var T = String(
|
|
408
|
-
return !T || T.length >= b ?
|
|
409
|
-
}, E = { s: w, z: function(
|
|
410
|
-
var b = -
|
|
403
|
+
var n = 1e3, r = 6e4, s = 36e5, i = "millisecond", o = "second", a = "minute", c = "hour", l = "day", u = "week", d = "month", h = "quarter", f = "year", p = "date", g = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(D) {
|
|
404
|
+
var b = ["th", "st", "nd", "rd"], x = D % 100;
|
|
405
|
+
return "[" + D + (b[(x - 20) % 10] || b[x] || b[0]) + "]";
|
|
406
|
+
} }, w = function(D, b, x) {
|
|
407
|
+
var T = String(D);
|
|
408
|
+
return !T || T.length >= b ? D : "" + Array(b + 1 - T.length).join(x) + D;
|
|
409
|
+
}, E = { s: w, z: function(D) {
|
|
410
|
+
var b = -D.utcOffset(), x = Math.abs(b), T = Math.floor(x / 60), k = x % 60;
|
|
411
411
|
return (b <= 0 ? "+" : "-") + w(T, 2, "0") + ":" + w(k, 2, "0");
|
|
412
|
-
}, m: function
|
|
413
|
-
if (b.date() < x.date()) return -
|
|
412
|
+
}, m: function D(b, x) {
|
|
413
|
+
if (b.date() < x.date()) return -D(x, b);
|
|
414
414
|
var T = 12 * (x.year() - b.year()) + (x.month() - b.month()), k = b.clone().add(T, d), R = x - k < 0, $ = b.clone().add(T + (R ? -1 : 1), d);
|
|
415
415
|
return +(-(T + (x - k) / (R ? k - $ : $ - k)) || 0);
|
|
416
|
-
}, a: function(
|
|
417
|
-
return
|
|
418
|
-
}, p: function(
|
|
419
|
-
return { M: d, y: f, w: u, d: l, D: p, h: c, m: a, s: o, ms: i, Q: h }[
|
|
420
|
-
}, u: function(
|
|
421
|
-
return
|
|
416
|
+
}, a: function(D) {
|
|
417
|
+
return D < 0 ? Math.ceil(D) || 0 : Math.floor(D);
|
|
418
|
+
}, p: function(D) {
|
|
419
|
+
return { M: d, y: f, w: u, d: l, D: p, h: c, m: a, s: o, ms: i, Q: h }[D] || String(D || "").toLowerCase().replace(/s$/, "");
|
|
420
|
+
}, u: function(D) {
|
|
421
|
+
return D === void 0;
|
|
422
422
|
} }, _ = "en", N = {};
|
|
423
423
|
N[_] = v;
|
|
424
|
-
var
|
|
425
|
-
return
|
|
426
|
-
}, B = function
|
|
424
|
+
var U = "$isDayjsObject", O = function(D) {
|
|
425
|
+
return D instanceof j || !(!D || !D[U]);
|
|
426
|
+
}, B = function D(b, x, T) {
|
|
427
427
|
var k;
|
|
428
428
|
if (!b) return _;
|
|
429
429
|
if (typeof b == "string") {
|
|
430
430
|
var R = b.toLowerCase();
|
|
431
431
|
N[R] && (k = R), x && (N[R] = x, k = R);
|
|
432
432
|
var $ = b.split("-");
|
|
433
|
-
if (!k && $.length > 1) return
|
|
433
|
+
if (!k && $.length > 1) return D($[0]);
|
|
434
434
|
} else {
|
|
435
435
|
var q = b.name;
|
|
436
436
|
N[q] = b, k = q;
|
|
437
437
|
}
|
|
438
438
|
return !T && k && (_ = k), k || !T && _;
|
|
439
|
-
}, W = function(
|
|
440
|
-
if (O(
|
|
439
|
+
}, W = function(D, b) {
|
|
440
|
+
if (O(D)) return D.clone();
|
|
441
441
|
var x = typeof b == "object" ? b : {};
|
|
442
|
-
return x.date =
|
|
442
|
+
return x.date = D, x.args = arguments, new j(x);
|
|
443
443
|
}, z = E;
|
|
444
|
-
z.l = B, z.i = O, z.w = function(
|
|
445
|
-
return W(
|
|
444
|
+
z.l = B, z.i = O, z.w = function(D, b) {
|
|
445
|
+
return W(D, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
|
|
446
446
|
};
|
|
447
447
|
var j = function() {
|
|
448
|
-
function
|
|
449
|
-
this.$L = B(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[
|
|
448
|
+
function D(x) {
|
|
449
|
+
this.$L = B(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[U] = !0;
|
|
450
450
|
}
|
|
451
|
-
var b =
|
|
451
|
+
var b = D.prototype;
|
|
452
452
|
return b.parse = function(x) {
|
|
453
453
|
this.$d = function(T) {
|
|
454
454
|
var k = T.date, R = T.utc;
|
|
@@ -658,16 +658,16 @@ var WI = { exports: {} };
|
|
|
658
658
|
return this.$d.toISOString();
|
|
659
659
|
}, b.toString = function() {
|
|
660
660
|
return this.$d.toUTCString();
|
|
661
|
-
},
|
|
661
|
+
}, D;
|
|
662
662
|
}(), L = j.prototype;
|
|
663
|
-
return W.prototype = L, [["$ms", i], ["$s", o], ["$m", a], ["$H", c], ["$W", l], ["$M", d], ["$y", f], ["$D", p]].forEach(function(
|
|
664
|
-
L[
|
|
665
|
-
return this.$g(b,
|
|
663
|
+
return W.prototype = L, [["$ms", i], ["$s", o], ["$m", a], ["$H", c], ["$W", l], ["$M", d], ["$y", f], ["$D", p]].forEach(function(D) {
|
|
664
|
+
L[D[1]] = function(b) {
|
|
665
|
+
return this.$g(b, D[0], D[1]);
|
|
666
666
|
};
|
|
667
|
-
}), W.extend = function(
|
|
668
|
-
return
|
|
669
|
-
}, W.locale = B, W.isDayjs = O, W.unix = function(
|
|
670
|
-
return W(1e3 *
|
|
667
|
+
}), W.extend = function(D, b) {
|
|
668
|
+
return D.$i || (D(b, j, W), D.$i = !0), W;
|
|
669
|
+
}, W.locale = B, W.isDayjs = O, W.unix = function(D) {
|
|
670
|
+
return W(1e3 * D);
|
|
671
671
|
}, W.en = N[_], W.Ls = N, W.p = {}, W;
|
|
672
672
|
});
|
|
673
673
|
})(WI);
|
|
@@ -704,8 +704,8 @@ var zI = { exports: {} };
|
|
|
704
704
|
var N = (n.rounding || Math.round)(Math.abs(p));
|
|
705
705
|
if (m = p > 0, N <= _.r || !_.r) {
|
|
706
706
|
N <= 1 && E > 0 && (_ = v[E - 1]);
|
|
707
|
-
var
|
|
708
|
-
f && (N = f("" + N)), g = typeof
|
|
707
|
+
var U = y[_.l];
|
|
708
|
+
f && (N = f("" + N)), g = typeof U == "string" ? U.replace("%d", N) : U(N, u, _.l, m);
|
|
709
709
|
break;
|
|
710
710
|
}
|
|
711
711
|
}
|
|
@@ -6359,13 +6359,13 @@ function nc(t) {
|
|
|
6359
6359
|
var w = Object.assign({}, r, v), E = t.browser.serialize === !0 ? Object.keys(w) : s;
|
|
6360
6360
|
delete m.serializers, M4([m], E, w, this._stdErrSerialize);
|
|
6361
6361
|
}
|
|
6362
|
-
function _(
|
|
6363
|
-
this._childLevel = (
|
|
6362
|
+
function _(U) {
|
|
6363
|
+
this._childLevel = (U._childLevel | 0) + 1, this.bindings = m, w && (this.serializers = w, this._serialize = E), e && (this._logEvent = uv([].concat(U._logEvent.bindings, m)));
|
|
6364
6364
|
}
|
|
6365
6365
|
_.prototype = this;
|
|
6366
6366
|
const N = new _(this);
|
|
6367
|
-
return lA(this, N), N.child = function(...
|
|
6368
|
-
return p.call(this, g, ...
|
|
6367
|
+
return lA(this, N), N.child = function(...U) {
|
|
6368
|
+
return p.call(this, g, ...U);
|
|
6369
6369
|
}, N.level = y.level || this.level, g.onChild(N), N;
|
|
6370
6370
|
}
|
|
6371
6371
|
return l;
|
|
@@ -9421,14 +9421,14 @@ let BT = class extends DT {
|
|
|
9421
9421
|
for (let w = 0; w < 16; w++, n += 4)
|
|
9422
9422
|
Tc[w] = e.getUint32(n), Nc[w] = e.getUint32(n += 4);
|
|
9423
9423
|
for (let w = 16; w < 80; w++) {
|
|
9424
|
-
const E = Tc[w - 15] | 0, _ = Nc[w - 15] | 0, N = Dh(E, _, 1) ^ Dh(E, _, 8) ^ yA(E, _, 7),
|
|
9424
|
+
const E = Tc[w - 15] | 0, _ = Nc[w - 15] | 0, N = Dh(E, _, 1) ^ Dh(E, _, 8) ^ yA(E, _, 7), U = Uh(E, _, 1) ^ Uh(E, _, 8) ^ xA(E, _, 7), O = Tc[w - 2] | 0, B = Nc[w - 2] | 0, W = Dh(O, B, 19) ^ Lw(O, B, 61) ^ yA(O, B, 6), z = Uh(O, B, 19) ^ Mw(O, B, 61) ^ xA(O, B, 6), j = JF(U, z, Nc[w - 7], Nc[w - 16]), L = QF(j, N, W, Tc[w - 7], Tc[w - 16]);
|
|
9425
9425
|
Tc[w] = L | 0, Nc[w] = j | 0;
|
|
9426
9426
|
}
|
|
9427
9427
|
let { Ah: r, Al: s, Bh: i, Bl: o, Ch: a, Cl: c, Dh: l, Dl: u, Eh: d, El: h, Fh: f, Fl: p, Gh: g, Gl: m, Hh: y, Hl: v } = this;
|
|
9428
9428
|
for (let w = 0; w < 80; w++) {
|
|
9429
|
-
const E = Dh(d, h, 14) ^ Dh(d, h, 18) ^ Lw(d, h, 41), _ = Uh(d, h, 14) ^ Uh(d, h, 18) ^ Mw(d, h, 41), N = d & f ^ ~d & g,
|
|
9429
|
+
const E = Dh(d, h, 14) ^ Dh(d, h, 18) ^ Lw(d, h, 41), _ = Uh(d, h, 14) ^ Uh(d, h, 18) ^ Mw(d, h, 41), N = d & f ^ ~d & g, U = h & p ^ ~h & m, O = XF(v, _, U, aW[w], Nc[w]), B = ej(O, y, E, N, oW[w], Tc[w]), W = O | 0, z = Dh(r, s, 28) ^ Lw(r, s, 34) ^ Lw(r, s, 39), j = Uh(r, s, 28) ^ Mw(r, s, 34) ^ Mw(r, s, 39), L = r & i ^ r & a ^ i & a, D = s & o ^ s & c ^ o & c;
|
|
9430
9430
|
y = g | 0, v = m | 0, g = f | 0, m = p | 0, f = d | 0, p = h | 0, { h: d, l: h } = ma(l | 0, u | 0, B | 0, W | 0), l = a | 0, u = c | 0, a = i | 0, c = o | 0, i = r | 0, o = s | 0;
|
|
9431
|
-
const b = ZF(W, j,
|
|
9431
|
+
const b = ZF(W, j, D);
|
|
9432
9432
|
r = YF(b, B, z, L), s = b | 0;
|
|
9433
9433
|
}
|
|
9434
9434
|
({ h: r, l: s } = ma(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: i, l: o } = ma(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: a, l: c } = ma(this.Ch | 0, this.Cl | 0, a | 0, c | 0), { h: l, l: u } = ma(this.Dh | 0, this.Dl | 0, l | 0, u | 0), { h: d, l: h } = ma(this.Eh | 0, this.El | 0, d | 0, h | 0), { h: f, l: p } = ma(this.Fh | 0, this.Fl | 0, f | 0, p | 0), { h: g, l: m } = ma(this.Gh | 0, this.Gl | 0, g | 0, m | 0), { h: y, l: v } = ma(this.Hh | 0, this.Hl | 0, y | 0, v | 0), this.set(r, s, i, o, a, c, l, u, d, h, f, p, g, m, y, v);
|
|
@@ -10542,8 +10542,8 @@ function NA(t, e = {}) {
|
|
|
10542
10542
|
transport: E,
|
|
10543
10543
|
status: "error"
|
|
10544
10544
|
}), i(_) || w === h.length - 1 || (y ?? (y = h.slice(w + 1).some((N) => {
|
|
10545
|
-
const { include:
|
|
10546
|
-
return
|
|
10545
|
+
const { include: U, exclude: O } = N({ chain: c }).config.methods || {};
|
|
10546
|
+
return U ? U.includes(g) : O ? !O.includes(g) : !0;
|
|
10547
10547
|
})), !y))
|
|
10548
10548
|
throw _;
|
|
10549
10549
|
return v(w + 1);
|
|
@@ -10593,7 +10593,7 @@ function DW({ chain: t, interval: e = 4e3, onTransports: n, ping: r, sampleCount
|
|
|
10593
10593
|
}));
|
|
10594
10594
|
u.push(h), u.length > s && u.shift();
|
|
10595
10595
|
const f = Math.max(...u.map((g) => Math.max(...g.map(({ latency: m }) => m)))), p = o.map((g, m) => {
|
|
10596
|
-
const y = u.map((N) => N[m].latency), w = 1 - y.reduce((N,
|
|
10596
|
+
const y = u.map((N) => N[m].latency), w = 1 - y.reduce((N, U) => N + U, 0) / y.length / f, E = u.map((N) => N[m].success), _ = E.reduce((N, U) => N + U, 0) / E.length;
|
|
10597
10597
|
return _ === 0 ? [0, m] : [
|
|
10598
10598
|
l * w + c * _,
|
|
10599
10599
|
m
|
|
@@ -10629,7 +10629,7 @@ function zw(t, e = {}) {
|
|
|
10629
10629
|
methods: o,
|
|
10630
10630
|
name: a,
|
|
10631
10631
|
async request({ method: _, params: N }) {
|
|
10632
|
-
const
|
|
10632
|
+
const U = { method: _, params: N }, { schedule: O } = dW({
|
|
10633
10633
|
id: w,
|
|
10634
10634
|
wait: m,
|
|
10635
10635
|
shouldSplitBatch(j) {
|
|
@@ -10643,12 +10643,12 @@ function zw(t, e = {}) {
|
|
|
10643
10643
|
await E.request({
|
|
10644
10644
|
body: j
|
|
10645
10645
|
})
|
|
10646
|
-
], [{ error: W, result: z }] = await B(
|
|
10646
|
+
], [{ error: W, result: z }] = await B(U);
|
|
10647
10647
|
if (d)
|
|
10648
10648
|
return { error: W, result: z };
|
|
10649
10649
|
if (W)
|
|
10650
10650
|
throw new $T({
|
|
10651
|
-
body:
|
|
10651
|
+
body: U,
|
|
10652
10652
|
error: W,
|
|
10653
10653
|
url: w
|
|
10654
10654
|
});
|
|
@@ -13527,7 +13527,7 @@ const sH = {
|
|
|
13527
13527
|
let dx;
|
|
13528
13528
|
async function $A() {
|
|
13529
13529
|
if (!dx) {
|
|
13530
|
-
const { createPublicClient: t, http: e, defineChain: n } = await import("./index-
|
|
13530
|
+
const { createPublicClient: t, http: e, defineChain: n } = await import("./index-C_XC4Tfy.mjs");
|
|
13531
13531
|
dx = {
|
|
13532
13532
|
createPublicClient: t,
|
|
13533
13533
|
http: e,
|
|
@@ -16099,14 +16099,14 @@ let AV = class extends eV {
|
|
|
16099
16099
|
process(e, n) {
|
|
16100
16100
|
for (let w = 0; w < 16; w++, n += 4) Oc[w] = e.getUint32(n), Pc[w] = e.getUint32(n += 4);
|
|
16101
16101
|
for (let w = 16; w < 80; w++) {
|
|
16102
|
-
const E = Oc[w - 15] | 0, _ = Pc[w - 15] | 0, N = it.rotrSH(E, _, 1) ^ it.rotrSH(E, _, 8) ^ it.shrSH(E, _, 7),
|
|
16102
|
+
const E = Oc[w - 15] | 0, _ = Pc[w - 15] | 0, N = it.rotrSH(E, _, 1) ^ it.rotrSH(E, _, 8) ^ it.shrSH(E, _, 7), U = it.rotrSL(E, _, 1) ^ it.rotrSL(E, _, 8) ^ it.shrSL(E, _, 7), O = Oc[w - 2] | 0, B = Pc[w - 2] | 0, W = it.rotrSH(O, B, 19) ^ it.rotrBH(O, B, 61) ^ it.shrSH(O, B, 6), z = it.rotrSL(O, B, 19) ^ it.rotrBL(O, B, 61) ^ it.shrSL(O, B, 6), j = it.add4L(U, z, Pc[w - 7], Pc[w - 16]), L = it.add4H(j, N, W, Oc[w - 7], Oc[w - 16]);
|
|
16103
16103
|
Oc[w] = L | 0, Pc[w] = j | 0;
|
|
16104
16104
|
}
|
|
16105
16105
|
let { Ah: r, Al: s, Bh: i, Bl: o, Ch: a, Cl: c, Dh: l, Dl: u, Eh: d, El: h, Fh: f, Fl: p, Gh: g, Gl: m, Hh: y, Hl: v } = this;
|
|
16106
16106
|
for (let w = 0; w < 80; w++) {
|
|
16107
|
-
const E = it.rotrSH(d, h, 14) ^ it.rotrSH(d, h, 18) ^ it.rotrBH(d, h, 41), _ = it.rotrSL(d, h, 14) ^ it.rotrSL(d, h, 18) ^ it.rotrBL(d, h, 41), N = d & f ^ ~d & g,
|
|
16107
|
+
const E = it.rotrSH(d, h, 14) ^ it.rotrSH(d, h, 18) ^ it.rotrBH(d, h, 41), _ = it.rotrSL(d, h, 14) ^ it.rotrSL(d, h, 18) ^ it.rotrBL(d, h, 41), N = d & f ^ ~d & g, U = h & p ^ ~h & m, O = it.add5L(v, _, U, CV[w], Pc[w]), B = it.add5H(O, y, E, N, EV[w], Oc[w]), W = O | 0, z = it.rotrSH(r, s, 28) ^ it.rotrBH(r, s, 34) ^ it.rotrBH(r, s, 39), j = it.rotrSL(r, s, 28) ^ it.rotrBL(r, s, 34) ^ it.rotrBL(r, s, 39), L = r & i ^ r & a ^ i & a, D = s & o ^ s & c ^ o & c;
|
|
16108
16108
|
y = g | 0, v = m | 0, g = f | 0, m = p | 0, f = d | 0, p = h | 0, { h: d, l: h } = it.add(l | 0, u | 0, B | 0, W | 0), l = a | 0, u = c | 0, a = i | 0, c = o | 0, i = r | 0, o = s | 0;
|
|
16109
|
-
const b = it.add3L(W, j,
|
|
16109
|
+
const b = it.add3L(W, j, D);
|
|
16110
16110
|
r = it.add3H(b, B, z, L), s = b | 0;
|
|
16111
16111
|
}
|
|
16112
16112
|
({ h: r, l: s } = it.add(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: i, l: o } = it.add(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: a, l: c } = it.add(this.Ch | 0, this.Cl | 0, a | 0, c | 0), { h: l, l: u } = it.add(this.Dh | 0, this.Dl | 0, l | 0, u | 0), { h: d, l: h } = it.add(this.Eh | 0, this.El | 0, d | 0, h | 0), { h: f, l: p } = it.add(this.Fh | 0, this.Fl | 0, f | 0, p | 0), { h: g, l: m } = it.add(this.Gh | 0, this.Gl | 0, g | 0, m | 0), { h: y, l: v } = it.add(this.Hh | 0, this.Hl | 0, y | 0, v | 0), this.set(r, s, i, o, a, c, l, u, d, h, f, p, g, m, y, v);
|
|
@@ -16592,11 +16592,11 @@ function YV(t) {
|
|
|
16592
16592
|
}
|
|
16593
16593
|
w.BASE = new w(e.Gx, e.Gy, Xr, u(e.Gx * e.Gy)), w.ZERO = new w(Li, Xr, Xr, Li);
|
|
16594
16594
|
const { BASE: E, ZERO: _ } = w, N = zV(w, a * 8);
|
|
16595
|
-
function
|
|
16595
|
+
function U(b) {
|
|
16596
16596
|
return Pn(b, r);
|
|
16597
16597
|
}
|
|
16598
16598
|
function O(b) {
|
|
16599
|
-
return
|
|
16599
|
+
return U(Hb(b));
|
|
16600
16600
|
}
|
|
16601
16601
|
function B(b) {
|
|
16602
16602
|
const x = n.BYTES;
|
|
@@ -16613,13 +16613,13 @@ function YV(t) {
|
|
|
16613
16613
|
}
|
|
16614
16614
|
function j(b, x, T = {}) {
|
|
16615
16615
|
b = xa("message", b), s && (b = s(b));
|
|
16616
|
-
const { prefix: k, scalar: R, pointBytes: $ } = B(x), q = z(T.context, k, b), G = E.multiply(q).toRawBytes(), re = z(T.context, G, $, b), ee =
|
|
16616
|
+
const { prefix: k, scalar: R, pointBytes: $ } = B(x), q = z(T.context, k, b), G = E.multiply(q).toRawBytes(), re = z(T.context, G, $, b), ee = U(q + re * R);
|
|
16617
16617
|
q0("signature.s", ee, Li, r);
|
|
16618
16618
|
const ne = t8(G, Sv(ee, n.BYTES));
|
|
16619
16619
|
return xa("result", ne, n.BYTES * 2);
|
|
16620
16620
|
}
|
|
16621
16621
|
const L = GV;
|
|
16622
|
-
function
|
|
16622
|
+
function D(b, x, T, k = L) {
|
|
16623
16623
|
const { context: R, zip215: $ } = k, q = n.BYTES;
|
|
16624
16624
|
b = xa("signature", b, 2 * q), x = xa("message", x), T = xa("publicKey", T, q), $ !== void 0 && vx("zip215", $), s && (x = s(x));
|
|
16625
16625
|
const G = Hb(b.slice(q, 2 * q));
|
|
@@ -16633,7 +16633,7 @@ function YV(t) {
|
|
|
16633
16633
|
const ve = z(R, ee.toRawBytes(), re.toRawBytes(), x);
|
|
16634
16634
|
return ee.add(re.multiplyUnsafe(ve)).subtract(ne).clearCofactor().equals(w.ZERO);
|
|
16635
16635
|
}
|
|
16636
|
-
return E._setWindowSize(8), { CURVE: e, getPublicKey: W, sign: j, verify:
|
|
16636
|
+
return E._setWindowSize(8), { CURVE: e, getPublicKey: W, sign: j, verify: D, ExtendedPoint: w, utils: { getExtendedPublicKey: B, randomPrivateKey: () => o(n.BYTES), precompute(b = 8, x = w.BASE) {
|
|
16637
16637
|
return x._setWindowSize(b), x.multiply(BigInt(3)), x;
|
|
16638
16638
|
} } };
|
|
16639
16639
|
}
|
|
@@ -16684,7 +16684,7 @@ function fq(t, e) {
|
|
|
16684
16684
|
if (p.length === 0) return "";
|
|
16685
16685
|
for (var g = 0, m = 0, y = 0, v = p.length; y !== v && p[y] === 0; ) y++, g++;
|
|
16686
16686
|
for (var w = (v - y) * u + 1 >>> 0, E = new Uint8Array(w); y !== v; ) {
|
|
16687
|
-
for (var _ = p[y], N = 0,
|
|
16687
|
+
for (var _ = p[y], N = 0, U = w - 1; (_ !== 0 || N < m) && U !== -1; U--, N++) _ += 256 * E[U] >>> 0, E[U] = _ % a >>> 0, _ = _ / a >>> 0;
|
|
16688
16688
|
if (_ !== 0) throw new Error("Non-zero carry");
|
|
16689
16689
|
m = N, y++;
|
|
16690
16690
|
}
|
|
@@ -16706,8 +16706,8 @@ function fq(t, e) {
|
|
|
16706
16706
|
y = _, g++;
|
|
16707
16707
|
}
|
|
16708
16708
|
if (p[g] !== " ") {
|
|
16709
|
-
for (var
|
|
16710
|
-
for (var O = new Uint8Array(m + (v -
|
|
16709
|
+
for (var U = v - y; U !== v && w[U] === 0; ) U++;
|
|
16710
|
+
for (var O = new Uint8Array(m + (v - U)), B = m; U !== v; ) O[B++] = w[U++];
|
|
16711
16711
|
return O;
|
|
16712
16712
|
}
|
|
16713
16713
|
}
|
|
@@ -18495,8 +18495,8 @@ function fZ(t) {
|
|
|
18495
18495
|
return { x: _, y: N };
|
|
18496
18496
|
});
|
|
18497
18497
|
function o(w) {
|
|
18498
|
-
const { a: E, b: _ } = e, N = n.sqr(w),
|
|
18499
|
-
return n.add(n.add(
|
|
18498
|
+
const { a: E, b: _ } = e, N = n.sqr(w), U = n.mul(N, w);
|
|
18499
|
+
return n.add(n.add(U, n.mul(w, E)), _);
|
|
18500
18500
|
}
|
|
18501
18501
|
function a(w, E) {
|
|
18502
18502
|
const _ = n.sqr(E), N = o(w);
|
|
@@ -18511,7 +18511,7 @@ function fZ(t) {
|
|
|
18511
18511
|
return pC(w, Mn, e.n);
|
|
18512
18512
|
}
|
|
18513
18513
|
function d(w) {
|
|
18514
|
-
const { allowedPrivateKeyLengths: E, nByteLength: _, wrapPrivateKey: N, n:
|
|
18514
|
+
const { allowedPrivateKeyLengths: E, nByteLength: _, wrapPrivateKey: N, n: U } = e;
|
|
18515
18515
|
if (E && typeof w != "bigint") {
|
|
18516
18516
|
if (L1(w) && (w = Pm(w)), typeof w != "string" || !E.includes(w.length))
|
|
18517
18517
|
throw new Error("invalid private key");
|
|
@@ -18523,19 +18523,19 @@ function fZ(t) {
|
|
|
18523
18523
|
} catch {
|
|
18524
18524
|
throw new Error("invalid private key, expected hex or " + _ + " bytes, got " + typeof w);
|
|
18525
18525
|
}
|
|
18526
|
-
return N && (O = is(O,
|
|
18526
|
+
return N && (O = is(O, U)), Ef("private key", O, Mn, U), O;
|
|
18527
18527
|
}
|
|
18528
18528
|
function h(w) {
|
|
18529
18529
|
if (!(w instanceof g))
|
|
18530
18530
|
throw new Error("ProjectivePoint expected");
|
|
18531
18531
|
}
|
|
18532
18532
|
const f = A8((w, E) => {
|
|
18533
|
-
const { px: _, py: N, pz:
|
|
18534
|
-
if (n.eql(
|
|
18533
|
+
const { px: _, py: N, pz: U } = w;
|
|
18534
|
+
if (n.eql(U, n.ONE))
|
|
18535
18535
|
return { x: _, y: N };
|
|
18536
18536
|
const O = w.is0();
|
|
18537
|
-
E == null && (E = O ? n.ONE : n.inv(
|
|
18538
|
-
const B = n.mul(_, E), W = n.mul(N, E), z = n.mul(
|
|
18537
|
+
E == null && (E = O ? n.ONE : n.inv(U));
|
|
18538
|
+
const B = n.mul(_, E), W = n.mul(N, E), z = n.mul(U, E);
|
|
18539
18539
|
if (O)
|
|
18540
18540
|
return { x: n.ZERO, y: n.ZERO };
|
|
18541
18541
|
if (!n.eql(z, n.ONE))
|
|
@@ -18574,8 +18574,8 @@ function fZ(t) {
|
|
|
18574
18574
|
throw new Error("invalid affine point");
|
|
18575
18575
|
if (E instanceof g)
|
|
18576
18576
|
throw new Error("projective point not allowed");
|
|
18577
|
-
const
|
|
18578
|
-
return
|
|
18577
|
+
const U = (O) => n.eql(O, n.ZERO);
|
|
18578
|
+
return U(_) && U(N) ? g.ZERO : new g(_, N, n.ONE);
|
|
18579
18579
|
}
|
|
18580
18580
|
get x() {
|
|
18581
18581
|
return this.toAffine().x;
|
|
@@ -18591,7 +18591,7 @@ function fZ(t) {
|
|
|
18591
18591
|
*/
|
|
18592
18592
|
static normalizeZ(E) {
|
|
18593
18593
|
const _ = oR(n, E.map((N) => N.pz));
|
|
18594
|
-
return E.map((N,
|
|
18594
|
+
return E.map((N, U) => N.toAffine(_[U])).map(g.fromAffine);
|
|
18595
18595
|
}
|
|
18596
18596
|
/**
|
|
18597
18597
|
* Converts hash string or Uint8Array to Point.
|
|
@@ -18628,7 +18628,7 @@ function fZ(t) {
|
|
|
18628
18628
|
*/
|
|
18629
18629
|
equals(E) {
|
|
18630
18630
|
h(E);
|
|
18631
|
-
const { px: _, py: N, pz:
|
|
18631
|
+
const { px: _, py: N, pz: U } = this, { px: O, py: B, pz: W } = E, z = n.eql(n.mul(_, W), n.mul(O, U)), j = n.eql(n.mul(N, W), n.mul(B, U));
|
|
18632
18632
|
return z && j;
|
|
18633
18633
|
}
|
|
18634
18634
|
/**
|
|
@@ -18642,9 +18642,9 @@ function fZ(t) {
|
|
|
18642
18642
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
|
18643
18643
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
18644
18644
|
double() {
|
|
18645
|
-
const { a: E, b: _ } = e, N = n.mul(_, Bx), { px:
|
|
18646
|
-
let W = n.ZERO, z = n.ZERO, j = n.ZERO, L = n.mul(
|
|
18647
|
-
return x = n.add(x, x), j = n.mul(
|
|
18645
|
+
const { a: E, b: _ } = e, N = n.mul(_, Bx), { px: U, py: O, pz: B } = this;
|
|
18646
|
+
let W = n.ZERO, z = n.ZERO, j = n.ZERO, L = n.mul(U, U), D = n.mul(O, O), b = n.mul(B, B), x = n.mul(U, O);
|
|
18647
|
+
return x = n.add(x, x), j = n.mul(U, B), j = n.add(j, j), W = n.mul(E, j), z = n.mul(N, b), z = n.add(W, z), W = n.sub(D, z), z = n.add(D, z), z = n.mul(W, z), W = n.mul(x, W), j = n.mul(N, j), b = n.mul(E, b), x = n.sub(L, b), x = n.mul(E, x), x = n.add(x, j), j = n.add(L, L), L = n.add(j, L), L = n.add(L, b), L = n.mul(L, x), z = n.add(z, L), b = n.mul(O, B), b = n.add(b, b), L = n.mul(b, x), W = n.sub(W, L), j = n.mul(b, D), j = n.add(j, j), j = n.add(j, j), new g(W, z, j);
|
|
18648
18648
|
}
|
|
18649
18649
|
// Renes-Costello-Batina exception-free addition formula.
|
|
18650
18650
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -18652,13 +18652,13 @@ function fZ(t) {
|
|
|
18652
18652
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
|
18653
18653
|
add(E) {
|
|
18654
18654
|
h(E);
|
|
18655
|
-
const { px: _, py: N, pz:
|
|
18655
|
+
const { px: _, py: N, pz: U } = this, { px: O, py: B, pz: W } = E;
|
|
18656
18656
|
let z = n.ZERO, j = n.ZERO, L = n.ZERO;
|
|
18657
|
-
const
|
|
18658
|
-
let x = n.mul(_, O), T = n.mul(N, B), k = n.mul(
|
|
18659
|
-
R = n.mul(R, $), $ = n.add(x, T), R = n.sub(R, $), $ = n.add(_,
|
|
18657
|
+
const D = e.a, b = n.mul(e.b, Bx);
|
|
18658
|
+
let x = n.mul(_, O), T = n.mul(N, B), k = n.mul(U, W), R = n.add(_, N), $ = n.add(O, B);
|
|
18659
|
+
R = n.mul(R, $), $ = n.add(x, T), R = n.sub(R, $), $ = n.add(_, U);
|
|
18660
18660
|
let q = n.add(O, W);
|
|
18661
|
-
return $ = n.mul($, q), q = n.add(x, k), $ = n.sub($, q), q = n.add(N,
|
|
18661
|
+
return $ = n.mul($, q), q = n.add(x, k), $ = n.sub($, q), q = n.add(N, U), z = n.add(B, W), q = n.mul(q, z), z = n.add(T, k), q = n.sub(q, z), L = n.mul(D, $), z = n.mul(b, k), L = n.add(z, L), z = n.sub(T, L), L = n.add(T, L), j = n.mul(z, L), T = n.add(x, x), T = n.add(T, x), k = n.mul(D, k), $ = n.mul(b, $), T = n.add(T, k), k = n.sub(x, k), k = n.mul(D, k), $ = n.add($, k), x = n.mul(T, $), j = n.add(j, x), x = n.mul(q, $), z = n.mul(R, z), z = n.sub(z, x), x = n.mul(R, T), L = n.mul(q, L), L = n.add(L, x), new g(z, j, L);
|
|
18662
18662
|
}
|
|
18663
18663
|
subtract(E) {
|
|
18664
18664
|
return this.add(E.negate());
|
|
@@ -18677,16 +18677,16 @@ function fZ(t) {
|
|
|
18677
18677
|
multiplyUnsafe(E) {
|
|
18678
18678
|
const { endo: _, n: N } = e;
|
|
18679
18679
|
Ef("scalar", E, Ja, N);
|
|
18680
|
-
const
|
|
18680
|
+
const U = g.ZERO;
|
|
18681
18681
|
if (E === Ja)
|
|
18682
|
-
return
|
|
18682
|
+
return U;
|
|
18683
18683
|
if (this.is0() || E === Mn)
|
|
18684
18684
|
return this;
|
|
18685
18685
|
if (!_ || v.hasPrecomputes(this))
|
|
18686
18686
|
return v.wNAFCachedUnsafe(this, E, g.normalizeZ);
|
|
18687
|
-
let { k1neg: O, k1: B, k2neg: W, k2: z } = _.splitScalar(E), j =
|
|
18687
|
+
let { k1neg: O, k1: B, k2neg: W, k2: z } = _.splitScalar(E), j = U, L = U, D = this;
|
|
18688
18688
|
for (; B > Ja || z > Ja; )
|
|
18689
|
-
B & Mn && (j = j.add(
|
|
18689
|
+
B & Mn && (j = j.add(D)), z & Mn && (L = L.add(D)), D = D.double(), B >>= Mn, z >>= Mn;
|
|
18690
18690
|
return O && (j = j.negate()), W && (L = L.negate()), L = new g(n.mul(L.px, _.beta), L.py, L.pz), j.add(L);
|
|
18691
18691
|
}
|
|
18692
18692
|
/**
|
|
@@ -18701,16 +18701,16 @@ function fZ(t) {
|
|
|
18701
18701
|
multiply(E) {
|
|
18702
18702
|
const { endo: _, n: N } = e;
|
|
18703
18703
|
Ef("scalar", E, Mn, N);
|
|
18704
|
-
let
|
|
18704
|
+
let U, O;
|
|
18705
18705
|
if (_) {
|
|
18706
18706
|
const { k1neg: B, k1: W, k2neg: z, k2: j } = _.splitScalar(E);
|
|
18707
|
-
let { p: L, f:
|
|
18708
|
-
L = v.constTimeNegate(B, L), b = v.constTimeNegate(z, b), b = new g(n.mul(b.px, _.beta), b.py, b.pz),
|
|
18707
|
+
let { p: L, f: D } = this.wNAF(W), { p: b, f: x } = this.wNAF(j);
|
|
18708
|
+
L = v.constTimeNegate(B, L), b = v.constTimeNegate(z, b), b = new g(n.mul(b.px, _.beta), b.py, b.pz), U = L.add(b), O = D.add(x);
|
|
18709
18709
|
} else {
|
|
18710
18710
|
const { p: B, f: W } = this.wNAF(E);
|
|
18711
|
-
|
|
18711
|
+
U = B, O = W;
|
|
18712
18712
|
}
|
|
18713
|
-
return g.normalizeZ([
|
|
18713
|
+
return g.normalizeZ([U, O])[0];
|
|
18714
18714
|
}
|
|
18715
18715
|
/**
|
|
18716
18716
|
* Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.
|
|
@@ -18719,7 +18719,7 @@ function fZ(t) {
|
|
|
18719
18719
|
* @returns non-zero affine point
|
|
18720
18720
|
*/
|
|
18721
18721
|
multiplyAndAddUnsafe(E, _, N) {
|
|
18722
|
-
const
|
|
18722
|
+
const U = g.BASE, O = (W, z) => z === Ja || z === Mn || !W.equals(U) ? W.multiplyUnsafe(z) : W.multiply(z), B = O(this, _).add(O(E, N));
|
|
18723
18723
|
return B.is0() ? void 0 : B;
|
|
18724
18724
|
}
|
|
18725
18725
|
// Converts Projective point to affine (x, y) coordinates.
|
|
@@ -18841,7 +18841,7 @@ function gZ(t) {
|
|
|
18841
18841
|
return new y(this.r, this.s, x);
|
|
18842
18842
|
}
|
|
18843
18843
|
recoverPublicKey(x) {
|
|
18844
|
-
const { r: T, s: k, recovery: R } = this, $ =
|
|
18844
|
+
const { r: T, s: k, recovery: R } = this, $ = U(yi("msgHash", x));
|
|
18845
18845
|
if (R == null || ![0, 1, 2, 3].includes(R))
|
|
18846
18846
|
throw new Error("recovery id invalid");
|
|
18847
18847
|
const q = R === 2 || R === 3 ? T + e.n : T;
|
|
@@ -18928,7 +18928,7 @@ function gZ(t) {
|
|
|
18928
18928
|
throw new Error("input is too large");
|
|
18929
18929
|
const x = Ed(b), T = b.length * 8 - i;
|
|
18930
18930
|
return T > 0 ? x >> BigInt(T) : x;
|
|
18931
|
-
},
|
|
18931
|
+
}, U = e.bits2int_modN || function(b) {
|
|
18932
18932
|
return c(N(b));
|
|
18933
18933
|
}, O = X2(i);
|
|
18934
18934
|
function B(b) {
|
|
@@ -18940,7 +18940,7 @@ function gZ(t) {
|
|
|
18940
18940
|
const { hash: k, randomBytes: R } = e;
|
|
18941
18941
|
let { lowS: $, prehash: q, extraEntropy: G } = T;
|
|
18942
18942
|
$ == null && ($ = !0), b = yi("msgHash", b), $8(T), q && (b = yi("prehashed msgHash", k(b)));
|
|
18943
|
-
const re =
|
|
18943
|
+
const re = U(b), ee = d(x), ne = [B(ee), B(re)];
|
|
18944
18944
|
if (G != null && G !== !1) {
|
|
18945
18945
|
const he = G === !0 ? R(n.BYTES) : G;
|
|
18946
18946
|
ne.push(yi("extraEntropy", he));
|
|
@@ -18967,7 +18967,7 @@ function gZ(t) {
|
|
|
18967
18967
|
return fG($.hash.outputLen, $.nByteLength, $.hmac)(k, R);
|
|
18968
18968
|
}
|
|
18969
18969
|
u.BASE._setWindowSize(8);
|
|
18970
|
-
function
|
|
18970
|
+
function D(b, x, T, k = j) {
|
|
18971
18971
|
var Zr;
|
|
18972
18972
|
const R = b;
|
|
18973
18973
|
x = yi("msgHash", x), T = yi("publicKey", T);
|
|
@@ -18997,7 +18997,7 @@ function gZ(t) {
|
|
|
18997
18997
|
if (!ne || $ && ne.hasHighS())
|
|
18998
18998
|
return !1;
|
|
18999
18999
|
q && (x = e.hash(x));
|
|
19000
|
-
const { r: de, s: Ce } = ne, he =
|
|
19000
|
+
const { r: de, s: Ce } = ne, he = U(x), Ee = l(Ce), qe = c(he * Ee), Ye = c(de * Ee), Je = (Zr = u.BASE.multiplyAndAddUnsafe(ve, qe, Ye)) == null ? void 0 : Zr.toAffine();
|
|
19001
19001
|
return Je ? c(Je.x) === de : !1;
|
|
19002
19002
|
}
|
|
19003
19003
|
return {
|
|
@@ -19005,7 +19005,7 @@ function gZ(t) {
|
|
|
19005
19005
|
getPublicKey: w,
|
|
19006
19006
|
getSharedSecret: _,
|
|
19007
19007
|
sign: L,
|
|
19008
|
-
verify:
|
|
19008
|
+
verify: D,
|
|
19009
19009
|
ProjectivePoint: u,
|
|
19010
19010
|
Signature: y,
|
|
19011
19011
|
utils: v
|
|
@@ -20323,8 +20323,8 @@ function vY(t, e) {
|
|
|
20323
20323
|
for (var g = 0, m = 0, y = 0, v = p.length; y !== v && p[y] === 0; )
|
|
20324
20324
|
y++, g++;
|
|
20325
20325
|
for (var w = (v - y) * u + 1 >>> 0, E = new Uint8Array(w); y !== v; ) {
|
|
20326
|
-
for (var _ = p[y], N = 0,
|
|
20327
|
-
_ += 256 * E[
|
|
20326
|
+
for (var _ = p[y], N = 0, U = w - 1; (_ !== 0 || N < m) && U !== -1; U--, N++)
|
|
20327
|
+
_ += 256 * E[U] >>> 0, E[U] = _ % a >>> 0, _ = _ / a >>> 0;
|
|
20328
20328
|
if (_ !== 0)
|
|
20329
20329
|
throw new Error("Non-zero carry");
|
|
20330
20330
|
m = N, y++;
|
|
@@ -20355,10 +20355,10 @@ function vY(t, e) {
|
|
|
20355
20355
|
y = _, g++;
|
|
20356
20356
|
}
|
|
20357
20357
|
if (p[g] !== " ") {
|
|
20358
|
-
for (var
|
|
20359
|
-
|
|
20360
|
-
for (var O = new Uint8Array(m + (v -
|
|
20361
|
-
O[B++] = w[
|
|
20358
|
+
for (var U = v - y; U !== v && w[U] === 0; )
|
|
20359
|
+
U++;
|
|
20360
|
+
for (var O = new Uint8Array(m + (v - U)), B = m; U !== v; )
|
|
20361
|
+
O[B++] = w[U++];
|
|
20362
20362
|
return O;
|
|
20363
20363
|
}
|
|
20364
20364
|
}
|
|
@@ -21974,14 +21974,14 @@ let IC = class extends rO {
|
|
|
21974
21974
|
process(e, n) {
|
|
21975
21975
|
for (let w = 0; w < 16; w++, n += 4) Lc[w] = e.getUint32(n), Mc[w] = e.getUint32(n += 4);
|
|
21976
21976
|
for (let w = 16; w < 80; w++) {
|
|
21977
|
-
const E = Lc[w - 15] | 0, _ = Mc[w - 15] | 0, N = Gc(E, _, 1) ^ Gc(E, _, 8) ^ Z8(E, _, 7),
|
|
21977
|
+
const E = Lc[w - 15] | 0, _ = Mc[w - 15] | 0, N = Gc(E, _, 1) ^ Gc(E, _, 8) ^ Z8(E, _, 7), U = Zc(E, _, 1) ^ Zc(E, _, 8) ^ Y8(E, _, 7), O = Lc[w - 2] | 0, B = Mc[w - 2] | 0, W = Gc(O, B, 19) ^ mg(O, B, 61) ^ Z8(O, B, 6), z = Zc(O, B, 19) ^ wg(O, B, 61) ^ Y8(O, B, 6), j = lQ(U, z, Mc[w - 7], Mc[w - 16]), L = uQ(j, N, W, Lc[w - 7], Lc[w - 16]);
|
|
21978
21978
|
Lc[w] = L | 0, Mc[w] = j | 0;
|
|
21979
21979
|
}
|
|
21980
21980
|
let { Ah: r, Al: s, Bh: i, Bl: o, Ch: a, Cl: c, Dh: l, Dl: u, Eh: d, El: h, Fh: f, Fl: p, Gh: g, Gl: m, Hh: y, Hl: v } = this;
|
|
21981
21981
|
for (let w = 0; w < 80; w++) {
|
|
21982
|
-
const E = Gc(d, h, 14) ^ Gc(d, h, 18) ^ mg(d, h, 41), _ = Zc(d, h, 14) ^ Zc(d, h, 18) ^ wg(d, h, 41), N = d & f ^ ~d & g,
|
|
21982
|
+
const E = Gc(d, h, 14) ^ Gc(d, h, 18) ^ mg(d, h, 41), _ = Zc(d, h, 14) ^ Zc(d, h, 18) ^ wg(d, h, 41), N = d & f ^ ~d & g, U = h & p ^ ~h & m, O = dQ(v, _, U, kQ[w], Mc[w]), B = hQ(O, y, E, N, PQ[w], Lc[w]), W = O | 0, z = Gc(r, s, 28) ^ mg(r, s, 34) ^ mg(r, s, 39), j = Zc(r, s, 28) ^ wg(r, s, 34) ^ wg(r, s, 39), L = r & i ^ r & a ^ i & a, D = s & o ^ s & c ^ o & c;
|
|
21983
21983
|
y = g | 0, v = m | 0, g = f | 0, m = p | 0, f = d | 0, p = h | 0, { h: d, l: h } = zi(l | 0, u | 0, B | 0, W | 0), l = a | 0, u = c | 0, a = i | 0, c = o | 0, i = r | 0, o = s | 0;
|
|
21984
|
-
const b = AC(W, j,
|
|
21984
|
+
const b = AC(W, j, D);
|
|
21985
21985
|
r = SC(b, B, z, L), s = b | 0;
|
|
21986
21986
|
}
|
|
21987
21987
|
({ h: r, l: s } = zi(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: i, l: o } = zi(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: a, l: c } = zi(this.Ch | 0, this.Cl | 0, a | 0, c | 0), { h: l, l: u } = zi(this.Dh | 0, this.Dl | 0, l | 0, u | 0), { h: d, l: h } = zi(this.Eh | 0, this.El | 0, d | 0, h | 0), { h: f, l: p } = zi(this.Fh | 0, this.Fl | 0, f | 0, p | 0), { h: g, l: m } = zi(this.Gh | 0, this.Gl | 0, g | 0, m | 0), { h: y, l: v } = zi(this.Hh | 0, this.Hl | 0, y | 0, v | 0), this.set(r, s, i, o, a, c, l, u, d, h, f, p, g, m, y, v);
|
|
@@ -22503,27 +22503,27 @@ class UX {
|
|
|
22503
22503
|
for (let u = 0; u < 8; u++) this.pad[u] = Yn(e, 16 + 2 * u);
|
|
22504
22504
|
}
|
|
22505
22505
|
process(e, n, r = !1) {
|
|
22506
|
-
const s = r ? 0 : 2048, { h: i, r: o } = this, a = o[0], c = o[1], l = o[2], u = o[3], d = o[4], h = o[5], f = o[6], p = o[7], g = o[8], m = o[9], y = Yn(e, n + 0), v = Yn(e, n + 2), w = Yn(e, n + 4), E = Yn(e, n + 6), _ = Yn(e, n + 8), N = Yn(e, n + 10),
|
|
22507
|
-
let B = i[0] + (y & 8191), W = i[1] + ((y >>> 13 | v << 3) & 8191), z = i[2] + ((v >>> 10 | w << 6) & 8191), j = i[3] + ((w >>> 7 | E << 9) & 8191), L = i[4] + ((E >>> 4 | _ << 12) & 8191),
|
|
22508
|
-
R = $ >>> 13, $ &= 8191, $ +=
|
|
22506
|
+
const s = r ? 0 : 2048, { h: i, r: o } = this, a = o[0], c = o[1], l = o[2], u = o[3], d = o[4], h = o[5], f = o[6], p = o[7], g = o[8], m = o[9], y = Yn(e, n + 0), v = Yn(e, n + 2), w = Yn(e, n + 4), E = Yn(e, n + 6), _ = Yn(e, n + 8), N = Yn(e, n + 10), U = Yn(e, n + 12), O = Yn(e, n + 14);
|
|
22507
|
+
let B = i[0] + (y & 8191), W = i[1] + ((y >>> 13 | v << 3) & 8191), z = i[2] + ((v >>> 10 | w << 6) & 8191), j = i[3] + ((w >>> 7 | E << 9) & 8191), L = i[4] + ((E >>> 4 | _ << 12) & 8191), D = i[5] + (_ >>> 1 & 8191), b = i[6] + ((_ >>> 14 | N << 2) & 8191), x = i[7] + ((N >>> 11 | U << 5) & 8191), T = i[8] + ((U >>> 8 | O << 8) & 8191), k = i[9] + (O >>> 5 | s), R = 0, $ = R + B * a + W * (5 * m) + z * (5 * g) + j * (5 * p) + L * (5 * f);
|
|
22508
|
+
R = $ >>> 13, $ &= 8191, $ += D * (5 * h) + b * (5 * d) + x * (5 * u) + T * (5 * l) + k * (5 * c), R += $ >>> 13, $ &= 8191;
|
|
22509
22509
|
let q = R + B * c + W * a + z * (5 * m) + j * (5 * g) + L * (5 * p);
|
|
22510
|
-
R = q >>> 13, q &= 8191, q +=
|
|
22510
|
+
R = q >>> 13, q &= 8191, q += D * (5 * f) + b * (5 * h) + x * (5 * d) + T * (5 * u) + k * (5 * l), R += q >>> 13, q &= 8191;
|
|
22511
22511
|
let G = R + B * l + W * c + z * a + j * (5 * m) + L * (5 * g);
|
|
22512
|
-
R = G >>> 13, G &= 8191, G +=
|
|
22512
|
+
R = G >>> 13, G &= 8191, G += D * (5 * p) + b * (5 * f) + x * (5 * h) + T * (5 * d) + k * (5 * u), R += G >>> 13, G &= 8191;
|
|
22513
22513
|
let re = R + B * u + W * l + z * c + j * a + L * (5 * m);
|
|
22514
|
-
R = re >>> 13, re &= 8191, re +=
|
|
22514
|
+
R = re >>> 13, re &= 8191, re += D * (5 * g) + b * (5 * p) + x * (5 * f) + T * (5 * h) + k * (5 * d), R += re >>> 13, re &= 8191;
|
|
22515
22515
|
let ee = R + B * d + W * u + z * l + j * c + L * a;
|
|
22516
|
-
R = ee >>> 13, ee &= 8191, ee +=
|
|
22516
|
+
R = ee >>> 13, ee &= 8191, ee += D * (5 * m) + b * (5 * g) + x * (5 * p) + T * (5 * f) + k * (5 * h), R += ee >>> 13, ee &= 8191;
|
|
22517
22517
|
let ne = R + B * h + W * d + z * u + j * l + L * c;
|
|
22518
|
-
R = ne >>> 13, ne &= 8191, ne +=
|
|
22518
|
+
R = ne >>> 13, ne &= 8191, ne += D * a + b * (5 * m) + x * (5 * g) + T * (5 * p) + k * (5 * f), R += ne >>> 13, ne &= 8191;
|
|
22519
22519
|
let ve = R + B * f + W * h + z * d + j * u + L * l;
|
|
22520
|
-
R = ve >>> 13, ve &= 8191, ve +=
|
|
22520
|
+
R = ve >>> 13, ve &= 8191, ve += D * c + b * a + x * (5 * m) + T * (5 * g) + k * (5 * p), R += ve >>> 13, ve &= 8191;
|
|
22521
22521
|
let de = R + B * p + W * f + z * h + j * d + L * u;
|
|
22522
|
-
R = de >>> 13, de &= 8191, de +=
|
|
22522
|
+
R = de >>> 13, de &= 8191, de += D * l + b * c + x * a + T * (5 * m) + k * (5 * g), R += de >>> 13, de &= 8191;
|
|
22523
22523
|
let Ce = R + B * g + W * p + z * f + j * h + L * d;
|
|
22524
|
-
R = Ce >>> 13, Ce &= 8191, Ce +=
|
|
22524
|
+
R = Ce >>> 13, Ce &= 8191, Ce += D * u + b * l + x * c + T * a + k * (5 * m), R += Ce >>> 13, Ce &= 8191;
|
|
22525
22525
|
let he = R + B * m + W * g + z * p + j * f + L * h;
|
|
22526
|
-
R = he >>> 13, he &= 8191, he +=
|
|
22526
|
+
R = he >>> 13, he &= 8191, he += D * d + b * u + x * l + T * c + k * a, R += he >>> 13, he &= 8191, R = (R << 2) + R | 0, R = R + $ | 0, $ = R & 8191, R = R >>> 13, q += R, i[0] = $, i[1] = q, i[2] = G, i[3] = re, i[4] = ee, i[5] = ne, i[6] = ve, i[7] = de, i[8] = Ce, i[9] = he;
|
|
22527
22527
|
}
|
|
22528
22528
|
finalize() {
|
|
22529
22529
|
const { h: e, pad: n } = this, r = new Uint16Array(10);
|
|
@@ -22585,10 +22585,10 @@ function BX(t) {
|
|
|
22585
22585
|
}
|
|
22586
22586
|
const LX = BX((t) => new UX(t));
|
|
22587
22587
|
function MX(t, e, n, r, s, i = 20) {
|
|
22588
|
-
let o = t[0], a = t[1], c = t[2], l = t[3], u = e[0], d = e[1], h = e[2], f = e[3], p = e[4], g = e[5], m = e[6], y = e[7], v = s, w = n[0], E = n[1], _ = n[2], N = o,
|
|
22589
|
-
for (let re = 0; re < i; re += 2) N = N + W | 0, k = Et(k ^ N, 16),
|
|
22588
|
+
let o = t[0], a = t[1], c = t[2], l = t[3], u = e[0], d = e[1], h = e[2], f = e[3], p = e[4], g = e[5], m = e[6], y = e[7], v = s, w = n[0], E = n[1], _ = n[2], N = o, U = a, O = c, B = l, W = u, z = d, j = h, L = f, D = p, b = g, x = m, T = y, k = v, R = w, $ = E, q = _;
|
|
22589
|
+
for (let re = 0; re < i; re += 2) N = N + W | 0, k = Et(k ^ N, 16), D = D + k | 0, W = Et(W ^ D, 12), N = N + W | 0, k = Et(k ^ N, 8), D = D + k | 0, W = Et(W ^ D, 7), U = U + z | 0, R = Et(R ^ U, 16), b = b + R | 0, z = Et(z ^ b, 12), U = U + z | 0, R = Et(R ^ U, 8), b = b + R | 0, z = Et(z ^ b, 7), O = O + j | 0, $ = Et($ ^ O, 16), x = x + $ | 0, j = Et(j ^ x, 12), O = O + j | 0, $ = Et($ ^ O, 8), x = x + $ | 0, j = Et(j ^ x, 7), B = B + L | 0, q = Et(q ^ B, 16), T = T + q | 0, L = Et(L ^ T, 12), B = B + L | 0, q = Et(q ^ B, 8), T = T + q | 0, L = Et(L ^ T, 7), N = N + z | 0, q = Et(q ^ N, 16), x = x + q | 0, z = Et(z ^ x, 12), N = N + z | 0, q = Et(q ^ N, 8), x = x + q | 0, z = Et(z ^ x, 7), U = U + j | 0, k = Et(k ^ U, 16), T = T + k | 0, j = Et(j ^ T, 12), U = U + j | 0, k = Et(k ^ U, 8), T = T + k | 0, j = Et(j ^ T, 7), O = O + L | 0, R = Et(R ^ O, 16), D = D + R | 0, L = Et(L ^ D, 12), O = O + L | 0, R = Et(R ^ O, 8), D = D + R | 0, L = Et(L ^ D, 7), B = B + W | 0, $ = Et($ ^ B, 16), b = b + $ | 0, W = Et(W ^ b, 12), B = B + W | 0, $ = Et($ ^ B, 8), b = b + $ | 0, W = Et(W ^ b, 7);
|
|
22590
22590
|
let G = 0;
|
|
22591
|
-
r[G++] = o + N | 0, r[G++] = a +
|
|
22591
|
+
r[G++] = o + N | 0, r[G++] = a + U | 0, r[G++] = c + O | 0, r[G++] = l + B | 0, r[G++] = u + W | 0, r[G++] = d + z | 0, r[G++] = h + j | 0, r[G++] = f + L | 0, r[G++] = p + D | 0, r[G++] = g + b | 0, r[G++] = m + x | 0, r[G++] = y + T | 0, r[G++] = v + k | 0, r[G++] = w + R | 0, r[G++] = E + $ | 0, r[G++] = _ + q | 0;
|
|
22592
22592
|
}
|
|
22593
22593
|
const FX = DX(MX, { counterRight: !1, counterLength: 4, allowShortKeys: !1 }), jX = new Uint8Array(16), d9 = (t, e) => {
|
|
22594
22594
|
t.update(e);
|
|
@@ -23078,28 +23078,28 @@ function dee(t) {
|
|
|
23078
23078
|
return My(s(Cr("scalar", j, u)));
|
|
23079
23079
|
}
|
|
23080
23080
|
function _(j, L) {
|
|
23081
|
-
const
|
|
23082
|
-
if (
|
|
23083
|
-
return v(
|
|
23081
|
+
const D = O(w(L), E(j));
|
|
23082
|
+
if (D === Q0) throw new Error("invalid private or public key received");
|
|
23083
|
+
return v(D);
|
|
23084
23084
|
}
|
|
23085
23085
|
function N(j) {
|
|
23086
23086
|
return _(j, y);
|
|
23087
23087
|
}
|
|
23088
|
-
function
|
|
23089
|
-
const b = m(j * (L -
|
|
23090
|
-
return L = m(L - b),
|
|
23088
|
+
function U(j, L, D) {
|
|
23089
|
+
const b = m(j * (L - D));
|
|
23090
|
+
return L = m(L - b), D = m(D + b), { x_2: L, x_3: D };
|
|
23091
23091
|
}
|
|
23092
23092
|
function O(j, L) {
|
|
23093
23093
|
Kv("u", j, Q0, n), Kv("scalar", L, f, g);
|
|
23094
|
-
const
|
|
23094
|
+
const D = L, b = j;
|
|
23095
23095
|
let x = Hh, T = Q0, k = j, R = Hh, $ = Q0;
|
|
23096
23096
|
for (let G = BigInt(l - 1); G >= Q0; G--) {
|
|
23097
|
-
const re =
|
|
23098
|
-
$ ^= re, { x_2: x, x_3: k } =
|
|
23097
|
+
const re = D >> G & Hh;
|
|
23098
|
+
$ ^= re, { x_2: x, x_3: k } = U($, x, k), { x_2: T, x_3: R } = U($, T, R), $ = re;
|
|
23099
23099
|
const ee = x + T, ne = m(ee * ee), ve = x - T, de = m(ve * ve), Ce = ne - de, he = k + R, Ee = k - R, qe = m(Ee * ee), Ye = m(he * ve), Je = qe + Ye, Ot = qe - Ye;
|
|
23100
23100
|
k = m(Je * Je), R = m(b * m(Ot * Ot)), x = m(ne * de), T = m(Ce * (ne + m(h * Ce)));
|
|
23101
23101
|
}
|
|
23102
|
-
({ x_2: x, x_3: k } =
|
|
23102
|
+
({ x_2: x, x_3: k } = U($, x, k)), { x_2: T, x_3: R } = U($, T, R);
|
|
23103
23103
|
const q = i(T);
|
|
23104
23104
|
return m(x * q);
|
|
23105
23105
|
}
|
|
@@ -23226,9 +23226,9 @@ function Eee(t, e = {}) {
|
|
|
23226
23226
|
function u() {
|
|
23227
23227
|
if (!r.isOdd) throw new Error("compression is not supported: Field does not have .isOdd()");
|
|
23228
23228
|
}
|
|
23229
|
-
function d(j, L,
|
|
23229
|
+
function d(j, L, D) {
|
|
23230
23230
|
const { x: b, y: x } = L.toAffine(), T = r.toBytes(b);
|
|
23231
|
-
if (Ly(
|
|
23231
|
+
if (Ly(D, "isCompressed"), D) {
|
|
23232
23232
|
u();
|
|
23233
23233
|
const k = !r.isOdd(x);
|
|
23234
23234
|
return el(OO(k), T);
|
|
@@ -23236,7 +23236,7 @@ function Eee(t, e = {}) {
|
|
|
23236
23236
|
}
|
|
23237
23237
|
function h(j) {
|
|
23238
23238
|
Wu(j, void 0, "Point");
|
|
23239
|
-
const { publicKey: L, publicKeyUncompressed:
|
|
23239
|
+
const { publicKey: L, publicKeyUncompressed: D } = l, b = j.length, x = j[0], T = j.subarray(1);
|
|
23240
23240
|
if (b === L && (x === 2 || x === 3)) {
|
|
23241
23241
|
const k = r.fromBytes(T);
|
|
23242
23242
|
if (!r.isValid(k)) throw new Error("bad point: is not on curve, wrong x");
|
|
@@ -23251,26 +23251,26 @@ function Eee(t, e = {}) {
|
|
|
23251
23251
|
u();
|
|
23252
23252
|
const q = r.isOdd($);
|
|
23253
23253
|
return (x & 1) === 1 !== q && ($ = r.neg($)), { x: k, y: $ };
|
|
23254
|
-
} else if (b ===
|
|
23254
|
+
} else if (b === D && x === 4) {
|
|
23255
23255
|
const k = r.BYTES, R = r.fromBytes(T.subarray(0, k)), $ = r.fromBytes(T.subarray(k, k * 2));
|
|
23256
23256
|
if (!m(R, $)) throw new Error("bad point: is not on curve");
|
|
23257
23257
|
return { x: R, y: $ };
|
|
23258
|
-
} else throw new Error(`bad point: got length ${b}, expected compressed=${L} or uncompressed=${
|
|
23258
|
+
} else throw new Error(`bad point: got length ${b}, expected compressed=${L} or uncompressed=${D}`);
|
|
23259
23259
|
}
|
|
23260
23260
|
const f = e.toBytes || d, p = e.fromBytes || h;
|
|
23261
23261
|
function g(j) {
|
|
23262
|
-
const L = r.sqr(j),
|
|
23263
|
-
return r.add(r.add(
|
|
23262
|
+
const L = r.sqr(j), D = r.mul(L, j);
|
|
23263
|
+
return r.add(r.add(D, r.mul(j, i.a)), i.b);
|
|
23264
23264
|
}
|
|
23265
23265
|
function m(j, L) {
|
|
23266
|
-
const
|
|
23267
|
-
return r.eql(
|
|
23266
|
+
const D = r.sqr(L), b = g(j);
|
|
23267
|
+
return r.eql(D, b);
|
|
23268
23268
|
}
|
|
23269
23269
|
if (!m(i.Gx, i.Gy)) throw new Error("bad curve params: generator point");
|
|
23270
23270
|
const y = r.mul(r.pow(i.a, ab), vee), v = r.mul(r.sqr(i.b), BigInt(27));
|
|
23271
23271
|
if (r.is0(r.add(y, v))) throw new Error("bad curve params: a or b");
|
|
23272
|
-
function w(j, L,
|
|
23273
|
-
if (!r.isValid(L) ||
|
|
23272
|
+
function w(j, L, D = !1) {
|
|
23273
|
+
if (!r.isValid(L) || D && r.is0(L)) throw new Error(`bad point coordinate ${j}`);
|
|
23274
23274
|
return L;
|
|
23275
23275
|
}
|
|
23276
23276
|
function E(j) {
|
|
@@ -23281,44 +23281,44 @@ function Eee(t, e = {}) {
|
|
|
23281
23281
|
return yee(j, c.basises, s.ORDER);
|
|
23282
23282
|
}
|
|
23283
23283
|
const N = p9((j, L) => {
|
|
23284
|
-
const { X:
|
|
23285
|
-
if (r.eql(x, r.ONE)) return { x:
|
|
23284
|
+
const { X: D, Y: b, Z: x } = j;
|
|
23285
|
+
if (r.eql(x, r.ONE)) return { x: D, y: b };
|
|
23286
23286
|
const T = j.is0();
|
|
23287
23287
|
L == null && (L = T ? r.ONE : r.inv(x));
|
|
23288
|
-
const k = r.mul(
|
|
23288
|
+
const k = r.mul(D, L), R = r.mul(b, L), $ = r.mul(x, L);
|
|
23289
23289
|
if (T) return { x: r.ZERO, y: r.ZERO };
|
|
23290
23290
|
if (!r.eql($, r.ONE)) throw new Error("invZ was invalid");
|
|
23291
23291
|
return { x: k, y: R };
|
|
23292
|
-
}),
|
|
23292
|
+
}), U = p9((j) => {
|
|
23293
23293
|
if (j.is0()) {
|
|
23294
23294
|
if (e.allowInfinityPoint && !r.is0(j.Y)) return;
|
|
23295
23295
|
throw new Error("bad point: ZERO");
|
|
23296
23296
|
}
|
|
23297
|
-
const { x: L, y:
|
|
23298
|
-
if (!r.isValid(L) || !r.isValid(
|
|
23299
|
-
if (!m(L,
|
|
23297
|
+
const { x: L, y: D } = j.toAffine();
|
|
23298
|
+
if (!r.isValid(L) || !r.isValid(D)) throw new Error("bad point: x or y not field elements");
|
|
23299
|
+
if (!m(L, D)) throw new Error("bad point: equation left != right");
|
|
23300
23300
|
if (!j.isTorsionFree()) throw new Error("bad point: not in prime-order subgroup");
|
|
23301
23301
|
return !0;
|
|
23302
23302
|
});
|
|
23303
|
-
function O(j, L,
|
|
23304
|
-
return
|
|
23303
|
+
function O(j, L, D, b, x) {
|
|
23304
|
+
return D = new B(r.mul(D.X, j), D.Y, D.Z), L = Fy(b, L), D = Fy(x, D), L.add(D);
|
|
23305
23305
|
}
|
|
23306
23306
|
class B {
|
|
23307
|
-
constructor(L,
|
|
23308
|
-
this.X = w("x", L), this.Y = w("y",
|
|
23307
|
+
constructor(L, D, b) {
|
|
23308
|
+
this.X = w("x", L), this.Y = w("y", D, !0), this.Z = w("z", b), Object.freeze(this);
|
|
23309
23309
|
}
|
|
23310
23310
|
static CURVE() {
|
|
23311
23311
|
return i;
|
|
23312
23312
|
}
|
|
23313
23313
|
static fromAffine(L) {
|
|
23314
|
-
const { x:
|
|
23315
|
-
if (!L || !r.isValid(
|
|
23314
|
+
const { x: D, y: b } = L || {};
|
|
23315
|
+
if (!L || !r.isValid(D) || !r.isValid(b)) throw new Error("invalid affine point");
|
|
23316
23316
|
if (L instanceof B) throw new Error("projective point not allowed");
|
|
23317
|
-
return r.is0(
|
|
23317
|
+
return r.is0(D) && r.is0(b) ? B.ZERO : new B(D, b, r.ONE);
|
|
23318
23318
|
}
|
|
23319
23319
|
static fromBytes(L) {
|
|
23320
|
-
const
|
|
23321
|
-
return
|
|
23320
|
+
const D = B.fromAffine(p(Wu(L, void 0, "point")));
|
|
23321
|
+
return D.assertValidity(), D;
|
|
23322
23322
|
}
|
|
23323
23323
|
static fromHex(L) {
|
|
23324
23324
|
return B.fromBytes(Cr("pointHex", L));
|
|
@@ -23329,11 +23329,11 @@ function Eee(t, e = {}) {
|
|
|
23329
23329
|
get y() {
|
|
23330
23330
|
return this.toAffine().y;
|
|
23331
23331
|
}
|
|
23332
|
-
precompute(L = 8,
|
|
23333
|
-
return z.createCache(this, L),
|
|
23332
|
+
precompute(L = 8, D = !0) {
|
|
23333
|
+
return z.createCache(this, L), D || this.multiply(ab), this;
|
|
23334
23334
|
}
|
|
23335
23335
|
assertValidity() {
|
|
23336
|
-
|
|
23336
|
+
U(this);
|
|
23337
23337
|
}
|
|
23338
23338
|
hasEvenY() {
|
|
23339
23339
|
const { y: L } = this.toAffine();
|
|
@@ -23342,24 +23342,24 @@ function Eee(t, e = {}) {
|
|
|
23342
23342
|
}
|
|
23343
23343
|
equals(L) {
|
|
23344
23344
|
E(L);
|
|
23345
|
-
const { X:
|
|
23345
|
+
const { X: D, Y: b, Z: x } = this, { X: T, Y: k, Z: R } = L, $ = r.eql(r.mul(D, R), r.mul(T, x)), q = r.eql(r.mul(b, R), r.mul(k, x));
|
|
23346
23346
|
return $ && q;
|
|
23347
23347
|
}
|
|
23348
23348
|
negate() {
|
|
23349
23349
|
return new B(this.X, r.neg(this.Y), this.Z);
|
|
23350
23350
|
}
|
|
23351
23351
|
double() {
|
|
23352
|
-
const { a: L, b:
|
|
23352
|
+
const { a: L, b: D } = i, b = r.mul(D, ab), { X: x, Y: T, Z: k } = this;
|
|
23353
23353
|
let R = r.ZERO, $ = r.ZERO, q = r.ZERO, G = r.mul(x, x), re = r.mul(T, T), ee = r.mul(k, k), ne = r.mul(x, T);
|
|
23354
23354
|
return ne = r.add(ne, ne), q = r.mul(x, k), q = r.add(q, q), R = r.mul(L, q), $ = r.mul(b, ee), $ = r.add(R, $), R = r.sub(re, $), $ = r.add(re, $), $ = r.mul(R, $), R = r.mul(ne, R), q = r.mul(b, q), ee = r.mul(L, ee), ne = r.sub(G, ee), ne = r.mul(L, ne), ne = r.add(ne, q), q = r.add(G, G), G = r.add(q, G), G = r.add(G, ee), G = r.mul(G, ne), $ = r.add($, G), ee = r.mul(T, k), ee = r.add(ee, ee), G = r.mul(ee, ne), R = r.sub(R, G), q = r.mul(ee, re), q = r.add(q, q), q = r.add(q, q), new B(R, $, q);
|
|
23355
23355
|
}
|
|
23356
23356
|
add(L) {
|
|
23357
23357
|
E(L);
|
|
23358
|
-
const { X:
|
|
23358
|
+
const { X: D, Y: b, Z: x } = this, { X: T, Y: k, Z: R } = L;
|
|
23359
23359
|
let $ = r.ZERO, q = r.ZERO, G = r.ZERO;
|
|
23360
23360
|
const re = i.a, ee = r.mul(i.b, ab);
|
|
23361
|
-
let ne = r.mul(
|
|
23362
|
-
Ce = r.mul(Ce, he), he = r.add(ne, ve), Ce = r.sub(Ce, he), he = r.add(
|
|
23361
|
+
let ne = r.mul(D, T), ve = r.mul(b, k), de = r.mul(x, R), Ce = r.add(D, b), he = r.add(T, k);
|
|
23362
|
+
Ce = r.mul(Ce, he), he = r.add(ne, ve), Ce = r.sub(Ce, he), he = r.add(D, x);
|
|
23363
23363
|
let Ee = r.add(T, R);
|
|
23364
23364
|
return he = r.mul(he, Ee), Ee = r.add(ne, de), he = r.sub(he, Ee), Ee = r.add(b, x), $ = r.add(k, R), Ee = r.mul(Ee, $), $ = r.add(ve, de), Ee = r.sub(Ee, $), G = r.mul(re, he), $ = r.mul(ee, de), G = r.add($, G), $ = r.sub(ve, G), G = r.add(ve, G), q = r.mul($, G), ve = r.add(ne, ne), ve = r.add(ve, ne), de = r.mul(re, de), he = r.mul(ee, he), ve = r.add(ve, de), de = r.sub(ne, de), de = r.mul(re, de), he = r.add(he, de), ne = r.mul(ve, he), q = r.add(q, ne), ne = r.mul(Ee, he), $ = r.mul(Ce, $), $ = r.sub($, ne), ne = r.mul(Ce, ve), G = r.mul(Ee, G), G = r.add(G, ne), new B($, q, G);
|
|
23365
23365
|
}
|
|
@@ -23370,13 +23370,13 @@ function Eee(t, e = {}) {
|
|
|
23370
23370
|
return this.equals(B.ZERO);
|
|
23371
23371
|
}
|
|
23372
23372
|
multiply(L) {
|
|
23373
|
-
const { endo:
|
|
23373
|
+
const { endo: D } = e;
|
|
23374
23374
|
if (!s.isValidNot0(L)) throw new Error("invalid scalar: out of range");
|
|
23375
23375
|
let b, x;
|
|
23376
23376
|
const T = (k) => z.cached(this, k, (R) => qx(B, R));
|
|
23377
|
-
if (
|
|
23377
|
+
if (D) {
|
|
23378
23378
|
const { k1neg: k, k1: R, k2neg: $, k2: q } = _(L), { p: G, f: re } = T(R), { p: ee, f: ne } = T(q);
|
|
23379
|
-
x = re.add(ne), b = O(
|
|
23379
|
+
x = re.add(ne), b = O(D.beta, G, ee, k, $);
|
|
23380
23380
|
} else {
|
|
23381
23381
|
const { p: k, f: R } = T(L);
|
|
23382
23382
|
b = k, x = R;
|
|
@@ -23384,18 +23384,18 @@ function Eee(t, e = {}) {
|
|
|
23384
23384
|
return qx(B, [b, x])[0];
|
|
23385
23385
|
}
|
|
23386
23386
|
multiplyUnsafe(L) {
|
|
23387
|
-
const { endo:
|
|
23387
|
+
const { endo: D } = e, b = this;
|
|
23388
23388
|
if (!s.isValid(L)) throw new Error("invalid scalar: out of range");
|
|
23389
23389
|
if (L === Xa || b.is0()) return B.ZERO;
|
|
23390
23390
|
if (L === Af) return b;
|
|
23391
23391
|
if (z.hasCache(this)) return this.multiply(L);
|
|
23392
|
-
if (
|
|
23392
|
+
if (D) {
|
|
23393
23393
|
const { k1neg: x, k1: T, k2neg: k, k2: R } = _(L), { p1: $, p2: q } = aee(B, b, T, R);
|
|
23394
|
-
return O(
|
|
23394
|
+
return O(D.beta, $, q, x, k);
|
|
23395
23395
|
} else return z.unsafe(b, L);
|
|
23396
23396
|
}
|
|
23397
|
-
multiplyAndAddUnsafe(L,
|
|
23398
|
-
const x = this.multiplyUnsafe(
|
|
23397
|
+
multiplyAndAddUnsafe(L, D, b) {
|
|
23398
|
+
const x = this.multiplyUnsafe(D).add(L.multiplyUnsafe(b));
|
|
23399
23399
|
return x.is0() ? void 0 : x;
|
|
23400
23400
|
}
|
|
23401
23401
|
toAffine(L) {
|
|
@@ -23439,8 +23439,8 @@ function Eee(t, e = {}) {
|
|
|
23439
23439
|
static normalizeZ(L) {
|
|
23440
23440
|
return qx(B, L);
|
|
23441
23441
|
}
|
|
23442
|
-
static msm(L,
|
|
23443
|
-
return cee(B, s, L,
|
|
23442
|
+
static msm(L, D) {
|
|
23443
|
+
return cee(B, s, L, D);
|
|
23444
23444
|
}
|
|
23445
23445
|
static fromPrivateKey(L) {
|
|
23446
23446
|
return B.BASE.multiply(of(s, L));
|
|
@@ -23504,19 +23504,19 @@ function Cee(t, e = {}) {
|
|
|
23504
23504
|
}
|
|
23505
23505
|
function Aee(t, e, n = {}) {
|
|
23506
23506
|
r3(e), u3(n, {}, { hmac: "function", lowS: "boolean", randomBytes: "function", bits2int: "function", bits2int_modN: "function" });
|
|
23507
|
-
const r = n.randomBytes || xh, s = n.hmac || ((
|
|
23508
|
-
function m(
|
|
23507
|
+
const r = n.randomBytes || xh, s = n.hmac || ((D, ...b) => a3(e, D, el(...b))), { Fp: i, Fn: o } = t, { ORDER: a, BITS: c } = o, { keygen: l, getPublicKey: u, getSharedSecret: d, utils: h, lengths: f } = Cee(t, n), p = { prehash: !1, lowS: typeof n.lowS == "boolean" ? n.lowS : !1, format: void 0, extraEntropy: !1 }, g = "compact";
|
|
23508
|
+
function m(D) {
|
|
23509
23509
|
const b = a >> Af;
|
|
23510
|
-
return
|
|
23510
|
+
return D > b;
|
|
23511
23511
|
}
|
|
23512
|
-
function y(
|
|
23513
|
-
if (!o.isValidNot0(b)) throw new Error(`invalid signature ${
|
|
23512
|
+
function y(D, b) {
|
|
23513
|
+
if (!o.isValidNot0(b)) throw new Error(`invalid signature ${D}: out of range 1..Point.Fn.ORDER`);
|
|
23514
23514
|
return b;
|
|
23515
23515
|
}
|
|
23516
|
-
function v(
|
|
23516
|
+
function v(D, b) {
|
|
23517
23517
|
Zv(b);
|
|
23518
23518
|
const x = f.signature, T = b === "compact" ? x : b === "recovered" ? x + 1 : void 0;
|
|
23519
|
-
return Wu(
|
|
23519
|
+
return Wu(D, T, `${b} signature`);
|
|
23520
23520
|
}
|
|
23521
23521
|
class w {
|
|
23522
23522
|
constructor(b, x, T) {
|
|
@@ -23588,24 +23588,24 @@ function Aee(t, e, n = {}) {
|
|
|
23588
23588
|
return Cf(this.toBytes("compact"));
|
|
23589
23589
|
}
|
|
23590
23590
|
}
|
|
23591
|
-
const E = n.bits2int || function(
|
|
23592
|
-
if (
|
|
23593
|
-
const b = l3(
|
|
23591
|
+
const E = n.bits2int || function(D) {
|
|
23592
|
+
if (D.length > 8192) throw new Error("input is too large");
|
|
23593
|
+
const b = l3(D), x = D.length * 8 - c;
|
|
23594
23594
|
return x > 0 ? b >> BigInt(x) : b;
|
|
23595
|
-
}, _ = n.bits2int_modN || function(
|
|
23596
|
-
return o.create(E(
|
|
23595
|
+
}, _ = n.bits2int_modN || function(D) {
|
|
23596
|
+
return o.create(E(D));
|
|
23597
23597
|
}, N = z1(c);
|
|
23598
|
-
function D
|
|
23599
|
-
return Kv("num < 2^" + c,
|
|
23598
|
+
function U(D) {
|
|
23599
|
+
return Kv("num < 2^" + c, D, Xa, N), o.toBytes(D);
|
|
23600
23600
|
}
|
|
23601
|
-
function O(
|
|
23602
|
-
return Wu(
|
|
23601
|
+
function O(D, b) {
|
|
23602
|
+
return Wu(D, void 0, "message"), b ? Wu(e(D), void 0, "prehashed message") : D;
|
|
23603
23603
|
}
|
|
23604
|
-
function B(
|
|
23604
|
+
function B(D, b, x) {
|
|
23605
23605
|
if (["recovered", "canonical"].some((ve) => ve in x)) throw new Error("sign() legacy options not supported");
|
|
23606
23606
|
const { lowS: T, prehash: k, extraEntropy: R } = Yx(x, p);
|
|
23607
|
-
|
|
23608
|
-
const $ = _(
|
|
23607
|
+
D = O(D, k);
|
|
23608
|
+
const $ = _(D), q = of(o, b), G = [U(q), U($)];
|
|
23609
23609
|
if (R != null && R !== !1) {
|
|
23610
23610
|
const ve = R === !0 ? r(f.secretKey) : R;
|
|
23611
23611
|
G.push(Cr("extraEntropy", ve));
|
|
@@ -23623,34 +23623,34 @@ function Aee(t, e, n = {}) {
|
|
|
23623
23623
|
}
|
|
23624
23624
|
return { seed: re, k2sig: ne };
|
|
23625
23625
|
}
|
|
23626
|
-
function W(
|
|
23627
|
-
|
|
23628
|
-
const { seed: T, k2sig: k } = B(
|
|
23626
|
+
function W(D, b, x = {}) {
|
|
23627
|
+
D = Cr("message", D);
|
|
23628
|
+
const { seed: T, k2sig: k } = B(D, b, x);
|
|
23629
23629
|
return GX(e.outputLen, o.BYTES, s)(T, k);
|
|
23630
23630
|
}
|
|
23631
|
-
function z(
|
|
23631
|
+
function z(D) {
|
|
23632
23632
|
let b;
|
|
23633
|
-
const x = typeof
|
|
23633
|
+
const x = typeof D == "string" || n3(D), T = !x && D !== null && typeof D == "object" && typeof D.r == "bigint" && typeof D.s == "bigint";
|
|
23634
23634
|
if (!x && !T) throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
|
|
23635
|
-
if (T) b = new w(
|
|
23635
|
+
if (T) b = new w(D.r, D.s);
|
|
23636
23636
|
else if (x) {
|
|
23637
23637
|
try {
|
|
23638
|
-
b = w.fromBytes(Cr("sig",
|
|
23638
|
+
b = w.fromBytes(Cr("sig", D), "der");
|
|
23639
23639
|
} catch (k) {
|
|
23640
23640
|
if (!(k instanceof La.Err)) throw k;
|
|
23641
23641
|
}
|
|
23642
23642
|
if (!b) try {
|
|
23643
|
-
b = w.fromBytes(Cr("sig",
|
|
23643
|
+
b = w.fromBytes(Cr("sig", D), "compact");
|
|
23644
23644
|
} catch {
|
|
23645
23645
|
return !1;
|
|
23646
23646
|
}
|
|
23647
23647
|
}
|
|
23648
23648
|
return b || !1;
|
|
23649
23649
|
}
|
|
23650
|
-
function j(
|
|
23650
|
+
function j(D, b, x, T = {}) {
|
|
23651
23651
|
const { lowS: k, prehash: R, format: $ } = Yx(T, p);
|
|
23652
23652
|
if (x = Cr("publicKey", x), b = O(Cr("message", b), R), "strict" in T) throw new Error("options.strict was renamed to lowS");
|
|
23653
|
-
const q = $ === void 0 ? z(
|
|
23653
|
+
const q = $ === void 0 ? z(D) : w.fromBytes(Cr("sig", D), $);
|
|
23654
23654
|
if (q === !1) return !1;
|
|
23655
23655
|
try {
|
|
23656
23656
|
const G = t.fromBytes(x);
|
|
@@ -23661,9 +23661,9 @@ function Aee(t, e, n = {}) {
|
|
|
23661
23661
|
return !1;
|
|
23662
23662
|
}
|
|
23663
23663
|
}
|
|
23664
|
-
function L(
|
|
23664
|
+
function L(D, b, x = {}) {
|
|
23665
23665
|
const { prehash: T } = Yx(x, p);
|
|
23666
|
-
return b = O(b, T), w.fromBytes(
|
|
23666
|
+
return b = O(b, T), w.fromBytes(D, "recovered").recoverPublicKey(b).toBytes();
|
|
23667
23667
|
}
|
|
23668
23668
|
return Object.freeze({ keygen: l, getPublicKey: u, getSharedSecret: d, utils: h, lengths: f, Point: t, sign: W, verify: j, recoverPublicKey: L, Signature: w, hash: e });
|
|
23669
23669
|
}
|
|
@@ -24568,7 +24568,7 @@ function ere(t, e) {
|
|
|
24568
24568
|
if (p.length === 0) return "";
|
|
24569
24569
|
for (var g = 0, m = 0, y = 0, v = p.length; y !== v && p[y] === 0; ) y++, g++;
|
|
24570
24570
|
for (var w = (v - y) * u + 1 >>> 0, E = new Uint8Array(w); y !== v; ) {
|
|
24571
|
-
for (var _ = p[y], N = 0,
|
|
24571
|
+
for (var _ = p[y], N = 0, U = w - 1; (_ !== 0 || N < m) && U !== -1; U--, N++) _ += 256 * E[U] >>> 0, E[U] = _ % a >>> 0, _ = _ / a >>> 0;
|
|
24572
24572
|
if (_ !== 0) throw new Error("Non-zero carry");
|
|
24573
24573
|
m = N, y++;
|
|
24574
24574
|
}
|
|
@@ -24590,8 +24590,8 @@ function ere(t, e) {
|
|
|
24590
24590
|
y = _, g++;
|
|
24591
24591
|
}
|
|
24592
24592
|
if (p[g] !== " ") {
|
|
24593
|
-
for (var
|
|
24594
|
-
for (var O = new Uint8Array(m + (v -
|
|
24593
|
+
for (var U = v - y; U !== v && w[U] === 0; ) U++;
|
|
24594
|
+
for (var O = new Uint8Array(m + (v - U)), B = m; U !== v; ) O[B++] = w[U++];
|
|
24595
24595
|
return O;
|
|
24596
24596
|
}
|
|
24597
24597
|
}
|
|
@@ -25031,13 +25031,13 @@ class Wse extends Uz {
|
|
|
25031
25031
|
Wn((o = m.params) == null ? void 0 : o.prompt) && ((a = m.params) == null || delete a.prompt), Wn((c = m.params) == null ? void 0 : c.tag) && ((l = m.params) == null || delete l.tag);
|
|
25032
25032
|
const v = new Promise(async (w) => {
|
|
25033
25033
|
const E = ({ id: N }) => {
|
|
25034
|
-
var
|
|
25035
|
-
((
|
|
25034
|
+
var U;
|
|
25035
|
+
((U = m.id) == null ? void 0 : U.toString()) === N.toString() && (this.removeRequestFromQueue(N), this.relayer.events.removeListener(vn.publish, E), w());
|
|
25036
25036
|
};
|
|
25037
25037
|
this.relayer.events.on(vn.publish, E);
|
|
25038
|
-
const _ = qo(new Promise((N,
|
|
25038
|
+
const _ = qo(new Promise((N, U) => {
|
|
25039
25039
|
this.rpcPublish(m, i).then(N).catch((O) => {
|
|
25040
|
-
this.logger.warn(O, O == null ? void 0 : O.message),
|
|
25040
|
+
this.logger.warn(O, O == null ? void 0 : O.message), U(O);
|
|
25041
25041
|
});
|
|
25042
25042
|
}), this.initialPublishTimeout, `Failed initial publish, retrying.... id:${p} tag:${f}`);
|
|
25043
25043
|
try {
|
|
@@ -25058,10 +25058,10 @@ class Wse extends Uz {
|
|
|
25058
25058
|
const { payload: l, opts: u = {} } = r, { attestation: d, tvf: h, publishMethod: f, prompt: p, tag: g, ttl: m = we.FIVE_MINUTES } = u, y = u.id || El().toString(), v = af(jy().protocol), w = f || v.publish, E = { id: y, method: w, params: zh(t7(zh({}, l), { ttl: m, prompt: p, tag: g, attestation: d }), h) }, _ = `Failed to publish custom payload, please try again. id:${y} tag:${g}`;
|
|
25059
25059
|
try {
|
|
25060
25060
|
Wn((s = E.params) == null ? void 0 : s.prompt) && ((i = E.params) == null || delete i.prompt), Wn((o = E.params) == null ? void 0 : o.tag) && ((a = E.params) == null || delete a.tag);
|
|
25061
|
-
const N = new Promise(async (
|
|
25061
|
+
const N = new Promise(async (U) => {
|
|
25062
25062
|
const O = ({ id: W }) => {
|
|
25063
25063
|
var z;
|
|
25064
|
-
((z = E.id) == null ? void 0 : z.toString()) === W.toString() && (this.removeRequestFromQueue(W), this.relayer.events.removeListener(vn.publish, O),
|
|
25064
|
+
((z = E.id) == null ? void 0 : z.toString()) === W.toString() && (this.removeRequestFromQueue(W), this.relayer.events.removeListener(vn.publish, O), U());
|
|
25065
25065
|
};
|
|
25066
25066
|
this.relayer.events.on(vn.publish, O);
|
|
25067
25067
|
const B = qo(new Promise((W, z) => {
|
|
@@ -26620,16 +26620,16 @@ class yoe extends Kz {
|
|
|
26620
26620
|
throw new Error(B);
|
|
26621
26621
|
}
|
|
26622
26622
|
const y = await this.client.core.crypto.generateKeyPair(), v = xn(f), w = Nt(Xn(Nt(Nt({ requiredNamespaces: o, optionalNamespaces: a, relays: u ?? [{ protocol: eP }], proposer: { publicKey: y, metadata: this.client.metadata }, expiryTimestamp: v, pairingTopic: p }, c && { sessionProperties: c }), l && { scopedProperties: l }), { id: To() }), (d || h) && { requests: { authentication: d == null ? void 0 : d.map((B) => {
|
|
26623
|
-
const { domain: W, chains: z, nonce: j, uri: L, exp:
|
|
26624
|
-
return { domain: W, chains: z, nonce: j, type: x ?? "caip122", aud: L, version: "1", iat: (/* @__PURE__ */ new Date()).toISOString(), exp:
|
|
26625
|
-
}), walletPay: h } }), E = $t("session_connect", w.id), { reject: _, resolve: N, done:
|
|
26623
|
+
const { domain: W, chains: z, nonce: j, uri: L, exp: D, nbf: b, type: x, statement: T, requestId: k, resources: R, signatureTypes: $ } = B;
|
|
26624
|
+
return { domain: W, chains: z, nonce: j, type: x ?? "caip122", aud: L, version: "1", iat: (/* @__PURE__ */ new Date()).toISOString(), exp: D, nbf: b, statement: T, requestId: k, resources: R, signatureTypes: $ };
|
|
26625
|
+
}), walletPay: h } }), E = $t("session_connect", w.id), { reject: _, resolve: N, done: U } = Su(f, m7), O = ({ id: B }) => {
|
|
26626
26626
|
B === w.id && (this.client.events.off("proposal_expire", O), this.pendingSessions.delete(w.id), this.events.emit(E, { error: { message: m7, code: 0 } }));
|
|
26627
26627
|
};
|
|
26628
26628
|
return this.client.events.on("proposal_expire", O), this.events.once(E, ({ error: B, session: W }) => {
|
|
26629
26629
|
this.client.events.off("proposal_expire", O), B ? _(B) : W && N(W);
|
|
26630
26630
|
}), await this.setProposal(w.id, w), await this.sendProposeSession({ proposal: w, publishOpts: { internal: { throwOnFailedPublish: !0 }, tvf: { correlationId: w.id } } }).catch((B) => {
|
|
26631
26631
|
throw this.deleteProposal(w.id), B;
|
|
26632
|
-
}), { uri: g, approval:
|
|
26632
|
+
}), { uri: g, approval: U };
|
|
26633
26633
|
}), ue(this, "pair", async (n) => {
|
|
26634
26634
|
this.isInitialized(), await this.confirmOnlineStateOrThrow();
|
|
26635
26635
|
try {
|
|
@@ -26660,7 +26660,7 @@ class yoe extends Kz {
|
|
|
26660
26660
|
const { pairingTopic: g, proposer: m, requiredNamespaces: y, optionalNamespaces: v } = p;
|
|
26661
26661
|
let w = (s = this.client.core.eventClient) == null ? void 0 : s.getEvent({ topic: g });
|
|
26662
26662
|
w || (w = (i = this.client.core.eventClient) == null ? void 0 : i.createEvent({ type: Fi.session_approve_started, properties: { topic: g, trace: [Fi.session_approve_started, Fi.session_namespaces_validation_success] } }));
|
|
26663
|
-
const E = await this.client.core.crypto.generateKeyPair(), _ = m.publicKey, N = await this.client.core.crypto.generateSharedKey(E, _),
|
|
26663
|
+
const E = await this.client.core.crypto.generateKeyPair(), _ = m.publicKey, N = await this.client.core.crypto.generateSharedKey(E, _), U = Xn(Nt(Nt(Nt({ relay: { protocol: c ?? "irn" }, namespaces: l, controller: { publicKey: E, metadata: this.client.metadata }, expiry: xn(qh) }, u && { sessionProperties: u }), d && { scopedProperties: d }), h && { sessionConfig: h }), { proposalRequestsResponses: f }), O = Yt.relay;
|
|
26664
26664
|
w.addTrace(Fi.subscribing_session_topic);
|
|
26665
26665
|
try {
|
|
26666
26666
|
await this.client.core.relayer.subscribe(N, { transportType: O, internal: { skipSubscribe: !0 } });
|
|
@@ -26668,10 +26668,10 @@ class yoe extends Kz {
|
|
|
26668
26668
|
throw w.setError(mu.subscribe_session_topic_failure), W;
|
|
26669
26669
|
}
|
|
26670
26670
|
w.addTrace(Fi.subscribe_session_topic_success);
|
|
26671
|
-
const B = Xn(Nt({},
|
|
26671
|
+
const B = Xn(Nt({}, U), { topic: N, requiredNamespaces: y, optionalNamespaces: v, pairingTopic: g, acknowledged: !1, self: U.controller, peer: { publicKey: m.publicKey, metadata: m.metadata }, controller: E, transportType: Yt.relay, authentication: f == null ? void 0 : f.authentication, walletPayResult: f == null ? void 0 : f.walletPay });
|
|
26672
26672
|
await this.client.session.set(N, B), w.addTrace(Fi.store_session);
|
|
26673
26673
|
try {
|
|
26674
|
-
await this.sendApproveSession({ sessionTopic: N, proposal: p, pairingProposalResponse: { relay: { protocol: c ?? "irn" }, responderPublicKey: E }, sessionSettleRequest:
|
|
26674
|
+
await this.sendApproveSession({ sessionTopic: N, proposal: p, pairingProposalResponse: { relay: { protocol: c ?? "irn" }, responderPublicKey: E }, sessionSettleRequest: U, publishOpts: { internal: { throwOnFailedPublish: !0 }, tvf: Nt({ correlationId: a }, this.getTVFApproveParams(B)) } }), w.addTrace(Fi.session_approve_publish_success);
|
|
26675
26675
|
} catch (W) {
|
|
26676
26676
|
throw this.client.logger.error(W), this.client.session.delete(N, en("USER_DISCONNECTED")), await this.client.core.relayer.unsubscribe(N), W;
|
|
26677
26677
|
}
|
|
@@ -26801,15 +26801,15 @@ class yoe extends Kz {
|
|
|
26801
26801
|
let $ = gX(R, "request", g);
|
|
26802
26802
|
Vb(y) && ($ = wX($, y.pop())), y.push($);
|
|
26803
26803
|
}
|
|
26804
|
-
const N = m && m > Qn.wc_sessionAuthenticate.req.ttl ? m : Qn.wc_sessionAuthenticate.req.ttl,
|
|
26804
|
+
const N = m && m > Qn.wc_sessionAuthenticate.req.ttl ? m : Qn.wc_sessionAuthenticate.req.ttl, U = { authPayload: { type: h ?? "caip122", chains: a, statement: c, aud: l, domain: u, version: "1", nonce: d, iat: (/* @__PURE__ */ new Date()).toISOString(), exp: f, nbf: p, resources: y }, requester: { publicKey: E, metadata: this.client.metadata }, expiryTimestamp: xn(N) }, O = { eip155: { chains: a, methods: [.../* @__PURE__ */ new Set(["personal_sign", ...g])], events: ["chainChanged", "accountsChanged"] } }, B = { requiredNamespaces: {}, optionalNamespaces: O, relays: [{ protocol: "irn" }], pairingTopic: v, proposer: { publicKey: E, metadata: this.client.metadata }, expiryTimestamp: xn(Qn.wc_sessionPropose.req.ttl), id: To() }, { done: W, resolve: z, reject: j } = Su(N, "Request expired"), L = To(), D = $t("session_connect", B.id), b = $t("session_request", L), x = async ({ error: R, session: $ }) => {
|
|
26805
26805
|
this.events.off(b, T), R ? j(R) : $ && z({ session: $ });
|
|
26806
26806
|
}, T = async (R) => {
|
|
26807
26807
|
var $, q, G;
|
|
26808
26808
|
if (await this.deletePendingAuthRequest(L, { message: "fulfilled", code: 0 }), R.error) {
|
|
26809
26809
|
const he = en("WC_METHOD_UNSUPPORTED", "wc_sessionAuthenticate");
|
|
26810
|
-
return R.error.code === he.code ? void 0 : (this.events.off(
|
|
26810
|
+
return R.error.code === he.code ? void 0 : (this.events.off(D, x), j(R.error.message));
|
|
26811
26811
|
}
|
|
26812
|
-
await this.deleteProposal(B.id), this.events.off(
|
|
26812
|
+
await this.deleteProposal(B.id), this.events.off(D, x);
|
|
26813
26813
|
const { cacaos: re, responder: ee } = R.result, ne = [], ve = [];
|
|
26814
26814
|
for (const he of re) {
|
|
26815
26815
|
await s9({ cacao: he, projectId: this.client.core.projectId }) || (this.client.logger.error(he, "Signature verification failed"), j(en("SESSION_SETTLEMENT_FAILED", "Signature verification failed")));
|
|
@@ -26824,19 +26824,19 @@ class yoe extends Kz {
|
|
|
26824
26824
|
let Ce;
|
|
26825
26825
|
ne.length > 0 && (Ce = { topic: de, acknowledged: !0, self: { publicKey: E, metadata: this.client.metadata }, peer: ee, controller: ee.publicKey, expiry: xn(qh), requiredNamespaces: {}, optionalNamespaces: {}, relay: { protocol: "irn" }, pairingTopic: v, namespaces: P9([...new Set(ne)], [...new Set(ve)]), transportType: o }, await this.client.core.relayer.subscribe(de, { transportType: o }), await this.client.session.set(de, Ce), v && await this.client.core.pairing.updateMetadata({ topic: v, metadata: ee.metadata }), Ce = this.client.session.get(de)), ($ = this.client.metadata.redirect) != null && $.linkMode && (q = ee.metadata.redirect) != null && q.linkMode && (G = ee.metadata.redirect) != null && G.universal && r && (this.client.core.addLinkModeSupportedApp(ee.metadata.redirect.universal), this.client.session.update(de, { transportType: Yt.link_mode })), z({ auths: re, session: Ce });
|
|
26826
26826
|
};
|
|
26827
|
-
this.events.once(
|
|
26827
|
+
this.events.once(D, x), this.events.once(b, T);
|
|
26828
26828
|
let k;
|
|
26829
26829
|
try {
|
|
26830
26830
|
if (i) {
|
|
26831
|
-
const R = to("wc_sessionAuthenticate",
|
|
26831
|
+
const R = to("wc_sessionAuthenticate", U, L);
|
|
26832
26832
|
this.client.core.history.set(v, R);
|
|
26833
26833
|
const $ = await this.client.core.crypto.encode("", R, { type: q1, encoding: tl });
|
|
26834
26834
|
k = cb(r, v, $);
|
|
26835
|
-
} else await Promise.all([this.sendRequest({ topic: v, method: "wc_sessionAuthenticate", params:
|
|
26835
|
+
} else await Promise.all([this.sendRequest({ topic: v, method: "wc_sessionAuthenticate", params: U, expiry: n.expiry, throwOnFailedPublish: !0, clientRpcId: L }), this.sendRequest({ topic: v, method: "wc_sessionPropose", params: B, expiry: Qn.wc_sessionPropose.req.ttl, throwOnFailedPublish: !0, clientRpcId: B.id })]);
|
|
26836
26836
|
} catch (R) {
|
|
26837
|
-
throw this.events.off(
|
|
26837
|
+
throw this.events.off(D, x), this.events.off(b, T), R;
|
|
26838
26838
|
}
|
|
26839
|
-
return await this.setProposal(B.id, B), await this.setAuthRequest(L, { request: Xn(Nt({},
|
|
26839
|
+
return await this.setProposal(B.id, B), await this.setAuthRequest(L, { request: Xn(Nt({}, U), { verifyContext: {} }), pairingTopic: v, transportType: o }), { uri: k ?? w, response: W };
|
|
26840
26840
|
}), ue(this, "approveSessionAuthenticate", async (n) => {
|
|
26841
26841
|
const { id: r, auths: s } = n, i = this.client.core.eventClient.createEvent({ properties: { topic: r.toString(), trace: [wu.authenticated_session_approve_started] } });
|
|
26842
26842
|
try {
|
|
@@ -28020,10 +28020,10 @@ var dE = { exports: {} };
|
|
|
28020
28020
|
return this.text().then(JSON.parse);
|
|
28021
28021
|
}, this;
|
|
28022
28022
|
}
|
|
28023
|
-
var
|
|
28023
|
+
var U = ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"];
|
|
28024
28024
|
function O(b) {
|
|
28025
28025
|
var x = b.toUpperCase();
|
|
28026
|
-
return
|
|
28026
|
+
return U.indexOf(x) > -1 ? x : b;
|
|
28027
28027
|
}
|
|
28028
28028
|
function B(b, x) {
|
|
28029
28029
|
if (!(this instanceof B))
|
|
@@ -28116,7 +28116,7 @@ var dE = { exports: {} };
|
|
|
28116
28116
|
this.stack = k.stack;
|
|
28117
28117
|
}, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException;
|
|
28118
28118
|
}
|
|
28119
|
-
function
|
|
28119
|
+
function D(b, x) {
|
|
28120
28120
|
return new Promise(function(T, k) {
|
|
28121
28121
|
var R = new B(b, x);
|
|
28122
28122
|
if (R.signal && R.signal.aborted)
|
|
@@ -28171,7 +28171,7 @@ var dE = { exports: {} };
|
|
|
28171
28171
|
}), $.send(typeof R._bodyInit > "u" ? null : R._bodyInit);
|
|
28172
28172
|
});
|
|
28173
28173
|
}
|
|
28174
|
-
return
|
|
28174
|
+
return D.polyfill = !0, a.fetch || (a.fetch = D, a.Headers = g, a.Request = B, a.Response = j), o.Headers = g, o.Request = B, o.Response = j, o.fetch = D, Object.defineProperty(o, "__esModule", { value: !0 }), o;
|
|
28175
28175
|
})({});
|
|
28176
28176
|
})(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill;
|
|
28177
28177
|
var s = n.fetch ? n : r;
|
|
@@ -33301,7 +33301,7 @@ class jle {
|
|
|
33301
33301
|
fetchWalletRanks: !1,
|
|
33302
33302
|
fetchRecommendedWallets: !0
|
|
33303
33303
|
}), V.state.enableReconnect ? (await this.syncExistingConnection(), await this.syncAdapterConnections()) : await this.unSyncExistingConnection(), !e.basic && !e.manualWCControl && (this.remoteFeatures = await Fle.fetchRemoteFeatures(e)), await pe.fetchUsage(), V.setRemoteFeatures(this.remoteFeatures), this.remoteFeatures.onramp && yv.setOnrampProviders(this.remoteFeatures.onramp), ((r = V.state.remoteFeatures) != null && r.email || Array.isArray((s = V.state.remoteFeatures) == null ? void 0 : s.socials) && ((i = V.state.remoteFeatures) == null ? void 0 : i.socials.length) > 0) && await this.checkAllowedOrigins(), (o = V.state.features) != null && o.reownAuthentication || (a = V.state.remoteFeatures) != null && a.reownAuthentication) {
|
|
33304
|
-
const { ReownAuthentication: c } = await import("./features-
|
|
33304
|
+
const { ReownAuthentication: c } = await import("./features-CLAc4e_e.mjs"), l = V.state.siwx;
|
|
33305
33305
|
l instanceof c || (l && console.warn("ReownAuthentication option is enabled, SIWX configuration will be overridden."), V.setSIWX(new c()));
|
|
33306
33306
|
}
|
|
33307
33307
|
}
|
|
@@ -34739,10 +34739,10 @@ class Wle extends jle {
|
|
|
34739
34739
|
if (!X.isClient())
|
|
34740
34740
|
return;
|
|
34741
34741
|
const r = [];
|
|
34742
|
-
(n.email || n.socials && n.socials.length > 0) && r.push(import("./embedded-wallet-
|
|
34742
|
+
(n.email || n.socials && n.socials.length > 0) && r.push(import("./embedded-wallet-B4nCTx4R.mjs")), n.email && r.push(import("./email-D5wjRjye.mjs")), n.socials && r.push(import("./socials-DNYOdLp5.mjs")), n.swaps && n.swaps.length > 0 && r.push(import("./swaps-DjlcibcQ.mjs")), e.send && r.push(import("./send-C5KcsM6L.mjs")), e.receive && r.push(import("./receive-BNwxfwPP.mjs")), n.onramp && n.onramp.length > 0 && r.push(import("./onramp-CsBpZ5no.mjs")), n.payWithExchange && r.push(import("./pay-with-exchange-7JIQ3rUR.mjs")), n.activity && r.push(import("./transactions-S7OEj83I.mjs")), (e.pay || n.payments) && r.push(import("./index-B2d4-zSb.mjs")), n.emailCapture && r.push(import("./data-capture-DEzYbNFK.mjs")), await Promise.all([
|
|
34743
34743
|
...r,
|
|
34744
|
-
import("./index-
|
|
34745
|
-
import("./w3m-modal-
|
|
34744
|
+
import("./index-N71MS8By.mjs"),
|
|
34745
|
+
import("./w3m-modal-B6RpiGld.mjs")
|
|
34746
34746
|
]);
|
|
34747
34747
|
}
|
|
34748
34748
|
}
|
|
@@ -46977,13 +46977,13 @@ var Vhe = Ck.exports;
|
|
|
46977
46977
|
function d(y) {
|
|
46978
46978
|
const v = u(o.NUMERIC, e.NUMERIC, y), w = u(o.ALPHANUMERIC, e.ALPHANUMERIC, y);
|
|
46979
46979
|
let E, _;
|
|
46980
|
-
return a.isKanjiModeEnabled() ? (E = u(o.BYTE, e.BYTE, y), _ = u(o.KANJI, e.KANJI, y)) : (E = u(o.BYTE_KANJI, e.BYTE, y), _ = []), v.concat(w, E, _).sort(function(
|
|
46981
|
-
return
|
|
46982
|
-
}).map(function(
|
|
46980
|
+
return a.isKanjiModeEnabled() ? (E = u(o.BYTE, e.BYTE, y), _ = u(o.KANJI, e.KANJI, y)) : (E = u(o.BYTE_KANJI, e.BYTE, y), _ = []), v.concat(w, E, _).sort(function(U, O) {
|
|
46981
|
+
return U.index - O.index;
|
|
46982
|
+
}).map(function(U) {
|
|
46983
46983
|
return {
|
|
46984
|
-
data:
|
|
46985
|
-
mode:
|
|
46986
|
-
length:
|
|
46984
|
+
data: U.data,
|
|
46985
|
+
mode: U.mode,
|
|
46986
|
+
length: U.length
|
|
46987
46987
|
};
|
|
46988
46988
|
});
|
|
46989
46989
|
}
|
|
@@ -47041,9 +47041,9 @@ var Vhe = Ck.exports;
|
|
|
47041
47041
|
const w = {}, E = { start: {} };
|
|
47042
47042
|
let _ = ["start"];
|
|
47043
47043
|
for (let N = 0; N < y.length; N++) {
|
|
47044
|
-
const
|
|
47045
|
-
for (let B = 0; B <
|
|
47046
|
-
const W =
|
|
47044
|
+
const U = y[N], O = [];
|
|
47045
|
+
for (let B = 0; B < U.length; B++) {
|
|
47046
|
+
const W = U[B], z = "" + N + B;
|
|
47047
47047
|
O.push(z), w[z] = { node: W, lastCount: 0 }, E[z] = {};
|
|
47048
47048
|
for (let j = 0; j < _.length; j++) {
|
|
47049
47049
|
const L = _[j];
|
|
@@ -47078,9 +47078,9 @@ var Vhe = Ck.exports;
|
|
|
47078
47078
|
return typeof E == "string" ? w.push(m(E, null)) : E.data && w.push(m(E.data, E.mode)), w;
|
|
47079
47079
|
}, []);
|
|
47080
47080
|
}, t.fromString = function(v, w) {
|
|
47081
|
-
const E = d(v, a.isKanjiModeEnabled()), _ = p(E), N = g(_, w),
|
|
47082
|
-
for (let B = 1; B <
|
|
47083
|
-
O.push(N.table[
|
|
47081
|
+
const E = d(v, a.isKanjiModeEnabled()), _ = p(E), N = g(_, w), U = c.find_path(N.map, "start", "end"), O = [];
|
|
47082
|
+
for (let B = 1; B < U.length - 1; B++)
|
|
47083
|
+
O.push(N.table[U[B]].node);
|
|
47084
47084
|
return t.fromArray(f(O));
|
|
47085
47085
|
}, t.rawSplit = function(v) {
|
|
47086
47086
|
return t.fromArray(
|
|
@@ -47163,9 +47163,9 @@ function ife(t, e, n) {
|
|
|
47163
47163
|
const g = new Array(o), m = new Array(o);
|
|
47164
47164
|
let y = 0;
|
|
47165
47165
|
const v = new Uint8Array(t.buffer);
|
|
47166
|
-
for (let
|
|
47167
|
-
const O =
|
|
47168
|
-
g[
|
|
47166
|
+
for (let U = 0; U < o; U++) {
|
|
47167
|
+
const O = U < c ? u : d;
|
|
47168
|
+
g[U] = v.slice(p, p + O), m[U] = f.encode(g[U]), p += O, y = Math.max(y, O);
|
|
47169
47169
|
}
|
|
47170
47170
|
const w = new Uint8Array(r);
|
|
47171
47171
|
let E = 0, _, N;
|
|
@@ -52492,14 +52492,14 @@ class v0e extends y6 {
|
|
|
52492
52492
|
for (let w = 0; w < 16; w++, n += 4)
|
|
52493
52493
|
zc[w] = e.getUint32(n), Vc[w] = e.getUint32(n += 4);
|
|
52494
52494
|
for (let w = 16; w < 80; w++) {
|
|
52495
|
-
const E = zc[w - 15] | 0, _ = Vc[w - 15] | 0, N = ot.rotrSH(E, _, 1) ^ ot.rotrSH(E, _, 8) ^ ot.shrSH(E, _, 7),
|
|
52495
|
+
const E = zc[w - 15] | 0, _ = Vc[w - 15] | 0, N = ot.rotrSH(E, _, 1) ^ ot.rotrSH(E, _, 8) ^ ot.shrSH(E, _, 7), U = ot.rotrSL(E, _, 1) ^ ot.rotrSL(E, _, 8) ^ ot.shrSL(E, _, 7), O = zc[w - 2] | 0, B = Vc[w - 2] | 0, W = ot.rotrSH(O, B, 19) ^ ot.rotrBH(O, B, 61) ^ ot.shrSH(O, B, 6), z = ot.rotrSL(O, B, 19) ^ ot.rotrBL(O, B, 61) ^ ot.shrSL(O, B, 6), j = ot.add4L(U, z, Vc[w - 7], Vc[w - 16]), L = ot.add4H(j, N, W, zc[w - 7], zc[w - 16]);
|
|
52496
52496
|
zc[w] = L | 0, Vc[w] = j | 0;
|
|
52497
52497
|
}
|
|
52498
52498
|
let { Ah: r, Al: s, Bh: i, Bl: o, Ch: a, Cl: c, Dh: l, Dl: u, Eh: d, El: h, Fh: f, Fl: p, Gh: g, Gl: m, Hh: y, Hl: v } = this;
|
|
52499
52499
|
for (let w = 0; w < 80; w++) {
|
|
52500
|
-
const E = ot.rotrSH(d, h, 14) ^ ot.rotrSH(d, h, 18) ^ ot.rotrBH(d, h, 41), _ = ot.rotrSL(d, h, 14) ^ ot.rotrSL(d, h, 18) ^ ot.rotrBL(d, h, 41), N = d & f ^ ~d & g,
|
|
52500
|
+
const E = ot.rotrSH(d, h, 14) ^ ot.rotrSH(d, h, 18) ^ ot.rotrBH(d, h, 41), _ = ot.rotrSL(d, h, 14) ^ ot.rotrSL(d, h, 18) ^ ot.rotrBL(d, h, 41), N = d & f ^ ~d & g, U = h & p ^ ~h & m, O = ot.add5L(v, _, U, x0e[w], Vc[w]), B = ot.add5H(O, y, E, N, y0e[w], zc[w]), W = O | 0, z = ot.rotrSH(r, s, 28) ^ ot.rotrBH(r, s, 34) ^ ot.rotrBH(r, s, 39), j = ot.rotrSL(r, s, 28) ^ ot.rotrBL(r, s, 34) ^ ot.rotrBL(r, s, 39), L = r & i ^ r & a ^ i & a, D = s & o ^ s & c ^ o & c;
|
|
52501
52501
|
y = g | 0, v = m | 0, g = f | 0, m = p | 0, f = d | 0, p = h | 0, { h: d, l: h } = ot.add(l | 0, u | 0, B | 0, W | 0), l = a | 0, u = c | 0, a = i | 0, c = o | 0, i = r | 0, o = s | 0;
|
|
52502
|
-
const b = ot.add3L(W, j,
|
|
52502
|
+
const b = ot.add3L(W, j, D);
|
|
52503
52503
|
r = ot.add3H(b, B, z, L), s = b | 0;
|
|
52504
52504
|
}
|
|
52505
52505
|
({ h: r, l: s } = ot.add(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: i, l: o } = ot.add(this.Bh | 0, this.Bl | 0, i | 0, o | 0), { h: a, l: c } = ot.add(this.Ch | 0, this.Cl | 0, a | 0, c | 0), { h: l, l: u } = ot.add(this.Dh | 0, this.Dl | 0, l | 0, u | 0), { h: d, l: h } = ot.add(this.Eh | 0, this.El | 0, d | 0, h | 0), { h: f, l: p } = ot.add(this.Fh | 0, this.Fl | 0, f | 0, p | 0), { h: g, l: m } = ot.add(this.Gh | 0, this.Gl | 0, g | 0, m | 0), { h: y, l: v } = ot.add(this.Hh | 0, this.Hl | 0, y | 0, v | 0), this.set(r, s, i, o, a, c, l, u, d, h, f, p, g, m, y, v);
|
|
@@ -52805,10 +52805,10 @@ oc.register = function(t) {
|
|
|
52805
52805
|
Object.freeze(oc);
|
|
52806
52806
|
const At = (t, e) => t << e | t >>> 32 - e;
|
|
52807
52807
|
function GS(t, e, n, r, s, i) {
|
|
52808
|
-
let o = t[e++] ^ n[r++], a = t[e++] ^ n[r++], c = t[e++] ^ n[r++], l = t[e++] ^ n[r++], u = t[e++] ^ n[r++], d = t[e++] ^ n[r++], h = t[e++] ^ n[r++], f = t[e++] ^ n[r++], p = t[e++] ^ n[r++], g = t[e++] ^ n[r++], m = t[e++] ^ n[r++], y = t[e++] ^ n[r++], v = t[e++] ^ n[r++], w = t[e++] ^ n[r++], E = t[e++] ^ n[r++], _ = t[e++] ^ n[r++], N = o,
|
|
52808
|
+
let o = t[e++] ^ n[r++], a = t[e++] ^ n[r++], c = t[e++] ^ n[r++], l = t[e++] ^ n[r++], u = t[e++] ^ n[r++], d = t[e++] ^ n[r++], h = t[e++] ^ n[r++], f = t[e++] ^ n[r++], p = t[e++] ^ n[r++], g = t[e++] ^ n[r++], m = t[e++] ^ n[r++], y = t[e++] ^ n[r++], v = t[e++] ^ n[r++], w = t[e++] ^ n[r++], E = t[e++] ^ n[r++], _ = t[e++] ^ n[r++], N = o, U = a, O = c, B = l, W = u, z = d, j = h, L = f, D = p, b = g, x = m, T = y, k = v, R = w, $ = E, q = _;
|
|
52809
52809
|
for (let G = 0; G < 8; G += 2)
|
|
52810
|
-
W ^= At(N + k | 0, 7),
|
|
52811
|
-
s[i++] = o + N | 0, s[i++] = a +
|
|
52810
|
+
W ^= At(N + k | 0, 7), D ^= At(W + N | 0, 9), k ^= At(D + W | 0, 13), N ^= At(k + D | 0, 18), b ^= At(z + U | 0, 7), R ^= At(b + z | 0, 9), U ^= At(R + b | 0, 13), z ^= At(U + R | 0, 18), $ ^= At(x + j | 0, 7), O ^= At($ + x | 0, 9), j ^= At(O + $ | 0, 13), x ^= At(j + O | 0, 18), B ^= At(q + T | 0, 7), L ^= At(B + q | 0, 9), T ^= At(L + B | 0, 13), q ^= At(T + L | 0, 18), U ^= At(N + B | 0, 7), O ^= At(U + N | 0, 9), B ^= At(O + U | 0, 13), N ^= At(B + O | 0, 18), j ^= At(z + W | 0, 7), L ^= At(j + z | 0, 9), W ^= At(L + j | 0, 13), z ^= At(W + L | 0, 18), T ^= At(x + b | 0, 7), D ^= At(T + x | 0, 9), b ^= At(D + T | 0, 13), x ^= At(b + D | 0, 18), k ^= At(q + $ | 0, 7), R ^= At(k + q | 0, 9), $ ^= At(R + k | 0, 13), q ^= At($ + R | 0, 18);
|
|
52811
|
+
s[i++] = o + N | 0, s[i++] = a + U | 0, s[i++] = c + O | 0, s[i++] = l + B | 0, s[i++] = u + W | 0, s[i++] = d + z | 0, s[i++] = h + j | 0, s[i++] = f + L | 0, s[i++] = p + D | 0, s[i++] = g + b | 0, s[i++] = m + x | 0, s[i++] = y + T | 0, s[i++] = v + k | 0, s[i++] = w + R | 0, s[i++] = E + $ | 0, s[i++] = _ + q | 0;
|
|
52812
52812
|
}
|
|
52813
52813
|
function Of(t, e, n, r, s) {
|
|
52814
52814
|
let i = r + 0, o = r + 16 * s;
|
|
@@ -53561,8 +53561,8 @@ function fge(t) {
|
|
|
53561
53561
|
*/
|
|
53562
53562
|
equals(g) {
|
|
53563
53563
|
u(g);
|
|
53564
|
-
const { px: m, py: y, pz: v } = this, { px: w, py: E, pz: _ } = g, N = n.eql(n.mul(m, _), n.mul(w, v)),
|
|
53565
|
-
return N &&
|
|
53564
|
+
const { px: m, py: y, pz: v } = this, { px: w, py: E, pz: _ } = g, N = n.eql(n.mul(m, _), n.mul(w, v)), U = n.eql(n.mul(y, _), n.mul(E, v));
|
|
53565
|
+
return N && U;
|
|
53566
53566
|
}
|
|
53567
53567
|
/**
|
|
53568
53568
|
* Flips point to one corresponding to (x, -y) in Affine coordinates.
|
|
@@ -53576,8 +53576,8 @@ function fge(t) {
|
|
|
53576
53576
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
53577
53577
|
double() {
|
|
53578
53578
|
const { a: g, b: m } = e, y = n.mul(m, QS), { px: v, py: w, pz: E } = this;
|
|
53579
|
-
let _ = n.ZERO, N = n.ZERO,
|
|
53580
|
-
return z = n.add(z, z),
|
|
53579
|
+
let _ = n.ZERO, N = n.ZERO, U = n.ZERO, O = n.mul(v, v), B = n.mul(w, w), W = n.mul(E, E), z = n.mul(v, w);
|
|
53580
|
+
return z = n.add(z, z), U = n.mul(v, E), U = n.add(U, U), _ = n.mul(g, U), N = n.mul(y, W), N = n.add(_, N), _ = n.sub(B, N), N = n.add(B, N), N = n.mul(_, N), _ = n.mul(z, _), U = n.mul(y, U), W = n.mul(g, W), z = n.sub(O, W), z = n.mul(g, z), z = n.add(z, U), U = n.add(O, O), O = n.add(U, O), O = n.add(O, W), O = n.mul(O, z), N = n.add(N, O), W = n.mul(w, E), W = n.add(W, W), O = n.mul(W, z), _ = n.sub(_, O), U = n.mul(W, B), U = n.add(U, U), U = n.add(U, U), new d(_, N, U);
|
|
53581
53581
|
}
|
|
53582
53582
|
// Renes-Costello-Batina exception-free addition formula.
|
|
53583
53583
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -53586,12 +53586,12 @@ function fge(t) {
|
|
|
53586
53586
|
add(g) {
|
|
53587
53587
|
u(g);
|
|
53588
53588
|
const { px: m, py: y, pz: v } = this, { px: w, py: E, pz: _ } = g;
|
|
53589
|
-
let N = n.ZERO,
|
|
53589
|
+
let N = n.ZERO, U = n.ZERO, O = n.ZERO;
|
|
53590
53590
|
const B = e.a, W = n.mul(e.b, QS);
|
|
53591
|
-
let z = n.mul(m, w), j = n.mul(y, E), L = n.mul(v, _),
|
|
53592
|
-
|
|
53591
|
+
let z = n.mul(m, w), j = n.mul(y, E), L = n.mul(v, _), D = n.add(m, y), b = n.add(w, E);
|
|
53592
|
+
D = n.mul(D, b), b = n.add(z, j), D = n.sub(D, b), b = n.add(m, v);
|
|
53593
53593
|
let x = n.add(w, _);
|
|
53594
|
-
return b = n.mul(b, x), x = n.add(z, L), b = n.sub(b, x), x = n.add(y, v), N = n.add(E, _), x = n.mul(x, N), N = n.add(j, L), x = n.sub(x, N), O = n.mul(B, b), N = n.mul(W, L), O = n.add(N, O), N = n.sub(j, O), O = n.add(j, O),
|
|
53594
|
+
return b = n.mul(b, x), x = n.add(z, L), b = n.sub(b, x), x = n.add(y, v), N = n.add(E, _), x = n.mul(x, N), N = n.add(j, L), x = n.sub(x, N), O = n.mul(B, b), N = n.mul(W, L), O = n.add(N, O), N = n.sub(j, O), O = n.add(j, O), U = n.mul(N, O), j = n.add(z, z), j = n.add(j, z), L = n.mul(B, L), b = n.mul(W, b), j = n.add(j, L), L = n.sub(z, L), L = n.mul(B, L), b = n.add(b, L), z = n.mul(j, b), U = n.add(U, z), z = n.mul(x, b), N = n.mul(D, N), N = n.sub(N, z), z = n.mul(D, j), O = n.mul(x, O), O = n.add(O, z), new d(N, U, O);
|
|
53595
53595
|
}
|
|
53596
53596
|
subtract(g) {
|
|
53597
53597
|
return this.add(g.negate());
|
|
@@ -53619,10 +53619,10 @@ function fge(t) {
|
|
|
53619
53619
|
const { endo: y } = e;
|
|
53620
53620
|
if (!y)
|
|
53621
53621
|
return f.unsafeLadder(this, g);
|
|
53622
|
-
let { k1neg: v, k1: w, k2neg: E, k2: _ } = y.splitScalar(g), N = m,
|
|
53622
|
+
let { k1neg: v, k1: w, k2neg: E, k2: _ } = y.splitScalar(g), N = m, U = m, O = this;
|
|
53623
53623
|
for (; w > Qa || _ > Qa; )
|
|
53624
|
-
w & _i && (N = N.add(O)), _ & _i && (
|
|
53625
|
-
return v && (N = N.negate()), E && (
|
|
53624
|
+
w & _i && (N = N.add(O)), _ & _i && (U = U.add(O)), O = O.double(), w >>= _i, _ >>= _i;
|
|
53625
|
+
return v && (N = N.negate()), E && (U = U.negate()), U = new d(n.mul(U.px, y.beta), U.py, U.pz), N.add(U);
|
|
53626
53626
|
}
|
|
53627
53627
|
/**
|
|
53628
53628
|
* Constant time multiplication.
|
|
@@ -53638,8 +53638,8 @@ function fge(t) {
|
|
|
53638
53638
|
let m = g, y, v;
|
|
53639
53639
|
const { endo: w } = e;
|
|
53640
53640
|
if (w) {
|
|
53641
|
-
const { k1neg: E, k1: _, k2neg: N, k2:
|
|
53642
|
-
let { p: O, f: B } = this.wNAF(_), { p: W, f: z } = this.wNAF(
|
|
53641
|
+
const { k1neg: E, k1: _, k2neg: N, k2: U } = w.splitScalar(m);
|
|
53642
|
+
let { p: O, f: B } = this.wNAF(_), { p: W, f: z } = this.wNAF(U);
|
|
53643
53643
|
O = f.constTimeNegate(E, O), W = f.constTimeNegate(N, W), W = new d(n.mul(W.px, w.beta), W.py, W.pz), y = O.add(W), v = B.add(z);
|
|
53644
53644
|
} else {
|
|
53645
53645
|
const { p: E, f: _ } = this.wNAF(m);
|
|
@@ -53778,7 +53778,7 @@ function gge(t) {
|
|
|
53778
53778
|
return new y(this.r, this.s, x);
|
|
53779
53779
|
}
|
|
53780
53780
|
recoverPublicKey(x) {
|
|
53781
|
-
const { r: T, s: k, recovery: R } = this, $ =
|
|
53781
|
+
const { r: T, s: k, recovery: R } = this, $ = U(Gi("msgHash", x));
|
|
53782
53782
|
if (R == null || ![0, 1, 2, 3].includes(R))
|
|
53783
53783
|
throw new Error("recovery id invalid");
|
|
53784
53784
|
const q = R === 2 || R === 3 ? T + e.n : T;
|
|
@@ -53857,7 +53857,7 @@ function gge(t) {
|
|
|
53857
53857
|
const N = e.bits2int || function(b) {
|
|
53858
53858
|
const x = Sd(b), T = b.length * 8 - e.nBitLength;
|
|
53859
53859
|
return T > 0 ? x >> BigInt(T) : x;
|
|
53860
|
-
},
|
|
53860
|
+
}, U = e.bits2int_modN || function(b) {
|
|
53861
53861
|
return a(N(b));
|
|
53862
53862
|
}, O = I6(e.nBitLength);
|
|
53863
53863
|
function B(b) {
|
|
@@ -53873,7 +53873,7 @@ function gge(t) {
|
|
|
53873
53873
|
const { hash: k, randomBytes: R } = e;
|
|
53874
53874
|
let { lowS: $, prehash: q, extraEntropy: G } = T;
|
|
53875
53875
|
$ == null && ($ = !0), b = Gi("msgHash", b), q && (b = Gi("prehashed msgHash", k(b)));
|
|
53876
|
-
const re =
|
|
53876
|
+
const re = U(b), ee = u(x), ne = [B(ee), B(re)];
|
|
53877
53877
|
if (G != null) {
|
|
53878
53878
|
const he = G === !0 ? R(n.BYTES) : G;
|
|
53879
53879
|
ne.push(Gi("extraEntropy", he));
|
|
@@ -53900,7 +53900,7 @@ function gge(t) {
|
|
|
53900
53900
|
return j$($.hash.outputLen, $.nByteLength, $.hmac)(k, R);
|
|
53901
53901
|
}
|
|
53902
53902
|
l.BASE._setWindowSize(8);
|
|
53903
|
-
function
|
|
53903
|
+
function D(b, x, T, k = j) {
|
|
53904
53904
|
var Ye;
|
|
53905
53905
|
const R = b;
|
|
53906
53906
|
if (x = Gi("msgHash", x), T = Gi("publicKey", T), "strict" in k)
|
|
@@ -53930,7 +53930,7 @@ function gge(t) {
|
|
|
53930
53930
|
if ($ && G.hasHighS())
|
|
53931
53931
|
return !1;
|
|
53932
53932
|
q && (x = e.hash(x));
|
|
53933
|
-
const { r: ee, s: ne } = G, ve =
|
|
53933
|
+
const { r: ee, s: ne } = G, ve = U(x), de = c(ne), Ce = a(ve * de), he = a(ee * de), Ee = (Ye = l.BASE.multiplyAndAddUnsafe(re, Ce, he)) == null ? void 0 : Ye.toAffine();
|
|
53934
53934
|
return Ee ? a(Ee.x) === ee : !1;
|
|
53935
53935
|
}
|
|
53936
53936
|
return {
|
|
@@ -53938,7 +53938,7 @@ function gge(t) {
|
|
|
53938
53938
|
getPublicKey: w,
|
|
53939
53939
|
getSharedSecret: _,
|
|
53940
53940
|
sign: L,
|
|
53941
|
-
verify:
|
|
53941
|
+
verify: D,
|
|
53942
53942
|
ProjectivePoint: l,
|
|
53943
53943
|
Signature: y,
|
|
53944
53944
|
utils: v
|
|
@@ -56475,10 +56475,10 @@ function hme(t) {
|
|
|
56475
56475
|
for (let _ = 0; _ < d; _++) m = m << 1 | u();
|
|
56476
56476
|
let y = [], v = 0, w = h;
|
|
56477
56477
|
for (; ; ) {
|
|
56478
|
-
let _ = Math.floor(((m - v + 1) * s - 1) / w), N = 0,
|
|
56479
|
-
for (;
|
|
56480
|
-
let W = N +
|
|
56481
|
-
_ < i[W] ?
|
|
56478
|
+
let _ = Math.floor(((m - v + 1) * s - 1) / w), N = 0, U = r;
|
|
56479
|
+
for (; U - N > 1; ) {
|
|
56480
|
+
let W = N + U >>> 1;
|
|
56481
|
+
_ < i[W] ? U = W : N = W;
|
|
56482
56482
|
}
|
|
56483
56483
|
if (N == 0) break;
|
|
56484
56484
|
y.push(N);
|
|
@@ -64950,10 +64950,10 @@ function iU(t, e, n, r) {
|
|
|
64950
64950
|
}
|
|
64951
64951
|
};
|
|
64952
64952
|
if (n.mnemonic) {
|
|
64953
|
-
const f = r.client != null ? r.client : `ethers/${$k}`, p = n.mnemonic.path || nU, g = n.mnemonic.locale || "en", m = t.slice(32, 64), y = _e(n.mnemonic.entropy, "account.mnemonic.entropy"), v = oc(16), w = new d0(m, v), E = _e(w.encrypt(y)), _ = /* @__PURE__ */ new Date(),
|
|
64953
|
+
const f = r.client != null ? r.client : `ethers/${$k}`, p = n.mnemonic.path || nU, g = n.mnemonic.locale || "en", m = t.slice(32, 64), y = _e(n.mnemonic.entropy, "account.mnemonic.entropy"), v = oc(16), w = new d0(m, v), E = _e(w.encrypt(y)), _ = /* @__PURE__ */ new Date(), U = "UTC--" + (_.getUTCFullYear() + "-" + ug(_.getUTCMonth() + 1, 2) + "-" + ug(_.getUTCDate(), 2) + "T" + ug(_.getUTCHours(), 2) + "-" + ug(_.getUTCMinutes(), 2) + "-" + ug(_.getUTCSeconds(), 2) + ".0Z") + "--" + h.address;
|
|
64954
64954
|
h["x-ethers"] = {
|
|
64955
64955
|
client: f,
|
|
64956
|
-
gethFilename:
|
|
64956
|
+
gethFilename: U,
|
|
64957
64957
|
path: p,
|
|
64958
64958
|
locale: g,
|
|
64959
64959
|
mnemonicCounter: fe(v).substring(2),
|
|
@@ -65503,7 +65503,7 @@ class zwe extends F6 {
|
|
|
65503
65503
|
async initialize() {
|
|
65504
65504
|
const e = C.getCaipNetworks(), { metadata: n, coinbasePreference: r } = V.state;
|
|
65505
65505
|
try {
|
|
65506
|
-
const { createBaseAccountSDK: s } = await import("./index-
|
|
65506
|
+
const { createBaseAccountSDK: s } = await import("./index-DWbY8-1l.mjs");
|
|
65507
65507
|
if (typeof window > "u")
|
|
65508
65508
|
return Promise.resolve();
|
|
65509
65509
|
const i = s({
|
|
@@ -65846,7 +65846,7 @@ Object.defineProperty(pU, "__esModule", { value: !0 });
|
|
|
65846
65846
|
}), n = An && An.__exportStar || function(ae, ge) {
|
|
65847
65847
|
for (var Ue in ae) Ue !== "default" && !Object.prototype.hasOwnProperty.call(ge, Ue) && e(ge, ae, Ue);
|
|
65848
65848
|
};
|
|
65849
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), t.setBaseUrl = void 0, t.relayTransaction = a, t.getRelayCount = c, t.getSafeInfo = l, t.getIncomingTransfers = u, t.getModuleTransactions = d, t.getMultisigTransactions = h, t.getBalances = f, t.getFiatCurrencies = p, t.getOwnedSafes = g, t.getAllOwnedSafes = m, t.getCollectibles = y, t.getCollectiblesPage = v, t.getTransactionHistory = w, t.getTransactionQueue = E, t.getTransactionDetails = _, t.deleteTransaction = N, t.postSafeGasEstimation =
|
|
65849
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.setBaseUrl = void 0, t.relayTransaction = a, t.getRelayCount = c, t.getSafeInfo = l, t.getIncomingTransfers = u, t.getModuleTransactions = d, t.getMultisigTransactions = h, t.getBalances = f, t.getFiatCurrencies = p, t.getOwnedSafes = g, t.getAllOwnedSafes = m, t.getCollectibles = y, t.getCollectiblesPage = v, t.getTransactionHistory = w, t.getTransactionQueue = E, t.getTransactionDetails = _, t.deleteTransaction = N, t.postSafeGasEstimation = U, t.getNonces = O, t.proposeTransaction = B, t.getConfirmationView = W, t.getTxPreview = z, t.getChainsConfig = j, t.getChainConfig = L, t.getSafeApps = D, t.getMasterCopies = b, t.getDecodedData = x, t.getSafeMessages = T, t.getSafeMessage = k, t.proposeSafeMessage = R, t.confirmSafeMessage = $, t.getDelegates = q, t.registerDevice = G, t.unregisterSafe = re, t.unregisterDevice = ee, t.registerEmail = ne, t.changeEmail = ve, t.resendEmailVerificationCode = de, t.verifyEmail = Ce, t.getRegisteredEmail = he, t.deleteRegisteredEmail = Ee, t.registerRecoveryModule = qe, t.unsubscribeSingle = Ye, t.unsubscribeAll = Je, t.getSafeOverviews = Ot, t.getContract = Zr, t.getAuthNonce = Is, t.verifyAuth = J3, t.createAccount = Q3, t.getAccount = Tw, t.deleteAccount = Nw, t.getAccountDataTypes = U0, t.getAccountDataSettings = Rw, t.putAccountDataSettings = Ow, t.getIndexingStatus = Pw;
|
|
65850
65850
|
const r = $0, s = q3;
|
|
65851
65851
|
n(K3, t), n(kl, t), n(Gt, t), n($l, t), n(G3, t), n(fU, t), n(h0, t), n(f0, t), n(Z3, t), n(pU, t);
|
|
65852
65852
|
let i = s.DEFAULT_BASE_URL;
|
|
@@ -65922,7 +65922,7 @@ Object.defineProperty(pU, "__esModule", { value: !0 });
|
|
|
65922
65922
|
body: { signature: Ue }
|
|
65923
65923
|
});
|
|
65924
65924
|
}
|
|
65925
|
-
function
|
|
65925
|
+
function U(ae, ge, Ue) {
|
|
65926
65926
|
return (0, r.postEndpoint)(i, "/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations", {
|
|
65927
65927
|
path: { chainId: ae, safe_address: ge },
|
|
65928
65928
|
body: Ue
|
|
@@ -65961,7 +65961,7 @@ Object.defineProperty(pU, "__esModule", { value: !0 });
|
|
|
65961
65961
|
path: { chainId: ae }
|
|
65962
65962
|
});
|
|
65963
65963
|
}
|
|
65964
|
-
function
|
|
65964
|
+
function D(ae, ge = {}) {
|
|
65965
65965
|
return (0, r.getEndpoint)(i, "/v1/chains/{chainId}/safe-apps", {
|
|
65966
65966
|
path: { chainId: ae },
|
|
65967
65967
|
query: ge
|
|
@@ -67289,45 +67289,45 @@ var R4 = { exports: {} };
|
|
|
67289
67289
|
return v ^= p.length, v = a(v), v >>> 0;
|
|
67290
67290
|
}, s.x86.hash128 = function(p, g) {
|
|
67291
67291
|
p = p || "", g = g || 0;
|
|
67292
|
-
for (var m = p.length % 16, y = p.length - m, v = g, w = g, E = g, _ = g, N = 0,
|
|
67293
|
-
N = p.charCodeAt(
|
|
67294
|
-
switch (N = 0,
|
|
67292
|
+
for (var m = p.length % 16, y = p.length - m, v = g, w = g, E = g, _ = g, N = 0, U = 0, O = 0, B = 0, W = 597399067, z = 2869860233, j = 951274213, L = 2716044179, D = 0; D < y; D = D + 16)
|
|
67293
|
+
N = p.charCodeAt(D) & 255 | (p.charCodeAt(D + 1) & 255) << 8 | (p.charCodeAt(D + 2) & 255) << 16 | (p.charCodeAt(D + 3) & 255) << 24, U = p.charCodeAt(D + 4) & 255 | (p.charCodeAt(D + 5) & 255) << 8 | (p.charCodeAt(D + 6) & 255) << 16 | (p.charCodeAt(D + 7) & 255) << 24, O = p.charCodeAt(D + 8) & 255 | (p.charCodeAt(D + 9) & 255) << 8 | (p.charCodeAt(D + 10) & 255) << 16 | (p.charCodeAt(D + 11) & 255) << 24, B = p.charCodeAt(D + 12) & 255 | (p.charCodeAt(D + 13) & 255) << 8 | (p.charCodeAt(D + 14) & 255) << 16 | (p.charCodeAt(D + 15) & 255) << 24, N = i(N, W), N = o(N, 15), N = i(N, z), v ^= N, v = o(v, 19), v += w, v = i(v, 5) + 1444728091, U = i(U, z), U = o(U, 16), U = i(U, j), w ^= U, w = o(w, 17), w += E, w = i(w, 5) + 197830471, O = i(O, j), O = o(O, 17), O = i(O, L), E ^= O, E = o(E, 15), E += _, E = i(E, 5) + 2530024501, B = i(B, L), B = o(B, 18), B = i(B, W), _ ^= B, _ = o(_, 13), _ += v, _ = i(_, 5) + 850148119;
|
|
67294
|
+
switch (N = 0, U = 0, O = 0, B = 0, m) {
|
|
67295
67295
|
case 15:
|
|
67296
|
-
B ^= p.charCodeAt(
|
|
67296
|
+
B ^= p.charCodeAt(D + 14) << 16;
|
|
67297
67297
|
case 14:
|
|
67298
|
-
B ^= p.charCodeAt(
|
|
67298
|
+
B ^= p.charCodeAt(D + 13) << 8;
|
|
67299
67299
|
case 13:
|
|
67300
|
-
B ^= p.charCodeAt(
|
|
67300
|
+
B ^= p.charCodeAt(D + 12), B = i(B, L), B = o(B, 18), B = i(B, W), _ ^= B;
|
|
67301
67301
|
case 12:
|
|
67302
|
-
O ^= p.charCodeAt(
|
|
67302
|
+
O ^= p.charCodeAt(D + 11) << 24;
|
|
67303
67303
|
case 11:
|
|
67304
|
-
O ^= p.charCodeAt(
|
|
67304
|
+
O ^= p.charCodeAt(D + 10) << 16;
|
|
67305
67305
|
case 10:
|
|
67306
|
-
O ^= p.charCodeAt(
|
|
67306
|
+
O ^= p.charCodeAt(D + 9) << 8;
|
|
67307
67307
|
case 9:
|
|
67308
|
-
O ^= p.charCodeAt(
|
|
67308
|
+
O ^= p.charCodeAt(D + 8), O = i(O, j), O = o(O, 17), O = i(O, L), E ^= O;
|
|
67309
67309
|
case 8:
|
|
67310
|
-
|
|
67310
|
+
U ^= p.charCodeAt(D + 7) << 24;
|
|
67311
67311
|
case 7:
|
|
67312
|
-
|
|
67312
|
+
U ^= p.charCodeAt(D + 6) << 16;
|
|
67313
67313
|
case 6:
|
|
67314
|
-
|
|
67314
|
+
U ^= p.charCodeAt(D + 5) << 8;
|
|
67315
67315
|
case 5:
|
|
67316
|
-
|
|
67316
|
+
U ^= p.charCodeAt(D + 4), U = i(U, z), U = o(U, 16), U = i(U, j), w ^= U;
|
|
67317
67317
|
case 4:
|
|
67318
|
-
N ^= p.charCodeAt(
|
|
67318
|
+
N ^= p.charCodeAt(D + 3) << 24;
|
|
67319
67319
|
case 3:
|
|
67320
|
-
N ^= p.charCodeAt(
|
|
67320
|
+
N ^= p.charCodeAt(D + 2) << 16;
|
|
67321
67321
|
case 2:
|
|
67322
|
-
N ^= p.charCodeAt(
|
|
67322
|
+
N ^= p.charCodeAt(D + 1) << 8;
|
|
67323
67323
|
case 1:
|
|
67324
|
-
N ^= p.charCodeAt(
|
|
67324
|
+
N ^= p.charCodeAt(D), N = i(N, W), N = o(N, 15), N = i(N, z), v ^= N;
|
|
67325
67325
|
}
|
|
67326
67326
|
return v ^= p.length, w ^= p.length, E ^= p.length, _ ^= p.length, v += w, v += E, v += _, w += v, E += v, _ += v, v = a(v), w = a(w), E = a(E), _ = a(_), v += w, v += E, v += _, w += v, E += v, _ += v, ("00000000" + (v >>> 0).toString(16)).slice(-8) + ("00000000" + (w >>> 0).toString(16)).slice(-8) + ("00000000" + (E >>> 0).toString(16)).slice(-8) + ("00000000" + (_ >>> 0).toString(16)).slice(-8);
|
|
67327
67327
|
}, s.x64.hash128 = function(p, g) {
|
|
67328
67328
|
p = p || "", g = g || 0;
|
|
67329
|
-
for (var m = p.length % 16, y = p.length - m, v = [0, g], w = [0, g], E = [0, 0], _ = [0, 0], N = [2277735313, 289559509],
|
|
67330
|
-
E = [p.charCodeAt(O + 4) & 255 | (p.charCodeAt(O + 5) & 255) << 8 | (p.charCodeAt(O + 6) & 255) << 16 | (p.charCodeAt(O + 7) & 255) << 24, p.charCodeAt(O) & 255 | (p.charCodeAt(O + 1) & 255) << 8 | (p.charCodeAt(O + 2) & 255) << 16 | (p.charCodeAt(O + 3) & 255) << 24], _ = [p.charCodeAt(O + 12) & 255 | (p.charCodeAt(O + 13) & 255) << 8 | (p.charCodeAt(O + 14) & 255) << 16 | (p.charCodeAt(O + 15) & 255) << 24, p.charCodeAt(O + 8) & 255 | (p.charCodeAt(O + 9) & 255) << 8 | (p.charCodeAt(O + 10) & 255) << 16 | (p.charCodeAt(O + 11) & 255) << 24], E = l(E, N), E = u(E, 31), E = l(E,
|
|
67329
|
+
for (var m = p.length % 16, y = p.length - m, v = [0, g], w = [0, g], E = [0, 0], _ = [0, 0], N = [2277735313, 289559509], U = [1291169091, 658871167], O = 0; O < y; O = O + 16)
|
|
67330
|
+
E = [p.charCodeAt(O + 4) & 255 | (p.charCodeAt(O + 5) & 255) << 8 | (p.charCodeAt(O + 6) & 255) << 16 | (p.charCodeAt(O + 7) & 255) << 24, p.charCodeAt(O) & 255 | (p.charCodeAt(O + 1) & 255) << 8 | (p.charCodeAt(O + 2) & 255) << 16 | (p.charCodeAt(O + 3) & 255) << 24], _ = [p.charCodeAt(O + 12) & 255 | (p.charCodeAt(O + 13) & 255) << 8 | (p.charCodeAt(O + 14) & 255) << 16 | (p.charCodeAt(O + 15) & 255) << 24, p.charCodeAt(O + 8) & 255 | (p.charCodeAt(O + 9) & 255) << 8 | (p.charCodeAt(O + 10) & 255) << 16 | (p.charCodeAt(O + 11) & 255) << 24], E = l(E, N), E = u(E, 31), E = l(E, U), v = h(v, E), v = u(v, 27), v = c(v, w), v = c(l(v, [0, 5]), [0, 1390208809]), _ = l(_, U), _ = u(_, 33), _ = l(_, N), w = h(w, _), w = u(w, 31), w = c(w, v), w = c(l(w, [0, 5]), [0, 944331445]);
|
|
67331
67331
|
switch (E = [0, 0], _ = [0, 0], m) {
|
|
67332
67332
|
case 15:
|
|
67333
67333
|
_ = h(_, d([0, p.charCodeAt(O + 14)], 48));
|
|
@@ -67342,7 +67342,7 @@ var R4 = { exports: {} };
|
|
|
67342
67342
|
case 10:
|
|
67343
67343
|
_ = h(_, d([0, p.charCodeAt(O + 9)], 8));
|
|
67344
67344
|
case 9:
|
|
67345
|
-
_ = h(_, [0, p.charCodeAt(O + 8)]), _ = l(_,
|
|
67345
|
+
_ = h(_, [0, p.charCodeAt(O + 8)]), _ = l(_, U), _ = u(_, 33), _ = l(_, N), w = h(w, _);
|
|
67346
67346
|
case 8:
|
|
67347
67347
|
E = h(E, d([0, p.charCodeAt(O + 7)], 56));
|
|
67348
67348
|
case 7:
|
|
@@ -67358,7 +67358,7 @@ var R4 = { exports: {} };
|
|
|
67358
67358
|
case 2:
|
|
67359
67359
|
E = h(E, d([0, p.charCodeAt(O + 1)], 8));
|
|
67360
67360
|
case 1:
|
|
67361
|
-
E = h(E, [0, p.charCodeAt(O)]), E = l(E, N), E = u(E, 31), E = l(E,
|
|
67361
|
+
E = h(E, [0, p.charCodeAt(O)]), E = l(E, N), E = u(E, 31), E = l(E, U), v = h(v, E);
|
|
67362
67362
|
}
|
|
67363
67363
|
return v = h(v, [0, p.length]), w = h(w, [0, p.length]), v = c(v, w), w = c(w, v), v = f(v), w = f(w), v = c(v, w), w = c(w, v), ("00000000" + (v[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (v[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (w[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (w[1] >>> 0).toString(16)).slice(-8);
|
|
67364
67364
|
}, t.exports && (e = t.exports = s), e.murmurHash3 = s;
|
|
@@ -68133,13 +68133,13 @@ const CI = {
|
|
|
68133
68133
|
W !== !1 && p(W), E(!0);
|
|
68134
68134
|
}
|
|
68135
68135
|
return B;
|
|
68136
|
-
},
|
|
68136
|
+
}, U = async () => {
|
|
68137
68137
|
if (g || !d || !u) return !1;
|
|
68138
68138
|
w(!0), E(!1), await l.ping();
|
|
68139
68139
|
const O = await dg({ cache: a, chainId: m, useCache: !1, params: [y] });
|
|
68140
68140
|
return E(!0), O !== !1 ? (p(O), {
|
|
68141
68141
|
getCommission: _,
|
|
68142
|
-
recheckValue:
|
|
68142
|
+
recheckValue: U,
|
|
68143
68143
|
value: parseInt(O),
|
|
68144
68144
|
updateValue: N,
|
|
68145
68145
|
status
|
|
@@ -68179,7 +68179,7 @@ const CI = {
|
|
|
68179
68179
|
return () => clearTimeout(O);
|
|
68180
68180
|
}, [d, m, u, y]), {
|
|
68181
68181
|
getCommission: _,
|
|
68182
|
-
recheckValue:
|
|
68182
|
+
recheckValue: U,
|
|
68183
68183
|
value: f,
|
|
68184
68184
|
updateValue: N,
|
|
68185
68185
|
status: g ? "error" : v ? "pending" : "success"
|
|
@@ -68244,14 +68244,14 @@ const AI = {
|
|
|
68244
68244
|
watch: g,
|
|
68245
68245
|
interval: m,
|
|
68246
68246
|
primaryId: y
|
|
68247
|
-
} = { ...AI, ...e }, v = Ph(), { address: w, isConnected: E } = kh(), _ = n(), [N,
|
|
68247
|
+
} = { ...AI, ...e }, v = Ph(), { address: w, isConnected: E } = kh(), _ = n(), [N, U] = Ys(s), O = i || w || Iw, B = !v.networks, W = l ? u ? !!(i || w) : !!w : !0, z = parseInt(_.chainId), j = t ? `${r}-${kn.x86.hash128(t)}` : `primary-${kn.x86.hash128(y)}`, L = kn.x86.hash128(`${f}`), D = [j, L, a, l, c, d, h], [b, x, T] = $h(E, B, z, O, p, g, m, o, ...D), k = async () => {
|
|
68248
68248
|
if (B || !E || !w) return !1;
|
|
68249
|
-
const R = await f1({ type: "counterWrite", address: w, params:
|
|
68249
|
+
const R = await f1({ type: "counterWrite", address: w, params: D });
|
|
68250
68250
|
if (!R) return R;
|
|
68251
68251
|
if (p) {
|
|
68252
68252
|
x(!0), T(!1), await v.ping();
|
|
68253
|
-
const $ = await Db({ cache: o, useCache: !1, params: [...
|
|
68254
|
-
$ !== !1 &&
|
|
68253
|
+
const $ = await Db({ cache: o, useCache: !1, params: [...D, O] });
|
|
68254
|
+
$ !== !1 && U($ || s), T(!0);
|
|
68255
68255
|
}
|
|
68256
68256
|
return R;
|
|
68257
68257
|
};
|
|
@@ -68260,69 +68260,79 @@ const AI = {
|
|
|
68260
68260
|
const R = setTimeout(async () => {
|
|
68261
68261
|
if (p) {
|
|
68262
68262
|
x(!0), T(!1), await v.ping();
|
|
68263
|
-
const q = await Db({ useCache: !0, cache: o, params: [...
|
|
68264
|
-
q !== !1 &&
|
|
68263
|
+
const q = await Db({ useCache: !0, cache: o, params: [...D, O] });
|
|
68264
|
+
q !== !1 && U(q || s), T(!0);
|
|
68265
68265
|
}
|
|
68266
68266
|
}, 100), $ = setInterval(async () => {
|
|
68267
68267
|
if (p && g) {
|
|
68268
68268
|
x(!0), T(!1), await v.ping();
|
|
68269
|
-
const q = await Db({ useCache: !1, cache: o, params: [...
|
|
68270
|
-
q !== !1 &&
|
|
68269
|
+
const q = await Db({ useCache: !1, cache: o, params: [...D, O] });
|
|
68270
|
+
q !== !1 && U(q || s), T(!0);
|
|
68271
68271
|
}
|
|
68272
68272
|
}, m);
|
|
68273
68273
|
return () => {
|
|
68274
68274
|
clearTimeout(R), clearInterval($);
|
|
68275
68275
|
};
|
|
68276
|
-
}, [E, B, O, s, z, o, p, g, m, ...
|
|
68276
|
+
}, [E, B, O, s, z, o, p, g, m, ...D]), zt(() => {
|
|
68277
68277
|
const R = setTimeout(v.ping, 100);
|
|
68278
68278
|
return () => clearTimeout(R);
|
|
68279
68279
|
}, [E, z, O]), zt(() => {
|
|
68280
68280
|
if (B) return;
|
|
68281
|
-
x(!0), T(!1),
|
|
68281
|
+
x(!0), T(!1), U(s);
|
|
68282
68282
|
const R = setTimeout(async () => {
|
|
68283
68283
|
if (p) {
|
|
68284
68284
|
x(!0), T(!1), await v.ping();
|
|
68285
|
-
const $ = await Db({ useCache: !0, cache: o, params: [...
|
|
68286
|
-
$ !== !1 &&
|
|
68285
|
+
const $ = await Db({ useCache: !0, cache: o, params: [...D, O] });
|
|
68286
|
+
$ !== !1 && U($ || s), T(!0);
|
|
68287
68287
|
}
|
|
68288
68288
|
}, 100);
|
|
68289
68289
|
return () => clearTimeout(R);
|
|
68290
|
-
}, [E, z, w, ...
|
|
68290
|
+
}, [E, z, w, ...D]), {
|
|
68291
68291
|
value: W ? N : s,
|
|
68292
68292
|
updateValue: k,
|
|
68293
68293
|
status: B ? "error" : W ? b ? "pending" : "success" : "pending",
|
|
68294
68294
|
getCommission: () => q6({ id: j, address: w })
|
|
68295
68295
|
};
|
|
68296
68296
|
}, Lf = async ({ cache: t, useCache: e = !0, params: n }) => {
|
|
68297
|
-
const { JsonRpcProvider: r, Wallet: s, Contract: i } = window.REDSTONE, o = n[8], a = n[3];
|
|
68297
|
+
const { JsonRpcProvider: r, Wallet: s, Contract: i } = window.REDSTONE, o = n[8], a = n[3], c = n[4];
|
|
68298
68298
|
if (!o) return !1;
|
|
68299
|
-
const
|
|
68300
|
-
let
|
|
68301
|
-
for (let
|
|
68302
|
-
const
|
|
68299
|
+
const l = [];
|
|
68300
|
+
let u = 0;
|
|
68301
|
+
for (let f = 0; f < Xe.blockChainsData.length; f++) {
|
|
68302
|
+
const p = {
|
|
68303
68303
|
text: "",
|
|
68304
68304
|
timestamp: "0"
|
|
68305
|
-
},
|
|
68306
|
-
|
|
68307
|
-
|
|
68308
|
-
|
|
68309
|
-
|
|
68310
|
-
|
|
68311
|
-
|
|
68312
|
-
},
|
|
68313
|
-
|
|
68314
|
-
|
|
68315
|
-
|
|
68316
|
-
|
|
68317
|
-
|
|
68318
|
-
|
|
68319
|
-
|
|
68320
|
-
|
|
68321
|
-
|
|
68322
|
-
|
|
68305
|
+
}, g = `${n.join("-")}-${f}`, m = await caches.open("redstone-cache");
|
|
68306
|
+
let y = null;
|
|
68307
|
+
try {
|
|
68308
|
+
y = await m.match(g).then((v) => v.json());
|
|
68309
|
+
} catch {
|
|
68310
|
+
y = await window.REDSTONE.QUEUE[f].add(g, e, async () => {
|
|
68311
|
+
try {
|
|
68312
|
+
const { receiver: w, publicRpc: E } = Xe.blockChainsData[f], _ = s.createRandom(), N = new r(E), U = new s(_.privateKey, N), O = new i(w, Xe.ABI.receiver, U), B = await O.noteRead(...n), W = JSON.parse(B);
|
|
68313
|
+
return {
|
|
68314
|
+
data: {
|
|
68315
|
+
text: (W == null ? void 0 : W.text) ?? "",
|
|
68316
|
+
timestamp: (W == null ? void 0 : W.timestamp) ?? "0"
|
|
68317
|
+
},
|
|
68318
|
+
cache: t
|
|
68319
|
+
};
|
|
68320
|
+
} catch (w) {
|
|
68321
|
+
return console.log(w), {
|
|
68322
|
+
data: !1,
|
|
68323
|
+
cache: 0
|
|
68324
|
+
};
|
|
68325
|
+
}
|
|
68326
|
+
}, p);
|
|
68327
|
+
}
|
|
68328
|
+
if (y === !1 && u++, c && y !== !1 && y.timestamp !== "0") {
|
|
68329
|
+
const v = new Response(JSON.stringify(y), { headers: { "Content-Type": "application/json" } });
|
|
68330
|
+
await m.put(g, v);
|
|
68331
|
+
}
|
|
68332
|
+
l.push(y);
|
|
68323
68333
|
}
|
|
68324
|
-
return (a ?
|
|
68325
|
-
(
|
|
68334
|
+
return (a ? u > 0 : u === Xe.blockChainsData.length) ? !1 : l.filter((f) => f).sort(
|
|
68335
|
+
(f, p) => Number(p.timestamp) - Number(f.timestamp)
|
|
68326
68336
|
)[0].text;
|
|
68327
68337
|
};
|
|
68328
68338
|
window.REDSTONE.QUEUE || (window.REDSTONE.QUEUE = Array(Xe.blockChainsData.length).fill(!0).map(() => new du()));
|
|
@@ -68355,13 +68365,13 @@ const SI = {
|
|
|
68355
68365
|
copyId: p,
|
|
68356
68366
|
load: g,
|
|
68357
68367
|
primaryId: m
|
|
68358
|
-
} = { ...SI, ...e }, y = Ph(), { address: v, isConnected: w } = kh(), E = n(), [_, N] = Ys(s),
|
|
68368
|
+
} = { ...SI, ...e }, y = Ph(), { address: v, isConnected: w } = kh(), E = n(), [_, N] = Ys(s), U = i || v || Iw, O = !y.networks, B = l ? u ? !!(i || v) : !!v : !0, W = parseInt(E.chainId), z = t ? `${r}-${kn.x86.hash128(t)}` : `primary-${kn.x86.hash128(m)}`, j = kn.x86.hash128(`${p}`), L = [z, j, a, l, c, d, h, f], [D, b, x] = $h(w, O, W, U, g, o, ...L), T = async (R = !1) => {
|
|
68359
68369
|
if (O || !w || !v) return !1;
|
|
68360
68370
|
const $ = await f1({ type: "noteWrite", address: v, params: [...L, (R || "").toString()] });
|
|
68361
68371
|
if (!$) return $;
|
|
68362
68372
|
if (g) {
|
|
68363
68373
|
b(!0), x(!1), await y.ping();
|
|
68364
|
-
const q = await Lf({ cache: o, useCache: !1, params: [...L,
|
|
68374
|
+
const q = await Lf({ cache: o, useCache: !1, params: [...L, U] });
|
|
68365
68375
|
q !== !1 && N(q), x(!0);
|
|
68366
68376
|
}
|
|
68367
68377
|
return $;
|
|
@@ -68371,21 +68381,21 @@ const SI = {
|
|
|
68371
68381
|
const R = setTimeout(async () => {
|
|
68372
68382
|
if (g) {
|
|
68373
68383
|
b(!0), x(!1), await y.ping();
|
|
68374
|
-
const $ = await Lf({ cache: o, useCache: !0, params: [...L,
|
|
68384
|
+
const $ = await Lf({ cache: o, useCache: !0, params: [...L, U] });
|
|
68375
68385
|
$ !== !1 && N($), x(!0);
|
|
68376
68386
|
}
|
|
68377
68387
|
}, 100);
|
|
68378
68388
|
return () => clearTimeout(R);
|
|
68379
|
-
}, [w, O,
|
|
68389
|
+
}, [w, O, U, W, o, g, ...L]), zt(() => {
|
|
68380
68390
|
const R = setTimeout(y.ping, 100);
|
|
68381
68391
|
return () => clearTimeout(R);
|
|
68382
|
-
}, [w, W,
|
|
68392
|
+
}, [w, W, U]), zt(() => {
|
|
68383
68393
|
if (O) return;
|
|
68384
68394
|
b(!0), x(!1), N(s);
|
|
68385
68395
|
const R = setTimeout(async () => {
|
|
68386
68396
|
if (g) {
|
|
68387
68397
|
b(!0), x(!1), await y.ping();
|
|
68388
|
-
const $ = await Lf({ cache: o, useCache: !0, params: [...L,
|
|
68398
|
+
const $ = await Lf({ cache: o, useCache: !0, params: [...L, U] });
|
|
68389
68399
|
$ !== !1 && N($), x(!0);
|
|
68390
68400
|
}
|
|
68391
68401
|
}, 100);
|
|
@@ -68393,7 +68403,7 @@ const SI = {
|
|
|
68393
68403
|
}, [w, W, v, ...L]), {
|
|
68394
68404
|
value: B ? _ || s : "",
|
|
68395
68405
|
updateValue: T,
|
|
68396
|
-
status: O && g ? "error" : B ?
|
|
68406
|
+
status: O && g ? "error" : B ? D ? "pending" : "success" : "pending",
|
|
68397
68407
|
getCommission: () => q6({ id: z, address: v })
|
|
68398
68408
|
};
|
|
68399
68409
|
};
|
|
@@ -68431,7 +68441,7 @@ const _I = {
|
|
|
68431
68441
|
watch: m,
|
|
68432
68442
|
interval: y,
|
|
68433
68443
|
primaryId: v
|
|
68434
|
-
} = { ..._I, ...e }, w = Ph(), { address: E, isConnected: _ } = kh(), N = n(), [
|
|
68444
|
+
} = { ..._I, ...e }, w = Ph(), { address: E, isConnected: _ } = kh(), N = n(), [U, O] = Ys(s), B = i || E || Iw, W = !w.networks, z = l ? u ? !!(i || E) : !!E : !0, j = parseInt(N.chainId), L = t ? `${r}-${kn.x86.hash128(t)}` : `primary-${kn.x86.hash128(v)}`, D = kn.x86.hash128(`${p}`), b = [L, D, a, l, c, d, h, f], [x, T, k] = $h(_, W, j, B, g, m, y, o, ...b);
|
|
68435
68445
|
return zt(() => {
|
|
68436
68446
|
if (W) return;
|
|
68437
68447
|
const $ = setTimeout(async () => {
|
|
@@ -68465,7 +68475,7 @@ const _I = {
|
|
|
68465
68475
|
}, 100);
|
|
68466
68476
|
return () => clearTimeout($);
|
|
68467
68477
|
}, [_, j, E, ...b]), {
|
|
68468
|
-
value: z ?
|
|
68478
|
+
value: z ? U || s : "",
|
|
68469
68479
|
status: W ? "error" : z ? x ? "pending" : "success" : "pending"
|
|
68470
68480
|
};
|
|
68471
68481
|
}, Ub = async ({ cache: t, useCache: e = !0, params: n }) => {
|
|
@@ -68489,31 +68499,41 @@ const _I = {
|
|
|
68489
68499
|
}
|
|
68490
68500
|
return o;
|
|
68491
68501
|
}, Qu = async ({ chainIndex: t, useCache: e = !0, cache: n, params: r }) => {
|
|
68492
|
-
const { JsonRpcProvider: s, Wallet: i, Contract: o } = window.REDSTONE, a = r[9], { receiver:
|
|
68502
|
+
const { JsonRpcProvider: s, Wallet: i, Contract: o } = window.REDSTONE, a = r[9], c = r[4], { receiver: l, publicRpc: u, network: { id: d } } = Xe.blockChainsData[t], h = {
|
|
68493
68503
|
address: "",
|
|
68494
68504
|
chainId: 0,
|
|
68495
68505
|
index: 0,
|
|
68496
68506
|
text: "",
|
|
68497
68507
|
timestamp: "0"
|
|
68498
|
-
},
|
|
68499
|
-
|
|
68500
|
-
|
|
68501
|
-
|
|
68502
|
-
|
|
68503
|
-
|
|
68504
|
-
|
|
68505
|
-
|
|
68506
|
-
|
|
68507
|
-
|
|
68508
|
-
|
|
68509
|
-
|
|
68510
|
-
|
|
68511
|
-
|
|
68512
|
-
|
|
68513
|
-
|
|
68514
|
-
}
|
|
68515
|
-
|
|
68516
|
-
|
|
68508
|
+
}, f = `${r.join("-")}-${t}-${a}`, p = await caches.open("redstone-cache");
|
|
68509
|
+
let g = null;
|
|
68510
|
+
try {
|
|
68511
|
+
g = await p.match(f).then((m) => m.json());
|
|
68512
|
+
} catch {
|
|
68513
|
+
g = await window.REDSTONE.QUEUE[t].add(f, e, async () => {
|
|
68514
|
+
try {
|
|
68515
|
+
const y = i.createRandom(), v = new s(u), w = new i(y.privateKey, v), E = new o(l, Xe.ABI.receiver, w), _ = await E.listRowRead(...r), N = JSON.parse(_.toString());
|
|
68516
|
+
return {
|
|
68517
|
+
data: {
|
|
68518
|
+
...N,
|
|
68519
|
+
chainId: d,
|
|
68520
|
+
index: parseInt(N.index)
|
|
68521
|
+
},
|
|
68522
|
+
cache: n
|
|
68523
|
+
};
|
|
68524
|
+
} catch (y) {
|
|
68525
|
+
return console.log(y), {
|
|
68526
|
+
data: h,
|
|
68527
|
+
cache: 0
|
|
68528
|
+
};
|
|
68529
|
+
}
|
|
68530
|
+
}, h);
|
|
68531
|
+
}
|
|
68532
|
+
if (c && g !== !1 && g.timestamp !== "0") {
|
|
68533
|
+
const m = new Response(JSON.stringify(g), { headers: { "Content-Type": "application/json" } });
|
|
68534
|
+
await p.put(f, m);
|
|
68535
|
+
}
|
|
68536
|
+
return g;
|
|
68517
68537
|
};
|
|
68518
68538
|
window.REDSTONE.QUEUE || (window.REDSTONE.QUEUE = Array(Xe.blockChainsData.length).fill(!0).map(() => new du()));
|
|
68519
68539
|
const II = {
|
|
@@ -68547,8 +68567,8 @@ const II = {
|
|
|
68547
68567
|
watch: g,
|
|
68548
68568
|
interval: m,
|
|
68549
68569
|
primaryId: y
|
|
68550
|
-
} = { ...II, ...e }, v = Ph(), { address: w, isConnected: E } = kh(), _ = n(), [N,
|
|
68551
|
-
|
|
68570
|
+
} = { ...II, ...e }, v = Ph(), { address: w, isConnected: E } = kh(), _ = n(), [N, U] = Ys(Array(Xe.blockChainsData.length).fill(0)), [O, B] = Ys(Array(Xe.blockChainsData.length).fill([])), W = ev(() => O.flat().sort((de, Ce) => de.timestamp - Ce.timestamp), [O]), z = N.reduce((de, Ce) => de + Ce, 0), j = s || w || Iw, L = p && W.length === z, D = !v.networks, b = c ? l ? !!(s || w) : !!w : !0, x = parseInt(_.chainId), T = t ? `${r}-${kn.x86.hash128(t)}` : `primary-${kn.x86.hash128(y)}`, k = kn.x86.hash128(`${f}`), R = [T, k, o, c, a, u, d, h], [$, q, G] = $h(E, D, L, W, N, x, j, p, g, m, i, ...R), re = (de) => {
|
|
68571
|
+
U(
|
|
68552
68572
|
(Ce) => Bf(
|
|
68553
68573
|
Ce,
|
|
68554
68574
|
Ce.map(
|
|
@@ -68581,7 +68601,7 @@ const II = {
|
|
|
68581
68601
|
)
|
|
68582
68602
|
);
|
|
68583
68603
|
}, ne = async ({ index: de, chainId: Ce }, he) => {
|
|
68584
|
-
if (
|
|
68604
|
+
if (D || a || !E || !w || Ce !== x) return !1;
|
|
68585
68605
|
const Ee = await f1({ type: "listRowUpdate", address: w, params: [...R, de.toString(), (he || "").toString()] });
|
|
68586
68606
|
if (!Ee) return Ee;
|
|
68587
68607
|
if (p) {
|
|
@@ -68593,7 +68613,7 @@ const II = {
|
|
|
68593
68613
|
}
|
|
68594
68614
|
return Ee;
|
|
68595
68615
|
}, ve = async (de) => {
|
|
68596
|
-
if (
|
|
68616
|
+
if (D || !E || !w) return !1;
|
|
68597
68617
|
const Ce = await f1({ type: "listRowWrite", address: w, params: [...R, (de || "").toString()] });
|
|
68598
68618
|
if (!Ce) return Ce;
|
|
68599
68619
|
if (p) {
|
|
@@ -68604,7 +68624,7 @@ const II = {
|
|
|
68604
68624
|
return Ce;
|
|
68605
68625
|
};
|
|
68606
68626
|
return zt(() => {
|
|
68607
|
-
if (
|
|
68627
|
+
if (D) return;
|
|
68608
68628
|
const de = setTimeout(async () => {
|
|
68609
68629
|
if (p) {
|
|
68610
68630
|
q(!0), G(!1), await v.ping();
|
|
@@ -68621,8 +68641,8 @@ const II = {
|
|
|
68621
68641
|
return () => {
|
|
68622
68642
|
clearTimeout(de), clearInterval(Ce);
|
|
68623
68643
|
};
|
|
68624
|
-
}, [E,
|
|
68625
|
-
if (
|
|
68644
|
+
}, [E, D, j, x, i, N, p, g, ...R]), zt(() => {
|
|
68645
|
+
if (D) return;
|
|
68626
68646
|
const de = setTimeout(async () => {
|
|
68627
68647
|
await Promise.all(
|
|
68628
68648
|
N.map(async (he, Ee) => {
|
|
@@ -68660,12 +68680,12 @@ const II = {
|
|
|
68660
68680
|
return () => {
|
|
68661
68681
|
clearTimeout(de), clearInterval(Ce);
|
|
68662
68682
|
};
|
|
68663
|
-
}, [E,
|
|
68683
|
+
}, [E, D, L, N, x, j, p, g, m, i, ...R]), zt(() => {
|
|
68664
68684
|
const de = setTimeout(v.ping, 100);
|
|
68665
68685
|
return () => clearTimeout(de);
|
|
68666
68686
|
}, [E, x, j]), zt(() => {
|
|
68667
|
-
if (
|
|
68668
|
-
q(!0), G(!1),
|
|
68687
|
+
if (D) return;
|
|
68688
|
+
q(!0), G(!1), U(Array(Xe.blockChainsData.length).fill(0)), B(Array(Xe.blockChainsData.length).fill([]));
|
|
68669
68689
|
const de = setTimeout(async () => {
|
|
68670
68690
|
await Promise.all(
|
|
68671
68691
|
N.map(async (Ce, he) => {
|
|
@@ -68690,7 +68710,7 @@ const II = {
|
|
|
68690
68710
|
value: b ? W.filter(({ isDelete: de }) => !de) : [],
|
|
68691
68711
|
addValue: ve,
|
|
68692
68712
|
updateValue: ne,
|
|
68693
|
-
status:
|
|
68713
|
+
status: D && p ? "error" : b && p ? $ ? "pending" : "success" : "pending",
|
|
68694
68714
|
getCommission: () => q6({ id: T, address: w })
|
|
68695
68715
|
};
|
|
68696
68716
|
};
|
|
@@ -68726,7 +68746,7 @@ const TI = {
|
|
|
68726
68746
|
watch: m,
|
|
68727
68747
|
interval: y,
|
|
68728
68748
|
primaryId: v
|
|
68729
|
-
} = { ...TI, ...n }, { chainId: w, index: E } = e, _ = Ph(), { address: N, isConnected:
|
|
68749
|
+
} = { ...TI, ...n }, { chainId: w, index: E } = e, _ = Ph(), { address: N, isConnected: U } = kh(), O = r(), [B, W] = Ys(null), z = i || N || Iw, j = !_.networks, L = l ? u ? !!(i || N) : !!N : !0, D = parseInt(O.chainId), b = t ? `${s}-${kn.x86.hash128(t)}` : `primary-${kn.x86.hash128(v)}`, x = kn.x86.hash128(`${p}`), T = [b, x, a, l, c, d, h, f], [k, R, $] = $h(U, j, D, z, g, m, y, o, ...T);
|
|
68730
68750
|
return zt(() => {
|
|
68731
68751
|
if (j) return;
|
|
68732
68752
|
const q = setTimeout(async () => {
|
|
@@ -68743,7 +68763,7 @@ const TI = {
|
|
|
68743
68763
|
return Bf(ne, {
|
|
68744
68764
|
...ee,
|
|
68745
68765
|
isDelete: ee.text === "",
|
|
68746
|
-
hasEdit: c ? !1 :
|
|
68766
|
+
hasEdit: c ? !1 : U ? w === ee.chainId ? ((ve = ee.address) == null ? void 0 : ve.toLowerCase()) === (N == null ? void 0 : N.toLowerCase()) : !1 : null
|
|
68747
68767
|
});
|
|
68748
68768
|
}), $(!0);
|
|
68749
68769
|
}
|
|
@@ -68761,7 +68781,7 @@ const TI = {
|
|
|
68761
68781
|
return Bf(ne, {
|
|
68762
68782
|
...ee,
|
|
68763
68783
|
isDelete: ee.text === "",
|
|
68764
|
-
hasEdit: c ? !1 :
|
|
68784
|
+
hasEdit: c ? !1 : U ? w === ee.chainId ? ((ve = ee.address) == null ? void 0 : ve.toLowerCase()) === (N == null ? void 0 : N.toLowerCase()) : !1 : null
|
|
68765
68785
|
});
|
|
68766
68786
|
}), $(!0);
|
|
68767
68787
|
}
|
|
@@ -68769,10 +68789,10 @@ const TI = {
|
|
|
68769
68789
|
return () => {
|
|
68770
68790
|
clearTimeout(q), clearInterval(G);
|
|
68771
68791
|
};
|
|
68772
|
-
}, [
|
|
68792
|
+
}, [U, j, w, E, D, z, g, m, y, o, ...T]), zt(() => {
|
|
68773
68793
|
const q = setTimeout(_.ping, 100);
|
|
68774
68794
|
return () => clearTimeout(q);
|
|
68775
|
-
}, [
|
|
68795
|
+
}, [U, D, z]), zt(() => {
|
|
68776
68796
|
if (j) return;
|
|
68777
68797
|
R(!0), $(!1), W(null);
|
|
68778
68798
|
const q = setTimeout(async () => {
|
|
@@ -68789,13 +68809,13 @@ const TI = {
|
|
|
68789
68809
|
return Bf(ee, {
|
|
68790
68810
|
...re,
|
|
68791
68811
|
isDelete: re.text === "",
|
|
68792
|
-
hasEdit: c ? !1 :
|
|
68812
|
+
hasEdit: c ? !1 : U ? w === re.chainId ? ((ne = re.address) == null ? void 0 : ne.toLowerCase()) === (N == null ? void 0 : N.toLowerCase()) : !1 : null
|
|
68793
68813
|
});
|
|
68794
68814
|
}), $(!0);
|
|
68795
68815
|
}
|
|
68796
68816
|
}, 100);
|
|
68797
68817
|
return () => clearTimeout(q);
|
|
68798
|
-
}, [
|
|
68818
|
+
}, [U, D, N, ...T]), {
|
|
68799
68819
|
value: L ? B : null,
|
|
68800
68820
|
status: j ? "error" : L ? k ? "pending" : "success" : "pending"
|
|
68801
68821
|
};
|