@nexus-cross/crossx-sdk-core 1.2.1 → 1.2.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
@@ -327,7 +327,7 @@ const u = {
327
327
  function St(r = "en", e) {
328
328
  return Us[r] ?? Zt;
329
329
  }
330
- const $e = "crossx_access_token", Re = "crossx_refresh_token", Ne = "crossx_user_info";
330
+ const $e = "crossx_access_token", Ne = "crossx_refresh_token", Re = "crossx_user_info";
331
331
  class Hs {
332
332
  constructor(e, s, t, n, o, i, a) {
333
333
  this.config = e, this.storage = s, this.crypto = t, this.oauth = n, this.transport = o, this.walletProvider = i, this.tokenStore = a, this._refreshPromise = null;
@@ -392,7 +392,7 @@ class Hs {
392
392
  email: P.email,
393
393
  signInProvider: S,
394
394
  providerSub: y
395
- }, this.tokenStore.set(w), this.useCookieAuth || (await this.storage.set($e, w), E && await this.storage.set(Re, E));
395
+ }, this.tokenStore.set(w), this.useCookieAuth || (await this.storage.set($e, w), E && await this.storage.set(Ne, E));
396
396
  } else {
397
397
  const B = this.crypto.decodeJWT(x);
398
398
  s = {
@@ -404,7 +404,7 @@ class Hs {
404
404
  }
405
405
  u.log("[CROSSx] 사용자 정보 — id:", s.id);
406
406
  const O = this.useCookieAuth ? { id: s.id, signInProvider: s.signInProvider, providerSub: s.providerSub } : s;
407
- await this.storage.set(Ne, O), u.log("[CROSSx] 사용자 정보 저장 완료 (authMode:", this.useCookieAuth ? "cookie" : "token", ")");
407
+ await this.storage.set(Re, O), u.log("[CROSSx] 사용자 정보 저장 완료 (authMode:", this.useCookieAuth ? "cookie" : "token", ")");
408
408
  } catch (c) {
409
409
  return u.error("[CROSSx] SignIn 에러 (OAuth/토큰 교환 단계):", c), {
410
410
  success: !1,
@@ -499,7 +499,7 @@ class Hs {
499
499
  if (e) {
500
500
  const t = await this.crypto.verifyJWT(e);
501
501
  if (t.valid) {
502
- const n = await this.storage.get(Ne);
502
+ const n = await this.storage.get(Re);
503
503
  if (n)
504
504
  return u.log("[CROSSx] restoreSession — 메모리 토큰 유효, 세션 복원"), this.loadWallet(n, t.signatureVerified);
505
505
  }
@@ -510,7 +510,7 @@ class Hs {
510
510
  const t = await this.silentRefresh();
511
511
  t && this.tokenStore.set(t);
512
512
  } else {
513
- const t = await this.storage.get($e), n = await this.storage.get(Re);
513
+ const t = await this.storage.get($e), n = await this.storage.get(Ne);
514
514
  if (u.log(
515
515
  "[CROSSx] restoreSession — access_token:",
516
516
  t ? "있음" : "없음",
@@ -522,7 +522,7 @@ class Hs {
522
522
  const o = await this.silentRefresh(n);
523
523
  u.log("[CROSSx] restoreSession — silentRefresh 결과:", o ? "토큰 발급 성공" : "토큰 없음"), o && this.tokenStore.set(o);
524
524
  }
525
- const s = await this.storage.get(Ne);
525
+ const s = await this.storage.get(Re);
526
526
  if (u.log("[CROSSx] restoreSession — userInfo 조회:", s ? `있음 (id: ${s.id})` : "없음"), !s)
527
527
  return null;
528
528
  u.log("[CROSSx] restoreSession — silentRefresh 성공, 세션 복원 — userId:", s.id);
@@ -532,7 +532,7 @@ class Hs {
532
532
  return u.warn("[CROSSx] restoreSession — 지갑 로드 실패 (세션은 유지):", t), { success: !0, user: s, tokenSignatureVerified: !1 };
533
533
  }
534
534
  } catch (e) {
535
- return u.log("[CROSSx] restoreSession — 세션 복원 실패, 스토리지 정리:", e), this.tokenStore.clear(), this.useCookieAuth || await this.storage.remove(Re), await this.storage.remove(Ne), null;
535
+ return u.log("[CROSSx] restoreSession — 세션 복원 실패, 스토리지 정리:", e), this.tokenStore.clear(), this.useCookieAuth || await this.storage.remove(Ne), await this.storage.remove(Re), null;
536
536
  }
537
537
  }
538
538
  /**
@@ -571,7 +571,7 @@ class Hs {
571
571
  if (this.tokenStore.set(c), !t) {
572
572
  await this.storage.set($e, c);
573
573
  const l = this.extractRefreshToken(a);
574
- l && await this.storage.set(Re, l);
574
+ l && await this.storage.set(Ne, l);
575
575
  }
576
576
  return u.log("[CROSSx] silentRefresh 성공"), c;
577
577
  }
@@ -603,7 +603,7 @@ class Hs {
603
603
  u.log("[CROSSx] signInWithJWT — sub:", i.sub, "signatureVerified:", n), t = {
604
604
  id: i.sub,
605
605
  email: i.email
606
- }, this.tokenStore.set(e), this.useCookieAuth || (await this.storage.set($e, e), s && await this.storage.set(Re, s)), await this.storage.set(Ne, t), u.log("[CROSSx] signInWithJWT — 토큰 및 사용자 정보 저장 완료");
606
+ }, this.tokenStore.set(e), this.useCookieAuth || (await this.storage.set($e, e), s && await this.storage.set(Ne, s)), await this.storage.set(Re, t), u.log("[CROSSx] signInWithJWT — 토큰 및 사용자 정보 저장 완료");
607
607
  } catch (o) {
608
608
  return u.error("[CROSSx] signInWithJWT 에러:", o), {
609
609
  success: !1,
@@ -836,7 +836,7 @@ const Js = 2e3, It = 6e4, Zs = 1e3, Xs = 1e4, Qs = "0x77359400", Et = "0x3B9ACA0
836
836
  }), this._initPromise);
837
837
  }
838
838
  async _doInitialize(e) {
839
- console.log("[CROSSx SDK] v1.2.1 초기화 중..."), this.confirmation.setMessages(St(this._config.locale));
839
+ console.log("[CROSSx SDK] v1.2.3 초기화 중..."), this.confirmation.setMessages(St(this._config.locale));
840
840
  try {
841
841
  const s = Ys();
842
842
  this.internalConfig.oauthServiceUrl = s.oauthServiceUrl, this.internalConfig.authApiUrl = s.authApiUrl, this.internalConfig.walletGatewayUrl = s.walletGatewayUrl, this.adapterConfig.gatewayUrl = s.walletGatewayUrl;
@@ -1282,7 +1282,7 @@ const Js = 2e3, It = 6e4, Zs = 1e3, Xs = 1e4, Qs = "0x77359400", Et = "0x3B9ACA0
1282
1282
  chainId: e,
1283
1283
  from: n.address,
1284
1284
  message: s,
1285
- dappName: t == null ? void 0 : t.dappName,
1285
+ dappName: (t == null ? void 0 : t.dappName) ?? this._config.appName,
1286
1286
  accountName: t == null ? void 0 : t.accountName
1287
1287
  }))
1288
1288
  throw new g(p.USER_REJECTED, "사용자가 메시지 서명을 거부했습니다");
@@ -1341,7 +1341,7 @@ const Js = 2e3, It = 6e4, Zs = 1e3, Xs = 1e4, Qs = "0x77359400", Et = "0x3B9ACA0
1341
1341
  chainId: e,
1342
1342
  from: n.address,
1343
1343
  typedData: s,
1344
- dappName: t == null ? void 0 : t.dappName,
1344
+ dappName: (t == null ? void 0 : t.dappName) ?? this._config.appName,
1345
1345
  accountName: t == null ? void 0 : t.accountName
1346
1346
  }))
1347
1347
  throw new g(p.USER_REJECTED, "사용자가 타입 데이터 서명을 거부했습니다");
@@ -1416,7 +1416,7 @@ const Js = 2e3, It = 6e4, Zs = 1e3, Xs = 1e4, Qs = "0x77359400", Et = "0x3B9ACA0
1416
1416
  maxPriorityFeePerGas: n.maxPriorityFeePerGas,
1417
1417
  nativeSymbol: o.symbol,
1418
1418
  nativeDecimals: o.decimals,
1419
- dappName: t == null ? void 0 : t.dappName,
1419
+ dappName: (t == null ? void 0 : t.dappName) ?? this._config.appName,
1420
1420
  accountName: t == null ? void 0 : t.accountName
1421
1421
  }))
1422
1422
  throw new g(p.USER_REJECTED, "사용자가 트랜잭션 서명을 거부했습니다");
@@ -1471,7 +1471,7 @@ const Js = 2e3, It = 6e4, Zs = 1e3, Xs = 1e4, Qs = "0x77359400", Et = "0x3B9ACA0
1471
1471
  maxPriorityFeePerGas: n.maxPriorityFeePerGas,
1472
1472
  nativeSymbol: o.symbol,
1473
1473
  nativeDecimals: o.decimals,
1474
- dappName: t == null ? void 0 : t.dappName,
1474
+ dappName: (t == null ? void 0 : t.dappName) ?? this._config.appName,
1475
1475
  accountName: t == null ? void 0 : t.accountName
1476
1476
  }))
1477
1477
  throw new g(p.USER_REJECTED, "사용자가 트랜잭션을 거부했습니다");
@@ -1557,7 +1557,7 @@ const Js = 2e3, It = 6e4, Zs = 1e3, Xs = 1e4, Qs = "0x77359400", Et = "0x3B9ACA0
1557
1557
  let m, x;
1558
1558
  const w = this.waitForTxAndGetReceipt(a, e, { intervalMs: c, timeoutMs: l }).then((S) => {
1559
1559
  m = S;
1560
- const O = BigInt(S.gasUsed) * BigInt(S.effectiveGasPrice), B = s.value ? BigInt(s.value) : 0n, v = re.formatTxAmount(s.value, d.symbol, d.decimals), P = re.formatTxAmount("0x" + O.toString(16), d.symbol, d.decimals), N = re.formatTxAmount("0x" + (B + O).toString(16), d.symbol, d.decimals);
1560
+ const O = BigInt(S.gasUsed) * BigInt(S.effectiveGasPrice), B = s.value ? BigInt(s.value) : 0n, v = re.formatTxAmount(s.value, d.symbol, d.decimals), P = re.formatTxAmount("0x" + O.toString(16), d.symbol, d.decimals), R = re.formatTxAmount("0x" + (B + O).toString(16), d.symbol, d.decimals);
1561
1561
  return {
1562
1562
  chainId: e,
1563
1563
  txHash: a,
@@ -1565,7 +1565,7 @@ const Js = 2e3, It = 6e4, Zs = 1e3, Xs = 1e4, Qs = "0x77359400", Et = "0x3B9ACA0
1565
1565
  to: S.to ?? s.to,
1566
1566
  amount: v,
1567
1567
  fees: P,
1568
- total: N,
1568
+ total: R,
1569
1569
  nativeSymbol: d.symbol,
1570
1570
  status: S.status === "0x1" ? "success" : "reverted"
1571
1571
  };
@@ -2293,7 +2293,7 @@ class sr {
2293
2293
  }
2294
2294
  }
2295
2295
  const rr = "crossx-sdk", nr = 1, Ie = "data", Be = "keys", Pt = "aes-primary", or = 12;
2296
- class Rt {
2296
+ class Nt {
2297
2297
  constructor() {
2298
2298
  this.db = null, this.cryptoKey = null, this.initPromise = null;
2299
2299
  }
@@ -2462,7 +2462,7 @@ function lr(r) {
2462
2462
  r[e] = cr(r[e]);
2463
2463
  return r;
2464
2464
  }
2465
- const Nt = ar ? (r) => r : lr, ts = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", dr = /* @__PURE__ */ Array.from({ length: 256 }, (r, e) => e.toString(16).padStart(2, "0"));
2465
+ const Rt = ar ? (r) => r : lr, ts = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", dr = /* @__PURE__ */ Array.from({ length: 256 }, (r, e) => e.toString(16).padStart(2, "0"));
2466
2466
  function Me(r) {
2467
2467
  if (z(r), ts)
2468
2468
  return r.toHex();
@@ -2847,7 +2847,7 @@ function Lt(r) {
2847
2847
  };
2848
2848
  }
2849
2849
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2850
- const ne = /* @__PURE__ */ BigInt(0), ee = /* @__PURE__ */ BigInt(1), ve = /* @__PURE__ */ BigInt(2), cs = /* @__PURE__ */ BigInt(3), ls = /* @__PURE__ */ BigInt(4), ds = /* @__PURE__ */ BigInt(5), Rr = /* @__PURE__ */ BigInt(7), us = /* @__PURE__ */ BigInt(8), Nr = /* @__PURE__ */ BigInt(9), hs = /* @__PURE__ */ BigInt(16);
2850
+ const ne = /* @__PURE__ */ BigInt(0), ee = /* @__PURE__ */ BigInt(1), ve = /* @__PURE__ */ BigInt(2), cs = /* @__PURE__ */ BigInt(3), ls = /* @__PURE__ */ BigInt(4), ds = /* @__PURE__ */ BigInt(5), Nr = /* @__PURE__ */ BigInt(7), us = /* @__PURE__ */ BigInt(8), Rr = /* @__PURE__ */ BigInt(9), hs = /* @__PURE__ */ BigInt(16);
2851
2851
  function le(r, e) {
2852
2852
  const s = r % e;
2853
2853
  return s >= ne ? s : e + s;
@@ -2885,7 +2885,7 @@ function Cr(r, e) {
2885
2885
  return xt(r, a, e), a;
2886
2886
  }
2887
2887
  function Or(r) {
2888
- const e = Ye(r), s = fs(r), t = s(e, e.neg(e.ONE)), n = s(e, t), o = s(e, e.neg(t)), i = (r + Rr) / hs;
2888
+ const e = Ye(r), s = fs(r), t = s(e, e.neg(e.ONE)), n = s(e, t), o = s(e, e.neg(t)), i = (r + Nr) / hs;
2889
2889
  return (a, c) => {
2890
2890
  let l = a.pow(c, i), d = a.mul(l, t);
2891
2891
  const h = a.mul(l, n), m = a.mul(l, o), x = a.eql(a.sqr(d), c), w = a.eql(a.sqr(h), c);
@@ -2929,7 +2929,7 @@ function fs(r) {
2929
2929
  };
2930
2930
  }
2931
2931
  function Lr(r) {
2932
- return r % ls === cs ? ps : r % us === ds ? Cr : r % hs === Nr ? Or(r) : fs(r);
2932
+ return r % ls === cs ? ps : r % us === ds ? Cr : r % hs === Rr ? Or(r) : fs(r);
2933
2933
  }
2934
2934
  const Dr = [
2935
2935
  "create",
@@ -3460,7 +3460,7 @@ function jr(r, e = {}) {
3460
3460
  if (!t.isOdd)
3461
3461
  throw new Error("compression is not supported: Field does not have .isOdd()");
3462
3462
  }
3463
- function h(R, f, _) {
3463
+ function h(N, f, _) {
3464
3464
  const { x: b, y: A } = f.toAffine(), L = t.toBytes(b);
3465
3465
  if (Ve(_, "isCompressed"), _) {
3466
3466
  d();
@@ -3469,9 +3469,9 @@ function jr(r, e = {}) {
3469
3469
  } else
3470
3470
  return ye(Uint8Array.of(4), L, t.toBytes(A));
3471
3471
  }
3472
- function m(R) {
3473
- z(R, void 0, "Point");
3474
- const { publicKey: f, publicKeyUncompressed: _ } = l, b = R.length, A = R[0], L = R.subarray(1);
3472
+ function m(N) {
3473
+ z(N, void 0, "Point");
3474
+ const { publicKey: f, publicKeyUncompressed: _ } = l, b = N.length, A = N[0], L = N.subarray(1);
3475
3475
  if (b === f && (A === 2 || A === 3)) {
3476
3476
  const C = t.fromBytes(L);
3477
3477
  if (!t.isValid(C))
@@ -3496,12 +3496,12 @@ function jr(r, e = {}) {
3496
3496
  throw new Error(`bad point: got length ${b}, expected compressed=${f} or uncompressed=${_}`);
3497
3497
  }
3498
3498
  const x = e.toBytes || h, w = e.fromBytes || m;
3499
- function E(R) {
3500
- const f = t.sqr(R), _ = t.mul(f, R);
3501
- return t.add(t.add(_, t.mul(R, o.a)), o.b);
3499
+ function E(N) {
3500
+ const f = t.sqr(N), _ = t.mul(f, N);
3501
+ return t.add(t.add(_, t.mul(N, o.a)), o.b);
3502
3502
  }
3503
- function y(R, f) {
3504
- const _ = t.sqr(f), b = E(R);
3503
+ function y(N, f) {
3504
+ const _ = t.sqr(f), b = E(N);
3505
3505
  return t.eql(_, b);
3506
3506
  }
3507
3507
  if (!y(o.Gx, o.Gy))
@@ -3509,25 +3509,25 @@ function jr(r, e = {}) {
3509
3509
  const S = t.mul(t.pow(o.a, Fe), Kr), O = t.mul(t.sqr(o.b), BigInt(27));
3510
3510
  if (t.is0(t.add(S, O)))
3511
3511
  throw new Error("bad curve params: a or b");
3512
- function B(R, f, _ = !1) {
3512
+ function B(N, f, _ = !1) {
3513
3513
  if (!t.isValid(f) || _ && t.is0(f))
3514
- throw new Error(`bad point coordinate ${R}`);
3514
+ throw new Error(`bad point coordinate ${N}`);
3515
3515
  return f;
3516
3516
  }
3517
- function v(R) {
3518
- if (!(R instanceof W))
3517
+ function v(N) {
3518
+ if (!(N instanceof W))
3519
3519
  throw new Error("Weierstrass Point expected");
3520
3520
  }
3521
- function P(R) {
3521
+ function P(N) {
3522
3522
  if (!c || !c.basises)
3523
3523
  throw new Error("no endo");
3524
- return Vr(R, c.basises, n.ORDER);
3524
+ return Vr(N, c.basises, n.ORDER);
3525
3525
  }
3526
- const N = Lt((R, f) => {
3527
- const { X: _, Y: b, Z: A } = R;
3526
+ const R = Lt((N, f) => {
3527
+ const { X: _, Y: b, Z: A } = N;
3528
3528
  if (t.eql(A, t.ONE))
3529
3529
  return { x: _, y: b };
3530
- const L = R.is0();
3530
+ const L = N.is0();
3531
3531
  f == null && (f = L ? t.ONE : t.inv(A));
3532
3532
  const C = t.mul(_, f), M = t.mul(b, f), T = t.mul(A, f);
3533
3533
  if (L)
@@ -3535,23 +3535,23 @@ function jr(r, e = {}) {
3535
3535
  if (!t.eql(T, t.ONE))
3536
3536
  throw new Error("invZ was invalid");
3537
3537
  return { x: C, y: M };
3538
- }), G = Lt((R) => {
3539
- if (R.is0()) {
3540
- if (e.allowInfinityPoint && !t.is0(R.Y))
3538
+ }), G = Lt((N) => {
3539
+ if (N.is0()) {
3540
+ if (e.allowInfinityPoint && !t.is0(N.Y))
3541
3541
  return;
3542
3542
  throw new Error("bad point: ZERO");
3543
3543
  }
3544
- const { x: f, y: _ } = R.toAffine();
3544
+ const { x: f, y: _ } = N.toAffine();
3545
3545
  if (!t.isValid(f) || !t.isValid(_))
3546
3546
  throw new Error("bad point: x or y not field elements");
3547
3547
  if (!y(f, _))
3548
3548
  throw new Error("bad point: equation left != right");
3549
- if (!R.isTorsionFree())
3549
+ if (!N.isTorsionFree())
3550
3550
  throw new Error("bad point: not in prime-order subgroup");
3551
3551
  return !0;
3552
3552
  });
3553
- function K(R, f, _, b, A) {
3554
- return _ = new W(t.mul(_.X, R), _.Y, _.Z), f = ze(b, f), _ = ze(A, _), f.add(_);
3553
+ function K(N, f, _, b, A) {
3554
+ return _ = new W(t.mul(_.X, N), _.Y, _.Z), f = ze(b, f), _ = ze(A, _), f.add(_);
3555
3555
  }
3556
3556
  const k = class k {
3557
3557
  /** Does NOT validate if the point is valid. Use `.assertValidity()`. */
@@ -3695,7 +3695,7 @@ function jr(r, e = {}) {
3695
3695
  * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch
3696
3696
  */
3697
3697
  toAffine(f) {
3698
- return N(this, f);
3698
+ return R(this, f);
3699
3699
  }
3700
3700
  /**
3701
3701
  * Checks whether Point is free of torsion elements (is in prime subgroup).
@@ -3862,7 +3862,7 @@ function Jr(r, e, s = {}) {
3862
3862
  const { r: b, s: A } = this, L = this.assertRecovery(), C = L === 2 || L === 3 ? b + a : b;
3863
3863
  if (!o.isValid(C))
3864
3864
  throw new Error("invalid recovery id: sig.r+curve.n != R.x");
3865
- const M = o.toBytes(C), T = r.fromBytes(ye(Ss((L & 1) === 0), M)), $ = i.inv(C), F = N(z(_, void 0, "msgHash")), J = i.create(-F * $), V = i.create(A * $), H = r.BASE.multiplyUnsafe(J).add(T.multiplyUnsafe(V));
3865
+ const M = o.toBytes(C), T = r.fromBytes(ye(Ss((L & 1) === 0), M)), $ = i.inv(C), F = R(z(_, void 0, "msgHash")), J = i.create(-F * $), V = i.create(A * $), H = r.BASE.multiplyUnsafe(J).add(T.multiplyUnsafe(V));
3866
3866
  if (H.is0())
3867
3867
  throw new Error("invalid recovery: point at infinify");
3868
3868
  return H.assertValidity(), H;
@@ -3886,7 +3886,7 @@ function Jr(r, e, s = {}) {
3886
3886
  throw new Error("input is too large");
3887
3887
  const b = je(_), A = _.length * 8 - c;
3888
3888
  return A > 0 ? b >> BigInt(A) : b;
3889
- }, N = s.bits2int_modN || function(_) {
3889
+ }, R = s.bits2int_modN || function(_) {
3890
3890
  return i.create(P(_));
3891
3891
  }, G = ft(c);
3892
3892
  function K(f) {
@@ -3898,7 +3898,7 @@ function Jr(r, e, s = {}) {
3898
3898
  function q(f, _, b) {
3899
3899
  const { lowS: A, prehash: L, extraEntropy: C } = st(b, w);
3900
3900
  f = W(f, L);
3901
- const M = N(f), T = i.fromBytes(_);
3901
+ const M = R(f), T = i.fromBytes(_);
3902
3902
  if (!i.isValidNot0(T))
3903
3903
  throw new Error("invalid private key");
3904
3904
  const $ = [K(T), K(M)];
@@ -3937,13 +3937,13 @@ function Jr(r, e, s = {}) {
3937
3937
  const T = v.fromBytes(f, M), $ = r.fromBytes(b);
3938
3938
  if (L && T.hasHighS())
3939
3939
  return !1;
3940
- const { r: F, s: J } = T, V = N(_), H = i.inv(J), Z = i.create(V * H), X = i.create(F * H), oe = r.BASE.multiplyUnsafe(Z).add($.multiplyUnsafe(X));
3940
+ const { r: F, s: J } = T, V = R(_), H = i.inv(J), Z = i.create(V * H), X = i.create(F * H), oe = r.BASE.multiplyUnsafe(Z).add($.multiplyUnsafe(X));
3941
3941
  return oe.is0() ? !1 : i.create(oe.x) === F;
3942
3942
  } catch {
3943
3943
  return !1;
3944
3944
  }
3945
3945
  }
3946
- function R(f, _, b = {}) {
3946
+ function N(f, _, b = {}) {
3947
3947
  const { prehash: A } = st(b, w);
3948
3948
  return _ = W(_, A), v.fromBytes(f, "recovered").recoverPublicKey(_).toBytes();
3949
3949
  }
@@ -3956,7 +3956,7 @@ function Jr(r, e, s = {}) {
3956
3956
  Point: r,
3957
3957
  sign: D,
3958
3958
  verify: k,
3959
- recoverPublicKey: R,
3959
+ recoverPublicKey: N,
3960
3960
  Signature: v,
3961
3961
  hash: e
3962
3962
  });
@@ -3978,10 +3978,10 @@ const gt = {
3978
3978
  ]
3979
3979
  }, Gt = /* @__PURE__ */ BigInt(2);
3980
3980
  function Xr(r) {
3981
- const e = gt.p, s = BigInt(3), t = BigInt(6), n = BigInt(11), o = BigInt(22), i = BigInt(23), a = BigInt(44), c = BigInt(88), l = r * r * r % e, d = l * l * r % e, h = ae(d, s, e) * d % e, m = ae(h, s, e) * d % e, x = ae(m, Gt, e) * l % e, w = ae(x, n, e) * x % e, E = ae(w, o, e) * w % e, y = ae(E, a, e) * E % e, S = ae(y, c, e) * y % e, O = ae(S, a, e) * E % e, B = ae(O, s, e) * d % e, v = ae(B, i, e) * w % e, P = ae(v, t, e) * l % e, N = ae(P, Gt, e);
3982
- if (!lt.eql(lt.sqr(N), r))
3981
+ const e = gt.p, s = BigInt(3), t = BigInt(6), n = BigInt(11), o = BigInt(22), i = BigInt(23), a = BigInt(44), c = BigInt(88), l = r * r * r % e, d = l * l * r % e, h = ae(d, s, e) * d % e, m = ae(h, s, e) * d % e, x = ae(m, Gt, e) * l % e, w = ae(x, n, e) * x % e, E = ae(w, o, e) * w % e, y = ae(E, a, e) * E % e, S = ae(y, c, e) * y % e, O = ae(S, a, e) * E % e, B = ae(O, s, e) * d % e, v = ae(B, i, e) * w % e, P = ae(v, t, e) * l % e, R = ae(P, Gt, e);
3982
+ if (!lt.eql(lt.sqr(R), r))
3983
3983
  throw new Error("Cannot find square root");
3984
- return N;
3984
+ return R;
3985
3985
  }
3986
3986
  const lt = Ye(gt.p, { sqrt: Xr }), Qr = /* @__PURE__ */ jr(gt, {
3987
3987
  Fp: lt,
@@ -4042,7 +4042,7 @@ class mt {
4042
4042
  return this._cloneInto();
4043
4043
  }
4044
4044
  keccak() {
4045
- Nt(this.state32), ln(this.state32, this.rounds), Nt(this.state32), this.posOut = 0, this.pos = 0;
4045
+ Rt(this.state32), ln(this.state32, this.rounds), Rt(this.state32), this.posOut = 0, this.pos = 0;
4046
4046
  }
4047
4047
  update(e) {
4048
4048
  Ae(this), z(e);
@@ -4284,27 +4284,27 @@ class we {
4284
4284
  }
4285
4285
  }, 1e3), v = () => {
4286
4286
  clearTimeout(x), clearInterval(B), S && clearTimeout(S), window.removeEventListener("message", P);
4287
- }, P = (N) => {
4287
+ }, P = (R) => {
4288
4288
  var K, W, q, D, k;
4289
- if (N.origin !== e.expectedOrigin) return;
4290
- v(), u.log("[CROSSx] OAuth postMessage 수신 — status:", N.data.status);
4291
- const G = N.data.state ?? ((K = N.data.data) == null ? void 0 : K.state);
4289
+ if (R.origin !== e.expectedOrigin) return;
4290
+ v(), u.log("[CROSSx] OAuth postMessage 수신 — status:", R.data.status);
4291
+ const G = R.data.state ?? ((K = R.data.data) == null ? void 0 : K.state);
4292
4292
  if (!G || G !== c) {
4293
4293
  t(new Error("OAuth state mismatch — possible CSRF attack"));
4294
4294
  return;
4295
4295
  }
4296
- if (N.data.status === "success") {
4297
- const R = (W = N.data.data) == null ? void 0 : W.idToken, f = (q = N.data.data) == null ? void 0 : q.accessToken, _ = f ?? R;
4296
+ if (R.data.status === "success") {
4297
+ const N = (W = R.data.data) == null ? void 0 : W.idToken, f = (q = R.data.data) == null ? void 0 : q.accessToken, _ = f ?? N;
4298
4298
  if (u.log("[CROSSx] OAuth 토큰 수신:", {
4299
4299
  hasAccessToken: !!f,
4300
- hasIdToken: !!R
4300
+ hasIdToken: !!N
4301
4301
  }), !_) {
4302
- u.error("[CROSSx] 토큰을 찾을 수 없음:", N.data), t(new Error("Token not found in response"));
4302
+ u.error("[CROSSx] 토큰을 찾을 수 없음:", R.data), t(new Error("Token not found in response"));
4303
4303
  return;
4304
4304
  }
4305
- if (R) {
4305
+ if (N) {
4306
4306
  try {
4307
- const b = we.parseJwtPayload(R);
4307
+ const b = we.parseJwtPayload(N);
4308
4308
  u.log("[CROSSx] idToken JWT payload 요약:", {
4309
4309
  iss: b.iss,
4310
4310
  sub: typeof b.sub == "string" ? `${b.sub.slice(0, 6)}...` : "(absent)",
@@ -4315,13 +4315,13 @@ class we {
4315
4315
  } catch {
4316
4316
  u.warn("[CROSSx] idToken JWT payload 파싱 실패 — 토큰 형식을 확인하세요");
4317
4317
  }
4318
- we.verifyIdTokenNonce(R, l).then(() => s(_)).catch((b) => {
4318
+ we.verifyIdTokenNonce(N, l).then(() => s(_)).catch((b) => {
4319
4319
  u.error("[CROSSx] nonce 검증 실패:", b), t(b instanceof Error ? b : new Error("nonce verification failed"));
4320
4320
  });
4321
4321
  } else
4322
4322
  s(_);
4323
4323
  } else
4324
- u.error("[CROSSx] OAuth 실패:", (D = N.data.data) == null ? void 0 : D.error), t(new Error(((k = N.data.data) == null ? void 0 : k.error) || "Authentication failed"));
4324
+ u.error("[CROSSx] OAuth 실패:", (D = R.data.data) == null ? void 0 : D.error), t(new Error(((k = R.data.data) == null ? void 0 : k.error) || "Authentication failed"));
4325
4325
  };
4326
4326
  window.addEventListener("message", P);
4327
4327
  });
@@ -5565,6 +5565,19 @@ const gn = `
5565
5565
  filter: none !important;
5566
5566
  transform: none !important;
5567
5567
  }
5568
+ .__crossx-recover-icon {
5569
+ display: flex;
5570
+ align-items: center;
5571
+ justify-content: center;
5572
+ flex-shrink: 0;
5573
+ width: 40px;
5574
+ height: 40px;
5575
+ }
5576
+ .__crossx-recover-icon svg {
5577
+ width: 40px;
5578
+ height: 40px;
5579
+ display: block;
5580
+ }
5568
5581
  .__crossx-recover-label {
5569
5582
  font-size: 18px;
5570
5583
  font-weight: 700;
@@ -5823,7 +5836,7 @@ const gn = `
5823
5836
  .__crossx-approve-btn {
5824
5837
  width: 100%;
5825
5838
  padding: 16px;
5826
- border: 1px solid rgba(18,18,18,0.05);
5839
+ border: 1px solid var(--cx-border);
5827
5840
  border-radius: 12px;
5828
5841
  background: var(--cx-primary);
5829
5842
  color: var(--cx-on-primary);
@@ -5876,7 +5889,7 @@ const gn = `
5876
5889
  .__crossx-confirm-btn {
5877
5890
  flex: 1;
5878
5891
  padding: 16px;
5879
- border: 1px solid rgba(18,18,18,0.05);
5892
+ border: 1px solid var(--cx-border);
5880
5893
  border-radius: 12px;
5881
5894
  background: var(--cx-primary);
5882
5895
  color: var(--cx-on-primary);
@@ -6218,7 +6231,7 @@ const gn = `
6218
6231
  width: 100% !important;
6219
6232
  max-width: 100% !important;
6220
6233
  border-radius: 20px 20px 0 0 !important;
6221
- border: 1px solid rgba(18,18,18,0.05) !important;
6234
+ border: 1px solid var(--cx-border) !important;
6222
6235
  border-bottom: none !important;
6223
6236
  max-height: 92vh;
6224
6237
  overflow: hidden;
@@ -6254,7 +6267,7 @@ const gn = `
6254
6267
  width: 100% !important;
6255
6268
  max-width: 100% !important;
6256
6269
  border-radius: 20px 20px 0 0 !important;
6257
- border: 1px solid rgba(18,18,18,0.05) !important;
6270
+ border: 1px solid var(--cx-border) !important;
6258
6271
  border-bottom: none !important;
6259
6272
  max-height: 92vh;
6260
6273
  overflow: hidden;
@@ -6533,7 +6546,7 @@ const gn = `
6533
6546
  .__crossx-pin6-header-sub {
6534
6547
  font-size: 14px;
6535
6548
  font-weight: 400;
6536
- color: rgba(18,18,18,0.7);
6549
+ color: var(--cx-subtitle);
6537
6550
  line-height: 1.3;
6538
6551
  margin: 2px 0 0;
6539
6552
  }
@@ -6548,7 +6561,7 @@ const gn = `
6548
6561
  .__crossx-pin6-subtitle {
6549
6562
  font-size: 16px;
6550
6563
  font-weight: 500;
6551
- color: rgba(18,18,18,0.5);
6564
+ color: var(--cx-label);
6552
6565
  text-align: center;
6553
6566
  margin: 0;
6554
6567
  line-height: 1.5;
@@ -6567,11 +6580,11 @@ const gn = `
6567
6580
  height: 48px;
6568
6581
  border-radius: 12px;
6569
6582
  border: none;
6570
- background: rgba(18,18,18,0.05);
6583
+ background: var(--cx-input-bg);
6571
6584
  font-size: 24px;
6572
6585
  font-weight: 600;
6573
6586
  text-align: center;
6574
- color: var(--cx-fg, #121212);
6587
+ color: var(--cx-value);
6575
6588
  outline: none;
6576
6589
  caret-color: transparent;
6577
6590
  letter-spacing: 0;
@@ -6579,8 +6592,8 @@ const gn = `
6579
6592
  transition: background 0.12s, box-shadow 0.12s;
6580
6593
  }
6581
6594
  .__crossx-pin6-box:focus {
6582
- background: rgba(18,18,18,0.08);
6583
- box-shadow: 0 0 0 2px var(--crossx-primary, #019d92);
6595
+ background: var(--cx-input-border);
6596
+ box-shadow: 0 0 0 2px var(--cx-primary-glow);
6584
6597
  }
6585
6598
  .__crossx-pin6-box.--error {
6586
6599
  /* 에러 시 박스 자체에는 별도 스타일 없음 — 에러 텍스트로만 표시 */
@@ -6603,7 +6616,7 @@ const gn = `
6603
6616
  .__crossx-pin6-error {
6604
6617
  font-size: 14px;
6605
6618
  font-weight: 400;
6606
- color: var(--cx-error, #e70077);
6619
+ color: var(--cx-error);
6607
6620
  text-align: center;
6608
6621
  margin: 0;
6609
6622
  min-height: 20px;
@@ -6617,20 +6630,20 @@ const gn = `
6617
6630
  gap: 6px;
6618
6631
  font-size: 13px;
6619
6632
  font-weight: 500;
6620
- color: var(--crossx-error);
6633
+ color: var(--cx-error);
6621
6634
  text-align: center;
6622
6635
  margin: 0;
6623
6636
  }
6624
6637
  .__crossx-pin6-lock-msg svg {
6625
6638
  flex-shrink: 0;
6626
- color: var(--crossx-error);
6639
+ color: var(--cx-error);
6627
6640
  }
6628
6641
  /* Next 버튼 */
6629
6642
  .__crossx-pin6-next {
6630
6643
  width: 100%;
6631
6644
  padding: 16px;
6632
- background: var(--crossx-primary, #019d92);
6633
- color: white;
6645
+ background: var(--cx-primary);
6646
+ color: var(--cx-on-primary);
6634
6647
  border: none;
6635
6648
  border-radius: 12px;
6636
6649
  font-size: 18px;
@@ -6740,7 +6753,7 @@ function yn(r) {
6740
6753
  return null;
6741
6754
  }
6742
6755
  }
6743
- function Rs(r) {
6756
+ function Ns(r) {
6744
6757
  const e = yn(r);
6745
6758
  if (!e) return Y("Estimated fee", "<span>—</span>");
6746
6759
  let s = Y("Est. Tx Fee", `<span>${e.estTxFee}</span>`);
@@ -6752,14 +6765,10 @@ const fe = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="
6752
6765
  </svg>`, ie = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round">
6753
6766
  <line x1="18" y1="6" x2="6" y2="18"/>
6754
6767
  <line x1="6" y1="6" x2="18" y2="18"/>
6755
- </svg>`;
6756
- function bn(r) {
6757
- return `<svg width="28" height="28" viewBox="0 0 28 28" fill="none">
6758
- <circle cx="14" cy="14" r="14" fill="${r}"/>
6759
- <path d="M14 7.5L19.2 10.5V16.5L14 19.5L8.8 16.5V10.5L14 7.5Z" fill="white" opacity="0.9"/>
6760
- </svg>`;
6761
- }
6762
- const wt = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
6768
+ </svg>`, bn = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
6769
+ <circle cx="20" cy="20" r="20" fill="#00D5AA"/>
6770
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.3225 2.85742L23.7249 6.25982V11.8301L28.1175 7.43757L32.9292 12.2493L28.5806 16.5979H20.3225C18.4435 16.5979 16.9201 18.1212 16.9201 20.0003C16.9201 21.8794 18.4434 23.4027 20.3225 23.4027H28.5372L32.9293 27.7948L28.1176 32.6066L23.7249 28.2139V33.7407L20.3225 37.1431L16.9201 33.7407V28.2584L12.5719 32.6066L7.76022 27.7948L12.1524 23.4027H6.58209L3.17969 20.0003L6.58209 16.5979H12.1089L7.76035 12.2493L12.5721 7.43757L16.9201 11.7857V6.25982L20.3225 2.85742Z" fill="#121212"/>
6771
+ </svg>`, wt = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
6763
6772
  <rect x="2" y="5" width="16" height="12" rx="2" stroke="currentColor" stroke-width="1.5"/>
6764
6773
  <path d="M2 9h16" stroke="currentColor" stroke-width="1.5"/>
6765
6774
  <rect x="12.5" y="11.5" width="3.5" height="2.5" rx="0.75" fill="currentColor"/>
@@ -6804,8 +6813,8 @@ function Y(r, e) {
6804
6813
  </div>`;
6805
6814
  }
6806
6815
  function In(r, e) {
6807
- const s = e, t = Je(), n = r.to ? `<span class="__crossx-addr-text">${se(r.to)}</span>
6808
- <button class="__crossx-copy-btn" data-copy="${U(r.to)}" title="Copy address">${fe}</button>` : "<span>—</span>", o = Rs(r), i = r.data ?? "0x", a = document.createElement("div");
6816
+ const s = e, t = Je(r.dappName), n = r.to ? `<span class="__crossx-addr-text">${se(r.to)}</span>
6817
+ <button class="__crossx-copy-btn" data-copy="${U(r.to)}" title="Copy address">${fe}</button>` : "<span>—</span>", o = Ns(r), i = r.data ?? "0x", a = document.createElement("div");
6809
6818
  return a.id = te, a.innerHTML = `
6810
6819
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-tx" style="${ce(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
6811
6820
  <div class="__crossx-header">
@@ -6844,8 +6853,8 @@ function In(r, e) {
6844
6853
  `, a;
6845
6854
  }
6846
6855
  function En(r, e) {
6847
- const s = e, t = r.nativeSymbol ?? "ETH", n = r.nativeDecimals ?? 18, o = Je(), i = r.to ? `<span class="__crossx-addr-text">${se(r.to)}</span>
6848
- <button class="__crossx-copy-btn" data-copy="${U(r.to)}" title="Copy address">${fe}</button>` : "<span>—</span>", a = Rs(r), l = mn(r.value, t, n) ?? "—", d = document.createElement("div");
6856
+ const s = e, t = r.nativeSymbol ?? "ETH", n = r.nativeDecimals ?? 18, o = Je(r.dappName), i = r.to ? `<span class="__crossx-addr-text">${se(r.to)}</span>
6857
+ <button class="__crossx-copy-btn" data-copy="${U(r.to)}" title="Copy address">${fe}</button>` : "<span>—</span>", a = Ns(r), l = mn(r.value, t, n) ?? "—", d = document.createElement("div");
6849
6858
  return d.id = te, d.innerHTML = `
6850
6859
  <div class="__crossx-card __crossx-card--migration __crossx-card--send-tx" style="${ce(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
6851
6860
  <div class="__crossx-header">
@@ -6873,10 +6882,11 @@ function En(r, e) {
6873
6882
  </div>
6874
6883
  `, d;
6875
6884
  }
6876
- function Je() {
6877
- var r;
6885
+ function Je(r) {
6886
+ var e;
6887
+ if (r) return r;
6878
6888
  try {
6879
- return ((r = window.location) == null ? void 0 : r.hostname) || "This site";
6889
+ return ((e = window.location) == null ? void 0 : e.hostname) || "This site";
6880
6890
  } catch {
6881
6891
  return "This site";
6882
6892
  }
@@ -6945,7 +6955,7 @@ function Pn(r, e) {
6945
6955
  </div>
6946
6956
  `, s;
6947
6957
  }
6948
- function Rn(r, e, s) {
6958
+ function Nn(r, e, s) {
6949
6959
  const t = e.status !== "reverted" && e.status !== "timeout", n = e.status === "timeout", o = r.querySelector("#__crossx-ttl"), i = r.querySelector(".__crossx-header");
6950
6960
  if (o) {
6951
6961
  const w = n ? Sn : t ? "" : vn, E = n ? "Transaction timeout" : t ? "Transaction complete" : "Transaction failed";
@@ -6984,8 +6994,8 @@ function Rn(r, e, s) {
6984
6994
  });
6985
6995
  });
6986
6996
  }
6987
- function Nn(r, e) {
6988
- const s = e, t = Je(), n = U(r.message), o = document.createElement("div");
6997
+ function Rn(r, e) {
6998
+ const s = e, t = Je(r.dappName), n = U(r.message), o = document.createElement("div");
6989
6999
  return o.id = te, o.innerHTML = `
6990
7000
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-msg" style="${ce(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
6991
7001
  <div class="__crossx-header">
@@ -7017,7 +7027,7 @@ function Nn(r, e) {
7017
7027
  `, o;
7018
7028
  }
7019
7029
  function Cn(r, e) {
7020
- const s = e, t = Je();
7030
+ const s = e, t = Je(r.dappName);
7021
7031
  let n = {};
7022
7032
  if (typeof r.typedData == "string")
7023
7033
  try {
@@ -7171,8 +7181,8 @@ function Bn(r) {
7171
7181
  <p class="__crossx-mig-info-desc">It safely restores and integrates all your previous assets. Simply verify your PIN to get started.</p>
7172
7182
  </div>
7173
7183
  <button class="__crossx-recover-btn" id="__crossx-recover-btn">
7174
- <span>${bn(e.primary)}</span>
7175
- <span class="__crossx-recover-label">Recover My Wallet</span>
7184
+ <span class="__crossx-recover-icon">${bn}</span>
7185
+ <span class="__crossx-recover-label">Import from Social Backup</span>
7176
7186
  </button>
7177
7187
  <button class="__crossx-skip-btn" id="__crossx-skip-btn">Skip for Now</button>
7178
7188
  </div>
@@ -7184,7 +7194,7 @@ function Un(r, e) {
7184
7194
  return h.id = te, h.innerHTML = `
7185
7195
  <div class="__crossx-card __crossx-card--migration" style="${ce(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
7186
7196
  <div class="__crossx-header">
7187
- <p class="__crossx-title" id="__crossx-ttl">Recover My Wallet</p>
7197
+ <p class="__crossx-title" id="__crossx-ttl">Import from Social Backup</p>
7188
7198
  <button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${ie}</button>
7189
7199
  </div>
7190
7200
  <hr class="__crossx-divider">
@@ -7212,7 +7222,7 @@ function Fn(r, e, s) {
7212
7222
  return a.id = te, a.innerHTML = `
7213
7223
  <div class="__crossx-card __crossx-card--migration" style="${ce(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
7214
7224
  <div class="__crossx-header">
7215
- <p class="__crossx-title" id="__crossx-ttl">Recover My Wallet</p>
7225
+ <p class="__crossx-title" id="__crossx-ttl">Import from Social Backup</p>
7216
7226
  <button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${ie}</button>
7217
7227
  </div>
7218
7228
  <hr class="__crossx-divider">
@@ -7276,7 +7286,7 @@ function Gn(r) {
7276
7286
  }
7277
7287
  function nt(r) {
7278
7288
  const e = !!r.lockExpiresAt && r.lockExpiresAt > Date.now(), s = r.lockExpiresAt ? ` data-lock-expires="${r.lockExpiresAt}"` : "", t = r.headerSubtitle ? `<p class="__crossx-pin6-header-sub">${U(r.headerSubtitle)}</p>` : "", n = r.subtitle ? `<p class="__crossx-pin6-subtitle">${U(r.subtitle)}</p>` : "", o = r.errorMessage ? `<p class="__crossx-pin6-error" id="__crossx-pin6-error">${U(r.errorMessage)}</p>` : '<p class="__crossx-pin6-error" id="__crossx-pin6-error"></p>', i = e ? `<p class="__crossx-pin6-lock-msg" id="__crossx-pin6-lock-msg">
7279
- ${Ns}
7289
+ ${Rs}
7280
7290
  <span id="__crossx-pin6-lock-countdown"></span>
7281
7291
  </p>` : "", a = e ? " --locked" : "", c = Array.from(
7282
7292
  { length: 6 },
@@ -7331,8 +7341,8 @@ function ot(r, e, s, t, n, o) {
7331
7341
  }, S = (v) => {
7332
7342
  const P = d();
7333
7343
  P && (P.textContent = v);
7334
- const N = l();
7335
- N == null || N.classList.add("--shake"), setTimeout(() => N == null ? void 0 : N.classList.remove("--shake"), 500), c().forEach((G) => {
7344
+ const R = l();
7345
+ R == null || R.classList.add("--shake"), setTimeout(() => R == null ? void 0 : R.classList.remove("--shake"), 500), c().forEach((G) => {
7336
7346
  G.value = "";
7337
7347
  }), setTimeout(() => {
7338
7348
  var G;
@@ -7346,19 +7356,19 @@ function ot(r, e, s, t, n, o) {
7346
7356
  const P = d();
7347
7357
  if (P && (P.textContent = "Too many failed attempts. Please wait."), !h()) {
7348
7358
  const q = document.createElement("p");
7349
- q.className = "__crossx-pin6-lock-msg", q.id = "__crossx-pin6-lock-msg", q.innerHTML = `${Ns}<span id="__crossx-pin6-lock-countdown"></span>`;
7359
+ q.className = "__crossx-pin6-lock-msg", q.id = "__crossx-pin6-lock-msg", q.innerHTML = `${Rs}<span id="__crossx-pin6-lock-countdown"></span>`;
7350
7360
  const D = d();
7351
7361
  D ? D.insertAdjacentElement("afterend", q) : (W = x()) == null || W.appendChild(q);
7352
7362
  }
7353
- const N = () => {
7363
+ const R = () => {
7354
7364
  var k;
7355
7365
  const q = v - Date.now(), D = m();
7356
7366
  q <= 0 ? (clearInterval(G), E(!1), (k = h()) == null || k.remove(), P && (P.textContent = ""), setTimeout(() => {
7357
- var R;
7358
- return (R = c()[0]) == null ? void 0 : R.focus();
7367
+ var N;
7368
+ return (N = c()[0]) == null ? void 0 : N.focus();
7359
7369
  }, 50)) : D && (D.textContent = ` ${qn(q)}`);
7360
- }, G = setInterval(N, 1e3);
7361
- N();
7370
+ }, G = setInterval(R, 1e3);
7371
+ R();
7362
7372
  const K = new MutationObserver(() => {
7363
7373
  document.contains(r) || (clearInterval(G), K.disconnect());
7364
7374
  });
@@ -7391,22 +7401,22 @@ function ot(r, e, s, t, n, o) {
7391
7401
  }, 100), c().forEach((v, P) => {
7392
7402
  v.addEventListener("input", () => {
7393
7403
  var G;
7394
- const N = v.value.replace(/\D/g, "").slice(-1);
7395
- v.value = N, y(), N && P < 5 && ((G = c()[P + 1]) == null || G.focus()), w().length === 6 && setTimeout(B, 80);
7396
- }), v.addEventListener("keydown", (N) => {
7404
+ const R = v.value.replace(/\D/g, "").slice(-1);
7405
+ v.value = R, y(), R && P < 5 && ((G = c()[P + 1]) == null || G.focus()), w().length === 6 && setTimeout(B, 80);
7406
+ }), v.addEventListener("keydown", (R) => {
7397
7407
  var G, K;
7398
- if (N.key === "Backspace") {
7399
- if (N.preventDefault(), v.value)
7408
+ if (R.key === "Backspace") {
7409
+ if (R.preventDefault(), v.value)
7400
7410
  v.value = "";
7401
7411
  else if (P > 0) {
7402
7412
  const W = c()[P - 1];
7403
7413
  W.value = "", W.focus();
7404
7414
  }
7405
- } else N.key === "ArrowLeft" && P > 0 ? (N.preventDefault(), (G = c()[P - 1]) == null || G.focus()) : N.key === "ArrowRight" && P < 5 ? (N.preventDefault(), (K = c()[P + 1]) == null || K.focus()) : N.key === "Escape" && s();
7406
- }), v.addEventListener("paste", (N) => {
7415
+ } else R.key === "ArrowLeft" && P > 0 ? (R.preventDefault(), (G = c()[P - 1]) == null || G.focus()) : R.key === "ArrowRight" && P < 5 ? (R.preventDefault(), (K = c()[P + 1]) == null || K.focus()) : R.key === "Escape" && s();
7416
+ }), v.addEventListener("paste", (R) => {
7407
7417
  var W, q;
7408
- N.preventDefault();
7409
- const G = (((W = N.clipboardData) == null ? void 0 : W.getData("text")) ?? "").replace(/\D/g, "").slice(0, 6);
7418
+ R.preventDefault();
7419
+ const G = (((W = R.clipboardData) == null ? void 0 : W.getData("text")) ?? "").replace(/\D/g, "").slice(0, 6);
7410
7420
  if (!G) return;
7411
7421
  const K = c();
7412
7422
  G.split("").forEach((D, k) => {
@@ -7415,7 +7425,7 @@ function ot(r, e, s, t, n, o) {
7415
7425
  }), v.addEventListener("focus", () => v.select());
7416
7426
  });
7417
7427
  }
7418
- const Ns = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
7428
+ const Rs = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
7419
7429
  <path d="M14.5 8.5H14V6.5C14 4.015 11.985 2 9.5 2C7.015 2 5 4.015 5 6.5V8.5H4.5C3.672 8.5 3 9.172 3 10V16.5C3 17.328 3.672 18 4.5 18H14.5C15.328 18 16 17.328 16 16.5V10C16 9.172 15.328 8.5 14.5 8.5ZM10.5 13.415V15C10.5 15.276 10.276 15.5 10 15.5H9C8.724 15.5 8.5 15.276 8.5 15V13.415C8.187 13.196 8 12.847 8 12.5C8 11.672 8.672 11 9.5 11C10.328 11 11 11.672 11 12.5C11 12.847 10.813 13.196 10.5 13.415ZM12.5 8.5H6.5V6.5C6.5 4.843 7.843 3.5 9.5 3.5C11.157 3.5 12.5 4.843 12.5 6.5V8.5Z" fill="currentColor"/>
7420
7430
  </svg>`, Vn = `<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
7421
7431
  <path d="M1 4.5L4 7.5L10 1" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -7629,32 +7639,32 @@ class jn {
7629
7639
  var q;
7630
7640
  const O = Array.from(x.querySelectorAll(".__crossx-pw-notice-item")), B = x.querySelector("#__crossx-pin-notice-next"), v = /* @__PURE__ */ new Set();
7631
7641
  B.removeAttribute("disabled");
7632
- const P = B.dataset.nextLabel ?? "Next", N = B.dataset.submitLabel ?? "I Understand", G = () => {
7642
+ const P = B.dataset.nextLabel ?? "Next", R = B.dataset.submitLabel ?? "I Understand", G = () => {
7633
7643
  const D = v.size === O.length;
7634
- B.classList.toggle("--disabled", !D), B.textContent = D ? N : P;
7644
+ B.classList.toggle("--disabled", !D), B.textContent = D ? R : P;
7635
7645
  }, K = (D, k) => {
7636
7646
  if (v.has(k)) return;
7637
- const R = D.querySelector(`#__crossx-notice-check-${k}`);
7638
- v.add(k), R.classList.add("--checked"), D.setAttribute("aria-checked", "true"), G();
7647
+ const N = D.querySelector(`#__crossx-notice-check-${k}`);
7648
+ v.add(k), N.classList.add("--checked"), D.setAttribute("aria-checked", "true"), G();
7639
7649
  }, W = (D, k) => {
7640
7650
  if (!v.has(k)) return;
7641
- const R = D.querySelector(`#__crossx-notice-check-${k}`);
7642
- v.delete(k), R.classList.remove("--checked"), D.setAttribute("aria-checked", "false"), G();
7651
+ const N = D.querySelector(`#__crossx-notice-check-${k}`);
7652
+ v.delete(k), N.classList.remove("--checked"), D.setAttribute("aria-checked", "false"), G();
7643
7653
  };
7644
7654
  O.forEach((D) => {
7645
7655
  const k = parseInt(D.dataset.checkIndex ?? "0", 10);
7646
7656
  D.addEventListener("click", () => {
7647
7657
  v.has(k) ? W(D, k) : K(D, k);
7648
- }), D.addEventListener("keydown", (R) => {
7649
- (R.key === " " || R.key === "Enter") && (R.preventDefault(), v.has(k) ? W(D, k) : K(D, k));
7658
+ }), D.addEventListener("keydown", (N) => {
7659
+ (N.key === " " || N.key === "Enter") && (N.preventDefault(), v.has(k) ? W(D, k) : K(D, k));
7650
7660
  });
7651
7661
  }), B.addEventListener("click", () => {
7652
7662
  if (v.size === O.length) {
7653
7663
  y(e == null ? void 0 : e.errorMessage);
7654
7664
  return;
7655
7665
  }
7656
- const D = O.find((R) => {
7657
- const f = parseInt(R.dataset.checkIndex ?? "0", 10);
7666
+ const D = O.find((N) => {
7667
+ const f = parseInt(N.dataset.checkIndex ?? "0", 10);
7658
7668
  return !v.has(f);
7659
7669
  });
7660
7670
  if (!D) return;
@@ -7801,7 +7811,7 @@ class jn {
7801
7811
  document.addEventListener("keydown", l);
7802
7812
  };
7803
7813
  s.then((l) => {
7804
- i || (Rn(n, l, this.tokens), c());
7814
+ i || (Nn(n, l, this.tokens), c());
7805
7815
  });
7806
7816
  });
7807
7817
  }
@@ -7810,7 +7820,7 @@ class jn {
7810
7820
  var c, l, d;
7811
7821
  ue();
7812
7822
  let t;
7813
- e.type === "sign-message" ? t = Nn(e, this.tokens) : e.type === "sign-typed-data" ? t = Cn(e, this.tokens) : e.type === "sign" ? t = In(e, this.tokens) : t = En(e, this.tokens), document.body.appendChild(t);
7823
+ e.type === "sign-message" ? t = Rn(e, this.tokens) : e.type === "sign-typed-data" ? t = Cn(e, this.tokens) : e.type === "sign" ? t = In(e, this.tokens) : t = En(e, this.tokens), document.body.appendChild(t);
7814
7824
  const n = () => t.remove(), o = () => {
7815
7825
  n(), s(!0);
7816
7826
  }, i = () => {
@@ -7861,7 +7871,7 @@ function Qn(r) {
7861
7871
  }, t = {
7862
7872
  gatewayUrl: e.walletGatewayUrl,
7863
7873
  projectId: r.projectId
7864
- }, o = s.authMode !== "cookie" && Rt.isAvailable() ? new Rt() : new sr(), i = new un(), a = new fn(), c = new we(), l = new Yn(), d = new Xt();
7874
+ }, o = s.authMode !== "cookie" && Nt.isAvailable() ? new Nt() : new sr(), i = new un(), a = new fn(), c = new we(), l = new Yn(), d = new Xt();
7865
7875
  let h;
7866
7876
  r.useMockWallet ? (u.log("[CROSSx] Mock Wallet Provider 사용"), h = new _n(o, d)) : (u.log("[CROSSx] Remote Wallet Provider 사용"), h = new Le(
7867
7877
  t,