@nexus-cross/crossx-sdk-core 2.2.3-beta.1 → 2.2.3-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -657,18 +657,18 @@ const Bt = "crossx_access_token", Mt = "crossx_refresh_token", Ft = "crossx_user
657
657
  try {
658
658
  const I = this.crypto.decodeJWT(e);
659
659
  d.log("[CROSSx] Firebase JWT 필드:", Object.keys(I).join(", ")), x = (i = I.firebase) == null ? void 0 : i.sign_in_provider;
660
- const O = ((o = I.firebase) == null ? void 0 : o.identities) ?? {};
661
- w = I.email ?? ((a = O.email) == null ? void 0 : a[0]), x === "google.com" ? _ = (c = O["google.com"]) == null ? void 0 : c[0] : x === "apple.com" && (_ = (l = O["apple.com"]) == null ? void 0 : l[0]), d.log("[CROSSx] OAuth provider sub 추출 — provider:", x, "hasProviderSub:", !!_, "email:", w ?? "(없음)");
660
+ const C = ((o = I.firebase) == null ? void 0 : o.identities) ?? {};
661
+ w = I.email ?? ((a = C.email) == null ? void 0 : a[0]), x === "google.com" ? _ = (c = C["google.com"]) == null ? void 0 : c[0] : x === "apple.com" && (_ = (l = C["apple.com"]) == null ? void 0 : l[0]), d.log("[CROSSx] OAuth provider sub 추출 — provider:", x, "hasProviderSub:", !!_, "email:", w ?? "(없음)");
662
662
  } catch {
663
663
  d.warn("[CROSSx] firebaseToken에서 providerSub 추출 실패");
664
664
  }
