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

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 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 ?? "(없음)");
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 ?? "(없음)");
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 C = await this.crypto.verifyJWT(p);
669
- if (n = C.signatureVerified ?? !1, !C.valid)
668
+ const O = await this.crypto.verifyJWT(p);
669
+ if (n = O.signatureVerified ?? !1, !O.valid)
670
670
  throw d.error("[CROSSx] access_token 검증 실패"), new Error("유효하지 않은 access token");
671
- const R = C.payload, L = R.email ?? w ?? r;
671
+ const R = O.payload, L = R.email ?? w ?? r;
672
672
  d.log(
673
673
  "[CROSSx] email 소스 — CROSSx JWT:",
674
674
  R.email ?? "(없음)",
@@ -1378,7 +1378,7 @@ function fr() {
1378
1378
  }
1379
1379
  return Pe.production;
1380
1380
  }
1381
- const Ss = 2e3, Ut = 6e4, Es = 1e3, As = 1e4, Is = "0x77359400", Ht = "0x3B9ACA00", Wt = 130, Et = 6, Gt = 18, qt = 3e4, Ts = 5 * 60 * 1e3, ks = 30 * 1e3, gt = 100, Rs = "crossx-sdk-js/2.2.2";
1381
+ const Ss = 2e3, Ut = 6e4, Es = 1e3, As = 1e4, Is = "0x77359400", Ht = "0x3B9ACA00", Wt = 130, Et = 6, Gt = 18, qt = 3e4, Ts = 5 * 60 * 1e3, ks = 30 * 1e3, gt = 100, Rs = "crossx-sdk-js/2.2.3";
1382
1382
  function gr(s) {
1383
1383
  let e = s.length;
1384
1384
  for (; e > 0 && s.charCodeAt(e - 1) === 48; ) e--;
@@ -1406,7 +1406,7 @@ function Ge(s, e, r, t = Et) {
1406
1406
  return;
1407
1407
  }
1408
1408
  }
