@prosopo/procaptcha-bundle 2.5.3 → 2.5.5

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.
Files changed (60) hide show
  1. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
  2. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js +15 -17
  3. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
  4. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +23 -27
  5. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -1
  6. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +2 -2
  7. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  8. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +4 -7
  9. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -1
  10. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +2 -2
  11. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -1
  12. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +9 -4
  13. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -1
  14. package/dist/bundle/ProcaptchaWidget-CCSN3Dxj.js +636 -0
  15. package/dist/bundle/{ProcaptchaWidget-Dnwno-4N.js → ProcaptchaWidget-Dfex8hc8.js} +4 -4
  16. package/dist/bundle/{asU8a-JliaME7-.js → asU8a-CAsEnbuP.js} +1 -1
  17. package/dist/bundle/{bip39-CFjno8fK.js → bip39-DCaMcFzo.js} +2 -2
  18. package/dist/bundle/{captchaComponentProvider-dcMua0p9.js → captchaComponentProvider-Dm44AMrY.js} +23 -18
  19. package/dist/bundle/captchaRenderer-BBodRhQu.js +70 -0
  20. package/dist/bundle/{emotion-element-5486c51c.browser.esm-Bywq83R5.js → emotion-element-5486c51c.browser.esm-CQHFV-dS.js} +711 -746
  21. package/dist/bundle/{fp.esm-C0kLYOiJ.js → fp.esm-DYWeNGcH.js} +17 -0
  22. package/dist/bundle/{hash-CtL1HOjf.js → hash-D-64Vz5z.js} +1 -1
  23. package/dist/bundle/{captchaRenderer-D-du50M4.js → index-9I1Aae33.js} +1293 -1355
  24. package/dist/bundle/index-DCHEbWAs.js +1242 -0
  25. package/dist/bundle/{index-DcG_c-Na.js → index-DkQ4njKa.js} +12 -12
  26. package/dist/bundle/{index-BTlHNFX8.js → index-DxswvPTy.js} +285 -183
  27. package/dist/bundle/{index-BMjJnq60.js → index-nNwZuute.js} +252 -252
  28. package/dist/bundle/index.d.ts.map +1 -1
  29. package/dist/bundle/locales/de/translation.json +55 -405
  30. package/dist/bundle/locales/en/translation.json +55 -405
  31. package/dist/bundle/locales/es/translation.json +55 -405
  32. package/dist/bundle/locales/fr/translation.json +55 -405
  33. package/dist/bundle/locales/it/translation.json +55 -405
  34. package/dist/bundle/locales/pt/translation.json +55 -405
  35. package/dist/bundle/locales/pt-BR/translation.json +55 -405
  36. package/dist/bundle/procaptcha.bundle.js +1 -1
  37. package/dist/bundle/{useTranslation-7b6JJ18N.js → useTranslation-CEt2t9kE.js} +1 -1
  38. package/dist/bundle/util/captcha/captchaRenderer.d.ts +2 -2
  39. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  40. package/dist/bundle/util/widgetFactory.d.ts +2 -2
  41. package/dist/bundle/util/widgetFactory.d.ts.map +1 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +15 -17
  44. package/dist/index.js.map +1 -1
  45. package/dist/tests/util/renderLogic.test.js +23 -27
  46. package/dist/tests/util/renderLogic.test.js.map +1 -1
  47. package/dist/util/captcha/captchaRenderer.d.ts +2 -2
  48. package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
  49. package/dist/util/captcha/captchaRenderer.js +4 -7
  50. package/dist/util/captcha/captchaRenderer.js.map +1 -1
  51. package/dist/util/widgetFactory.d.ts +2 -2
  52. package/dist/util/widgetFactory.d.ts.map +1 -1
  53. package/dist/util/widgetFactory.js +9 -4
  54. package/dist/util/widgetFactory.js.map +1 -1
  55. package/package.json +20 -14
  56. package/stats.html +1 -1
  57. package/vite.config.ts +18 -3
  58. package/vite.serve.config.ts +24 -0
  59. package/dist/bundle/ProcaptchaWidget-BlWWnPeB.js +0 -615
  60. package/dist/bundle/index-B8oMghZ3.js +0 -1120
@@ -1,20 +1,20 @@
1
1
  var go = Object.defineProperty;