665
665
  if (p) {
666
666
  const I = this.crypto.decodeJWT(p);
667
667
  d.log("[CROSSx] access_token 디코딩 — sub:", I.sub, "exp:", I.exp, "필드:", Object.keys(I).join(", "));
668
- const O = await this.crypto.verifyJWT(p);
669
- if (n = O.signatureVerified ?? !1, !O.valid)
668
+ const C = await this.crypto.verifyJWT(p);
669
+ if (n = C.signatureVerified ?? !1, !C.valid)
670
670
  throw d.error("[CROSSx] access_token 검증 실패"), new Error("유효하지 않은 access token");
671
- const R = O.payload, L = R.email ?? w ?? r;
671
+ const R = C.payload, L = R.email ?? w ?? r;
672
672
  d.log(
673
673
  "[CROSSx] email 소스 — CROSSx JWT:",
674
674
  R.email ?? "(없음)",
@@ -1406,7 +1406,7 @@ function Ge(s, e, r, t = Et) {
1406
1406
  return;
1407
1407
  }
1408
1408
  }
1409
- function Os(s) {
1409
+ function Cs(s) {
1410
1410
  const e = s.startsWith("0x") ? s.slice(2) : s;
1411
1411
  if (!/^[0-9a-fA-F]+$/.test(e))
1412
1412
  throw new f(
@@ -1419,7 +1419,7 @@ function Os(s) {
1419
1419
  `서명 길이가 유효하지 않습니다: ${Wt} hex 문자(65 바이트) 예상, 현재 ${e.length}`
1420
1420
  );
1421
1421
  }
1422
- function Cs(s) {
1422
+ function Os(s) {
1423
1423
  const e = s.startsWith("0x") ? s.slice(2) : s;
1424
1424
  if (!/^[0-9a-fA-F]+$/.test(e))
1425
1425
  throw new f(
@@ -1466,7 +1466,7 @@ function Ls(s) {
1466
1466
  const t = Number(r);
1467
1467
  return Number.isFinite(t) ? t : void 0;
1468
1468
  }
1469
- class Ce {
1469
+ class Oe {
1470
1470
  constructor(e) {
1471
1471
  this.deps = e, this.verifyPinMutex = null;
1472
1472
  }
@@ -1539,7 +1539,7 @@ class Ce {
1539
1539
  if (u.code === h.PIN_INVALID)
1540
1540
  return { ok: !1, error: u.message };
1541
1541
  if (u.code === h.PIN_LOCKED)
1542
- return Ce.buildPinLockedResult(u, a);
1542
+ return Oe.buildPinLockedResult(u, a);
1543
1543
  }
1544
1544
  throw u;
1545
1545
  }
@@ -1573,7 +1573,7 @@ class Ce {
1573
1573
  return await e();
1574
1574
  } catch (n) {
1575
1575
  if (n instanceof f) {
1576
- if (t = Ce.parsePinError(n, r), !t) throw n;
1576
+ if (t = Oe.parsePinError(n, r), !t) throw n;
1577
1577
  } else
1578
1578
  throw n;
1579
1579
  }
@@ -1587,7 +1587,7 @@ class Ce {
1587
1587
  try {
1588
1588
  return await e();
1589
1589
  } catch (n) {
1590
- if (n instanceof f && (t = Ce.parsePinError(n, r), t))
1590
+ if (n instanceof f && (t = Oe.parsePinError(n, r), t))
1591
1591
  continue;
1592
1592
  throw n;
1593
1593
  }
@@ -1612,7 +1612,7 @@ class Ce {
1612
1612
  return null;
1613
1613
  }
1614
1614
  static buildPinLockedResult(e, r) {
1615
- const t = Ce.parsePinError(e, r);
1615
+ const t = Oe.parsePinError(e, r);
1616
1616
  if (!t) return { ok: !1, error: e.message };
1617
1617
  const { errorMessage: n, ...i } = t;
1618
1618
  return { ok: !1, error: n, ...i };
@@ -2322,7 +2322,7 @@ const Te = class Te extends ys {
2322
2322
  walletPreferenceKey: Te.WALLET_PREF_KEY,
2323
2323
  storage: this.storage,
2324
2324
  pinStore: this.pinStore
2325
- }), this.pinOrchestrator = new Ce({
2325
+ }), this.pinOrchestrator = new Oe({
2326
2326
  confirmation: this.confirmation,
2327
2327
  walletProvider: this.walletProvider,
2328
2328
  pinStore: this.pinStore,
@@ -3174,7 +3174,7 @@ const Te = class Te extends ys {
3174
3174
  n.address
3175
3175
  )
3176
3176
  });
3177
- return Os(i.signature), {
3177
+ return Cs(i.signature), {
3178
3178
  chainId: e,
3179
3179
  signature: i.signature,
3180
3180
  address: n.address
@@ -3252,7 +3252,7 @@ const Te = class Te extends ys {
3252
3252
  a
3253
3253
  )
3254
3254
  });
3255
- return Cs(o.signature), {
3255
+ return Os(o.signature), {
3256
3256
  chainId: e,
3257
3257
  signedTx: o.signature,
3258
3258
  txHash: o.txHash ?? ""
@@ -3391,7 +3391,7 @@ const Te = class Te extends ys {
3391
3391
  let g, _;
3392
3392
  const x = this.waitForTxAndGetReceipt(a, e, { intervalMs: c, timeoutMs: l }).then((I) => {
3393
3393
  g = I;
3394
- const O = BigInt(I.gasUsed) * BigInt(I.effectiveGasPrice), R = r.value ? BigInt(r.value) : 0n, L = Ge(r.value, u.symbol, u.decimals, this._config.displayDecimals), M = Ge("0x" + O.toString(16), u.symbol, u.decimals, this._config.displayDecimals), q = Ge("0x" + (R + O).toString(16), u.symbol, u.decimals, this._config.displayDecimals);
3394
+ const C = BigInt(I.gasUsed) * BigInt(I.effectiveGasPrice), R = r.value ? BigInt(r.value) : 0n, L = Ge(r.value, u.symbol, u.decimals, this._config.displayDecimals), M = Ge("0x" + C.toString(16), u.symbol, u.decimals, this._config.displayDecimals), q = Ge("0x" + (R + C).toString(16), u.symbol, u.decimals, this._config.displayDecimals);
3395
3395
  return {
3396
3396
  chainId: e,
3397
3397
  txHash: a,
@@ -4480,17 +4480,17 @@ function bn(s, e, r) {
4480
4480
  const I = [];
4481
4481
  for (; S < e; ) {
4482
4482
  c = g();
4483
- const O = c.slice();
4484
- I.push(O), S += c.length;
4483
+ const C = c.slice();
4484
+ I.push(C), S += c.length;
4485
4485
  }
4486
4486
  return Se(...I);
4487
4487
  };
4488
4488
  return (S, I) => {
4489
4489
  p(), _(S);
4490
- let O;
4491
- for (; !(O = I(x())); )
4490
+ let C;
4491
+ for (; !(C = I(x())); )
4492
4492
  _();
4493
- return p(), O;
4493
+ return p(), C;
4494
4494
  };
4495
4495
  }
4496
4496
  function Rt(s, e = {}, r = {}) {
@@ -4547,7 +4547,7 @@ function Nt(s, e, r) {
4547
4547
  if (!s.eql(s.sqr(e), r))
4548
4548
  throw new Error("Cannot find square root");
4549
4549
  }
4550
- function Or(s, e) {
4550
+ function Cr(s, e) {
4551
4551
  const r = (s.ORDER + te) / Tr, t = s.pow(e, r);
4552
4552
  return Nt(s, t, e), t;
4553
4553
  }
@@ -4556,7 +4556,7 @@ function En(s, e) {
4556
4556
  return Nt(s, a, e), a;
4557
4557
  }
4558
4558
  function An(s) {
4559
- const e = rt(s), r = Cr(s), t = r(e, e.neg(e.ONE)), n = r(e, t), i = r(e, e.neg(t)), o = (s + vn) / Nr;
4559
+ const e = rt(s), r = Or(s), t = r(e, e.neg(e.ONE)), n = r(e, t), i = r(e, e.neg(t)), o = (s + vn) / Nr;
4560
4560
  return (a, c) => {
4561
4561
  let l = a.pow(c, o), u = a.mul(l, t);
4562
4562
  const p = a.mul(l, n), g = a.mul(l, i), _ = a.eql(a.sqr(u), c), x = a.eql(a.sqr(p), c);
@@ -4565,7 +4565,7 @@ function An(s) {
4565
4565
  return Nt(a, S, c), S;
4566
4566
  };
4567
4567
  }
4568
- function Cr(s) {
4568
+ function Or(s) {
4569
4569
  if (s < Ir)
4570
4570
  throw new Error("sqrt is not defined for small field");
4571
4571
  let e = s - te, r = 0;
@@ -4577,7 +4577,7 @@ function Cr(s) {
4577
4577
  if (t++ > 1e3)
4578
4578
  throw new Error("Cannot find square root: probably non-prime P");
4579
4579
  if (r === 1)
4580
- return Or;
4580
+ return Cr;
4581
4581
  let i = n.pow(t, e);
4582
4582
  const o = (e + te) / ke;
4583
4583
  return function(c, l) {
@@ -4600,7 +4600,7 @@ function Cr(s) {
4600
4600
  };
4601
4601
  }
4602
4602
  function In(s) {
4603
- return s % Tr === Ir ? Or : s % Rr === kr ? En : s % Nr === Sn ? An(s) : Cr(s);
4603
+ return s % Tr === Ir ? Cr : s % Rr === kr ? En : s % Nr === Sn ? An(s) : Or(s);
4604
4604
  }
4605
4605
  const Tn = [
4606
4606
  "create",
@@ -4656,7 +4656,7 @@ function Nn(s, e) {
4656
4656
  const r = e !== void 0 ? e : s.toString(2).length, t = Math.ceil(r / 8);
4657
4657
  return { nBitLength: r, nByteLength: t };
4658
4658
  }
4659
- class On {
4659
+ class Cn {
4660
4660
  constructor(e, r = {}) {
4661
4661
  P(this, "ORDER");
4662
4662
  P(this, "BITS");
@@ -4769,7 +4769,7 @@ class On {
4769
4769
  }
4770
4770
  }
4771
4771
  function rt(s, e = {}) {
4772
- return new On(s, e);
4772
+ return new Cn(s, e);
4773
4773
  }
4774
4774
  function Lr(s) {
4775
4775
  if (typeof s != "bigint")
@@ -4781,7 +4781,7 @@ function Dr(s) {
4781
4781
  const e = Lr(s);
4782
4782
  return e + Math.ceil(e / 2);
4783
4783
  }
4784
- function Cn(s, e, r = !1) {
4784
+ function On(s, e, r = !1) {
4785
4785
  V(s);
4786
4786
  const t = s.length, n = Lr(e), i = Dr(e);
4787
4787
  if (t < 16 || t < i || t > 1024)
@@ -5132,18 +5132,18 @@ function Un(s, e = {}) {
5132
5132
  throw new Error("compression is not supported: Field does not have .isOdd()");
5133
5133
  }
5134
5134
  function p(F, m, y) {
5135
- const { x: k, y: C } = m.toAffine(), B = t.toBytes(k);
5135
+ const { x: k, y: O } = m.toAffine(), B = t.toBytes(k);
5136
5136
  if (Xe(y, "isCompressed"), y) {
5137
5137
  u();
5138
- const b = !t.isOdd(C);
5138
+ const b = !t.isOdd(O);
5139
5139
  return Se(Hr(b), B);
5140
5140
  } else
5141
- return Se(Uint8Array.of(4), B, t.toBytes(C));
5141
+ return Se(Uint8Array.of(4), B, t.toBytes(O));
5142
5142
  }
5143
5143
  function g(F) {
5144
5144
  V(F, void 0, "Point");
5145
- const { publicKey: m, publicKeyUncompressed: y } = l, k = F.length, C = F[0], B = F.subarray(1);
5146
- if (k === m && (C === 2 || C === 3)) {
5145
+ const { publicKey: m, publicKeyUncompressed: y } = l, k = F.length, O = F[0], B = F.subarray(1);
5146
+ if (k === m && (O === 2 || O === 3)) {
5147
5147
  const b = t.fromBytes(B);
5148
5148
  if (!t.isValid(b))
5149
5149
  throw new Error("bad point: is not on curve, wrong x");
@@ -5157,8 +5157,8 @@ function Un(s, e = {}) {
5157
5157
  }
5158
5158
  u();
5159
5159
  const T = t.isOdd(E);
5160
- return (C & 1) === 1 !== T && (E = t.neg(E)), { x: b, y: E };
5161
- } else if (k === y && C === 4) {
5160
+ return (O & 1) === 1 !== T && (E = t.neg(E)), { x: b, y: E };
5161
+ } else if (k === y && O === 4) {
5162
5162
  const b = t.BYTES, v = t.fromBytes(B.subarray(0, b)), E = t.fromBytes(B.subarray(b, b * 2));
5163
5163
  if (!S(v, E))
5164
5164
  throw new Error("bad point: is not on curve");
@@ -5177,8 +5177,8 @@ function Un(s, e = {}) {
5177
5177
  }
5178
5178
  if (!S(i.Gx, i.Gy))
5179
5179
  throw new Error("bad curve params: generator point");
5180
- const I = t.mul(t.pow(i.a, ze), Fn), O = t.mul(t.sqr(i.b), BigInt(27));
5181
- if (t.is0(t.add(I, O)))
5180
+ const I = t.mul(t.pow(i.a, ze), Fn), C = t.mul(t.sqr(i.b), BigInt(27));
5181
+ if (t.is0(t.add(I, C)))
5182
5182
  throw new Error("bad curve params: a or b");
5183
5183
  function R(F, m, y = !1) {
5184
5184
  if (!t.isValid(m) || y && t.is0(m))
@@ -5195,12 +5195,12 @@ function Un(s, e = {}) {
5195
5195
  return Bn(F, c.basises, n.ORDER);
5196
5196
  }
5197
5197
  const q = Xt((F, m) => {
5198
- const { X: y, Y: k, Z: C } = F;
5199
- if (t.eql(C, t.ONE))
5198
+ const { X: y, Y: k, Z: O } = F;
5199
+ if (t.eql(O, t.ONE))
5200
5200
  return { x: y, y: k };
5201
5201
  const B = F.is0();
5202
- m == null && (m = B ? t.ONE : t.inv(C));
5203
- const b = t.mul(y, m), v = t.mul(k, m), E = t.mul(C, m);
5202
+ m == null && (m = B ? t.ONE : t.inv(O));
5203
+ const b = t.mul(y, m), v = t.mul(k, m), E = t.mul(O, m);
5204
5204
  if (B)
5205
5205
  return { x: t.ZERO, y: t.ZERO };
5206
5206
  if (!t.eql(E, t.ONE))
@@ -5221,8 +5221,8 @@ function Un(s, e = {}) {
5221
5221
  throw new Error("bad point: not in prime-order subgroup");
5222
5222
  return !0;
5223
5223
  });
5224
- function G(F, m, y, k, C) {
5225
- return y = new X(t.mul(y.X, F), y.Y, y.Z), m = Je(k, m), y = Je(C, y), m.add(y);
5224
+ function G(F, m, y, k, O) {
5225
+ return y = new X(t.mul(y.X, F), y.Y, y.Z), m = Je(k, m), y = Je(O, y), m.add(y);
5226
5226
  }
5227
5227
  const D = class D {
5228
5228
  /** Does NOT validate if the point is valid. Use `.assertValidity()`. */
@@ -5280,7 +5280,7 @@ function Un(s, e = {}) {
5280
5280
  /** Compare one point to another. */
5281
5281
  equals(m) {
5282
5282
  L(m);
5283
- const { X: y, Y: k, Z: C } = this, { X: B, Y: b, Z: v } = m, E = t.eql(t.mul(y, v), t.mul(B, C)), T = t.eql(t.mul(k, v), t.mul(b, C));
5283
+ const { X: y, Y: k, Z: O } = this, { X: B, Y: b, Z: v } = m, E = t.eql(t.mul(y, v), t.mul(B, O)), T = t.eql(t.mul(k, v), t.mul(b, O));
5284
5284
  return E && T;
5285
5285
  }
5286
5286
  /** Flips point to one corresponding to (x, -y) in Affine coordinates. */
@@ -5292,9 +5292,9 @@ function Un(s, e = {}) {
5292
5292
  // https://eprint.iacr.org/2015/1060, algorithm 3
5293
5293
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
5294
5294
  double() {
5295
- const { a: m, b: y } = i, k = t.mul(y, ze), { X: C, Y: B, Z: b } = this;
5296
- let v = t.ZERO, E = t.ZERO, T = t.ZERO, N = t.mul(C, C), W = t.mul(B, B), U = t.mul(b, b), $ = t.mul(C, B);
5297
- return $ = t.add($, $), T = t.mul(C, b), T = t.add(T, T), v = t.mul(m, T), E = t.mul(k, U), E = t.add(v, E), v = t.sub(W, E), E = t.add(W, E), E = t.mul(v, E), v = t.mul($, v), T = t.mul(k, T), U = t.mul(m, U), $ = t.sub(N, U), $ = t.mul(m, $), $ = t.add($, T), T = t.add(N, N), N = t.add(T, N), N = t.add(N, U), N = t.mul(N, $), E = t.add(E, N), U = t.mul(B, b), U = t.add(U, U), N = t.mul(U, $), v = t.sub(v, N), T = t.mul(U, W), T = t.add(T, T), T = t.add(T, T), new D(v, E, T);
5295
+ const { a: m, b: y } = i, k = t.mul(y, ze), { X: O, Y: B, Z: b } = this;
5296
+ let v = t.ZERO, E = t.ZERO, T = t.ZERO, N = t.mul(O, O), W = t.mul(B, B), U = t.mul(b, b), $ = t.mul(O, B);
5297
+ return $ = t.add($, $), T = t.mul(O, b), T = t.add(T, T), v = t.mul(m, T), E = t.mul(k, U), E = t.add(v, E), v = t.sub(W, E), E = t.add(W, E), E = t.mul(v, E), v = t.mul($, v), T = t.mul(k, T), U = t.mul(m, U), $ = t.sub(N, U), $ = t.mul(m, $), $ = t.add($, T), T = t.add(N, N), N = t.add(T, N), N = t.add(N, U), N = t.mul(N, $), E = t.add(E, N), U = t.mul(B, b), U = t.add(U, U), N = t.mul(U, $), v = t.sub(v, N), T = t.mul(U, W), T = t.add(T, T), T = t.add(T, T), new D(v, E, T);
5298
5298
  }
5299
5299
  // Renes-Costello-Batina exception-free addition formula.
5300
5300
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -5302,13 +5302,13 @@ function Un(s, e = {}) {
5302
5302
  // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
5303
5303
  add(m) {
5304
5304
  L(m);
5305
- const { X: y, Y: k, Z: C } = this, { X: B, Y: b, Z: v } = m;
5305
+ const { X: y, Y: k, Z: O } = this, { X: B, Y: b, Z: v } = m;
5306
5306
  let E = t.ZERO, T = t.ZERO, N = t.ZERO;
5307
5307
  const W = i.a, U = t.mul(i.b, ze);
5308
- let $ = t.mul(y, B), K = t.mul(k, b), Y = t.mul(C, v), ne = t.add(y, k), z = t.add(B, b);
5309
- ne = t.mul(ne, z), z = t.add($, K), ne = t.sub(ne, z), z = t.add(y, C);
5308
+ let $ = t.mul(y, B), K = t.mul(k, b), Y = t.mul(O, v), ne = t.add(y, k), z = t.add(B, b);
5309
+ ne = t.mul(ne, z), z = t.add($, K), ne = t.sub(ne, z), z = t.add(y, O);
5310
5310
  let ee = t.add(B, v);
5311
- return z = t.mul(z, ee), ee = t.add($, Y), z = t.sub(z, ee), ee = t.add(k, C), E = t.add(b, v), ee = t.mul(ee, E), E = t.add(K, Y), ee = t.sub(ee, E), N = t.mul(W, z), E = t.mul(U, Y), N = t.add(E, N), E = t.sub(K, N), N = t.add(K, N), T = t.mul(E, N), K = t.add($, $), K = t.add(K, $), Y = t.mul(W, Y), z = t.mul(U, z), K = t.add(K, Y), Y = t.sub($, Y), Y = t.mul(W, Y), z = t.add(z, Y), $ = t.mul(K, z), T = t.add(T, $), $ = t.mul(ee, z), E = t.mul(ne, E), E = t.sub(E, $), $ = t.mul(ne, K), N = t.mul(ee, N), N = t.add(N, $), new D(E, T, N);
5311
+ return z = t.mul(z, ee), ee = t.add($, Y), z = t.sub(z, ee), ee = t.add(k, O), E = t.add(b, v), ee = t.mul(ee, E), E = t.add(K, Y), ee = t.sub(ee, E), N = t.mul(W, z), E = t.mul(U, Y), N = t.add(E, N), E = t.sub(K, N), N = t.add(K, N), T = t.mul(E, N), K = t.add($, $), K = t.add(K, $), Y = t.mul(W, Y), z = t.mul(U, z), K = t.add(K, Y), Y = t.sub($, Y), Y = t.mul(W, Y), z = t.add(z, Y), $ = t.mul(K, z), T = t.add(T, $), $ = t.mul(ee, z), E = t.mul(ne, E), E = t.sub(E, $), $ = t.mul(ne, K), N = t.mul(ee, N), N = t.add(N, $), new D(E, T, N);
5312
5312
  }
5313
5313
  subtract(m) {
5314
5314
  return this.add(m.negate());
@@ -5329,16 +5329,16 @@ function Un(s, e = {}) {
5329
5329
  const { endo: y } = e;
5330
5330
  if (!n.isValidNot0(m))
5331
5331
  throw new Error("invalid scalar: out of range");
5332
- let k, C;
5332
+ let k, O;
5333
5333
  const B = (b) => H.cached(this, b, (v) => Qt(D, v));
5334
5334
  if (y) {
5335
5335
  const { k1neg: b, k1: v, k2neg: E, k2: T } = M(m), { p: N, f: W } = B(v), { p: U, f: $ } = B(T);
5336
- C = W.add($), k = G(y.beta, N, U, b, E);
5336
+ O = W.add($), k = G(y.beta, N, U, b, E);
5337
5337
  } else {
5338
5338
  const { p: b, f: v } = B(m);
5339
- k = b, C = v;
5339
+ k = b, O = v;
5340
5340
  }
5341
- return Qt(D, [k, C])[0];
5341
+ return Qt(D, [k, O])[0];
5342
5342
  }
5343
5343
  /**
5344
5344
  * Non-constant-time multiplication. Uses double-and-add algorithm.
@@ -5356,8 +5356,8 @@ function Un(s, e = {}) {
5356
5356
  if (H.hasCache(this))
5357
5357
  return this.multiply(m);
5358
5358
  if (y) {
5359
- const { k1neg: C, k1: B, k2neg: b, k2: v } = M(m), { p1: E, p2: T } = Ln(D, k, B, v);
5360
- return G(y.beta, E, T, C, b);
5359
+ const { k1neg: O, k1: B, k2neg: b, k2: v } = M(m), { p1: E, p2: T } = Ln(D, k, B, v);
5360
+ return G(y.beta, E, T, O, b);
5361
5361
  } else
5362
5362
  return H.unsafe(k, m);
5363
5363
  }
@@ -5435,7 +5435,7 @@ function Hn(s, e = {}) {
5435
5435
  }
5436
5436
  }
5437
5437
  function a(_ = t(n.seed)) {
5438
- return Cn(V(_, n.seed, "seed"), r.ORDER);
5438
+ return On(V(_, n.seed, "seed"), r.ORDER);
5439
5439
  }
5440
5440
  function c(_, x = !0) {
5441
5441
  return s.BASE.multiply(r.fromBytes(_)).toBytes(x);
@@ -5485,37 +5485,37 @@ function Wn(s, e, r = {}) {
5485
5485
  throw new Error(`invalid signature ${m}: out of range 1..Point.Fn.ORDER`);
5486
5486
  return y;
5487
5487
  }
5488
- function O() {
5488
+ function C() {
5489
5489
  if (w)
5490
5490
  throw new Error('"recovered" sig type is not supported for cofactor >2 curves');
5491
5491
  }
5492
5492
  function R(m, y) {
5493
5493
  mt(y);
5494
- const k = _.signature, C = y === "compact" ? k : y === "recovered" ? k + 1 : void 0;
5495
- return V(m, C);
5494
+ const k = _.signature, O = y === "compact" ? k : y === "recovered" ? k + 1 : void 0;
5495
+ return V(m, O);
5496
5496
  }
5497
5497
  class L {
5498
- constructor(y, k, C) {
5498
+ constructor(y, k, O) {
5499
5499
  P(this, "r");
5500
5500
  P(this, "s");
5501
5501
  P(this, "recovery");
5502
- if (this.r = I("r", y), this.s = I("s", k), C != null) {
5503
- if (O(), ![0, 1, 2, 3].includes(C))
5502
+ if (this.r = I("r", y), this.s = I("s", k), O != null) {
5503
+ if (C(), ![0, 1, 2, 3].includes(O))
5504
5504
  throw new Error("invalid recovery id");
5505
- this.recovery = C;
5505
+ this.recovery = O;
5506
5506
  }
5507
5507
  Object.freeze(this);
5508
5508
  }
5509
5509
  static fromBytes(y, k = x.format) {
5510
5510
  R(y, k);
5511
- let C;
5511
+ let O;
5512
5512
  if (k === "der") {
5513
5513
  const { r: E, s: T } = ve.toSig(V(y));
5514
5514
  return new L(E, T);
5515
5515
  }
5516
- k === "recovered" && (C = y[0], k = "compact", y = y.subarray(1));
5516
+ k === "recovered" && (O = y[0], k = "compact", y = y.subarray(1));
5517
5517
  const B = _.signature / 2, b = y.subarray(0, B), v = y.subarray(B, B * 2);
5518
- return new L(o.fromBytes(b), o.fromBytes(v), C);
5518
+ return new L(o.fromBytes(b), o.fromBytes(v), O);
5519
5519
  }
5520
5520
  static fromHex(y, k) {
5521
5521
  return this.fromBytes(Ye(y), k);
@@ -5530,10 +5530,10 @@ function Wn(s, e, r = {}) {
5530
5530
  return new L(this.r, this.s, y);
5531
5531
  }
5532
5532
  recoverPublicKey(y) {
5533
- const { r: k, s: C } = this, B = this.assertRecovery(), b = B === 2 || B === 3 ? k + a : k;
5533
+ const { r: k, s: O } = this, B = this.assertRecovery(), b = B === 2 || B === 3 ? k + a : k;
5534
5534
  if (!i.isValid(b))
5535
5535
  throw new Error("invalid recovery id: sig.r+curve.n != R.x");
5536
- const v = i.toBytes(b), E = s.fromBytes(Se(Hr((B & 1) === 0), v)), T = o.inv(b), N = q(V(y, void 0, "msgHash")), W = o.create(-N * T), U = o.create(C * T), $ = s.BASE.multiplyUnsafe(W).add(E.multiplyUnsafe(U));
5536
+ const v = i.toBytes(b), E = s.fromBytes(Se(Hr((B & 1) === 0), v)), T = o.inv(b), N = q(V(y, void 0, "msgHash")), W = o.create(-N * T), U = o.create(O * T), $ = s.BASE.multiplyUnsafe(W).add(E.multiplyUnsafe(U));
5537
5537
  if ($.is0())
5538
5538
  throw new Error("invalid recovery: point at infinify");
5539
5539
  return $.assertValidity(), $;
@@ -5545,8 +5545,8 @@ function Wn(s, e, r = {}) {
5545
5545
  toBytes(y = x.format) {
5546
5546
  if (mt(y), y === "der")
5547
5547
  return Ye(ve.hexFromSig(this));
5548
- const { r: k, s: C } = this, B = o.toBytes(k), b = o.toBytes(C);
5549
- return y === "recovered" ? (O(), Se(Uint8Array.of(this.assertRecovery()), B, b)) : Se(B, b);
5548
+ const { r: k, s: O } = this, B = o.toBytes(k), b = o.toBytes(O);
5549
+ return y === "recovered" ? (C(), Se(Uint8Array.of(this.assertRecovery()), B, b)) : Se(B, b);
5550
5550
  }
5551
5551
  toHex(y) {
5552
5552
  return We(this.toBytes(y));
@@ -5555,8 +5555,8 @@ function Wn(s, e, r = {}) {
5555
5555
  const M = r.bits2int || function(y) {
5556
5556
  if (y.length > 8192)
5557
5557
  throw new Error("input is too large");
5558
- const k = tt(y), C = y.length * 8 - c;
5559
- return C > 0 ? k >> BigInt(C) : k;
5558
+ const k = tt(y), O = y.length * 8 - c;
5559
+ return O > 0 ? k >> BigInt(O) : k;
5560
5560
  }, q = r.bits2int_modN || function(y) {
5561
5561
  return o.create(M(y));
5562
5562
  }, J = kt(c);
@@ -5567,7 +5567,7 @@ function Wn(s, e, r = {}) {
5567
5567
  return V(m, void 0, "message"), y ? V(e(m), void 0, "prehashed message") : m;
5568
5568
  }
5569
5569
  function Q(m, y, k) {
5570
- const { lowS: C, prehash: B, extraEntropy: b } = ut(k, x);
5570
+ const { lowS: O, prehash: B, extraEntropy: b } = ut(k, x);
5571
5571
  m = X(m, B);
5572
5572
  const v = q(m), E = o.fromBytes(y);
5573
5573
  if (!o.isValidNot0(E))
@@ -5589,16 +5589,16 @@ function Wn(s, e, r = {}) {
5589
5589
  if (ee === ge)
5590
5590
  return;
5591
5591
  let Lt = (ne.x === z ? 0 : 2) | Number(ne.y & Le), Dt = ee;
5592
- return C && S(ee) && (Dt = o.neg(ee), Lt ^= 1), new L(z, Dt, w ? void 0 : Lt);
5592
+ return O && S(ee) && (Dt = o.neg(ee), Lt ^= 1), new L(z, Dt, w ? void 0 : Lt);
5593
5593
  }
5594
5594
  return { seed: N, k2sig: U };
5595
5595
  }
5596
5596
  function H(m, y, k = {}) {
5597
- const { seed: C, k2sig: B } = Q(m, y, k);
5598
- return bn(e.outputLen, o.BYTES, n)(C, B).toBytes(k.format);
5597
+ const { seed: O, k2sig: B } = Q(m, y, k);
5598
+ return bn(e.outputLen, o.BYTES, n)(O, B).toBytes(k.format);
5599
5599
  }
5600
- function D(m, y, k, C = {}) {
5601
- const { lowS: B, prehash: b, format: v } = ut(C, x);
5600
+ function D(m, y, k, O = {}) {
5601
+ const { lowS: B, prehash: b, format: v } = ut(O, x);
5602
5602
  if (k = V(k, void 0, "publicKey"), y = X(y, b), !At(m)) {
5603
5603
  const E = m instanceof L ? ", use sig.toBytes()" : "";
5604
5604
  throw new Error("verify expects Uint8Array signature" + E);
@@ -5615,8 +5615,8 @@ function Wn(s, e, r = {}) {
5615
5615
  }
5616
5616
  }
5617
5617
  function F(m, y, k = {}) {
5618
- const { prehash: C } = ut(k, x);
5619
- return y = X(y, C), L.fromBytes(m, "recovered").recoverPublicKey(y).toBytes();
5618
+ const { prehash: O } = ut(k, x);
5619
+ return y = X(y, O), L.fromBytes(m, "recovered").recoverPublicKey(y).toBytes();
5620
5620
  }
5621
5621
  return Object.freeze({
5622
5622
  keygen: l,
@@ -5633,7 +5633,7 @@ function Wn(s, e, r = {}) {
5633
5633
  });
5634
5634
  }
5635
5635
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
5636
- const Ot = {
5636
+ const Ct = {
5637
5637
  p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
5638
5638
  n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
5639
5639
  h: BigInt(1),
@@ -5649,12 +5649,12 @@ const Ot = {
5649
5649
  ]
5650
5650
  }, nr = /* @__PURE__ */ BigInt(2);
5651
5651
  function qn(s) {
5652
- const e = Ot.p, r = BigInt(3), t = BigInt(6), n = BigInt(11), i = BigInt(22), o = BigInt(23), a = BigInt(44), c = BigInt(88), l = s * s * s % e, u = l * l * s % e, p = oe(u, r, e) * u % e, g = oe(p, r, e) * u % e, _ = oe(g, nr, e) * l % e, x = oe(_, n, e) * _ % e, w = oe(x, i, e) * x % e, S = oe(w, a, e) * w % e, I = oe(S, c, e) * S % e, O = oe(I, a, e) * w % e, R = oe(O, r, e) * u % e, L = oe(R, o, e) * x % e, M = oe(L, t, e) * l % e, q = oe(M, nr, e);
5652
+ const e = Ct.p, r = BigInt(3), t = BigInt(6), n = BigInt(11), i = BigInt(22), o = BigInt(23), a = BigInt(44), c = BigInt(88), l = s * s * s % e, u = l * l * s % e, p = oe(u, r, e) * u % e, g = oe(p, r, e) * u % e, _ = oe(g, nr, e) * l % e, x = oe(_, n, e) * _ % e, w = oe(x, i, e) * x % e, S = oe(w, a, e) * w % e, I = oe(S, c, e) * S % e, C = oe(I, a, e) * w % e, R = oe(C, r, e) * u % e, L = oe(R, o, e) * x % e, M = oe(L, t, e) * l % e, q = oe(M, nr, e);
5653
5653
  if (!yt.eql(yt.sqr(q), s))
5654
5654
  throw new Error("Cannot find square root");
5655
5655
  return q;
5656
5656
  }
5657
- const yt = rt(Ot.p, { sqrt: qn }), Kn = /* @__PURE__ */ Un(Ot, {
5657
+ const yt = rt(Ct.p, { sqrt: qn }), Kn = /* @__PURE__ */ Un(Ct, {
5658
5658
  Fp: yt,
5659
5659
  endo: Gn
5660
5660
  }), Vn = /* @__PURE__ */ Wn(Kn, gn), zn = BigInt(0), Me = BigInt(1), jn = BigInt(2), Yn = BigInt(7), Xn = BigInt(256), Jn = BigInt(113), Gr = [], qr = [], Kr = [];
@@ -5691,7 +5691,7 @@ function ei(s, e = 24) {
5691
5691
  }
5692
5692
  $e(r);
5693
5693
  }
5694
- class Ct {
5694
+ class Ot {
5695
5695
  // NOTE: we accept arguments in bytes instead of bits here.
5696
5696
  constructor(e, r, t, n = !1, i = 24) {
5697
5697
  P(this, "state");
@@ -5764,10 +5764,10 @@ class Ct {
5764
5764
  }
5765
5765
  _cloneInto(e) {
5766
5766
  const { blockLen: r, suffix: t, outputLen: n, rounds: i, enableXOF: o } = this;
5767
- return e || (e = new Ct(r, t, n, o, i)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = i, e.suffix = t, e.outputLen = n, e.enableXOF = o, e.destroyed = this.destroyed, e;
5767
+ return e || (e = new Ot(r, t, n, o, i)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = i, e.suffix = t, e.outputLen = n, e.enableXOF = o, e.destroyed = this.destroyed, e;
5768
5768
  }
5769
5769
  }
5770
- const ti = (s, e, r, t = {}) => yr(() => new Ct(e, s, r), t), ar = /* @__PURE__ */ ti(1, 136, 32), ri = 60;
5770
+ const ti = (s, e, r, t = {}) => yr(() => new Ot(e, s, r), t), ar = /* @__PURE__ */ ti(1, 136, 32), ri = 60;
5771
5771
  class si {
5772
5772
  constructor() {
5773
5773
  this.jwks = null;
@@ -5987,7 +5987,7 @@ class Ae {
5987
5987
  d.warn("[CROSSx] OAuth 타임아웃 (5분) — postMessage를 수신하지 못했습니다"), L(), t(new Error("Authentication timeout"));
5988
5988
  }, 5 * 60 * 1e3), x = 10, w = 30;
5989
5989
  let S = 0, I = null;
5990
- const O = () => {
5990
+ const C = () => {
5991
5991
  clearInterval(R), d.warn("[CROSSx] COOP 감지 — OAuth 서버 응답을 " + w + "초간 대기합니다"), I = setTimeout(() => {
5992
5992
  L(), t(new Error(
5993
5993
  "OAuth 서버로부터 응답을 받지 못했습니다. 브라우저 보안 정책(COOP)으로 인해 팝업 통신이 차단되었을 수 있습니다. 다시 시도해 주세요."
@@ -5996,9 +5996,9 @@ class Ae {
5996
5996
  }, R = setInterval(() => {
5997
5997
  S++;
5998
5998
  try {
5999
- g.closed && (S <= x ? O() : (L(), t(new Error("로그인이 취소되었습니다"))));
5999
+ g.closed && (S <= x ? C() : (L(), t(new Error("로그인이 취소되었습니다"))));
6000
6000
  } catch {
6001
- O();
6001
+ C();
6002
6002
  }
6003
6003
  }, 1e3), L = () => {
6004
6004
  clearTimeout(_), clearInterval(R), I && clearTimeout(I), window.removeEventListener("message", M);
@@ -6037,8 +6037,8 @@ class Ae {
6037
6037
  return;
6038
6038
  }
6039
6039
  const m = { token: D, email: F }, y = (k) => {
6040
- Ae.verifyIdTokenNonce(k, l).then(() => r(m)).catch((C) => {
6041
- d.error("[CROSSx] nonce 검증 실패:", C), t(C instanceof Error ? C : new Error("nonce verification failed"));
6040
+ Ae.verifyIdTokenNonce(k, l).then(() => r(m)).catch((O) => {
6041
+ d.error("[CROSSx] nonce 검증 실패:", O), t(O instanceof Error ? O : new Error("nonce verification failed"));
6042
6042
  });
6043
6043
  };
6044
6044
  H ? H.split(".").length === 3 ? y(H) : Q ? y(Q) : (d.warn(
@@ -6284,9 +6284,9 @@ class Ie {
6284
6284
  h.USER_NOT_FOUND,
6285
6285
  Ie.getGatewayErrorMessage(_.code, x)
6286
6286
  );
6287
- const S = w === h.AUTH_NOT_AUTHENTICATED ? h.SESSION_EXPIRED : w, I = S === h.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : Ie.getGatewayErrorMessage(_.code, x), O = _.data;
6287
+ const S = w === h.AUTH_NOT_AUTHENTICATED ? h.SESSION_EXPIRED : w, I = S === h.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : Ie.getGatewayErrorMessage(_.code, x), C = _.data;
6288
6288
  let R;
6289
- throw w === h.PIN_LOCKED ? R = Ie.extractLockDetails(O) : w === h.ADDRESS_LIMIT_EXCEEDED ? R = { limit: gt, raw: O } : R = O ?? void 0, new f(S, I, R);
6289
+ throw w === h.PIN_LOCKED ? R = Ie.extractLockDetails(C) : w === h.ADDRESS_LIMIT_EXCEEDED ? R = { limit: gt, raw: C } : R = C ?? void 0, new f(S, I, R);
6290
6290
  }
6291
6291
  return d.log("[CROSSx] Wallet Gateway API 성공:", { code: _.code, url: o, method: e }), _.data ?? _;
6292
6292
  }
@@ -8829,6 +8829,8 @@ button.__crossx-connect-other-block:active {
8829
8829
  letter-spacing: 0;
8830
8830
  -webkit-tap-highlight-color: transparent;
8831
8831
  transition: background 0.12s, box-shadow 0.12s;
8832
+ -webkit-text-security: disc;
8833
+ text-security: disc;
8832
8834
  }
8833
8835
  .__crossx-pin6-box:focus {
8834
8836
  background: var(--cx-input-border);
@@ -9173,7 +9175,7 @@ function _i(s) {
9173
9175
  }, { passive: !0 });
9174
9176
  }
9175
9177
  const fi = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
9176
- function Oe() {
9178
+ function Ce() {
9177
9179
  if (fi()) {
9178
9180
  const e = window.scrollY;
9179
9181
  return document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.left = "0", document.body.style.right = "0", () => {
@@ -9451,7 +9453,7 @@ function Ri(s) {
9451
9453
  function Ni(s) {
9452
9454
  return `https://www.crossscan.io/address/${s}?tab=txs`;
9453
9455
  }
9454
- function Oi(s, e) {
9456
+ function Ci(s, e) {
9455
9457
  return `https://explorer.crosstoken.io/${Ri(s)}/tx/${e}`;
9456
9458
  }
9457
9459
  function Jr(s, e) {
@@ -9461,9 +9463,9 @@ function Ze(s) {
9461
9463
  return Jr(de(s), Ni(s));
9462
9464
  }
9463
9465
  function Zr(s, e) {
9464
- return Jr(de(e), Oi(s, e));
9466
+ return Jr(de(e), Ci(s, e));
9465
9467
  }
9466
- function Ci(s, e, r) {
9468
+ function Oi(s, e, r) {
9467
9469
  const t = j(
9468
9470
  (r == null ? void 0 : r.label_from) ?? "From",
9469
9471
  `${Ze(s.from)}
@@ -9543,10 +9545,10 @@ function Li(s, e, r, t) {
9543
9545
  <button class="__crossx-approve-btn" id="__crossx-done-btn">${A((t == null ? void 0 : t.tx_complete_done_button) ?? (n ? "All Done" : "Done"))}</button>
9544
9546
  `, c.querySelectorAll(".__crossx-copy-btn").forEach((w) => {
9545
9547
  w.addEventListener("click", (S) => {
9546
- var O;
9548
+ var C;
9547
9549
  S.stopPropagation();
9548
9550
  const I = w.dataset.copy;
9549
- I && ((O = navigator.clipboard) == null || O.writeText(I).catch(() => {
9551
+ I && ((C = navigator.clipboard) == null || C.writeText(I).catch(() => {
9550
9552
  }));
9551
9553
  });
9552
9554
  });
@@ -9915,7 +9917,7 @@ function pt(s) {
9915
9917
  <span id="__crossx-pin6-lock-countdown"></span>
9916
9918
  </p>` : "", a = s.warningMessage && s.attemptCount != null && s.attemptCount > 0 ? `<p class="__crossx-pin6-warning" id="__crossx-pin6-warning">${A(s.warningMessage)}</p>` : '<p class="__crossx-pin6-warning" id="__crossx-pin6-warning"></p>', c = s.attemptCount != null && s.attemptCount > 0 ? `<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt">${s.attemptCount}/${s.maxAttempts ?? "?"}</p>` : '<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt"></p>', l = e ? " --locked" : "", u = Array.from(
9917
9919
  { length: 6 },
9918
- (w, S) => `<input class="__crossx-pin6-box${l}" type="password" maxlength="1" inputmode="numeric" pattern="[0-9]" autocomplete="off" aria-label="PIN digit ${S + 1}"${e ? " disabled" : ""}>`
9920
+ (w, S) => `<input class="__crossx-pin6-box${l}" type="tel" maxlength="1" inputmode="numeric" pattern="[0-9]" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" aria-label="PIN digit ${S + 1}"${e ? " disabled" : ""}>`
9919
9921
  ).join(""), p = e ? " --locked" : "", g = Array.from(
9920
9922
  { length: 6 },
9921
9923
  (w, S) => `<div class="__crossx-pin6-dot${p}" data-dot-index="${S}" aria-label="PIN digit ${S + 1}"></div>`
@@ -9985,7 +9987,7 @@ function to(s) {
9985
9987
  return r > 0 ? `${r}h ${String(t).padStart(2, "0")}m` : `${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
9986
9988
  }
9987
9989
  function _t(s, e, r, t, n, i, o) {
9988
- var C, B;
9990
+ var O, B;
9989
9991
  let a = !!(i && i > Date.now()), c = !1;
9990
9992
  const l = () => Array.from(s.querySelectorAll(".__crossx-pin6-box")), u = () => s.querySelector("#__crossx-pin6-boxes"), p = () => s.querySelector("#__crossx-pin6-error"), g = () => s.querySelector("#__crossx-pin6-lock-msg"), _ = () => s.querySelector("#__crossx-pin6-lock-countdown"), x = () => s.querySelector(".__crossx-pin6-body"), w = () => l().map((b) => b.value).join(""), S = () => Array.from(s.querySelectorAll(".__crossx-pin6-dot")), I = () => {
9991
9993
  var E;
@@ -9997,7 +9999,7 @@ function _t(s, e, r, t, n, i, o) {
9997
9999
  const T = b.findIndex((W) => !W.value);
9998
10000
  (E = v[T === -1 ? 5 : T]) == null || E.classList.add("--active");
9999
10001
  }
10000
- }, O = () => {
10002
+ }, C = () => {
10001
10003
  s.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((v) => v.classList.toggle("--disabled", a)), S().forEach((v) => v.classList.toggle("--locked", a)), I();
10002
10004
  }, R = (b) => {
10003
10005
  a = b, l().forEach((v) => {
@@ -10044,7 +10046,7 @@ function _t(s, e, r, t, n, i, o) {
10044
10046
  var W;
10045
10047
  R(!0), l().forEach((U) => {
10046
10048
  U.value = "";
10047
- }), O();
10049
+ }), C();
10048
10050
  const v = p();
10049
10051
  if (v && (v.textContent = "Too many failed attempts. Please wait."), !g()) {
10050
10052
  const U = document.createElement("p");
@@ -10055,7 +10057,7 @@ function _t(s, e, r, t, n, i, o) {
10055
10057
  const E = () => {
10056
10058
  var K;
10057
10059
  const U = b - Date.now(), $ = _();
10058
- U <= 0 ? (clearInterval(T), R(!1), (K = g()) == null || K.remove(), v && (v.textContent = ""), O(), setTimeout(() => {
10060
+ U <= 0 ? (clearInterval(T), R(!1), (K = g()) == null || K.remove(), v && (v.textContent = ""), C(), setTimeout(() => {
10059
10061
  var Y;
10060
10062
  return (Y = l()[0]) == null ? void 0 : Y.focus();
10061
10063
  }, 50)) : $ && ($.textContent = ` ${to(U)}`);
@@ -10096,7 +10098,7 @@ function _t(s, e, r, t, n, i, o) {
10096
10098
  const b = l(), v = b.find((E) => !E.value) ?? b[b.length - 1];
10097
10099
  v == null || v.focus();
10098
10100
  };
10099
- (C = u()) == null || C.addEventListener("click", (b) => {
10101
+ (O = u()) == null || O.addEventListener("click", (b) => {
10100
10102
  b.target.classList.contains("__crossx-pin6-box") || y();
10101
10103
  }), (B = x()) == null || B.addEventListener("click", (b) => {
10102
10104
  const v = b.target;
@@ -10156,7 +10158,7 @@ function _t(s, e, r, t, n, i, o) {
10156
10158
  v();
10157
10159
  const W = N.getBoundingClientRect();
10158
10160
  T.clientX >= W.left && T.clientX <= W.right && T.clientY >= W.top && T.clientY <= W.bottom && !a && !c && E(N);
10159
- }), k.addEventListener("pointercancel", v), k.addEventListener("pointerleave", v, !0), I(), i && i > Date.now() && O();
10161
+ }), k.addEventListener("pointercancel", v), k.addEventListener("pointerleave", v, !0), I(), i && i > Date.now() && C();
10160
10162
  }
10161
10163
  }
10162
10164
  const ro = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -10246,9 +10248,9 @@ class oo {
10246
10248
  */
10247
10249
  showWalletSelector(e, r, t) {
10248
10250
  return new Promise((n, i) => {
10249
- var O;
10251
+ var C;
10250
10252
  ae();
10251
- const o = [...e], a = Wi(o, this.tokens, t, this.messages), c = Oe();
10253
+ const o = [...e], a = Wi(o, this.tokens, t, this.messages), c = Ce();
10252
10254
  ce(a);
10253
10255
  let l = !1;
10254
10256
  const u = () => {
@@ -10288,7 +10290,7 @@ class oo {
10288
10290
  const L = R instanceof f && R.code === h.ADDRESS_LIMIT_EXCEEDED, M = this.resolveAddWalletErrorMessage(R);
10289
10291
  w && (w.textContent = M, w.hidden = !1), L ? (S.disabled = !0, S.setAttribute("aria-disabled", "true")) : S.disabled = !1, p = R;
10290
10292
  }
10291
- }), (O = a.querySelector("#__crossx-close-btn")) == null || O.addEventListener("click", _), a.addEventListener("click", (R) => {
10293
+ }), (C = a.querySelector("#__crossx-close-btn")) == null || C.addEventListener("click", _), a.addEventListener("click", (R) => {
10292
10294
  R.target === a && _();
10293
10295
  });
10294
10296
  const I = (R) => {
@@ -10325,7 +10327,7 @@ class oo {
10325
10327
  return new Promise((n) => {
10326
10328
  var g, _, x, w;
10327
10329
  ae();
10328
- const i = zi(this.tokens, r, this.messages), o = Oe();
10330
+ const i = zi(this.tokens, r, this.messages), o = Ce();
10329
10331
  ce(i);
10330
10332
  const a = () => {
10331
10333
  i.remove(), o();
@@ -10337,8 +10339,8 @@ class oo {
10337
10339
  a(), n(null);
10338
10340
  };
10339
10341
  (g = i.querySelector("#__crossx-apple-btn")) == null || g.addEventListener("click", () => c("apple")), (_ = i.querySelector("#__crossx-google-btn")) == null || _.addEventListener("click", () => c("google")), (x = i.querySelector("#__crossx-connect-other-wallet-btn")) == null || x.addEventListener("click", (S) => {
10340
- const O = S.currentTarget.dataset.walletId ?? "";
10341
- O && l(O);
10342
+ const C = S.currentTarget.dataset.walletId ?? "";
10343
+ C && l(C);
10342
10344
  }), (w = i.querySelector("#__crossx-close-btn")) == null || w.addEventListener("click", u), i.addEventListener("click", (S) => {
10343
10345
  S.target === i && u();
10344
10346
  }), i.querySelectorAll(".__crossx-login-terms-link").forEach((S) => {
@@ -10361,7 +10363,7 @@ class oo {
10361
10363
  accountLabel: (t == null ? void 0 : t.session_alert_account_label) ?? "Account",
10362
10364
  signOutLabel: (t == null ? void 0 : t.session_alert_sign_out_button) ?? "Sign out",
10363
10365
  signInAgainLabel: (t == null ? void 0 : t.session_alert_sign_in_again_button) ?? "Sign in again"
10364
- }), i = Oe();
10366
+ }), i = Ce();
10365
10367
  ce(n);
10366
10368
  let o = !1;
10367
10369
  const a = () => {
@@ -10430,13 +10432,13 @@ class oo {
10430
10432
  }, o = {
10431
10433
  title: (t == null ? void 0 : t.pin_setup_confirm_title) ?? "Confirm PIN",
10432
10434
  headerSubtitle: (t == null ? void 0 : t.pin_setup_confirm_subtitle) ?? "Enter your PIN again to confirm."
10433
- }, a = hr(this.tokens, Qi(n)), c = Oe();
10435
+ }, a = hr(this.tokens, Qi(n)), c = Ce();
10434
10436
  ce(a);
10435
10437
  let l = !1;
10436
10438
  const u = () => {
10437
10439
  l || (l = !0, a.remove(), c());
10438
- }, p = (O) => {
10439
- u(), r(O);
10440
+ }, p = (C) => {
10441
+ u(), r(C);
10440
10442
  }, g = () => {
10441
10443
  u(), r(null);
10442
10444
  }, _ = a.querySelector(".__crossx-card"), x = {
@@ -10445,21 +10447,21 @@ class oo {
10445
10447
  repeatingDigit: (t == null ? void 0 : t.pin_validation_repeating_digit) ?? "Cannot use the same number 3+ times in a row.",
10446
10448
  sequential: (t == null ? void 0 : t.pin_validation_sequential) ?? "Sequential numbers (e.g., 123456) are not allowed.",
10447
10449
  alternatingPattern: (t == null ? void 0 : t.pin_validation_alternating_pattern) ?? "Repeating patterns (e.g., 121212) are not allowed."
10448
- }, w = (O) => {
10450
+ }, w = (C) => {
10449
10451
  var R;
10450
10452
  _.innerHTML = pt({
10451
10453
  title: o.title,
10452
10454
  headerSubtitle: o.headerSubtitle
10453
10455
  }), this.applyPinKeyboardMode(_), (R = _.querySelector("#__crossx-close-btn")) == null || R.addEventListener("click", g), _t(_, (L) => {
10454
- L === O ? p(O) : S(i.mismatchError);
10456
+ L === C ? p(C) : S(i.mismatchError);
10455
10457
  }, g);
10456
- }, S = (O) => {
10458
+ }, S = (C) => {
10457
10459
  var R;
10458
10460
  _.innerHTML = pt({
10459
10461
  title: i.title,
10460
10462
  headerSubtitle: i.headerSubtitle,
10461
10463
  subtitle: i.subtitle,
10462
- errorMessage: O
10464
+ errorMessage: C
10463
10465
  }), this.applyPinKeyboardMode(_), (R = _.querySelector("#__crossx-close-btn")) == null || R.addEventListener("click", g), _t(_, (L) => {
10464
10466
  const M = eo(L, x);
10465
10467
  M ? S(M) : w(L);
@@ -10467,10 +10469,10 @@ class oo {
10467
10469
  };
10468
10470
  (() => {
10469
10471
  var Q;
10470
- const O = Array.from(_.querySelectorAll(".__crossx-pw-notice-item")), R = _.querySelector("#__crossx-pin-notice-next"), L = /* @__PURE__ */ new Set();
10472
+ const C = Array.from(_.querySelectorAll(".__crossx-pw-notice-item")), R = _.querySelector("#__crossx-pin-notice-next"), L = /* @__PURE__ */ new Set();
10471
10473
  R.removeAttribute("disabled");
10472
10474
  const M = R.dataset.nextLabel ?? "Next", q = R.dataset.submitLabel ?? "I Understand", J = () => {
10473
- const H = L.size === O.length;
10475
+ const H = L.size === C.length;
10474
10476
  R.classList.toggle("--disabled", !H), R.textContent = H ? q : M;
10475
10477
  }, G = (H, D) => {
10476
10478
  if (L.has(D)) return;
@@ -10481,7 +10483,7 @@ class oo {
10481
10483
  const F = H.querySelector(`#__crossx-notice-check-${D}`);
10482
10484
  L.delete(D), F.classList.remove("--checked"), H.setAttribute("aria-checked", "false"), J();
10483
10485
  };
10484
- O.forEach((H) => {
10486
+ C.forEach((H) => {
10485
10487
  const D = parseInt(H.dataset.checkIndex ?? "0", 10);
10486
10488
  H.addEventListener("click", () => {
10487
10489
  L.has(D) ? X(H, D) : G(H, D);
@@ -10489,11 +10491,11 @@ class oo {
10489
10491
  (F.key === " " || F.key === "Enter") && (F.preventDefault(), L.has(D) ? X(H, D) : G(H, D));
10490
10492
  });
10491
10493
  }), R.addEventListener("click", () => {
10492
- if (L.size === O.length) {
10494
+ if (L.size === C.length) {
10493
10495
  S(e == null ? void 0 : e.errorMessage);
10494
10496
  return;
10495
10497
  }
10496
- const H = O.find((F) => {
10498
+ const H = C.find((F) => {
10497
10499
  const m = parseInt(F.dataset.checkIndex ?? "0", 10);
10498
10500
  return !L.has(m);
10499
10501
  });
@@ -10503,8 +10505,8 @@ class oo {
10503
10505
  H.classList.remove("--highlight"), G(H, D);
10504
10506
  }, 400);
10505
10507
  }), (Q = _.querySelector("#__crossx-close-btn")) == null || Q.addEventListener("click", g);
10506
- })(), a.addEventListener("click", (O) => {
10507
- O.target === a && g();
10508
+ })(), a.addEventListener("click", (C) => {
10509
+ C.target === a && g();
10508
10510
  });
10509
10511
  });
10510
10512
  }
@@ -10528,20 +10530,20 @@ class oo {
10528
10530
  attemptCount: e == null ? void 0 : e.attemptCount,
10529
10531
  maxAttempts: e == null ? void 0 : e.maxAttempts
10530
10532
  })
10531
- ), u = Oe();
10533
+ ), u = Ce();
10532
10534
  ce(l);
10533
10535
  let p = !1;
10534
10536
  const g = () => {
10535
10537
  p || (p = !0, l.remove(), u());
10536
- }, _ = (O) => {
10537
- g(), r(O);
10538
+ }, _ = (C) => {
10539
+ g(), r(C);
10538
10540
  }, x = () => {
10539
10541
  g(), r(null);
10540
- }, w = (O) => {
10541
- g(), t(O);
10542
+ }, w = (C) => {
10543
+ g(), t(C);
10542
10544
  }, S = l.querySelector(".__crossx-card");
10543
- this.applyPinKeyboardMode(S), (I = S.querySelector("#__crossx-close-btn")) == null || I.addEventListener("click", x), _t(S, _, x, w, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, c), l.addEventListener("click", (O) => {
10544
- O.target === l && x();
10545
+ this.applyPinKeyboardMode(S), (I = S.querySelector("#__crossx-close-btn")) == null || I.addEventListener("click", x), _t(S, _, x, w, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, c), l.addEventListener("click", (C) => {
10546
+ C.target === l && x();
10545
10547
  });
10546
10548
  });
10547
10549
  }
@@ -10598,7 +10600,7 @@ class oo {
10598
10600
  return new Promise((r) => {
10599
10601
  var a, c;
10600
10602
  ae();
10601
- const t = Ci(e, this.tokens, this.messages);
10603
+ const t = Oi(e, this.tokens, this.messages);
10602
10604
  ce(t);
10603
10605
  const n = () => t.remove(), i = () => {
10604
10606
  n(), r();
@@ -10654,7 +10656,7 @@ class oo {
10654
10656
  ae();
10655
10657
  let t;
10656
10658
  e.type === "sign-message" ? t = Di(e, this.tokens, this.messages) : e.type === "sign-typed-data" ? t = $i(e, this.tokens, this.messages) : e.type === "sign" ? t = Ai(e, this.tokens, this.displayDecimals, this.messages) : t = Ii(e, this.tokens, this.displayDecimals, this.messages);
10657
- const n = Oe();
10659
+ const n = Ce();
10658
10660
  ce(t);
10659
10661
  const i = () => {
10660
10662
  t.remove(), n();
@@ -10841,6 +10843,10 @@ class ao {
10841
10843
  setMessages(e) {
10842
10844
  return this.browserConfirmation.setMessages(e);
10843
10845
  }
10846
+ setPinKeyboard(e) {
10847
+ var r, t;
10848
+ (t = (r = this.browserConfirmation).setPinKeyboard) == null || t.call(r, e);
10849
+ }
10844
10850
  }
10845
10851
  class co {
10846
10852
  constructor() {
@@ -10931,7 +10937,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10931
10937
  },
10932
10938
  () => typeof window < "u" ? window.location.origin : "http://localhost",
10933
10939
  x
10934
- ), O = e != null && e.wrapConfirmation ? e.wrapConfirmation(I) : I, R = new xt(
10940
+ ), C = e != null && e.wrapConfirmation ? e.wrapConfirmation(I) : I, R = new xt(
10935
10941
  t,
10936
10942
  n,
10937
10943
  o,
@@ -10940,7 +10946,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10940
10946
  l,
10941
10947
  g,
10942
10948
  u,
10943
- O,
10949
+ C,
10944
10950
  w,
10945
10951
  p
10946
10952
  );