@nexus-cross/crossx-sdk-core 1.3.10 → 1.3.11

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
@@ -748,7 +748,7 @@ class zs {
748
748
  this.tokenStore.clear(), this.config.authMode !== "cookie" && (await this.storage.remove(this.STORAGE_KEY_ACCESS_TOKEN), await this.storage.remove(this.STORAGE_KEY_REFRESH_TOKEN)), await this.storage.remove(this.STORAGE_KEY_USER), await this.storage.clear();
749
749
  }
750
750
  }
751
- class js {
751
+ class Ys {
752
752
  constructor(e, s) {
753
753
  this.storage = e, this.walletProvider = s;
754
754
  }
@@ -806,7 +806,7 @@ class ss {
806
806
  return this.encryptedBytes !== null;
807
807
  }
808
808
  }
809
- class Ys {
809
+ class js {
810
810
  constructor(e, s) {
811
811
  this.chainRegistry = e, this.transport = s, this._nextId = 1;
812
812
  }
@@ -901,7 +901,7 @@ function Zs() {
901
901
  const Qs = 2e3, Rt = 6e4, er = 1e3, tr = 1e4, sr = "0x77359400", kt = "0x3B9ACA00", Pt = 130, Ot = 6, Ct = 18, Nt = 3e4, rr = 5 * 60 * 1e3, nr = 30 * 1e3, ee = class ee extends Xs {
902
902
  constructor(e, s, t, n, o, i, a, c, l, u, h) {
903
903
  var _, f;
904
- super(), this.storage = t, this.crypto = n, this.transport = o, this.oauth = i, this.walletProvider = a, this.tokenStore = c, this.initialized = !1, this._initPromise = null, this.authenticated = !1, this.userId = null, this.address = null, this.activeWalletIndex = 0, this.userEmail = null, this.loginType = null, this.providerSub = null, this.tokenSignatureVerified = !1, this._verifyPinMutex = null, this._themeMediaCleanup = null, this._isRecoveringSession = !1, this._config = Object.freeze({ ...e }), this.internalConfig = e, this.adapterConfig = s, e.logger && Et(e.logger), this.confirmation = l, this.pinStore = h ?? new ss(), this.chainRegistry = u, this.jsonRpc = new Ys(u, o), this.signInUseCase = new Vs(
904
+ super(), this.storage = t, this.crypto = n, this.transport = o, this.oauth = i, this.walletProvider = a, this.tokenStore = c, this.initialized = !1, this._initPromise = null, this.authenticated = !1, this.userId = null, this.address = null, this.activeWalletIndex = 0, this.userEmail = null, this.loginType = null, this.providerSub = null, this.tokenSignatureVerified = !1, this._verifyPinMutex = null, this._themeMediaCleanup = null, this._isRecoveringSession = !1, this._config = Object.freeze({ ...e }), this.internalConfig = e, this.adapterConfig = s, e.logger && Et(e.logger), this.confirmation = l, this.pinStore = h ?? new ss(), this.chainRegistry = u, this.jsonRpc = new js(u, o), this.signInUseCase = new Vs(
905
905
  this.internalConfig,
906
906
  t,
907
907
  n,
@@ -909,7 +909,7 @@ const Qs = 2e3, Rt = 6e4, er = 1e3, tr = 1e4, sr = "0x77359400", kt = "0x3B9ACA0
909
909
  o,
910
910
  a,
911
911
  c
912
- ), this.signOutUseCase = new zs(this.internalConfig, t, c), this.migrateWalletUseCase = new js(t, a), (_ = a.setOnUnauthorized) == null || _.call(a, () => this.forceLogout()), (f = a.setTokenRefresher) == null || f.call(
912
+ ), this.signOutUseCase = new zs(this.internalConfig, t, c), this.migrateWalletUseCase = new Ys(t, a), (_ = a.setOnUnauthorized) == null || _.call(a, () => this.forceLogout()), (f = a.setTokenRefresher) == null || f.call(
913
913
  a,
914
914
  () => this.signInUseCase.refreshAccessToken()
915
915
  ), e.autoDetectTheme && this._setupAutoDetectTheme();
@@ -938,7 +938,7 @@ const Qs = 2e3, Rt = 6e4, er = 1e3, tr = 1e4, sr = "0x77359400", kt = "0x3B9ACA0
938
938
  }
939
939
  async _doInitialize(e) {
940
940
  var s, t;
941
- d.log("[CROSSx SDK] v1.3.10 초기화 중..."), this.confirmation.setMessages(ve(this._config.locale));
941
+ d.log("[CROSSx SDK] v1.3.11 초기화 중..."), this.confirmation.setMessages(ve(this._config.locale));
942
942
  try {
943
943
  const n = Zs();
944
944
  this.internalConfig.oauthServiceUrl = n.oauthServiceUrl, this.internalConfig.authApiUrl = n.authApiUrl, this.internalConfig.walletGatewayUrl = n.walletGatewayUrl, this.adapterConfig.gatewayUrl = n.walletGatewayUrl, (t = (s = this.crypto).setJWKSEndpoint) == null || t.call(s, `${n.authApiUrl}/.well-known/jwks.json`);
@@ -953,7 +953,7 @@ const Qs = 2e3, Rt = 6e4, er = 1e3, tr = 1e4, sr = "0x77359400", kt = "0x3B9ACA0
953
953
  d.log("[CROSSx] initialize: 비밀번호 입력 취소 — 지갑 미로드 상태로 계속");
954
954
  }
955
955
  }
956
- return this.initialized = !0, d.info("[CROSSx SDK] v1.3.10 초기화 완료"), this.emit("initialized", { restored: !!(o != null && o.success) }), o ?? null;
956
+ return this.initialized = !0, d.info("[CROSSx SDK] v1.3.11 초기화 완료"), this.emit("initialized", { restored: !!(o != null && o.success) }), o ?? null;
957
957
  } catch (n) {
958
958
  throw new m(p.AUTH_NOT_INITIALIZED, "SDK 초기화에 실패했습니다", n);
959
959
  }
@@ -3099,7 +3099,7 @@ function ls(r) {
3099
3099
  throw new Error("hex string expected, got " + typeof r);
3100
3100
  return r === "" ? ft : BigInt("0x" + r);
3101
3101
  }
3102
- function je(r) {
3102
+ function Ye(r) {
3103
3103
  return ls($e(r));
3104
3104
  }
3105
3105
  function ds(r) {
@@ -3225,7 +3225,7 @@ function Lr(r, e) {
3225
3225
  return mt(r, a, e), a;
3226
3226
  }
3227
3227
  function Dr(r) {
3228
- const e = Ye(r), s = ms(r), t = s(e, e.neg(e.ONE)), n = s(e, t), o = s(e, e.neg(t)), i = (r + Cr) / xs;
3228
+ const e = je(r), s = ms(r), t = s(e, e.neg(e.ONE)), n = s(e, t), o = s(e, e.neg(t)), i = (r + Cr) / xs;
3229
3229
  return (a, c) => {
3230
3230
  let l = a.pow(c, i), u = a.mul(l, t);
3231
3231
  const h = a.mul(l, n), _ = a.mul(l, o), f = a.eql(a.sqr(u), c), w = a.eql(a.sqr(h), c);
@@ -3241,7 +3241,7 @@ function ms(r) {
3241
3241
  for (; e % Ae === ne; )
3242
3242
  e /= Ae, s++;
3243
3243
  let t = Ae;
3244
- const n = Ye(r);
3244
+ const n = je(r);
3245
3245
  for (; Ht(n, t) === 1; )
3246
3246
  if (t++ > 1e3)
3247
3247
  throw new Error("Cannot find square root: probably non-prime P");
@@ -3422,7 +3422,7 @@ class Fr {
3422
3422
  }
3423
3423
  if (e.length !== n)
3424
3424
  throw new Error("Field.fromBytes: expected " + n + " bytes, got " + e.length);
3425
- let c = o ? ds(e) : je(e);
3425
+ let c = o ? ds(e) : Ye(e);
3426
3426
  if (a && (c = le(c, i)), !s && !this.isValid(c))
3427
3427
  throw new Error("invalid field element: outside of range 0..ORDER");
3428
3428
  return c;
@@ -3437,7 +3437,7 @@ class Fr {
3437
3437
  return t ? s : e;
3438
3438
  }
3439
3439
  }
3440
- function Ye(r, e = {}) {
3440
+ function je(r, e = {}) {
3441
3441
  return new Fr(r, e);
3442
3442
  }
3443
3443
  function ys(r) {
@@ -3455,7 +3455,7 @@ function Gr(r, e, s = !1) {
3455
3455
  const t = r.length, n = ys(e), o = bs(e);
3456
3456
  if (t < 16 || t < o || t > 1024)
3457
3457
  throw new Error("expected " + o + "-1024 bytes of input, got " + t);
3458
- const i = s ? ds(r) : je(r), a = le(i, e - te) + te;
3458
+ const i = s ? ds(r) : Ye(r), a = le(i, e - te) + te;
3459
3459
  return s ? us(a, n) : _t(a, n);
3460
3460
  }
3461
3461
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -3598,7 +3598,7 @@ function qt(r, e, s) {
3598
3598
  throw new Error("Field.ORDER must match order: Fp == p, Fn == n");
3599
3599
  return Br(e), e;
3600
3600
  } else
3601
- return Ye(r, { isLE: s });
3601
+ return je(r, { isLE: s });
3602
3602
  }
3603
3603
  function Kr(r, e, s = {}, t) {
3604
3604
  if (t === void 0 && (t = r === "edwards"), !e || typeof e != "object")
@@ -3687,14 +3687,14 @@ function rt(r, e) {
3687
3687
  s[t] = r[t] === void 0 ? e[t] : r[t];
3688
3688
  return Ke(s.lowS, "lowS"), Ke(s.prehash, "prehash"), s.format !== void 0 && dt(s.format), s;
3689
3689
  }
3690
- class jr extends Error {
3690
+ class Yr extends Error {
3691
3691
  constructor(e = "") {
3692
3692
  super(e);
3693
3693
  }
3694
3694
  }
3695
3695
  const be = {
3696
3696
  // asn.1 DER encoding utils
3697
- Err: jr,
3697
+ Err: Yr,
3698
3698
  // Basic building block is TLV (Tag-Length-Value)
3699
3699
  _tlv: {
3700
3700
  encode: (r, e) => {
@@ -3763,7 +3763,7 @@ const be = {
3763
3763
  throw new e("invalid signature integer: negative");
3764
3764
  if (r[0] === 0 && !(r[1] & 128))
3765
3765
  throw new e("invalid signature integer: unnecessary leading zero");
3766
- return je(r);
3766
+ return Ye(r);
3767
3767
  }
3768
3768
  },
3769
3769
  toSig(r) {
@@ -3779,7 +3779,7 @@ const be = {
3779
3779
  const { _tlv: e, _int: s } = be, t = e.encode(2, s.encode(r.r)), n = e.encode(2, s.encode(r.s)), o = t + n;
3780
3780
  return e.encode(48, o);
3781
3781
  }
3782
- }, xe = BigInt(0), Pe = BigInt(1), As = BigInt(2), Fe = BigInt(3), Yr = BigInt(4);
3782
+ }, xe = BigInt(0), Pe = BigInt(1), As = BigInt(2), Fe = BigInt(3), jr = BigInt(4);
3783
3783
  function Xr(r, e = {}) {
3784
3784
  const s = Kr("weierstrass", r, e), { Fp: t, Fn: n } = s;
3785
3785
  let o = s.CURVE;
@@ -3820,8 +3820,8 @@ function Xr(r, e = {}) {
3820
3820
  let P;
3821
3821
  try {
3822
3822
  P = t.sqrt(L);
3823
- } catch (Y) {
3824
- const W = Y instanceof Error ? ": " + Y.message : "";
3823
+ } catch (j) {
3824
+ const W = j instanceof Error ? ": " + j.message : "";
3825
3825
  throw new Error("bad point: is not on curve, sqrt error" + W);
3826
3826
  }
3827
3827
  u();
@@ -3846,7 +3846,7 @@ function Xr(r, e = {}) {
3846
3846
  }
3847
3847
  if (!y(o.Gx, o.Gy))
3848
3848
  throw new Error("bad curve params: generator point");
3849
- const R = t.mul(t.pow(o.a, Fe), Yr), N = t.mul(t.sqr(o.b), BigInt(27));
3849
+ const R = t.mul(t.pow(o.a, Fe), jr), N = t.mul(t.sqr(o.b), BigInt(27));
3850
3850
  if (t.is0(t.add(R, N)))
3851
3851
  throw new Error("bad curve params: a or b");
3852
3852
  function F(I, x, g = !1) {
@@ -3962,8 +3962,8 @@ function Xr(r, e = {}) {
3962
3962
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
3963
3963
  double() {
3964
3964
  const { a: x, b: g } = o, v = t.mul(g, Fe), { X: A, Y: C, Z: O } = this;
3965
- let L = t.ZERO, P = t.ZERO, D = t.ZERO, U = t.mul(A, A), Y = t.mul(C, C), W = t.mul(O, O), B = t.mul(A, C);
3966
- return B = t.add(B, B), D = t.mul(A, O), D = t.add(D, D), L = t.mul(x, D), P = t.mul(v, W), P = t.add(L, P), L = t.sub(Y, P), P = t.add(Y, P), P = t.mul(L, P), L = t.mul(B, L), D = t.mul(v, D), W = t.mul(x, W), B = t.sub(U, W), B = t.mul(x, B), B = t.add(B, D), D = t.add(U, U), U = t.add(D, U), U = t.add(U, W), U = t.mul(U, B), P = t.add(P, U), W = t.mul(C, O), W = t.add(W, W), U = t.mul(W, B), L = t.sub(L, U), D = t.mul(W, Y), D = t.add(D, D), D = t.add(D, D), new S(L, P, D);
3965
+ let L = t.ZERO, P = t.ZERO, D = t.ZERO, U = t.mul(A, A), j = t.mul(C, C), W = t.mul(O, O), B = t.mul(A, C);
3966
+ return B = t.add(B, B), D = t.mul(A, O), D = t.add(D, D), L = t.mul(x, D), P = t.mul(v, W), P = t.add(L, P), L = t.sub(j, P), P = t.add(j, P), P = t.mul(L, P), L = t.mul(B, L), D = t.mul(v, D), W = t.mul(x, W), B = t.sub(U, W), B = t.mul(x, B), B = t.add(B, D), D = t.add(U, U), U = t.add(D, U), U = t.add(U, W), U = t.mul(U, B), P = t.add(P, U), W = t.mul(C, O), W = t.add(W, W), U = t.mul(W, B), L = t.sub(L, U), D = t.mul(W, j), D = t.add(D, D), D = t.add(D, D), new S(L, P, D);
3967
3967
  }
3968
3968
  // Renes-Costello-Batina exception-free addition formula.
3969
3969
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -3973,11 +3973,11 @@ function Xr(r, e = {}) {
3973
3973
  M(x);
3974
3974
  const { X: g, Y: v, Z: A } = this, { X: C, Y: O, Z: L } = x;
3975
3975
  let P = t.ZERO, D = t.ZERO, U = t.ZERO;
3976
- const Y = o.a, W = t.mul(o.b, Fe);
3976
+ const j = o.a, W = t.mul(o.b, Fe);
3977
3977
  let B = t.mul(g, C), X = t.mul(v, O), Z = t.mul(A, L), oe = t.add(g, v), K = t.add(C, O);
3978
3978
  oe = t.mul(oe, K), K = t.add(B, X), oe = t.sub(oe, K), K = t.add(g, A);
3979
3979
  let Q = t.add(C, L);
3980
- return K = t.mul(K, Q), Q = t.add(B, Z), K = t.sub(K, Q), Q = t.add(v, A), P = t.add(O, L), Q = t.mul(Q, P), P = t.add(X, Z), Q = t.sub(Q, P), U = t.mul(Y, K), P = t.mul(W, Z), U = t.add(P, U), P = t.sub(X, U), U = t.add(X, U), D = t.mul(P, U), X = t.add(B, B), X = t.add(X, B), Z = t.mul(Y, Z), K = t.mul(W, K), X = t.add(X, Z), Z = t.sub(B, Z), Z = t.mul(Y, Z), K = t.add(K, Z), B = t.mul(X, K), D = t.add(D, B), B = t.mul(Q, K), P = t.mul(oe, P), P = t.sub(P, B), B = t.mul(oe, X), U = t.mul(Q, U), U = t.add(U, B), new S(P, D, U);
3980
+ return K = t.mul(K, Q), Q = t.add(B, Z), K = t.sub(K, Q), Q = t.add(v, A), P = t.add(O, L), Q = t.mul(Q, P), P = t.add(X, Z), Q = t.sub(Q, P), U = t.mul(j, K), P = t.mul(W, Z), U = t.add(P, U), P = t.sub(X, U), U = t.add(X, U), D = t.mul(P, U), X = t.add(B, B), X = t.add(X, B), Z = t.mul(j, Z), K = t.mul(W, K), X = t.add(X, Z), Z = t.sub(B, Z), Z = t.mul(j, Z), K = t.add(K, Z), B = t.mul(X, K), D = t.add(D, B), B = t.mul(Q, K), P = t.mul(oe, P), P = t.sub(P, B), B = t.mul(oe, X), U = t.mul(Q, U), U = t.add(U, B), new S(P, D, U);
3981
3981
  }
3982
3982
  subtract(x) {
3983
3983
  return this.add(x.negate());
@@ -4001,8 +4001,8 @@ function Xr(r, e = {}) {
4001
4001
  let v, A;
4002
4002
  const C = (O) => b.cached(this, O, (L) => Ft(S, L));
4003
4003
  if (g) {
4004
- const { k1neg: O, k1: L, k2neg: P, k2: D } = V(x), { p: U, f: Y } = C(L), { p: W, f: B } = C(D);
4005
- A = Y.add(B), v = H(g.beta, U, W, O, P);
4004
+ const { k1neg: O, k1: L, k2neg: P, k2: D } = V(x), { p: U, f: j } = C(L), { p: W, f: B } = C(D);
4005
+ A = j.add(B), v = H(g.beta, U, W, O, P);
4006
4006
  } else {
4007
4007
  const { p: O, f: L } = C(x);
4008
4008
  v = O, A = L;
@@ -4202,7 +4202,7 @@ function Zr(r, e, s = {}) {
4202
4202
  const { r: v, s: A } = this, C = this.assertRecovery(), O = C === 2 || C === 3 ? v + a : v;
4203
4203
  if (!o.isValid(O))
4204
4204
  throw new Error("invalid recovery id: sig.r+curve.n != R.x");
4205
- const L = o.toBytes(O), P = r.fromBytes(Se(Ts((C & 1) === 0), L)), D = i.inv(O), U = G(q(g, void 0, "msgHash")), Y = i.create(-U * D), W = i.create(A * D), B = r.BASE.multiplyUnsafe(Y).add(P.multiplyUnsafe(W));
4205
+ const L = o.toBytes(O), P = r.fromBytes(Se(Ts((C & 1) === 0), L)), D = i.inv(O), U = G(q(g, void 0, "msgHash")), j = i.create(-U * D), W = i.create(A * D), B = r.BASE.multiplyUnsafe(j).add(P.multiplyUnsafe(W));
4206
4206
  if (B.is0())
4207
4207
  throw new Error("invalid recovery: point at infinify");
4208
4208
  return B.assertValidity(), B;
@@ -4224,7 +4224,7 @@ function Zr(r, e, s = {}) {
4224
4224
  const V = s.bits2int || function(g) {
4225
4225
  if (g.length > 8192)
4226
4226
  throw new Error("input is too large");
4227
- const v = je(g), A = g.length * 8 - c;
4227
+ const v = Ye(g), A = g.length * 8 - c;
4228
4228
  return A > 0 ? v >> BigInt(A) : v;
4229
4229
  }, G = s.bits2int_modN || function(g) {
4230
4230
  return i.create(V(g));
@@ -4246,7 +4246,7 @@ function Zr(r, e, s = {}) {
4246
4246
  const B = O === !0 ? t(f.secretKey) : O;
4247
4247
  D.push(q(B, void 0, "extraEntropy"));
4248
4248
  }
4249
- const U = Se(...D), Y = L;
4249
+ const U = Se(...D), j = L;
4250
4250
  function W(B) {
4251
4251
  const X = V(B);
4252
4252
  if (!i.isValidNot0(X))
@@ -4254,7 +4254,7 @@ function Zr(r, e, s = {}) {
4254
4254
  const Z = i.inv(X), oe = r.BASE.multiply(X).toAffine(), K = i.create(oe.x);
4255
4255
  if (K === xe)
4256
4256
  return;
4257
- const Q = i.create(Z * i.create(Y + K * P));
4257
+ const Q = i.create(Z * i.create(j + K * P));
4258
4258
  if (Q === xe)
4259
4259
  return;
4260
4260
  let St = (oe.x === K ? 0 : 2) | Number(oe.y & Pe), vt = Q;
@@ -4277,7 +4277,7 @@ function Zr(r, e, s = {}) {
4277
4277
  const P = M.fromBytes(x, L), D = r.fromBytes(v);
4278
4278
  if (C && P.hasHighS())
4279
4279
  return !1;
4280
- const { r: U, s: Y } = P, W = G(g), B = i.inv(Y), X = i.create(W * B), Z = i.create(U * B), oe = r.BASE.multiplyUnsafe(X).add(D.multiplyUnsafe(Z));
4280
+ const { r: U, s: j } = P, W = G(g), B = i.inv(j), X = i.create(W * B), Z = i.create(U * B), oe = r.BASE.multiplyUnsafe(X).add(D.multiplyUnsafe(Z));
4281
4281
  return oe.is0() ? !1 : i.create(oe.x) === U;
4282
4282
  } catch {
4283
4283
  return !1;
@@ -4323,7 +4323,7 @@ function en(r) {
4323
4323
  throw new Error("Cannot find square root");
4324
4324
  return G;
4325
4325
  }
4326
- const ut = Ye(wt.p, { sqrt: en }), tn = /* @__PURE__ */ Xr(wt, {
4326
+ const ut = je(wt.p, { sqrt: en }), tn = /* @__PURE__ */ Xr(wt, {
4327
4327
  Fp: ut,
4328
4328
  endo: Qr
4329
4329
  }), sn = /* @__PURE__ */ Zr(tn, Ar), rn = BigInt(0), Le = BigInt(1), nn = BigInt(2), on = BigInt(7), an = BigInt(256), cn = BigInt(113), ks = [], Ps = [], Os = [];
@@ -4334,20 +4334,20 @@ for (let r = 0, e = Le, s = 1, t = 0; r < 24; r++) {
4334
4334
  e = (e << Le ^ (e >> on) * cn) % an, e & nn && (n ^= Le << (Le << BigInt(o)) - Le);
4335
4335
  Os.push(n);
4336
4336
  }
4337
- const Cs = mr(Os, !0), ln = Cs[0], dn = Cs[1], zt = (r, e, s) => s > 32 ? br(r, e, s) : wr(r, e, s), jt = (r, e, s) => s > 32 ? Sr(r, e, s) : yr(r, e, s);
4337
+ const Cs = mr(Os, !0), ln = Cs[0], dn = Cs[1], zt = (r, e, s) => s > 32 ? br(r, e, s) : wr(r, e, s), Yt = (r, e, s) => s > 32 ? Sr(r, e, s) : yr(r, e, s);
4338
4338
  function un(r, e = 24) {
4339
4339
  const s = new Uint32Array(10);
4340
4340
  for (let t = 24 - e; t < 24; t++) {
4341
4341
  for (let i = 0; i < 10; i++)
4342
4342
  s[i] = r[i] ^ r[i + 10] ^ r[i + 20] ^ r[i + 30] ^ r[i + 40];
4343
4343
  for (let i = 0; i < 10; i += 2) {
4344
- const a = (i + 8) % 10, c = (i + 2) % 10, l = s[c], u = s[c + 1], h = zt(l, u, 1) ^ s[a], _ = jt(l, u, 1) ^ s[a + 1];
4344
+ const a = (i + 8) % 10, c = (i + 2) % 10, l = s[c], u = s[c + 1], h = zt(l, u, 1) ^ s[a], _ = Yt(l, u, 1) ^ s[a + 1];
4345
4345
  for (let f = 0; f < 50; f += 10)
4346
4346
  r[i + f] ^= h, r[i + f + 1] ^= _;
4347
4347
  }
4348
4348
  let n = r[2], o = r[3];
4349
4349
  for (let i = 0; i < 24; i++) {
4350
- const a = Ps[i], c = zt(n, o, a), l = jt(n, o, a), u = ks[i];
4350
+ const a = Ps[i], c = zt(n, o, a), l = Yt(n, o, a), u = ks[i];
4351
4351
  n = r[u], o = r[u + 1], r[u] = c, r[u + 1] = l;
4352
4352
  }
4353
4353
  for (let i = 0; i < 50; i += 10) {
@@ -4436,7 +4436,7 @@ class yt {
4436
4436
  return e || (e = new yt(s, t, n, i, o)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = o, e.suffix = t, e.outputLen = n, e.enableXOF = i, e.destroyed = this.destroyed, e;
4437
4437
  }
4438
4438
  }
4439
- const hn = (r, e, s, t = {}) => is(() => new yt(e, r, s), t), Yt = /* @__PURE__ */ hn(1, 136, 32), pn = 60;
4439
+ const hn = (r, e, s, t = {}) => is(() => new yt(e, r, s), t), jt = /* @__PURE__ */ hn(1, 136, 32), pn = 60;
4440
4440
  class fn {
4441
4441
  constructor() {
4442
4442
  this.jwks = null;
@@ -4501,13 +4501,13 @@ class fn {
4501
4501
  ${t.length}`
4502
4502
  ), o = new Uint8Array(n.length + t.length);
4503
4503
  o.set(n, 0), o.set(t, n.length);
4504
- const i = Yt(o), a = s.startsWith("0x") ? s.slice(2) : s;
4504
+ const i = jt(o), a = s.startsWith("0x") ? s.slice(2) : s;
4505
4505
  if (a.length !== 130)
4506
4506
  throw new Error(`서명 길이가 유효하지 않습니다: 130 hex 문자 예상, 현재 ${a.length}`);
4507
4507
  const c = _n(a), l = c.slice(0, 32), u = c.slice(32, 64), h = c[64], _ = h >= 27 ? h - 27 : h, E = new sn.Signature(
4508
4508
  Xt(l),
4509
4509
  Xt(u)
4510
- ).addRecoveryBit(_).recoverPublicKey(i).toBytes(!1).slice(1), y = Yt(E);
4510
+ ).addRecoveryBit(_).recoverPublicKey(i).toBytes(!1).slice(1), y = jt(E);
4511
4511
  return "0x" + $e(y.slice(12));
4512
4512
  }
4513
4513
  }
@@ -6781,6 +6781,8 @@ const Sn = `
6781
6781
  display: flex !important;
6782
6782
  flex-direction: column !important;
6783
6783
  }
6784
+ .__crossx-card--wallet-selector .__crossx-header { flex-shrink: 0; }
6785
+ .__crossx-card--wallet-selector > .__crossx-divider { flex-shrink: 0; }
6784
6786
  .__crossx-card--wallet-selector .__crossx-body {
6785
6787
  flex: 1;
6786
6788
  min-height: 0;
@@ -6788,10 +6790,25 @@ const Sn = `
6788
6790
  display: flex;
6789
6791
  flex-direction: column;
6790
6792
  }
6793
+ .__crossx-card--wallet-selector .__crossx-body-cols {
6794
+ flex: 1;
6795
+ min-height: 0;
6796
+ display: flex;
6797
+ flex-direction: column;
6798
+ }
6799
+ .__crossx-card--wallet-selector .__crossx-col-left { flex-shrink: 0; }
6791
6800
  .__crossx-card--wallet-selector .__crossx-col-right-ws {
6801
+ flex: 1;
6792
6802
  min-height: 0;
6803
+ display: flex;
6804
+ flex-direction: column;
6793
6805
  }
6794
- .__crossx-card--wallet-selector .__crossx-wallet-list { max-height: 203px; }
6806
+ .__crossx-card--wallet-selector .__crossx-wallet-list {
6807
+ flex: 1;
6808
+ min-height: 0;
6809
+ max-height: 203px;
6810
+ }
6811
+ .__crossx-card--wallet-selector .__crossx-wallet-add { flex-shrink: 0; }
6795
6812
  .__crossx-card--send-tx,
6796
6813
  .__crossx-card--sign-tx,
6797
6814
  .__crossx-card--sign-msg,
@@ -7261,9 +7278,20 @@ function pe(r) {
7261
7278
  const e = (s) => s.stopPropagation();
7262
7279
  for (const s of ["pointerdown", "pointerup", "mousedown", "mouseup", "click"])
7263
7280
  r.addEventListener(s, e);
7281
+ r.setAttribute("data-vaul-no-drag", "");
7264
7282
  for (const s of ["touchstart", "touchend"])
7265
- r.addEventListener(s, e, { passive: !0 });
7266
- document.body.appendChild(r);
7283
+ r.addEventListener(s, e);
7284
+ r.addEventListener("touchmove", (s) => {
7285
+ s.stopPropagation();
7286
+ let t = s.target;
7287
+ for (; t && t !== r; ) {
7288
+ const n = window.getComputedStyle(t);
7289
+ if ((n.overflowY === "auto" || n.overflowY === "scroll") && t.scrollHeight > t.clientHeight)
7290
+ return;
7291
+ t = t.parentElement;
7292
+ }
7293
+ s.preventDefault();
7294
+ }, { passive: !1 }), document.body.appendChild(r);
7267
7295
  }
7268
7296
  const vn = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
7269
7297
  function nt() {
@@ -7370,9 +7398,9 @@ function An(r) {
7370
7398
  }
7371
7399
  function Ls(r) {
7372
7400
  const e = An(r);
7373
- if (!e) return j("Estimated fee", "<span>—</span>");
7374
- let s = j("Est. Tx Fee", `<span>${e.estTxFee}</span>`);
7375
- return e.isDynamic ? (e.maxPriorityFeeGwei !== void 0 && (s += j("Max Priority Fee", `<span>${e.maxPriorityFeeGwei} Gwei</span>`)), e.maxFeeGwei !== void 0 && (s += j("Max Gas Fee", `<span>${e.maxFeeGwei} Gwei</span>`))) : e.gasPriceGwei !== void 0 && (s += j("Gas Price", `<span>${e.gasPriceGwei} Gwei</span>`)), e.gasLimitFormatted && (s += j("Gas Limit", `<span>${e.gasLimitFormatted}</span>`)), s;
7401
+ if (!e) return Y("Estimated fee", "<span>—</span>");
7402
+ let s = Y("Est. Tx Fee", `<span>${e.estTxFee}</span>`);
7403
+ return e.isDynamic ? (e.maxPriorityFeeGwei !== void 0 && (s += Y("Max Priority Fee", `<span>${e.maxPriorityFeeGwei} Gwei</span>`)), e.maxFeeGwei !== void 0 && (s += Y("Max Gas Fee", `<span>${e.maxFeeGwei} Gwei</span>`))) : e.gasPriceGwei !== void 0 && (s += Y("Gas Price", `<span>${e.gasPriceGwei} Gwei</span>`)), e.gasLimitFormatted && (s += Y("Gas Limit", `<span>${e.gasLimitFormatted}</span>`)), s;
7376
7404
  }
7377
7405
  const ge = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
7378
7406
  <rect x="9" y="9" width="13" height="13" rx="2"/>
@@ -7420,7 +7448,7 @@ function ce(r) {
7420
7448
  `--cx-on-primary:${r.onPrimary}`
7421
7449
  ].join(";");
7422
7450
  }
7423
- function j(r, e) {
7451
+ function Y(r, e) {
7424
7452
  return `
7425
7453
  <div class="__crossx-row">
7426
7454
  <span class="__crossx-row-label">${r}</span>
@@ -7452,8 +7480,8 @@ function Pn(r, e) {
7452
7480
  <hr class="__crossx-divider __crossx-divider--cols">
7453
7481
  <div class="__crossx-col-right-sign">
7454
7482
  <div class="__crossx-rows">
7455
- ${j("To", n)}
7456
- ${j("Network", `<span>${Ns(r.chainId)}</span>`)}
7483
+ ${Y("To", n)}
7484
+ ${Y("Network", `<span>${Ns(r.chainId)}</span>`)}
7457
7485
  ${o}
7458
7486
  </div>
7459
7487
  <pre class="__crossx-raw-tx">${$(i)}</pre>
@@ -7483,8 +7511,8 @@ function On(r, e) {
7483
7511
  </p>
7484
7512
  <div class="__crossx-body-cols">
7485
7513
  <div class="__crossx-rows">
7486
- ${j("To", i)}
7487
- ${j("Network", `<span>${Ns(r.chainId)}</span>`)}
7514
+ ${Y("To", i)}
7515
+ ${Y("Network", `<span>${Ns(r.chainId)}</span>`)}
7488
7516
  ${a}
7489
7517
  </div>
7490
7518
  <div class="__crossx-pill">
@@ -7522,12 +7550,12 @@ function Nn(r) {
7522
7550
  }
7523
7551
  }
7524
7552
  function Ln(r, e) {
7525
- const s = j(
7553
+ const s = Y(
7526
7554
  "From",
7527
7555
  `<span class="__crossx-addr-text">${re(r.from)}</span>
7528
7556
  <button class="__crossx-copy-btn" data-copy="${$(r.from)}" title="Copy address">${ge}</button>`
7529
- ), t = r.to ? j("To", `<span class="__crossx-addr-text">${re(r.to)}</span>
7530
- <button class="__crossx-copy-btn" data-copy="${$(r.to)}" title="Copy address">${ge}</button>`) : "", n = r.amount ? j("Transfer", `<span>${$(r.amount)}</span>`) : "", o = r.fees ? j("Tx Fee", `<span>${$(r.fees)}</span>`) : "", i = r.txHash ? j("Tx Hash", `<span class="__crossx-addr-text">${re(r.txHash)}</span>
7557
+ ), t = r.to ? Y("To", `<span class="__crossx-addr-text">${re(r.to)}</span>
7558
+ <button class="__crossx-copy-btn" data-copy="${$(r.to)}" title="Copy address">${ge}</button>`) : "", n = r.amount ? Y("Transfer", `<span>${$(r.amount)}</span>`) : "", o = r.fees ? Y("Tx Fee", `<span>${$(r.fees)}</span>`) : "", i = r.txHash ? Y("Tx Hash", `<span class="__crossx-addr-text">${re(r.txHash)}</span>
7531
7559
  <button class="__crossx-copy-btn" data-copy="${$(r.txHash)}" title="Copy hash">${ge}</button>`) : "", a = r.total ? `<div class="__crossx-total-pill">
7532
7560
  <span class="__crossx-total-label">Total<br>(including fees)</span>
7533
7561
  <span class="__crossx-total-amount">${$(r.total)}</span>
@@ -7582,9 +7610,9 @@ function Mn(r, e, s) {
7582
7610
  }
7583
7611
  const a = r.querySelector("#__crossx-progress-body");
7584
7612
  if (!a) return;
7585
- const c = e.from ? j("From", `<span class="__crossx-addr-text">${re(e.from)}</span>
7586
- <button class="__crossx-copy-btn" data-copy="${$(e.from)}" title="Copy address">${ge}</button>`) : "", l = e.to ? j("To", `<span class="__crossx-addr-text">${re(e.to)}</span>
7587
- <button class="__crossx-copy-btn" data-copy="${$(e.to)}" title="Copy address">${ge}</button>`) : "", u = e.amount ? j("Transfer", `<span>${$(e.amount)}</span>`) : "", h = e.fees ? j("Tx Fee", `<span>${$(e.fees)}</span>`) : "", _ = e.txHash ? j("Tx Hash", `<span class="__crossx-addr-text">${re(e.txHash)}</span>
7613
+ const c = e.from ? Y("From", `<span class="__crossx-addr-text">${re(e.from)}</span>
7614
+ <button class="__crossx-copy-btn" data-copy="${$(e.from)}" title="Copy address">${ge}</button>`) : "", l = e.to ? Y("To", `<span class="__crossx-addr-text">${re(e.to)}</span>
7615
+ <button class="__crossx-copy-btn" data-copy="${$(e.to)}" title="Copy address">${ge}</button>`) : "", u = e.amount ? Y("Transfer", `<span>${$(e.amount)}</span>`) : "", h = e.fees ? Y("Tx Fee", `<span>${$(e.fees)}</span>`) : "", _ = e.txHash ? Y("Tx Hash", `<span class="__crossx-addr-text">${re(e.txHash)}</span>
7588
7616
  <button class="__crossx-copy-btn" data-copy="${$(e.txHash)}" title="Copy hash">${ge}</button>`) : "", f = e.total ? `<div class="__crossx-total-pill">
7589
7617
  <span class="__crossx-total-label">Total<br>(including fees)</span>
7590
7618
  <span class="__crossx-total-amount">${$(e.total)}</span>
@@ -7871,7 +7899,7 @@ function zn(r, e, s) {
7871
7899
  return () => clearInterval(h);
7872
7900
  } };
7873
7901
  }
7874
- function jn(r) {
7902
+ function Yn(r) {
7875
7903
  const s = [r.check1, r.check2].map((t, n) => `
7876
7904
  <div class="__crossx-pw-notice-item" data-check-index="${n}" role="checkbox" aria-checked="false" tabindex="0">
7877
7905
  <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${n}">${Jn}</div>
@@ -7942,7 +7970,7 @@ function es(r, e) {
7942
7970
  </div>
7943
7971
  `, s;
7944
7972
  }
7945
- function Yn(r, e) {
7973
+ function jn(r, e) {
7946
7974
  if (r.length !== 6) return e.tooShort;
7947
7975
  if (!/^\d+$/.test(r)) return e.numbersOnly;
7948
7976
  if (/(.)\1{2}/.test(r)) return e.repeatingDigit;
@@ -8261,7 +8289,7 @@ class eo {
8261
8289
  }, i = {
8262
8290
  title: (t == null ? void 0 : t.pinSetup_confirmTitle) ?? "Confirm PIN",
8263
8291
  headerSubtitle: (t == null ? void 0 : t.pinSetup_confirmSubtitle) ?? "Enter your PIN again to confirm."
8264
- }, a = es(this.tokens, jn(n)), c = nt();
8292
+ }, a = es(this.tokens, Yn(n)), c = nt();
8265
8293
  pe(a);
8266
8294
  let l = !1;
8267
8295
  const u = () => {
@@ -8292,7 +8320,7 @@ class eo {
8292
8320
  subtitle: o.subtitle,
8293
8321
  errorMessage: N
8294
8322
  }), (F = f.querySelector("#__crossx-close-btn")) == null || F.addEventListener("click", _), at(f, (M) => {
8295
- const V = Yn(M, w);
8323
+ const V = jn(M, w);
8296
8324
  V ? y(V) : E(M);
8297
8325
  }, _);
8298
8326
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cross/crossx-sdk-core",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "CROSSx Core SDK - Vanilla JavaScript Embedded Wallet SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",