@wormhole-foundation/wormhole-connect 4.2.0-beta.0-development → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/main.mjs +73 -73
  2. package/dist/src/telemetry/types.d.ts +2 -1
  3. package/dist/src/telemetry/types.d.ts.map +1 -1
  4. package/dist/src/utils/errors.d.ts +1 -0
  5. package/dist/src/utils/errors.d.ts.map +1 -1
  6. package/lib/{aptos-DcdKyekw.js → aptos-BnjZOhUE.js} +1 -1
  7. package/lib/{aptos-B1Gf2eCD.mjs → aptos-fTiHvXXE.mjs} +2 -2
  8. package/lib/{basic-DnhL0oWa.mjs → basic-BqusrmRE.mjs} +2 -2
  9. package/lib/{basic-C6VXQ7m-.js → basic-BrW22Cj9.js} +1 -1
  10. package/lib/{basic-CFbslwLM.mjs → basic-CK5Bsf0B.mjs} +2 -2
  11. package/lib/{basic-BS7Z1PMG.js → basic-ChOmeQQk.js} +1 -1
  12. package/lib/constants-C1w_RyOP.js +1 -0
  13. package/lib/{constants-CTJ_-E0d.mjs → constants-DcDpDarO.mjs} +5 -5
  14. package/lib/{core-DT6TBPQP.mjs → core-DQ-6Q1F1.mjs} +5 -5
  15. package/lib/{core-RRp0K__1.js → core-FA2gBc-s.js} +3 -3
  16. package/lib/{evm-DlOCiplA.mjs → evm-BJ4Lx-r9.mjs} +3 -3
  17. package/lib/{evm-BwCfQIyJ.js → evm-BTgO_HRP.js} +2 -2
  18. package/lib/{evm-BxF9XPn4.mjs → evm-C-vXMfGr.mjs} +3 -3
  19. package/lib/{evm-C3B8jHD7.js → evm-qxndAh3z.js} +1 -1
  20. package/lib/hosted.js +1 -1
  21. package/lib/hosted.mjs +1 -1
  22. package/lib/{hypercore-DbqOAqKF.js → hypercore-D7kZiwbe.js} +1 -1
  23. package/lib/{hypercore-H7pw_pN4.mjs → hypercore-DKqayfki.mjs} +9 -9
  24. package/lib/{index-mikg85u5.js → index-3Zg1AdoI.js} +1 -1
  25. package/lib/{index-BuEKhdrW.mjs → index-B1URQBlH.mjs} +1 -1
  26. package/lib/{index-pn6NZmOS.js → index-B7b8sctd.js} +1 -1
  27. package/lib/{index-CsLyPoC6.mjs → index-BVciucyT.mjs} +1 -1
  28. package/lib/{index-BNpkgexR.js → index-BfzaCmg7.js} +1 -1
  29. package/lib/{index-DVm_f5E1.js → index-C-F8_8dY.js} +1 -1
  30. package/lib/{index-BmP0jPVN.mjs → index-C6MalNd5.mjs} +9 -9
  31. package/lib/{index-BbE02hdW.js → index-Cb_8WAm1.js} +8 -8
  32. package/lib/{index-BnKf2rOm.mjs → index-CgqBQ88K.mjs} +178 -175
  33. package/lib/{index-BtU67kjy.mjs → index-CowAVUcg.mjs} +1 -1
  34. package/lib/{index-CGqJokTg.mjs → index-DcFL403C.mjs} +1 -1
  35. package/lib/{index-DAJZN12d.js → index-Oxm0y6-t.js} +1 -1
  36. package/lib/{index-t_koRpGi.js → index-XjDX4fWv.js} +1 -1
  37. package/lib/{index-NAUBlFLG.mjs → index-mNO1mk2F.mjs} +1 -1
  38. package/lib/{index.es-B3FwsRfN.js → index.es-B9kBDkCQ.js} +3 -3
  39. package/lib/{index.es-ClIr5Gv-.js → index.es-BZRO-bNH.js} +1 -1
  40. package/lib/{index.es-CYyuSfPG.mjs → index.es-CF3YY88z.mjs} +3 -3
  41. package/lib/{index.es-3KAM8l3G.mjs → index.es-CaAL5X4E.mjs} +2 -2
  42. package/lib/index.js +2 -2
  43. package/lib/index.mjs +16 -15
  44. package/lib/lifi.js +1 -1
  45. package/lib/lifi.mjs +2 -2
  46. package/lib/mayan.js +1 -1
  47. package/lib/mayan.mjs +2 -2
  48. package/lib/{secp256k1-BZFiBDHQ.mjs → secp256k1-1o6o1kFy.mjs} +1 -1
  49. package/lib/{secp256k1-D3i7kc2M.mjs → secp256k1-BjlnTj1_.mjs} +1 -1
  50. package/lib/{secp256k1-B2G0zB-5.js → secp256k1-CeYT4ndf.js} +1 -1
  51. package/lib/{secp256k1-Cteng3v9.mjs → secp256k1-Cw_BiEuN.mjs} +1 -1
  52. package/lib/{secp256k1-CxjctkO3.js → secp256k1-D5cKS6q_.js} +1 -1
  53. package/lib/{secp256k1-Bz-QjKBU.js → secp256k1-_QlJc7sK.js} +1 -1
  54. package/lib/{solana-BE2DAanS.js → solana-DvHFhri3.js} +4 -4
  55. package/lib/{solana-Df231Yni.mjs → solana-TgPr9kpk.mjs} +8 -8
  56. package/lib/{solanaEmbed.esm-B9WG-Afi.mjs → solanaEmbed.esm-Bh1-aAL4.mjs} +2 -2
  57. package/lib/{solanaEmbed.esm-BqcrHrhl.js → solanaEmbed.esm-C8TjRcIV.js} +1 -1
  58. package/lib/src/telemetry/types.d.ts +2 -1
  59. package/lib/src/telemetry/types.d.ts.map +1 -1
  60. package/lib/src/utils/errors.d.ts +1 -0
  61. package/lib/src/utils/errors.d.ts.map +1 -1
  62. package/lib/{sui-B9tYcgyb.mjs → sui-CoWRa3vr.mjs} +2 -2
  63. package/lib/{sui-BVwNcgQT.js → sui-DwFrGd2Y.js} +1 -1
  64. package/lib/{tokenHelpers-DITWDel1.js → tokenHelpers-CeTyb4rG.js} +1 -1
  65. package/lib/{tokenHelpers-C53sepsl.mjs → tokenHelpers-VYjmKUxj.mjs} +1 -1
  66. package/lib/{tokens-CO0YQ3R2.mjs → tokens-D6uJqrsR.mjs} +1 -1
  67. package/lib/{tokens-CiSHS7oi.js → tokens-mXZqt-qL.js} +1 -1
  68. package/lib/{w3m-modal-SlcSCSnx.mjs → w3m-modal-BEe8ji9_.mjs} +2 -2
  69. package/lib/{w3m-modal-5v-rsnN8.mjs → w3m-modal-D3eqrCT1.mjs} +2 -2
  70. package/lib/{w3m-modal-B0Lu-6W8.js → w3m-modal-Duc13ei7.js} +1 -1
  71. package/lib/{w3m-modal-B2xHxAWg.js → w3m-modal-f_sUVzPx.js} +1 -1
  72. package/package.json +1 -1
  73. package/lib/constants-BCFTvlgh.js +0 -1