1409
- function Cs(s) {
1409
+ function Os(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 Cs(s) {
1419
1419
  `서명 길이가 유효하지 않습니다: ${Wt} hex 문자(65 바이트) 예상, 현재 ${e.length}`
1420
1420
  );
1421
1421
  }
1422
- function Os(s) {
1422
+ function Cs(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 Oe {
1469
+ class Ce {
1470
1470
  constructor(e) {
1471
1471
  this.deps = e, this.verifyPinMutex = null;
1472
1472
  }
@@ -1539,7 +1539,7 @@ class Oe {
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 Oe.buildPinLockedResult(u, a);
1542
+ return Ce.buildPinLockedResult(u, a);
1543
1543
  }
1544
1544
  throw u;
1545
1545
  }
@@ -1573,7 +1573,7 @@ class Oe {
1573
1573
  return await e();
1574
1574
  } catch (n) {
1575
1575
  if (n instanceof f) {
1576
- if (t = Oe.parsePinError(n, r), !t) throw n;
1576
+ if (t = Ce.parsePinError(n, r), !t) throw n;
1577
1577
  } else
1578
1578
  throw n;
1579
1579
  }
@@ -1587,7 +1587,7 @@ class Oe {
1587
1587
  try {
1588
1588
  return await e();
1589
1589
  } catch (n) {
1590
- if (n instanceof f && (t = Oe.parsePinError(n, r), t))
1590
+ if (n instanceof f && (t = Ce.parsePinError(n, r), t))
1591
1591
  continue;
1592
1592
  throw n;
1593
1593
  }
@@ -1612,7 +1612,7 @@ class Oe {
1612
1612
  return null;
1613
1613
  }
1614
1614
  static buildPinLockedResult(e, r) {
1615
- const t = Oe.parsePinError(e, r);
1615
+ const t = Ce.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 Oe({
2325
+ }), this.pinOrchestrator = new Ce({
2326
2326
  confirmation: this.confirmation,
2327
2327
  walletProvider: this.walletProvider,
2328
2328
  pinStore: this.pinStore,
@@ -2447,7 +2447,7 @@ const Te = class Te extends ys {
2447
2447
  }
2448
2448
  async _doInitialize(e) {
2449
2449
  var r, t;
2450
- d.log("[CROSSx SDK] v2.2.2 초기화 중..."), this.confirmation.setMessages(xe(this._config.locale));
2450
+ d.log("[CROSSx SDK] v2.2.3 초기화 중..."), this.confirmation.setMessages(xe(this._config.locale));
2451
2451
  try {
2452
2452
  const n = fr();
2453
2453
  this.internalConfig.oauthServiceUrl = n.oauthServiceUrl, this.internalConfig.authApiUrl = n.authApiUrl, this.internalConfig.walletGatewayUrl = n.walletGatewayUrl, this.adapterConfig.gatewayUrl = n.walletGatewayUrl, (t = (r = this.crypto).setJWKSEndpoint) == null || t.call(r, `${n.authApiUrl}/.well-known/jwks.json`);
@@ -2476,7 +2476,7 @@ const Te = class Te extends ys {
2476
2476
  d.log("[CROSSx] initialize: 비밀번호 입력 취소 — 지갑 미로드 상태로 계속");
2477
2477
  }
2478
2478
  }
2479
- return this.initialized = !0, d.info("[CROSSx SDK] v2.2.2 초기화 완료"), this.emit("initialized", { restored: !!(c != null && c.success) }), c ?? null;
2479
+ return this.initialized = !0, d.info("[CROSSx SDK] v2.2.3 초기화 완료"), this.emit("initialized", { restored: !!(c != null && c.success) }), c ?? null;
2480
2480
  } catch (n) {
2481
2481
  throw new f(h.AUTH_NOT_INITIALIZED, "SDK 초기화에 실패했습니다", n);
2482
2482
  }
@@ -2497,7 +2497,7 @@ const Te = class Te extends ys {
2497
2497
  const e = new fe({
2498
2498
  appId: this._config.projectId,
2499
2499
  appVersion: "1.0.0",
2500
- sdkVersion: "2.2.2",
2500
+ sdkVersion: "2.2.3",
2501
2501
  keyId: "key-id-1",
2502
2502
  userIdHash: "user-hash-placeholder",
2503
2503
  projectId: this._config.projectId
@@ -2533,7 +2533,7 @@ const Te = class Te extends ys {
2533
2533
  this._rnBridgeWalletName
2534
2534
  ), d.log("[CROSSx] Bridge 로그인 성공", { userId: (e = t.user) == null ? void 0 : e.id }), t) : null;
2535
2535
  } catch (r) {
2536
- return r instanceof f && r.code === h.USER_REJECTED ? (d.log("[CROSSx] Bridge 로그인 거부 — bridge 비활성화, OAuth fallback"), this._rnBridgeService = null, null) : (d.warn("[CROSSx] Bridge 로그인 타임아웃/실패 — OAuth fallback 차단", r), !1);
2536
+ return r instanceof f && r.code === h.USER_REJECTED ? (d.log("[CROSSx] Bridge 로그인 거부 — OAuth fallback 진행 (bridge 유지)"), null) : (d.warn("[CROSSx] Bridge 로그인 타임아웃/실패", r), !1);
2537
2537
  }
2538
2538
  }
2539
2539
  /**
@@ -2720,7 +2720,6 @@ const Te = class Te extends ys {
2720
2720
  } catch (r) {
2721
2721
  d.warn("[CROSSx] RN Bridge signOut 통보 실패 (로그아웃 자체는 정상)", r);
2722
2722
  }
2723
- this._rnBridgeService = null, this._rnBridgeWalletAddress = void 0, this._rnBridgeWalletName = void 0;
2724
2723
  } catch (e) {
2725
2724
  throw new f(h.UNKNOWN_ERROR, "로그아웃에 실패했습니다", e);
2726
2725
  }
@@ -3042,6 +3041,21 @@ const Te = class Te extends ys {
3042
3041
  applyLocale(e = this._config.locale ?? "en") {
3043
3042
  this._config = Object.freeze({ ...this._config, locale: e }), this.confirmation.setMessages(xe(e));
3044
3043
  }
3044
+ /**
3045
+ * PIN 입력 모달의 키보드 방식을 런타임에 변경합니다.
3046
+ * 다음 PIN 모달이 열릴 때부터 적용됩니다.
3047
+ *
3048
+ * @param mode 키보드 방식: 'virtual' (커스텀 numpad) | 'native' (OS 기본 키보드) | 함수
3049
+ *
3050
+ * @example
3051
+ * sdk.setPinKeyboard('native');
3052
+ * sdk.setPinKeyboard('virtual');
3053
+ * sdk.setPinKeyboard(() => window.innerWidth < 768 ? 'native' : 'virtual');
3054
+ */
3055
+ setPinKeyboard(e) {
3056
+ var r, t;
3057
+ this._config = Object.freeze({ ...this._config, pinKeyboard: e }), (t = (r = this.confirmation).setPinKeyboard) == null || t.call(r, e);
3058
+ }
3045
3059
  /**
3046
3060
  * 지갑 생성/로드 (로그인 후 address가 없는 경우)
3047
3061
  * - exists: Enter Password → POST /mnemonic/addresses
@@ -3160,7 +3174,7 @@ const Te = class Te extends ys {
3160
3174
  n.address
3161
3175
  )
3162
3176
  });
3163
- return Cs(i.signature), {
3177
+ return Os(i.signature), {
3164
3178
  chainId: e,
3165
3179
  signature: i.signature,
3166
3180
  address: n.address
@@ -3238,7 +3252,7 @@ const Te = class Te extends ys {
3238
3252
  a
3239
3253
  )
3240
3254
  });
3241
- return Os(o.signature), {
3255
+ return Cs(o.signature), {
3242
3256
  chainId: e,
3243
3257
  signedTx: o.signature,
3244
3258
  txHash: o.txHash ?? ""
@@ -3377,7 +3391,7 @@ const Te = class Te extends ys {
3377
3391
  let g, _;
3378
3392
  const x = this.waitForTxAndGetReceipt(a, e, { intervalMs: c, timeoutMs: l }).then((I) => {
3379
3393
  g = I;
3380
- 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);
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);
3381
3395
  return {
3382
3396
  chainId: e,
3383
3397
  txHash: a,
@@ -4466,17 +4480,17 @@ function bn(s, e, r) {
4466
4480
  const I = [];
4467
4481
  for (; S < e; ) {
4468
4482
  c = g();
4469
- const C = c.slice();
4470
- I.push(C), S += c.length;
4483
+ const O = c.slice();
4484
+ I.push(O), S += c.length;
4471
4485
  }
4472
4486
  return Se(...I);
4473
4487
  };
4474
4488
  return (S, I) => {
4475
4489
  p(), _(S);
4476
- let C;
4477
- for (; !(C = I(x())); )
4490
+ let O;
4491
+ for (; !(O = I(x())); )
4478
4492
  _();
4479
- return p(), C;
4493
+ return p(), O;
4480
4494
  };
4481
4495
  }
4482
4496
  function Rt(s, e = {}, r = {}) {
@@ -4533,7 +4547,7 @@ function Nt(s, e, r) {
4533
4547
  if (!s.eql(s.sqr(e), r))
4534
4548
  throw new Error("Cannot find square root");
4535
4549
  }
4536
- function Cr(s, e) {
4550
+ function Or(s, e) {
4537
4551
  const r = (s.ORDER + te) / Tr, t = s.pow(e, r);
4538
4552
  return Nt(s, t, e), t;
4539
4553
  }
@@ -4542,7 +4556,7 @@ function En(s, e) {
4542
4556
  return Nt(s, a, e), a;
4543
4557
  }
4544
4558
  function An(s) {
4545
- 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;
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;
4546
4560
  return (a, c) => {
4547
4561
  let l = a.pow(c, o), u = a.mul(l, t);
4548
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);
@@ -4551,7 +4565,7 @@ function An(s) {
4551
4565
  return Nt(a, S, c), S;
4552
4566
  };
4553
4567
  }
4554
- function Or(s) {
4568
+ function Cr(s) {
4555
4569
  if (s < Ir)
4556
4570
  throw new Error("sqrt is not defined for small field");
4557
4571
  let e = s - te, r = 0;
@@ -4563,7 +4577,7 @@ function Or(s) {
4563
4577
  if (t++ > 1e3)
4564
4578
  throw new Error("Cannot find square root: probably non-prime P");
4565
4579
  if (r === 1)
4566
- return Cr;
4580
+ return Or;
4567
4581
  let i = n.pow(t, e);
4568
4582
  const o = (e + te) / ke;
4569
4583
  return function(c, l) {
@@ -4586,7 +4600,7 @@ function Or(s) {
4586
4600
  };
4587
4601
  }
4588
4602
  function In(s) {
4589
- return s % Tr === Ir ? Cr : s % Rr === kr ? En : s % Nr === Sn ? An(s) : Or(s);
4603
+ return s % Tr === Ir ? Or : s % Rr === kr ? En : s % Nr === Sn ? An(s) : Cr(s);
4590
4604
  }
4591
4605
  const Tn = [
4592
4606
  "create",
@@ -4642,7 +4656,7 @@ function Nn(s, e) {
4642
4656
  const r = e !== void 0 ? e : s.toString(2).length, t = Math.ceil(r / 8);
4643
4657
  return { nBitLength: r, nByteLength: t };
4644
4658
  }
4645
- class Cn {
4659
+ class On {
4646
4660
  constructor(e, r = {}) {
4647
4661
  P(this, "ORDER");
4648
4662
  P(this, "BITS");
@@ -4755,7 +4769,7 @@ class Cn {
4755
4769
  }
4756
4770
  }
4757
4771
  function rt(s, e = {}) {
4758
- return new Cn(s, e);
4772
+ return new On(s, e);
4759
4773
  }
4760
4774
  function Lr(s) {
4761
4775
  if (typeof s != "bigint")
@@ -4767,7 +4781,7 @@ function Dr(s) {
4767
4781
  const e = Lr(s);
4768
4782
  return e + Math.ceil(e / 2);
4769
4783
  }
4770
- function On(s, e, r = !1) {
4784
+ function Cn(s, e, r = !1) {
4771
4785
  V(s);
4772
4786
  const t = s.length, n = Lr(e), i = Dr(e);
4773
4787
  if (t < 16 || t < i || t > 1024)
@@ -5118,18 +5132,18 @@ function Un(s, e = {}) {
5118
5132
  throw new Error("compression is not supported: Field does not have .isOdd()");
5119
5133
  }
5120
5134
  function p(F, m, y) {
5121
- const { x: k, y: O } = m.toAffine(), B = t.toBytes(k);
5135
+ const { x: k, y: C } = m.toAffine(), B = t.toBytes(k);
5122
5136
  if (Xe(y, "isCompressed"), y) {
5123
5137
  u();
5124
- const b = !t.isOdd(O);
5138
+ const b = !t.isOdd(C);
5125
5139
  return Se(Hr(b), B);
5126
5140
  } else
5127
- return Se(Uint8Array.of(4), B, t.toBytes(O));
5141
+ return Se(Uint8Array.of(4), B, t.toBytes(C));
5128
5142
  }
5129
5143
  function g(F) {
5130
5144
  V(F, void 0, "Point");
5131
- const { publicKey: m, publicKeyUncompressed: y } = l, k = F.length, O = F[0], B = F.subarray(1);
5132
- if (k === m && (O === 2 || O === 3)) {
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)) {
5133
5147
  const b = t.fromBytes(B);
5134
5148
  if (!t.isValid(b))
5135
5149
  throw new Error("bad point: is not on curve, wrong x");
@@ -5143,8 +5157,8 @@ function Un(s, e = {}) {
5143
5157
  }
5144
5158
  u();
5145
5159
  const T = t.isOdd(E);
5146
- return (O & 1) === 1 !== T && (E = t.neg(E)), { x: b, y: E };
5147
- } else if (k === y && O === 4) {
5160
+ return (C & 1) === 1 !== T && (E = t.neg(E)), { x: b, y: E };
5161
+ } else if (k === y && C === 4) {
5148
5162
  const b = t.BYTES, v = t.fromBytes(B.subarray(0, b)), E = t.fromBytes(B.subarray(b, b * 2));
5149
5163
  if (!S(v, E))
5150
5164
  throw new Error("bad point: is not on curve");
@@ -5163,8 +5177,8 @@ function Un(s, e = {}) {
5163
5177
  }
5164
5178
  if (!S(i.Gx, i.Gy))
5165
5179
  throw new Error("bad curve params: generator point");
5166
- const I = t.mul(t.pow(i.a, ze), Fn), C = t.mul(t.sqr(i.b), BigInt(27));
5167
- if (t.is0(t.add(I, C)))
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)))
5168
5182
  throw new Error("bad curve params: a or b");
5169
5183
  function R(F, m, y = !1) {
5170
5184
  if (!t.isValid(m) || y && t.is0(m))
@@ -5181,12 +5195,12 @@ function Un(s, e = {}) {
5181
5195
  return Bn(F, c.basises, n.ORDER);
5182
5196
  }
5183
5197
  const q = Xt((F, m) => {
5184
- const { X: y, Y: k, Z: O } = F;
5185
- if (t.eql(O, t.ONE))
5198
+ const { X: y, Y: k, Z: C } = F;
5199
+ if (t.eql(C, t.ONE))
5186
5200
  return { x: y, y: k };
5187
5201
  const B = F.is0();
5188
- m == null && (m = B ? t.ONE : t.inv(O));
5189
- const b = t.mul(y, m), v = t.mul(k, m), E = t.mul(O, m);
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);
5190
5204
  if (B)
5191
5205
  return { x: t.ZERO, y: t.ZERO };
5192
5206
  if (!t.eql(E, t.ONE))
@@ -5207,8 +5221,8 @@ function Un(s, e = {}) {
5207
5221
  throw new Error("bad point: not in prime-order subgroup");
5208
5222
  return !0;
5209
5223
  });
5210
- function G(F, m, y, k, O) {
5211
- return y = new X(t.mul(y.X, F), y.Y, y.Z), m = Je(k, m), y = Je(O, y), m.add(y);
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);
5212
5226
  }
5213
5227
  const D = class D {
5214
5228
  /** Does NOT validate if the point is valid. Use `.assertValidity()`. */
@@ -5266,7 +5280,7 @@ function Un(s, e = {}) {
5266
5280
  /** Compare one point to another. */
5267
5281
  equals(m) {
5268
5282
  L(m);
5269
- 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));
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));
5270
5284
  return E && T;
5271
5285
  }
5272
5286
  /** Flips point to one corresponding to (x, -y) in Affine coordinates. */
@@ -5278,9 +5292,9 @@ function Un(s, e = {}) {
5278
5292
  // https://eprint.iacr.org/2015/1060, algorithm 3
5279
5293
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
5280
5294
  double() {
5281
- const { a: m, b: y } = i, k = t.mul(y, ze), { X: O, Y: B, Z: b } = this;
5282
- 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);
5283
- 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);
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);
5284
5298
  }
5285
5299
  // Renes-Costello-Batina exception-free addition formula.
5286
5300
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -5288,13 +5302,13 @@ function Un(s, e = {}) {
5288
5302
  // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
5289
5303
  add(m) {
5290
5304
  L(m);
5291
- const { X: y, Y: k, Z: O } = this, { X: B, Y: b, Z: v } = m;
5305
+ const { X: y, Y: k, Z: C } = this, { X: B, Y: b, Z: v } = m;
5292
5306
  let E = t.ZERO, T = t.ZERO, N = t.ZERO;
5293
5307
  const W = i.a, U = t.mul(i.b, ze);
5294
- 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);
5295
- ne = t.mul(ne, z), z = t.add($, K), ne = t.sub(ne, z), z = t.add(y, O);
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);
5296
5310
  let ee = t.add(B, v);
5297
- 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);
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);
5298
5312
  }
