@prosopo/procaptcha-bundle 3.0.11 → 3.0.13

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 (36) hide show
  1. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +2 -2
  2. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -1
  3. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +1 -0
  4. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  5. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -0
  6. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  7. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -0
  8. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  9. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +2 -1
  10. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +1 -1
  11. package/CHANGELOG.md +46 -0
  12. package/dist/bundle/{ProcaptchaWidget-48FxVPQd.js → ProcaptchaWidget-BIt2pcrz.js} +5 -5
  13. package/dist/bundle/{ProcaptchaWidget-B2BzhXLv.js → ProcaptchaWidget-CXxnCzl2.js} +7 -7
  14. package/dist/bundle/{captchaComponentProvider-B7Vxx339.js → captchaComponentProvider-BGEAkC9Y.js} +7 -7
  15. package/dist/bundle/{captchaRenderer-DdOlOCKw.js → captchaRenderer-CqnUYyKY.js} +3 -3
  16. package/dist/bundle/{commonChunk-HCVkoCqn.js → commonChunk-BKceWhtS.js} +1 -1
  17. package/dist/bundle/{emotion-element-5486c51c.browser.esm-D7qvHZDV.js → emotion-element-5486c51c.browser.esm-CimrRZxS.js} +1 -1
  18. package/dist/bundle/{index-DyYmvHVN.js → index-KHTbPva_.js} +1 -1
  19. package/dist/bundle/{index-C00_J7av.js → index-hrOz2CPm.js} +2 -2
  20. package/dist/bundle/nobleChunk-CQ4ENyKh.js +3769 -0
  21. package/dist/bundle/procaptcha.bundle.js +2 -2
  22. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts +1 -0
  23. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  24. package/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -0
  25. package/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  26. package/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -0
  27. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  28. package/dist/bundle/util/captcha/captchaType.d.ts +2 -1
  29. package/dist/bundle/util/captcha/captchaType.d.ts.map +1 -1
  30. package/dist/bundle/{utilChunk-sqstc6C5.js → utilChunk-DPr6oTOj.js} +22 -22
  31. package/dist/bundle/{utilCryptoChunk-qm-BM2eT.js → utilCryptoChunk-BKe3CKqn.js} +273 -273
  32. package/dist/bundle/{web2Chunk-DCsWA5PR.js → web2Chunk-Cqw91v-J.js} +404 -394
  33. package/dist/bundle/{web3Chunk-B8txCqUJ.js → web3Chunk-BcwDKvjL.js} +4 -4
  34. package/package.json +18 -18
  35. package/stats.html +1 -1
  36. package/dist/bundle/nobleChunk-Qozzkbsq.js +0 -3648
@@ -3,19 +3,19 @@ var Ee = (r) => {
3
3
  };
4
4
  var xe = (r, e, t) => e.has(r) || Ee("Cannot " + t);