@@ -1,4 +1,4 @@
1
- import { a as ll, C as dl, b as pf } from "./constants-CTJ_-E0d.mjs";
1
+ import { a as ll, C as dl, b as pf } from "./constants-DcDpDarO.mjs";
2
2
  import { p as ut, C as _t, D as hi, b0 as qu, ai as sr, an as mi, ao as yi, b1 as lr, b2 as _r, m as Uu, ar as vl, W as pr, i as Sr, d as V0, b3 as Lu, N as bf, b4 as Hu, b5 as pl, t as bl, h as zu, b6 as Ku, w as Wu, R as ml, j as yl, e as gi, A as gl, B as xl, u as vr, f as ju } from "./platform-CSpAb386.mjs";
3
3
  import { ad as xt, c as Et, ae as wl, w as Wt, af as Z0, g as Cr, ag as Ml, ah as _l } from "./unsignedTransaction-D2Ja0SuN.mjs";
4
4
  import { R as El, a as Al, C as Sl, b as Fl, c as Bl, T as Cl } from "./address-CX0E32ut.mjs";
@@ -339,7 +339,7 @@ const Il = {
339
339
  icon: "Monad",
340
340
  symbol: "MON"
341
341
  }
342
- }, ir = (g) => {
342
+ }, nr = (g) => {
343
343
  console.error(`Wormhole Connect: ${g}`);
344
344
  }, ft = (g, x) => x ? { [g]: x } : {}, ql = (g, x) => {
345
345
  if (!x) return g;
@@ -353,25 +353,25 @@ const Il = {
353
353
  return g;
354
354
  }, Ul = (g, x, S) => {
355
355
  if (g)
356
- return g.source?.chain && (x[g.source.chain] || (ir(
356
+ return g.source?.chain && (x[g.source.chain] || (nr(
357
357
  `Invalid chain name "${g.source.chain}" specified for defaultInputs.source.chain`
358
- ), delete g.source)), g.destination?.chain && (x[g.destination.chain] || (ir(
358
+ ), delete g.source)), g.destination?.chain && (x[g.destination.chain] || (nr(
359
359
  `Invalid chain name "${g.destination.chain}" specified for defaultInputs.destination.chain`
360
- ), delete g.destination)), g.source?.token && g.destination?.token && g.source.token === g.destination.token && ir(
360
+ ), delete g.destination)), g.source?.token && g.destination?.token && g.source.token === g.destination.token && nr(
361
361
  "Source and destination token cannot be the same, check the defaultInputs configuration"
362
- ), g.source?.chain && g.destination?.chain && g.requiredChain && (x[g.requiredChain] || ir(
362
+ ), g.source?.chain && g.destination?.chain && g.requiredChain && (x[g.requiredChain] || nr(
363
363
  `Invalid network value "${g.requiredChain}" specified for defaultInputs.requiredChain`
364
- ), g.destination.chain !== g.requiredChain && g.source.chain !== g.requiredChain && ir(
364
+ ), g.destination.chain !== g.requiredChain && g.source.chain !== g.requiredChain && nr(
365
365
  "Source chain or destination chain must equal the required network"
366
366
  )), g.source?.chain && g.source?.token && (S.findByAddressOrSymbol(
367
367
  g.source.chain,
368
368
  g.source.token
369
- ) || (ir(
369
+ ) || (nr(
370
370
  `Invalid token "${g.source?.token}" specified for defaultInputs.source.token`
371
371
  ), delete g.source.token)), g.destination?.chain && g.destination?.token && (S.findByAddressOrSymbol(
372
372
  g.destination.chain,
373
373
  g.destination.token
374
- ) || (ir(
374
+ ) || (nr(
375
375
  `Invalid token "${g.destination?.token}" specified for defaultInputs.destination.token`
376
376
  ), delete g.destination.token)), g;
377
377
  }, Ll = (g) => g[0].toUpperCase() + g.slice(1), Hl = {}, {
@@ -451,7 +451,7 @@ function K0(g) {
451
451
  };
452
452
  }
453
453
  var ge = /* @__PURE__ */ ((g) => (g[g.AVAX = 1] = "AVAX", g[g.BNB = 2] = "BNB", g[g.BSC = 3] = "BSC", g[g.CELO = 4] = "CELO", g[g.ETH = 5] = "ETH", g[g.FANTOM = 6] = "FANTOM", g[g.POLYGON = 7] = "POLYGON", g[g.SOLANA = 8] = "SOLANA", g[g.USDC = 9] = "USDC", g[g.GLMR = 10] = "GLMR", g[g.DAI = 11] = "DAI", g[g.USDT = 12] = "USDT", g[g.BUSD = 13] = "BUSD", g[g.WBTC = 14] = "WBTC", g[g.SUI = 15] = "SUI", g[g.APT = 16] = "APT", g[g.SEI = 17] = "SEI", g[g.BASE = 18] = "BASE", g[g.OSMO = 19] = "OSMO", g[g.TBTC = 20] = "TBTC", g[g.WSTETH = 21] = "WSTETH", g[g.ARBITRUM = 22] = "ARBITRUM", g[g.OPTIMISM = 23] = "OPTIMISM", g[g.ATOM = 24] = "ATOM", g[g.EVMOS = 25] = "EVMOS", g[g.KUJI = 26] = "KUJI", g[g.PYTH = 27] = "PYTH", g[g.INJ = 28] = "INJ", g[g.KLAY = 29] = "KLAY", g[g.NTT = 30] = "NTT", g[g.SCROLL = 31] = "SCROLL", g[g.XLAYER = 32] = "XLAYER", g[g.MANTLE = 33] = "MANTLE", g[g.WORLDCHAIN = 34] = "WORLDCHAIN", g[g.BERA = 35] = "BERA", g[g.INK = 36] = "INK", g[g.BTC = 37] = "BTC", g[g.SONIC = 38] = "SONIC", g[g.PLUME = 39] = "PLUME", g[g.FOGO = 40] = "FOGO", g[g.HYPE = 41] = "HYPE", g[g.XRP = 42] = "XRP", g[g.CTC = 43] = "CTC", g[g.MONAD = 44] = "MONAD", g[g.AUSD = 45] = "AUSD", g))(ge || {});
454
- const B6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
454
+ const D6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
455
455
  __proto__: null,
456
456
  TokenIcon: ge,
457
457
  createUiConfig: K0
@@ -6655,7 +6655,7 @@ function rf() {
6655
6655
  })(Hi)), Hi.exports;
6656
6656
  }
6657
6657
  var $n, $o;
6658
- function rr() {
6658
+ function ir() {
6659
6659
  if ($o) return $n;
6660
6660
  $o = 1;
6661
6661
  var g = xt().Buffer, x = Y0().Transform, S = Fr().StringDecoder, c = lt();
@@ -6721,7 +6721,7 @@ var Gn, Go;
6721
6721
  function Nr() {
6722
6722
  if (Go) return Gn;
6723
6723
  Go = 1;
6724
- var g = lt(), x = J0(), S = ec(), c = rf(), E = rr();
6724
+ var g = lt(), x = J0(), S = ec(), c = rf(), E = ir();
6725
6725
  function i(_) {
6726
6726
  E.call(this, "digest"), this._hash = _;
6727
6727
  }
@@ -6737,7 +6737,7 @@ var Vn, Vo;
6737
6737
  function rv() {
6738
6738
  if (Vo) return Vn;
6739
6739
  Vo = 1;
6740
- var g = lt(), x = xt().Buffer, S = rr(), c = x.alloc(128), E = 64;
6740
+ var g = lt(), x = xt().Buffer, S = ir(), c = x.alloc(128), E = 64;
6741
6741
  function i(_, y) {
6742
6742
  S.call(this, "digest"), typeof y == "string" && (y = x.from(y)), this._alg = _, this._key = y, y.length > E ? y = _(y) : y.length < E && (y = x.concat([y, c], E));
6743
6743
  for (var m = this._ipad = x.allocUnsafe(E), h = this._opad = x.allocUnsafe(E), d = 0; d < E; d++)
@@ -6764,7 +6764,7 @@ var Xn, Xo;
6764
6764
  function dc() {
6765
6765
  if (Xo) return Xn;
6766
6766
  Xo = 1;
6767
- var g = lt(), x = rv(), S = rr(), c = xt().Buffer, E = iv(), i = ec(), _ = rf(), y = c.alloc(128);
6767
+ var g = lt(), x = rv(), S = ir(), c = xt().Buffer, E = iv(), i = ec(), _ = rf(), y = c.alloc(128);
6768
6768
  function m(h, d) {
6769
6769
  S.call(this, "digest"), typeof d == "string" && (d = c.from(d));
6770
6770
  var v = h === "sha512" || h === "sha384" ? 128 : 64;
@@ -7165,7 +7165,7 @@ var os;
7165
7165
  function gc() {
7166
7166
  return os || (os = 1, Wr.pbkdf2 = xv(), Wr.pbkdf2Sync = yc()), Wr;
7167
7167
  }
7168
- var Gt = {}, nr = {}, $t = {}, ss;
7168
+ var Gt = {}, ar = {}, $t = {}, ss;
7169
7169
  function xc() {
7170
7170
  if (ss) return $t;
7171
7171
  ss = 1, $t.readUInt32BE = function(E, i) {
@@ -8070,13 +8070,13 @@ function Mv() {
8070
8070
  }
8071
8071
  var vs;
8072
8072
  function _v() {
8073
- return vs || (vs = 1, nr.utils = xc(), nr.Cipher = nf(), nr.DES = wc(), nr.CBC = wv(), nr.EDE = Mv()), nr;
8073
+ return vs || (vs = 1, ar.utils = xc(), ar.Cipher = nf(), ar.DES = wc(), ar.CBC = wv(), ar.EDE = Mv()), ar;
8074
8074
  }
8075
8075
  var la, ps;
8076
8076
  function Ev() {
8077
8077
  if (ps) return la;
8078
8078
  ps = 1;
8079
- var g = rr(), x = _v(), S = lt(), c = xt().Buffer, E = {
8079
+ var g = ir(), x = _v(), S = lt(), c = xt().Buffer, E = {
8080
8080
  "des-ede3-cbc": x.CBC.instantiate(x.EDE),
8081
8081
  "des-ede3": x.EDE,
8082
8082
  "des-ede-cbc": x.CBC.instantiate(x.EDE),
@@ -8405,7 +8405,7 @@ var _a, Cs;
8405
8405
  function Ec() {
8406
8406
  if (Cs) return _a;
8407
8407
  Cs = 1;
8408
- var g = ci(), x = xt().Buffer, S = rr(), c = lt(), E = kv(), i = Pr(), _ = Mc();
8408
+ var g = ci(), x = xt().Buffer, S = ir(), c = lt(), E = kv(), i = Pr(), _ = Mc();
8409
8409
  function y(d, v) {
8410
8410
  var p = 0;
8411
8411
  d.length !== v.length && p++;
@@ -8458,7 +8458,7 @@ var Ea, Ds;
8458
8458
  function Ac() {
8459
8459
  if (Ds) return Ea;
8460
8460
  Ds = 1;
8461
- var g = ci(), x = xt().Buffer, S = rr(), c = lt();
8461
+ var g = ci(), x = xt().Buffer, S = ir(), c = lt();
8462
8462
  function E(i, _, y, m) {
8463
8463
  S.call(this), this._cipher = new g.AES(_), this._prev = x.from(y), this._cache = x.allocUnsafe(0), this._secCache = x.allocUnsafe(0), this._decrypt = m, this._mode = i;
8464
8464
  }
@@ -8497,7 +8497,7 @@ var Ts;
8497
8497
  function Nv() {
8498
8498
  if (Ts) return jr;
8499
8499
  Ts = 1;
8500
- var g = af(), x = Ec(), S = xt().Buffer, c = Ac(), E = rr(), i = ci(), _ = li(), y = lt();
8500
+ var g = af(), x = Ec(), S = xt().Buffer, c = Ac(), E = ir(), i = ci(), _ = li(), y = lt();
8501
8501
  function m(w, M, A) {
8502
8502
  E.call(this), this._cache = new d(), this._cipher = new i.AES(M), this._prev = S.from(A), this._mode = w, this._autopadding = !0;
8503
8503
  }
@@ -8552,7 +8552,7 @@ var Vr = {}, Is;
8552
8552
  function Pv() {
8553
8553
  if (Is) return Vr;
8554
8554
  Is = 1;
8555
- var g = Ec(), x = xt().Buffer, S = af(), c = Ac(), E = rr(), i = ci(), _ = li(), y = lt();
8555
+ var g = Ec(), x = xt().Buffer, S = af(), c = Ac(), E = ir(), i = ci(), _ = li(), y = lt();
8556
8556
  function m(w, M, A) {
8557
8557
  E.call(this), this._cache = new h(), this._last = void 0, this._cipher = new i.AES(M), this._prev = x.from(A), this._mode = w, this._autopadding = !0;
8558
8558
  }
@@ -8689,7 +8689,7 @@ function qv() {
8689
8689
  }
8690
8690
  return Gt.createCipher = Gt.Cipher = i, Gt.createCipheriv = Gt.Cipheriv = y, Gt.createDecipher = Gt.Decipher = _, Gt.createDecipheriv = Gt.Decipheriv = m, Gt.listCiphers = Gt.getCiphers = h, Gt;
8691
8691
  }
8692
- var ar = {}, ti = { exports: {} }, Uv = ti.exports, Os;
8692
+ var fr = {}, ti = { exports: {} }, Uv = ti.exports, Os;
8693
8693
  function Sc() {
8694
8694
  return Os || (Os = 1, (function(g) {
8695
8695
  (function(x, S) {
@@ -11235,7 +11235,7 @@ function Yv() {
11235
11235
  }
11236
11236
  var Ks;
11237
11237
  function Jv() {
11238
- if (Ks) return ar;
11238
+ if (Ks) return fr;
11239
11239
  Ks = 1;
11240
11240
  var g = Bc(), x = Xv, S = Yv();
11241
11241
  function c(_) {
@@ -11250,7 +11250,7 @@ function Jv() {
11250
11250
  function i(_, y, m, h) {
11251
11251
  return _t.isBuffer(y) || E[y] === void 0 ? i(_, "binary", y, m) : (y = y || "binary", h = h || "binary", m = m || new _t([2]), _t.isBuffer(m) || (m = new _t(m, h)), typeof _ == "number" ? new S(g(_, m), m, !0) : (_t.isBuffer(_) || (_ = new _t(_, y)), new S(_, m, !0)));
11252
11252
  }
11253
- return ar.DiffieHellmanGroup = ar.createDiffieHellmanGroup = ar.getDiffieHellman = c, ar.createDiffieHellman = ar.DiffieHellman = i, ar;
11253
+ return fr.DiffieHellmanGroup = fr.createDiffieHellmanGroup = fr.getDiffieHellman = c, fr.createDiffieHellman = fr.DiffieHellman = i, fr;
11254
11254
  }
11255
11255
  var Xr = { exports: {} }, Yr = { exports: {} }, Ws;
11256
11256
  function di() {
@@ -14284,7 +14284,7 @@ function qr() {
14284
14284
  return y;
14285
14285
  }, Xa;
14286
14286
  }
14287
- var fr = {}, Jt = {}, vh;
14287
+ var or = {}, Jt = {}, vh;
14288
14288
  function Pc() {
14289
14289
  if (vh) return Jt;
14290
14290
  vh = 1;
@@ -14817,7 +14817,7 @@ function cp() {
14817
14817
  }
14818
14818
  var xh;
14819
14819
  function lp() {
14820
- return xh || (xh = 1, fr.sha1 = hp(), fr.sha224 = up(), fr.sha256 = Oc(), fr.sha384 = cp(), fr.sha512 = qc()), fr;
14820
+ return xh || (xh = 1, or.sha1 = hp(), or.sha224 = up(), or.sha256 = Oc(), or.sha384 = cp(), or.sha512 = qc()), or;
14821
14821
  }
14822
14822
  var r0 = {}, wh;
14823
14823
  function dp() {
@@ -23865,26 +23865,26 @@ function l2(g) {
23865
23865
  throw new Error("Integer is unsafe");
23866
23866
  return Number(g);
23867
23867
  }
23868
- class tr {
23868
+ class rr {
23869
23869
  static byteSize = 32;
23870
23870
  static platform = $0;
23871
23871
  type = "Native";
23872
23872
  address;
23873
23873
  constructor(x) {
23874
- if (tr.instanceof(x))
23874
+ if (rr.instanceof(x))
23875
23875
  this.address = x.address;
23876
23876
  else if (sr.instanceof(x))
23877
23877
  this.address = x.toUint8Array();
23878
- else if (x instanceof Uint8Array && x.byteLength === tr.byteSize)
23878
+ else if (x instanceof Uint8Array && x.byteLength === rr.byteSize)
23879
23879
  this.address = x;
23880
23880
  else if (typeof x == "string" && u2(x))
23881
23881
  this.address = Jc(x).publicKey;
23882
23882
  else if (typeof x == "string" && !isNaN(parseInt(x)))
23883
- this.address = mi.zpad(yi.toBytes(BigInt(x), 8), tr.byteSize);
23883
+ this.address = mi.zpad(yi.toBytes(BigInt(x), 8), rr.byteSize);
23884
23884
  else if (typeof x == "bigint")
23885
- this.address = mi.zpad(yi.toBytes(x, 8), tr.byteSize);
23885
+ this.address = mi.zpad(yi.toBytes(x, 8), rr.byteSize);
23886
23886
  else if (x instanceof Uint8Array && x.byteLength === 8)
23887
- this.address = mi.zpad(x, tr.byteSize);
23887
+ this.address = mi.zpad(x, rr.byteSize);
23888
23888
  else
23889
23889
  throw new Error(`Invalid Algorand address or ASA ID: ${x}`);
23890
23890
  }
@@ -23910,13 +23910,13 @@ class tr {
23910
23910
  return l2(this.toBigInt());
23911
23911
  }
23912
23912
  equals(x) {
23913
- return tr.instanceof(x) ? x.address === this.address : this.toUniversalAddress().equals(x);
23913
+ return rr.instanceof(x) ? x.address === this.address : this.toUniversalAddress().equals(x);
23914
23914
  }
23915
23915
  static instanceof(x) {
23916
23916
  return x.constructor.platform === $0;
23917
23917
  }
23918
23918
  }
23919
- qu($0, tr);
23919
+ qu($0, rr);
23920
23920
  const Qc = [
23921
23921
  ["Cosmoshub", "cosmos"],
23922
23922
  ["Evmos", "evmos"],
@@ -24209,7 +24209,7 @@ async function g2(g, x, S) {
24209
24209
  const c = (await m2(x)).map((E) => E.Platform);
24210
24210
  return new pr(g, c, S);
24211
24211
  }
24212
- const x2 = async () => (await import("./evm-BxF9XPn4.mjs")).default, w2 = async () => (await import("./solana-DfW5T_64.mjs")).default, M2 = async () => (await import("./aptos-DRfXJ8Ba.mjs")).default, _2 = async () => (await import("./sui-QP4AZGNc.mjs")).default, E2 = "https://api.coingecko.com", A2 = "https://pro-api.coingecko.com", Du = {
24212
+ const x2 = async () => (await import("./evm-C-vXMfGr.mjs")).default, w2 = async () => (await import("./solana-DfW5T_64.mjs")).default, M2 = async () => (await import("./aptos-DRfXJ8Ba.mjs")).default, _2 = async () => (await import("./sui-QP4AZGNc.mjs")).default, E2 = "https://api.coingecko.com", A2 = "https://pro-api.coingecko.com", Du = {
24213
24213
  Solana: "solana",
24214
24214
  Ethereum: "ethereum",
24215
24215
  Arbitrum: "ethereum",
@@ -24267,7 +24267,7 @@ const x2 = async () => (await import("./evm-BxF9XPn4.mjs")).default, w2 = async
24267
24267
  }, F2 = async (g, x) => yt.network !== "Mainnet" ? null : G0(
24268
24268
  `/api/v3/coins/${g.chain.toLowerCase()}/contract/${g.address.toString()}`,
24269
24269
  x
24270
- ), C6 = async (g, x) => {
24270
+ ), R6 = async (g, x) => {
24271
24271
  const S = new bi();
24272
24272
  if (yt.network !== "Mainnet") return S;
24273
24273
  const c = {}, E = [];
@@ -24588,7 +24588,7 @@ class si extends bi {
24588
24588
  let _ = i?.symbol?.toUpperCase() || "", y = i?.name || "", m = i?.image?.large || null;
24589
24589
  const h = i?.web_slug;
24590
24590
  if (!_) {
24591
- const { getTokenMetadataFromRpc: w } = await import("./tokens-CO0YQ3R2.mjs"), M = await w(x);
24591
+ const { getTokenMetadataFromRpc: w } = await import("./tokens-D6uJqrsR.mjs"), M = await w(x);
24592
24592
  M && (console.info("Got metadata from RPC", M), _ = M.symbol, y = M.name, m = M.icon);
24593
24593
  }
24594
24594
  let d, v;
@@ -24722,9 +24722,9 @@ function Br(g) {
24722
24722
  function D2(g, x) {
24723
24723
  return g.chain === x.chain && g.addressString === x.addressString;
24724
24724
  }
24725
- const R2 = "insufficient_allowance", D6 = "swap_failed", R6 = "source_contract_paused", T6 = "destination_contract_paused", I6 = "unsupported_abi_version", Tu = "insufficient_gas", T2 = "insufficient_funds", I2 = "amount_too_large", k2 = "amount_too_small", N2 = "user_rejected", P2 = "user_timeout", O2 = "unknown", q2 = "relay_failed";
24726
- var U2 = /* @__PURE__ */ ((g) => (g.SelectSrcToken = "select.src.token", g.SelectSrcChain = "select.src.chain", g.SelectDestToken = "select.dest.token", g.SelectDestChain = "select.dest.chain", g))(U2 || {});
24727
- const L2 = {
24725
+ const R2 = "insufficient_allowance", T6 = "swap_failed", I6 = "source_contract_paused", k6 = "destination_contract_paused", N6 = "unsupported_abi_version", Tu = "insufficient_gas", T2 = "insufficient_funds", I2 = "amount_too_large", k2 = "amount_too_small", N2 = "user_rejected", P2 = "user_timeout", O2 = "unknown", q2 = "relay_failed", U2 = "slippage_exceeded";
24726
+ var L2 = /* @__PURE__ */ ((g) => (g.SelectSrcToken = "select.src.token", g.SelectSrcChain = "select.src.chain", g.SelectDestToken = "select.dest.token", g.SelectDestChain = "select.dest.chain", g))(L2 || {});
24727
+ const H2 = {
24728
24728
  Mainnet: {
24729
24729
  Arbitrum: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
24730
24730
  Avalanche: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",
@@ -24769,19 +24769,19 @@ const L2 = {
24769
24769
  Sonic: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38"
24770
24770
  },
24771
24771
  Devnet: {}
24772
- }, H2 = "So11111111111111111111111111111111111111112";
24772
+ }, z2 = "So11111111111111111111111111111111111111112";
24773
24773
  function fl(g, x) {
24774
24774
  const S = V0(x);
24775
24775
  if (S === "Evm")
24776
- return L2[g]?.[x];
24776
+ return H2[g]?.[x];
24777
24777
  if (S === "Solana")
24778
- return H2;
24778
+ return z2;
24779
24779
  if (S === "Aptos")
24780
24780
  return "0x1::aptos_coin::AptosCoin";
24781
24781
  if (S === "Sui")
24782
24782
  return "0x2::sui::SUI";
24783
24783
  }
24784
- function z2(g, x, S) {
24784
+ function K2(g, x, S) {
24785
24785
  if (!g)
24786
24786
  return !1;
24787
24787
  const c = g.address.toString(), E = S.address.toString();
@@ -24794,25 +24794,25 @@ function z2(g, x, S) {
24794
24794
  }
24795
24795
  return !1;
24796
24796
  }
24797
- function K2(g) {
24797
+ function W2(g) {
24798
24798
  return g.length === 22 ? g : `0x${g.slice(g.length - 40, g.length)}`;
24799
24799
  }
24800
24800
  function z0(g, x = 6) {
24801
24801
  return g.slice(0, x) + "..." + g.slice(g.length - 4, g.length);
24802
24802
  }
24803
- function k6(g, x = 6, S = 4) {
24803
+ function P6(g, x = 6, S = 4) {
24804
24804
  const c = g.slice(0, x), E = g.slice(g.length - S, g.length);
24805
24805
  return `${c}...${E}`;
24806
24806
  }
24807
- function N6(g, x) {
24808
- return g ? g === "Evm" ? z0(K2(x)) : g === "Solana" ? z0(x, 4) : z0(x) : "";
24807
+ function O6(g, x) {
24808
+ return g ? g === "Evm" ? z0(W2(x)) : g === "Solana" ? z0(x, 4) : z0(x) : "";
24809
24809
  }
24810
- function W2(g) {
24810
+ function j2(g) {
24811
24811
  const x = yt.tokens.getGasToken(g);
24812
24812
  if (!x) throw new Error(`gas token not found for ${g}`);
24813
24813
  return x;
24814
24814
  }
24815
- function j2(g) {
24815
+ function $2(g) {
24816
24816
  const x = yt.ui?.tokenNameOverrides?.[g.chain];
24817
24817
  if (!x)
24818
24818
  return g.display;
@@ -24822,7 +24822,7 @@ function j2(g) {
24822
24822
  return E;
24823
24823
  return g.display;
24824
24824
  }
24825
- function $2(g) {
24825
+ function G2(g) {
24826
24826
  const x = yt.chains[g];
24827
24827
  return x ? x.displayName : g;
24828
24828
  }
@@ -24837,7 +24837,7 @@ function Iu(g) {
24837
24837
  document.body.removeChild(x);
24838
24838
  }
24839
24839
  }
24840
- function P6(g) {
24840
+ function q6(g) {
24841
24841
  return navigator.clipboard && navigator.clipboard.writeText(g).then(
24842
24842
  function() {
24843
24843
  return !0;
@@ -24847,31 +24847,31 @@ function P6(g) {
24847
24847
  }
24848
24848
  ), Iu(g);
24849
24849
  }
24850
- function G2(g) {
24850
+ function V2(g) {
24851
24851
  return g.startsWith("0x") ? g : `0x${g}`;
24852
24852
  }
24853
- function O6(g, x) {
24854
- return g === "Sui" ? _l(x) : g === "Sei" ? Ku(G2(x), 32) : x.startsWith("0x") && x.length === 66 ? !0 : x.length > 70 && x.length < 100;
24853
+ function U6(g, x) {
24854
+ return g === "Sui" ? _l(x) : g === "Sei" ? Ku(V2(x), 32) : x.startsWith("0x") && x.length === 66 ? !0 : x.length > 70 && x.length < 100;
24855
24855
  }
24856
- function q6(g) {
24856
+ function L6(g) {
24857
24857
  const x = Rl(void 0);
24858
24858
  return Tl(() => {
24859
24859
  x.current = g;
24860
24860
  }), x.current;
24861
24861
  }
24862
- async function V2(g) {
24862
+ async function Z2(g) {
24863
24863
  return new Promise((x) => setTimeout(x, g));
24864
24864
  }
24865
- const Z2 = (g) => typeof g > "u" ? "" : g === 0 ? "$0" : g > 0 && g < 0.01 ? "<$0.01" : Intl.NumberFormat("en-EN", {
24865
+ const X2 = (g) => typeof g > "u" ? "" : g === 0 ? "$0" : g > 0 && g < 0.01 ? "<$0.01" : Intl.NumberFormat("en-EN", {
24866
24866
  style: "currency",
24867
24867
  currency: "USD"
24868
- }).format(g), X2 = (g, x, S) => {
24868
+ }).format(g), Y2 = (g, x, S) => {
24869
24869
  if (typeof x > "u" || !S)
24870
24870
  return;
24871
24871
  const c = typeof g == "function" ? g(S) : g;
24872
24872
  if (c)
24873
24873
  return typeof x == "number" ? x * c : Wu(x) * c;
24874
- }, U6 = (g, x, S) => Z2(X2(g, x, S)), L6 = (g) => {
24874
+ }, H6 = (g, x, S) => X2(Y2(g, x, S)), z6 = (g) => {
24875
24875
  if (g == null)
24876
24876
  return !0;
24877
24877
  for (const x in g)
@@ -24881,7 +24881,7 @@ const Z2 = (g) => typeof g > "u" ? "" : g === 0 ? "$0" : g > 0 && g < 0.01 ? "<$
24881
24881
  }, ur = (g, x) => {
24882
24882
  const S = new URL(g), c = S.pathname.replace(/\/+$/, ""), E = x.replace(/^\/+/, "");
24883
24883
  return S.pathname = `${c}/${E}`, S.toString();
24884
- }, H6 = (g, x) => {
24884
+ }, K6 = (g, x) => {
24885
24885
  const S = yt.chains[g];
24886
24886
  if (!S?.explorerUrl)
24887
24887
  return;
@@ -24901,19 +24901,19 @@ const Z2 = (g) => typeof g > "u" ? "" : g === 0 ? "$0" : g > 0 && g < 0.01 ? "<$
24901
24901
  default:
24902
24902
  return ur(c, `token/${x}`);
24903
24903
  }
24904
- }, z6 = (g, x) => {
24904
+ }, W6 = (g, x) => {
24905
24905
  const S = yt.chains[g];
24906
24906
  if (!S?.explorerUrl)
24907
24907
  return;
24908
24908
  const c = S.explorerUrl;
24909
24909
  return g === "Aptos" ? ur(c, `txn/${x}`) : ur(c, `tx/${x}`);
24910
- }, K6 = (g, x) => {
24910
+ }, j6 = (g, x) => {
24911
24911
  const S = yt.chains[g];
24912
24912
  if (!S?.explorerUrl)
24913
24913
  return;
24914
24914
  const c = S.explorerUrl;
24915
24915
  return g === "Aptos" ? ur(c, `account/${x}`) : ur(c, `address/${x}`);
24916
- }, Y2 = (g, x) => {
24916
+ }, J2 = (g, x) => {
24917
24917
  if (!g.isTokenBridgeWrappedToken)
24918
24918
  return !1;
24919
24919
  const { nativeChain: S, symbol: c } = g;
@@ -24935,7 +24935,7 @@ const Z2 = (g) => typeof g > "u" ? "" : g === 0 ? "$0" : g > 0 && g < 0.01 ? "<$
24935
24935
  }
24936
24936
  }
24937
24937
  return S !== "Ethereum" && ["ETH", "WETH", "wstETH", "USDT", "USDC", "USDC.e"].includes(c);
24938
- }, W6 = (g) => g >= 2 * 6e4 ? `${Math.ceil(g / 6e4)} min` : `${Math.ceil(g / 1e3)} sec`, j6 = (g) => {
24938
+ }, $6 = (g) => g >= 2 * 6e4 ? `${Math.ceil(g / 6e4)} min` : `${Math.ceil(g / 1e3)} sec`, G6 = (g) => {
24939
24939
  if (g > 864e5) {
24940
24940
  const E = Math.floor(g / 864e5);
24941
24941
  return `${E} ${E === 1 ? "day" : "days"} ago`;
@@ -24947,7 +24947,7 @@ const Z2 = (g) => typeof g > "u" ? "" : g === 0 ? "$0" : g > 0 && g < 0.01 ? "<$
24947
24947
  return `${E} ${E === 1 ? "minute" : "minutes"} ago`;
24948
24948
  } else
24949
24949
  return "1 minute ago";
24950
- }, $6 = (g) => {
24950
+ }, V6 = (g) => {
24951
24951
  if (g < 60)
24952
24952
  return g === 1 ? `${g} second` : `${g} seconds`;
24953
24953
  if (g < 3600) {
@@ -24957,40 +24957,42 @@ const Z2 = (g) => typeof g > "u" ? "" : g === 0 ? "$0" : g > 0 && g < 0.01 ? "<$
24957
24957
  const x = Math.floor(g / 3600);
24958
24958
  return x === 1 ? `${x} hour` : `${x} hours`;
24959
24959
  }
24960
- }, J2 = (g) => g ? g.endsWith("ExecutorRoute") : !1, G6 = (g) => JSON.stringify(
24960
+ }, Q2 = (g) => g ? g.endsWith("ExecutorRoute") : !1, Z6 = (g) => JSON.stringify(
24961
24961
  g,
24962
24962
  (x, S) => typeof S == "bigint" ? S.toString() : S
24963
- ), Q2 = /insufficient token allowance/im, e6 = /insufficient lamports.*?(\d+).*?(\d+)/im, t6 = /simulation failed:.*accountnotfound/i, r6 = new RegExp(
24963
+ ), e6 = /insufficient token allowance/im, t6 = /insufficient lamports.*?(\d+).*?(\d+)/im, r6 = /simulation failed:.*accountnotfound/i, i6 = new RegExp(
24964
24964
  "user rejected|rejected the request|rejected from user|user cancel|aborted by user|plugin closed|denied request signature|user denied|action_rejected|ethers-user-denied|approval denied",
24965
24965
  "mi"
24966
- ), i6 = new RegExp("AmountInTooSmall", "m"), n6 = /insufficient.*(gas|fee|lamports|rent|intrinsic|settlement)/gi, a6 = /insufficient (funds|balance)/gi, ku = "Insufficient gas for this transfer. Please add more gas and try again", f6 = "Insufficient funds for this transfer. Please add more funds and try again";
24967
- function or(g, x) {
24966
+ ), n6 = new RegExp("AmountInTooSmall", "m"), a6 = /Simulation failed:.*InstructionError.*Custom.*6001/, f6 = /insufficient.*(gas|fee|lamports|rent|intrinsic|settlement)/gi, o6 = /insufficient (funds|balance)/gi, ku = "Insufficient gas for this transfer. Please add more gas and try again", s6 = "Insufficient funds for this transfer. Please add more funds and try again";
24967
+ function tr(g, x) {
24968
24968
  return x.test(g?.message) || x.test(g?.info?.error?.message) || x.test(g?.info?.error?.data?.message);
24969
24969
  }
24970
- function V6(g, x) {
24970
+ function X6(g, x) {
24971
24971
  let S = "Error with transfer, please try again", c = O2;
24972
24972
  if (g.message) {
24973
24973
  if (g instanceof ml)
24974
24974
  S = g.message, c = q2;
24975
- else if (or(g, Q2))
24975
+ else if (x.route.includes("MayanSwapMONOCHAIN") && tr(g, a6))
24976
+ S = "Slippage exceeded. Please try again", c = U2;
24977
+ else if (tr(g, e6))
24976
24978
  S = "Error with transfer, please try again", c = R2;
24977
24979
  else if (g.name === "TransactionExpiredTimeoutError" || g.name === "TransactionExpiredBlockheightExceededError")
24978
24980
  S = "Transfer timed out, please try again", c = P2;
24979
- else if (or(g, n6))
24981
+ else if (tr(g, f6))
24980
24982
  S = ku, c = Tu;
24981
- else if (or(g, a6))
24982
- S = f6, c = T2;
24983
- else if (or(g, r6))
24983
+ else if (tr(g, o6))
24984
+ S = s6, c = T2;
24985
+ else if (tr(g, i6))
24984
24986
  S = "Wallet request declined. Transfer not started.", c = N2;
24985
- else if (or(g, i6))
24987
+ else if (tr(g, n6))
24986
24988
  S = "Amount is too small for the selected route", c = k2;
24987
24989
  else if (x.route.includes("CCTP") && /burn.*exceed/i.test(g?.toString())) {
24988
24990
  const { amount: i } = x;
24989
24991
  S = `Amount exceeds Circle limit${i !== void 0 && Wu(i) > 1e6 ? " of 10,000,000" : ""}. Please reduce transfer amount.`, c = I2;
24990
- } else if (or(g, t6) || or(g, e6)) {
24992
+ } else if (tr(g, r6) || tr(g, t6)) {
24991
24993
  const E = x.fromChain;
24992
24994
  try {
24993
- const i = W2(E), _ = j2(i), y = $2(E), m = y ? ` on ${y}` : "";
24995
+ const i = j2(E), _ = $2(i), y = G2(E), m = y ? ` on ${y}` : "";
24994
24996
  S = `Insufficient ${_} for fees${m}. Please add more ${_} and try again`;
24995
24997
  } catch {
24996
24998
  S = ku;
@@ -25000,11 +25002,11 @@ function V6(g, x) {
25000
25002
  }
25001
25003
  return [S, { type: c, original: g }];
25002
25004
  }
25003
- function o6(g, x) {
25005
+ function h6(g, x) {
25004
25006
  g instanceof Error && g.message.startsWith("No protocols registered for") || console.error(x ? `${x}: ${g}` : g);
25005
25007
  }
25006
25008
  var ei = { exports: {} }, Nu;
25007
- function s6() {
25009
+ function u6() {
25008
25010
  if (Nu) return ei.exports;
25009
25011
  Nu = 1;
25010
25012
  function g(v, p) {
@@ -25086,9 +25088,9 @@ function s6() {
25086
25088
  monadic: y
25087
25089
  }, ei.exports;
25088
25090
  }
25089
- var h6 = s6();
25090
- const u6 = /* @__PURE__ */ Cr(h6);
25091
- class c6 {
25091
+ var c6 = u6();
25092
+ const l6 = /* @__PURE__ */ Cr(c6);
25093
+ class d6 {
25092
25094
  constructor(x) {
25093
25095
  this.TTLms = x;
25094
25096
  }
@@ -25127,7 +25129,7 @@ const ol = [
25127
25129
  const S = x.rc.config;
25128
25130
  if (S)
25129
25131
  return g === "NttExecutorRoute" ? S.ntt?.tokens : S.tokens;
25130
- }, l6 = (g) => {
25132
+ }, v6 = (g) => {
25131
25133
  const x = Br(g);
25132
25134
  for (const S of ol) {
25133
25135
  const c = sl(S);
@@ -25141,7 +25143,7 @@ const ol = [
25141
25143
  }
25142
25144
  }
25143
25145
  return !1;
25144
- }, Z6 = (g) => {
25146
+ }, Y6 = (g) => {
25145
25147
  const x = [], S = Br(g);
25146
25148
  for (const c of ol) {
25147
25149
  const E = sl(c);
@@ -25177,7 +25179,7 @@ class hl {
25177
25179
  // TODO: remove this
25178
25180
  IS_TOKEN_BRIDGE_ROUTE = !1;
25179
25181
  IS_MONAD_BRIDGE_ROUTE = !1;
25180
- tokenCache = new c6(1440 * 60 * 1e3);
25182
+ tokenCache = new d6(1440 * 60 * 1e3);
25181
25183
  // 24 hour TTL
25182
25184
  get AUTOMATIC_DEPOSIT() {
25183
25185
  return this.rc.IS_AUTOMATIC;
@@ -25231,7 +25233,7 @@ class hl {
25231
25233
  ), v = y ? fl(yt.network, i.chain)?.toLowerCase() : void 0;
25232
25234
  return d.filter((w) => {
25233
25235
  const M = yt.tokens.get(w);
25234
- return M && Y2(M, i.chain) ? !1 : y ? !z2(x, v, w) : !0;
25236
+ return M && J2(M, i.chain) ? !1 : y ? !K2(x, v, w) : !0;
25235
25237
  });
25236
25238
  }
25237
25239
  async getQuote(x, S, c, E, i, _, y, m) {
@@ -25298,7 +25300,7 @@ class hl {
25298
25300
  p
25299
25301
  );
25300
25302
  const w = v * Math.pow(2, h);
25301
- await V2(w), h++;
25303
+ await Z2(w), h++;
25302
25304
  }
25303
25305
  throw new Error("Never got a SourceInitiated state in receipt");
25304
25306
  }
@@ -25313,7 +25315,7 @@ class hl {
25313
25315
  if (this.IS_MONAD_BRIDGE_ROUTE && x?.isTokenBridgeWrappedToken)
25314
25316
  return !0;
25315
25317
  if (this.IS_TOKEN_BRIDGE_ROUTE) {
25316
- if (l6(x))
25318
+ if (v6(x))
25317
25319
  return !0;
25318
25320
  const { symbol: E, nativeChain: i } = x;
25319
25321
  if (["ETH", "WETH"].includes(E) && i === "Ethereum" && ["Scroll", "Xlayer", "Mantle", "Unichain"].includes(
@@ -25324,7 +25326,7 @@ class hl {
25324
25326
  return !1;
25325
25327
  }
25326
25328
  }
25327
- function d6(g, x, S = 6) {
25329
+ function p6(g, x, S = 6) {
25328
25330
  if (x <= S)
25329
25331
  return g;
25330
25332
  const c = 10n ** BigInt(x - S), E = g % c;
@@ -25332,9 +25334,9 @@ function d6(g, x, S = 6) {
25332
25334
  }
25333
25335
  function Pu(g, x, S) {
25334
25336
  let c = vr(g) * x / (S - x);
25335
- return c = d6(c, g.decimals), ju(c, g.decimals);
25337
+ return c = p6(c, g.decimals), ju(c, g.decimals);
25336
25338
  }
25337
- function v6(g, x, S, c) {
25339
+ function b6(g, x, S, c) {
25338
25340
  if (!S || !x || !g || vr(x) === 0n || S.chain === c?.chain)
25339
25341
  return;
25340
25342
  let i;
@@ -25375,7 +25377,7 @@ function v6(g, x, S, c) {
25375
25377
  if (!_)
25376
25378
  return;
25377
25379
  let y = 0n;
25378
- if (J2(i.rc.meta.name)) {
25380
+ if (Q2(i.rc.meta.name)) {
25379
25381
  if (_.referrerFeeDbps !== void 0)
25380
25382
  y = _.referrerFeeDbps;
25381
25383
  else if (_.referrerFee?.feeDbps !== void 0)
@@ -25394,7 +25396,7 @@ function v6(g, x, S, c) {
25394
25396
  if (y !== 0n)
25395
25397
  return Pu(x, y, 100000n);
25396
25398
  }
25397
- const X6 = (g, x) => {
25399
+ const J6 = (g, x) => {
25398
25400
  let S = { name: "", eta: 1 / 0 }, c = { name: "", amountOut: 0n };
25399
25401
  for (const E of g) {
25400
25402
  const i = x[E];
@@ -25410,22 +25412,22 @@ const X6 = (g, x) => {
25410
25412
  function ul(g) {
25411
25413
  return new Date(g + 3e4);
25412
25414
  }
25413
- function p6(g) {
25415
+ function m6(g) {
25414
25416
  const x = Date.now();
25415
25417
  return g instanceof Date && g.getTime() > x + 5e3 ? g : ul(x);
25416
25418
  }
25417
- const b6 = [
25419
+ const y6 = [
25418
25420
  Al,
25419
25421
  Sl,
25420
25422
  Fl,
25421
25423
  Bl,
25422
25424
  Cl
25423
25425
  ];
25424
- class m6 {
25426
+ class g6 {
25425
25427
  preference;
25426
25428
  routes;
25427
25429
  quoteMetadataCache;
25428
- constructor(x = b6) {
25430
+ constructor(x = y6) {
25429
25431
  const S = {}, c = [];
25430
25432
  for (const E of x) {
25431
25433
  const i = E.meta.name;
@@ -25435,7 +25437,7 @@ class m6 {
25435
25437
  throw new Error(`Route has duplicate meta.name: ${i}`);
25436
25438
  c.push(i), S[i] = new hl(E);
25437
25439
  }
25438
- this.routes = S, this.preference = c, this.quoteMetadataCache = new y6();
25440
+ this.routes = S, this.preference = c, this.quoteMetadataCache = new x6();
25439
25441
  }
25440
25442
  get(x) {
25441
25443
  return this.routes[x];
@@ -25480,7 +25482,7 @@ class m6 {
25480
25482
  Lu(m) ? E.set(h, m) : E.set(h, al(h));
25481
25483
  }
25482
25484
  } catch (y) {
25483
- o6(y);
25485
+ h6(y);
25484
25486
  }
25485
25487
  }), [...E.values()];
25486
25488
  }
@@ -25504,7 +25506,7 @@ class m6 {
25504
25506
  }
25505
25507
  return E;
25506
25508
  }
25507
- isSameChainSwapSupported = u6((x) => Object.values(this.routes).some((c) => {
25509
+ isSameChainSwapSupported = l6((x) => Object.values(this.routes).some((c) => {
25508
25510
  const { supportsSameChainSwaps: E, supportedChains: i } = c.rc;
25509
25511
  return typeof E == "function" && E(yt.network, x) && i(yt.network).includes(x);
25510
25512
  }));
@@ -25532,7 +25534,7 @@ class m6 {
25532
25534
  )), v.send(w, i, _, m);
25533
25535
  }
25534
25536
  }
25535
- class y6 {
25537
+ class x6 {
25536
25538
  cache;
25537
25539
  pending;
25538
25540
  constructor() {
@@ -25560,7 +25562,7 @@ class y6 {
25560
25562
  });
25561
25563
  let _ = S.amount;
25562
25564
  if (yt.ui?.experimental?.feeOffsetting) {
25563
- const y = v6(
25565
+ const y = b6(
25564
25566
  c,
25565
25567
  S.amount,
25566
25568
  S.sourceToken,
@@ -25589,7 +25591,7 @@ class y6 {
25589
25591
  const d = this.pending[E];
25590
25592
  for (const { resolve: v } of d)
25591
25593
  v(m);
25592
- delete this.pending[E], m.success && (m.expires = p6(m.expires)), this.cache[E] = new Ou(m, y, h);
25594
+ delete this.pending[E], m.success && (m.expires = m6(m.expires)), this.cache[E] = new Ou(m, y, h);
25593
25595
  }).catch((y) => {
25594
25596
  console.debug("\x1B[31mFailed to fetch quote using", x, y);
25595
25597
  const m = this.pending[E];
@@ -25707,7 +25709,7 @@ function cl(g = {}) {
25707
25709
  }),
25708
25710
  tokens: i,
25709
25711
  tokenWhitelist: g.tokens,
25710
- routes: new m6(g.routes),
25712
+ routes: new g6(g.routes),
25711
25713
  // UI details
25712
25714
  ui: K0({ ...g.ui }),
25713
25715
  // Used to namespace localStorage caches
@@ -25720,12 +25722,12 @@ function cl(g = {}) {
25720
25722
  }
25721
25723
  const yt = cl();
25722
25724
  async function Er() {
25723
- return yt._v2Wormhole || (yt._v2Wormhole = await x6()), yt._v2Wormhole;
25725
+ return yt._v2Wormhole || (yt._v2Wormhole = await M6()), yt._v2Wormhole;
25724
25726
  }
25725
- async function g6() {
25727
+ async function w6() {
25726
25728
  delete yt._v2Wormhole;
25727
25729
  }
25728
- async function x6() {
25730
+ async function M6() {
25729
25731
  const g = { chains: {} };
25730
25732
  for (const x in yt.chains) {
25731
25733
  const S = x, c = yt.rpcs[S], E = {};
@@ -25747,44 +25749,44 @@ async function x6() {
25747
25749
  g
25748
25750
  );
25749
25751
  }
25750
- function Y6(g = {}) {
25752
+ function Q6(g = {}) {
25751
25753
  const x = cl(g);
25752
- g6();
25754
+ w6();
25753
25755
  for (const S in x)
25754
25756
  yt[S] = x[S];
25755
25757
  typeof window < "u" && (window._connectConfig = yt);
25756
25758
  }
25757
25759
  export {
25758
- T6 as $,
25759
- z2 as A,
25760
- Z2 as B,
25761
- v6 as C,
25762
- U6 as D,
25760
+ k6 as $,
25761
+ K2 as A,
25762
+ X2 as B,
25763
+ b6 as C,
25764
+ H6 as D,
25763
25765
  N2 as E,
25764
- W6 as F,
25765
- $6 as G,
25766
- X6 as H,
25767
- W2 as I,
25768
- j6 as J,
25769
- z6 as K,
25770
- k6 as L,
25766
+ $6 as F,
25767
+ V6 as G,
25768
+ J6 as H,
25769
+ j2 as I,
25770
+ G6 as J,
25771
+ W6 as K,
25772
+ P6 as L,
25771
25773
  z0 as M,
25772
- K6 as N,
25773
- Y6 as O,
25774
- q6 as P,
25774
+ j6 as N,
25775
+ Q6 as O,
25776
+ L6 as P,
25775
25777
  _d as Q,
25776
25778
  r1 as R,
25777
25779
  cl as S,
25778
25780
  bi as T,
25779
- U2 as U,
25781
+ L2 as U,
25780
25782
  hr as V,
25781
- b6 as W,
25782
- B6 as X,
25783
+ y6 as W,
25784
+ D6 as X,
25783
25785
  R2 as Y,
25784
- D6 as Z,
25785
- R6 as _,
25786
+ T6 as Z,
25787
+ I6 as _,
25786
25788
  fl as a,
25787
- I6 as a0,
25789
+ N6 as a0,
25788
25790
  Tu as a1,
25789
25791
  T2 as a2,
25790
25792
  I2 as a3,
@@ -25792,54 +25794,55 @@ export {
25792
25794
  P2 as a5,
25793
25795
  O2 as a6,
25794
25796
  q2 as a7,
25795
- u6 as a8,
25796
- Y0 as a9,
25797
- Dr as aa,
25798
- Rr as ab,
25799
- Zu as ac,
25800
- lt as ad,
25801
- Fr as ae,
25802
- Tr as af,
25803
- sc as ag,
25804
- hc as ah,
25805
- V1 as ai,
25806
- Ir as aj,
25807
- q1 as ak,
25808
- oc as al,
25809
- X1 as am,
25810
- Z1 as an,
25811
- ic as ao,
25812
- tc as ap,
25813
- G1 as aq,
25814
- K1 as ar,
25815
- W1 as as,
25816
- lf as at,
25817
- Vp as au,
25818
- Gc as av,
25819
- L2 as aw,
25820
- g6 as b,
25797
+ U2 as a8,
25798
+ l6 as a9,
25799
+ Y0 as aa,
25800
+ Dr as ab,
25801
+ Rr as ac,
25802
+ Zu as ad,
25803
+ lt as ae,
25804
+ Fr as af,
25805
+ Tr as ag,
25806
+ sc as ah,
25807
+ hc as ai,
25808
+ V1 as aj,
25809
+ Ir as ak,
25810
+ q1 as al,
25811
+ oc as am,
25812
+ X1 as an,
25813
+ Z1 as ao,
25814
+ ic as ap,
25815
+ tc as aq,
25816
+ G1 as ar,
25817
+ K1 as as,
25818
+ W1 as at,
25819
+ lf as au,
25820
+ Vp as av,
25821
+ Gc as aw,
25822
+ H2 as ax,
25823
+ w6 as b,
25821
25824
  yt as c,
25822
- l6 as d,
25823
- Z6 as e,
25824
- C6 as f,
25825
+ v6 as d,
25826
+ Y6 as e,
25827
+ R6 as f,
25825
25828
  Er as g,
25826
- O6 as h,
25827
- J2 as i,
25828
- X2 as j,
25829
- L6 as k,
25830
- V6 as l,
25831
- o6 as m,
25832
- V2 as n,
25833
- Y2 as o,
25829
+ U6 as h,
25830
+ Q2 as i,
25831
+ Y2 as j,
25832
+ z6 as k,
25833
+ X6 as l,
25834
+ h6 as m,
25835
+ Z2 as n,
25836
+ J2 as o,
25834
25837
  D2 as p,
25835
25838
  rl as q,
25836
25839
  nl as r,
25837
- G6 as s,
25840
+ Z6 as s,
25838
25841
  vf as t,
25839
- N6 as u,
25840
- P6 as v,
25842
+ O6 as u,
25843
+ q6 as v,
25841
25844
  ge as w,
25842
- H6 as x,
25843
- j2 as y,
25844
- $2 as z
25845
+ K6 as x,
25846
+ $2 as y,
25847
+ G2 as z
25845
25848
  };