5299
5313
  subtract(m) {
5300
5314
  return this.add(m.negate());
@@ -5315,16 +5329,16 @@ function Un(s, e = {}) {
5315
5329
  const { endo: y } = e;
5316
5330
  if (!n.isValidNot0(m))
5317
5331
  throw new Error("invalid scalar: out of range");
5318
- let k, O;
5332
+ let k, C;
5319
5333
  const B = (b) => H.cached(this, b, (v) => Qt(D, v));
5320
5334
  if (y) {
5321
5335
  const { k1neg: b, k1: v, k2neg: E, k2: T } = M(m), { p: N, f: W } = B(v), { p: U, f: $ } = B(T);
5322
- O = W.add($), k = G(y.beta, N, U, b, E);
5336
+ C = W.add($), k = G(y.beta, N, U, b, E);
5323
5337
  } else {
5324
5338
  const { p: b, f: v } = B(m);
5325
- k = b, O = v;
5339
+ k = b, C = v;
5326
5340
  }
5327
- return Qt(D, [k, O])[0];
5341
+ return Qt(D, [k, C])[0];
5328
5342
  }
5329
5343
  /**
5330
5344
  * Non-constant-time multiplication. Uses double-and-add algorithm.
@@ -5342,8 +5356,8 @@ function Un(s, e = {}) {
5342
5356
  if (H.hasCache(this))
5343
5357
  return this.multiply(m);
5344
5358
  if (y) {
5345
- const { k1neg: O, k1: B, k2neg: b, k2: v } = M(m), { p1: E, p2: T } = Ln(D, k, B, v);
5346
- return G(y.beta, E, T, O, b);
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);
5347
5361
  } else
5348
5362
  return H.unsafe(k, m);
5349
5363
  }
@@ -5421,7 +5435,7 @@ function Hn(s, e = {}) {
5421
5435
  }
5422
5436
  }
5423
5437
  function a(_ = t(n.seed)) {
5424
- return On(V(_, n.seed, "seed"), r.ORDER);
5438
+ return Cn(V(_, n.seed, "seed"), r.ORDER);
5425
5439
  }
5426
5440
  function c(_, x = !0) {
5427
5441
  return s.BASE.multiply(r.fromBytes(_)).toBytes(x);
@@ -5471,37 +5485,37 @@ function Wn(s, e, r = {}) {
5471
5485
  throw new Error(`invalid signature ${m}: out of range 1..Point.Fn.ORDER`);
5472
5486
  return y;
5473
5487
  }
5474
- function C() {
5488
+ function O() {
5475
5489
  if (w)
5476
5490
  throw new Error('"recovered" sig type is not supported for cofactor >2 curves');
5477
5491
  }
5478
5492
  function R(m, y) {
5479
5493
  mt(y);
5480
- const k = _.signature, O = y === "compact" ? k : y === "recovered" ? k + 1 : void 0;
5481
- return V(m, O);
5494
+ const k = _.signature, C = y === "compact" ? k : y === "recovered" ? k + 1 : void 0;
5495
+ return V(m, C);
5482
5496
  }
5483
5497
  class L {
5484
- constructor(y, k, O) {
5498
+ constructor(y, k, C) {
5485
5499
  P(this, "r");
5486
5500
  P(this, "s");
5487
5501
  P(this, "recovery");
5488
- if (this.r = I("r", y), this.s = I("s", k), O != null) {
5489
- if (C(), ![0, 1, 2, 3].includes(O))
5502
+ if (this.r = I("r", y), this.s = I("s", k), C != null) {
5503
+ if (O(), ![0, 1, 2, 3].includes(C))
5490
5504
  throw new Error("invalid recovery id");
5491
- this.recovery = O;
5505
+ this.recovery = C;
5492
5506
  }
5493
5507
  Object.freeze(this);
5494
5508
  }
5495
5509
  static fromBytes(y, k = x.format) {
5496
5510
  R(y, k);
5497
- let O;
5511
+ let C;
5498
5512
  if (k === "der") {
5499
5513
  const { r: E, s: T } = ve.toSig(V(y));
5500
5514
  return new L(E, T);
5501
5515
  }
5502
- k === "recovered" && (O = y[0], k = "compact", y = y.subarray(1));
5516
+ k === "recovered" && (C = y[0], k = "compact", y = y.subarray(1));
5503
5517
  const B = _.signature / 2, b = y.subarray(0, B), v = y.subarray(B, B * 2);
5504
- return new L(o.fromBytes(b), o.fromBytes(v), O);
5518
+ return new L(o.fromBytes(b), o.fromBytes(v), C);
5505
5519
  }
5506
5520
  static fromHex(y, k) {
5507
5521
  return this.fromBytes(Ye(y), k);
@@ -5516,10 +5530,10 @@ function Wn(s, e, r = {}) {
5516
5530
  return new L(this.r, this.s, y);
5517
5531
  }
5518
5532
  recoverPublicKey(y) {
5519
- const { r: k, s: O } = this, B = this.assertRecovery(), b = B === 2 || B === 3 ? k + a : k;
5533
+ const { r: k, s: C } = this, B = this.assertRecovery(), b = B === 2 || B === 3 ? k + a : k;
5520
5534
  if (!i.isValid(b))
5521
5535
  throw new Error("invalid recovery id: sig.r+curve.n != R.x");
5522
- 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));
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));
5523
5537
  if ($.is0())
5524
5538
  throw new Error("invalid recovery: point at infinify");
5525
5539
  return $.assertValidity(), $;
@@ -5531,8 +5545,8 @@ function Wn(s, e, r = {}) {
5531
5545
  toBytes(y = x.format) {
5532
5546
  if (mt(y), y === "der")
5533
5547
  return Ye(ve.hexFromSig(this));
5534
- const { r: k, s: O } = this, B = o.toBytes(k), b = o.toBytes(O);
5535
- return y === "recovered" ? (C(), Se(Uint8Array.of(this.assertRecovery()), B, b)) : Se(B, b);
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);
5536
5550
  }
5537
5551
  toHex(y) {
5538
5552
  return We(this.toBytes(y));
@@ -5541,8 +5555,8 @@ function Wn(s, e, r = {}) {
5541
5555
  const M = r.bits2int || function(y) {
5542
5556
  if (y.length > 8192)
5543
5557
  throw new Error("input is too large");
5544
- const k = tt(y), O = y.length * 8 - c;
5545
- return O > 0 ? k >> BigInt(O) : k;
5558
+ const k = tt(y), C = y.length * 8 - c;
5559
+ return C > 0 ? k >> BigInt(C) : k;
5546
5560
  }, q = r.bits2int_modN || function(y) {
5547
5561
  return o.create(M(y));
5548
5562
  }, J = kt(c);
@@ -5553,7 +5567,7 @@ function Wn(s, e, r = {}) {
5553
5567
  return V(m, void 0, "message"), y ? V(e(m), void 0, "prehashed message") : m;
5554
5568
  }
5555
5569
  function Q(m, y, k) {
5556
- const { lowS: O, prehash: B, extraEntropy: b } = ut(k, x);
5570
+ const { lowS: C, prehash: B, extraEntropy: b } = ut(k, x);
5557
5571
  m = X(m, B);
5558
5572
  const v = q(m), E = o.fromBytes(y);
5559
5573
  if (!o.isValidNot0(E))
@@ -5575,16 +5589,16 @@ function Wn(s, e, r = {}) {
5575
5589
  if (ee === ge)
5576
5590
  return;
5577
5591
  let Lt = (ne.x === z ? 0 : 2) | Number(ne.y & Le), Dt = ee;
5578
- return O && S(ee) && (Dt = o.neg(ee), Lt ^= 1), new L(z, Dt, w ? void 0 : Lt);
5592
+ return C && S(ee) && (Dt = o.neg(ee), Lt ^= 1), new L(z, Dt, w ? void 0 : Lt);
5579
5593
  }
5580
5594
  return { seed: N, k2sig: U };
5581
5595
  }
5582
5596
  function H(m, y, k = {}) {
5583
- const { seed: O, k2sig: B } = Q(m, y, k);
5584
- return bn(e.outputLen, o.BYTES, n)(O, B).toBytes(k.format);
5597
+ const { seed: C, k2sig: B } = Q(m, y, k);
5598
+ return bn(e.outputLen, o.BYTES, n)(C, B).toBytes(k.format);
5585
5599
  }
5586
- function D(m, y, k, O = {}) {
5587
- const { lowS: B, prehash: b, format: v } = ut(O, x);
5600
+ function D(m, y, k, C = {}) {
5601
+ const { lowS: B, prehash: b, format: v } = ut(C, x);
5588
5602
  if (k = V(k, void 0, "publicKey"), y = X(y, b), !At(m)) {
5589
5603
  const E = m instanceof L ? ", use sig.toBytes()" : "";
5590
5604
  throw new Error("verify expects Uint8Array signature" + E);
@@ -5601,8 +5615,8 @@ function Wn(s, e, r = {}) {
5601
5615
  }
5602
5616
  }
5603
5617
  function F(m, y, k = {}) {
5604
- const { prehash: O } = ut(k, x);
5605
- return y = X(y, O), L.fromBytes(m, "recovered").recoverPublicKey(y).toBytes();
5618
+ const { prehash: C } = ut(k, x);
5619
+ return y = X(y, C), L.fromBytes(m, "recovered").recoverPublicKey(y).toBytes();
5606
5620
  }
5607
5621
  return Object.freeze({
5608
5622
  keygen: l,
@@ -5619,7 +5633,7 @@ function Wn(s, e, r = {}) {
5619
5633
  });
5620
5634
  }
5621
5635
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
5622
- const Ct = {
5636
+ const Ot = {
5623
5637
  p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
5624
5638
  n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
5625
5639
  h: BigInt(1),
@@ -5635,12 +5649,12 @@ const Ct = {
5635
5649
  ]
5636
5650
  }, nr = /* @__PURE__ */ BigInt(2);
5637
5651
  function qn(s) {
5638
- 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);
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);
5639
5653
  if (!yt.eql(yt.sqr(q), s))