5
5
  var k = (r, e, t) => (xe(r, e, "read from private field"), t ? t.call(r) : e.get(r)), W = (r, e, t) => e.has(r) ? Ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), J = (r, e, t, n) => (xe(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t);
6
- import { b as Ae, s as jr, r as U, a as Tr, n as y, c as D, R as g, u as he, i as Te, d as S, e as _e, m as _r, f as zr, g as Cr, k as Lr, h as Hr, p as Or, j as Fr, l as Mr, o as qr } from "./nobleChunk-Qozzkbsq.js";
7
- import { u as h, a as Vr, b as I, s as V, i as ze, c as Ce, x as Kr, o as Yr, d as Z, e as C, f as Wr, g as Jr, h as Zr, j as Gr, k as Xr, l as Qr, m as et, n as Ue, p as rt, q as tt } from "./utilChunk-sqstc6C5.js";
8
- import { B as nt } from "./bnChunk-DRlDxTFg.js";
6
+ import { b as Ae, s as jr, r as U, a as je, n as y, c as N, R as g, u as he, i as _e, d as D, e as ze, m as _r, f as zr, g as Cr, k as Lr, h as Hr, p as Or, j as Fr, l as Mr, o as qr, q as Vr } from "./nobleChunk-CQ4ENyKh.js";
7
+ import { u as h, a as Kr, b as I, s as V, i as Ce, c as Le, x as Yr, o as Wr, d as Z, e as C, f as Jr, g as Zr, h as Gr, j as Xr, k as Qr, l as et, m as rt, n as Ue, p as tt, q as nt } from "./utilChunk-DPr6oTOj.js";
8
+ import { B as ot } from "./bnChunk-DRlDxTFg.js";
9
9
  function fe(r) {
10
10
  return r instanceof Uint8Array || ArrayBuffer.isView(r) && r.constructor.name === "Uint8Array";
11
11
  }
12
- function ot(r, ...e) {
12
+ function st(r, ...e) {
13
13
  if (!fe(r))
14
14
  throw new Error("Uint8Array expected");
15
15
  if (e.length > 0 && !e.includes(r.length))
16
16
  throw new Error("Uint8Array expected of length " + e + ", got length=" + r.length);
17
17
  }
18
- function Le(r, e) {
18
+ function He(r, e) {
19
19
  return Array.isArray(e) ? e.length === 0 ? !0 : r ? e.every((t) => typeof t == "string") : e.every((t) => Number.isSafeInteger(t)) : !1;
20
20
  }
21
21
  function P(r, e) {
@@ -23,7 +23,7 @@ function P(r, e) {
23
23
  throw new Error(`${r}: string expected`);
24
24
  return !0;
25
25
  }
26
- function T(r) {
26
+ function j(r) {
27
27
  if (!Number.isSafeInteger(r))
28
28
  throw new Error(`invalid integer: ${r}`);
29
29
  }
@@ -32,20 +32,20 @@ function O(r) {
32
32
  throw new Error("array expected");
33
33
  }
34
34
  function F(r, e) {
35
- if (!Le(!0, e))
35
+ if (!He(!0, e))
36
36
  throw new Error(`${r}: array of strings expected`);
37
37
  }
38
- function He(r, e) {
39
- if (!Le(!1, e))
38
+ function Oe(r, e) {
39
+ if (!He(!1, e))
40
40
  throw new Error(`${r}: array of numbers expected`);
41
41
  }
42
42
  // @__NO_SIDE_EFFECTS__
43
- function Oe(...r) {
43
+ function Fe(...r) {
44
44
  const e = (s) => s, t = (s, i) => (a) => s(i(a)), n = r.map((s) => s.encode).reduceRight(t, e), o = r.map((s) => s.decode).reduce(t, e);
45
45
  return { encode: n, decode: o };
46
46
  }
47
47
  // @__NO_SIDE_EFFECTS__
48
- function Fe(r) {
48
+ function Me(r) {
49
49
  const e = typeof r == "string" ? r.split("") : r, t = e.length;
50
50
  F("alphabet", e);
51
51
  const n = new Map(e.map((o, s) => [o, s]));
@@ -65,15 +65,15 @@ function Fe(r) {
65
65
  };
66
66
  }
67
67
  // @__NO_SIDE_EFFECTS__
68
- function Me(r = "") {
68
+ function qe(r = "") {
69
69
  return P("join", r), {
70
70
  encode: (e) => (F("join.decode", e), e.join(r)),
71
71
  decode: (e) => (P("join.decode", e), e.split(r))
72
72
  };
73
73
  }
74
74
  // @__NO_SIDE_EFFECTS__
75
- function st(r, e = "=") {
76
- return T(r), P("padding", e), {
75
+ function at(r, e = "=") {
76
+ return j(r), P("padding", e), {
77
77
  encode(t) {
78
78
  for (F("padding.encode", t); t.length * r % 8; )
79
79
  t.push(e);
@@ -100,7 +100,7 @@ function Se(r, e, t) {
100
100
  return [];
101
101
  let n = 0;
102
102
  const o = [], s = Array.from(r, (a) => {
103
- if (T(a), a < 0 || a >= e)
103
+ if (j(a), a < 0 || a >= e)
104
104
  throw new Error(`invalid integer: ${a}`);
105
105
  return a;
106
106
  }), i = s.length;
@@ -126,7 +126,7 @@ function Se(r, e, t) {
126
126
  o.push(0);
127
127
  return o.reverse();
128
128
  }
129
- const qe = (r, e) => e === 0 ? r : qe(e, r % e), M = /* @__NO_SIDE_EFFECTS__ */ (r, e) => r + (e - qe(r, e)), G = /* @__PURE__ */ (() => {
129
+ const Ve = (r, e) => e === 0 ? r : Ve(e, r % e), M = /* @__NO_SIDE_EFFECTS__ */ (r, e) => r + (e - Ve(r, e)), G = /* @__PURE__ */ (() => {
130
130
  let r = [];
131
131
  for (let e = 0; e < 40; e++)
132
132
  r.push(2 ** e);
@@ -142,7 +142,7 @@ function Be(r, e, t, n) {
142
142
  let o = 0, s = 0;
143
143
  const i = G[e], a = G[t] - 1, l = [];
144
144
  for (const c of r) {
145
- if (T(c), c >= i)
145
+ if (j(c), c >= i)
146
146
  throw new Error(`convertRadix2: invalid data word=${c} from=${e}`);
147
147
  if (o = o << e | c, s + e > 32)
148
148
  throw new Error(`convertRadix2: carry overflow pos=${s} from=${e}`);
@@ -160,8 +160,8 @@ function Be(r, e, t, n) {
160
160
  return n && s > 0 && l.push(o >>> 0), l;
161
161
  }
162
162
  // @__NO_SIDE_EFFECTS__
163
- function at(r) {
164
- T(r);
163
+ function it(r) {
164
+ j(r);
165
165
  const e = 2 ** 8;
166
166
  return {
167
167
  encode: (t) => {
@@ -169,12 +169,12 @@ function at(r) {
169
169
  throw new Error("radix.encode input should be Uint8Array");
170
170
  return Se(Array.from(t), e, r);
171
171
  },
172
- decode: (t) => (He("radix.decode", t), Uint8Array.from(Se(t, r, e)))
172
+ decode: (t) => (Oe("radix.decode", t), Uint8Array.from(Se(t, r, e)))
173
173
  };
174
174
  }
175
175
  // @__NO_SIDE_EFFECTS__
176
- function it(r, e = !1) {
177
- if (T(r), r <= 0 || r > 32)
176
+ function ct(r, e = !1) {
177
+ if (j(r), r <= 0 || r > 32)
178
178
  throw new Error("radix2: bits should be in (0..32]");
179
179
  if (/* @__PURE__ */ M(8, r) > 32 || /* @__PURE__ */ M(r, 8) > 32)
180
180
  throw new Error("radix2: carry overflow");
@@ -184,33 +184,33 @@ function it(r, e = !1) {
184
184
  throw new Error("radix2.encode input should be Uint8Array");
185
185
  return Be(Array.from(t), 8, r, !e);
186
186
  },
187
- decode: (t) => (He("radix2.decode", t), Uint8Array.from(Be(t, r, 8, e)))
187
+ decode: (t) => (Oe("radix2.decode", t), Uint8Array.from(Be(t, r, 8, e)))
188
188
  };
189
189
  }
190
- const ct = typeof Uint8Array.from([]).toBase64 == "function" && typeof Uint8Array.fromBase64 == "function", lt = (r, e) => {
190
+ const lt = typeof Uint8Array.from([]).toBase64 == "function" && typeof Uint8Array.fromBase64 == "function", ut = (r, e) => {
191
191
  P("base64", r);
192
192
  const t = /^[A-Za-z0-9=+/]+$/, n = "base64";
193
193
  if (r.length > 0 && !t.test(r))
194
194
  throw new Error("invalid base64");
195
195
  return Uint8Array.fromBase64(r, { alphabet: n, lastChunkHandling: "strict" });
196
- }, ut = ct ? {
196
+ }, dt = lt ? {
197
197
  encode(r) {
198
- return ot(r), r.toBase64();
198
+ return st(r), r.toBase64();
199
199
  },
200
200
  decode(r) {
201
- return lt(r);
201
+ return ut(r);
202
202
  }
203
- } : /* @__PURE__ */ Oe(/* @__PURE__ */ it(6), /* @__PURE__ */ Fe("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ st(6), /* @__PURE__ */ Me("")), dt = /* @__NO_SIDE_EFFECTS__ */ (r) => /* @__PURE__ */ Oe(/* @__PURE__ */ at(58), /* @__PURE__ */ Fe(r), /* @__PURE__ */ Me("")), ht = /* @__PURE__ */ dt("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
204
- function Ve({ coder: r, ipfs: e }, t) {
203
+ } : /* @__PURE__ */ Fe(/* @__PURE__ */ ct(6), /* @__PURE__ */ Me("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ at(6), /* @__PURE__ */ qe("")), ht = /* @__NO_SIDE_EFFECTS__ */ (r) => /* @__PURE__ */ Fe(/* @__PURE__ */ it(58), /* @__PURE__ */ Me(r), /* @__PURE__ */ qe("")), ft = /* @__PURE__ */ ht("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
204
+ function Ke({ coder: r, ipfs: e }, t) {
205
205
  return (n, o) => (t(n, o), r.decode(e && o ? n.substring(1) : n));
206
206
  }
207
- function Ke({ coder: r, ipfs: e }) {
207
+ function Ye({ coder: r, ipfs: e }) {
208
208
  return (t, n) => {
209
209
  const o = r.encode(h(t));
210
210
  return e && n ? `${e}${o}` : o;
211
211
  };
212
212
  }
213
- function Ye({
213
+ function We({
214
214
  chars: r,
215
215
  ipfs: e,
216
216
  type: t,
@@ -243,29 +243,29 @@ function Ye({
243
243
  }
244
244
  const pe = {
245
245
  chars: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",
246
- coder: ht,
246
+ coder: ft,
247
247
  ipfs: "z",
248
248
  type: "base58"
249
- }, We = /* @__PURE__ */ Ye(pe), Je = /* @__PURE__ */ Ve(pe, We), Ze = /* @__PURE__ */ Ke(pe);
250
- function Ge(r) {
251
- return (...e) => Vr(r(...e));
249
+ }, Je = /* @__PURE__ */ We(pe), Ze = /* @__PURE__ */ Ke(pe, Je), Ge = /* @__PURE__ */ Ye(pe);
250
+ function Xe(r) {
251
+ return (...e) => Kr(r(...e));
252
252
  }
253
253
  function K(r, e = 256, t, n) {
254
254
  const o = Math.ceil(e / 8), s = h(r);
255
255
  return t ? Ae(s, { dkLen: o, key: t }) : Ae(s, { dkLen: o });
256
256
  }
257
- const ft = /* @__PURE__ */ Ge(K), pt = V("SS58PRE");
258
- function Xe(r) {
259
- return K(I(pt, r), 512);
257
+ const pt = /* @__PURE__ */ Xe(K), gt = V("SS58PRE");
258
+ function Qe(r) {
259
+ return K(I(gt, r), 512);
260
260
  }
261
- function gt(r) {
261
+ function mt(r) {
262
262
  if (r[0] === void 0)
263
263
  throw new Error("Invalid address: first byte cannot be undefined");
264
264
  if (r[1] === void 0)
265
265
  throw new Error("Invalid address: second byte cannot be undefined");
266
266
  const e = r[0] & 64 ? 2 : 1, t = e === 1 ? r[0] : (r[0] & 63) << 2 | r[1] >> 6 | (r[1] & 63) << 8, n = [34 + e, 35 + e].includes(
267
267
  r.length
268
- ), o = r.length - (n ? 2 : 1), s = Xe(r.subarray(0, o));
268
+ ), o = r.length - (n ? 2 : 1), s = Qe(r.subarray(0, o));
269
269
  return [(r[0] & 128) === 0 && ![46, 47].includes(r[0]) && (n ? r[r.length - 2] === s[0] && r[r.length - 1] === s[1] : r[r.length - 1] === s[0]), o, e, t];
270
270
  }
271
271
  const L = {
@@ -277,13 +277,13 @@ const L = {
277
277
  function ge(r, e, t = -1) {
278
278
  if (!r)
279
279
  throw new Error("Invalid empty address passed");
280
- if (ze(r) || Ce(r))
280
+ if (Ce(r) || Le(r))
281
281
  return h(r);
282
282
  try {
283
- const n = Je(r);
283
+ const n = Ze(r);
284
284
  if (!L.allowedEncodedLengths.includes(n.length))
285
285
  throw new Error("Invalid decoded address length");
286
- const [o, s, i, a] = gt(n);
286
+ const [o, s, i, a] = mt(n);
287
287
  if (!o && !e)
288
288
  throw new Error("Invalid decoded address checksum");
289
289
  if (t !== -1 && t !== a)
@@ -295,7 +295,7 @@ function ge(r, e, t = -1) {
295
295
  throw new Error(`Decoding ${r}: ${n.message}`);
296
296
  }
297
297
  }
298
- function mt(r, e = L.prefix) {
298
+ function yt(r, e = L.prefix) {
299
299
  const t = ge(r);
300
300
  if (e < 0 || e > 16383 || [46, 47].includes(e))
301
301
  throw new Error("Out of range ss58Format specified");
@@ -310,19 +310,19 @@ function mt(r, e = L.prefix) {
310
310
  ],
311
311
  t
312
312
  );
313
- return Ze(
313
+ return Ge(
314
314
  I(
315
315
  n,
316
- Xe(n).subarray(0, [32, 33].includes(t.length) ? 2 : 1)
316
+ Qe(n).subarray(0, [32, 33].includes(t.length) ? 2 : 1)
317
317
  )
318
318
  );
319
319
  }
320
320
  const me = {
321
321
  chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
322
- coder: ut,
322
+ coder: dt,
323
323
  type: "base64",
324
324
  withPadding: !0
325
- }, Qe = /* @__PURE__ */ Ye(me), yt = /* @__PURE__ */ Ve(me, Qe), er = /* @__PURE__ */ Ke(me);
325
+ }, er = /* @__PURE__ */ We(me), wt = /* @__PURE__ */ Ke(me, er), rr = /* @__PURE__ */ Ye(me);
326
326
  function z(r, e) {
327
327
  return r << e | r >>> 32 - e;
328
328
  }
@@ -334,7 +334,7 @@ function X(r, e, t) {
334
334
  for (let n = 0; n < 4; n++)
335
335
  r[e + n] = t & 255, t >>>= 8;
336
336
  }
337
- function wt(r, e, t, n, o) {
337
+ function bt(r, e, t, n, o) {
338
338
  let s = 0;
339
339
  for (let i = 0; i < o; i++) s |= r[e + i] ^ t[n + i];
340
340
  return (1 & s - 1 >>> 8) - 1;
@@ -379,7 +379,7 @@ const se = new Uint8Array([
379
379
  32,
380
380
  107
381
381
  ]);
382
- function bt(r, e, t, n, o, s, i) {
382
+ function vt(r, e, t, n, o, s, i) {
383
383
  const a = new Uint8Array(16), l = new Uint8Array(64);
384
384
  let c, u;
385
385
  if (!o) return 0;
@@ -397,14 +397,14 @@ function bt(r, e, t, n, o, s, i) {
397
397
  }
398
398
  function ae(r, e, t, n, o, s, i) {
399
399
  const a = new Uint8Array(32);
400
- return oe(a, s, i, se, !0), bt(r, e, t, n, o, s.subarray(16), a);
400
+ return oe(a, s, i, se, !0), vt(r, e, t, n, o, s.subarray(16), a);
401
401
  }
402
402
  function Q(r, e) {
403
403
  let t = 0;
404
404
  for (let n = 0; n < 17; n++)
405
405
  t = t + (r[n] + e[n] | 0) | 0, r[n] = t & 255, t >>>= 8;
406
406
  }
407
- const vt = new Uint32Array([
407
+ const kt = new Uint32Array([
408
408
  5,
409
409
  0,
410
410
  0,
@@ -423,7 +423,7 @@ const vt = new Uint32Array([
423
423
  0,
424
424
  252
425
425
  ]);
426
- function rr(r, e, t, n, o, s) {
426
+ function tr(r, e, t, n, o, s) {
427
427
  let i, a, l;
428
428
  const c = new Uint32Array(17), u = new Uint32Array(17), d = new Uint32Array(17), p = new Uint32Array(17), b = new Uint32Array(17);
429
429
  for (a = 0; a < 17; a++) u[a] = d[a] = 0;
@@ -442,69 +442,69 @@ function rr(r, e, t, n, o, s) {
442
442
  l = l + d[16] | 0, d[16] = l;
443
443
  }
444
444
  for (a = 0; a < 17; a++) b[a] = d[a];
445
- Q(d, vt);
445
+ Q(d, kt);
446
446
  const w = -(d[16] >>> 7) | 0;
447
447
  for (a = 0; a < 17; a++) d[a] ^= w & (b[a] ^ d[a]);
448
448
  for (a = 0; a < 16; a++) p[a] = s[a + 16];
449
449
  for (p[16] = 0, Q(d, p), a = 0; a < 16; a++) r[e + a] = d[a];
450
450
  return 0;
451
451
  }
452
- function kt(r, e, t, n, o, s) {
452
+ function Et(r, e, t, n, o, s) {
453
453
  const i = new Uint8Array(16);
454
- return rr(i, 0, t, n, o, s), wt(r, e, i, 0, 16);
454
+ return tr(i, 0, t, n, o, s), bt(r, e, i, 0, 16);
455
455
  }
456
- function Et(r, e, t, n, o) {
456
+ function xt(r, e, t, n, o) {
457
457
  if (t < 32) return -1;
458
- ae(r, 0, e, 0, t, n, o), rr(r, 16, r, 32, t - 32, r);
458
+ ae(r, 0, e, 0, t, n, o), tr(r, 16, r, 32, t - 32, r);
459
459
  for (let s = 0; s < 16; s++) r[s] = 0;
460
460
  return 0;
461
461
  }
462
- function xt(r, e, t, n, o) {
462
+ function At(r, e, t, n, o) {
463
463
  const s = new Uint8Array(32);
464
- if (t < 32 || (ae(s, 0, null, 0, 32, n, o), kt(e, 16, e, 32, t - 32, s) !== 0)) return -1;
464
+ if (t < 32 || (ae(s, 0, null, 0, 32, n, o), Et(e, 16, e, 32, t - 32, s) !== 0)) return -1;
465
465
  ae(r, 0, e, 0, t, n, o);
466
466
  for (let i = 0; i < 32; i++) r[i] = 0;
467
467
  return 0;
468
468
  }
469
- const At = 32, Ut = 24, ie = 32, ce = 16;
470
- function tr(r, e) {
471
- if (r.length !== At) throw new Error("bad key size");
472
- if (e.length !== Ut)
469
+ const Ut = 32, St = 24, ie = 32, ce = 16;
470
+ function nr(r, e) {
471
+ if (r.length !== Ut) throw new Error("bad key size");
472
+ if (e.length !== St)
473
473
  throw new Error("bad nonce size");
474
474
  }
475
- function nr(...r) {
475
+ function or(...r) {
476
476
  for (let e = 0, t = r.length; e < t; e++)
477
477
  if (!(r[e] instanceof Uint8Array))
478
478
  throw new TypeError("unexpected type, use Uint8Array");
479
479
  }
480
- function St(r, e, t) {
481
- nr(r, e, t), tr(t, e);
480
+ function Bt(r, e, t) {
481
+ or(r, e, t), nr(t, e);
482
482
  const n = new Uint8Array(ie + r.length), o = new Uint8Array(n.length);
483
483
  for (let s = 0; s < r.length; s++)
484
484
  n[s + ie] = r[s];
485
- return Et(o, n, n.length, e, t), o.subarray(ce);
485
+ return xt(o, n, n.length, e, t), o.subarray(ce);
486
486
  }
487
- function Bt(r, e, t) {
488
- nr(r, e, t), tr(t, e);
487
+ function Rt(r, e, t) {
488
+ or(r, e, t), nr(t, e);
489
489
  const n = new Uint8Array(ce + r.length), o = new Uint8Array(n.length);
490
490
  for (let s = 0; s < r.length; s++)
491
491
  n[s + ce] = r[s];
492
- return n.length < 32 || xt(o, n, n.length, e, t) !== 0 ? null : o.subarray(ie);
492
+ return n.length < 32 || At(o, n, n.length, e, t) !== 0 ? null : o.subarray(ie);
493
493
  }
494
- function or(r, e, t) {
495
- return Bt(r, e, t);
494
+ function sr(r, e, t) {
495
+ return Rt(r, e, t);
496
496
  }
497
- const Rt = Kr.crypto;
498
- function $t(r) {
499
- return Rt.getRandomValues(r);
497
+ const $t = Yr.crypto;
498
+ function Nt(r) {
499
+ return $t.getRandomValues(r);
500
500
  }
501
501
  function _(r = 32) {
502
- return $t(new Uint8Array(r));
502
+ return Nt(new Uint8Array(r));
503
503
  }
504
- const Nt = /* @__PURE__ */ Ge(_);
505
- function Dt(r, e, t = _(24)) {
504
+ const Dt = /* @__PURE__ */ Xe(_);
505
+ function It(r, e, t = _(24)) {
506
506
  return {
507
- encrypted: St(r, t, e),
507
+ encrypted: Bt(r, t, e),
508
508
  nonce: t
509
509
  };
510
510
  }
@@ -513,22 +513,22 @@ const H = {
513
513
  p: 1,
514
514
  r: 8
515
515
  };
516
- function sr(r, e = _(), t = H, n) {
516
+ function ar(r, e = _(), t = H, n) {
517
517
  const o = h(r);
518
518
  return {
519
519
  params: t,
520
- password: jr(o, e, Yr({ dkLen: 64 }, t)),
520
+ password: jr(o, e, Wr({ dkLen: 64 }, t)),
521
521
  salt: e
522
522
  };
523
523
  }
524
- const ee = { isLe: !0 }, re = { bitLength: 32, isLe: !0 }, It = { bitLength: 256, isLe: !0 };
525
- function ar(r) {
524
+ const ee = { isLe: !0 }, re = { bitLength: 32, isLe: !0 }, Pt = { bitLength: 256, isLe: !0 };
525
+ function ir(r) {
526
526
  const e = r.subarray(0, 32), t = Z(r.subarray(32, 36), ee).toNumber(), n = Z(r.subarray(36, 40), ee).toNumber(), o = Z(r.subarray(40, 44), ee).toNumber();
527
527
  if (t !== H.N || n !== H.p || o !== H.r)
528
528
  throw new Error("Invalid injected scrypt params found");
529
529
  return { params: { N: t, p: n, r: o }, salt: e };
530
530
  }
531
- function Pt(r, { N: e, p: t, r: n }) {
531
+ function Tt(r, { N: e, p: t, r: n }) {
532
532
  return I(
533
533
  r,
534
534
  C(e, re),
@@ -539,7 +539,7 @@ function Pt(r, { N: e, p: t, r: n }) {
539
539
  const ye = [
540
540
  "scrypt",
541
541
  "xsalsa20-poly1305"
542
- ], ir = ["none"], cr = "3", le = 24, lr = 32 + 3 * 4;
542
+ ], cr = ["none"], lr = "3", le = 24, ur = 32 + 3 * 4;
543
543
  function jt(r, e, t = ye) {
544
544
  if (!r)
545
545
  throw new Error("No encrypted data available to decode");
@@ -549,31 +549,31 @@ function jt(r, e, t = ye) {
549
549
  if (e) {
550
550
  let o;
551
551
  if (t.includes("scrypt")) {
552
- const { params: s, salt: i } = ar(r);
553
- o = sr(e, i, s).password, r = r.subarray(lr);
552
+ const { params: s, salt: i } = ir(r);
553
+ o = ar(e, i, s).password, r = r.subarray(ur);
554
554
  } else
555
555
  o = V(e);
556
- n = or(
556
+ n = sr(
557
557
  r.subarray(le),
558
558
  r.subarray(0, le),
559
- Wr(o, 256, !0)
559
+ Jr(o, 256, !0)
560
560
  );
561
561
  }
562
562
  if (!n)
563
563
  throw new Error("Unable to decode using the supplied passphrase");
564
564
  return n;
565
565
  }
566
- function Tt(r, e, t) {
566
+ function _t(r, e, t) {
567
567
  return {
568
- encoded: er(r),
568
+ encoded: rr(r),
569
569
  encoding: {
570
570
  content: e,
571
- type: t ? ye : ir,
572
- version: cr
571
+ type: t ? ye : cr,
572
+ version: lr
573
573
  }
574
574
  };
575
575
  }
576
- const _t = /^\d+$/, zt = 32;
576
+ const zt = /^\d+$/, Ct = 32;
577
577
  var A, v;
578
578
  const ke = class ke {
579
579
  constructor() {
@@ -582,7 +582,7 @@ const ke = class ke {
582
582
  }
583
583
  static from(e) {
584
584
  const t = new ke(), [n, o] = e.startsWith("/") ? [e.substring(1), !0] : [e, !1];
585
- return t.soft(_t.test(n) ? new nt(n, 10) : n), o ? t.harden() : t;
585
+ return t.soft(zt.test(n) ? new ot(n, 10) : n), o ? t.harden() : t;
586
586
  }
587
587
  get chainCode() {
588
588
  return k(this, A);
@@ -600,7 +600,7 @@ const ke = class ke {
600
600
  return J(this, v, !0), this;
601
601
  }
602
602
  soft(e) {
603
- return Jr(e) || Zr(e) || Gr(e) ? this.soft(C(e, It)) : Ce(e) ? this.soft(Xr(e)) : Qr(e) ? this.soft(et(V(e))) : e.length > zt ? this.soft(K(e)) : (k(this, A).fill(0), k(this, A).set(e, 0), this);
603
+ return Zr(e) || Gr(e) || Xr(e) ? this.soft(C(e, Pt)) : Le(e) ? this.soft(Qr(e)) : et(e) ? this.soft(rt(V(e))) : e.length > Ct ? this.soft(K(e)) : (k(this, A).fill(0), k(this, A).set(e, 0), this);
604
604
  }
605
605
  soften() {
606
606
  return J(this, v, !1), this;
@@ -608,9 +608,9 @@ const ke = class ke {
608
608
  };
609
609
  A = new WeakMap(), v = new WeakMap();
610
610
  let ue = ke;
611
- const Ct = /\/(\/?)([^/]+)/g;
612
- function ur(r) {
613
- const e = r.match(Ct), t = [];
611
+ const Lt = /\/(\/?)([^/]+)/g;
612
+ function dr(r) {
613
+ const e = r.match(Lt), t = [];
614
614
  let n = "";
615
615
  if (e) {
616
616
  n = e.join("");
@@ -626,15 +626,15 @@ function ur(r) {
626
626
  path: t
627
627
  };
628
628
  }
629
- const Lt = /^(\w+( \w+)*)((\/\/?[^/]+)*)(\/\/\/(.*))?$/;
630
- function Ht(r) {
631
- const e = r.match(Lt);
629
+ const Ht = /^(\w+( \w+)*)((\/\/?[^/]+)*)(\/\/\/(.*))?$/;
630
+ function Ot(r) {
631
+ const e = r.match(Ht);
632
632
  if (e === null)
633
633
  throw new Error("Unable to match provided value to a secret URI");
634
634
  const [, t, , n, , , o] = e;
635
635
  if (!t)
636
636
  throw new Error("Unable to extract phrase from provided value");
637
- const { path: s } = ur(n || "");
637
+ const { path: s } = dr(n || "");
638
638
  return {
639
639
  derivePath: n || "",
640
640
  password: o,
@@ -642,16 +642,16 @@ function Ht(r) {
642
642
  phrase: t
643
643
  };
644
644
  }
645
- const dr = BigInt(0), hr = BigInt(3);
645
+ const hr = BigInt(0), fr = BigInt(3);
646
646
  function te(r) {
647
647
  if (typeof r == "string")
648
648
  return he(r);
649
- if (Te(r))
649
+ if (_e(r))
650
650
  return r;
651
651
  throw new Error("Wrong data");
652
652
  }
653
653
  function f(r, e, ...t) {
654
- if (!Te(e))
654
+ if (!_e(e))
655
655
  throw new Error(`${r}: Uint8Array expected`);
656
656
  if (t.length && !t.includes(e.length))
657
657
  throw new Error(`${r}: Uint8Array expected of length ${t}, not of length=${e.length}`);
@@ -661,17 +661,17 @@ function q(r, e) {
661
661
  throw new Error(`${r}: wrong u32 integer: ${e}`);
662
662
  return e;
663
663
  }
664
- function B(...r) {
664
+ function S(...r) {
665
665
  for (const e of r)
666
666
  e.fill(0);
667
667
  }
668
668
  const x = Uint8Array.of(), we = zr.CURVE.n;
669
669
  function Re(r, e) {
670
670
  f(r, e, 32);
671
- const t = S(e);
672
- return _e(r, t, dr, we), t;
671
+ const t = D(e);
672
+ return ze(r, t, hr, we), t;
673
673
  }
674
- const j = (r) => _r(r, we), N = 166, m = {
674
+ const T = (r) => _r(r, we), $ = 166, m = {
675
675
  I: 1,
676
676
  A: 2,
677
677
  C: 4,
@@ -681,29 +681,29 @@ const j = (r) => _r(r, we), N = 166, m = {
681
681
  };
682
682
  class be {
683
683
  constructor(e) {
684
- this.state = new Uint8Array(200), this.pos = 0, this.posBegin = 0, this.curFlags = 0, this.state.set([1, N + 2, 1, 0, 1, 96], 0), this.state.set(he("STROBEv1.0.2"), 6), this.state32 = Cr(this.state), this.keccakF1600(), this.metaAD(e, !1);
684
+ this.state = new Uint8Array(200), this.pos = 0, this.posBegin = 0, this.curFlags = 0, this.state.set([1, $ + 2, 1, 0, 1, 96], 0), this.state.set(he("STROBEv1.0.2"), 6), this.state32 = Cr(this.state), this.keccakF1600(), this.metaAD(e, !1);
685
685
  }
686
686
  keccakF1600() {
687
687
  Lr(this.state32);
688
688
  }
689
689
  runF() {
690
- this.state[this.pos] ^= this.posBegin, this.state[this.pos + 1] ^= 4, this.state[N + 1] ^= 128, this.keccakF1600(), this.pos = 0, this.posBegin = 0;
690
+ this.state[this.pos] ^= this.posBegin, this.state[this.pos + 1] ^= 4, this.state[$ + 1] ^= 128, this.keccakF1600(), this.pos = 0, this.posBegin = 0;
691
691
  }
692
692
  // keccak.update()
693
693
  absorb(e) {
694
694
  for (let t = 0; t < e.length; t++)
695
- this.state[this.pos++] ^= e[t], this.pos === N && this.runF();
695
+ this.state[this.pos++] ^= e[t], this.pos === $ && this.runF();
696
696
  }
697
697
  // keccak.xof()
698
698
  squeeze(e) {
699
699
  const t = new Uint8Array(e);
700
700
  for (let n = 0; n < t.length; n++)
701
- t[n] = this.state[this.pos], this.state[this.pos++] = 0, this.pos === N && this.runF();
701
+ t[n] = this.state[this.pos], this.state[this.pos++] = 0, this.pos === $ && this.runF();
702
702
  return t;
703
703
  }
704
704
  overwrite(e) {
705
705
  for (let t = 0; t < e.length; t++)
706
- this.state[this.pos++] = e[t], this.pos === N && this.runF();
706
+ this.state[this.pos++] = e[t], this.pos === $ && this.runF();
707
707
  }
708
708
  beginOp(e, t) {
709
709
  if (t) {
@@ -738,7 +738,7 @@ class be {
738
738
  this.state.fill(0), this.pos = 0, this.curFlags = 0, this.posBegin = 0;
739
739
  }
740
740
  }
741
- class Ot {
741
+ class Ft {
742
742
  constructor(e) {
743
743
  this.strobe = new be("Merlin v1.0"), this.appendMessage("dom-sep", e);
744
744
  }
@@ -752,7 +752,7 @@ class Ot {
752
752
  this.strobe.clean();
753
753
  }
754
754
  }
755
- class R extends Ot {
755
+ class B extends Ft {
756
756
  constructor(e, t = U) {
757
757
  super(e), this.rng = t;
758
758
  }
@@ -769,10 +769,10 @@ class R extends Ot {
769
769
  this.appendMessage(e, t.toRawBytes());
770
770
  }
771
771
  challengeScalar(e) {
772
- return j(S(this.challengeBytes(e, 64)));
772
+ return T(D(this.challengeBytes(e, 64)));
773
773
  }
774
774
  witnessScalar(e, t = []) {
775
- return j(S(this.witnessBytes(e, 64, t)));
775
+ return T(D(this.witnessBytes(e, 64, t)));
776
776
  }
777
777
  witnessBytes(e, t, n = []) {
778
778
  q("SigningContext.witnessBytes", t);
@@ -783,63 +783,63 @@ class R extends Ot {
783
783
  return o.metaAD("rng", !1), o.KEY(s, !1), o.metaAD(y(t, 4), !1), o.PRF(t, !1);
784
784
  }
785
785
  }
786
- const Ft = Hr(256), fr = (r) => y(r << hr & Ft, 32), $ = (r) => S(r) >> hr;
786
+ const Mt = Hr(256), pr = (r) => y(r << fr & Mt, 32), R = (r) => D(r) >> fr;
787
787
  function Y(r) {
788
788
  f("secretKey", r, 64);
789
- const e = $(r.subarray(0, 32));
789
+ const e = R(r.subarray(0, 32));
790
790
  return g.BASE.multiply(e).toRawBytes();
791
791
  }
792
- function pr(r) {
792
+ function gr(r) {
793
793
  f("seed", r, 32);
794
- const e = Tr(r);
794
+ const e = je(r);
795
795
  e[0] &= 248, e[31] &= 63, e[31] |= 64;
796
- const t = fr($(e.subarray(0, 32))), n = e.subarray(32, 64), o = D(t, n);
797
- return B(t, n, e), o;
796
+ const t = pr(R(e.subarray(0, 32))), n = e.subarray(32, 64), o = N(t, n);
797
+ return S(t, n, e), o;
798
798
  }
799
- const gr = he("substrate");
800
- function Mt(r, e, t = U) {
799
+ const mr = he("substrate");
800
+ function qt(r, e, t = U) {
801
801
  f("message", e), f("secretKey", r, 64);
802
- const n = new R("SigningContext", t);
803
- n.label(gr), n.bytes(e);
804
- const o = $(r.subarray(0, 32)), s = r.subarray(32, 64), i = g.fromHex(Y(r));
802
+ const n = new B("SigningContext", t);
803
+ n.label(mr), n.bytes(e);
804
+ const o = R(r.subarray(0, 32)), s = r.subarray(32, 64), i = g.fromHex(Y(r));
805
805
  n.protoName("Schnorr-sig"), n.commitPoint("sign:pk", i);
806
806
  const a = n.witnessScalar("signing", [s]), l = g.BASE.multiply(a);
807
807
  n.commitPoint("sign:R", l);
808
- const c = n.challengeScalar("sign:c"), u = j(c * o + a), d = D(l.toRawBytes(), y(u, 32));
808
+ const c = n.challengeScalar("sign:c"), u = T(c * o + a), d = N(l.toRawBytes(), y(u, 32));
809
809
  return d[63] |= 128, n.clean(), d;
810
810
  }
811
- function qt(r, e, t) {
811
+ function Vt(r, e, t) {
812
812
  if (f("message", r), f("signature", e, 64), f("publicKey", t, 32), (e[63] & 128) === 0)
813
813
  throw new Error("Schnorrkel marker missing");
814
814
  const n = Uint8Array.from(e.subarray(32, 64));
815
815
  n[31] &= 127;
816
- const o = g.fromHex(e.subarray(0, 32)), s = S(n);
817
- _e("s", s, dr, we);
818
- const i = new R("SigningContext");
819
- i.label(gr), i.bytes(r);
816
+ const o = g.fromHex(e.subarray(0, 32)), s = D(n);
817
+ ze("s", s, hr, we);
818
+ const i = new B("SigningContext");
819
+ i.label(mr), i.bytes(r);
820
820
  const a = g.fromHex(t);
821
821
  if (a.equals(g.ZERO))
822
822
  return !1;
823
823
  i.protoName("Schnorr-sig"), i.commitPoint("sign:pk", a), i.commitPoint("sign:R", o);
824
824
  const l = i.challengeScalar("sign:c"), c = g.BASE.multiply(s), u = a.negate().multiply(l).add(c);
825
- return i.clean(), B(n), u.equals(o);
825
+ return i.clean(), S(n), u.equals(o);
826
826
  }
827
- const mr = {
827
+ const yr = {
828
828
  secretSoft(r, e, t = U) {
829
829
  f("secretKey", r, 64), f("chainCode", e, 32);
830
- const n = $(r.subarray(0, 32)), o = r.subarray(32, 64), s = g.fromHex(Y(r)), i = new R("SchnorrRistrettoHDKD", t);
830
+ const n = R(r.subarray(0, 32)), o = r.subarray(32, 64), s = g.fromHex(Y(r)), i = new B("SchnorrRistrettoHDKD", t);
831
831
  i.bytes(x), i.appendMessage("chain-code", e), i.commitPoint("public-key", s);
832
- const a = i.challengeScalar("HDKD-scalar"), l = i.challengeBytes("HDKD-chaincode", 32), c = D(y(n, 32), o), u = i.witnessBytes("HDKD-nonce", 32, [o, c]), d = fr(j(n + a)), p = D(d, u);
833
- return B(d, u, c, l), i.clean(), p;
832
+ const a = i.challengeScalar("HDKD-scalar"), l = i.challengeBytes("HDKD-chaincode", 32), c = N(y(n, 32), o), u = i.witnessBytes("HDKD-nonce", 32, [o, c]), d = pr(T(n + a)), p = N(d, u);
833
+ return S(d, u, c, l), i.clean(), p;
834
834
  },
835
835
  secretHard(r, e) {
836
836
  f("secretKey", r, 64), f("chainCode", e, 32);
837
- const t = y($(r.subarray(0, 32)), 32), n = new R("SchnorrRistrettoHDKD");
837
+ const t = y(R(r.subarray(0, 32)), 32), n = new B("SchnorrRistrettoHDKD");
838
838
  n.bytes(x), n.appendMessage("chain-code", e), n.appendMessage("secret-key", t);
839
839
  const o = n.challengeBytes("HDKD-hard", 32), s = n.challengeBytes("HDKD-chaincode", 32);
840
840
  n.clean();
841
- const i = pr(o);
842
- return B(t, o, s), n.clean(), i;
841
+ const i = gr(o);
842
+ return S(t, o, s), n.clean(), i;
843
843
  }
844
844
  }, $e = {
845
845
  proove(r, e, t, n, o, s) {
@@ -848,7 +848,7 @@ const mr = {
848
848
  n.commitPoint("vrf:R=g^r", a);
849
849
  const l = o.multiply(i);
850
850
  n.commitPoint("vrf:h^r", l), n.commitPoint("vrf:pk", t), n.commitPoint("vrf:h^sk", s);
851
- const c = n.challengeScalar("prove"), u = j(i - c * r);
851
+ const c = n.challengeScalar("prove"), u = T(i - c * r);
852
852
  return { proof: { c, s: u }, proofBatchable: { R: a, Hr: l, s: u } };
853
853
  },
854
854
  verify(r, e, t, n, o) {
@@ -864,16 +864,16 @@ const mr = {
864
864
  }
865
865
  };
866
866
  function Ne(r, e, t, n, o = U) {
867
- const s = new R("SigningContext", o);
867
+ const s = new B("SigningContext", o);
868
868
  s.label(r), s.bytes(e), s.commitPoint("vrf-nm-pk", n);
869
- const i = s.challengeBytes("VRFHash", 64), a = g.hashToCurve(i), l = new R("VRF", o);
870
- return t.length && l.label(t), s.clean(), B(i), { input: a, t: l };
869
+ const i = s.challengeBytes("VRFHash", 64), a = g.hashToCurve(i), l = new B("VRF", o);
870
+ return t.length && l.label(t), s.clean(), S(i), { input: a, t: l };
871
871
  }
872
- const yr = {
872
+ const wr = {
873
873
  sign(r, e, t = x, n = x, o = U) {
874
874
  f("msg", r), f("secretKey", e, 64), f("ctx", t), f("extra", n);
875
- const s = $(e.subarray(0, 32)), i = e.subarray(32, 64), a = g.fromHex(Y(e)), { input: l, t: c } = Ne(t, r, n, a, o), u = l.multiply(s), d = { output: u }, { proof: p } = $e.proove(s, i, a, c, l, u), b = y(p.c, 32), w = y(p.s, 32), Pr = D(d.output.toRawBytes(), b, w);
876
- return B(i, b, w), Pr;
875
+ const s = R(e.subarray(0, 32)), i = e.subarray(32, 64), a = g.fromHex(Y(e)), { input: l, t: c } = Ne(t, r, n, a, o), u = l.multiply(s), d = { output: u }, { proof: p } = $e.proove(s, i, a, c, l, u), b = y(p.c, 32), w = y(p.s, 32), Tr = N(d.output.toRawBytes(), b, w);
876
+ return S(i, b, w), Tr;
877
877
  },
878
878
  verify(r, e, t, n = x, o = x, s = U) {
879
879
  f("msg", r), f("signature", e, 96), f("pubkey", t, 32), f("ctx", n), f("extra", o);
@@ -888,8 +888,8 @@ const yr = {
888
888
  throw new Error("vrf.verify: wrong output point (identity)");
889
889
  return $e.verify(i, c, l, u, a) !== !1;
890
890
  }
891
- }, de = 64, Vt = 32, ne = de + Vt;
892
- function Kt(r) {
891
+ }, de = 64, Kt = 32, ne = de + Kt;
892
+ function Yt(r) {
893
893
  const e = h(r);
894
894
  if (e.length !== ne)
895
895
  throw new Error(
@@ -900,20 +900,20 @@ function Kt(r) {
900
900
  secretKey: e.slice(0, de)
901
901
  };
902
902
  }
903
- function wr(r) {
903
+ function br(r) {
904
904
  return (e, t) => {
905
- if (!ze(t) || t.length !== 32)
905
+ if (!Ce(t) || t.length !== 32)
906
906
  throw new Error("Invalid chainCode passed to derive");
907
907
  const n = r(e.secretKey, t), o = Y(n);
908
- return Kt(I(n, o));
908
+ return Yt(I(n, o));
909
909
  };
910
910
  }
911
- const br = /* @__PURE__ */ wr(mr.secretHard), vr = /* @__PURE__ */ wr(mr.secretSoft);
912
- function kr(r, { chainCode: e, isSoft: t }) {
913
- return t ? vr(r, e) : br(r, e);
911
+ const vr = /* @__PURE__ */ br(yr.secretHard), kr = /* @__PURE__ */ br(yr.secretSoft);
912
+ function Er(r, { chainCode: e, isSoft: t }) {
913
+ return t ? kr(r, e) : vr(r, e);
914
914
  }
915
915
  const De = {
916
- sr25519: kr,
916
+ sr25519: Er,
917
917
  ecdsa: () => {
918
918
  throw new Error("ECDSA key derivation not implemented yet");
919
919
  },
@@ -924,7 +924,7 @@ const De = {
924
924
  throw new Error("Ethereum key derivation not implemented yet");
925
925
  }
926
926
  };
927
- function Yt(r, e, t) {
927
+ function Wt(r, e, t) {
928
928
  if (!t)
929
929
  throw new Error("Invalid type provided");
930
930
  if (!De[t])
@@ -935,34 +935,34 @@ function Yt(r, e, t) {
935
935
  o = n(o, s);
936
936
  return o;
937
937
  }
938
- function Er(r, e = _(), t = 2048, n) {
938
+ function xr(r, e = _(), t = 2048, n) {
939
939
  const o = h(r), s = h(e);
940
940
  return {
941
- password: Or(Fr, o, s, { c: t, dkLen: 64 }),
941
+ password: Or(je, o, s, { c: t, dkLen: 64 }),
942
942
  rounds: t,
943
943
  salt: e
944
944
  };
945
945
  }
946
- const xr = { 256: Mr }, Ar = xr[256], Ur = "abandon|ability|able|about|above|absent|absorb|abstract|absurd|abuse|access|accident|account|accuse|achieve|acid|acoustic|acquire|across|act|action|actor|actress|actual|adapt|add|addict|address|adjust|admit|adult|advance|advice|aerobic|affair|afford|afraid|again|age|agent|agree|ahead|aim|air|airport|aisle|alarm|album|alcohol|alert|alien|all|alley|allow|almost|alone|alpha|already|also|alter|always|amateur|amazing|among|amount|amused|analyst|anchor|ancient|anger|angle|angry|animal|ankle|announce|annual|another|answer|antenna|antique|anxiety|any|apart|apology|appear|apple|approve|april|arch|arctic|area|arena|argue|arm|armed|armor|army|around|arrange|arrest|arrive|arrow|art|artefact|artist|artwork|ask|aspect|assault|asset|assist|assume|asthma|athlete|atom|attack|attend|attitude|attract|auction|audit|august|aunt|author|auto|autumn|average|avocado|avoid|awake|aware|away|awesome|awful|awkward|axis|baby|bachelor|bacon|badge|bag|balance|balcony|ball|bamboo|banana|banner|bar|barely|bargain|barrel|base|basic|basket|battle|beach|bean|beauty|because|become|beef|before|begin|behave|behind|believe|below|belt|bench|benefit|best|betray|better|between|beyond|bicycle|bid|bike|bind|biology|bird|birth|bitter|black|blade|blame|blanket|blast|bleak|bless|blind|blood|blossom|blouse|blue|blur|blush|board|boat|body|boil|bomb|bone|bonus|book|boost|border|boring|borrow|boss|bottom|bounce|box|boy|bracket|brain|brand|brass|brave|bread|breeze|brick|bridge|brief|bright|bring|brisk|broccoli|broken|bronze|broom|brother|brown|brush|bubble|buddy|budget|buffalo|build|bulb|bulk|bullet|bundle|bunker|burden|burger|burst|bus|business|busy|butter|buyer|buzz|cabbage|cabin|cable|cactus|cage|cake|call|calm|camera|camp|can|canal|cancel|candy|cannon|canoe|canvas|canyon|capable|capital|captain|car|carbon|card|cargo|carpet|carry|cart|case|cash|casino|castle|casual|cat|catalog|catch|category|cattle|caught|cause|caution|cave|ceiling|celery|cement|census|century|cereal|certain|chair|chalk|champion|change|chaos|chapter|charge|chase|chat|cheap|check|cheese|chef|cherry|chest|chicken|chief|child|chimney|choice|choose|chronic|chuckle|chunk|churn|cigar|cinnamon|circle|citizen|city|civil|claim|clap|clarify|claw|clay|clean|clerk|clever|click|client|cliff|climb|clinic|clip|clock|clog|close|cloth|cloud|clown|club|clump|cluster|clutch|coach|coast|coconut|code|coffee|coil|coin|collect|color|column|combine|come|comfort|comic|common|company|concert|conduct|confirm|congress|connect|consider|control|convince|cook|cool|copper|copy|coral|core|corn|correct|cost|cotton|couch|country|couple|course|cousin|cover|coyote|crack|cradle|craft|cram|crane|crash|crater|crawl|crazy|cream|credit|creek|crew|cricket|crime|crisp|critic|crop|cross|crouch|crowd|crucial|cruel|cruise|crumble|crunch|crush|cry|crystal|cube|culture|cup|cupboard|curious|current|curtain|curve|cushion|custom|cute|cycle|dad|damage|damp|dance|danger|daring|dash|daughter|dawn|day|deal|debate|debris|decade|december|decide|decline|decorate|decrease|deer|defense|define|defy|degree|delay|deliver|demand|demise|denial|dentist|deny|depart|depend|deposit|depth|deputy|derive|describe|desert|design|desk|despair|destroy|detail|detect|develop|device|devote|diagram|dial|diamond|diary|dice|diesel|diet|differ|digital|dignity|dilemma|dinner|dinosaur|direct|dirt|disagree|discover|disease|dish|dismiss|disorder|display|distance|divert|divide|divorce|dizzy|doctor|document|dog|doll|dolphin|domain|donate|donkey|donor|door|dose|double|dove|draft|dragon|drama|drastic|draw|dream|dress|drift|drill|drink|drip|drive|drop|drum|dry|duck|dumb|dune|during|dust|dutch|duty|dwarf|dynamic|eager|eagle|early|earn|earth|easily|east|easy|echo|ecology|economy|edge|edit|educate|effort|egg|eight|either|elbow|elder|electric|elegant|element|elephant|elevator|elite|else|embark|embody|embrace|emerge|emotion|employ|empower|empty|enable|enact|end|endless|endorse|enemy|energy|enforce|engage|engine|enhance|enjoy|enlist|enough|enrich|enroll|ensure|enter|entire|entry|envelope|episode|equal|equip|era|erase|erode|erosion|error|erupt|escape|essay|essence|estate|eternal|ethics|evidence|evil|evoke|evolve|exact|example|excess|exchange|excite|exclude|excuse|execute|exercise|exhaust|exhibit|exile|exist|exit|exotic|expand|expect|expire|explain|expose|express|extend|extra|eye|eyebrow|fabric|face|faculty|fade|faint|faith|fall|false|fame|family|famous|fan|fancy|fantasy|farm|fashion|fat|fatal|father|fatigue|fault|favorite|feature|february|federal|fee|feed|feel|female|fence|festival|fetch|fever|few|fiber|fiction|field|figure|file|film|filter|final|find|fine|finger|finish|fire|firm|first|fiscal|fish|fit|fitness|fix|flag|flame|flash|flat|flavor|flee|flight|flip|float|flock|floor|flower|fluid|flush|fly|foam|focus|fog|foil|fold|follow|food|foot|force|forest|forget|fork|fortune|forum|forward|fossil|foster|found|fox|fragile|frame|frequent|fresh|friend|fringe|frog|front|frost|frown|frozen|fruit|fuel|fun|funny|furnace|fury|future|gadget|gain|galaxy|gallery|game|gap|garage|garbage|garden|garlic|garment|gas|gasp|gate|gather|gauge|gaze|general|genius|genre|gentle|genuine|gesture|ghost|giant|gift|giggle|ginger|giraffe|girl|give|glad|glance|glare|glass|glide|glimpse|globe|gloom|glory|glove|glow|glue|goat|goddess|gold|good|goose|gorilla|gospel|gossip|govern|gown|grab|grace|grain|grant|grape|grass|gravity|great|green|grid|grief|grit|grocery|group|grow|grunt|guard|guess|guide|guilt|guitar|gun|gym|habit|hair|half|hammer|hamster|hand|happy|harbor|hard|harsh|harvest|hat|have|hawk|hazard|head|health|heart|heavy|hedgehog|height|hello|helmet|help|hen|hero|hidden|high|hill|hint|hip|hire|history|hobby|hockey|hold|hole|holiday|hollow|home|honey|hood|hope|horn|horror|horse|hospital|host|hotel|hour|hover|hub|huge|human|humble|humor|hundred|hungry|hunt|hurdle|hurry|hurt|husband|hybrid|ice|icon|idea|identify|idle|ignore|ill|illegal|illness|image|imitate|immense|immune|impact|impose|improve|impulse|inch|include|income|increase|index|indicate|indoor|industry|infant|inflict|inform|inhale|inherit|initial|inject|injury|inmate|inner|innocent|input|inquiry|insane|insect|inside|inspire|install|intact|interest|into|invest|invite|involve|iron|island|isolate|issue|item|ivory|jacket|jaguar|jar|jazz|jealous|jeans|jelly|jewel|job|join|joke|journey|joy|judge|juice|jump|jungle|junior|junk|just|kangaroo|keen|keep|ketchup|key|kick|kid|kidney|kind|kingdom|kiss|kit|kitchen|kite|kitten|kiwi|knee|knife|knock|know|lab|label|labor|ladder|lady|lake|lamp|language|laptop|large|later|latin|laugh|laundry|lava|law|lawn|lawsuit|layer|lazy|leader|leaf|learn|leave|lecture|left|leg|legal|legend|leisure|lemon|lend|length|lens|leopard|lesson|letter|level|liar|liberty|library|license|life|lift|light|like|limb|limit|link|lion|liquid|list|little|live|lizard|load|loan|lobster|local|lock|logic|lonely|long|loop|lottery|loud|lounge|love|loyal|lucky|luggage|lumber|lunar|lunch|luxury|lyrics|machine|mad|magic|magnet|maid|mail|main|major|make|mammal|man|manage|mandate|mango|mansion|manual|maple|marble|march|margin|marine|market|marriage|mask|mass|master|match|material|math|matrix|matter|maximum|maze|meadow|mean|measure|meat|mechanic|medal|media|melody|melt|member|memory|mention|menu|mercy|merge|merit|merry|mesh|message|metal|method|middle|midnight|milk|million|mimic|mind|minimum|minor|minute|miracle|mirror|misery|miss|mistake|mix|mixed|mixture|mobile|model|modify|mom|moment|monitor|monkey|monster|month|moon|moral|more|morning|mosquito|mother|motion|motor|mountain|mouse|move|movie|much|muffin|mule|multiply|muscle|museum|mushroom|music|must|mutual|myself|mystery|myth|naive|name|napkin|narrow|nasty|nation|nature|near|neck|need|negative|neglect|neither|nephew|nerve|nest|net|network|neutral|never|news|next|nice|night|noble|noise|nominee|noodle|normal|north|nose|notable|note|nothing|notice|novel|now|nuclear|number|nurse|nut|oak|obey|object|oblige|obscure|observe|obtain|obvious|occur|ocean|october|odor|off|offer|office|often|oil|okay|old|olive|olympic|omit|once|one|onion|online|only|open|opera|opinion|oppose|option|orange|orbit|orchard|order|ordinary|organ|orient|original|orphan|ostrich|other|outdoor|outer|output|outside|oval|oven|over|own|owner|oxygen|oyster|ozone|pact|paddle|page|pair|palace|palm|panda|panel|panic|panther|paper|parade|parent|park|parrot|party|pass|patch|path|patient|patrol|pattern|pause|pave|payment|peace|peanut|pear|peasant|pelican|pen|penalty|pencil|people|pepper|perfect|permit|person|pet|phone|photo|phrase|physical|piano|picnic|picture|piece|pig|pigeon|pill|pilot|pink|pioneer|pipe|pistol|pitch|pizza|place|planet|plastic|plate|play|please|pledge|pluck|plug|plunge|poem|poet|point|polar|pole|police|pond|pony|pool|popular|portion|position|possible|post|potato|pottery|poverty|powder|power|practice|praise|predict|prefer|prepare|present|pretty|prevent|price|pride|primary|print|priority|prison|private|prize|problem|process|produce|profit|program|project|promote|proof|property|prosper|protect|proud|provide|public|pudding|pull|pulp|pulse|pumpkin|punch|pupil|puppy|purchase|purity|purpose|purse|push|put|puzzle|pyramid|quality|quantum|quarter|question|quick|quit|quiz|quote|rabbit|raccoon|race|rack|radar|radio|rail|rain|raise|rally|ramp|ranch|random|range|rapid|rare|rate|rather|raven|raw|razor|ready|real|reason|rebel|rebuild|recall|receive|recipe|record|recycle|reduce|reflect|reform|refuse|region|regret|regular|reject|relax|release|relief|rely|remain|remember|remind|remove|render|renew|rent|reopen|repair|repeat|replace|report|require|rescue|resemble|resist|resource|response|result|retire|retreat|return|reunion|reveal|review|reward|rhythm|rib|ribbon|rice|rich|ride|ridge|rifle|right|rigid|ring|riot|ripple|risk|ritual|rival|river|road|roast|robot|robust|rocket|romance|roof|rookie|room|rose|rotate|rough|round|route|royal|rubber|rude|rug|rule|run|runway|rural|sad|saddle|sadness|safe|sail|salad|salmon|salon|salt|salute|same|sample|sand|satisfy|satoshi|sauce|sausage|save|say|scale|scan|scare|scatter|scene|scheme|school|science|scissors|scorpion|scout|scrap|screen|script|scrub|sea|search|season|seat|second|secret|section|security|seed|seek|segment|select|sell|seminar|senior|sense|sentence|series|service|session|settle|setup|seven|shadow|shaft|shallow|share|shed|shell|sheriff|shield|shift|shine|ship|shiver|shock|shoe|shoot|shop|short|shoulder|shove|shrimp|shrug|shuffle|shy|sibling|sick|side|siege|sight|sign|silent|silk|silly|silver|similar|simple|since|sing|siren|sister|situate|six|size|skate|sketch|ski|skill|skin|skirt|skull|slab|slam|sleep|slender|slice|slide|slight|slim|slogan|slot|slow|slush|small|smart|smile|smoke|smooth|snack|snake|snap|sniff|snow|soap|soccer|social|sock|soda|soft|solar|soldier|solid|solution|solve|someone|song|soon|sorry|sort|soul|sound|soup|source|south|space|spare|spatial|spawn|speak|special|speed|spell|spend|sphere|spice|spider|spike|spin|spirit|split|spoil|sponsor|spoon|sport|spot|spray|spread|spring|spy|square|squeeze|squirrel|stable|stadium|staff|stage|stairs|stamp|stand|start|state|stay|steak|steel|stem|step|stereo|stick|still|sting|stock|stomach|stone|stool|story|stove|strategy|street|strike|strong|struggle|student|stuff|stumble|style|subject|submit|subway|success|such|sudden|suffer|sugar|suggest|suit|summer|sun|sunny|sunset|super|supply|supreme|sure|surface|surge|surprise|surround|survey|suspect|sustain|swallow|swamp|swap|swarm|swear|sweet|swift|swim|swing|switch|sword|symbol|symptom|syrup|system|table|tackle|tag|tail|talent|talk|tank|tape|target|task|taste|tattoo|taxi|teach|team|tell|ten|tenant|tennis|tent|term|test|text|thank|that|theme|then|theory|there|they|thing|this|thought|three|thrive|throw|thumb|thunder|ticket|tide|tiger|tilt|timber|time|tiny|tip|tired|tissue|title|toast|tobacco|today|toddler|toe|together|toilet|token|tomato|tomorrow|tone|tongue|tonight|tool|tooth|top|topic|topple|torch|tornado|tortoise|toss|total|tourist|toward|tower|town|toy|track|trade|traffic|tragic|train|transfer|trap|trash|travel|tray|treat|tree|trend|trial|tribe|trick|trigger|trim|trip|trophy|trouble|truck|true|truly|trumpet|trust|truth|try|tube|tuition|tumble|tuna|tunnel|turkey|turn|turtle|twelve|twenty|twice|twin|twist|two|type|typical|ugly|umbrella|unable|unaware|uncle|uncover|under|undo|unfair|unfold|unhappy|uniform|unique|unit|universe|unknown|unlock|until|unusual|unveil|update|upgrade|uphold|upon|upper|upset|urban|urge|usage|use|used|useful|useless|usual|utility|vacant|vacuum|vague|valid|valley|valve|van|vanish|vapor|various|vast|vault|vehicle|velvet|vendor|venture|venue|verb|verify|version|very|vessel|veteran|viable|vibrant|vicious|victory|video|view|village|vintage|violin|virtual|virus|visa|visit|visual|vital|vivid|vocal|voice|void|volcano|volume|vote|voyage|wage|wagon|wait|walk|wall|walnut|want|warfare|warm|warrior|wash|wasp|waste|water|wave|way|wealth|weapon|wear|weasel|weather|web|wedding|weekend|weird|welcome|west|wet|whale|what|wheat|wheel|when|where|whip|whisper|wide|width|wife|wild|will|win|window|wine|wing|wink|winner|winter|wire|wisdom|wise|wish|witness|wolf|woman|wonder|wood|wool|word|work|world|worry|worth|wrap|wreck|wrestle|wrist|write|wrong|yard|year|yellow|you|young|youth|zebra|zero|zone|zoo".split(
946
+ const Ar = { 256: Fr }, Ur = Ar[256], Sr = "abandon|ability|able|about|above|absent|absorb|abstract|absurd|abuse|access|accident|account|accuse|achieve|acid|acoustic|acquire|across|act|action|actor|actress|actual|adapt|add|addict|address|adjust|admit|adult|advance|advice|aerobic|affair|afford|afraid|again|age|agent|agree|ahead|aim|air|airport|aisle|alarm|album|alcohol|alert|alien|all|alley|allow|almost|alone|alpha|already|also|alter|always|amateur|amazing|among|amount|amused|analyst|anchor|ancient|anger|angle|angry|animal|ankle|announce|annual|another|answer|antenna|antique|anxiety|any|apart|apology|appear|apple|approve|april|arch|arctic|area|arena|argue|arm|armed|armor|army|around|arrange|arrest|arrive|arrow|art|artefact|artist|artwork|ask|aspect|assault|asset|assist|assume|asthma|athlete|atom|attack|attend|attitude|attract|auction|audit|august|aunt|author|auto|autumn|average|avocado|avoid|awake|aware|away|awesome|awful|awkward|axis|baby|bachelor|bacon|badge|bag|balance|balcony|ball|bamboo|banana|banner|bar|barely|bargain|barrel|base|basic|basket|battle|beach|bean|beauty|because|become|beef|before|begin|behave|behind|believe|below|belt|bench|benefit|best|betray|better|between|beyond|bicycle|bid|bike|bind|biology|bird|birth|bitter|black|blade|blame|blanket|blast|bleak|bless|blind|blood|blossom|blouse|blue|blur|blush|board|boat|body|boil|bomb|bone|bonus|book|boost|border|boring|borrow|boss|bottom|bounce|box|boy|bracket|brain|brand|brass|brave|bread|breeze|brick|bridge|brief|bright|bring|brisk|broccoli|broken|bronze|broom|brother|brown|brush|bubble|buddy|budget|buffalo|build|bulb|bulk|bullet|bundle|bunker|burden|burger|burst|bus|business|busy|butter|buyer|buzz|cabbage|cabin|cable|cactus|cage|cake|call|calm|camera|camp|can|canal|cancel|candy|cannon|canoe|canvas|canyon|capable|capital|captain|car|carbon|card|cargo|carpet|carry|cart|case|cash|casino|castle|casual|cat|catalog|catch|category|cattle|caught|cause|caution|cave|ceiling|celery|cement|census|century|cereal|certain|chair|chalk|champion|change|chaos|chapter|charge|chase|chat|cheap|check|cheese|chef|cherry|chest|chicken|chief|child|chimney|choice|choose|chronic|chuckle|chunk|churn|cigar|cinnamon|circle|citizen|city|civil|claim|clap|clarify|claw|clay|clean|clerk|clever|click|client|cliff|climb|clinic|clip|clock|clog|close|cloth|cloud|clown|club|clump|cluster|clutch|coach|coast|coconut|code|coffee|coil|coin|collect|color|column|combine|come|comfort|comic|common|company|concert|conduct|confirm|congress|connect|consider|control|convince|cook|cool|copper|copy|coral|core|corn|correct|cost|cotton|couch|country|couple|course|cousin|cover|coyote|crack|cradle|craft|cram|crane|crash|crater|crawl|crazy|cream|credit|creek|crew|cricket|crime|crisp|critic|crop|cross|crouch|crowd|crucial|cruel|cruise|crumble|crunch|crush|cry|crystal|cube|culture|cup|cupboard|curious|current|curtain|curve|cushion|custom|cute|cycle|dad|damage|damp|dance|danger|daring|dash|daughter|dawn|day|deal|debate|debris|decade|december|decide|decline|decorate|decrease|deer|defense|define|defy|degree|delay|deliver|demand|demise|denial|dentist|deny|depart|depend|deposit|depth|deputy|derive|describe|desert|design|desk|despair|destroy|detail|detect|develop|device|devote|diagram|dial|diamond|diary|dice|diesel|diet|differ|digital|dignity|dilemma|dinner|dinosaur|direct|dirt|disagree|discover|disease|dish|dismiss|disorder|display|distance|divert|divide|divorce|dizzy|doctor|document|dog|doll|dolphin|domain|donate|donkey|donor|door|dose|double|dove|draft|dragon|drama|drastic|draw|dream|dress|drift|drill|drink|drip|drive|drop|drum|dry|duck|dumb|dune|during|dust|dutch|duty|dwarf|dynamic|eager|eagle|early|earn|earth|easily|east|easy|echo|ecology|economy|edge|edit|educate|effort|egg|eight|either|elbow|elder|electric|elegant|element|elephant|elevator|elite|else|embark|embody|embrace|emerge|emotion|employ|empower|empty|enable|enact|end|endless|endorse|enemy|energy|enforce|engage|engine|enhance|enjoy|enlist|enough|enrich|enroll|ensure|enter|entire|entry|envelope|episode|equal|equip|era|erase|erode|erosion|error|erupt|escape|essay|essence|estate|eternal|ethics|evidence|evil|evoke|evolve|exact|example|excess|exchange|excite|exclude|excuse|execute|exercise|exhaust|exhibit|exile|exist|exit|exotic|expand|expect|expire|explain|expose|express|extend|extra|eye|eyebrow|fabric|face|faculty|fade|faint|faith|fall|false|fame|family|famous|fan|fancy|fantasy|farm|fashion|fat|fatal|father|fatigue|fault|favorite|feature|february|federal|fee|feed|feel|female|fence|festival|fetch|fever|few|fiber|fiction|field|figure|file|film|filter|final|find|fine|finger|finish|fire|firm|first|fiscal|fish|fit|fitness|fix|flag|flame|flash|flat|flavor|flee|flight|flip|float|flock|floor|flower|fluid|flush|fly|foam|focus|fog|foil|fold|follow|food|foot|force|forest|forget|fork|fortune|forum|forward|fossil|foster|found|fox|fragile|frame|frequent|fresh|friend|fringe|frog|front|frost|frown|frozen|fruit|fuel|fun|funny|furnace|fury|future|gadget|gain|galaxy|gallery|game|gap|garage|garbage|garden|garlic|garment|gas|gasp|gate|gather|gauge|gaze|general|genius|genre|gentle|genuine|gesture|ghost|giant|gift|giggle|ginger|giraffe|girl|give|glad|glance|glare|glass|glide|glimpse|globe|gloom|glory|glove|glow|glue|goat|goddess|gold|good|goose|gorilla|gospel|gossip|govern|gown|grab|grace|grain|grant|grape|grass|gravity|great|green|grid|grief|grit|grocery|group|grow|grunt|guard|guess|guide|guilt|guitar|gun|gym|habit|hair|half|hammer|hamster|hand|happy|harbor|hard|harsh|harvest|hat|have|hawk|hazard|head|health|heart|heavy|hedgehog|height|hello|helmet|help|hen|hero|hidden|high|hill|hint|hip|hire|history|hobby|hockey|hold|hole|holiday|hollow|home|honey|hood|hope|horn|horror|horse|hospital|host|hotel|hour|hover|hub|huge|human|humble|humor|hundred|hungry|hunt|hurdle|hurry|hurt|husband|hybrid|ice|icon|idea|identify|idle|ignore|ill|illegal|illness|image|imitate|immense|immune|impact|impose|improve|impulse|inch|include|income|increase|index|indicate|indoor|industry|infant|inflict|inform|inhale|inherit|initial|inject|injury|inmate|inner|innocent|input|inquiry|insane|insect|inside|inspire|install|intact|interest|into|invest|invite|involve|iron|island|isolate|issue|item|ivory|jacket|jaguar|jar|jazz|jealous|jeans|jelly|jewel|job|join|joke|journey|joy|judge|juice|jump|jungle|junior|junk|just|kangaroo|keen|keep|ketchup|key|kick|kid|kidney|kind|kingdom|kiss|kit|kitchen|kite|kitten|kiwi|knee|knife|knock|know|lab|label|labor|ladder|lady|lake|lamp|language|laptop|large|later|latin|laugh|laundry|lava|law|lawn|lawsuit|layer|lazy|leader|leaf|learn|leave|lecture|left|leg|legal|legend|leisure|lemon|lend|length|lens|leopard|lesson|letter|level|liar|liberty|library|license|life|lift|light|like|limb|limit|link|lion|liquid|list|little|live|lizard|load|loan|lobster|local|lock|logic|lonely|long|loop|lottery|loud|lounge|love|loyal|lucky|luggage|lumber|lunar|lunch|luxury|lyrics|machine|mad|magic|magnet|maid|mail|main|major|make|mammal|man|manage|mandate|mango|mansion|manual|maple|marble|march|margin|marine|market|marriage|mask|mass|master|match|material|math|matrix|matter|maximum|maze|meadow|mean|measure|meat|mechanic|medal|media|melody|melt|member|memory|mention|menu|mercy|merge|merit|merry|mesh|message|metal|method|middle|midnight|milk|million|mimic|mind|minimum|minor|minute|miracle|mirror|misery|miss|mistake|mix|mixed|mixture|mobile|model|modify|mom|moment|monitor|monkey|monster|month|moon|moral|more|morning|mosquito|mother|motion|motor|mountain|mouse|move|movie|much|muffin|mule|multiply|muscle|museum|mushroom|music|must|mutual|myself|mystery|myth|naive|name|napkin|narrow|nasty|nation|nature|near|neck|need|negative|neglect|neither|nephew|nerve|nest|net|network|neutral|never|news|next|nice|night|noble|noise|nominee|noodle|normal|north|nose|notable|note|nothing|notice|novel|now|nuclear|number|nurse|nut|oak|obey|object|oblige|obscure|observe|obtain|obvious|occur|ocean|october|odor|off|offer|office|often|oil|okay|old|olive|olympic|omit|once|one|onion|online|only|open|opera|opinion|oppose|option|orange|orbit|orchard|order|ordinary|organ|orient|original|orphan|ostrich|other|outdoor|outer|output|outside|oval|oven|over|own|owner|oxygen|oyster|ozone|pact|paddle|page|pair|palace|palm|panda|panel|panic|panther|paper|parade|parent|park|parrot|party|pass|patch|path|patient|patrol|pattern|pause|pave|payment|peace|peanut|pear|peasant|pelican|pen|penalty|pencil|people|pepper|perfect|permit|person|pet|phone|photo|phrase|physical|piano|picnic|picture|piece|pig|pigeon|pill|pilot|pink|pioneer|pipe|pistol|pitch|pizza|place|planet|plastic|plate|play|please|pledge|pluck|plug|plunge|poem|poet|point|polar|pole|police|pond|pony|pool|popular|portion|position|possible|post|potato|pottery|poverty|powder|power|practice|praise|predict|prefer|prepare|present|pretty|prevent|price|pride|primary|print|priority|prison|private|prize|problem|process|produce|profit|program|project|promote|proof|property|prosper|protect|proud|provide|public|pudding|pull|pulp|pulse|pumpkin|punch|pupil|puppy|purchase|purity|purpose|purse|push|put|puzzle|pyramid|quality|quantum|quarter|question|quick|quit|quiz|quote|rabbit|raccoon|race|rack|radar|radio|rail|rain|raise|rally|ramp|ranch|random|range|rapid|rare|rate|rather|raven|raw|razor|ready|real|reason|rebel|rebuild|recall|receive|recipe|record|recycle|reduce|reflect|reform|refuse|region|regret|regular|reject|relax|release|relief|rely|remain|remember|remind|remove|render|renew|rent|reopen|repair|repeat|replace|report|require|rescue|resemble|resist|resource|response|result|retire|retreat|return|reunion|reveal|review|reward|rhythm|rib|ribbon|rice|rich|ride|ridge|rifle|right|rigid|ring|riot|ripple|risk|ritual|rival|river|road|roast|robot|robust|rocket|romance|roof|rookie|room|rose|rotate|rough|round|route|royal|rubber|rude|rug|rule|run|runway|rural|sad|saddle|sadness|safe|sail|salad|salmon|salon|salt|salute|same|sample|sand|satisfy|satoshi|sauce|sausage|save|say|scale|scan|scare|scatter|scene|scheme|school|science|scissors|scorpion|scout|scrap|screen|script|scrub|sea|search|season|seat|second|secret|section|security|seed|seek|segment|select|sell|seminar|senior|sense|sentence|series|service|session|settle|setup|seven|shadow|shaft|shallow|share|shed|shell|sheriff|shield|shift|shine|ship|shiver|shock|shoe|shoot|shop|short|shoulder|shove|shrimp|shrug|shuffle|shy|sibling|sick|side|siege|sight|sign|silent|silk|silly|silver|similar|simple|since|sing|siren|sister|situate|six|size|skate|sketch|ski|skill|skin|skirt|skull|slab|slam|sleep|slender|slice|slide|slight|slim|slogan|slot|slow|slush|small|smart|smile|smoke|smooth|snack|snake|snap|sniff|snow|soap|soccer|social|sock|soda|soft|solar|soldier|solid|solution|solve|someone|song|soon|sorry|sort|soul|sound|soup|source|south|space|spare|spatial|spawn|speak|special|speed|spell|spend|sphere|spice|spider|spike|spin|spirit|split|spoil|sponsor|spoon|sport|spot|spray|spread|spring|spy|square|squeeze|squirrel|stable|stadium|staff|stage|stairs|stamp|stand|start|state|stay|steak|steel|stem|step|stereo|stick|still|sting|stock|stomach|stone|stool|story|stove|strategy|street|strike|strong|struggle|student|stuff|stumble|style|subject|submit|subway|success|such|sudden|suffer|sugar|suggest|suit|summer|sun|sunny|sunset|super|supply|supreme|sure|surface|surge|surprise|surround|survey|suspect|sustain|swallow|swamp|swap|swarm|swear|sweet|swift|swim|swing|switch|sword|symbol|symptom|syrup|system|table|tackle|tag|tail|talent|talk|tank|tape|target|task|taste|tattoo|taxi|teach|team|tell|ten|tenant|tennis|tent|term|test|text|thank|that|theme|then|theory|there|they|thing|this|thought|three|thrive|throw|thumb|thunder|ticket|tide|tiger|tilt|timber|time|tiny|tip|tired|tissue|title|toast|tobacco|today|toddler|toe|together|toilet|token|tomato|tomorrow|tone|tongue|tonight|tool|tooth|top|topic|topple|torch|tornado|tortoise|toss|total|tourist|toward|tower|town|toy|track|trade|traffic|tragic|train|transfer|trap|trash|travel|tray|treat|tree|trend|trial|tribe|trick|trigger|trim|trip|trophy|trouble|truck|true|truly|trumpet|trust|truth|try|tube|tuition|tumble|tuna|tunnel|turkey|turn|turtle|twelve|twenty|twice|twin|twist|two|type|typical|ugly|umbrella|unable|unaware|uncle|uncover|under|undo|unfair|unfold|unhappy|uniform|unique|unit|universe|unknown|unlock|until|unusual|unveil|update|upgrade|uphold|upon|upper|upset|urban|urge|usage|use|used|useful|useless|usual|utility|vacant|vacuum|vague|valid|valley|valve|van|vanish|vapor|various|vast|vault|vehicle|velvet|vendor|venture|venue|verb|verify|version|very|vessel|veteran|viable|vibrant|vicious|victory|video|view|village|vintage|violin|virtual|virus|visa|visit|visual|vital|vivid|vocal|voice|void|volcano|volume|vote|voyage|wage|wagon|wait|walk|wall|walnut|want|warfare|warm|warrior|wash|wasp|waste|water|wave|way|wealth|weapon|wear|weasel|weather|web|wedding|weekend|weird|welcome|west|wet|whale|what|wheat|wheel|when|where|whip|whisper|wide|width|wife|wild|will|win|window|wine|wing|wink|winner|winter|wire|wisdom|wise|wish|witness|wolf|woman|wonder|wood|wool|word|work|world|worry|worth|wrap|wreck|wrestle|wrist|write|wrong|yard|year|yellow|you|young|youth|zebra|zero|zone|zoo".split(
947
947
  "|"
948
- ), Ie = "Invalid mnemonic", Sr = "Invalid entropy", Wt = "Invalid mnemonic checksum";
949
- function Jt(r) {
948
+ ), Ie = "Invalid mnemonic", Br = "Invalid entropy", Jt = "Invalid mnemonic checksum";
949
+ function Zt(r) {
950
950
  return (r || "").normalize("NFKD");
951
951
  }
952
- function Br(r) {
952
+ function Rr(r) {
953
953
  return Number.parseInt(r, 2);
954
954
  }
955
- function Rr(r) {
955
+ function $r(r) {
956
956
  return r.map((e) => e.toString(2).padStart(8, "0")).join("");
957
957
  }
958
- function $r(r) {
959
- return Rr(Array.from(Ar(r))).slice(
958
+ function Nr(r) {
959
+ return $r(Array.from(Ur(r))).slice(
960
960
  0,
961
961
  r.length * 8 / 32
962
962
  );
963
963
  }
964
- function Nr(r, e = Ur) {
965
- const t = Jt(r).split(" ");
964
+ function Dr(r, e = Sr) {
965
+ const t = Zt(r).split(" ");
966
966
  if (t.length % 3 !== 0)
967
967
  throw new Error(Ie);
968
968
  const n = t.map((u) => {
@@ -970,50 +970,50 @@ function Nr(r, e = Ur) {
970
970
  if (d === -1)
971
971
  throw new Error(Ie);
972
972
  return d.toString(2).padStart(11, "0");
973
- }).join(""), o = Math.floor(n.length / 33) * 32, s = n.slice(0, o), i = n.slice(o), a = s.match(/(.{1,8})/g), l = a == null ? void 0 : a.map(Br);
973
+ }).join(""), o = Math.floor(n.length / 33) * 32, s = n.slice(0, o), i = n.slice(o), a = s.match(/(.{1,8})/g), l = a == null ? void 0 : a.map(Rr);
974
974
  if (!l || l.length % 4 !== 0 || l.length < 16 || l.length > 32)
975
- throw new Error(Sr);
975
+ throw new Error(Br);
976
976
  const c = h(l);
977
- if ($r(c) !== i)
978
- throw new Error(Wt);
977
+ if (Nr(c) !== i)
978
+ throw new Error(Jt);
979
979
  return c;
980
980
  }
981
- function Zt(r, e = Ur) {
981
+ function Gt(r, e = Sr) {
982
982
  if (r.length % 4 !== 0 || r.length < 16 || r.length > 32)
983
- throw new Error(Sr);
984
- const t = `${Rr(Array.from(r))}${$r(r)}`.match(
983
+ throw new Error(Br);
984
+ const t = `${$r(Array.from(r))}${Nr(r)}`.match(
985
985
  /(.{1,11})/g
986
- ), n = t == null ? void 0 : t.map((o) => e[Br(o)]);
986
+ ), n = t == null ? void 0 : t.map((o) => e[Rr(o)]);
987
987
  if (!n || n.length < 12)
988
988
  throw new Error("Unable to map entropy to mnemonic");
989
989
  return n.join(" ");
990
990
  }
991
- function Gt(r, e) {
991
+ function Xt(r, e) {
992
992
  try {
993
- Nr(r, e);
993
+ Dr(r, e);
994
994
  } catch {
995
995
  return !1;
996
996
  }
997
997
  return !0;
998
998
  }
999
- function Dr(r, e, t) {
1000
- return Nr(r, e);
999
+ function Ir(r, e, t) {
1000
+ return Dr(r, e);
1001
1001
  }
1002
- function Ir(r, e) {
1003
- return Gt(r, e);
1002
+ function Pr(r, e) {
1003
+ return Xt(r, e);
1004
1004
  }
1005
- function Xt(r, e = "", t, n) {
1006
- if (!Ir(r, t))
1005
+ function Qt(r, e = "", t, n) {
1006
+ if (!Pr(r, t))
1007
1007
  throw new Error("Invalid bip39 mnemonic specified");
1008
- const o = Dr(r, t), s = V(`mnemonic${e}`);
1009
- return Er(o, s).password.slice(0, 32);
1008
+ const o = Ir(r, t), s = V(`mnemonic${e}`);
1009
+ return xr(o, s).password.slice(0, 32);
1010
1010
  }
1011
- function Qt(r, e) {
1011
+ function en(r, e) {
1012
1012
  if (![33, 65].includes(r.length))
1013
1013
  throw new Error(
1014
1014
  `Invalid publicKey provided, received ${r.length} bytes input`
1015
1015
  );
1016
- return r.length === 33 ? r : qr.ProjectivePoint.fromHex(r).toRawBytes(!0);
1016
+ return r.length === 33 ? r : Mr.ProjectivePoint.fromHex(r).toRawBytes(!0);
1017
1017
  }
1018
1018
  function ve(r, e, t) {
1019
1019
  const n = h(r), o = h(e), s = h(t);
@@ -1021,9 +1021,9 @@ function ve(r, e, t) {
1021
1021
  throw new Error("Invalid publicKey length, expected 32 bytes");
1022
1022
  if (o.length !== 64)
1023
1023
  throw new Error("Invalid signature length, expected 64 bytes");
1024
- return qt(n, o, s);
1024
+ return Vt(n, o, s);
1025
1025
  }
1026
- const en = [
1026
+ const rn = [
1027
1027
  //["ecdsa", secp256k1VerifyHasher("blake2")],
1028
1028
  //["ethereum", secp256k1VerifyHasher("keccak")],
1029
1029
  [
@@ -1038,7 +1038,7 @@ const en = [
1038
1038
  throw new Error("Not Implemented");
1039
1039
  }
1040
1040
  ]
1041
- ], rn = [
1041
+ ], tn = [
1042
1042
  //["ed25519", ed25519Verify],
1043
1043
  [
1044
1044
  "ed25519",
@@ -1047,13 +1047,13 @@ const en = [
1047
1047
  }
1048
1048
  ],
1049
1049
  ["sr25519", ve],
1050
- ...en
1051
- ], tn = [
1050
+ ...rn
1051
+ ], nn = [
1052
1052
  "ed25519",
1053
1053
  "sr25519",
1054
1054
  "ecdsa"
1055
1055
  ];
1056
- function nn(r, { message: e, publicKey: t, signature: n }, o = rn) {
1056
+ function on(r, { message: e, publicKey: t, signature: n }, o = tn) {
1057
1057
  return r.isValid = o.some(([s, i]) => {
1058
1058
  try {
1059
1059
  if (i(e, n, t))
@@ -1063,7 +1063,7 @@ function nn(r, { message: e, publicKey: t, signature: n }, o = rn) {
1063
1063
  return !1;
1064
1064
  }), r;
1065
1065
  }
1066
- function on(r, { message: e, publicKey: t, signature: n }) {
1066
+ function sn(r, { message: e, publicKey: t, signature: n }) {
1067
1067
  const o = n[0];
1068
1068
  if (o === void 0)
1069
1069
  throw new Error(
@@ -1073,7 +1073,7 @@ function on(r, { message: e, publicKey: t, signature: n }) {
1073
1073
  throw new Error(
1074
1074
  `Unknown crypto type, expected signature prefix [0..2], found ${n[0]}`
1075
1075
  );
1076
- const s = tn[o];
1076
+ const s = nn[o];
1077
1077
  if (!s)
1078
1078
  throw new Error(`Unknown crypto type, found ${o}`);
1079
1079
  r.crypto = s;
@@ -1088,15 +1088,15 @@ function on(r, { message: e, publicKey: t, signature: n }) {
1088
1088
  }
1089
1089
  return r;
1090
1090
  }
1091
- function sn(r) {
1091
+ function an(r) {
1092
1092
  const e = r[0];
1093
1093
  if (e === void 0)
1094
1094
  throw new Error(
1095
1095
  "Invalid signature, expected first byte to indicate crypto type"
1096
1096
  );
1097
- return [0, 1, 2].includes(e) && [65, 66].includes(r.length) ? on : nn;
1097
+ return [0, 1, 2].includes(e) && [65, 66].includes(r.length) ? sn : on;
1098
1098
  }
1099
- function an(r, e, t) {
1099
+ function cn(r, e, t) {
1100
1100
  const n = h(e);
1101
1101
  if (![64, 65, 66].includes(n.length))
1102
1102
  throw new Error(
@@ -1111,42 +1111,42 @@ function an(r, e, t) {
1111
1111
  isValid: !1,
1112
1112
  isWrapped: Ue(s.message, !0),
1113
1113
  publicKey: o
1114
- }, a = Ue(s.message, !1), l = sn(n);
1115
- return l(i, s), i.crypto !== "none" || i.isWrapped && !a ? i : (s.message = a ? rt(s.message) : tt(s.message), l(i, s));
1114
+ }, a = Ue(s.message, !1), l = an(n);
1115
+ return l(i, s), i.crypto !== "none" || i.isWrapped && !a ? i : (s.message = a ? tt(s.message) : nt(s.message), l(i, s));
1116
1116
  }
1117
- function cn(r) {
1117
+ function ln(r) {
1118
1118
  const e = h(r);
1119
1119
  if (e.length !== 32)
1120
1120
  throw new Error(`Expected a seed of 32 bytes, found ${e.length}`);
1121
- const t = pr(e), n = S(t.subarray(0, 32)) >> 3n, o = g.BASE.multiply(n).toRawBytes();
1121
+ const t = gr(e), n = qr(t.subarray(0, 32)) >> 3n, o = Vr.BASE.multiply(n).toRawBytes();
1122
1122
  return {
1123
1123
  publicKey: new Uint8Array(o),
1124
1124
  secretKey: new Uint8Array(t)
1125
1125
  };
1126
1126
  }
1127
- function ln(r, { publicKey: e, secretKey: t }) {
1127
+ function un(r, { publicKey: e, secretKey: t }) {
1128
1128
  const n = typeof r == "string" ? new TextEncoder().encode(r) : r, o = h(t);
1129
1129
  if (o.length !== 64)
1130
1130
  throw new Error(
1131
1131
  `Expected secretKey to be 64 bytes, found ${o.length}`
1132
1132
  );
1133
- return Mt(o, n);
1133
+ return qt(o, n);
1134
1134
  }
1135
1135
  const Pe = new Uint8Array();
1136
- function un(r, { secretKey: e }, t = Pe, n = Pe) {
1136
+ function dn(r, { secretKey: e }, t = Pe, n = Pe) {
1137
1137
  const o = h(r), s = h(e), i = h(t), a = h(n);
1138
1138
  if (s.length !== 64)
1139
1139
  throw new Error("Invalid secretKey length, expected 64 bytes");
1140
- return yr.sign(o, s, i, a);
1140
+ return wr.sign(o, s, i, a);
1141
1141
  }
1142
- const je = new Uint8Array();
1143
- function dn(r, e, t, n = je, o = je) {
1142
+ const Te = new Uint8Array();
1143
+ function hn(r, e, t, n = Te, o = Te) {
1144
1144
  const s = h(r), i = h(e), a = h(t), l = h(n), c = h(o);
1145
1145
  if (a.length !== 32)
1146
1146
  throw new Error("Invalid publicKey length, expected 32 bytes");
1147
1147
  if (i.length !== 96)
1148
1148
  throw new Error("Invalid vrfSign output length, expected 96 bytes");
1149
- return yr.verify(
1149
+ return wr.verify(
1150
1150
  s,
1151
1151
  i,
1152
1152
  a,
@@ -1154,74 +1154,74 @@ function dn(r, e, t, n = je, o = je) {
1154
1154
  c
1155
1155
  );
1156
1156
  }
1157
- const mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1157
+ const yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1158
1158
  __proto__: null,
1159
1159
  ENCODING: ye,
1160
- ENCODING_NONE: ir,
1161
- ENCODING_VERSION: cr,
1160
+ ENCODING_NONE: cr,
1161
+ ENCODING_VERSION: lr,
1162
1162
  NONCE_LENGTH: le,
1163
- SCRYPT_LENGTH: lr,
1164
- base58Decode: Je,
1165
- base58Encode: Ze,
1166
- base58Validate: We,
1167
- base64Decode: yt,
1168
- base64Encode: er,
1169
- base64Validate: Qe,
1170
- blake2AsHex: ft,
1163
+ SCRYPT_LENGTH: ur,
1164
+ base58Decode: Ze,
1165
+ base58Encode: Ge,
1166
+ base58Validate: Je,
1167
+ base64Decode: wt,
1168
+ base64Encode: rr,
1169
+ base64Validate: er,
1170
+ blake2AsHex: pt,
1171
1171
  blake2AsU8a: K,
1172
1172
  decodeAddress: ge,
1173
- encodeAddress: mt,
1174
- entropyToMnemonic: Zt,
1173
+ encodeAddress: yt,
1174
+ entropyToMnemonic: Gt,
1175
1175
  jsonDecryptData: jt,
1176
- jsonEncryptFormat: Tt,
1177
- keyExtractPath: ur,
1178
- keyExtractSuri: Ht,
1179
- keyFromPath: Yt,
1180
- keyHdkdSr25519: kr,
1181
- mnemonicToEntropy: Dr,
1182
- mnemonicToMiniSecret: Xt,
1183
- mnemonicValidate: Ir,
1184
- naclDecrypt: or,
1185
- naclEncrypt: Dt,
1186
- pbkdf2Encode: Er,
1187
- randomAsHex: Nt,
1176
+ jsonEncryptFormat: _t,
1177
+ keyExtractPath: dr,
1178
+ keyExtractSuri: Ot,
1179
+ keyFromPath: Wt,
1180
+ keyHdkdSr25519: Er,
1181
+ mnemonicToEntropy: Ir,
1182
+ mnemonicToMiniSecret: Qt,
1183
+ mnemonicValidate: Pr,
1184
+ naclDecrypt: sr,
1185
+ naclEncrypt: It,
1186
+ pbkdf2Encode: xr,
1187
+ randomAsHex: Dt,
1188
1188
  randomAsU8a: _,
1189
- scryptEncode: sr,
1190
- scryptFromU8a: ar,
1191
- scryptToU8a: Pt,
1192
- secp256k1Compress: Qt,
1193
- sha256AsU8a: Ar,
1194
- shaAsU8a: xr,
1195
- signatureVerify: an,
1196
- sr25519DeriveHard: br,
1197
- sr25519DeriveSoft: vr,
1198
- sr25519FromSeed: cn,
1199
- sr25519Sign: ln,
1189
+ scryptEncode: ar,
1190
+ scryptFromU8a: ir,
1191
+ scryptToU8a: Tt,
1192
+ secp256k1Compress: en,
1193
+ sha256AsU8a: Ur,
1194
+ shaAsU8a: Ar,
1195
+ signatureVerify: cn,
1196
+ sr25519DeriveHard: vr,
1197
+ sr25519DeriveSoft: kr,
1198
+ sr25519FromSeed: ln,
1199
+ sr25519Sign: un,
1200
1200
  sr25519Verify: ve,
1201
- sr25519VrfSign: un,
1202
- sr25519VrfVerify: dn
1201
+ sr25519VrfSign: dn,
1202
+ sr25519VrfVerify: hn
1203
1203
  }, Symbol.toStringTag, { value: "Module" }));
1204
1204
  export {
1205
- Pt as a,
1206
- ft as b,
1207
- Tt as c,
1208
- dn as d,
1209
- un as e,
1210
- an as f,
1211
- Qt as g,
1212
- ln as h,
1213
- Yt as i,
1205
+ Tt as a,
1206
+ pt as b,
1207
+ _t as c,
1208
+ hn as d,
1209
+ dn as e,
1210
+ cn as f,
1211
+ en as g,
1212
+ un as h,
1213
+ Wt as i,
1214
1214
  jt as j,
1215
- ur as k,
1216
- cn as l,
1215
+ dr as k,
1216
+ ln as l,
1217
1217
  ge as m,
1218
- Dt as n,
1219
- mt as o,
1220
- yt as p,
1221
- Ht as q,
1222
- Xt as r,
1223
- sr as s,
1224
- $t as t,
1225
- Nt as u,
1226
- mn as v
1218
+ It as n,
1219
+ yt as o,
1220
+ wt as p,
1221
+ Ot as q,
1222
+ Qt as r,
1223
+ ar as s,
1224
+ Nt as t,
1225
+ Dt as u,
1226
+ yn as v
1227
1227
  };