2
2
  var mo = (t, e, r) => e in t ? go(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var Kt = (t, e, r) => mo(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { x as hi, s as ee, r as ci, d as po, f as b0, g as yo, h as vo, H as bo, n as Ft, u as Ve, i as Xe, b as je, e as kn, t as xo, j as Eo, o as Mo, k as _o, l as G } from "./toU8a-BWKf-2UU.js";
5
- import { b as Yr, B as W, c as Se, d as te, u as V, R as Bo, e as So, f as he, g as oe, j as Ht, i as Vt, s as Ao, k as Io, l as ko, m as Uo, n as No, o as Ro, p as Oo, q as Lo, r as To, v as $o, t as qo, x as Po, y as Co, z as Zo, A as Do, C as Ho, D as Vo, E as zo, F as Yo, G as Xo, H as jo, I as Ko, J as Go, K as Wo, L as Jo, M as Qo, N as Fo, O as ts, P as es, Q as rs } from "./hash-CtL1HOjf.js";
6
- import { g as ns, c as is } from "./_commonjsHelpers-DaMA6jEr.js";
3
+ var jt = (t, e, r) => mo(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { x as ci, s as ee, r as li, d as po, f as b0, g as yo, h as vo, H as bo, n as Ft, u as Ve, i as Xe, b as Ke, e as Un, t as xo, j as Eo, o as Mo, k as _o, l as G } from "./toU8a-BWKf-2UU.js";
5
+ import { b as Yr, B as W, c as Se, d as te, u as V, R as Bo, e as So, f as he, g as oe, j as Ht, i as Vt, s as Ao, k as Io, l as ko, m as Uo, n as No, o as Ro, p as Oo, q as Lo, r as To, v as $o, t as qo, x as Po, y as Co, z as Zo, A as Do, C as Ho, D as Vo, E as zo, F as Yo, G as Xo, H as Ko, I as jo, J as Go, K as Wo, L as Jo, M as Qo, N as Fo, O as ts, P as es, Q as rs } from "./hash-D-64Vz5z.js";
6
+ import { g as ns } from "./_commonjsHelpers-DaMA6jEr.js";
7
7
  import { s as rr } from "./sha256-Cxc9Hrlx.js";
8
- import { h as li, s as ui, m as os, v as ss, a as Un, p as fs, b as di } from "./bip39-CFjno8fK.js";
9
- import { a as wi } from "./asU8a-JliaME7-.js";
8
+ import { h as ui, s as di, m as is, v as os, a as Nn, p as ss, b as wi } from "./bip39-DCaMcFzo.js";
9
+ import { a as gi } from "./asU8a-CAsEnbuP.js";
10
10
  import { o as on } from "./spread-DEmVz7RJ.js";
11
- import { p as Ae } from "./emotion-element-5486c51c.browser.esm-Bywq83R5.js";
12
- const as = { name: "@polkadot/util", path: import.meta && import.meta.url ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf("/") + 1) : "auto", type: "esm", version: "12.6.2" }, hs = "POLKADOTJS_DISABLE_ESM_CJS_WARNING";
13
- function cs(t) {
14
- const e = hi;
11
+ import { m as Ae } from "./emotion-element-5486c51c.browser.esm-CQHFV-dS.js";
12
+ const fs = { name: "@polkadot/util", path: import.meta && import.meta.url ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf("/") + 1) : "auto", type: "esm", version: "12.6.2" }, as = "POLKADOTJS_DISABLE_ESM_CJS_WARNING";
13
+ function hs(t) {
14
+ const e = ci;
15
15
  return e.__polkadotjs || (e.__polkadotjs = {}), e.__polkadotjs[t] || (e.__polkadotjs[t] = []), e.__polkadotjs[t];
16
16
  }
17
- function ls(t, e) {
17
+ function cs(t, e) {
18
18
  if (t)
19
19
  return t;
20
20
  if (Yr(e))
@@ -25,18 +25,18 @@ function ls(t, e) {
25
25
  }
26
26
  return e || "";
27
27
  }
28
- function us({ name: t, path: e, type: r, version: o }, c, i = []) {
28
+ function ls({ name: t, path: e, type: r, version: o }, c, i = []) {
29
29
  var E, M;
30
30
  if (!t.startsWith("@polkadot"))
31
31
  throw new Error(`Invalid package descriptor ${t}`);
32
- const w = cs(t);
33
- w.push({ path: ls(e, c), type: r, version: o });
34
- const d = w.every((U) => U.version === o), y = ((M = (E = hi.process) == null ? void 0 : E.env) == null ? void 0 : M[hs]) === "1";
32
+ const w = hs(t);
33
+ w.push({ path: cs(e, c), type: r, version: o });
34
+ const d = w.every((U) => U.version === o), y = ((M = (E = ci.process) == null ? void 0 : E.env) == null ? void 0 : M[as]) === "1";
35
35
  w.length !== 1 && !(y && d) || i.filter((U) => U && U.version !== o);
36
36
  }
37
- const Ke = /* @__PURE__ */ W(0), Ge = /* @__PURE__ */ W(1);
37
+ const je = /* @__PURE__ */ W(0), Ge = /* @__PURE__ */ W(1);
38
38
  Number.MAX_SAFE_INTEGER;
39
- const Nn = W(256), Rn = W(256 * 256), ds = W("0x10000000000000000");
39
+ const Rn = W(256), On = W(256 * 256), us = W("0x10000000000000000");
40
40
  function Xr(t, { isLe: e = !0, isNegative: r = !1 } = {}) {
41
41
  e || (t = t.slice().reverse());
42
42
  const o = t.length;
@@ -57,8 +57,8 @@ function Xr(t, { isLe: e = !0, isNegative: r = !1 } = {}) {
57
57
  let w = W(0);
58
58
  const d = o % 2;
59
59
  for (let y = o - 2; y >= d; y -= 2)
60
- w = w * Rn + W(i.getUint16(y, !0) ^ 65535);
61
- return d && (w = w * Nn + W(t[0] ^ 255)), w * -Ge - Ge;
60
+ w = w * On + W(i.getUint16(y, !0) ^ 65535);
61
+ return d && (w = w * Rn + W(t[0] ^ 255)), w * -Ge - Ge;
62
62
  }
63
63
  switch (o) {
64
64
  case 0:
@@ -75,20 +75,20 @@ function Xr(t, { isLe: e = !0, isNegative: r = !1 } = {}) {
75
75
  case 8:
76
76
  return c.getBigUint64(0, !0);
77
77
  case 16:
78
- return c.getBigUint64(8, !0) * ds + c.getBigUint64(0, !0);
78
+ return c.getBigUint64(8, !0) * us + c.getBigUint64(0, !0);
79
79
  default: {
80
80
  let i = W(0);
81
81
  const w = o % 2;
82
82
  for (let d = o - 2; d >= w; d -= 2)
83
- i = i * Rn + W(c.getUint16(d, !0));
84
- return w && (i = i * Nn + W(t[0])), i;
83
+ i = i * On + W(c.getUint16(d, !0));
84
+ return w && (i = i * Rn + W(t[0])), i;
85
85
  }
86
86
  }
87
87
  }
88
- function ws(t, { isLe: e = !1, isNegative: r = !1 } = {}) {
88
+ function ds(t, { isLe: e = !1, isNegative: r = !1 } = {}) {
89
89
  return !t || t === "0x" ? W(0) : Xr(Se(t), { isLe: e, isNegative: r });
90
90
  }
91
- var gi = { exports: {} };
91
+ var sn = { exports: {} }, ws = sn.exports;
92
92
  (function(t) {
93
93
  (function(e, r) {
94
94
  function o(p, n) {
@@ -407,7 +407,7 @@ var gi = { exports: {} };
407
407
  }, i.prototype._zeroBits = function(n) {
408
408
  if (n === 0) return 26;
409
409
  var f = n, a = 0;
410
- return f & 8191 || (a += 13, f >>>= 13), f & 127 || (a += 7, f >>>= 7), f & 15 || (a += 4, f >>>= 4), f & 3 || (a += 2, f >>>= 2), f & 1 || a++, a;
410
+ return (f & 8191) === 0 && (a += 13, f >>>= 13), (f & 127) === 0 && (a += 7, f >>>= 7), (f & 15) === 0 && (a += 4, f >>>= 4), (f & 3) === 0 && (a += 2, f >>>= 2), (f & 1) === 0 && a++, a;
411
411
  }, i.prototype.bitLength = function() {
412
412
  var n = this.words[this.length - 1], f = this._countBits(n);
413
413
  return (this.length - 1) * 26 + f;
@@ -542,15 +542,15 @@ var gi = { exports: {} };
542
542
  f.words[0] = b;
543
543
  for (var s = 1; s < a; s++) {
544
544
  for (var g = u >>> 26, B = u & 67108863, I = Math.min(s, n.length - 1), N = Math.max(0, s - p.length + 1); N <= I; N++) {
545
- var j = s - N | 0;
546
- h = p.words[j] | 0, l = n.words[N] | 0, m = h * l + B, g += m / 67108864 | 0, B = m & 67108863;
545
+ var K = s - N | 0;
546
+ h = p.words[K] | 0, l = n.words[N] | 0, m = h * l + B, g += m / 67108864 | 0, B = m & 67108863;
547
547
  }
548
548
  f.words[s] = B | 0, u = g | 0;
549
549
  }
550
550
  return u !== 0 ? f.words[s] = u | 0 : f.length--, f._strip();
551
551
  }
552
552
  var L = function(n, f, a) {
553
- var h = n.words, l = f.words, m = a.words, b = 0, u, s, g, B = h[0] | 0, I = B & 8191, N = B >>> 13, j = h[1] | 0, H = j & 8191, z = j >>> 13, $t = h[2] | 0, X = $t & 8191, Y = $t >>> 13, Zt = h[3] | 0, Q = Zt & 8191, F = Zt >>> 13, $e = h[4] | 0, at = $e & 8191, ht = $e >>> 13, qe = h[5] | 0, et = qe & 8191, rt = qe >>> 13, ce = h[6] | 0, nt = ce & 8191, it = ce >>> 13, Ee = h[7] | 0, ot = Ee & 8191, st = Ee >>> 13, Pe = h[8] | 0, ct = Pe & 8191, lt = Pe >>> 13, Ce = h[9] | 0, dt = Ce & 8191, wt = Ce >>> 13, vn = l[0] | 0, gt = vn & 8191, mt = vn >>> 13, bn = l[1] | 0, pt = bn & 8191, yt = bn >>> 13, xn = l[2] | 0, vt = xn & 8191, bt = xn >>> 13, En = l[3] | 0, xt = En & 8191, Et = En >>> 13, Mn = l[4] | 0, Mt = Mn & 8191, _t = Mn >>> 13, _n = l[5] | 0, Bt = _n & 8191, St = _n >>> 13, Bn = l[6] | 0, At = Bn & 8191, It = Bn >>> 13, Sn = l[7] | 0, kt = Sn & 8191, Ut = Sn >>> 13, An = l[8] | 0, Nt = An & 8191, Rt = An >>> 13, In = l[9] | 0, Ot = In & 8191, Lt = In >>> 13;
553
+ var h = n.words, l = f.words, m = a.words, b = 0, u, s, g, B = h[0] | 0, I = B & 8191, N = B >>> 13, K = h[1] | 0, H = K & 8191, z = K >>> 13, $t = h[2] | 0, X = $t & 8191, Y = $t >>> 13, Zt = h[3] | 0, Q = Zt & 8191, F = Zt >>> 13, $e = h[4] | 0, at = $e & 8191, ht = $e >>> 13, qe = h[5] | 0, et = qe & 8191, rt = qe >>> 13, ce = h[6] | 0, nt = ce & 8191, it = ce >>> 13, Ee = h[7] | 0, ot = Ee & 8191, st = Ee >>> 13, Pe = h[8] | 0, ct = Pe & 8191, lt = Pe >>> 13, Ce = h[9] | 0, dt = Ce & 8191, wt = Ce >>> 13, bn = l[0] | 0, gt = bn & 8191, mt = bn >>> 13, xn = l[1] | 0, pt = xn & 8191, yt = xn >>> 13, En = l[2] | 0, vt = En & 8191, bt = En >>> 13, Mn = l[3] | 0, xt = Mn & 8191, Et = Mn >>> 13, _n = l[4] | 0, Mt = _n & 8191, _t = _n >>> 13, Bn = l[5] | 0, Bt = Bn & 8191, St = Bn >>> 13, Sn = l[6] | 0, At = Sn & 8191, It = Sn >>> 13, An = l[7] | 0, kt = An & 8191, Ut = An >>> 13, In = l[8] | 0, Nt = In & 8191, Rt = In >>> 13, kn = l[9] | 0, Ot = kn & 8191, Lt = kn >>> 13;
554
554
  a.negative = n.negative ^ f.negative, a.length = 19, u = Math.imul(I, gt), s = Math.imul(I, mt), s = s + Math.imul(N, gt) | 0, g = Math.imul(N, mt);
555
555
  var cr = (b + u | 0) + ((s & 8191) << 13) | 0;
556
556
  b = (g + (s >>> 13) | 0) + (cr >>> 26) | 0, cr &= 67108863, u = Math.imul(H, gt), s = Math.imul(H, mt), s = s + Math.imul(z, gt) | 0, g = Math.imul(z, mt), u = u + Math.imul(I, pt) | 0, s = s + Math.imul(I, yt) | 0, s = s + Math.imul(N, pt) | 0, g = g + Math.imul(N, yt) | 0;
@@ -598,8 +598,8 @@ var gi = { exports: {} };
598
598
  var m = h;
599
599
  h = 0;
600
600
  for (var b = a & 67108863, u = Math.min(l, n.length - 1), s = Math.max(0, l - p.length + 1); s <= u; s++) {
601
- var g = l - s, B = p.words[g] | 0, I = n.words[s] | 0, N = B * I, j = N & 67108863;
602
- m = m + (N / 67108864 | 0) | 0, j = j + b | 0, b = j & 67108863, m = m + (j >>> 26) | 0, h += m >>> 26, m &= 67108863;
601
+ var g = l - s, B = p.words[g] | 0, I = n.words[s] | 0, N = B * I, K = N & 67108863;
602
+ m = m + (N / 67108864 | 0) | 0, K = K + b | 0, b = K & 67108863, m = m + (K >>> 26) | 0, h += m >>> 26, m &= 67108863;
603
603
  }
604
604
  f.words[l] = b, a = m, m = h;
605
605
  }
@@ -786,7 +786,7 @@ var gi = { exports: {} };
786
786
  }) : this.negative === 0 && n.negative !== 0 ? (m = this.divmod(n.neg(), f), f !== "mod" && (h = m.div.neg()), {
787
787
  div: h,
788
788
  mod: m.mod
789
- }) : this.negative & n.negative ? (m = this.neg().divmod(n.neg(), f), f !== "div" && (l = m.mod.neg(), a && l.negative !== 0 && l.isub(n)), {
789
+ }) : (this.negative & n.negative) !== 0 ? (m = this.neg().divmod(n.neg(), f), f !== "div" && (l = m.mod.neg(), a && l.negative !== 0 && l.isub(n)), {
790
790
  div: m.div,
791
791
  mod: l
792
792
  }) : n.length > this.length || this.cmp(n) < 0 ? {
@@ -838,11 +838,11 @@ var gi = { exports: {} };
838
838
  for (var h = new i(1), l = new i(0), m = new i(0), b = new i(1), u = 0; f.isEven() && a.isEven(); )
839
839
  f.iushrn(1), a.iushrn(1), ++u;
840
840
  for (var s = a.clone(), g = f.clone(); !f.isZero(); ) {
841
- for (var B = 0, I = 1; !(f.words[0] & I) && B < 26; ++B, I <<= 1) ;
841
+ for (var B = 0, I = 1; (f.words[0] & I) === 0 && B < 26; ++B, I <<= 1) ;
842
842
  if (B > 0)
843
843
  for (f.iushrn(B); B-- > 0; )
844
844
  (h.isOdd() || l.isOdd()) && (h.iadd(s), l.isub(g)), h.iushrn(1), l.iushrn(1);
845
- for (var N = 0, j = 1; !(a.words[0] & j) && N < 26; ++N, j <<= 1) ;
845
+ for (var N = 0, K = 1; (a.words[0] & K) === 0 && N < 26; ++N, K <<= 1) ;
846
846
  if (N > 0)
847
847
  for (a.iushrn(N); N-- > 0; )
848
848
  (m.isOdd() || b.isOdd()) && (m.iadd(s), b.isub(g)), m.iushrn(1), b.iushrn(1);
@@ -858,11 +858,11 @@ var gi = { exports: {} };
858
858
  var f = this, a = n.clone();
859
859
  f.negative !== 0 ? f = f.umod(n) : f = f.clone();
860
860
  for (var h = new i(1), l = new i(0), m = a.clone(); f.cmpn(1) > 0 && a.cmpn(1) > 0; ) {
861
- for (var b = 0, u = 1; !(f.words[0] & u) && b < 26; ++b, u <<= 1) ;
861
+ for (var b = 0, u = 1; (f.words[0] & u) === 0 && b < 26; ++b, u <<= 1) ;
862
862
  if (b > 0)
863
863
  for (f.iushrn(b); b-- > 0; )
864
864
  h.isOdd() && h.iadd(m), h.iushrn(1);
865
- for (var s = 0, g = 1; !(a.words[0] & g) && s < 26; ++s, g <<= 1) ;
865
+ for (var s = 0, g = 1; (a.words[0] & g) === 0 && s < 26; ++s, g <<= 1) ;
866
866
  if (s > 0)
867
867
  for (a.iushrn(s); s-- > 0; )
868
868
  l.isOdd() && l.iadd(m), l.iushrn(1);
@@ -1152,8 +1152,8 @@ var gi = { exports: {} };
1152
1152
  for (s = new i(2 * s * s).toRed(this); this.pow(s, u).cmp(b) !== 0; )
1153
1153
  s.redIAdd(b);
1154
1154
  for (var g = this.pow(s, h), B = this.pow(n, h.addn(1).iushrn(1)), I = this.pow(n, h), N = l; I.cmp(m) !== 0; ) {
1155
- for (var j = I, H = 0; j.cmp(m) !== 0; H++)
1156
- j = j.redSqr();
1155
+ for (var K = I, H = 0; K.cmp(m) !== 0; H++)
1156
+ K = K.redSqr();
1157
1157
  o(H < N);
1158
1158
  var z = this.pow(g, new i(1).iushln(N - H - 1));
1159
1159
  B = B.redMul(z), g = z.redSqr(), I = I.redMul(g), N = H;
@@ -1212,12 +1212,12 @@ var gi = { exports: {} };
1212
1212
  var f = this.imod(n._invmp(this.m).mul(this.r2));
1213
1213
  return f._forceRed(this);
1214
1214
  };
1215
- })(t, is);
1216
- })(gi);
1217
- var gs = gi.exports;
1218
- const K = /* @__PURE__ */ ns(gs);
1215
+ })(t, ws);
1216
+ })(sn);
1217
+ var gs = sn.exports;
1218
+ const j = /* @__PURE__ */ ns(gs);
1219
1219
  function mi(t) {
1220
- return K.isBN(t);
1220
+ return j.isBN(t);
1221
1221
  }
1222
1222
  function ms(t) {
1223
1223
  return !!t && typeof t == "object";
@@ -1227,7 +1227,7 @@ function pi(...t) {
1227
1227
  }
1228
1228
  const yi = /* @__PURE__ */ pi("toBigInt"), vi = /* @__PURE__ */ pi("toBn");
1229
1229
  function ps(t) {
1230
- return typeof t == "bigint" ? t : t ? te(t) ? ws(t.toString()) : mi(t) ? W(t.toString()) : yi(t) ? t.toBigInt() : vi(t) ? W(t.toBn().toString()) : W(t) : W(0);
1230
+ return typeof t == "bigint" ? t : t ? te(t) ? ds(t.toString()) : mi(t) ? W(t.toString()) : yi(t) ? t.toBigInt() : vi(t) ? W(t.toBn().toString()) : W(t) : W(0);
1231
1231
  }
1232
1232
  function Ct(...t) {
1233
1233
  const e = t.length, r = new Array(e);
@@ -1254,7 +1254,7 @@ function bi(t) {
1254
1254
  return !1;
1255
1255
  return !0;
1256
1256
  }
1257
- function jt(t, e) {
1257
+ function Kt(t, e) {
1258
1258
  const r = V(t), o = V(e);
1259
1259
  if (r.length === o.length) {
1260
1260
  const c = new DataView(r.buffer, r.byteOffset), i = new DataView(o.buffer, o.byteOffset), w = r.length % 4 | 0, d = r.length - w | 0;
@@ -1283,45 +1283,45 @@ function kr(t, { isLe: e = !0, isNegative: r = !1 } = {}) {
1283
1283
  if (r && o && t[o - 1] & 128)
1284
1284
  switch (o) {
1285
1285
  case 0:
1286
- return new K(0);
1286
+ return new j(0);
1287
1287
  case 1:
1288
- return new K((t[0] ^ 255) * -1 - 1);
1288
+ return new j((t[0] ^ 255) * -1 - 1);
1289
1289
  case 2:
1290
- return new K((t[0] + (t[1] << 8) ^ 65535) * -1 - 1);
1290
+ return new j((t[0] + (t[1] << 8) ^ 65535) * -1 - 1);
1291
1291
  case 3:
1292
- return new K((t[0] + (t[1] << 8) + (t[2] << 16) ^ 16777215) * -1 - 1);
1292
+ return new j((t[0] + (t[1] << 8) + (t[2] << 16) ^ 16777215) * -1 - 1);
1293
1293
  case 4:
1294
- return new K((t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216 ^ 4294967295) * -1 - 1);
1294
+ return new j((t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216 ^ 4294967295) * -1 - 1);
1295
1295
  case 5:
1296
- return new K(((t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216 ^ 4294967295) + (t[4] ^ 255) * 4294967296) * -1 - 1);
1296
+ return new j(((t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216 ^ 4294967295) + (t[4] ^ 255) * 4294967296) * -1 - 1);
1297
1297
  case 6:
1298
- return new K(((t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216 ^ 4294967295) + (t[4] + (t[5] << 8) ^ 65535) * 4294967296) * -1 - 1);
1298
+ return new j(((t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216 ^ 4294967295) + (t[4] + (t[5] << 8) ^ 65535) * 4294967296) * -1 - 1);
1299
1299
  default:
1300
- return new K(t, "le").fromTwos(o * 8);
1300
+ return new j(t, "le").fromTwos(o * 8);
1301
1301
  }
1302
1302
  switch (o) {
1303
1303
  case 0:
1304
- return new K(0);
1304
+ return new j(0);
1305
1305
  case 1:
1306
- return new K(t[0]);
1306
+ return new j(t[0]);
1307
1307
  case 2:
1308
- return new K(t[0] + (t[1] << 8));
1308
+ return new j(t[0] + (t[1] << 8));
1309
1309
  case 3:
1310
- return new K(t[0] + (t[1] << 8) + (t[2] << 16));
1310
+ return new j(t[0] + (t[1] << 8) + (t[2] << 16));
1311
1311
  case 4:
1312
- return new K(t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216);
1312
+ return new j(t[0] + (t[1] << 8) + (t[2] << 16) + t[3] * 16777216);
1313
1313
  case 5:
1314
- return new K(t[0] + (t[1] << 8) + (t[2] << 16) + (t[3] + (t[4] << 8)) * 16777216);
1314
+ return new j(t[0] + (t[1] << 8) + (t[2] << 16) + (t[3] + (t[4] << 8)) * 16777216);
1315
1315
  case 6:
1316
- return new K(t[0] + (t[1] << 8) + (t[2] << 16) + (t[3] + (t[4] << 8) + (t[5] << 16)) * 16777216);
1316
+ return new j(t[0] + (t[1] << 8) + (t[2] << 16) + (t[3] + (t[4] << 8) + (t[5] << 16)) * 16777216);
1317
1317
  default:
1318
- return new K(t, "le");
1318
+ return new j(t, "le");
1319
1319
  }
1320
1320
  }
1321
1321
  const Ur = /* @__PURE__ */ V(`Ethereum Signed Message:
1322
1322
  `), Ie = /* @__PURE__ */ V("<Bytes>"), ke = /* @__PURE__ */ V("</Bytes>"), vs = Ie.length + ke.length;
1323
1323
  function We(t, e) {
1324
- return t.length >= vs && jt(t.subarray(0, Ie.length), Ie) && jt(t.slice(-ke.length), ke) || e && t.length >= Ur.length && jt(t.subarray(0, Ur.length), Ur);
1324
+ return t.length >= vs && Kt(t.subarray(0, Ie.length), Ie) && Kt(t.slice(-ke.length), ke) || e && t.length >= Ur.length && Kt(t.subarray(0, Ur.length), Ur);
1325
1325
  }
1326
1326
  function bs(t) {
1327
1327
  const e = V(t);
@@ -1331,18 +1331,18 @@ function xs(t) {
1331
1331
  const e = V(t);
1332
1332
  return We(e, !0) ? e : Re([Ie, e, ke]);
1333
1333
  }
1334
- const On = W(256), Es = W(255);
1334
+ const Ln = W(256), Es = W(255);
1335
1335
  function Ms(t, e, r) {
1336
- const o = [], c = r && t < Ke;
1337
- for (c && (t = (t + Ge) * -Ge); t !== Ke; ) {
1338
- const i = t % On, w = Number(c ? i ^ Es : i);
1339
- e ? o.push(w) : o.unshift(w), t = (t - i) / On;
1336
+ const o = [], c = r && t < je;
1337
+ for (c && (t = (t + Ge) * -Ge); t !== je; ) {
1338
+ const i = t % Ln, w = Number(c ? i ^ Es : i);
1339
+ e ? o.push(w) : o.unshift(w), t = (t - i) / Ln;
1340
1340
  }
1341
1341
  return Uint8Array.from(o);
1342
1342
  }
1343
1343
  function _s(t, { bitLength: e = -1, isLe: r = !0, isNegative: o = !1 } = {}) {
1344
1344
  const c = ps(t);
1345
- if (c === Ke)
1345
+ if (c === je)
1346
1346
  return e === -1 ? new Uint8Array(1) : new Uint8Array(Math.ceil((e || 0) / 8));
1347
1347
  const i = Ms(c, r, o);
1348
1348
  if (e === -1)
@@ -1361,18 +1361,18 @@ function Bs(t) {
1361
1361
  }
1362
1362
  function Ss(t, { isLe: e = !1, isNegative: r = !1 } = {}) {
1363
1363
  if (!t || t === "0x")
1364
- return new K(0);
1365
- const o = Bs(t), c = new K(o, 16, e ? "le" : "be");
1364
+ return new j(0);
1365
+ const o = Bs(t), c = new j(o, 16, e ? "le" : "be");
1366
1366
  return r ? c.fromTwos(o.length * 4) : c;
1367
1367
  }
1368
- const nr = /* @__PURE__ */ new K(1), ir = /* @__PURE__ */ new K(2), Ln = /* @__PURE__ */ new K(1e9);
1369
- Ln.mul(Ln);
1368
+ const nr = /* @__PURE__ */ new j(1), ir = /* @__PURE__ */ new j(2), Tn = /* @__PURE__ */ new j(1e9);
1369
+ Tn.mul(Tn);
1370
1370
  Number.MAX_SAFE_INTEGER;
1371
1371
  function xi(t) {
1372
1372
  return typeof t == "bigint";
1373
1373
  }
1374
1374
  function Ei(t) {
1375
- return t ? K.isBN(t) ? t : te(t) ? Ss(t.toString()) : xi(t) ? new K(t.toString()) : vi(t) ? t.toBn() : yi(t) ? new K(t.toBigInt().toString()) : new K(t) : new K(0);
1375
+ return t ? j.isBN(t) ? t : te(t) ? Ss(t.toString()) : xi(t) ? new j(t.toString()) : vi(t) ? t.toBn() : yi(t) ? new j(t.toBigInt().toString()) : new j(t) : new j(0);
1376
1376
  }
1377
1377
  const As = { bitLength: -1, isLe: !0, isNegative: !1 };
1378
1378
  function zt(t, { bitLength: e = -1, isLe: r = !0, isNegative: o = !1 } = As) {
@@ -1382,7 +1382,7 @@ function zt(t, { bitLength: e = -1, isLe: r = !0, isNegative: o = !1 } = As) {
1382
1382
  const w = new Uint8Array(i), d = o ? c.toTwos(i * 8) : c;
1383
1383
  return w.set(d.toArray(r ? "le" : "be", i), 0), w;
1384
1384
  }
1385
- const Is = ir.pow(new K(6)).isub(nr), ks = ir.pow(new K(14)).isub(nr), Us = ir.pow(new K(30)).isub(nr), Ns = { bitLength: 16 }, Rs = { bitLength: 32 };
1385
+ const Is = ir.pow(new j(6)).isub(nr), ks = ir.pow(new j(14)).isub(nr), Us = ir.pow(new j(30)).isub(nr), Ns = { bitLength: 16 }, Rs = { bitLength: 32 };
1386
1386
  function Os(t) {
1387
1387
  const e = Ei(t);
1388
1388
  if (e.lte(Is))
@@ -1403,7 +1403,7 @@ function Os(t) {
1403
1403
  r.subarray(0, o)
1404
1404
  ]);
1405
1405
  }
1406
- function sn(t) {
1406
+ function fn(t) {
1407
1407
  return Re([
1408
1408
  Os(t.length),
1409
1409
  t
@@ -1495,7 +1495,7 @@ function qs(t, e = "=") {
1495
1495
  }
1496
1496
  };
1497
1497
  }
1498
- function Tn(t, e, r) {
1498
+ function $n(t, e, r) {
1499
1499
  if (e < 2)
1500
1500
  throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);
1501
1501
  if (r < 2)
@@ -1536,7 +1536,7 @@ const ki = (t, e) => e === 0 ? t : ki(e, t % e), tr = /* @__NO_SIDE_EFFECTS__ */
1536
1536
  t.push(2 ** e);
1537
1537
  return t;
1538
1538
  })();
1539
- function $n(t, e, r, o) {
1539
+ function qn(t, e, r, o) {
1540
1540
  if (Qe(t), e <= 0 || e > 32)
1541
1541
  throw new Error(`convertRadix2: wrong from=${e}`);
1542
1542
  if (r <= 0 || r > 32)
@@ -1571,9 +1571,9 @@ function Ps(t) {
1571
1571
  encode: (r) => {
1572
1572
  if (!Mi(r))
1573
1573
  throw new Error("radix.encode input should be Uint8Array");
1574
- return Tn(Array.from(r), e, t);
1574
+ return $n(Array.from(r), e, t);
1575
1575
  },
1576
- decode: (r) => (Bi("radix.decode", r), Uint8Array.from(Tn(r, t, e)))
1576
+ decode: (r) => (Bi("radix.decode", r), Uint8Array.from($n(r, t, e)))
1577
1577
  };
1578
1578
  }
1579
1579
  // @__NO_SIDE_EFFECTS__
@@ -1586,9 +1586,9 @@ function Cs(t, e = !1) {
1586
1586
  encode: (r) => {
1587
1587
  if (!Mi(r))
1588
1588
  throw new Error("radix2.encode input should be Uint8Array");
1589
- return $n(Array.from(r), 8, t, !e);
1589
+ return qn(Array.from(r), 8, t, !e);
1590
1590
  },
1591
- decode: (r) => (Bi("radix2.decode", r), Uint8Array.from($n(r, t, 8, e)))
1591
+ decode: (r) => (Bi("radix2.decode", r), Uint8Array.from(qn(r, t, 8, e)))
1592
1592
  };
1593
1593
  }
1594
1594
  const Zs = /* @__PURE__ */ Si(/* @__PURE__ */ Cs(6), /* @__PURE__ */ Ai("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ qs(6), /* @__PURE__ */ Ii("")), Ds = /* @__NO_SIDE_EFFECTS__ */ (t) => /* @__PURE__ */ Si(/* @__PURE__ */ Ps(58), /* @__PURE__ */ Ai(t), /* @__PURE__ */ Ii("")), Hs = /* @__PURE__ */ Ds("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
@@ -1617,16 +1617,16 @@ function Ri({ chars: t, ipfs: e, type: r, withPadding: o }) {
1617
1617
  return !0;
1618
1618
  };
1619
1619
  }
1620
- const fn = {
1620
+ const an = {
1621
1621
  chars: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",
1622
1622
  coder: Hs,
1623
1623
  ipfs: "z",
1624
1624
  type: "base58"
1625
- }, Vs = /* @__PURE__ */ Ri(fn), zs = /* @__PURE__ */ Ui(fn, Vs), Ys = /* @__PURE__ */ Ni(fn), Xs = ee("SS58PRE");
1625
+ }, Vs = /* @__PURE__ */ Ri(an), zs = /* @__PURE__ */ Ui(an, Vs), Ys = /* @__PURE__ */ Ni(an), Xs = ee("SS58PRE");
1626
1626
  function Oi(t) {
1627
1627
  return he(Ct(Xs, t), 512);
1628
1628
  }
1629
- function js(t) {
1629
+ function Ks(t) {
1630
1630
  const e = t[0] & 64 ? 2 : 1, r = e === 1 ? t[0] : (t[0] & 63) << 2 | t[1] >> 6 | (t[1] & 63) << 8, o = [34 + e, 35 + e].includes(t.length), c = t.length - (o ? 2 : 1), i = Oi(t.subarray(0, c));
1631
1631
  return [(t[0] & 128) === 0 && ![46, 47].includes(t[0]) && (o ? t[t.length - 2] === i[0] && t[t.length - 1] === i[1] : t[t.length - 1] === i[0]), c, e, r];
1632
1632
  }
@@ -1645,7 +1645,7 @@ function ge(t, e, r = -1) {
1645
1645
  const o = zs(t);
1646
1646
  if (!ze.allowedEncodedLengths.includes(o.length))
1647
1647
  throw new Error("Invalid decoded address length");
1648
- const [c, i, w, d] = js(o);
1648
+ const [c, i, w, d] = Ks(o);
1649
1649
  if (!c && !e)
1650
1650
  throw new Error("Invalid decoded address checksum");
1651
1651
  if (r !== -1 && r !== d)
@@ -1655,15 +1655,15 @@ function ge(t, e, r = -1) {
1655
1655
  throw new Error(`Decoding ${t}: ${o.message}`);
1656
1656
  }
1657
1657
  }
1658
- const qn = { isLe: !1 }, Rr = { isLe: !0 }, Ks = { bitLength: 32, isLe: !1 }, Or = { bitLength: 32, isLe: !0 }, pe = { bitLength: 256, isLe: !1 }, Gs = { bitLength: 256, isLe: !0 }, Ws = /^\d+$/, Js = 32;
1659
- class an {
1658
+ const Pn = { isLe: !1 }, Rr = { isLe: !0 }, js = { bitLength: 32, isLe: !1 }, Or = { bitLength: 32, isLe: !0 }, pe = { bitLength: 256, isLe: !1 }, Gs = { bitLength: 256, isLe: !0 }, Ws = /^\d+$/, Js = 32;
1659
+ class hn {
1660
1660
  constructor() {
1661
- Kt(this, "__internal__chainCode", new Uint8Array(32));
1662
- Kt(this, "__internal__isHard", !1);
1661
+ jt(this, "__internal__chainCode", new Uint8Array(32));
1662
+ jt(this, "__internal__isHard", !1);
1663
1663
  }
1664
1664
  static from(e) {
1665
- const r = new an(), [o, c] = e.startsWith("/") ? [e.substring(1), !0] : [e, !1];
1666
- return r.soft(Ws.test(o) ? new K(o, 10) : o), c ? r.harden() : r;
1665
+ const r = new hn(), [o, c] = e.startsWith("/") ? [e.substring(1), !0] : [e, !1];
1666
+ return r.soft(Ws.test(o) ? new j(o, 10) : o), c ? r.harden() : r;
1667
1667
  }
1668
1668
  get chainCode() {
1669
1669
  return this.__internal__chainCode;
@@ -1681,7 +1681,7 @@ class an {
1681
1681
  return this.__internal__isHard = !0, this;
1682
1682
  }
1683
1683
  soft(e) {
1684
- return Ts(e) || mi(e) || xi(e) ? this.soft(zt(e, Gs)) : te(e) ? this.soft(Se(e)) : Ls(e) ? this.soft(sn(ee(e))) : e.length > Js ? this.soft(he(e)) : (this.__internal__chainCode.fill(0), this.__internal__chainCode.set(e, 0), this);
1684
+ return Ts(e) || mi(e) || xi(e) ? this.soft(zt(e, Gs)) : te(e) ? this.soft(Se(e)) : Ls(e) ? this.soft(fn(ee(e))) : e.length > Js ? this.soft(he(e)) : (this.__internal__chainCode.fill(0), this.__internal__chainCode.set(e, 0), this);
1685
1685
  }
1686
1686
  soften() {
1687
1687
  return this.__internal__isHard = !1, this;
@@ -1694,7 +1694,7 @@ function Li(t) {
1694
1694
  if (e) {
1695
1695
  o = e.join("");
1696
1696
  for (const c of e)
1697
- r.push(an.from(c.substring(1)));
1697
+ r.push(hn.from(c.substring(1)));
1698
1698
  }
1699
1699
  if (o !== t)
1700
1700
  throw new Error(`Re-constructed path "${o}" does not match input`);
@@ -1716,13 +1716,13 @@ function tf(t) {
1716
1716
  phrase: r
1717
1717
  };
1718
1718
  }
1719
- const ef = sn(ee("Secp256k1HDKD"));
1719
+ const ef = fn(ee("Secp256k1HDKD"));
1720
1720
  function rf(t, e) {
1721
1721
  if (!oe(e) || e.length !== 32)
1722
1722
  throw new Error("Invalid chainCode passed to derive");
1723
1723
  return he(Ct(ef, t, e), 256);
1724
1724
  }
1725
- const hn = /* @__PURE__ */ BigInt(0), or = /* @__PURE__ */ BigInt(1), nf = /* @__PURE__ */ BigInt(2);
1725
+ const cn = /* @__PURE__ */ BigInt(0), or = /* @__PURE__ */ BigInt(1), nf = /* @__PURE__ */ BigInt(2);
1726
1726
  function se(t) {
1727
1727
  return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
1728
1728
  }
@@ -1746,13 +1746,13 @@ function we(t) {
1746
1746
  const e = t.toString(16);
1747
1747
  return e.length & 1 ? `0${e}` : e;
1748
1748
  }
1749
- function cn(t) {
1749
+ function ln(t) {
1750
1750
  if (typeof t != "string")
1751
1751
  throw new Error("hex string expected, got " + typeof t);
1752
1752
  return BigInt(t === "" ? "0" : `0x${t}`);
1753
1753
  }
1754
1754
  const Gt = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
1755
- function Pn(t) {
1755
+ function Cn(t) {
1756
1756
  if (t >= Gt._0 && t <= Gt._9)
1757
1757
  return t - Gt._0;
1758
1758
  if (t >= Gt._A && t <= Gt._F)
@@ -1768,7 +1768,7 @@ function ye(t) {
1768
1768
  throw new Error("padded hex string expected, got unpadded hex of length " + e);
1769
1769
  const o = new Uint8Array(r);
1770
1770
  for (let c = 0, i = 0; c < r; c++, i += 2) {
1771
- const w = Pn(t.charCodeAt(i)), d = Pn(t.charCodeAt(i + 1));
1771
+ const w = Cn(t.charCodeAt(i)), d = Cn(t.charCodeAt(i + 1));
1772
1772
  if (w === void 0 || d === void 0) {
1773
1773
  const y = t[i] + t[i + 1];
1774
1774
  throw new Error('hex string expected, got non-hex character "' + y + '" at index ' + i);
@@ -1778,10 +1778,10 @@ function ye(t) {
1778
1778
  return o;
1779
1779
  }
1780
1780
  function ie(t) {
1781
- return cn(fe(t));
1781
+ return ln(fe(t));
1782
1782
  }
1783
1783
  function me(t) {
1784
- return Le(t), cn(fe(Uint8Array.from(t).reverse()));
1784
+ return Le(t), ln(fe(Uint8Array.from(t).reverse()));
1785
1785
  }
1786
1786
  function ve(t, e) {
1787
1787
  return ye(t.toString(16).padStart(e * 2, "0"));
@@ -1835,7 +1835,7 @@ function af(t) {
1835
1835
  throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
1836
1836
  return new Uint8Array(new TextEncoder().encode(t));
1837
1837
  }
1838
- const Lr = (t) => typeof t == "bigint" && hn <= t;
1838
+ const Lr = (t) => typeof t == "bigint" && cn <= t;
1839
1839
  function sr(t, e, r) {
1840
1840
  return Lr(t) && Lr(e) && Lr(r) && e <= t && t < r;
1841
1841
  }
@@ -1845,7 +1845,7 @@ function Yt(t, e, r, o) {
1845
1845
  }
1846
1846
  function Ti(t) {
1847
1847
  let e;
1848
- for (e = 0; t > hn; t >>= or, e += 1)
1848
+ for (e = 0; t > cn; t >>= or, e += 1)
1849
1849
  ;
1850
1850
  return e;
1851
1851
  }
@@ -1853,9 +1853,9 @@ function hf(t, e) {
1853
1853
  return t >> BigInt(e) & or;
1854
1854
  }
1855
1855
  function cf(t, e, r) {
1856
- return t | (r ? or : hn) << BigInt(e);
1856
+ return t | (r ? or : cn) << BigInt(e);
1857
1857
  }
1858
- const ln = (t) => (nf << BigInt(t - 1)) - or, Tr = (t) => new Uint8Array(t), Cn = (t) => Uint8Array.from(t);
1858
+ const un = (t) => (nf << BigInt(t - 1)) - or, Tr = (t) => new Uint8Array(t), Zn = (t) => Uint8Array.from(t);
1859
1859
  function $i(t, e, r) {
1860
1860
  if (typeof t != "number" || t < 2)
1861
1861
  throw new Error("hashLen must be a number");
@@ -1867,7 +1867,7 @@ function $i(t, e, r) {
1867
1867
  const w = () => {
1868
1868
  o.fill(1), c.fill(0), i = 0;
1869
1869
  }, d = (...E) => r(c, o, ...E), y = (E = Tr()) => {
1870
- c = d(Cn([0]), E), o = d(), E.length !== 0 && (c = d(Cn([1]), E), o = d());
1870
+ c = d(Zn([0]), E), o = d(), E.length !== 0 && (c = d(Zn([1]), E), o = d());
1871
1871
  }, x = () => {
1872
1872
  if (i++ >= 1e3)
1873
1873
  throw new Error("drbg: tried 1000 values");
@@ -1934,7 +1934,7 @@ const df = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1934
1934
  abytes: Le,
1935
1935
  bitGet: hf,
1936
1936
  bitLen: Ti,
1937
- bitMask: ln,
1937
+ bitMask: un,
1938
1938
  bitSet: cf,
1939
1939
  bytesToHex: fe,
1940
1940
  bytesToNumberBE: ie,
@@ -1944,7 +1944,7 @@ const df = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1944
1944
  ensureBytes: Tt,
1945
1945
  equalBytes: ff,
1946
1946
  hexToBytes: ye,
1947
- hexToNumber: cn,
1947
+ hexToNumber: ln,
1948
1948
  inRange: sr,
1949
1949
  isBytes: se,
1950
1950
  memoized: Ne,
@@ -1956,7 +1956,7 @@ const df = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1956
1956
  utf8ToBytes: af,
1957
1957
  validateObject: xe
1958
1958
  }, Symbol.toStringTag, { value: "Module" }));
1959
- const Pt = BigInt(0), ft = BigInt(1), ne = BigInt(2), wf = BigInt(3), jr = BigInt(4), Zn = BigInt(5), Dn = BigInt(8);
1959
+ const Pt = BigInt(0), ft = BigInt(1), ne = BigInt(2), wf = BigInt(3), Kr = BigInt(4), Dn = BigInt(5), Hn = BigInt(8);
1960
1960
  BigInt(9);
1961
1961
  BigInt(16);
1962
1962
  function tt(t, e) {
@@ -1979,7 +1979,7 @@ function ut(t, e, r) {
1979
1979
  o *= o, o %= r;
1980
1980
  return o;
1981
1981
  }
1982
- function Kr(t, e) {
1982
+ function jr(t, e) {
1983
1983
  if (t === Pt || e <= Pt)
1984
1984
  throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);
1985
1985
  let r = tt(t, e), o = e, c = Pt, i = ft;
@@ -1999,7 +1999,7 @@ function mf(t) {
1999
1999
  for (c = ne; c < t && gf(c, e, t) !== t - ft; c++)
2000
2000
  ;
2001
2001
  if (o === 1) {
2002
- const w = (t + ft) / jr;
2002
+ const w = (t + ft) / Kr;
2003
2003
  return function(y, x) {
2004
2004
  const v = y.pow(x, w);
2005
2005
  if (!y.eql(y.sqr(v), x))
@@ -2025,8 +2025,8 @@ function mf(t) {
2025
2025
  };
2026
2026
  }
2027
2027
  function pf(t) {
2028
- if (t % jr === wf) {
2029
- const e = (t + ft) / jr;
2028
+ if (t % Kr === wf) {
2029
+ const e = (t + ft) / Kr;
2030
2030
  return function(o, c) {
2031
2031
  const i = o.pow(c, e);
2032
2032
  if (!o.eql(o.sqr(i), c))
@@ -2034,8 +2034,8 @@ function pf(t) {
2034
2034
  return i;
2035
2035
  };
2036
2036
  }
2037
- if (t % Dn === Zn) {
2038
- const e = (t - Zn) / Dn;
2037
+ if (t % Hn === Dn) {
2038
+ const e = (t - Dn) / Hn;
2039
2039
  return function(o, c) {
2040
2040
  const i = o.mul(c, ne), w = o.pow(i, e), d = o.mul(c, w), y = o.mul(o.mul(d, ne), w), x = o.mul(d, o.sub(y, o.ONE));
2041
2041
  if (!o.eql(o.sqr(x), c))
@@ -2103,7 +2103,7 @@ function fr(t, e, r = !1, o = {}) {
2103
2103
  ORDER: t,
2104
2104
  BITS: c,
2105
2105
  BYTES: i,
2106
- MASK: ln(c),
2106
+ MASK: un(c),
2107
2107
  ZERO: Pt,
2108
2108
  ONE: ft,
2109
2109
  create: (y) => tt(y, t),
@@ -2121,13 +2121,13 @@ function fr(t, e, r = !1, o = {}) {
2121
2121
  sub: (y, x) => tt(y - x, t),
2122
2122
  mul: (y, x) => tt(y * x, t),
2123
2123
  pow: (y, x) => xf(d, y, x),
2124
- div: (y, x) => tt(y * Kr(x, t), t),
2124
+ div: (y, x) => tt(y * jr(x, t), t),
2125
2125
  // Same as above, but doesn't normalize
2126
2126
  sqrN: (y) => y * y,
2127
2127
  addN: (y, x) => y + x,
2128
2128
  subN: (y, x) => y - x,
2129
2129
  mulN: (y, x) => y * x,
2130
- inv: (y) => Kr(y, t),
2130
+ inv: (y) => jr(y, t),
2131
2131
  sqrt: o.sqrt || ((y) => w(d, y)),
2132
2132
  invertBatch: (y) => Ef(d, y),
2133
2133
  // TODO: do we really need constant cmov?
@@ -2159,7 +2159,7 @@ function Mf(t, e, r = !1) {
2159
2159
  const w = r ? ie(t) : me(t), d = tt(w, e - ft) + ft;
2160
2160
  return r ? Ue(d, c) : ve(d, c);
2161
2161
  }
2162
- const _f = BigInt(0), $r = BigInt(1), qr = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap();
2162
+ const _f = BigInt(0), $r = BigInt(1), qr = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap();
2163
2163
  function Zi(t, e) {
2164
2164
  const r = (i, w) => {
2165
2165
  const d = w.negate();
@@ -2223,7 +2223,7 @@ function Zi(t, e) {
2223
2223
  return { p: v, f: E };
2224
2224
  },
2225
2225
  wNAFCached(i, w, d) {
2226
- const y = Hn.get(i) || 1;
2226
+ const y = Vn.get(i) || 1;
2227
2227
  let x = qr.get(i);
2228
2228
  return x || (x = this.precomputeWindow(i, y), y !== 1 && qr.set(i, d(x))), this.wNAF(y, x, w);
2229
2229
  },
@@ -2231,7 +2231,7 @@ function Zi(t, e) {
2231
2231
  // using windowed method. This specifies window size and
2232
2232
  // stores precomputed values. Usually only base point would be precomputed.
2233
2233
  setWindowSize(i, w) {
2234
- o(w), Hn.set(i, w), qr.delete(i);
2234
+ o(w), Vn.set(i, w), qr.delete(i);
2235
2235
  }
2236
2236
  };
2237
2237
  }
@@ -2262,7 +2262,7 @@ function Di(t, e, r, o) {
2262
2262
  }
2263
2263
  return x;
2264
2264
  }
2265
- function un(t) {
2265
+ function dn(t) {
2266
2266
  return bf(t.Fp), xe(t, {
2267
2267
  n: "bigint",
2268
2268
  h: "bigint",
@@ -2277,11 +2277,11 @@ function un(t) {
2277
2277
  p: t.Fp.ORDER
2278
2278
  });
2279
2279
  }
2280
- function Vn(t) {
2280
+ function zn(t) {
2281
2281
  t.lowS !== void 0 && Qt("lowS", t.lowS), t.prehash !== void 0 && Qt("prehash", t.prehash);
2282
2282
  }
2283
2283
  function Bf(t) {
2284
- const e = un(t);
2284
+ const e = dn(t);
2285
2285
  xe(e, {
2286
2286
  a: "field",
2287
2287
  b: "field"
@@ -2396,7 +2396,7 @@ const { bytesToNumberBE: Sf, hexToBytes: Af } = df, Wt = {
2396
2396
  const { _tlv: e, _int: r } = Wt, o = `${e.encode(2, r.encode(t.r))}${e.encode(2, r.encode(t.s))}`;
2397
2397
  return e.encode(48, o);
2398
2398
  }
2399
- }, Jt = BigInt(0), qt = BigInt(1), k0 = BigInt(2), zn = BigInt(3), U0 = BigInt(4);
2399
+ }, Jt = BigInt(0), qt = BigInt(1), k0 = BigInt(2), Yn = BigInt(3), U0 = BigInt(4);
2400
2400
  function If(t) {
2401
2401
  const e = Bf(t), { Fp: r } = e, o = fr(e.n, e.nBitLength), c = e.toBytes || ((k, _, S) => {
2402
2402
  const L = _.toAffine();
@@ -2547,7 +2547,7 @@ function If(t) {
2547
2547
  // https://eprint.iacr.org/2015/1060, algorithm 3
2548
2548
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
2549
2549
  double() {
2550
- const { a: _, b: S } = e, L = r.mul(S, zn), { px: A, py: q, pz: D } = this;
2550
+ const { a: _, b: S } = e, L = r.mul(S, Yn), { px: A, py: q, pz: D } = this;
2551
2551
  let R = r.ZERO, O = r.ZERO, $ = r.ZERO, P = r.mul(A, A), J = r.mul(q, q), T = r.mul(D, D), Z = r.mul(A, q);
2552
2552
  return Z = r.add(Z, Z), $ = r.mul(A, D), $ = r.add($, $), R = r.mul(_, $), O = r.mul(L, T), O = r.add(R, O), R = r.sub(J, O), O = r.add(J, O), O = r.mul(R, O), R = r.mul(Z, R), $ = r.mul(L, $), T = r.mul(_, T), Z = r.sub(P, T), Z = r.mul(_, Z), Z = r.add(Z, $), $ = r.add(P, P), P = r.add($, P), P = r.add(P, T), P = r.mul(P, Z), O = r.add(O, P), T = r.mul(q, D), T = r.add(T, T), P = r.mul(T, Z), R = r.sub(R, P), $ = r.mul(T, J), $ = r.add($, $), $ = r.add($, $), new M(R, O, $);
2553
2553
  }
@@ -2559,7 +2559,7 @@ function If(t) {
2559
2559
  x(_);
2560
2560
  const { px: S, py: L, pz: A } = this, { px: q, py: D, pz: R } = _;
2561
2561
  let O = r.ZERO, $ = r.ZERO, P = r.ZERO;
2562
- const J = e.a, T = r.mul(e.b, zn);
2562
+ const J = e.a, T = r.mul(e.b, Yn);
2563
2563
  let Z = r.mul(S, q), p = r.mul(L, D), n = r.mul(A, R), f = r.add(S, L), a = r.add(q, D);
2564
2564
  f = r.mul(f, a), a = r.add(Z, p), f = r.sub(f, a), a = r.add(S, A);
2565
2565
  let h = r.add(q, R);
@@ -2663,7 +2663,7 @@ function If(t) {
2663
2663
  };
2664
2664
  }
2665
2665
  function kf(t) {
2666
- const e = un(t);
2666
+ const e = dn(t);
2667
2667
  return xe(e, {
2668
2668
  hash: "hash",
2669
2669
  hmac: "function",
@@ -2680,7 +2680,7 @@ function Uf(t) {
2680
2680
  return tt(n, o);
2681
2681
  }
2682
2682
  function d(n) {
2683
- return Kr(n, o);
2683
+ return jr(n, o);
2684
2684
  }
2685
2685
  const { ProjectivePoint: y, normPrivateKeyToScalar: x, weierstrassEquation: v, isWithinCurveOrder: E } = If({
2686
2686
  ...e,
@@ -2747,7 +2747,7 @@ function Uf(t) {
2747
2747
  const b = l === 2 || l === 3 ? a + e.n : a;
2748
2748
  if (b >= r.ORDER)
2749
2749
  throw new Error("recovery id 2 or 3 invalid");
2750
- const u = l & 1 ? "03" : "02", s = y.fromHex(u + M(b)), g = d(b), B = w(-m * g), I = w(h * g), N = y.BASE.multiplyAndAddUnsafe(s, B, I);
2750
+ const u = (l & 1) === 0 ? "02" : "03", s = y.fromHex(u + M(b)), g = d(b), B = w(-m * g), I = w(h * g), N = y.BASE.multiplyAndAddUnsafe(s, B, I);
2751
2751
  if (!N)
2752
2752
  throw new Error("point at infinify");
2753
2753
  return N.assertValidity(), N;
@@ -2822,7 +2822,7 @@ function Uf(t) {
2822
2822
  return a > 0 ? f >> BigInt(a) : f;
2823
2823
  }, R = e.bits2int_modN || function(n) {
2824
2824
  return w(D(n));
2825
- }, O = ln(e.nBitLength);
2825
+ }, O = un(e.nBitLength);
2826
2826
  function $(n) {
2827
2827
  return Yt(`num < 2^${e.nBitLength}`, n, Jt, O), ve(n, e.nByteLength);
2828
2828
  }
@@ -2831,14 +2831,14 @@ function Uf(t) {
2831
2831
  throw new Error("sign() legacy options not supported");
2832
2832
  const { hash: h, randomBytes: l } = e;
2833
2833
  let { lowS: m, prehash: b, extraEntropy: u } = a;
2834
- m == null && (m = !0), n = Tt("msgHash", n), Vn(a), b && (n = Tt("prehashed msgHash", h(n)));
2834
+ m == null && (m = !0), n = Tt("msgHash", n), zn(a), b && (n = Tt("prehashed msgHash", h(n)));
2835
2835
  const s = R(n), g = x(f), B = [$(g), $(s)];
2836
2836
  if (u != null && u !== !1) {
2837
2837
  const H = u === !0 ? l(r.BYTES) : u;
2838
2838
  B.push(Tt("extraEntropy", H));
2839
2839
  }
2840
2840
  const I = ae(...B), N = s;
2841
- function j(H) {
2841
+ function K(H) {
2842
2842
  const z = D(H);
2843
2843
  if (!E(z))
2844
2844
  return;
@@ -2851,7 +2851,7 @@ function Uf(t) {
2851
2851
  let Q = (X.x === Y ? 0 : 2) | Number(X.y & qt), F = Zt;
2852
2852
  return m && U(Zt) && (F = C(Zt), Q ^= 1), new _(Y, F, Q);
2853
2853
  }
2854
- return { seed: I, k2sig: j };
2854
+ return { seed: I, k2sig: K };
2855
2855
  }
2856
2856
  const J = { lowS: e.lowS, prehash: !1 }, T = { lowS: e.lowS, prehash: !1 };
2857
2857
  function Z(n, f, a = J) {
@@ -2864,7 +2864,7 @@ function Uf(t) {
2864
2864
  const l = n;
2865
2865
  if (f = Tt("msgHash", f), a = Tt("publicKey", a), "strict" in h)
2866
2866
  throw new Error("options.strict was renamed to lowS");
2867
- Vn(h);
2867
+ zn(h);
2868
2868
  const { lowS: m, prehash: b } = h;
2869
2869
  let u, s;
2870
2870
  try {
@@ -2890,7 +2890,7 @@ function Uf(t) {
2890
2890
  if (m && u.hasHighS())
2891
2891
  return !1;
2892
2892
  b && (f = e.hash(f));
2893
- const { r: g, s: B } = u, I = R(f), N = d(B), j = w(I * N), H = w(g * N), z = (X = y.BASE.multiplyAndAddUnsafe(s, j, H)) == null ? void 0 : X.toAffine();
2893
+ const { r: g, s: B } = u, I = R(f), N = d(B), K = w(I * N), H = w(g * N), z = (X = y.BASE.multiplyAndAddUnsafe(s, K, H)) == null ? void 0 : X.toAffine();
2894
2894
  return z ? w(z.x) === g : !1;
2895
2895
  }
2896
2896
  return {
@@ -2907,15 +2907,15 @@ function Uf(t) {
2907
2907
  function Nf(t) {
2908
2908
  return {
2909
2909
  hash: t,
2910
- hmac: (e, ...r) => li(t, e, po(...r)),
2911
- randomBytes: ci
2910
+ hmac: (e, ...r) => ui(t, e, po(...r)),
2911
+ randomBytes: li
2912
2912
  };
2913
2913
  }
2914
2914
  function Rf(t, e) {
2915
2915
  const r = (o) => Uf({ ...t, ...Nf(o) });
2916
2916
  return Object.freeze({ ...r(e), create: r });
2917
2917
  }
2918
- const Hi = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), Yn = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), Of = BigInt(1), Gr = BigInt(2), Xn = (t, e) => (t + e / Gr) / e;
2918
+ const Hi = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), Xn = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), Of = BigInt(1), Gr = BigInt(2), Kn = (t, e) => (t + e / Gr) / e;
2919
2919
  function Lf(t) {
2920
2920
  const e = Hi, r = BigInt(3), o = BigInt(6), c = BigInt(11), i = BigInt(22), w = BigInt(23), d = BigInt(44), y = BigInt(88), x = t * t * t % e, v = x * x * t % e, E = ut(v, r, e) * v % e, M = ut(E, r, e) * v % e, U = ut(M, Gr, e) * x % e, C = ut(U, c, e) * U % e, k = ut(C, i, e) * C % e, _ = ut(k, d, e) * k % e, S = ut(_, y, e) * _ % e, L = ut(S, d, e) * k % e, A = ut(L, r, e) * v % e, q = ut(A, w, e) * C % e, D = ut(q, o, e) * x % e, R = ut(D, Gr, e);
2921
2921
  if (!Wr.eql(Wr.sqr(R), t))
@@ -2929,7 +2929,7 @@ const Wr = fr(Hi, void 0, void 0, { sqrt: Lf }), Te = Rf({
2929
2929
  // Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975
2930
2930
  Fp: Wr,
2931
2931
  // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n
2932
- n: Yn,
2932
+ n: Xn,
2933
2933
  // Curve order, total count of valid points in the field
2934
2934
  // Base point (x, y) aka generator point
2935
2935
  Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),
@@ -2947,7 +2947,7 @@ const Wr = fr(Hi, void 0, void 0, { sqrt: Lf }), Te = Rf({
2947
2947
  endo: {
2948
2948
  beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
2949
2949
  splitScalar: (t) => {
2950
- const e = Yn, r = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), o = -Of * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), c = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), i = r, w = BigInt("0x100000000000000000000000000000000"), d = Xn(i * t, e), y = Xn(-o * t, e);
2950
+ const e = Xn, r = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), o = -Of * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), c = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), i = r, w = BigInt("0x100000000000000000000000000000000"), d = Kn(i * t, e), y = Kn(-o * t, e);
2951
2951
  let x = tt(t - d * r - y * c, e), v = tt(-d * o - y * i, e);
2952
2952
  const E = x > w, M = v > w;
2953
2953
  if (E && (x = e - x), M && (v = e - v), x > w || v > w)
@@ -2981,7 +2981,7 @@ function Vi(t, e) {
2981
2981
  return t(e(r.secretKey.subarray(0, 32), o));
2982
2982
  };
2983
2983
  }
2984
- const jn = /* @__PURE__ */ Vi(be, rf), Tf = sn(ee("Ed25519HDKD"));
2984
+ const jn = /* @__PURE__ */ Vi(be, rf), Tf = fn(ee("Ed25519HDKD"));
2985
2985
  function $f(t, e) {
2986
2986
  if (!oe(e) || e.length !== 32)
2987
2987
  throw new Error("Invalid chainCode passed to derive");
@@ -2989,7 +2989,7 @@ function $f(t, e) {
2989
2989
  }
2990
2990
  const Xt = BigInt(0), Dt = BigInt(1), Ze = BigInt(2), qf = BigInt(8), Pf = { zip215: !0 };
2991
2991
  function Cf(t) {
2992
- const e = un(t);
2992
+ const e = dn(t);
2993
2993
  return xe(t, {
2994
2994
  hash: "function",
2995
2995
  a: "bigint",
@@ -3034,7 +3034,7 @@ function Zf(t) {
3034
3034
  const { a: h, d: l } = e;
3035
3035
  if (a.is0())
3036
3036
  throw new Error("bad point: ZERO");
3037
- const { ex: m, ey: b, ez: u, et: s } = a, g = v(m * m), B = v(b * b), I = v(u * u), N = v(I * I), j = v(g * h), H = v(I * v(j + B)), z = v(N + v(l * v(g * B)));
3037
+ const { ex: m, ey: b, ez: u, et: s } = a, g = v(m * m), B = v(b * b), I = v(u * u), N = v(I * I), K = v(g * h), H = v(I * v(K + B)), z = v(N + v(l * v(g * B)));
3038
3038
  if (H !== z)
3039
3039
  throw new Error("bad point: equation left != right (1)");
3040
3040
  const $t = v(m * b), X = v(u * s);
@@ -3078,8 +3078,8 @@ function Zf(t) {
3078
3078
  // Compare one point to another.
3079
3079
  equals(h) {
3080
3080
  _(h);
3081
- const { ex: l, ey: m, ez: b } = this, { ex: u, ey: s, ez: g } = h, B = v(l * g), I = v(u * b), N = v(m * g), j = v(s * b);
3082
- return B === I && N === j;
3081
+ const { ex: l, ey: m, ez: b } = this, { ex: u, ey: s, ez: g } = h, B = v(l * g), I = v(u * b), N = v(m * g), K = v(s * b);
3082
+ return B === I && N === K;
3083
3083
  }
3084
3084
  is0() {
3085
3085
  return this.equals(A.ZERO);
@@ -3091,7 +3091,7 @@ function Zf(t) {
3091
3091
  // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd
3092
3092
  // Cost: 4M + 4S + 1*a + 6add + 1*2.
3093
3093
  double() {
3094
- const { a: h } = e, { ex: l, ey: m, ez: b } = this, u = v(l * l), s = v(m * m), g = v(Ze * v(b * b)), B = v(h * u), I = l + m, N = v(v(I * I) - u - s), j = B + s, H = j - g, z = B - s, $t = v(N * H), X = v(j * z), Y = v(N * z), Zt = v(H * j);
3094
+ const { a: h } = e, { ex: l, ey: m, ez: b } = this, u = v(l * l), s = v(m * m), g = v(Ze * v(b * b)), B = v(h * u), I = l + m, N = v(v(I * I) - u - s), K = B + s, H = K - g, z = B - s, $t = v(N * H), X = v(K * z), Y = v(N * z), Zt = v(H * K);
3095
3095
  return new A($t, X, Zt, Y);
3096
3096
  }
3097
3097
  // Fast algo for adding 2 Extended Points.
@@ -3099,15 +3099,15 @@ function Zf(t) {
3099
3099
  // Cost: 9M + 1*a + 1*d + 7add.
3100
3100
  add(h) {
3101
3101
  _(h);
3102
- const { a: l, d: m } = e, { ex: b, ey: u, ez: s, et: g } = this, { ex: B, ey: I, ez: N, et: j } = h;
3102
+ const { a: l, d: m } = e, { ex: b, ey: u, ez: s, et: g } = this, { ex: B, ey: I, ez: N, et: K } = h;
3103
3103
  if (l === BigInt(-1)) {
3104
3104
  const et = v((u - b) * (I + B)), rt = v((u + b) * (I - B)), ce = v(rt - et);
3105
3105
  if (ce === Xt)
3106
3106
  return this.double();
3107
- const nt = v(s * Ze * j), it = v(g * Ze * N), Ee = it + nt, ot = rt + et, st = it - nt, Pe = v(Ee * ce), ct = v(ot * st), lt = v(Ee * st), Ce = v(ce * ot);
3107
+ const nt = v(s * Ze * K), it = v(g * Ze * N), Ee = it + nt, ot = rt + et, st = it - nt, Pe = v(Ee * ce), ct = v(ot * st), lt = v(Ee * st), Ce = v(ce * ot);
3108
3108
  return new A(Pe, ct, Ce, lt);
3109
3109
  }
3110
- const H = v(b * B), z = v(u * I), $t = v(g * m * j), X = v(s * N), Y = v((b + u) * (B + I) - H - z), Zt = X - $t, Q = X + $t, F = v(z - l * H), $e = v(Y * Zt), at = v(Q * F), ht = v(Y * F), qe = v(Zt * Q);
3110
+ const H = v(b * B), z = v(u * I), $t = v(g * m * K), X = v(s * N), Y = v((b + u) * (B + I) - H - z), Zt = X - $t, Q = X + $t, F = v(z - l * H), $e = v(Y * Zt), at = v(Q * F), ht = v(Y * F), qe = v(Zt * Q);
3111
3111
  return new A($e, at, qe, ht);
3112
3112
  }
3113
3113
  subtract(h) {
@@ -3161,8 +3161,8 @@ function Zf(t) {
3161
3161
  s[u - 1] = g & -129;
3162
3162
  const B = me(s), I = l ? x : r.ORDER;
3163
3163
  Yt("pointHex.y", B, Xt, I);
3164
- const N = v(B * B), j = v(N - Dt), H = v(m * N - b);
3165
- let { isValid: z, value: $t } = M(j, H);
3164
+ const N = v(B * B), K = v(N - Dt), H = v(m * N - b);
3165
+ let { isValid: z, value: $t } = M(K, H);
3166
3166
  if (!z)
3167
3167
  throw new Error("Point.fromHex: invalid y coordinate");
3168
3168
  const X = ($t & Dt) === Dt, Y = (g & 128) !== 0;
@@ -3222,8 +3222,8 @@ function Zf(t) {
3222
3222
  }
3223
3223
  if (!u && B.isSmallOrder())
3224
3224
  return !1;
3225
- const j = T(b, I.toRawBytes(), B.toRawBytes(), h);
3226
- return I.add(B.multiplyUnsafe(j)).subtract(N).clearCofactor().equals(A.ZERO);
3225
+ const K = T(b, I.toRawBytes(), B.toRawBytes(), h);
3226
+ return I.add(B.multiplyUnsafe(K)).subtract(N).clearCofactor().equals(A.ZERO);
3227
3227
  }
3228
3228
  return q._setWindowSize(8), {
3229
3229
  CURVE: e,
@@ -3248,23 +3248,23 @@ function Zf(t) {
3248
3248
  };
3249
3249
  }
3250
3250
  const N0 = BigInt(0), R0 = BigInt(1);
3251
- const dn = BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"), Kn = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
3251
+ const wn = BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"), Gn = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
3252
3252
  BigInt(0);
3253
- const Df = BigInt(1), Gn = BigInt(2), O0 = BigInt(3), Hf = BigInt(5), Vf = BigInt(8);
3253
+ const Df = BigInt(1), Wn = BigInt(2), O0 = BigInt(3), Hf = BigInt(5), Vf = BigInt(8);
3254
3254
  function zf(t) {
3255
- const e = BigInt(10), r = BigInt(20), o = BigInt(40), c = BigInt(80), i = dn, d = t * t % i * t % i, y = ut(d, Gn, i) * d % i, x = ut(y, Df, i) * t % i, v = ut(x, Hf, i) * x % i, E = ut(v, e, i) * v % i, M = ut(E, r, i) * E % i, U = ut(M, o, i) * M % i, C = ut(U, c, i) * U % i, k = ut(C, c, i) * U % i, _ = ut(k, e, i) * v % i;
3256
- return { pow_p_5_8: ut(_, Gn, i) * t % i, b2: d };
3255
+ const e = BigInt(10), r = BigInt(20), o = BigInt(40), c = BigInt(80), i = wn, d = t * t % i * t % i, y = ut(d, Wn, i) * d % i, x = ut(y, Df, i) * t % i, v = ut(x, Hf, i) * x % i, E = ut(v, e, i) * v % i, M = ut(E, r, i) * E % i, U = ut(M, o, i) * M % i, C = ut(U, c, i) * U % i, k = ut(C, c, i) * U % i, _ = ut(k, e, i) * v % i;
3256
+ return { pow_p_5_8: ut(_, Wn, i) * t % i, b2: d };
3257
3257
  }
3258
3258
  function Yf(t) {
3259
3259
  return t[0] &= 248, t[31] &= 127, t[31] |= 64, t;
3260
3260
  }
3261
3261
  function Xf(t, e) {
3262
- const r = dn, o = tt(e * e * e, r), c = tt(o * o * e, r), i = zf(t * c).pow_p_5_8;
3262
+ const r = wn, o = tt(e * e * e, r), c = tt(o * o * e, r), i = zf(t * c).pow_p_5_8;
3263
3263
  let w = tt(t * o * i, r);
3264
- const d = tt(e * w * w, r), y = w, x = tt(w * Kn, r), v = d === t, E = d === tt(-t, r), M = d === tt(-t * Kn, r);
3264
+ const d = tt(e * w * w, r), y = w, x = tt(w * Gn, r), v = d === t, E = d === tt(-t, r), M = d === tt(-t * Gn, r);
3265
3265
  return v && (w = y), (E || M) && (w = x), yf(w, r) && (w = tt(-w, r)), { isValid: v || E, value: w };
3266
3266
  }
3267
- const jf = fr(dn, void 0, !0), Kf = {
3267
+ const Kf = fr(wn, void 0, !0), jf = {
3268
3268
  // Param: a
3269
3269
  a: BigInt(-1),
3270
3270
  // Fp.create(-1) is proper; our way still works and is faster
@@ -3272,7 +3272,7 @@ const jf = fr(dn, void 0, !0), Kf = {
3272
3272
  // Negative number is P - number, and division is invert(number, P)
3273
3273
  d: BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),
3274
3274
  // Finite field 𝔽p over which we'll do calculations; 2n**255n - 19n
3275
- Fp: jf,
3275
+ Fp: Kf,
3276
3276
  // Subgroup order: how many points curve has
3277
3277
  // 2n**252n + 27742317777372353535851937790883648493n;
3278
3278
  n: BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),
@@ -3281,15 +3281,15 @@ const jf = fr(dn, void 0, !0), Kf = {
3281
3281
  // Base point (x, y) aka generator point
3282
3282
  Gx: BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),
3283
3283
  Gy: BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),
3284
- hash: ui,
3285
- randomBytes: ci,
3284
+ hash: di,
3285
+ randomBytes: li,
3286
3286
  adjustScalarBytes: Yf,
3287
3287
  // dom2
3288
3288
  // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.
3289
3289
  // Constant-time, u/√v
3290
3290
  uvRatio: Xf
3291
- }, wn = Zf(Kf);
3292
- function gn(t, e) {
3291
+ }, gn = Zf(jf);
3292
+ function mn(t, e) {
3293
3293
  if (!Ht || !e && Vt()) {
3294
3294
  const o = Io(t);
3295
3295
  return {
@@ -3297,7 +3297,7 @@ function gn(t, e) {
3297
3297
  secretKey: o.slice(0, 64)
3298
3298
  };
3299
3299
  }
3300
- const r = wn.getPublicKey(t);
3300
+ const r = gn.getPublicKey(t);
3301
3301
  return {
3302
3302
  publicKey: r,
3303
3303
  secretKey: Re([t, r])
@@ -3309,7 +3309,7 @@ function Gf(t, { publicKey: e, secretKey: r }, o) {
3309
3309
  throw new Error("Expected a valid publicKey");
3310
3310
  } else throw new Error("Expected a valid secretKey");
3311
3311
  const c = V(t), i = r.subarray(0, 32);
3312
- return !Ht || !o && Vt() ? ko(e, i, c) : wn.sign(c, i);
3312
+ return !Ht || !o && Vt() ? ko(e, i, c) : gn.sign(c, i);
3313
3313
  }
3314
3314
  function zi(t, e, r, o) {
3315
3315
  const c = V(t), i = V(r), w = V(e);
@@ -3318,12 +3318,12 @@ function zi(t, e, r, o) {
3318
3318
  if (w.length !== 64)
3319
3319
  throw new Error(`Invalid signature, received ${w.length} bytes, expected 64`);
3320
3320
  try {
3321
- return !Ht || !o && Vt() ? Uo(w, c, i) : wn.verify(w, c, i);
3321
+ return !Ht || !o && Vt() ? Uo(w, c, i) : gn.verify(w, c, i);
3322
3322
  } catch {
3323
3323
  return !1;
3324
3324
  }
3325
3325
  }
3326
- const Wf = /* @__PURE__ */ Vi(gn, $f), Jr = 64, Jf = 32, Pr = Jr + Jf;
3326
+ const Wf = /* @__PURE__ */ Vi(mn, $f), Jr = 64, Jf = 32, Pr = Jr + Jf;
3327
3327
  function Yi(t) {
3328
3328
  const e = V(t);
3329
3329
  if (e.length !== Pr)
@@ -3354,14 +3354,14 @@ const ra = {
3354
3354
  ethereum: jn,
3355
3355
  sr25519: ea
3356
3356
  };
3357
- function ji(t, e, r) {
3357
+ function Ki(t, e, r) {
3358
3358
  const o = ra[r];
3359
3359
  let c = t;
3360
3360
  for (const i of e)
3361
3361
  c = o(c, i);
3362
3362
  return c;
3363
3363
  }
3364
- function Ki(t) {
3364
+ function ji(t) {
3365
3365
  const e = V(t);
3366
3366
  if (e.length !== 32)
3367
3367
  throw new Error(`Expected a seed matching 32 bytes, found ${e.length}`);
@@ -3382,14 +3382,14 @@ function Gi(t, e, r) {
3382
3382
  throw new Error(`Invalid signature, received ${c.length} bytes, expected 64`);
3383
3383
  return To(c, V(t), o);
3384
3384
  }
3385
- const Wn = new Uint8Array();
3386
- function ia(t, { secretKey: e }, r = Wn, o = Wn) {
3385
+ const Jn = new Uint8Array();
3386
+ function ia(t, { secretKey: e }, r = Jn, o = Jn) {
3387
3387
  if ((e == null ? void 0 : e.length) !== 64)
3388
3388
  throw new Error("Invalid secretKey, expected 64-bytes");
3389
3389
  return $o(e, V(r), V(t), V(o));
3390
3390
  }
3391
- const Jn = new Uint8Array();
3392
- function oa(t, e, r, o = Jn, c = Jn) {
3391
+ const Qn = new Uint8Array();
3392
+ function oa(t, e, r, o = Qn, c = Qn) {
3393
3393
  const i = V(r), w = V(e);
3394
3394
  if (i.length !== 32)
3395
3395
  throw new Error("Invalid publicKey, expected 32-bytes");
@@ -3417,20 +3417,20 @@ for (let t = 0, e = Me, r = 1, o = 0; t < 24; t++) {
3417
3417
  e = (e << Me ^ (e >> ha) * la) % ca, e & aa && (c ^= Me << (Me << /* @__PURE__ */ BigInt(i)) - Me);
3418
3418
  Qi.push(c);
3419
3419
  }
3420
- const [ua, da] = /* @__PURE__ */ Po(Qi, !0), Qn = (t, e, r) => r > 32 ? Co(t, e, r) : Zo(t, e, r), Fn = (t, e, r) => r > 32 ? Do(t, e, r) : Ho(t, e, r);
3420
+ const [ua, da] = /* @__PURE__ */ Po(Qi, !0), Fn = (t, e, r) => r > 32 ? Co(t, e, r) : Zo(t, e, r), ti = (t, e, r) => r > 32 ? Do(t, e, r) : Ho(t, e, r);
3421
3421
  function wa(t, e = 24) {
3422
3422
  const r = new Uint32Array(10);
3423
3423
  for (let o = 24 - e; o < 24; o++) {
3424
3424
  for (let w = 0; w < 10; w++)
3425
3425
  r[w] = t[w] ^ t[w + 10] ^ t[w + 20] ^ t[w + 30] ^ t[w + 40];
3426
3426
  for (let w = 0; w < 10; w += 2) {
3427
- const d = (w + 8) % 10, y = (w + 2) % 10, x = r[y], v = r[y + 1], E = Qn(x, v, 1) ^ r[d], M = Fn(x, v, 1) ^ r[d + 1];
3427
+ const d = (w + 8) % 10, y = (w + 2) % 10, x = r[y], v = r[y + 1], E = Fn(x, v, 1) ^ r[d], M = ti(x, v, 1) ^ r[d + 1];
3428
3428
  for (let U = 0; U < 50; U += 10)
3429
3429
  t[w + U] ^= E, t[w + U + 1] ^= M;
3430
3430
  }
3431
3431
  let c = t[2], i = t[3];
3432
3432
  for (let w = 0; w < 24; w++) {
3433
- const d = Ji[w], y = Qn(c, i, d), x = Fn(c, i, d), v = Wi[w];
3433
+ const d = Ji[w], y = Fn(c, i, d), x = ti(c, i, d), v = Wi[w];
3434
3434
  c = t[v], i = t[v + 1], t[v] = y, t[v + 1] = x;
3435
3435
  }
3436
3436
  for (let w = 0; w < 50; w += 10) {
@@ -3451,10 +3451,10 @@ class ar extends bo {
3451
3451
  this.state = new Uint8Array(200), this.state32 = Ve(this.state);
3452
3452
  }
3453
3453
  keccak() {
3454
- Xe || je(this.state32), wa(this.state32, this.rounds), Xe || je(this.state32), this.posOut = 0, this.pos = 0;
3454
+ Xe || Ke(this.state32), wa(this.state32, this.rounds), Xe || Ke(this.state32), this.posOut = 0, this.pos = 0;
3455
3455
  }
3456
3456
  update(e) {
3457
- kn(this);
3457
+ Un(this);
3458
3458
  const { blockLen: r, state: o } = this;
3459
3459
  e = xo(e);
3460
3460
  const c = e.length;
@@ -3471,10 +3471,10 @@ class ar extends bo {
3471
3471
  return;
3472
3472
  this.finished = !0;
3473
3473
  const { state: e, suffix: r, pos: o, blockLen: c } = this;
3474
- e[o] ^= r, r & 128 && o === c - 1 && this.keccak(), e[c - 1] ^= 128, this.keccak();
3474
+ e[o] ^= r, (r & 128) !== 0 && o === c - 1 && this.keccak(), e[c - 1] ^= 128, this.keccak();
3475
3475
  }
3476
3476
  writeInto(e) {
3477
- kn(this, !1), Eo(e), this.finish();
3477
+ Un(this, !1), Eo(e), this.finish();
3478
3478
  const r = this.state, { blockLen: o } = this;
3479
3479
  for (let c = 0, i = e.length; c < i; ) {
3480
3480
  this.posOut >= o && this.keccak();
@@ -3522,34 +3522,34 @@ const hr = /* @__PURE__ */ Vo({ 256: Yo, 512: zo }, { 256: ga, 512: ma });
3522
3522
  function Qr(t, e, r) {
3523
3523
  return t === "keccak" ? hr(e, void 0, r) : he(e, void 0, void 0, r);
3524
3524
  }
3525
- const mn = {
3525
+ const pn = {
3526
3526
  chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
3527
3527
  coder: Zs,
3528
3528
  type: "base64",
3529
3529
  withPadding: !0
3530
- }, pa = /* @__PURE__ */ Ri(mn), ya = /* @__PURE__ */ Ui(mn, pa), va = /* @__PURE__ */ Ni(mn);
3530
+ }, pa = /* @__PURE__ */ Ri(pn), ya = /* @__PURE__ */ Ui(pn, pa), va = /* @__PURE__ */ Ni(pn);
3531
3531
  function to(t, e) {
3532
3532
  if (![33, 65].includes(t.length))
3533
3533
  throw new Error(`Invalid publicKey provided, received ${t.length} bytes input`);
3534
3534
  return t.length === 33 ? t : !Ht || Vt() ? Xo(t) : Te.ProjectivePoint.fromHex(t).toRawBytes(!0);
3535
3535
  }
3536
- function pn(t, e) {
3536
+ function yn(t, e) {
3537
3537
  if (![33, 65].includes(t.length))
3538
3538
  throw new Error(`Invalid publicKey provided, received ${t.length} bytes input`);
3539
3539
  if (t.length === 65)
3540
3540
  return t.subarray(1);
3541
3541
  if (!Ht || Vt())
3542
- return jo(t).subarray(1);
3542
+ return Ko(t).subarray(1);
3543
3543
  const { px: r, py: o } = Te.ProjectivePoint.fromHex(t);
3544
3544
  return Ct(zt(r, pe), zt(o, pe));
3545
3545
  }
3546
3546
  function ba(t, e, r, o = "blake2", c) {
3547
- const i = V(e).subarray(0, 64), w = V(t), d = !Ht || Vt() ? Ko(w, i, r) : Te.Signature.fromCompact(i).addRecoveryBit(r).recoverPublicKey(w).toRawBytes();
3547
+ const i = V(e).subarray(0, 64), w = V(t), d = !Ht || Vt() ? jo(w, i, r) : Te.Signature.fromCompact(i).addRecoveryBit(r).recoverPublicKey(w).toRawBytes();
3548
3548
  if (!d)
3549
3549
  throw new Error("Unable to recover publicKey from signature");
3550
- return o === "keccak" ? pn(d) : to(d);
3550
+ return o === "keccak" ? yn(d) : to(d);
3551
3551
  }
3552
- function ti(t, { secretKey: e }, r = "blake2", o) {
3552
+ function ei(t, { secretKey: e }, r = "blake2", o) {
3553
3553
  if ((e == null ? void 0 : e.length) !== 32)
3554
3554
  throw new Error("Expected valid secp256k1 secretKey, 32-bytes");
3555
3555
  const c = Qr(r, t, o);
@@ -3558,20 +3558,20 @@ function ti(t, { secretKey: e }, r = "blake2", o) {
3558
3558
  const i = Te.sign(c, e, { lowS: !0 });
3559
3559
  return Ct(zt(i.r, pe), zt(i.s, pe), new Uint8Array([i.recovery || 0]));
3560
3560
  }
3561
- const eo = "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141".replace(/ /g, ""), Cr = W(`0x${eo}`), Zr = new K(eo, "hex");
3561
+ const eo = "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141".replace(/ /g, ""), Cr = W(`0x${eo}`), Zr = new j(eo, "hex");
3562
3562
  function xa(t, e) {
3563
- let r = Xr(e, qn);
3563
+ let r = Xr(e, Pn);
3564
3564
  if (r >= Cr)
3565
3565
  throw new Error("Tweak parameter is out of range");
3566
- if (r += Xr(t, qn), r >= Cr && (r -= Cr), r === Ke)
3566
+ if (r += Xr(t, Pn), r >= Cr && (r -= Cr), r === je)
3567
3567
  throw new Error("Invalid resulting private key");
3568
3568
  return _s(r, pe);
3569
3569
  }
3570
3570
  function Ea(t, e) {
3571
- const r = new K(e);
3571
+ const r = new j(e);
3572
3572
  if (r.cmp(Zr) >= 0)
3573
3573
  throw new Error("Tweak parameter is out of range");
3574
- if (r.iadd(new K(t)), r.cmp(Zr) >= 0 && r.isub(Zr), r.isZero())
3574
+ if (r.iadd(new j(t)), r.cmp(Zr) >= 0 && r.isub(Zr), r.isZero())
3575
3575
  throw new Error("Invalid resulting private key");
3576
3576
  return zt(r, pe);
3577
3577
  }
@@ -3587,10 +3587,10 @@ function _a(t, e, r, o = "blake2", c) {
3587
3587
  if (i.length !== 65)
3588
3588
  throw new Error(`Expected signature with 65 bytes, ${i.length} found instead`);
3589
3589
  const w = ba(Qr(o, t), i, i[64], o), d = Qr(o, w, c), y = V(r);
3590
- return jt(w, y) || (o === "keccak" ? jt(d.slice(-20), y.slice(-20)) : jt(d, y));
3590
+ return Kt(w, y) || (o === "keccak" ? Kt(d.slice(-20), y.slice(-20)) : Kt(d, y));
3591
3591
  }
3592
3592
  function Ba(t) {
3593
- return [33, 65].includes(t.length) && (t = hr(pn(t))), t.slice(-20);
3593
+ return [33, 65].includes(t.length) && (t = hr(yn(t))), t.slice(-20);
3594
3594
  }
3595
3595
  function ro(t) {
3596
3596
  if (!t)
@@ -3606,23 +3606,23 @@ function ro(t) {
3606
3606
  }
3607
3607
  const Sa = {
3608
3608
  256: rr,
3609
- 512: ui
3609
+ 512: di
3610
3610
  }, Aa = {
3611
3611
  256: Jo,
3612
3612
  512: Wo
3613
3613
  };
3614
3614
  function no(t, e, r = 256, o) {
3615
3615
  const c = V(t);
3616
- return !Ht || Vt() ? Aa[r](c, e) : li(Sa[r], c, e);
3616
+ return !Ht || Vt() ? Aa[r](c, e) : ui(Sa[r], c, e);
3617
3617
  }
3618
- const yn = 2147483648;
3618
+ const vn = 2147483648;
3619
3619
  function Ia(t) {
3620
3620
  if (!t.startsWith("m/"))
3621
3621
  return !1;
3622
3622
  const e = t.split("/").slice(1);
3623
3623
  for (const r of e) {
3624
3624
  const o = /^\d+'?$/.test(r) ? parseInt(r.replace(/'$/, ""), 10) : Number.NaN;
3625
- if (isNaN(o) || o >= yn || o < 0)
3625
+ if (isNaN(o) || o >= vn || o < 0)
3626
3626
  return !1;
3627
3627
  }
3628
3628
  return !0;
@@ -3636,7 +3636,7 @@ function io(t, e) {
3636
3636
  };
3637
3637
  }
3638
3638
  function oo(t, e) {
3639
- const r = zt(e, Ks), o = e >= yn ? Ct(new Uint8Array(1), t.secretKey, r) : Ct(t.publicKey, r);
3639
+ const r = zt(e, js), o = e >= vn ? Ct(new Uint8Array(1), t.secretKey, r) : Ct(t.publicKey, r);
3640
3640
  try {
3641
3641
  const c = no(t.chainCode, o, 512);
3642
3642
  return io(Ma(t.secretKey, c.slice(0, 32)), c.slice(32));
@@ -3653,21 +3653,21 @@ function Ua(t, e = "") {
3653
3653
  throw new Error("Invalid derivation path");
3654
3654
  const c = e.split("/").slice(1);
3655
3655
  for (const i of c)
3656
- o = oo(o, parseInt(i, 10) + (i.length > 1 && i.endsWith("'") ? yn : 0));
3656
+ o = oo(o, parseInt(i, 10) + (i.length > 1 && i.endsWith("'") ? vn : 0));
3657
3657
  return o;
3658
3658
  }
3659
3659
  function Na(t, e, r) {
3660
- return !Ht || Vt() ? Qo(t) : os(t, e);
3660
+ return !Ht || Vt() ? Qo(t) : is(t, e);
3661
3661
  }
3662
3662
  function so(t, e, r) {
3663
- return !Ht || Vt() ? Fo(t) : ss(t, e);
3663
+ return !Ht || Vt() ? Fo(t) : os(t, e);
3664
3664
  }
3665
3665
  function Ra(t, e = "", r, o = 32) {
3666
3666
  if (so(t)) {
3667
3667
  if (![32, 64].includes(o))
3668
3668
  throw new Error(`Invalid seed length ${o}, expected 32 or 64`);
3669
3669
  } else throw new Error("Invalid bip39 mnemonic specified");
3670
- return o === 32 ? !Ht || Vt() ? ts(t, e) : Un(t, e).subarray(0, 32) : Un(t, e);
3670
+ return o === 32 ? !Ht || Vt() ? ts(t, e) : Nn(t, e).subarray(0, 32) : Nn(t, e);
3671
3671
  }
3672
3672
  function Oa(t, e = "", r, o) {
3673
3673
  if (so(t, r)) {
@@ -3675,7 +3675,7 @@ function Oa(t, e = "", r, o) {
3675
3675
  return es(t, e);
3676
3676
  } else throw new Error("Invalid bip39 mnemonic specified");
3677
3677
  const c = Na(t, r), i = ee(`mnemonic${e}`);
3678
- return fs(c, i).password.slice(0, 32);
3678
+ return ss(c, i).password.slice(0, 32);
3679
3679
  }
3680
3680
  function De(t, e) {
3681
3681
  return t << e | t >>> 32 - e;
@@ -3839,13 +3839,13 @@ function Va(t, e, r) {
3839
3839
  function za(t, e, r) {
3840
3840
  return Va(t, e, r);
3841
3841
  }
3842
- function Ya(t, e, r = wi(24)) {
3842
+ function Ya(t, e, r = gi(24)) {
3843
3843
  return {
3844
3844
  encrypted: Ha(t, r, e),
3845
3845
  nonce: r
3846
3846
  };
3847
3847
  }
3848
- function ei(t, e, r, o, c, i) {
3848
+ function ri(t, e, r, o, c, i) {
3849
3849
  let w = t[e++] ^ r[o++], d = t[e++] ^ r[o++], y = t[e++] ^ r[o++], x = t[e++] ^ r[o++], v = t[e++] ^ r[o++], E = t[e++] ^ r[o++], M = t[e++] ^ r[o++], U = t[e++] ^ r[o++], C = t[e++] ^ r[o++], k = t[e++] ^ r[o++], _ = t[e++] ^ r[o++], S = t[e++] ^ r[o++], L = t[e++] ^ r[o++], A = t[e++] ^ r[o++], q = t[e++] ^ r[o++], D = t[e++] ^ r[o++], R = w, O = d, $ = y, P = x, J = v, T = E, Z = M, p = U, n = C, f = k, a = _, h = S, l = L, m = A, b = q, u = D;
3850
3850
  for (let s = 0; s < 8; s += 2)
3851
3851
  J ^= G(R + l | 0, 7), n ^= G(J + R | 0, 9), l ^= G(n + J | 0, 13), R ^= G(l + n | 0, 18), f ^= G(T + O | 0, 7), m ^= G(f + T | 0, 9), O ^= G(m + f | 0, 13), T ^= G(O + m | 0, 18), b ^= G(a + Z | 0, 7), $ ^= G(b + a | 0, 9), Z ^= G($ + b | 0, 13), a ^= G(Z + $ | 0, 18), P ^= G(u + h | 0, 7), p ^= G(P + u | 0, 9), h ^= G(p + P | 0, 13), u ^= G(h + p | 0, 18), O ^= G(R + P | 0, 7), $ ^= G(O + R | 0, 9), P ^= G($ + O | 0, 13), R ^= G(P + $ | 0, 18), Z ^= G(T + J | 0, 7), p ^= G(Z + T | 0, 9), J ^= G(p + Z | 0, 13), T ^= G(J + p | 0, 18), h ^= G(a + f | 0, 7), n ^= G(h + a | 0, 9), f ^= G(n + h | 0, 13), a ^= G(f + n | 0, 18), l ^= G(u + b | 0, 7), m ^= G(l + u | 0, 9), b ^= G(m + l | 0, 13), u ^= G(b + m | 0, 18);
@@ -3856,7 +3856,7 @@ function Vr(t, e, r, o, c) {
3856
3856
  for (let d = 0; d < 16; d++)
3857
3857
  r[w + d] = t[e + (2 * c - 1) * 16 + d];
3858
3858
  for (let d = 0; d < c; d++, i += 16, e += 16)
3859
- ei(r, w, t, e, r, i), d > 0 && (w += 16), ei(r, i, t, e += 16, r, w);
3859
+ ri(r, w, t, e, r, i), d > 0 && (w += 16), ri(r, i, t, e += 16, r, w);
3860
3860
  }
3861
3861
  function Xa(t, e, r) {
3862
3862
  const o = _o({
@@ -3867,7 +3867,7 @@ function Xa(t, e, r) {
3867
3867
  if (Ft(c), Ft(i), Ft(w), Ft(d), Ft(y), Ft(x), v !== void 0 && typeof v != "function")
3868
3868
  throw new Error("progressCb should be function");
3869
3869
  const E = 128 * i, M = E / 4;
3870
- if (c <= 1 || c & c - 1 || c > 2 ** 32)
3870
+ if (c <= 1 || (c & c - 1) !== 0 || c > 2 ** 32)
3871
3871
  throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");
3872
3872
  if (w < 0 || w > (2 ** 32 - 1) * 32 / E)
3873
3873
  throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");
@@ -3876,7 +3876,7 @@ function Xa(t, e, r) {
3876
3876
  const U = E * (c + w);
3877
3877
  if (U > x)
3878
3878
  throw new Error(`Scrypt: parameters too large, ${U} (128 * r * (N + p)) > ${x} (maxmem)`);
3879
- const C = di(rr, t, e, { c: 1, dkLen: E * w }), k = Ve(C), _ = Ve(new Uint8Array(E * c)), S = Ve(new Uint8Array(E));
3879
+ const C = wi(rr, t, e, { c: 1, dkLen: E * w }), k = Ve(C), _ = Ve(new Uint8Array(E * c)), S = Ve(new Uint8Array(E));
3880
3880
  let L = () => {
3881
3881
  };
3882
3882
  if (v) {
@@ -3888,13 +3888,13 @@ function Xa(t, e, r) {
3888
3888
  }
3889
3889
  return { N: c, r: i, p: w, dkLen: d, blockSize32: M, V: _, B32: k, B: C, tmp: S, blockMixCb: L, asyncTick: y };
3890
3890
  }
3891
- function ja(t, e, r, o, c) {
3892
- const i = di(rr, t, r, { c: 1, dkLen: e });
3891
+ function Ka(t, e, r, o, c) {
3892
+ const i = wi(rr, t, r, { c: 1, dkLen: e });
3893
3893
  return r.fill(0), o.fill(0), c.fill(0), i;
3894
3894
  }
3895
- function Ka(t, e, r) {
3895
+ function ja(t, e, r) {
3896
3896
  const { N: o, r: c, p: i, dkLen: w, blockSize32: d, V: y, B32: x, B: v, tmp: E, blockMixCb: M } = Xa(t, e, r);
3897
- Xe || je(x);
3897
+ Xe || Ke(x);
3898
3898
  for (let U = 0; U < i; U++) {
3899
3899
  const C = d * U;
3900
3900
  for (let k = 0; k < d; k++)
@@ -3909,18 +3909,18 @@ function Ka(t, e, r) {
3909
3909
  Vr(E, 0, x, C, c), M();
3910
3910
  }
3911
3911
  }
3912
- return Xe || je(x), ja(t, w, v, y, E);
3912
+ return Xe || Ke(x), Ka(t, w, v, y, E);
3913
3913
  }
3914
3914
  const Ye = {
3915
3915
  N: 32768,
3916
3916
  p: 1,
3917
3917
  r: 8
3918
3918
  };
3919
- function co(t, e = wi(), r = Ye, o) {
3919
+ function co(t, e = gi(), r = Ye, o) {
3920
3920
  const c = V(t);
3921
3921
  return {
3922
3922
  params: r,
3923
- password: !Ht || Vt() ? rs(c, e, Math.log2(r.N), r.r, r.p) : Ka(c, e, on({ dkLen: 64 }, r)),
3923
+ password: !Ht || Vt() ? rs(c, e, Math.log2(r.N), r.r, r.p) : ja(c, e, on({ dkLen: 64 }, r)),
3924
3924
  salt: e
3925
3925
  };
3926
3926
  }
@@ -3933,7 +3933,7 @@ function Ga(t) {
3933
3933
  function Wa(t, { N: e, p: r, r: o }) {
3934
3934
  return Ct(t, zt(e, Or), zt(r, Or), zt(o, Or));
3935
3935
  }
3936
- const lo = ["scrypt", "xsalsa20-poly1305"], Ja = ["none"], Qa = "3", ri = 24, Fa = 32 + 3 * 4;
3936
+ const lo = ["scrypt", "xsalsa20-poly1305"], Ja = ["none"], Qa = "3", ni = 24, Fa = 32 + 3 * 4;
3937
3937
  function t0(t, e, r = lo) {
3938
3938
  if (t) {
3939
3939
  if (r.includes("xsalsa20-poly1305") && !e)
@@ -3947,7 +3947,7 @@ function t0(t, e, r = lo) {
3947
3947
  c = co(e, w, i).password, t = t.subarray(Fa);
3948
3948
  } else
3949
3949
  c = ee(e);
3950
- o = za(t.subarray(ri), t.subarray(0, ri), ys(c, 256, !0));
3950
+ o = za(t.subarray(ni), t.subarray(0, ni), ys(c, 256, !0));
3951
3951
  }
3952
3952
  if (!o)
3953
3953
  throw new Error("Unable to decode using the supplied passphrase");
@@ -3963,9 +3963,9 @@ function e0(t, e, r) {
3963
3963
  }
3964
3964
  };
3965
3965
  }
3966
- const ni = (t) => (e, r, o) => _a(e, r, o, t), uo = [
3967
- ["ecdsa", ni("blake2")],
3968
- ["ethereum", ni("keccak")]
3966
+ const ii = (t) => (e, r, o) => _a(e, r, o, t), uo = [
3967
+ ["ecdsa", ii("blake2")],
3968
+ ["ethereum", ii("keccak")]
3969
3969
  ], r0 = [
3970
3970
  ["ed25519", zi],
3971
3971
  ["sr25519", Gi],
@@ -4002,22 +4002,22 @@ function i0(t, { message: e, publicKey: r, signature: o }) {
4002
4002
  function o0(t) {
4003
4003
  return [0, 1, 2].includes(t[0]) && [65, 66].includes(t.length) ? i0 : wo;
4004
4004
  }
4005
- function ii(t, e, r) {
4005
+ function oi(t, e, r) {
4006
4006
  const o = V(e);
4007
4007
  if (![64, 65, 66].includes(o.length))
4008
4008
  throw new Error(`Invalid signature length, expected [64..66] bytes, found ${o.length}`);
4009
4009
  const c = ge(r), i = { message: V(t), publicKey: c, signature: o }, w = { crypto: "none", isValid: !1, isWrapped: We(i.message, !0), publicKey: c }, d = We(i.message, !1), y = o0(o);
4010
4010
  return y(w, i), w.crypto !== "none" || w.isWrapped && !d ? w : (i.message = d ? bs(i.message) : xs(i.message), y(w, i));
4011
4011
  }
4012
- const s0 = [as, $s], f0 = { name: "@polkadot/keyring", path: import.meta && import.meta.url ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf("/") + 1) : "auto", type: "esm", version: "12.6.2" };
4013
- us(f0, null, s0);
4014
- const ue = new Uint8Array([161, 35, 3, 33, 0]), er = new Uint8Array([48, 83, 2, 1, 1, 48, 5, 6, 3, 43, 101, 112, 4, 34, 4, 32]), a0 = 32, oi = 64, h0 = 32, _e = er.length;
4012
+ const s0 = [fs, $s], f0 = { name: "@polkadot/keyring", path: import.meta && import.meta.url ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf("/") + 1) : "auto", type: "esm", version: "12.6.2" };
4013
+ ls(f0, null, s0);
4014
+ const ue = new Uint8Array([161, 35, 3, 33, 0]), er = new Uint8Array([48, 83, 2, 1, 1, 48, 5, 6, 3, 43, 101, 112, 4, 34, 4, 32]), a0 = 32, si = 64, h0 = 32, _e = er.length;
4015
4015
  function c0(t, e, r) {
4016
4016
  const o = Array.isArray(r) || r === void 0 ? r : [r], c = t0(e, t, o), i = c.subarray(0, er.length);
4017
- if (!jt(i, er))
4017
+ if (!Kt(i, er))
4018
4018
  throw new Error("Invalid Pkcs8 header found in body");
4019
- let w = c.subarray(_e, _e + oi), d = _e + oi, y = c.subarray(d, d + ue.length);
4020
- if (!jt(y, ue) && (d = _e + h0, w = c.subarray(_e, d), y = c.subarray(d, d + ue.length), !jt(y, ue)))
4019
+ let w = c.subarray(_e, _e + si), d = _e + si, y = c.subarray(d, d + ue.length);
4020
+ if (!Kt(y, ue) && (d = _e + h0, w = c.subarray(_e, d), y = c.subarray(d, d + ue.length), !Kt(y, ue)))
4021
4021
  throw new Error("Invalid Pkcs8 divider found in body");
4022
4022
  const x = d + ue.length;
4023
4023
  return {
@@ -4042,29 +4042,29 @@ function u0(t, { address: e, meta: r }, o, c) {
4042
4042
  }
4043
4043
  const d0 = new Uint8Array(), w0 = {
4044
4044
  ecdsa: be,
4045
- ed25519: gn,
4045
+ ed25519: mn,
4046
4046
  ethereum: be,
4047
- sr25519: Ki
4048
- }, si = {
4047
+ sr25519: ji
4048
+ }, fi = {
4049
4049
  ecdsa: new Uint8Array([2]),
4050
4050
  ed25519: new Uint8Array([0]),
4051
4051
  ethereum: new Uint8Array([2]),
4052
4052
  sr25519: new Uint8Array([1])
4053
- }, fi = {
4054
- ecdsa: (t, e) => ti(t, e, "blake2"),
4053
+ }, ai = {
4054
+ ecdsa: (t, e) => ei(t, e, "blake2"),
4055
4055
  ed25519: Gf,
4056
- ethereum: (t, e) => ti(t, e, "keccak"),
4056
+ ethereum: (t, e) => ei(t, e, "keccak"),
4057
4057
  sr25519: na
4058
4058
  }, He = {
4059
4059
  ecdsa: (t) => t.length > 32 ? he(t) : t,
4060
4060
  ed25519: (t) => t,
4061
- ethereum: (t) => t.length === 20 ? t : hr(pn(t)),
4061
+ ethereum: (t) => t.length === 20 ? t : hr(yn(t)),
4062
4062
  sr25519: (t) => t
4063
4063
  };
4064
4064
  function Be(t) {
4065
4065
  return !t || bi(t);
4066
4066
  }
4067
- function ai(t, e, r) {
4067
+ function hi(t, e, r) {
4068
4068
  return he(Ct(e || "", r || "", t));
4069
4069
  }
4070
4070
  function de({ toSS58: t, type: e }, { publicKey: r, secretKey: o }, c = {}, i = null, w) {
@@ -4107,7 +4107,7 @@ function de({ toSS58: t, type: e }, { publicKey: r, secretKey: o }, c = {}, i =
4107
4107
  throw new Error("Unable to derive on this keypair");
4108
4108
  if (Be(o))
4109
4109
  throw new Error("Cannot derive on a locked keypair");
4110
- const { path: M } = Li(v), U = ji({ publicKey: r, secretKey: o }, M, e);
4110
+ const { path: M } = Li(v), U = Ki({ publicKey: r, secretKey: o }, M, e);
4111
4111
  return de({ toSS58: t, type: e }, U, E, null);
4112
4112
  },
4113
4113
  encodePkcs8: (v) => y(v),
@@ -4120,29 +4120,29 @@ function de({ toSS58: t, type: e }, { publicKey: r, secretKey: o }, c = {}, i =
4120
4120
  sign: (v, E = {}) => {
4121
4121
  if (Be(o))
4122
4122
  throw new Error("Cannot sign with a locked key pair");
4123
- return Ct(E.withType ? si[e] : d0, fi[e](V(v), { publicKey: r, secretKey: o }));
4123
+ return Ct(E.withType ? fi[e] : d0, ai[e](V(v), { publicKey: r, secretKey: o }));
4124
4124
  },
4125
4125
  toJson: (v) => {
4126
4126
  const E = ["ecdsa", "ethereum"].includes(e) ? r.length === 20 ? Ae(r) : Ae(to(r)) : x();
4127
4127
  return u0(e, { address: E, meta: c }, y(v), !!v);
4128
4128
  },
4129
4129
  unlock: (v) => d(v),
4130
- verify: (v, E, M) => ii(v, E, He[e](V(M))).isValid,
4130
+ verify: (v, E, M) => oi(v, E, He[e](V(M))).isValid,
4131
4131
  vrfSign: (v, E, M) => {
4132
4132
  if (Be(o))
4133
4133
  throw new Error("Cannot sign with a locked key pair");
4134
4134
  if (e === "sr25519")
4135
4135
  return ia(v, { secretKey: o }, E, M);
4136
- const U = fi[e](V(v), { publicKey: r, secretKey: o });
4137
- return Ct(ai(U, E, M), U);
4136
+ const U = ai[e](V(v), { publicKey: r, secretKey: o });
4137
+ return Ct(hi(U, E, M), U);
4138
4138
  },
4139
- vrfVerify: (v, E, M, U, C) => e === "sr25519" ? oa(v, E, r, U, C) : ii(v, Ct(si[e], E.subarray(32)), He[e](V(M))).isValid && jt(E.subarray(0, 32), ai(E.subarray(32), U, C))
4139
+ vrfVerify: (v, E, M, U, C) => e === "sr25519" ? oa(v, E, r, U, C) : oi(v, Ct(fi[e], E.subarray(32)), He[e](V(M))).isValid && Kt(E.subarray(0, 32), hi(E.subarray(32), U, C))
4140
4140
  };
4141
4141
  }
4142
4142
  const g0 = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
4143
4143
  class m0 {
4144
4144
  constructor() {
4145
- Kt(this, "__internal__map", {});
4145
+ jt(this, "__internal__map", {});
4146
4146
  }
4147
4147
  add(e) {
4148
4148
  return this.__internal__map[ge(e.address).toString()] = e, e;
@@ -4162,24 +4162,24 @@ class m0 {
4162
4162
  }
4163
4163
  const zr = {
4164
4164
  ecdsa: (t) => be(t),
4165
- ed25519: (t) => gn(t),
4165
+ ed25519: (t) => mn(t),
4166
4166
  ethereum: (t) => be(t),
4167
- sr25519: (t) => Ki(t)
4167
+ sr25519: (t) => ji(t)
4168
4168
  };
4169
4169
  function p0({ publicKey: t }) {
4170
4170
  return t;
4171
4171
  }
4172
4172
  class L0 {
4173
4173
  constructor(e = {}) {
4174
- Kt(this, "__internal__pairs");
4175
- Kt(this, "__internal__type");
4176
- Kt(this, "__internal__ss58");
4177
- Kt(this, "decodeAddress", ge);
4174
+ jt(this, "__internal__pairs");
4175
+ jt(this, "__internal__type");
4176
+ jt(this, "__internal__ss58");
4177
+ jt(this, "decodeAddress", ge);
4178
4178
  /**
4179
4179
  * @name encodeAddress
4180
4180
  * @description Encodes the input into an ss58 representation
4181
4181
  */
4182
- Kt(this, "encodeAddress", (e, r) => this.type === "ethereum" ? ro(e) : sa(e, r ?? this.__internal__ss58));
4182
+ jt(this, "encodeAddress", (e, r) => this.type === "ethereum" ? ro(e) : sa(e, r ?? this.__internal__ss58));
4183
4183
  if (e.type = e.type || "ed25519", !["ecdsa", "ethereum", "ed25519", "sr25519"].includes(e.type || "undefined"))
4184
4184
  throw new Error(`Expected a keyring type of either 'ed25519', 'sr25519', 'ethereum' or 'ecdsa', found '${e.type || "unknown"}`);
4185
4185
  this.__internal__pairs = new m0(), this.__internal__ss58 = e.ss58Format, this.__internal__type = e.type;
@@ -4308,7 +4308,7 @@ class L0 {
4308
4308
  x = ee(y.padEnd(32));
4309
4309
  }
4310
4310
  }
4311
- const E = o === "ethereum" ? v ? zr[o](x) : Ua(x, i.substring(1)) : ji(zr[o](x), d, o);
4311
+ const E = o === "ethereum" ? v ? zr[o](x) : Ua(x, i.substring(1)) : Ki(zr[o](x), d, o);
4312
4312
  return de({ toSS58: this.encodeAddress, type: o }, E, r, null);
4313
4313
  }
4314
4314
  /**