5640
5654
  throw new Error("Cannot find square root");
5641
5655
  return q;
5642
5656
  }
5643
- const yt = rt(Ct.p, { sqrt: qn }), Kn = /* @__PURE__ */ Un(Ct, {
5657
+ const yt = rt(Ot.p, { sqrt: qn }), Kn = /* @__PURE__ */ Un(Ot, {
5644
5658
  Fp: yt,
5645
5659
  endo: Gn
5646
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 = [];
@@ -5677,7 +5691,7 @@ function ei(s, e = 24) {
5677
5691
  }
5678
5692
  $e(r);
5679
5693
  }
5680
- class Ot {
5694
+ class Ct {
5681
5695
  // NOTE: we accept arguments in bytes instead of bits here.
5682
5696
  constructor(e, r, t, n = !1, i = 24) {
5683
5697
  P(this, "state");
@@ -5750,10 +5764,10 @@ class Ot {
5750
5764
  }
5751
5765
  _cloneInto(e) {
5752
5766
  const { blockLen: r, suffix: t, outputLen: n, rounds: i, enableXOF: o } = this;
5753
- 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;
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;
5754
5768
  }
5755
5769
  }
5756
- const ti = (s, e, r, t = {}) => yr(() => new Ot(e, s, r), t), ar = /* @__PURE__ */ ti(1, 136, 32), ri = 60;
5770
+ const ti = (s, e, r, t = {}) => yr(() => new Ct(e, s, r), t), ar = /* @__PURE__ */ ti(1, 136, 32), ri = 60;
5757
5771
  class si {
5758
5772
  constructor() {
5759
5773
  this.jwks = null;
@@ -5973,7 +5987,7 @@ class Ae {
5973
5987
  d.warn("[CROSSx] OAuth 타임아웃 (5분) — postMessage를 수신하지 못했습니다"), L(), t(new Error("Authentication timeout"));
5974
5988
  }, 5 * 60 * 1e3), x = 10, w = 30;
5975
5989
  let S = 0, I = null;
5976
- const C = () => {
5990
+ const O = () => {
5977
5991
  clearInterval(R), d.warn("[CROSSx] COOP 감지 — OAuth 서버 응답을 " + w + "초간 대기합니다"), I = setTimeout(() => {
5978
5992
  L(), t(new Error(
5979
5993
  "OAuth 서버로부터 응답을 받지 못했습니다. 브라우저 보안 정책(COOP)으로 인해 팝업 통신이 차단되었을 수 있습니다. 다시 시도해 주세요."
@@ -5982,9 +5996,9 @@ class Ae {
5982
5996
  }, R = setInterval(() => {
5983
5997
  S++;
5984
5998
  try {
5985
- g.closed && (S <= x ? C() : (L(), t(new Error("로그인이 취소되었습니다"))));
5999
+ g.closed && (S <= x ? O() : (L(), t(new Error("로그인이 취소되었습니다"))));
5986
6000
  } catch {
5987
- C();
6001
+ O();
5988
6002
  }
5989
6003
  }, 1e3), L = () => {
5990
6004
  clearTimeout(_), clearInterval(R), I && clearTimeout(I), window.removeEventListener("message", M);
@@ -6023,8 +6037,8 @@ class Ae {
6023
6037
  return;
6024
6038
  }
6025
6039
  const m = { token: D, email: F }, y = (k) => {
6026
- Ae.verifyIdTokenNonce(k, l).then(() => r(m)).catch((O) => {
6027
- d.error("[CROSSx] nonce 검증 실패:", O), t(O instanceof Error ? O : new Error("nonce verification failed"));
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"));
6028
6042
  });
6029
6043
  };
6030
6044
  H ? H.split(".").length === 3 ? y(H) : Q ? y(Q) : (d.warn(
@@ -6270,9 +6284,9 @@ class Ie {
6270
6284
  h.USER_NOT_FOUND,
6271
6285
  Ie.getGatewayErrorMessage(_.code, x)
6272
6286
  );
6273
- const S = w === h.AUTH_NOT_AUTHENTICATED ? h.SESSION_EXPIRED : w, I = S === h.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : Ie.getGatewayErrorMessage(_.code, x), C = _.data;
6287
+ const S = w === h.AUTH_NOT_AUTHENTICATED ? h.SESSION_EXPIRED : w, I = S === h.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : Ie.getGatewayErrorMessage(_.code, x), O = _.data;
6274
6288
  let R;
6275
- 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);
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);
6276
6290
  }
6277
6291
  return d.log("[CROSSx] Wallet Gateway API 성공:", { code: _.code, url: o, method: e }), _.data ?? _;
6278
6292
  }
@@ -8529,6 +8543,10 @@ button.__crossx-connect-other-block:active {
8529
8543
  .__crossx-pin6-numpad { display: flex !important; }
8530
8544
  .__crossx-card--pin6 .__crossx-pin6-box { display: none !important; }
8531
8545
  .__crossx-card--pin6 .__crossx-pin6-dots { display: flex !important; }
8546
+ /* PIN 키보드 모드: 'native' — OS 기본 숫자 키보드 사용 (numpad 숨기고 input box 노출) */
8547
+ .__crossx-card--pin6.--native-keypad .__crossx-pin6-numpad { display: none !important; }
8548
+ .__crossx-card--pin6.--native-keypad .__crossx-pin6-box { display: inline-block !important; }
8549
+ .__crossx-card--pin6.--native-keypad .__crossx-pin6-dots { display: none !important; }
8532
8550
  .__crossx-home-indicator { display: flex; }
8533
8551
  }
8534
8552
  @keyframes __crossx-slide-up-mobile {
@@ -9155,7 +9173,7 @@ function _i(s) {
9155
9173
  }, { passive: !0 });
9156
9174
  }
9157
9175
  const fi = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
9158
- function Ce() {
9176
+ function Oe() {
9159
9177
  if (fi()) {
9160
9178
  const e = window.scrollY;
9161
9179
  return document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.left = "0", document.body.style.right = "0", () => {
@@ -9433,7 +9451,7 @@ function Ri(s) {
9433
9451
  function Ni(s) {
9434
9452
  return `https://www.crossscan.io/address/${s}?tab=txs`;
9435
9453
  }
9436
- function Ci(s, e) {
9454
+ function Oi(s, e) {
9437
9455
  return `https://explorer.crosstoken.io/${Ri(s)}/tx/${e}`;
9438
9456
  }
9439
9457
  function Jr(s, e) {
@@ -9443,9 +9461,9 @@ function Ze(s) {
9443
9461
  return Jr(de(s), Ni(s));
9444
9462
  }
9445
9463
  function Zr(s, e) {
9446
- return Jr(de(e), Ci(s, e));
9464
+ return Jr(de(e), Oi(s, e));
9447
9465
  }
9448
- function Oi(s, e, r) {
9466
+ function Ci(s, e, r) {
9449
9467
  const t = j(
9450
9468
  (r == null ? void 0 : r.label_from) ?? "From",
9451
9469
  `${Ze(s.from)}
@@ -9525,10 +9543,10 @@ function Li(s, e, r, t) {
9525
9543
  <button class="__crossx-approve-btn" id="__crossx-done-btn">${A((t == null ? void 0 : t.tx_complete_done_button) ?? (n ? "All Done" : "Done"))}</button>
9526
9544
  `, c.querySelectorAll(".__crossx-copy-btn").forEach((w) => {
9527
9545
  w.addEventListener("click", (S) => {
9528
- var C;
9546
+ var O;
9529
9547
  S.stopPropagation();
9530
9548
  const I = w.dataset.copy;
9531
- I && ((C = navigator.clipboard) == null || C.writeText(I).catch(() => {
9549
+ I && ((O = navigator.clipboard) == null || O.writeText(I).catch(() => {
9532
9550
  }));
9533
9551
  });
9534
9552
  });
@@ -9967,7 +9985,7 @@ function to(s) {
9967
9985
  return r > 0 ? `${r}h ${String(t).padStart(2, "0")}m` : `${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
9968
9986
  }
9969
9987
  function _t(s, e, r, t, n, i, o) {
9970
- var O, B;
9988
+ var C, B;
9971
9989
  let a = !!(i && i > Date.now()), c = !1;
9972
9990
  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 = () => {
9973
9991
  var E;
@@ -9979,7 +9997,7 @@ function _t(s, e, r, t, n, i, o) {
9979
9997
  const T = b.findIndex((W) => !W.value);
9980
9998
  (E = v[T === -1 ? 5 : T]) == null || E.classList.add("--active");
9981
9999
  }
9982
- }, C = () => {
10000
+ }, O = () => {
9983
10001
  s.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((v) => v.classList.toggle("--disabled", a)), S().forEach((v) => v.classList.toggle("--locked", a)), I();
9984
10002
  }, R = (b) => {
9985
10003
  a = b, l().forEach((v) => {
@@ -10026,7 +10044,7 @@ function _t(s, e, r, t, n, i, o) {
10026
10044
  var W;
10027
10045
  R(!0), l().forEach((U) => {
10028
10046
  U.value = "";
10029
- }), C();
10047
+ }), O();
10030
10048
  const v = p();
10031
10049
  if (v && (v.textContent = "Too many failed attempts. Please wait."), !g()) {
10032
10050
  const U = document.createElement("p");
@@ -10037,7 +10055,7 @@ function _t(s, e, r, t, n, i, o) {
10037
10055
  const E = () => {
10038
10056
  var K;
10039
10057
  const U = b - Date.now(), $ = _();
10040
- U <= 0 ? (clearInterval(T), R(!1), (K = g()) == null || K.remove(), v && (v.textContent = ""), C(), setTimeout(() => {
10058
+ U <= 0 ? (clearInterval(T), R(!1), (K = g()) == null || K.remove(), v && (v.textContent = ""), O(), setTimeout(() => {
10041
10059
  var Y;
10042
10060
  return (Y = l()[0]) == null ? void 0 : Y.focus();
10043
10061
  }, 50)) : $ && ($.textContent = ` ${to(U)}`);
@@ -10078,7 +10096,7 @@ function _t(s, e, r, t, n, i, o) {
10078
10096
  const b = l(), v = b.find((E) => !E.value) ?? b[b.length - 1];
10079
10097
  v == null || v.focus();
10080
10098
  };
10081
- (O = u()) == null || O.addEventListener("click", (b) => {
10099
+ (C = u()) == null || C.addEventListener("click", (b) => {
10082
10100
  b.target.classList.contains("__crossx-pin6-box") || y();
10083
10101
  }), (B = x()) == null || B.addEventListener("click", (b) => {
10084
10102
  const v = b.target;
@@ -10138,7 +10156,7 @@ function _t(s, e, r, t, n, i, o) {
10138
10156
  v();
10139
10157
  const W = N.getBoundingClientRect();
10140
10158
  T.clientX >= W.left && T.clientX <= W.right && T.clientY >= W.top && T.clientY <= W.bottom && !a && !c && E(N);
10141
- }), k.addEventListener("pointercancel", v), k.addEventListener("pointerleave", v, !0), I(), i && i > Date.now() && C();
10159
+ }), k.addEventListener("pointercancel", v), k.addEventListener("pointerleave", v, !0), I(), i && i > Date.now() && O();
10142
10160
  }
10143
10161
  }
10144
10162
  const ro = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -10186,8 +10204,25 @@ function io(s, e, r) {
10186
10204
  }), (i = t[0]) == null || i.focus();
10187
10205
  }
10188
10206
  class oo {
10189
- constructor(e = "light", r, t = Et) {
10190
- this.theme = e, this.overrides = r, this.tokens = dr(e, r), this.displayDecimals = t;
10207
+ constructor(e = "light", r, t = Et, n) {
10208
+ this.theme = e, this.overrides = r, this.tokens = dr(e, r), this.displayDecimals = t, this.pinKeyboard = n;
10209
+ }
10210
+ setPinKeyboard(e) {
10211
+ this.pinKeyboard = e;
10212
+ }
10213
+ resolvePinKeyboardMode() {
10214
+ const e = this.pinKeyboard;
10215
+ if (typeof e == "function")
10216
+ try {
10217
+ return e() === "native" ? "native" : "virtual";
10218
+ } catch {
10219
+ return "virtual";
10220
+ }
10221
+ return e === "native" ? "native" : "virtual";
10222
+ }
10223
+ /** 카드 element에 PIN 키보드 모드 클래스를 적용한다(`.--native-keypad`). */
10224
+ applyPinKeyboardMode(e) {
10225
+ e && e.classList.toggle("--native-keypad", this.resolvePinKeyboardMode() === "native");
10191
10226
  }
10192
10227
  setTheme(e, r) {
10193
10228
  this.theme = e, r !== void 0 && (this.overrides = r), this.tokens = dr(e, this.overrides);
@@ -10211,9 +10246,9 @@ class oo {
10211
10246
  */
10212
10247
  showWalletSelector(e, r, t) {
10213
10248
  return new Promise((n, i) => {
10214
- var C;
10249
+ var O;
10215
10250
  ae();
10216
- const o = [...e], a = Wi(o, this.tokens, t, this.messages), c = Ce();
10251
+ const o = [...e], a = Wi(o, this.tokens, t, this.messages), c = Oe();
10217
10252
  ce(a);
10218
10253
  let l = !1;
10219
10254
  const u = () => {
@@ -10253,7 +10288,7 @@ class oo {
10253
10288
  const L = R instanceof f && R.code === h.ADDRESS_LIMIT_EXCEEDED, M = this.resolveAddWalletErrorMessage(R);
10254
10289
  w && (w.textContent = M, w.hidden = !1), L ? (S.disabled = !0, S.setAttribute("aria-disabled", "true")) : S.disabled = !1, p = R;
10255
10290
  }
10256
- }), (C = a.querySelector("#__crossx-close-btn")) == null || C.addEventListener("click", _), a.addEventListener("click", (R) => {
10291
+ }), (O = a.querySelector("#__crossx-close-btn")) == null || O.addEventListener("click", _), a.addEventListener("click", (R) => {
10257
10292
  R.target === a && _();
10258
10293
  });
10259
10294
  const I = (R) => {
@@ -10290,7 +10325,7 @@ class oo {
10290
10325
  return new Promise((n) => {
10291
10326
  var g, _, x, w;
10292
10327
  ae();
10293
- const i = zi(this.tokens, r, this.messages), o = Ce();
10328
+ const i = zi(this.tokens, r, this.messages), o = Oe();
10294
10329
  ce(i);
10295
10330
  const a = () => {
10296
10331
  i.remove(), o();
@@ -10302,8 +10337,8 @@ class oo {
10302
10337
  a(), n(null);
10303
10338
  };
10304
10339
  (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) => {
10305
- const C = S.currentTarget.dataset.walletId ?? "";
10306
- C && l(C);
10340
+ const O = S.currentTarget.dataset.walletId ?? "";
10341
+ O && l(O);
10307
10342
  }), (w = i.querySelector("#__crossx-close-btn")) == null || w.addEventListener("click", u), i.addEventListener("click", (S) => {
10308
10343
  S.target === i && u();
10309
10344
  }), i.querySelectorAll(".__crossx-login-terms-link").forEach((S) => {
@@ -10326,7 +10361,7 @@ class oo {
10326
10361
  accountLabel: (t == null ? void 0 : t.session_alert_account_label) ?? "Account",
10327
10362
  signOutLabel: (t == null ? void 0 : t.session_alert_sign_out_button) ?? "Sign out",
10328
10363
  signInAgainLabel: (t == null ? void 0 : t.session_alert_sign_in_again_button) ?? "Sign in again"
10329
- }), i = Ce();
10364
+ }), i = Oe();
10330
10365
  ce(n);
10331
10366
  let o = !1;
10332
10367
  const a = () => {
@@ -10395,13 +10430,13 @@ class oo {
10395
10430
  }, o = {
10396
10431
  title: (t == null ? void 0 : t.pin_setup_confirm_title) ?? "Confirm PIN",
10397
10432
  headerSubtitle: (t == null ? void 0 : t.pin_setup_confirm_subtitle) ?? "Enter your PIN again to confirm."
10398
- }, a = hr(this.tokens, Qi(n)), c = Ce();
10433
+ }, a = hr(this.tokens, Qi(n)), c = Oe();
10399
10434
  ce(a);
10400
10435
  let l = !1;
10401
10436
  const u = () => {
10402
10437
  l || (l = !0, a.remove(), c());
10403
- }, p = (C) => {
10404
- u(), r(C);
10438
+ }, p = (O) => {
10439
+ u(), r(O);
10405
10440
  }, g = () => {
10406
10441
  u(), r(null);
10407
10442
  }, _ = a.querySelector(".__crossx-card"), x = {
@@ -10410,32 +10445,32 @@ class oo {
10410
10445
  repeatingDigit: (t == null ? void 0 : t.pin_validation_repeating_digit) ?? "Cannot use the same number 3+ times in a row.",
10411
10446
  sequential: (t == null ? void 0 : t.pin_validation_sequential) ?? "Sequential numbers (e.g., 123456) are not allowed.",
10412
10447
  alternatingPattern: (t == null ? void 0 : t.pin_validation_alternating_pattern) ?? "Repeating patterns (e.g., 121212) are not allowed."
10413
- }, w = (C) => {
10448
+ }, w = (O) => {
10414
10449
  var R;
10415
10450
  _.innerHTML = pt({
10416
10451
  title: o.title,
10417
10452
  headerSubtitle: o.headerSubtitle
10418
- }), (R = _.querySelector("#__crossx-close-btn")) == null || R.addEventListener("click", g), _t(_, (L) => {
10419
- L === C ? p(C) : S(i.mismatchError);
10453
+ }), this.applyPinKeyboardMode(_), (R = _.querySelector("#__crossx-close-btn")) == null || R.addEventListener("click", g), _t(_, (L) => {
10454
+ L === O ? p(O) : S(i.mismatchError);
10420
10455
  }, g);
10421
- }, S = (C) => {
10456
+ }, S = (O) => {
10422
10457
  var R;
10423
10458
  _.innerHTML = pt({
10424
10459
  title: i.title,
10425
10460
  headerSubtitle: i.headerSubtitle,
10426
10461
  subtitle: i.subtitle,
10427
- errorMessage: C
10428
- }), (R = _.querySelector("#__crossx-close-btn")) == null || R.addEventListener("click", g), _t(_, (L) => {
10462
+ errorMessage: O
10463
+ }), this.applyPinKeyboardMode(_), (R = _.querySelector("#__crossx-close-btn")) == null || R.addEventListener("click", g), _t(_, (L) => {
10429
10464
  const M = eo(L, x);
10430
10465
  M ? S(M) : w(L);
10431
10466
  }, g);
10432
10467
  };
10433
10468
  (() => {
10434
10469
  var Q;
10435
- const C = Array.from(_.querySelectorAll(".__crossx-pw-notice-item")), R = _.querySelector("#__crossx-pin-notice-next"), L = /* @__PURE__ */ new Set();
10470
+ const O = Array.from(_.querySelectorAll(".__crossx-pw-notice-item")), R = _.querySelector("#__crossx-pin-notice-next"), L = /* @__PURE__ */ new Set();
10436
10471
  R.removeAttribute("disabled");
10437
10472
  const M = R.dataset.nextLabel ?? "Next", q = R.dataset.submitLabel ?? "I Understand", J = () => {
10438
- const H = L.size === C.length;
10473
+ const H = L.size === O.length;
10439
10474
  R.classList.toggle("--disabled", !H), R.textContent = H ? q : M;
10440
10475
  }, G = (H, D) => {
10441
10476
  if (L.has(D)) return;
@@ -10446,7 +10481,7 @@ class oo {
10446
10481
  const F = H.querySelector(`#__crossx-notice-check-${D}`);
10447
10482
  L.delete(D), F.classList.remove("--checked"), H.setAttribute("aria-checked", "false"), J();
10448
10483
  };
10449
- C.forEach((H) => {
10484
+ O.forEach((H) => {
10450
10485
  const D = parseInt(H.dataset.checkIndex ?? "0", 10);
10451
10486
  H.addEventListener("click", () => {
10452
10487
  L.has(D) ? X(H, D) : G(H, D);
@@ -10454,11 +10489,11 @@ class oo {
10454
10489
  (F.key === " " || F.key === "Enter") && (F.preventDefault(), L.has(D) ? X(H, D) : G(H, D));
10455
10490
  });
10456
10491
  }), R.addEventListener("click", () => {
10457
- if (L.size === C.length) {
10492
+ if (L.size === O.length) {
10458
10493
  S(e == null ? void 0 : e.errorMessage);
10459
10494
  return;
10460
10495
  }
10461
- const H = C.find((F) => {
10496
+ const H = O.find((F) => {
10462
10497
  const m = parseInt(F.dataset.checkIndex ?? "0", 10);
10463
10498
  return !L.has(m);
10464
10499
  });
@@ -10468,8 +10503,8 @@ class oo {
10468
10503
  H.classList.remove("--highlight"), G(H, D);
10469
10504
  }, 400);
10470
10505
  }), (Q = _.querySelector("#__crossx-close-btn")) == null || Q.addEventListener("click", g);
10471
- })(), a.addEventListener("click", (C) => {
10472
- C.target === a && g();
10506
+ })(), a.addEventListener("click", (O) => {
10507
+ O.target === a && g();
10473
10508
  });
10474
10509
  });
10475
10510
  }
@@ -10493,20 +10528,20 @@ class oo {
10493
10528
  attemptCount: e == null ? void 0 : e.attemptCount,
10494
10529
  maxAttempts: e == null ? void 0 : e.maxAttempts
10495
10530
  })
10496
- ), u = Ce();
10531
+ ), u = Oe();
10497
10532
  ce(l);
10498
10533
  let p = !1;
10499
10534
  const g = () => {
10500
10535
  p || (p = !0, l.remove(), u());
10501
- }, _ = (C) => {
10502
- g(), r(C);
10536
+ }, _ = (O) => {
10537
+ g(), r(O);
10503
10538
  }, x = () => {
10504
10539
  g(), r(null);
10505
- }, w = (C) => {
10506
- g(), t(C);
10540
+ }, w = (O) => {
10541
+ g(), t(O);
10507
10542
  }, S = l.querySelector(".__crossx-card");
10508
- (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) => {
10509
- C.target === l && x();
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();
10510
10545
  });
10511
10546
  });
10512
10547
  }
@@ -10519,17 +10554,17 @@ class oo {
10519
10554
  */
10520
10555
  showRecoveryPinInputPrompt(e) {
10521
10556
  return new Promise((r) => {
10522
- var a;
10557
+ var c;
10523
10558
  ae();
10524
10559
  const t = Xi(this.tokens, e);
10525
10560
  ce(t);
10526
- const n = () => t.remove(), i = (c) => {
10527
- n(), r(c);
10561
+ const n = () => t.remove(), i = (l) => {
10562
+ n(), r(l);
10528
10563
  }, o = () => {
10529
10564
  n(), r(null);
10530
- };
10531
- io(t, i, o), (a = t.querySelector("#__crossx-close-btn")) == null || a.addEventListener("click", o), t.addEventListener("click", (c) => {
10532
- c.target === t && o();
10565
+ }, a = t.querySelector(".__crossx-card");
10566
+ a && this.applyPinKeyboardMode(a), io(t, i, o), (c = t.querySelector("#__crossx-close-btn")) == null || c.addEventListener("click", o), t.addEventListener("click", (l) => {
10567
+ l.target === t && o();
10533
10568
  });
10534
10569
  });
10535
10570
  }
@@ -10563,7 +10598,7 @@ class oo {
10563
10598
  return new Promise((r) => {
10564
10599
  var a, c;
10565
10600
  ae();
10566
- const t = Oi(e, this.tokens, this.messages);
10601
+ const t = Ci(e, this.tokens, this.messages);
10567
10602
  ce(t);
10568
10603
  const n = () => t.remove(), i = () => {
10569
10604
  n(), r();
@@ -10619,7 +10654,7 @@ class oo {
10619
10654
  ae();
10620
10655
  let t;
10621
10656
  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);
10622
- const n = Ce();
10657
+ const n = Oe();
10623
10658
  ce(t);
10624
10659
  const i = () => {
10625
10660
  t.remove(), n();
@@ -10883,7 +10918,12 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10883
10918
  },
10884
10919
  x
10885
10920
  );
10886
- const w = new He(n, c), S = new oo(s.theme ?? "light", s.themeTokens, s.displayDecimals), I = new ao(
10921
+ const w = new He(n, c), S = new oo(
10922
+ s.theme ?? "light",
10923
+ s.themeTokens,
10924
+ s.displayDecimals,
10925
+ s.pinKeyboard
10926
+ ), I = new ao(
10887
10927
  S,
10888
10928
  () => {
10889
10929
  var M;
@@ -10891,7 +10931,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10891
10931
  },
10892
10932
  () => typeof window < "u" ? window.location.origin : "http://localhost",
10893
10933
  x
10894
- ), C = e != null && e.wrapConfirmation ? e.wrapConfirmation(I) : I, R = new xt(
10934
+ ), O = e != null && e.wrapConfirmation ? e.wrapConfirmation(I) : I, R = new xt(
10895
10935
  t,
10896
10936
  n,
10897
10937
  o,
@@ -10900,7 +10940,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10900
10940
  l,
10901
10941
  g,
10902
10942
  u,
10903
- C,
10943
+ O,
10904
10944
  w,
10905
10945
  p
10906
10946
  );