@blockend/widget 1.0.61-beta.6 → 1.0.62

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 (113) hide show
  1. package/dist/{AllRoutes-Cxr3Nkrq.js → AllRoutes-pT_GYhLz.js} +198 -201
  2. package/dist/{Box-PCm99lPs.js → Box-CMXImt80.js} +1 -1
  3. package/dist/{EstGas-DAqnmtXg.js → EstGas-BEwQc47B.js} +802 -922
  4. package/dist/{Grow-PUq8zLdG.js → Grow-CYJk-72r.js} +192 -196
  5. package/dist/{InputComp-Cpbiu4nw.js → InputComp-B0QgFbsj.js} +3 -3
  6. package/dist/{LoadRoute-DMvruPxQ.js → LoadRoute-I--KmXYZ.js} +4 -4
  7. package/dist/{QuotesProgress-B8gCi4mg.js → QuotesProgress-Ct53CRUU.js} +1 -1
  8. package/dist/{SwapAsset-LXjTHOyg.js → SwapAsset-X7gAsFxL.js} +1 -1
  9. package/dist/{Tooltip-BBzQ_Niy.js → Tooltip-CsxhxDbM.js} +6 -9
  10. package/dist/{TxnButton-CzynEgC-.js → TxnButton-BZf2lfxu.js} +62 -65
  11. package/dist/{add-Dy5-Nff0.js → add-fqHpy_n_.js} +1 -1
  12. package/dist/{all-wallets-jwMVTU0s.js → all-wallets-BEiHad26.js} +1 -1
  13. package/dist/{app-store-DEcg75wd.js → app-store-BUrtll4M.js} +1 -1
  14. package/dist/{apple-C3gcxaZN.js → apple-DeP0r4ax.js} +1 -1
  15. package/dist/{arrow-bottom-Dz-dufK1.js → arrow-bottom-DOUsYrpS.js} +1 -1
  16. package/dist/{arrow-bottom-circle-CbmTfpof.js → arrow-bottom-circle-3zt0oM9l.js} +1 -1
  17. package/dist/{arrow-left-MSV3EbO3.js → arrow-left-CZi8gizN.js} +1 -1
  18. package/dist/{arrow-right-BIh4_fkF.js → arrow-right-Bp2k-sRU.js} +1 -1
  19. package/dist/{arrow-top-BKC3U-ao.js → arrow-top-Bdu-g3eb.js} +1 -1
  20. package/dist/{bank-DBtyASC7.js → bank-UM_6-xYg.js} +1 -1
  21. package/dist/{basic-BgV8RQ-A.js → basic-CfaJcj31.js} +4 -4
  22. package/dist/{browser-DC9IClot.js → browser-DE4dHUIn.js} +1 -1
  23. package/dist/{card-BT6koHhk.js → card-CpV_uFyN.js} +1 -1
  24. package/dist/{ccip-3LoUUUH-.js → ccip-CA2a9SDo.js} +1 -1
  25. package/dist/{checkmark-DSeqDz_Y.js → checkmark-CK8NZa3x.js} +1 -1
  26. package/dist/{checkmark-bold-BIkQqCzJ.js → checkmark-bold-DgI_WWpK.js} +1 -1
  27. package/dist/{chevron-bottom-CBXmsDV5.js → chevron-bottom-C_3_Lg-x.js} +1 -1
  28. package/dist/{chevron-left-DhVqX1hi.js → chevron-left-Dn-8RUKj.js} +1 -1
  29. package/dist/{chevron-right-B3rsG14_.js → chevron-right-BrzGCKbe.js} +1 -1
  30. package/dist/{chevron-top-BEjzOADe.js → chevron-top-DH4uxqMd.js} +1 -1
  31. package/dist/{chrome-store-DRLnmUBT.js → chrome-store-C6ftVKRM.js} +1 -1
  32. package/dist/{clock-eV75Aej3.js → clock-BMAqcMX9.js} +1 -1
  33. package/dist/{close-zdZMwNem.js → close-B99wQvJ_.js} +1 -1
  34. package/dist/{coinPlaceholder-CDI_BOjw.js → coinPlaceholder-DmuYNsmb.js} +1 -1
  35. package/dist/{compass-VmDWLUk0.js → compass-C4wdl146.js} +1 -1
  36. package/dist/{copy-BPf4wDQR.js → copy-DMJQyfJj.js} +1 -1
  37. package/dist/{core-FKJijvR4.js → core-v6ho39ji.js} +324 -390
  38. package/dist/{cursor-DyqcSARn.js → cursor-C-0knOkC.js} +1 -1
  39. package/dist/{cursor-transparent-BYUs3PjC.js → cursor-transparent-BLuqOo6k.js} +1 -1
  40. package/dist/{desktop-ajSWZf14.js → desktop-DpJrO84H.js} +1 -1
  41. package/dist/{disconnect-CesQDkW7.js → disconnect-k6w6zlk-.js} +1 -1
  42. package/dist/{discord-DRpBdD6a.js → discord-DLgkGibC.js} +1 -1
  43. package/dist/{down-BvpSLqv4.js → down-C4N-wh2D.js} +3 -4
  44. package/dist/{etherscan-T2x0uGqy.js → etherscan-DJTxjIAP.js} +1 -1
  45. package/dist/{exclamation-triangle-jiEvqZCt.js → exclamation-triangle-B1YdY5CX.js} +1 -1
  46. package/dist/{extension-VNmHHnl3.js → extension-CnhByDAh.js} +1 -1
  47. package/dist/{external-link-C1cNXEY_.js → external-link-CZmI3Q92.js} +1 -1
  48. package/dist/{facebook-BMo02i5k.js → facebook-CRHPGcBq.js} +1 -1
  49. package/dist/{farcaster-DGe5MIGO.js → farcaster-BYs6AvgJ.js} +1 -1
  50. package/dist/{filters-CUJYlRnZ.js → filters-BqJFiFCl.js} +1 -1
  51. package/dist/{getChainIds-D11guRHs.js → getChainIds-CPQkM2Fw.js} +4 -6
  52. package/dist/{getCosmosAddress-DgfHG7Hd.js → getCosmosAddress-CrzIqoe8.js} +2304 -2370
  53. package/dist/{github-Cs2pYb7C.js → github-WI_fsQyX.js} +1 -1
  54. package/dist/{google-DHT6lJFv.js → google-PDPeuX25.js} +1 -1
  55. package/dist/{hamburger-Yws20Vz4.js → hamburger-JHCSR4wq.js} +427 -436
  56. package/dist/{help-circle-DgP-m-Uz.js → help-circle-CC1LutMp.js} +1 -1
  57. package/dist/{id-B_EdR-1o.js → id-Dg4qm85K.js} +1 -1
  58. package/dist/{image-Cj7amYSJ.js → image-DvH3pCRi.js} +1 -1
  59. package/dist/{index-HFb_3Q0W.js → index-4DGqOb0b.js} +1 -1
  60. package/dist/{index-CWhe50Ec.js → index-BAjx9Sij.js} +451 -451
  61. package/dist/{index-D2IU_xeZ.js → index-BII8gr4h.js} +1134 -1151
  62. package/dist/{index-SFtx8RRR.js → index-Bl06WOfD.js} +14 -19
  63. package/dist/{index-BxH9oOBu.js → index-BrgwPS_u.js} +21 -32
  64. package/dist/{index-BXD_AzIx.js → index-ByNEeX9y.js} +1 -1
  65. package/dist/{index-BMBfrbLJ.js → index-CBMjkxpP.js} +5034 -5110
  66. package/dist/{index-BLrg6aM7.js → index-D8oYLVSL.js} +2 -2
  67. package/dist/{index-Bl2UpALc.js → index-DTish3yr.js} +1 -3
  68. package/dist/{index-mhA4TOGx.js → index-DbOqrlxW.js} +4 -4
  69. package/dist/{index-tEVjSKpt.js → index-Mqg8CWuX.js} +18 -32
  70. package/dist/{index-_c95MH6R.js → index-qIeZpXcg.js} +78 -78
  71. package/dist/{index.es-Cf2P8B_E.js → index.es-DV8y1ve_.js} +958 -978
  72. package/dist/{index.es-svtwMaZq.js → index.es-DkTmjrB8.js} +1 -1
  73. package/dist/index.es.js +1 -1
  74. package/dist/{info-Cp9JCjqN.js → info-Cjmzqm5P.js} +1 -1
  75. package/dist/{info-circle-DRaVj-ap.js → info-circle-Dimf4UPG.js} +1 -1
  76. package/dist/{lightbulb-CsW2vktv.js → lightbulb-BsZjMPbK.js} +1 -1
  77. package/dist/{mail-CWnCoK8z.js → mail-KNgNgUMG.js} +1 -1
  78. package/dist/{mobile-CA14tPHx.js → mobile-hJMru58F.js} +1 -1
  79. package/dist/{more-QAxcbEKq.js → more-B1Hz9ISJ.js} +1 -1
  80. package/dist/{network-placeholder-TIBJyj_I.js → network-placeholder-Ba37-PVe.js} +1 -1
  81. package/dist/{nftPlaceholder-CjKZ96cX.js → nftPlaceholder-Br6ZCUyX.js} +1 -1
  82. package/dist/{off-pDtmSFmO.js → off-DZv0f5qk.js} +1 -1
  83. package/dist/{play-store-CSc6NscT.js → play-store-PVT99oFp.js} +1 -1
  84. package/dist/{plus-C_Utdahs.js → plus-0JhMk1yC.js} +1 -1
  85. package/dist/{qr-code-DyK3HPLw.js → qr-code-CYMnN7H6.js} +1 -1
  86. package/dist/{recycle-horizontal-B2PCZE0j.js → recycle-horizontal-BODX35XL.js} +1 -1
  87. package/dist/{refresh-DCyPlTQE.js → refresh-KT2nzf4V.js} +1 -1
  88. package/dist/{reown-logo-BZtSC222.js → reown-logo-x-a1ehju.js} +1 -1
  89. package/dist/{search-zmw8hnGf.js → search-floOYVWE.js} +1 -1
  90. package/dist/{send-qpVD_BnX.js → send-rBEZNvkT.js} +1 -1
  91. package/dist/{swapHorizontal-DeiTZysc.js → swapHorizontal-FpW50anF.js} +1 -1
  92. package/dist/{swapHorizontalBold-DxXPoYvj.js → swapHorizontalBold-DJo2s6QM.js} +1 -1
  93. package/dist/{swapHorizontalMedium-Bk5t746S.js → swapHorizontalMedium-AdMIxAQ-.js} +1 -1
  94. package/dist/{swapHorizontalRoundedBold-BKNTjAMS.js → swapHorizontalRoundedBold-DB7VaS-l.js} +1 -1
  95. package/dist/{swapVertical-BgErJn7M.js → swapVertical-CStjk8mq.js} +1 -1
  96. package/dist/{telegram-DLZsj0GL.js → telegram-B7o9hZwP.js} +1 -1
  97. package/dist/{three-dots-C639cevE.js → three-dots-DogTUFsH.js} +1 -1
  98. package/dist/{twitch-BjX2MWAc.js → twitch-B_TRhhNU.js} +1 -1
  99. package/dist/{twitterIcon-_EGscQMD.js → twitterIcon-ujuPKvRN.js} +1 -1
  100. package/dist/{unsupportedProp-qsTU86qU.js → unsupportedProp-BC6azYXA.js} +1 -1
  101. package/dist/useRegisterError-DMILz6N1.js +8918 -0
  102. package/dist/{verify-B9nCXXUk.js → verify-BRWSwLhn.js} +1 -1
  103. package/dist/{verify-filled-Cfe5su-B.js → verify-filled-z7UoRJXn.js} +1 -1
  104. package/dist/{w3m-modal-pIdI-nLd.js → w3m-modal-CuXPdser.js} +2 -2
  105. package/dist/{wallet-BLNq3D4p.js → wallet-BMFvv3DF.js} +1 -1
  106. package/dist/{wallet-placeholder-DNL9SHUB.js → wallet-placeholder-DFg6CZXP.js} +1 -1
  107. package/dist/{walletconnect-B8OExIGD.js → walletconnect-WSdSSZfM.js} +1 -1
  108. package/dist/{warning-circle-CbRvsp3p.js → warning-circle-BDW9xnhM.js} +1 -1
  109. package/dist/widget.css +1 -1
  110. package/dist/{x-Booefzx8.js → x-DUDktTjC.js} +1 -1
  111. package/package.json +1 -1
  112. package/dist/AdvancedSettings-D7odvw7r.js +0 -47
  113. package/dist/useRegisterError-B1CjkI-p.js +0 -8923
@@ -1,6 +1,6 @@
1
- import { B as ot } from "./index-Bl2UpALc.js";
2
- import { I as bi, t as at, g as ne, c as F, a as xt, C as dp, f as At, d as pp, b as Hi, s as wa, e as ih, h as mr, k as fn, A as nh, E as ft, i as fp, j as gp, y as Ut, l as sr, r as vi, O as oc, o as Wt, m as mp, n as ac, p as cc, q as ao, N as lc, P as Tc, Q as wp, u as yp, v as bp, w as $c, x as Gr, z as oh, B as ms, D as as, F as ah, G as As, H as ts } from "./index.es-Cf2P8B_E.js";
3
- import { p as Ee } from "./index-BMBfrbLJ.js";
1
+ import { B as ot } from "./index-DTish3yr.js";
2
+ import { I as bi, t as at, g as ne, c as F, a as xt, C as dp, f as At, d as pp, b as Wi, s as wa, e as ih, h as mr, k as fn, A as nh, E as ft, i as fp, j as gp, y as Ut, l as sr, r as vi, O as oc, o as Ht, m as mp, n as ac, p as cc, q as ao, N as lc, P as Tc, Q as wp, u as yp, v as bp, w as $c, x as Gr, z as oh, B as ms, D as as, F as ah, G as As, H as ts } from "./index.es-DV8y1ve_.js";
3
+ import { p as Ee } from "./index-CBMjkxpP.js";
4
4
  import { formatUnits as vp, recoverAddress as Ep, fallback as kc, http as Sn, toHex as xc } from "viem";
5
5
  const K = {
6
6
  WC_NAME_SUFFIX: ".reown.id",
@@ -712,7 +712,6 @@ function Re(t = {}) {
712
712
  }
713
713
  function ct(t, e, s) {
714
714
  const r = xs.get(t);
715
- (Xn ? "production" : void 0) !== "production" && !r && console.warn("Please use proxy object");
716
715
  let i;
717
716
  const n = [], o = r[3];
718
717
  let a = !1;
@@ -726,9 +725,7 @@ function ct(t, e, s) {
726
725
  };
727
726
  }
728
727
  function sn(t, e) {
729
- const s = xs.get(t);
730
- (Xn ? "production" : void 0) !== "production" && !s && console.warn("Please use proxy object");
731
- const [r, i, n] = s;
728
+ const s = xs.get(t), [r, i, n] = s;
732
729
  return n(r, i(), e);
733
730
  }
734
731
  function ur(t) {
@@ -917,7 +914,6 @@ const hh = [
917
914
  try {
918
915
  se.setItem(re.DEEPLINK_CHOICE, JSON.stringify({ href: e, name: t }));
919
916
  } catch {
920
- console.info("Unable to set WalletConnect deep link");
921
917
  }
922
918
  },
923
919
  getWalletConnectDeepLink() {
@@ -926,35 +922,30 @@ const hh = [
926
922
  if (t)
927
923
  return JSON.parse(t);
928
924
  } catch {
929
- console.info("Unable to get WalletConnect deep link");
930
925
  }
931
926
  },
932
927
  deleteWalletConnectDeepLink() {
933
928
  try {
934
929
  se.removeItem(re.DEEPLINK_CHOICE);
935
930
  } catch {
936
- console.info("Unable to delete WalletConnect deep link");
937
931
  }
938
932
  },
939
933
  setActiveNamespace(t) {
940
934
  try {
941
935
  se.setItem(re.ACTIVE_NAMESPACE, t);
942
936
  } catch {
943
- console.info("Unable to set active namespace");
944
937
  }
945
938
  },
946
939
  setActiveCaipNetworkId(t) {
947
940
  try {
948
941
  se.setItem(re.ACTIVE_CAIP_NETWORK_ID, t), z.setActiveNamespace(t.split(":")[0]);
949
942
  } catch {
950
- console.info("Unable to set active caip network id");
951
943
  }
952
944
  },
953
945
  getActiveCaipNetworkId() {
954
946
  try {
955
947
  return se.getItem(re.ACTIVE_CAIP_NETWORK_ID);
956
948
  } catch {
957
- console.info("Unable to get active caip network id");
958
949
  return;
959
950
  }
960
951
  },
@@ -962,7 +953,6 @@ const hh = [
962
953
  try {
963
954
  se.removeItem(re.ACTIVE_CAIP_NETWORK_ID);
964
955
  } catch {
965
- console.info("Unable to delete active caip network id");
966
956
  }
967
957
  },
968
958
  deleteConnectedConnectorId(t) {
@@ -970,7 +960,6 @@ const hh = [
970
960
  const e = _o(t);
971
961
  se.removeItem(e);
972
962
  } catch {
973
- console.info("Unable to delete connected connector id");
974
963
  }
975
964
  },
976
965
  setAppKitRecent(t) {
@@ -978,7 +967,6 @@ const hh = [
978
967
  const e = z.getRecentWallets();
979
968
  e.find((r) => r.id === t.id) || (e.unshift(t), e.length > 2 && e.pop(), se.setItem(re.RECENT_WALLETS, JSON.stringify(e)));
980
969
  } catch {
981
- console.info("Unable to set AppKit recent");
982
970
  }
983
971
  },
984
972
  getRecentWallets() {
@@ -986,7 +974,6 @@ const hh = [
986
974
  const t = se.getItem(re.RECENT_WALLETS);
987
975
  return t ? JSON.parse(t) : [];
988
976
  } catch {
989
- console.info("Unable to get AppKit recent");
990
977
  }
991
978
  return [];
992
979
  },
@@ -995,14 +982,12 @@ const hh = [
995
982
  const s = _o(t);
996
983
  se.setItem(s, e);
997
984
  } catch {
998
- console.info("Unable to set Connected Connector Id");
999
985
  }
1000
986
  },
1001
987
  getActiveNamespace() {
1002
988
  try {
1003
989
  return se.getItem(re.ACTIVE_NAMESPACE);
1004
990
  } catch {
1005
- console.info("Unable to get active namespace");
1006
991
  }
1007
992
  },
1008
993
  getConnectedConnectorId(t) {
@@ -1011,35 +996,30 @@ const hh = [
1011
996
  const e = _o(t);
1012
997
  return se.getItem(e);
1013
998
  } catch {
1014
- console.info("Unable to get connected connector id in namespace ", t);
1015
999
  }
1016
1000
  },
1017
1001
  setConnectedSocialProvider(t) {
1018
1002
  try {
1019
1003
  se.setItem(re.CONNECTED_SOCIAL, t);
1020
1004
  } catch {
1021
- console.info("Unable to set connected social provider");
1022
1005
  }
1023
1006
  },
1024
1007
  getConnectedSocialProvider() {
1025
1008
  try {
1026
1009
  return se.getItem(re.CONNECTED_SOCIAL);
1027
1010
  } catch {
1028
- console.info("Unable to get connected social provider");
1029
1011
  }
1030
1012
  },
1031
1013
  deleteConnectedSocialProvider() {
1032
1014
  try {
1033
1015
  se.removeItem(re.CONNECTED_SOCIAL);
1034
1016
  } catch {
1035
- console.info("Unable to delete connected social provider");
1036
1017
  }
1037
1018
  },
1038
1019
  getConnectedSocialUsername() {
1039
1020
  try {
1040
1021
  return se.getItem(re.CONNECTED_SOCIAL_USERNAME);
1041
1022
  } catch {
1042
- console.info("Unable to get connected social username");
1043
1023
  }
1044
1024
  },
1045
1025
  getStoredActiveCaipNetworkId() {
@@ -1051,7 +1031,6 @@ const hh = [
1051
1031
  try {
1052
1032
  se.setItem(re.CONNECTION_STATUS, t);
1053
1033
  } catch {
1054
- console.info("Unable to set connection status");
1055
1034
  }
1056
1035
  },
1057
1036
  getConnectionStatus() {
@@ -1074,7 +1053,6 @@ const hh = [
1074
1053
  const e = Array.from(new Set(t));
1075
1054
  se.setItem(re.CONNECTED_NAMESPACES, e.join(","));
1076
1055
  } catch {
1077
- console.info("Unable to set namespaces in storage");
1078
1056
  }
1079
1057
  },
1080
1058
  addConnectedNamespace(t) {
@@ -1082,7 +1060,6 @@ const hh = [
1082
1060
  const e = z.getConnectedNamespaces();
1083
1061
  e.includes(t) || (e.push(t), z.setConnectedNamespaces(e));
1084
1062
  } catch {
1085
- console.info("Unable to add connected namespace");
1086
1063
  }
1087
1064
  },
1088
1065
  removeConnectedNamespace(t) {
@@ -1090,28 +1067,25 @@ const hh = [
1090
1067
  const e = z.getConnectedNamespaces(), s = e.indexOf(t);
1091
1068
  s > -1 && (e.splice(s, 1), z.setConnectedNamespaces(e));
1092
1069
  } catch {
1093
- console.info("Unable to remove connected namespace");
1094
1070
  }
1095
1071
  },
1096
1072
  getTelegramSocialProvider() {
1097
1073
  try {
1098
1074
  return se.getItem(re.TELEGRAM_SOCIAL_PROVIDER);
1099
1075
  } catch {
1100
- return console.info("Unable to get telegram social provider"), null;
1076
+ return null;
1101
1077
  }
1102
1078
  },
1103
1079
  setTelegramSocialProvider(t) {
1104
1080
  try {
1105
1081
  se.setItem(re.TELEGRAM_SOCIAL_PROVIDER, t);
1106
1082
  } catch {
1107
- console.info("Unable to set telegram social provider");
1108
1083
  }
1109
1084
  },
1110
1085
  removeTelegramSocialProvider() {
1111
1086
  try {
1112
1087
  se.removeItem(re.TELEGRAM_SOCIAL_PROVIDER);
1113
1088
  } catch {
1114
- console.info("Unable to remove telegram social provider");
1115
1089
  }
1116
1090
  },
1117
1091
  getBalanceCache() {
@@ -1120,7 +1094,6 @@ const hh = [
1120
1094
  const e = se.getItem(re.PORTFOLIO_CACHE);
1121
1095
  t = e ? JSON.parse(e) : {};
1122
1096
  } catch {
1123
- console.info("Unable to get balance cache");
1124
1097
  }
1125
1098
  return t;
1126
1099
  },
@@ -1129,7 +1102,6 @@ const hh = [
1129
1102
  const e = z.getBalanceCache();
1130
1103
  se.setItem(re.PORTFOLIO_CACHE, JSON.stringify({ ...e, [t]: void 0 }));
1131
1104
  } catch {
1132
- console.info("Unable to remove address from balance cache", t);
1133
1105
  }
1134
1106
  },
1135
1107
  getBalanceCacheForCaipAddress(t) {
@@ -1139,7 +1111,6 @@ const hh = [
1139
1111
  return s.balance;
1140
1112
  z.removeAddressFromBalanceCache(t);
1141
1113
  } catch {
1142
- console.info("Unable to get balance cache for address", t);
1143
1114
  }
1144
1115
  },
1145
1116
  updateBalanceCache(t) {
@@ -1147,7 +1118,6 @@ const hh = [
1147
1118
  const e = z.getBalanceCache();
1148
1119
  e[t.caipAddress] = t, se.setItem(re.PORTFOLIO_CACHE, JSON.stringify(e));
1149
1120
  } catch {
1150
- console.info("Unable to update balance cache", t);
1151
1121
  }
1152
1122
  },
1153
1123
  getNativeBalanceCache() {
@@ -1156,7 +1126,6 @@ const hh = [
1156
1126
  const e = se.getItem(re.NATIVE_BALANCE_CACHE);
1157
1127
  t = e ? JSON.parse(e) : {};
1158
1128
  } catch {
1159
- console.info("Unable to get balance cache");
1160
1129
  }
1161
1130
  return t;
1162
1131
  },
@@ -1165,7 +1134,6 @@ const hh = [
1165
1134
  const e = z.getBalanceCache();
1166
1135
  se.setItem(re.NATIVE_BALANCE_CACHE, JSON.stringify({ ...e, [t]: void 0 }));
1167
1136
  } catch {
1168
- console.info("Unable to remove address from balance cache", t);
1169
1137
  }
1170
1138
  },
1171
1139
  getNativeBalanceCacheForCaipAddress(t) {
@@ -1173,9 +1141,8 @@ const hh = [
1173
1141
  const s = z.getNativeBalanceCache()[t];
1174
1142
  if (s && !this.isCacheExpired(s.timestamp, this.cacheExpiry.nativeBalance))
1175
1143
  return s;
1176
- console.info("Discarding cache for address", t), z.removeAddressFromBalanceCache(t);
1144
+ z.removeAddressFromBalanceCache(t);
1177
1145
  } catch {
1178
- console.info("Unable to get balance cache for address", t);
1179
1146
  }
1180
1147
  },
1181
1148
  updateNativeBalanceCache(t) {
@@ -1183,7 +1150,6 @@ const hh = [
1183
1150
  const e = z.getNativeBalanceCache();
1184
1151
  e[t.caipAddress] = t, se.setItem(re.NATIVE_BALANCE_CACHE, JSON.stringify(e));
1185
1152
  } catch {
1186
- console.info("Unable to update balance cache", t);
1187
1153
  }
1188
1154
  },
1189
1155
  getEnsCache() {
@@ -1192,7 +1158,6 @@ const hh = [
1192
1158
  const e = se.getItem(re.ENS_CACHE);
1193
1159
  t = e ? JSON.parse(e) : {};
1194
1160
  } catch {
1195
- console.info("Unable to get ens name cache");
1196
1161
  }
1197
1162
  return t;
1198
1163
  },
@@ -1203,7 +1168,6 @@ const hh = [
1203
1168
  return s.ens;
1204
1169
  z.removeEnsFromCache(t);
1205
1170
  } catch {
1206
- console.info("Unable to get ens name from cache", t);
1207
1171
  }
1208
1172
  },
1209
1173
  updateEnsCache(t) {
@@ -1211,7 +1175,6 @@ const hh = [
1211
1175
  const e = z.getEnsCache();
1212
1176
  e[t.address] = t, se.setItem(re.ENS_CACHE, JSON.stringify(e));
1213
1177
  } catch {
1214
- console.info("Unable to update ens name cache", t);
1215
1178
  }
1216
1179
  },
1217
1180
  removeEnsFromCache(t) {
@@ -1219,7 +1182,6 @@ const hh = [
1219
1182
  const e = z.getEnsCache();
1220
1183
  se.setItem(re.ENS_CACHE, JSON.stringify({ ...e, [t]: void 0 }));
1221
1184
  } catch {
1222
- console.info("Unable to remove ens name from cache", t);
1223
1185
  }
1224
1186
  },
1225
1187
  getIdentityCache() {
@@ -1228,7 +1190,6 @@ const hh = [
1228
1190
  const e = se.getItem(re.IDENTITY_CACHE);
1229
1191
  t = e ? JSON.parse(e) : {};
1230
1192
  } catch {
1231
- console.info("Unable to get identity cache");
1232
1193
  }
1233
1194
  return t;
1234
1195
  },
@@ -1239,7 +1200,6 @@ const hh = [
1239
1200
  return s.identity;
1240
1201
  z.removeIdentityFromCache(t);
1241
1202
  } catch {
1242
- console.info("Unable to get identity from cache", t);
1243
1203
  }
1244
1204
  },
1245
1205
  updateIdentityCache(t) {
@@ -1250,7 +1210,6 @@ const hh = [
1250
1210
  timestamp: t.timestamp
1251
1211
  }, se.setItem(re.IDENTITY_CACHE, JSON.stringify(e));
1252
1212
  } catch {
1253
- console.info("Unable to update identity cache", t);
1254
1213
  }
1255
1214
  },
1256
1215
  removeIdentityFromCache(t) {
@@ -1258,21 +1217,18 @@ const hh = [
1258
1217
  const e = z.getIdentityCache();
1259
1218
  se.setItem(re.IDENTITY_CACHE, JSON.stringify({ ...e, [t]: void 0 }));
1260
1219
  } catch {
1261
- console.info("Unable to remove identity from cache", t);
1262
1220
  }
1263
1221
  },
1264
1222
  clearAddressCache() {
1265
1223
  try {
1266
1224
  se.removeItem(re.PORTFOLIO_CACHE), se.removeItem(re.NATIVE_BALANCE_CACHE), se.removeItem(re.ENS_CACHE), se.removeItem(re.IDENTITY_CACHE);
1267
1225
  } catch {
1268
- console.info("Unable to clear address cache");
1269
1226
  }
1270
1227
  },
1271
1228
  setPreferredAccountTypes(t) {
1272
1229
  try {
1273
1230
  se.setItem(re.PREFERRED_ACCOUNT_TYPES, JSON.stringify(t));
1274
1231
  } catch {
1275
- console.info("Unable to set preferred account types", t);
1276
1232
  }
1277
1233
  },
1278
1234
  getPreferredAccountTypes() {
@@ -1280,7 +1236,6 @@ const hh = [
1280
1236
  const t = se.getItem(re.PREFERRED_ACCOUNT_TYPES);
1281
1237
  return t ? JSON.parse(t) : {};
1282
1238
  } catch {
1283
- console.info("Unable to get preferred account types");
1284
1239
  }
1285
1240
  return {};
1286
1241
  },
@@ -1291,16 +1246,15 @@ const hh = [
1291
1246
  [e]: t
1292
1247
  };
1293
1248
  se.setItem(re.CONNECTIONS, JSON.stringify(s));
1294
- } catch (s) {
1295
- console.error("Unable to sync connections to storage", s);
1249
+ } catch {
1296
1250
  }
1297
1251
  },
1298
1252
  getConnections() {
1299
1253
  try {
1300
1254
  const t = se.getItem(re.CONNECTIONS);
1301
1255
  return t ? JSON.parse(t) : {};
1302
- } catch (t) {
1303
- return console.error("Unable to get connections from storage", t), {};
1256
+ } catch {
1257
+ return {};
1304
1258
  }
1305
1259
  }
1306
1260
  }, te = {
@@ -1789,11 +1743,11 @@ const jp = {
1789
1743
  getSnapshot() {
1790
1744
  return sn(Y);
1791
1745
  }
1792
- }, Wp = Object.freeze({
1746
+ }, Hp = Object.freeze({
1793
1747
  enabled: !0,
1794
1748
  events: []
1795
- }), Hp = new mn({ baseUrl: te.getAnalyticsUrl(), clientId: null }), zp = 5, Vp = 60 * 1e3, _s = Re({
1796
- ...Wp
1749
+ }), Wp = new mn({ baseUrl: te.getAnalyticsUrl(), clientId: null }), zp = 5, Vp = 60 * 1e3, _s = Re({
1750
+ ...Hp
1797
1751
  }), Kp = {
1798
1752
  state: _s,
1799
1753
  subscribeKey(t, e) {
@@ -1823,7 +1777,7 @@ const jp = {
1823
1777
  if (typeof window > "u")
1824
1778
  return;
1825
1779
  const { projectId: n, sdkType: o, sdkVersion: a } = B.state;
1826
- await Hp.post({
1780
+ await Wp.post({
1827
1781
  path: "/e",
1828
1782
  params: {
1829
1783
  projectId: n,
@@ -2029,7 +1983,7 @@ const cs = {
2029
1983
  },
2030
1984
  open(t, e) {
2031
1985
  const { debug: s } = B.state, { shortMessage: r, longMessage: i } = t;
2032
- s && (Ss.message = r, Ss.variant = e, Ss.open = !0), i && console.error(typeof i == "function" ? i() : i);
1986
+ s && (Ss.message = r, Ss.variant = e, Ss.open = !0);
2033
1987
  },
2034
1988
  close() {
2035
1989
  Ss.open = !1, Ss.message = "", Ss.variant = "info";
@@ -2159,7 +2113,7 @@ const cs = {
2159
2113
  e && await Promise.allSettled(e.map((s) => J._fetchNetworkImage(s)));
2160
2114
  },
2161
2115
  async fetchConnectorImages() {
2162
- const { connectors: t } = H.state, e = t.map(({ imageId: s }) => s).filter(Boolean);
2116
+ const { connectors: t } = W.state, e = t.map(({ imageId: s }) => s).filter(Boolean);
2163
2117
  await Promise.allSettled(e.map((s) => J._fetchConnectorImage(s)));
2164
2118
  },
2165
2119
  async fetchCurrencyImages(t = []) {
@@ -2383,7 +2337,7 @@ const cs = {
2383
2337
  var i, n, o;
2384
2338
  if (s) {
2385
2339
  V.setFarcasterUrl(void 0, b.state.activeChain);
2386
- const a = H.getAuthConnector();
2340
+ const a = W.getAuthConnector();
2387
2341
  (i = a == null ? void 0 : a.provider) == null || i.reload();
2388
2342
  const c = sn(B.state);
2389
2343
  (o = (n = a == null ? void 0 : a.provider) == null ? void 0 : n.syncDappData) == null || o.call(n, {
@@ -2417,7 +2371,7 @@ const cs = {
2417
2371
  setThemeMode(t) {
2418
2372
  ps.themeMode = t;
2419
2373
  try {
2420
- const e = H.getAuthConnector();
2374
+ const e = W.getAuthConnector();
2421
2375
  if (e) {
2422
2376
  const s = ba.getSnapshot().themeVariables;
2423
2377
  e.provider.syncTheme({
@@ -2427,13 +2381,12 @@ const cs = {
2427
2381
  });
2428
2382
  }
2429
2383
  } catch {
2430
- console.info("Unable to sync theme to auth connector");
2431
2384
  }
2432
2385
  },
2433
2386
  setThemeVariables(t) {
2434
2387
  ps.themeVariables = { ...ps.themeVariables, ...t };
2435
2388
  try {
2436
- const e = H.getAuthConnector();
2389
+ const e = W.getAuthConnector();
2437
2390
  if (e) {
2438
2391
  const s = ba.getSnapshot().themeVariables;
2439
2392
  e.provider.syncTheme({
@@ -2442,7 +2395,6 @@ const cs = {
2442
2395
  });
2443
2396
  }
2444
2397
  } catch {
2445
- console.info("Unable to sync theme to auth connector");
2446
2398
  }
2447
2399
  },
2448
2400
  getSnapshot() {
@@ -2480,32 +2432,32 @@ const cs = {
2480
2432
  initialize(t) {
2481
2433
  t.forEach((e) => {
2482
2434
  const s = z.getConnectedConnectorId(e);
2483
- s && H.setConnectorId(s, e);
2435
+ s && W.setConnectorId(s, e);
2484
2436
  });
2485
2437
  },
2486
2438
  setActiveConnector(t) {
2487
2439
  t && (fe.activeConnector = ur(t));
2488
2440
  },
2489
2441
  setConnectors(t) {
2490
- t.filter((i) => !fe.allConnectors.some((n) => n.id === i.id && H.getConnectorName(n.name) === H.getConnectorName(i.name) && n.chain === i.chain)).forEach((i) => {
2442
+ t.filter((i) => !fe.allConnectors.some((n) => n.id === i.id && W.getConnectorName(n.name) === W.getConnectorName(i.name) && n.chain === i.chain)).forEach((i) => {
2491
2443
  i.type !== "MULTI_CHAIN" && fe.allConnectors.push(ur(i));
2492
2444
  });
2493
- const s = H.getEnabledNamespaces(), r = H.getEnabledConnectors(s);
2494
- fe.connectors = H.mergeMultiChainConnectors(r);
2445
+ const s = W.getEnabledNamespaces(), r = W.getEnabledConnectors(s);
2446
+ fe.connectors = W.mergeMultiChainConnectors(r);
2495
2447
  },
2496
2448
  filterByNamespaces(t) {
2497
2449
  Object.keys(fe.filterByNamespaceMap).forEach((e) => {
2498
2450
  fe.filterByNamespaceMap[e] = !1;
2499
2451
  }), t.forEach((e) => {
2500
2452
  fe.filterByNamespaceMap[e] = !0;
2501
- }), H.updateConnectorsForEnabledNamespaces();
2453
+ }), W.updateConnectorsForEnabledNamespaces();
2502
2454
  },
2503
2455
  filterByNamespace(t, e) {
2504
- fe.filterByNamespaceMap[t] = e, H.updateConnectorsForEnabledNamespaces();
2456
+ fe.filterByNamespaceMap[t] = e, W.updateConnectorsForEnabledNamespaces();
2505
2457
  },
2506
2458
  updateConnectorsForEnabledNamespaces() {
2507
- const t = H.getEnabledNamespaces(), e = H.getEnabledConnectors(t), s = H.areAllNamespacesEnabled();
2508
- fe.connectors = H.mergeMultiChainConnectors(e), s ? J.clearFilterByNamespaces() : J.filterByNamespaces(t);
2459
+ const t = W.getEnabledNamespaces(), e = W.getEnabledConnectors(t), s = W.areAllNamespacesEnabled();
2460
+ fe.connectors = W.mergeMultiChainConnectors(e), s ? J.clearFilterByNamespaces() : J.filterByNamespaces(t);
2509
2461
  },
2510
2462
  getEnabledNamespaces() {
2511
2463
  return Object.entries(fe.filterByNamespaceMap).filter(([t, e]) => e).map(([t]) => t);
@@ -2517,7 +2469,7 @@ const cs = {
2517
2469
  return Object.values(fe.filterByNamespaceMap).every((t) => t);
2518
2470
  },
2519
2471
  mergeMultiChainConnectors(t) {
2520
- const e = H.generateConnectorMapByName(t), s = [];
2472
+ const e = W.generateConnectorMapByName(t), s = [];
2521
2473
  return e.forEach((r) => {
2522
2474
  const i = r[0], n = (i == null ? void 0 : i.id) === K.CONNECTOR_ID.AUTH;
2523
2475
  r.length > 1 && i ? s.push({
@@ -2535,7 +2487,7 @@ const cs = {
2535
2487
  generateConnectorMapByName(t) {
2536
2488
  const e = /* @__PURE__ */ new Map();
2537
2489
  return t.forEach((s) => {
2538
- const { name: r } = s, i = H.getConnectorName(r);
2490
+ const { name: r } = s, i = W.getConnectorName(r);
2539
2491
  if (!i)
2540
2492
  return;
2541
2493
  const n = e.get(i) || [];
@@ -2566,9 +2518,9 @@ const cs = {
2566
2518
  themeMode: o,
2567
2519
  themeVariables: a,
2568
2520
  w3mThemeVariables: Us(a, o)
2569
- }), H.setConnectors([t]);
2521
+ }), W.setConnectors([t]);
2570
2522
  } else
2571
- H.setConnectors([t]);
2523
+ W.setConnectors([t]);
2572
2524
  },
2573
2525
  getAuthConnector(t) {
2574
2526
  var r;
@@ -2614,10 +2566,10 @@ const cs = {
2614
2566
  */
2615
2567
  getConnectorsByNamespace(t) {
2616
2568
  const e = fe.allConnectors.filter((s) => s.chain === t);
2617
- return H.mergeMultiChainConnectors(e);
2569
+ return W.mergeMultiChainConnectors(e);
2618
2570
  },
2619
2571
  selectWalletConnector(t) {
2620
- const e = H.getConnector(t.id, t.rdns), s = b.state.activeChain;
2572
+ const e = W.getConnector(t.id, t.rdns), s = b.state.activeChain;
2621
2573
  Gp.handleMobileDeeplinkRedirect((e == null ? void 0 : e.explorerId) || t.id, s), e ? oe.push("ConnectingExternal", { connector: e }) : oe.push("ConnectingWalletConnect", { wallet: t });
2622
2574
  },
2623
2575
  /**
@@ -2626,14 +2578,14 @@ const cs = {
2626
2578
  * @returns ConnectorWithProviders[].
2627
2579
  */
2628
2580
  getConnectors(t) {
2629
- return t ? H.getConnectorsByNamespace(t) : H.mergeMultiChainConnectors(fe.allConnectors);
2581
+ return t ? W.getConnectorsByNamespace(t) : W.mergeMultiChainConnectors(fe.allConnectors);
2630
2582
  },
2631
2583
  /**
2632
2584
  * Sets the filter by namespace and updates the connectors.
2633
2585
  * @param namespace - The namespace to filter the connectors by.
2634
2586
  */
2635
2587
  setFilterByNamespace(t) {
2636
- fe.filterByNamespace = t, fe.connectors = H.getConnectors(t), J.setFilterByNamespace(t);
2588
+ fe.filterByNamespace = t, fe.connectors = W.getConnectors(t), J.setFilterByNamespace(t);
2637
2589
  },
2638
2590
  setConnectorId(t, e) {
2639
2591
  t && (fe.activeConnectorIds = {
@@ -2657,7 +2609,7 @@ const cs = {
2657
2609
  resetConnectorIds() {
2658
2610
  fe.activeConnectorIds = { ...ph };
2659
2611
  }
2660
- }, H = Dt(of), af = "https://secure.walletconnect.org/sdk";
2612
+ }, W = Dt(of), af = "https://secure.walletconnect.org/sdk";
2661
2613
  typeof Ee < "u" && typeof Ee.env < "u" && Ee.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL;
2662
2614
  typeof Ee < "u" && typeof Ee.env < "u" && Ee.env.NEXT_PUBLIC_DEFAULT_LOG_LEVEL;
2663
2615
  typeof Ee < "u" && typeof Ee.env < "u" && Ee.env.NEXT_PUBLIC_SECURE_SITE_SDK_VERSION;
@@ -2814,12 +2766,12 @@ const uf = {
2814
2766
  var s, r;
2815
2767
  await ((r = (s = ee._getClient()) == null ? void 0 : s.reconnectExternal) == null ? void 0 : r.call(s, t));
2816
2768
  const e = t.chain || b.state.activeChain;
2817
- e && H.setConnectorId(t.id, e);
2769
+ e && W.setConnectorId(t.id, e);
2818
2770
  },
2819
2771
  async setPreferredAccountType(t, e) {
2820
2772
  var r;
2821
2773
  Ye.setLoading(!0, b.state.activeChain);
2822
- const s = H.getAuthConnector();
2774
+ const s = W.getAuthConnector();
2823
2775
  s && (V.setPreferredAccountType(t, e), await s.provider.setPreferredAccount(t), z.setPreferredAccountTypes(V.state.preferredAccountTypes ?? { [e]: t }), await ee.reconnectExternal(s), Ye.setLoading(!1, b.state.activeChain), Le.sendEvent({
2824
2776
  type: "track",
2825
2777
  event: "SET_PREFERRED_ACCOUNT_TYPE",
@@ -2928,16 +2880,15 @@ const uf = {
2928
2880
  _e.connections.set(e, t);
2929
2881
  },
2930
2882
  switchAccount({ connection: t, address: e, namespace: s }) {
2931
- if (H.state.activeConnectorIds[s] === t.connectorId) {
2883
+ if (W.state.activeConnectorIds[s] === t.connectorId) {
2932
2884
  const n = b.state.activeCaipNetwork;
2933
2885
  if (n) {
2934
2886
  const o = `${s}:${n.id}:${e}`;
2935
2887
  V.setCaipAddress(o, s);
2936
- } else
2937
- console.warn(`No current network found for namespace "${s}"`);
2888
+ }
2938
2889
  } else {
2939
- const n = H.getConnector(t.connectorId);
2940
- n ? ee.connectExternal(n, s) : console.warn(`No connector found for namespace "${s}"`);
2890
+ const n = W.getConnector(t.connectorId);
2891
+ n && ee.connectExternal(n, s);
2941
2892
  }
2942
2893
  }
2943
2894
  }, ee = Dt(uf), Ir = Re({
@@ -3269,7 +3220,7 @@ const uf = {
3269
3220
  caipNetwork: void 0,
3270
3221
  supportsAllNetworks: !0,
3271
3222
  smartAccountEnabledNetworks: []
3272
- }, W = Re({
3223
+ }, H = Re({
3273
3224
  chains: Fp(),
3274
3225
  activeCaipAddress: void 0,
3275
3226
  activeChain: void 0,
@@ -3281,31 +3232,31 @@ const uf = {
3281
3232
  },
3282
3233
  isSwitchingNamespace: !1
3283
3234
  }), df = {
3284
- state: W,
3235
+ state: H,
3285
3236
  subscribe(t) {
3286
- return ct(W, () => {
3287
- t(W);
3237
+ return ct(H, () => {
3238
+ t(H);
3288
3239
  });
3289
3240
  },
3290
3241
  subscribeKey(t, e) {
3291
- return lt(W, t, e);
3242
+ return lt(H, t, e);
3292
3243
  },
3293
3244
  subscribeChainProp(t, e, s) {
3294
3245
  let r;
3295
- return ct(W.chains, () => {
3246
+ return ct(H.chains, () => {
3296
3247
  var n;
3297
- const i = s || W.activeChain;
3248
+ const i = s || H.activeChain;
3298
3249
  if (i) {
3299
- const o = (n = W.chains.get(i)) == null ? void 0 : n[t];
3250
+ const o = (n = H.chains.get(i)) == null ? void 0 : n[t];
3300
3251
  r !== o && (r = o, e(o));
3301
3252
  }
3302
3253
  });
3303
3254
  },
3304
3255
  initialize(t, e, s) {
3305
3256
  const { chainId: r, namespace: i } = z.getActiveNetworkProps(), n = e == null ? void 0 : e.find((u) => u.id.toString() === (r == null ? void 0 : r.toString())), a = t.find((u) => (u == null ? void 0 : u.namespace) === i) || (t == null ? void 0 : t[0]), c = t.map((u) => u.namespace).filter((u) => u !== void 0), l = B.state.enableEmbedded ? /* @__PURE__ */ new Set([...c]) : /* @__PURE__ */ new Set([...(e == null ? void 0 : e.map((u) => u.chainNamespace)) ?? []]);
3306
- ((t == null ? void 0 : t.length) === 0 || !a) && (W.noAdapters = !0), W.noAdapters || (W.activeChain = a == null ? void 0 : a.namespace, W.activeCaipNetwork = n, b.setChainNetworkData(a == null ? void 0 : a.namespace, {
3257
+ ((t == null ? void 0 : t.length) === 0 || !a) && (H.noAdapters = !0), H.noAdapters || (H.activeChain = a == null ? void 0 : a.namespace, H.activeCaipNetwork = n, b.setChainNetworkData(a == null ? void 0 : a.namespace, {
3307
3258
  caipNetwork: n
3308
- }), W.activeChain && Ls.set({ activeChain: a == null ? void 0 : a.namespace })), l.forEach((u) => {
3259
+ }), H.activeChain && Ls.set({ activeChain: a == null ? void 0 : a.namespace })), l.forEach((u) => {
3309
3260
  const h = e == null ? void 0 : e.filter((d) => d.chainNamespace === u);
3310
3261
  b.state.chains.set(u, {
3311
3262
  namespace: u,
@@ -3321,17 +3272,17 @@ const uf = {
3321
3272
  },
3322
3273
  removeAdapter(t) {
3323
3274
  var e, s;
3324
- if (W.activeChain === t) {
3325
- const r = Array.from(W.chains.entries()).find(([i]) => i !== t);
3275
+ if (H.activeChain === t) {
3276
+ const r = Array.from(H.chains.entries()).find(([i]) => i !== t);
3326
3277
  if (r) {
3327
3278
  const i = (s = (e = r[1]) == null ? void 0 : e.caipNetworks) == null ? void 0 : s[0];
3328
3279
  i && b.setActiveCaipNetwork(i);
3329
3280
  }
3330
3281
  }
3331
- W.chains.delete(t);
3282
+ H.chains.delete(t);
3332
3283
  },
3333
3284
  addAdapter(t, { networkControllerClient: e, connectionControllerClient: s }, r) {
3334
- W.chains.set(t.namespace, {
3285
+ H.chains.set(t.namespace, {
3335
3286
  namespace: t.namespace,
3336
3287
  networkState: {
3337
3288
  ...Pn,
@@ -3345,56 +3296,56 @@ const uf = {
3345
3296
  },
3346
3297
  addNetwork(t) {
3347
3298
  var s;
3348
- const e = W.chains.get(t.chainNamespace);
3299
+ const e = H.chains.get(t.chainNamespace);
3349
3300
  if (e) {
3350
3301
  const r = [...e.caipNetworks || []];
3351
- (s = e.caipNetworks) != null && s.find((i) => i.id === t.id) || r.push(t), W.chains.set(t.chainNamespace, { ...e, caipNetworks: r }), b.setRequestedCaipNetworks(r, t.chainNamespace), H.filterByNamespace(t.chainNamespace, !0);
3302
+ (s = e.caipNetworks) != null && s.find((i) => i.id === t.id) || r.push(t), H.chains.set(t.chainNamespace, { ...e, caipNetworks: r }), b.setRequestedCaipNetworks(r, t.chainNamespace), W.filterByNamespace(t.chainNamespace, !0);
3352
3303
  }
3353
3304
  },
3354
3305
  removeNetwork(t, e) {
3355
3306
  var r, i, n;
3356
- const s = W.chains.get(t);
3307
+ const s = H.chains.get(t);
3357
3308
  if (s) {
3358
- const o = ((r = W.activeCaipNetwork) == null ? void 0 : r.id) === e, a = [
3309
+ const o = ((r = H.activeCaipNetwork) == null ? void 0 : r.id) === e, a = [
3359
3310
  ...((i = s.caipNetworks) == null ? void 0 : i.filter((c) => c.id !== e)) || []
3360
3311
  ];
3361
- o && ((n = s == null ? void 0 : s.caipNetworks) != null && n[0]) && b.setActiveCaipNetwork(s.caipNetworks[0]), W.chains.set(t, { ...s, caipNetworks: a }), b.setRequestedCaipNetworks(a || [], t), a.length === 0 && H.filterByNamespace(t, !1);
3312
+ o && ((n = s == null ? void 0 : s.caipNetworks) != null && n[0]) && b.setActiveCaipNetwork(s.caipNetworks[0]), H.chains.set(t, { ...s, caipNetworks: a }), b.setRequestedCaipNetworks(a || [], t), a.length === 0 && W.filterByNamespace(t, !1);
3362
3313
  }
3363
3314
  },
3364
3315
  setAdapterNetworkState(t, e) {
3365
- const s = W.chains.get(t);
3316
+ const s = H.chains.get(t);
3366
3317
  s && (s.networkState = {
3367
3318
  ...s.networkState || Pn,
3368
3319
  ...e
3369
- }, W.chains.set(t, s));
3320
+ }, H.chains.set(t, s));
3370
3321
  },
3371
3322
  setChainAccountData(t, e, s = !0) {
3372
3323
  if (!t)
3373
3324
  throw new Error("Chain is required to update chain account data");
3374
- const r = W.chains.get(t);
3325
+ const r = H.chains.get(t);
3375
3326
  if (r) {
3376
3327
  const i = { ...r.accountState || To, ...e };
3377
- W.chains.set(t, { ...r, accountState: i }), (W.chains.size === 1 || W.activeChain === t) && (e.caipAddress && (W.activeCaipAddress = e.caipAddress), V.replaceState(i));
3328
+ H.chains.set(t, { ...r, accountState: i }), (H.chains.size === 1 || H.activeChain === t) && (e.caipAddress && (H.activeCaipAddress = e.caipAddress), V.replaceState(i));
3378
3329
  }
3379
3330
  },
3380
3331
  setChainNetworkData(t, e) {
3381
3332
  if (!t)
3382
3333
  return;
3383
- const s = W.chains.get(t);
3334
+ const s = H.chains.get(t);
3384
3335
  if (s) {
3385
3336
  const r = { ...s.networkState || Pn, ...e };
3386
- W.chains.set(t, { ...s, networkState: r });
3337
+ H.chains.set(t, { ...s, networkState: r });
3387
3338
  }
3388
3339
  },
3389
3340
  // eslint-disable-next-line max-params
3390
3341
  setAccountProp(t, e, s, r = !0) {
3391
- b.setChainAccountData(s, { [t]: e }, r), t === "status" && e === "disconnected" && s && H.removeConnectorId(s);
3342
+ b.setChainAccountData(s, { [t]: e }, r), t === "status" && e === "disconnected" && s && W.removeConnectorId(s);
3392
3343
  },
3393
3344
  setActiveNamespace(t) {
3394
3345
  var r, i;
3395
- W.activeChain = t;
3396
- const e = t ? W.chains.get(t) : void 0, s = (r = e == null ? void 0 : e.networkState) == null ? void 0 : r.caipNetwork;
3397
- s != null && s.id && t && (W.activeCaipAddress = (i = e == null ? void 0 : e.accountState) == null ? void 0 : i.caipAddress, W.activeCaipNetwork = s, b.setChainNetworkData(t, { caipNetwork: s }), z.setActiveCaipNetworkId(s == null ? void 0 : s.caipNetworkId), Ls.set({
3346
+ H.activeChain = t;
3347
+ const e = t ? H.chains.get(t) : void 0, s = (r = e == null ? void 0 : e.networkState) == null ? void 0 : r.caipNetwork;
3348
+ s != null && s.id && t && (H.activeCaipAddress = (i = e == null ? void 0 : e.accountState) == null ? void 0 : i.caipAddress, H.activeCaipNetwork = s, b.setChainNetworkData(t, { caipNetwork: s }), z.setActiveCaipNetworkId(s == null ? void 0 : s.caipNetworkId), Ls.set({
3398
3349
  activeChain: t,
3399
3350
  selectedNetworkId: s == null ? void 0 : s.caipNetworkId
3400
3351
  }));
@@ -3403,18 +3354,18 @@ const uf = {
3403
3354
  var r, i, n;
3404
3355
  if (!t)
3405
3356
  return;
3406
- W.activeChain !== t.chainNamespace && b.setIsSwitchingNamespace(!0);
3407
- const e = W.chains.get(t.chainNamespace);
3408
- W.activeChain = t.chainNamespace, W.activeCaipNetwork = t, b.setChainNetworkData(t.chainNamespace, { caipNetwork: t }), (r = e == null ? void 0 : e.accountState) != null && r.address ? W.activeCaipAddress = `${t.chainNamespace}:${t.id}:${(i = e == null ? void 0 : e.accountState) == null ? void 0 : i.address}` : W.activeCaipAddress = void 0, b.setAccountProp("caipAddress", W.activeCaipAddress, t.chainNamespace), e && V.replaceState(e.accountState), be.resetSend(), Ls.set({
3409
- activeChain: W.activeChain,
3410
- selectedNetworkId: (n = W.activeCaipNetwork) == null ? void 0 : n.caipNetworkId
3357
+ H.activeChain !== t.chainNamespace && b.setIsSwitchingNamespace(!0);
3358
+ const e = H.chains.get(t.chainNamespace);
3359
+ H.activeChain = t.chainNamespace, H.activeCaipNetwork = t, b.setChainNetworkData(t.chainNamespace, { caipNetwork: t }), (r = e == null ? void 0 : e.accountState) != null && r.address ? H.activeCaipAddress = `${t.chainNamespace}:${t.id}:${(i = e == null ? void 0 : e.accountState) == null ? void 0 : i.address}` : H.activeCaipAddress = void 0, b.setAccountProp("caipAddress", H.activeCaipAddress, t.chainNamespace), e && V.replaceState(e.accountState), be.resetSend(), Ls.set({
3360
+ activeChain: H.activeChain,
3361
+ selectedNetworkId: (n = H.activeCaipNetwork) == null ? void 0 : n.caipNetworkId
3411
3362
  }), z.setActiveCaipNetworkId(t.caipNetworkId), !b.checkIfSupportedNetwork(t.chainNamespace) && B.state.enableNetworkSwitch && !B.state.allowUnsupportedChain && !ee.state.wcBasic && b.showUnsupportedChainUI();
3412
3363
  },
3413
3364
  addCaipNetwork(t) {
3414
3365
  var s;
3415
3366
  if (!t)
3416
3367
  return;
3417
- const e = W.chains.get(t.chainNamespace);
3368
+ const e = H.chains.get(t.chainNamespace);
3418
3369
  e && ((s = e == null ? void 0 : e.caipNetworks) == null || s.push(t));
3419
3370
  },
3420
3371
  async switchActiveNamespace(t) {
@@ -3428,7 +3379,7 @@ const uf = {
3428
3379
  var i;
3429
3380
  const e = b.state.chains.get(b.state.activeChain), s = !((i = e == null ? void 0 : e.caipNetworks) != null && i.some((n) => {
3430
3381
  var o;
3431
- return n.id === ((o = W.activeCaipNetwork) == null ? void 0 : o.id);
3382
+ return n.id === ((o = H.activeCaipNetwork) == null ? void 0 : o.id);
3432
3383
  })), r = b.getNetworkControllerClient(t.chainNamespace);
3433
3384
  if (r) {
3434
3385
  try {
@@ -3444,7 +3395,7 @@ const uf = {
3444
3395
  }
3445
3396
  },
3446
3397
  getNetworkControllerClient(t) {
3447
- const e = t || W.activeChain, s = W.chains.get(e);
3398
+ const e = t || H.activeChain, s = H.chains.get(e);
3448
3399
  if (!s)
3449
3400
  throw new Error("Chain adapter not found");
3450
3401
  if (!s.networkControllerClient)
@@ -3452,36 +3403,36 @@ const uf = {
3452
3403
  return s.networkControllerClient;
3453
3404
  },
3454
3405
  getConnectionControllerClient(t) {
3455
- const e = t || W.activeChain;
3406
+ const e = t || H.activeChain;
3456
3407
  if (!e)
3457
3408
  throw new Error("Chain is required to get connection controller client");
3458
- const s = W.chains.get(e);
3409
+ const s = H.chains.get(e);
3459
3410
  if (!(s != null && s.connectionControllerClient))
3460
3411
  throw new Error("ConnectionController client not set");
3461
3412
  return s.connectionControllerClient;
3462
3413
  },
3463
3414
  getAccountProp(t, e) {
3464
3415
  var i;
3465
- let s = W.activeChain;
3416
+ let s = H.activeChain;
3466
3417
  if (e && (s = e), !s)
3467
3418
  return;
3468
- const r = (i = W.chains.get(s)) == null ? void 0 : i.accountState;
3419
+ const r = (i = H.chains.get(s)) == null ? void 0 : i.accountState;
3469
3420
  if (r)
3470
3421
  return r[t];
3471
3422
  },
3472
3423
  getNetworkProp(t, e) {
3473
3424
  var r;
3474
- const s = (r = W.chains.get(e)) == null ? void 0 : r.networkState;
3425
+ const s = (r = H.chains.get(e)) == null ? void 0 : r.networkState;
3475
3426
  if (s)
3476
3427
  return s[t];
3477
3428
  },
3478
3429
  getRequestedCaipNetworks(t) {
3479
- const e = W.chains.get(t), { approvedCaipNetworkIds: s = [], requestedCaipNetworks: r = [] } = (e == null ? void 0 : e.networkState) || {};
3430
+ const e = H.chains.get(t), { approvedCaipNetworkIds: s = [], requestedCaipNetworks: r = [] } = (e == null ? void 0 : e.networkState) || {};
3480
3431
  return te.sortRequestedNetworks(s, r);
3481
3432
  },
3482
3433
  getAllRequestedCaipNetworks() {
3483
3434
  const t = [];
3484
- return W.chains.forEach((e) => {
3435
+ return H.chains.forEach((e) => {
3485
3436
  const s = b.getRequestedCaipNetworks(e.namespace);
3486
3437
  t.push(...s);
3487
3438
  }), t;
@@ -3489,24 +3440,24 @@ const uf = {
3489
3440
  setRequestedCaipNetworks(t, e) {
3490
3441
  b.setAdapterNetworkState(e, { requestedCaipNetworks: t });
3491
3442
  const r = b.getAllRequestedCaipNetworks().map((n) => n.chainNamespace), i = Array.from(new Set(r));
3492
- H.filterByNamespaces(i);
3443
+ W.filterByNamespaces(i);
3493
3444
  },
3494
3445
  getAllApprovedCaipNetworkIds() {
3495
3446
  const t = [];
3496
- return W.chains.forEach((e) => {
3447
+ return H.chains.forEach((e) => {
3497
3448
  const s = b.getApprovedCaipNetworkIds(e.namespace);
3498
3449
  t.push(...s);
3499
3450
  }), t;
3500
3451
  },
3501
3452
  getActiveCaipNetwork() {
3502
- return W.activeCaipNetwork;
3453
+ return H.activeCaipNetwork;
3503
3454
  },
3504
3455
  getActiveCaipAddress() {
3505
- return W.activeCaipAddress;
3456
+ return H.activeCaipAddress;
3506
3457
  },
3507
3458
  getApprovedCaipNetworkIds(t) {
3508
3459
  var r;
3509
- const e = W.chains.get(t);
3460
+ const e = H.chains.get(t);
3510
3461
  return ((r = e == null ? void 0 : e.networkState) == null ? void 0 : r.approvedCaipNetworkIds) || [];
3511
3462
  },
3512
3463
  async setApprovedCaipNetworksData(t) {
@@ -3517,13 +3468,13 @@ const uf = {
3517
3468
  });
3518
3469
  },
3519
3470
  checkIfSupportedNetwork(t, e) {
3520
- const s = e || W.activeCaipNetwork, r = b.getRequestedCaipNetworks(t);
3471
+ const s = e || H.activeCaipNetwork, r = b.getRequestedCaipNetworks(t);
3521
3472
  return r.length ? r == null ? void 0 : r.some((i) => i.id === (s == null ? void 0 : s.id)) : !0;
3522
3473
  },
3523
3474
  checkIfSupportedChainId(t) {
3524
- if (!W.activeChain)
3475
+ if (!H.activeChain)
3525
3476
  return !0;
3526
- const e = b.getRequestedCaipNetworks(W.activeChain);
3477
+ const e = b.getRequestedCaipNetworks(H.activeChain);
3527
3478
  return e == null ? void 0 : e.some((s) => s.id === t);
3528
3479
  },
3529
3480
  // Smart Account Network Handlers
@@ -3532,7 +3483,7 @@ const uf = {
3532
3483
  },
3533
3484
  checkIfSmartAccountEnabled() {
3534
3485
  var r;
3535
- const t = ch.caipNetworkIdToNumber((r = W.activeCaipNetwork) == null ? void 0 : r.caipNetworkId), e = W.activeChain;
3486
+ const t = ch.caipNetworkIdToNumber((r = H.activeCaipNetwork) == null ? void 0 : r.caipNetworkId), e = H.activeChain;
3536
3487
  if (!e || !t)
3537
3488
  return !1;
3538
3489
  const s = b.getNetworkProp("smartAccountEnabledNetworks", e);
@@ -3540,14 +3491,14 @@ const uf = {
3540
3491
  },
3541
3492
  getActiveNetworkTokenAddress() {
3542
3493
  var r, i;
3543
- const t = ((r = W.activeCaipNetwork) == null ? void 0 : r.chainNamespace) || "eip155", e = ((i = W.activeCaipNetwork) == null ? void 0 : i.id) || 1, s = Te.NATIVE_TOKEN_ADDRESS[t];
3494
+ const t = ((r = H.activeCaipNetwork) == null ? void 0 : r.chainNamespace) || "eip155", e = ((i = H.activeCaipNetwork) == null ? void 0 : i.id) || 1, s = Te.NATIVE_TOKEN_ADDRESS[t];
3544
3495
  return `${t}:${e}:${s}`;
3545
3496
  },
3546
3497
  showUnsupportedChainUI() {
3547
3498
  Ye.open({ view: "UnsupportedChain" });
3548
3499
  },
3549
3500
  checkIfNamesSupported() {
3550
- const t = W.activeCaipNetwork;
3501
+ const t = H.activeCaipNetwork;
3551
3502
  return !!(t != null && t.chainNamespace && Te.NAMES_SUPPORTED_CHAIN_NAMESPACES.includes(t.chainNamespace));
3552
3503
  },
3553
3504
  resetNetwork(t) {
@@ -3561,7 +3512,7 @@ const uf = {
3561
3512
  const e = t;
3562
3513
  if (!e)
3563
3514
  throw new Error("Chain is required to set account prop");
3564
- W.activeCaipAddress = void 0, b.setChainAccountData(e, {
3515
+ H.activeCaipAddress = void 0, b.setChainAccountData(e, {
3565
3516
  smartAccountDeployed: !1,
3566
3517
  currentTab: 0,
3567
3518
  caipAddress: void 0,
@@ -3580,20 +3531,20 @@ const uf = {
3580
3531
  allAccounts: [],
3581
3532
  user: void 0,
3582
3533
  status: "disconnected"
3583
- }), H.removeConnectorId(e);
3534
+ }), W.removeConnectorId(e);
3584
3535
  },
3585
3536
  setIsSwitchingNamespace(t) {
3586
- W.isSwitchingNamespace = t;
3537
+ H.isSwitchingNamespace = t;
3587
3538
  },
3588
3539
  getFirstCaipNetworkSupportsAuthConnector() {
3589
3540
  var s, r;
3590
3541
  const t = [];
3591
3542
  let e;
3592
- if (W.chains.forEach((i) => {
3543
+ if (H.chains.forEach((i) => {
3593
3544
  K.AUTH_CONNECTOR_SUPPORTED_CHAINS.find((n) => n === i.namespace) && i.namespace && t.push(i.namespace);
3594
3545
  }), t.length > 0) {
3595
3546
  const i = t[0];
3596
- return e = i ? (r = (s = W.chains.get(i)) == null ? void 0 : s.caipNetworks) == null ? void 0 : r[0] : void 0, e;
3547
+ return e = i ? (r = (s = H.chains.get(i)) == null ? void 0 : s.caipNetworks) == null ? void 0 : r[0] : void 0, e;
3597
3548
  }
3598
3549
  },
3599
3550
  getAccountData(t) {
@@ -3602,7 +3553,7 @@ const uf = {
3602
3553
  },
3603
3554
  getNetworkData(t) {
3604
3555
  var s;
3605
- const e = t || W.activeChain;
3556
+ const e = t || H.activeChain;
3606
3557
  if (e)
3607
3558
  return (s = b.state.chains.get(e)) == null ? void 0 : s.networkState;
3608
3559
  },
@@ -3619,8 +3570,8 @@ const uf = {
3619
3570
  * @returns The requested CaipNetwork IDs
3620
3571
  */
3621
3572
  getRequestedCaipNetworkIds() {
3622
- const t = H.state.filterByNamespace;
3623
- return (t ? [W.chains.get(t)] : Array.from(W.chains.values())).flatMap((s) => (s == null ? void 0 : s.caipNetworks) || []).map((s) => s.caipNetworkId);
3573
+ const t = W.state.filterByNamespace;
3574
+ return (t ? [H.chains.get(t)] : Array.from(H.chains.values())).flatMap((s) => (s == null ? void 0 : s.caipNetworks) || []).map((s) => s.caipNetworkId);
3624
3575
  },
3625
3576
  getCaipNetworks(t) {
3626
3577
  return t ? b.getRequestedCaipNetworks(t) : b.getAllRequestedCaipNetworks();
@@ -4145,7 +4096,7 @@ const uf = {
4145
4096
  const s = b.state.activeCaipNetwork, r = oe.state.data;
4146
4097
  if (t.id === (s == null ? void 0 : s.id))
4147
4098
  return;
4148
- const n = V.getCaipAddress(b.state.activeChain), o = t.chainNamespace !== b.state.activeChain, a = V.getCaipAddress(t.chainNamespace), l = H.getConnectorId(b.state.activeChain) === K.CONNECTOR_ID.AUTH, u = K.AUTH_CONNECTOR_SUPPORTED_CHAINS.find((h) => h === t.chainNamespace);
4099
+ const n = V.getCaipAddress(b.state.activeChain), o = t.chainNamespace !== b.state.activeChain, a = V.getCaipAddress(t.chainNamespace), l = W.getConnectorId(b.state.activeChain) === K.CONNECTOR_ID.AUTH, u = K.AUTH_CONNECTOR_SUPPORTED_CHAINS.find((h) => h === t.chainNamespace);
4149
4100
  e || l && u ? oe.push("SwitchNetwork", { ...r, network: t }) : /** * If user switching to a different namespace and next namespace is not connected, we need to show switch active chain view for confirmation first. */ n && o && !a ? oe.push("SwitchActiveChain", {
4150
4101
  switchToChain: t.chainNamespace,
4151
4102
  navigateTo: "Connect",
@@ -4174,7 +4125,7 @@ const uf = {
4174
4125
  fetchConnectorImages: !e,
4175
4126
  fetchFeaturedWallets: !e,
4176
4127
  fetchRecommendedWallets: !e
4177
- }), H.setFilterByNamespace(t == null ? void 0 : t.namespace), Ye.setLoading(!0, s), s && i) {
4128
+ }), W.setFilterByNamespace(t == null ? void 0 : t.namespace), Ye.setLoading(!0, s), s && i) {
4178
4129
  const c = ((a = b.getNetworkData(s)) == null ? void 0 : a.caipNetwork) || b.getRequestedCaipNetworks(s)[0];
4179
4130
  c && gf.onSwitchNetwork({ network: c, ignoreSwitchConfirmation: !0 });
4180
4131
  } else {
@@ -4375,7 +4326,7 @@ const uf = {
4375
4326
  const e = b.state.activeCaipNetwork;
4376
4327
  if (!e)
4377
4328
  throw new Error("Network not found");
4378
- const s = V.state.address, r = H.getAuthConnector();
4329
+ const s = V.state.address, r = W.getAuthConnector();
4379
4330
  if (!s || !r)
4380
4331
  throw new Error("Address or auth connector not found");
4381
4332
  Bt.loading = !0;
@@ -4435,8 +4386,8 @@ const uf = {
4435
4386
  await Ye.open({
4436
4387
  view: "SIWXSignMessage"
4437
4388
  });
4438
- } catch (o) {
4439
- console.error("SIWXUtil:initializeIfEnabled", o), Le.sendEvent({
4389
+ } catch {
4390
+ Le.sendEvent({
4440
4391
  type: "track",
4441
4392
  event: "SIWX_AUTH_ERROR",
4442
4393
  properties: this.getSIWXEventProperties()
@@ -4458,7 +4409,7 @@ const uf = {
4458
4409
  chainId: s.caipNetworkId,
4459
4410
  accountAddress: e
4460
4411
  }), n = i.toString();
4461
- H.getConnectorId(s.chainNamespace) === K.CONNECTOR_ID.AUTH && oe.pushTransactionStack({});
4412
+ W.getConnectorId(s.chainNamespace) === K.CONNECTOR_ID.AUTH && oe.pushTransactionStack({});
4462
4413
  const a = await r.signMessage(n);
4463
4414
  await t.addSession({
4464
4415
  data: i,
@@ -4469,7 +4420,7 @@ const uf = {
4469
4420
  event: "SIWX_AUTH_SUCCESS",
4470
4421
  properties: this.getSIWXEventProperties()
4471
4422
  });
4472
- } catch (i) {
4423
+ } catch {
4473
4424
  const n = this.getSIWXEventProperties();
4474
4425
  (!Ye.state.open || oe.state.view === "ApproveTransaction") && await Ye.open({
4475
4426
  view: "SIWXSignMessage"
@@ -4477,7 +4428,7 @@ const uf = {
4477
4428
  type: "track",
4478
4429
  event: "SIWX_AUTH_ERROR",
4479
4430
  properties: n
4480
- }), console.error("SWIXUtil:requestSignMessage", i);
4431
+ });
4481
4432
  }
4482
4433
  },
4483
4434
  async cancelSignMessage() {
@@ -4489,8 +4440,7 @@ const uf = {
4489
4440
  type: "track",
4490
4441
  properties: this.getSIWXEventProperties()
4491
4442
  });
4492
- } catch (e) {
4493
- console.error("SIWXUtil:cancelSignMessage", e);
4443
+ } catch {
4494
4444
  }
4495
4445
  },
4496
4446
  async getSessions() {
@@ -4565,7 +4515,7 @@ const uf = {
4565
4515
  properties: Gi.getSIWXEventProperties()
4566
4516
  });
4567
4517
  } catch (h) {
4568
- throw console.error("SIWX:universalProviderAuth - failed to set sessions", h), Le.sendEvent({
4518
+ throw Le.sendEvent({
4569
4519
  type: "track",
4570
4520
  event: "SIWX_AUTH_ERROR",
4571
4521
  properties: Gi.getSIWXEventProperties()
@@ -4675,7 +4625,7 @@ function qf(t, e) {
4675
4625
  function jf() {
4676
4626
  return ih.getWindowMetadata() || { name: "", description: "", url: "", icons: [""] };
4677
4627
  }
4678
- function Wf() {
4628
+ function Hf() {
4679
4629
  if (lo() === es.reactNative && typeof ne < "u" && typeof (ne == null ? void 0 : ne.Platform) < "u") {
4680
4630
  const { OS: s, Version: r } = ne.Platform;
4681
4631
  return [s, r].join("-");
@@ -4685,13 +4635,13 @@ function Wf() {
4685
4635
  const e = t.os ? t.os.replace(" ", "").toLowerCase() : "unknown";
4686
4636
  return t.type === "browser" ? [e, t.name, t.version].join("-") : [e, t.version].join("-");
4687
4637
  }
4688
- function Hf() {
4638
+ function Wf() {
4689
4639
  var t;
4690
4640
  const e = lo();
4691
4641
  return e === es.browser ? [e, ((t = xt.getLocation()) == null ? void 0 : t.host) || "unknown"].join(":") : e;
4692
4642
  }
4693
4643
  function gh(t, e, s) {
4694
- const r = Wf(), i = Hf();
4644
+ const r = Hf(), i = Wf();
4695
4645
  return [[t, e].join("-"), [Bf, s].join("-"), r, i].join("/");
4696
4646
  }
4697
4647
  function zf({ protocol: t, version: e, relayUrl: s, sdkVersion: r, auth: i, projectId: n, useOnCloseEvent: o, bundleId: a, packageName: c }) {
@@ -4758,13 +4708,13 @@ function Jf(t) {
4758
4708
  function Ji(t, e) {
4759
4709
  return F.fromMiliseconds(Date.now() + F.toMiliseconds(t));
4760
4710
  }
4761
- function Wc(t) {
4711
+ function Hc(t) {
4762
4712
  return Date.now() >= F.toMiliseconds(t);
4763
4713
  }
4764
4714
  function $o(t, e) {
4765
4715
  return `${t}${e ? `:${e}` : ""}`;
4766
4716
  }
4767
- function Hc() {
4717
+ function Wc() {
4768
4718
  return typeof crypto < "u" && crypto != null && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu, (t) => {
4769
4719
  const e = Math.random() * 16 | 0;
4770
4720
  return (t === "x" ? e : e & 3 | 8).toString(16);
@@ -5267,8 +5217,8 @@ function jg(t, e, s, r = 32) {
5267
5217
  for (let l = 0; l < i; l++) Ro[0] = l + 1, a.update(l === 0 ? rl : c).update(s).update(Ro).digestInto(c), n.set(c, t.outputLen * l), o._cloneInto(a);
5268
5218
  return o.destroy(), a.destroy(), c.fill(0), Ro.fill(0), n.slice(0, r);
5269
5219
  }
5270
- const Wg = (t, e, s, r, i) => jg(t, qg(t, e, s), r, i);
5271
- function Hg(t, e, s, r) {
5220
+ const Hg = (t, e, s, r, i) => jg(t, qg(t, e, s), r, i);
5221
+ function Wg(t, e, s, r) {
5272
5222
  if (typeof t.setBigUint64 == "function") return t.setBigUint64(e, s, r);
5273
5223
  const i = BigInt(32), n = BigInt(4294967295), o = Number(s >> i & n), a = Number(s & n), c = r ? 4 : 0, l = r ? 0 : 4;
5274
5224
  t.setUint32(e + c, o, r), t.setUint32(e + l, a, r);
@@ -5305,7 +5255,7 @@ let Kg = class extends hc {
5305
5255
  let { pos: o } = this;
5306
5256
  s[o++] = 128, this.buffer.subarray(o).fill(0), this.padOffset > i - o && (this.process(r, 0), o = 0);
5307
5257
  for (let h = o; h < i; h++) s[h] = 0;
5308
- Hg(r, i - 8, BigInt(this.length * 8), n), this.process(r, 0);
5258
+ Wg(r, i - 8, BigInt(this.length * 8), n), this.process(r, 0);
5309
5259
  const a = ko(e), c = this.outputLen;
5310
5260
  if (c % 4) throw new Error("_sha2: outputLen should be aligned to 32bit");
5311
5261
  const l = c / 4, u = this.get();
@@ -6277,24 +6227,24 @@ function ka() {
6277
6227
  return at(t, pt);
6278
6228
  }
6279
6229
  function Mm(t, e) {
6280
- const s = $a.getSharedSecret(At(t, pt), At(e, pt)), r = Wg(bn, s, void 0, void 0, gc);
6230
+ const s = $a.getSharedSecret(At(t, pt), At(e, pt)), r = Hg(bn, s, void 0, void 0, gc);
6281
6231
  return at(r, pt);
6282
6232
  }
6283
6233
  function Fm(t) {
6284
6234
  const e = bn(At(t, pt));
6285
6235
  return at(e, pt);
6286
6236
  }
6287
- function Hn(t) {
6237
+ function Wn(t) {
6288
6238
  const e = bn(At(t, En));
6289
6239
  return at(e, pt);
6290
6240
  }
6291
- function Wh(t) {
6241
+ function Hh(t) {
6292
6242
  return At(`${t}`, qh);
6293
6243
  }
6294
6244
  function dr(t) {
6295
6245
  return Number(at(t, qh));
6296
6246
  }
6297
- function Hh(t) {
6247
+ function Wh(t) {
6298
6248
  return t.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
6299
6249
  }
6300
6250
  function zh(t) {
@@ -6302,31 +6252,31 @@ function zh(t) {
6302
6252
  return e + "=".repeat(s);
6303
6253
  }
6304
6254
  function qm(t) {
6305
- const e = Wh(typeof t.type < "u" ? t.type : jh);
6255
+ const e = Hh(typeof t.type < "u" ? t.type : jh);
6306
6256
  if (dr(e) === Ii && typeof t.senderPublicKey > "u") throw new Error("Missing sender public key for type 1 envelope");
6307
6257
  const s = typeof t.senderPublicKey < "u" ? At(t.senderPublicKey, pt) : void 0, r = typeof t.iv < "u" ? At(t.iv, pt) : Ei(Yi), i = At(t.symKey, pt), n = Ph(i, r).encrypt(At(t.message, En)), o = Vh({ type: e, sealed: n, iv: r, senderPublicKey: s });
6308
- return t.encoding === fc ? Hh(o) : o;
6258
+ return t.encoding === fc ? Wh(o) : o;
6309
6259
  }
6310
6260
  function jm(t) {
6311
6261
  const e = At(t.symKey, pt), { sealed: s, iv: r } = an({ encoded: t.encoded, encoding: t.encoding }), i = Ph(e, r).decrypt(s);
6312
6262
  if (i === null) throw new Error("Failed to decrypt");
6313
6263
  return at(i, En);
6314
6264
  }
6315
- function Wm(t, e) {
6316
- const s = Wh(mo), r = Ei(Yi), i = At(t, En), n = Vh({ type: s, sealed: i, iv: r });
6317
- return e === fc ? Hh(n) : n;
6318
- }
6319
6265
  function Hm(t, e) {
6266
+ const s = Hh(mo), r = Ei(Yi), i = At(t, En), n = Vh({ type: s, sealed: i, iv: r });
6267
+ return e === fc ? Wh(n) : n;
6268
+ }
6269
+ function Wm(t, e) {
6320
6270
  const { sealed: s } = an({ encoded: t, encoding: e });
6321
6271
  return at(s, En);
6322
6272
  }
6323
6273
  function Vh(t) {
6324
- if (dr(t.type) === mo) return at(Hi([t.type, t.sealed]), or);
6274
+ if (dr(t.type) === mo) return at(Wi([t.type, t.sealed]), or);
6325
6275
  if (dr(t.type) === Ii) {
6326
6276
  if (typeof t.senderPublicKey > "u") throw new Error("Missing sender public key for type 1 envelope");
6327
- return at(Hi([t.type, t.senderPublicKey, t.iv, t.sealed]), or);
6277
+ return at(Wi([t.type, t.senderPublicKey, t.iv, t.sealed]), or);
6328
6278
  }
6329
- return at(Hi([t.type, t.iv, t.sealed]), or);
6279
+ return at(Wi([t.type, t.iv, t.sealed]), or);
6330
6280
  }
6331
6281
  function an(t) {
6332
6282
  const e = (t.encoding || or) === fc ? zh(t.encoded) : t.encoded, s = At(e, or), r = s.slice(Lm, dl), i = dl;
@@ -6361,13 +6311,13 @@ function fl(t) {
6361
6311
  }
6362
6312
  function Vm(t) {
6363
6313
  const e = ot.from(t.x, "base64"), s = ot.from(t.y, "base64");
6364
- return Hi([new Uint8Array([4]), e, s]);
6314
+ return Wi([new Uint8Array([4]), e, s]);
6365
6315
  }
6366
6316
  function Km(t, e) {
6367
6317
  const [s, r, i] = t.split("."), n = ot.from(zh(i), "base64");
6368
6318
  if (n.length !== 64) throw new Error("Invalid signature length");
6369
6319
  const o = n.slice(0, 32), a = n.slice(32, 64), c = `${s}.${r}`, l = bn(c), u = Vm(e);
6370
- if (!Dm.verify(Hi([o, a]), l, u)) throw new Error("Invalid signature");
6320
+ if (!Dm.verify(Wi([o, a]), l, u)) throw new Error("Invalid signature");
6371
6321
  return wa(t).payload;
6372
6322
  }
6373
6323
  const Gm = "irn";
@@ -6515,7 +6465,7 @@ function lw() {
6515
6465
  return wn() && xt.getDocument() ? ((t = xt.getDocument()) == null ? void 0 : t.visibilityState) === "visible" : !0;
6516
6466
  }
6517
6467
  const Jh = "wc", Yh = 2, Ra = "core", hs = `${Jh}@2:${Ra}:`, uw = { logger: "error" }, hw = { database: ":memory:" }, dw = "crypto", yl = "client_ed25519_seed", pw = F.ONE_DAY, fw = "keychain", gw = "0.3", mw = "messages", ww = "0.3", bl = F.SIX_HOURS, yw = "publisher", Zh = "irn", bw = "error", Xh = "wss://relay.walletconnect.org", vw = "relayer", Ge = { message: "relayer_message", message_ack: "relayer_message_ack", connect: "relayer_connect", disconnect: "relayer_disconnect", error: "relayer_error", connection_stalled: "relayer_connection_stalled", transport_closed: "relayer_transport_closed", publish: "relayer_publish" }, Ew = "_subscription", Mt = { payload: "payload", connect: "connect", disconnect: "disconnect", error: "error" }, Cw = 0.1, Ua = "2.21.0", xe = { link_mode: "link_mode", relay: "relay" }, zn = { inbound: "inbound", outbound: "outbound" }, Iw = "0.3", Aw = "WALLETCONNECT_CLIENT_ID", vl = "WALLETCONNECT_LINK_MODE_APPS", St = { created: "subscription_created", deleted: "subscription_deleted", expired: "subscription_expired", disabled: "subscription_disabled", sync: "subscription_sync", resubscribed: "subscription_resubscribed" }, Nw = "subscription", _w = "0.3", Sw = "pairing", Pw = "0.3", Oi = { wc_pairingDelete: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1e3 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1001 } }, wc_pairingPing: { req: { ttl: F.THIRTY_SECONDS, prompt: !1, tag: 1002 }, res: { ttl: F.THIRTY_SECONDS, prompt: !1, tag: 1003 } }, unregistered_method: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 0 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 0 } } }, Qs = { create: "pairing_create", expire: "pairing_expire", delete: "pairing_delete", ping: "pairing_ping" }, Vt = { created: "history_created", updated: "history_updated", deleted: "history_deleted", sync: "history_sync" }, Ow = "history", Tw = "0.3", $w = "expirer", jt = { created: "expirer_created", deleted: "expirer_deleted", expired: "expirer_expired", sync: "expirer_sync" }, kw = "0.3", xw = "verify-api", Rw = "https://verify.walletconnect.com", Qh = "https://verify.walletconnect.org", Zi = Qh, Uw = `${Zi}/v3`, Dw = [Rw, Qh], Lw = "echo", Bw = "https://echo.walletconnect.com", os = { pairing_started: "pairing_started", pairing_uri_validation_success: "pairing_uri_validation_success", pairing_uri_not_expired: "pairing_uri_not_expired", store_new_pairing: "store_new_pairing", subscribing_pairing_topic: "subscribing_pairing_topic", subscribe_pairing_topic_success: "subscribe_pairing_topic_success", existing_pairing: "existing_pairing", pairing_not_expired: "pairing_not_expired", emit_inactive_pairing: "emit_inactive_pairing", emit_session_proposal: "emit_session_proposal", subscribing_to_pairing_topic: "subscribing_to_pairing_topic" }, ws = { no_wss_connection: "no_wss_connection", no_internet_connection: "no_internet_connection", malformed_pairing_uri: "malformed_pairing_uri", active_pairing_already_exists: "active_pairing_already_exists", subscribe_pairing_topic_failure: "subscribe_pairing_topic_failure", pairing_expired: "pairing_expired", proposal_expired: "proposal_expired", proposal_listener_not_found: "proposal_listener_not_found" }, Kt = { session_approve_started: "session_approve_started", proposal_not_expired: "proposal_not_expired", session_namespaces_validation_success: "session_namespaces_validation_success", create_session_topic: "create_session_topic", subscribing_session_topic: "subscribing_session_topic", subscribe_session_topic_success: "subscribe_session_topic_success", publishing_session_approve: "publishing_session_approve", session_approve_publish_success: "session_approve_publish_success", store_session: "store_session", publishing_session_settle: "publishing_session_settle", session_settle_publish_success: "session_settle_publish_success" }, Ks = { no_internet_connection: "no_internet_connection", no_wss_connection: "no_wss_connection", proposal_expired: "proposal_expired", subscribe_session_topic_failure: "subscribe_session_topic_failure", session_approve_publish_failure: "session_approve_publish_failure", session_settle_publish_failure: "session_settle_publish_failure", session_approve_namespace_validation_failure: "session_approve_namespace_validation_failure", proposal_not_found: "proposal_not_found" }, Gs = { authenticated_session_approve_started: "authenticated_session_approve_started", create_authenticated_session_topic: "create_authenticated_session_topic", cacaos_verified: "cacaos_verified", store_authenticated_session: "store_authenticated_session", subscribing_authenticated_session_topic: "subscribing_authenticated_session_topic", subscribe_authenticated_session_topic_success: "subscribe_authenticated_session_topic_success", publishing_authenticated_session_approve: "publishing_authenticated_session_approve" }, Ti = { no_internet_connection: "no_internet_connection", invalid_cacao: "invalid_cacao", subscribe_authenticated_session_topic_failure: "subscribe_authenticated_session_topic_failure", authenticated_session_approve_publish_failure: "authenticated_session_approve_publish_failure", authenticated_session_pending_request_not_found: "authenticated_session_pending_request_not_found" }, Mw = 0.1, Fw = "event-client", qw = 86400, jw = "https://pulse.walletconnect.org/batch";
6518
- function Ww(t, e) {
6468
+ function Hw(t, e) {
6519
6469
  if (t.length >= 255) throw new TypeError("Alphabet too long");
6520
6470
  for (var s = new Uint8Array(256), r = 0; r < s.length; r++) s[r] = 255;
6521
6471
  for (var i = 0; i < t.length; i++) {
@@ -6564,7 +6514,7 @@ function Ww(t, e) {
6564
6514
  }
6565
6515
  return { encode: h, decodeUnsafe: d, decode: g };
6566
6516
  }
6567
- var Hw = Ww, zw = Hw;
6517
+ var Ww = Hw, zw = Ww;
6568
6518
  const ed = (t) => {
6569
6519
  if (t instanceof Uint8Array && t.constructor.name === "Uint8Array") return t;
6570
6520
  if (t instanceof ArrayBuffer) return new Uint8Array(t);
@@ -6693,8 +6643,8 @@ function Da(t, r) {
6693
6643
  } while (o >= jy);
6694
6644
  return Da.bytes = n - r, s;
6695
6645
  }
6696
- var Wy = Math.pow(2, 7), Hy = Math.pow(2, 14), zy = Math.pow(2, 21), Vy = Math.pow(2, 28), Ky = Math.pow(2, 35), Gy = Math.pow(2, 42), Jy = Math.pow(2, 49), Yy = Math.pow(2, 56), Zy = Math.pow(2, 63), Xy = function(t) {
6697
- return t < Wy ? 1 : t < Hy ? 2 : t < zy ? 3 : t < Vy ? 4 : t < Ky ? 5 : t < Gy ? 6 : t < Jy ? 7 : t < Yy ? 8 : t < Zy ? 9 : 10;
6646
+ var Hy = Math.pow(2, 7), Wy = Math.pow(2, 14), zy = Math.pow(2, 21), Vy = Math.pow(2, 28), Ky = Math.pow(2, 35), Gy = Math.pow(2, 42), Jy = Math.pow(2, 49), Yy = Math.pow(2, 56), Zy = Math.pow(2, 63), Xy = function(t) {
6647
+ return t < Hy ? 1 : t < Wy ? 2 : t < zy ? 3 : t < Vy ? 4 : t < Ky ? 5 : t < Gy ? 6 : t < Jy ? 7 : t < Yy ? 8 : t < Zy ? 9 : 10;
6698
6648
  }, Qy = { encode: By, decode: qy, encodingLength: Xy }, id = Qy;
6699
6649
  const Il = (t, e, s = 0) => (id.encode(t, e, s), e), Al = (t) => id.encodingLength(t), La = (t, e) => {
6700
6650
  const s = e.byteLength, r = Al(t), i = r + Al(s), n = new Uint8Array(i + s);
@@ -6730,7 +6680,7 @@ function l0(t = 0) {
6730
6680
  function ld(t, e, s, r) {
6731
6681
  return { name: t, prefix: e, encoder: { name: t, prefix: e, encode: s }, decoder: { decode: r } };
6732
6682
  }
6733
- const _l = ld("utf8", "u", (t) => "u" + new TextDecoder("utf8").decode(t), (t) => new TextEncoder().encode(t.substring(1))), Wo = ld("ascii", "a", (t) => {
6683
+ const _l = ld("utf8", "u", (t) => "u" + new TextDecoder("utf8").decode(t), (t) => new TextEncoder().encode(t.substring(1))), Ho = ld("ascii", "a", (t) => {
6734
6684
  let e = "a";
6735
6685
  for (let s = 0; s < t.length; s++) e += String.fromCharCode(t[s]);
6736
6686
  return e;
@@ -6739,7 +6689,7 @@ const _l = ld("utf8", "u", (t) => "u" + new TextDecoder("utf8").decode(t), (t) =
6739
6689
  const e = l0(t.length);
6740
6690
  for (let s = 0; s < t.length; s++) e[s] = t.charCodeAt(s);
6741
6691
  return e;
6742
- }), u0 = { utf8: _l, "utf-8": _l, hex: Nl.base16, latin1: Wo, ascii: Wo, binary: Wo, ...Nl };
6692
+ }), u0 = { utf8: _l, "utf-8": _l, hex: Nl.base16, latin1: Ho, ascii: Ho, binary: Ho, ...Nl };
6743
6693
  function h0(t, e = "utf8") {
6744
6694
  const s = u0[e];
6745
6695
  if (!s) throw new Error(`Unsupported encoding "${e}"`);
@@ -6822,7 +6772,7 @@ let w0 = class {
6822
6772
  }), tt(this, "encode", async (i, n, o) => {
6823
6773
  this.isInitialized();
6824
6774
  const a = Kh(o), c = bp(n);
6825
- if (fl(a)) return Wm(c, o == null ? void 0 : o.encoding);
6775
+ if (fl(a)) return Hm(c, o == null ? void 0 : o.encoding);
6826
6776
  if (pl(a)) {
6827
6777
  const d = a.senderPublicKey, g = a.receiverPublicKey;
6828
6778
  i = await this.generateSharedKey(d, g);
@@ -6833,7 +6783,7 @@ let w0 = class {
6833
6783
  this.isInitialized();
6834
6784
  const a = zm(n, o);
6835
6785
  if (fl(a)) {
6836
- const c = Hm(n, o == null ? void 0 : o.encoding);
6786
+ const c = Wm(n, o == null ? void 0 : o.encoding);
6837
6787
  return $c(c);
6838
6788
  }
6839
6789
  if (pl(a)) {
@@ -6905,7 +6855,7 @@ let N0 = class extends Pf {
6905
6855
  }
6906
6856
  }), _t(this, "set", async (r, i, n) => {
6907
6857
  this.isInitialized();
6908
- const o = Hn(i);
6858
+ const o = Wn(i);
6909
6859
  let a = this.messages.get(r);
6910
6860
  if (typeof a > "u" && (a = {}), typeof a[o] < "u") return o;
6911
6861
  if (a[o] = i, this.messages.set(r, a), n === zn.inbound) {
@@ -6927,13 +6877,13 @@ let N0 = class extends Pf {
6927
6877
  return i;
6928
6878
  }), _t(this, "has", (r, i) => {
6929
6879
  this.isInitialized();
6930
- const n = this.get(r), o = Hn(i);
6880
+ const n = this.get(r), o = Wn(i);
6931
6881
  return typeof n[o] < "u";
6932
6882
  }), _t(this, "ack", async (r, i) => {
6933
6883
  this.isInitialized();
6934
6884
  const n = this.messagesWithoutClientAck.get(r);
6935
6885
  if (typeof n > "u") return;
6936
- const o = Hn(i);
6886
+ const o = Wn(i);
6937
6887
  delete n[o], Object.keys(n).length === 0 ? this.messagesWithoutClientAck.delete(r) : this.messagesWithoutClientAck.set(r, n), await this.persist();
6938
6888
  }), _t(this, "del", async (r) => {
6939
6889
  this.isInitialized(), this.messages.delete(r), this.messagesWithoutClientAck.delete(r), await this.persist();
@@ -6976,7 +6926,7 @@ var _0 = Object.defineProperty, S0 = Object.defineProperties, P0 = Object.getOwn
6976
6926
  for (var s in e || (e = {})) O0.call(e, s) && Ma(t, s, e[s]);
6977
6927
  if (Pl) for (var s of Pl(e)) T0.call(e, s) && Ma(t, s, e[s]);
6978
6928
  return t;
6979
- }, Ho = (t, e) => S0(t, P0(e)), Gt = (t, e, s) => Ma(t, typeof e != "symbol" ? e + "" : e, s);
6929
+ }, Wo = (t, e) => S0(t, P0(e)), Gt = (t, e, s) => Ma(t, typeof e != "symbol" ? e + "" : e, s);
6980
6930
  class $0 extends Of {
6981
6931
  constructor(e, s) {
6982
6932
  super(e, s), this.relayer = e, this.logger = s, Gt(this, "events", new mr.EventEmitter()), Gt(this, "name", yw), Gt(this, "queue", /* @__PURE__ */ new Map()), Gt(this, "publishTimeout", F.toMiliseconds(F.ONE_MINUTE)), Gt(this, "initialPublishTimeout", F.toMiliseconds(F.ONE_SECOND * 15)), Gt(this, "needsTransportRestart", !1), Gt(this, "publish", async (r, i, n) => {
@@ -6997,7 +6947,7 @@ class $0 extends Of {
6997
6947
  try {
6998
6948
  await m, this.events.removeListener(Ge.publish, p);
6999
6949
  } catch (w) {
7000
- this.queue.set(h, Ho(kn({}, d), { attempt: 1 })), this.logger.warn(w, w == null ? void 0 : w.message);
6950
+ this.queue.set(h, Wo(kn({}, d), { attempt: 1 })), this.logger.warn(w, w == null ? void 0 : w.message);
7001
6951
  }
7002
6952
  });
7003
6953
  this.logger.trace({ type: "method", method: "publish", params: { id: h, topic: r, message: i, opts: n } }), await Ds(y, this.publishTimeout, g);
@@ -7032,9 +6982,9 @@ class $0 extends Of {
7032
6982
  checkQueue() {
7033
6983
  this.queue.forEach(async (e, s) => {
7034
6984
  const r = e.attempt + 1;
7035
- this.queue.set(s, Ho(kn({}, e), { attempt: r }));
6985
+ this.queue.set(s, Wo(kn({}, e), { attempt: r }));
7036
6986
  const { topic: i, message: n, opts: o, attestation: a } = e;
7037
- this.logger.warn({}, `Publisher: queue->publishing: ${e.opts.id}, tag: ${e.opts.tag}, attempt: ${r}`), await this.rpcPublish(Ho(kn({}, e), { topic: i, message: n, ttl: o.ttl, prompt: o.prompt, tag: o.tag, id: o.id, attestation: a, tvf: o.tvf })), this.logger.warn({}, `Publisher: queue->published: ${e.opts.id}`);
6987
+ this.logger.warn({}, `Publisher: queue->publishing: ${e.opts.id}, tag: ${e.opts.tag}, attempt: ${r}`), await this.rpcPublish(Wo(kn({}, e), { topic: i, message: n, ttl: o.ttl, prompt: o.prompt, tag: o.tag, id: o.id, attestation: a, tvf: o.tvf })), this.logger.warn({}, `Publisher: queue->published: ${e.opts.id}`);
7038
6988
  });
7039
6989
  }
7040
6990
  registerEventListeners() {
@@ -7340,15 +7290,15 @@ let F0 = class extends kf {
7340
7290
  return this.clientId || (this.clientId = await this.relayer.core.crypto.getClientId()), this.clientId;
7341
7291
  }
7342
7292
  async getSubscriptionId(e) {
7343
- return Hn(e + await this.getClientId());
7293
+ return Wn(e + await this.getClientId());
7344
7294
  }
7345
7295
  };
7346
- var q0 = Object.defineProperty, Tl = Object.getOwnPropertySymbols, j0 = Object.prototype.hasOwnProperty, W0 = Object.prototype.propertyIsEnumerable, qa = (t, e, s) => e in t ? q0(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, $l = (t, e) => {
7296
+ var q0 = Object.defineProperty, Tl = Object.getOwnPropertySymbols, j0 = Object.prototype.hasOwnProperty, H0 = Object.prototype.propertyIsEnumerable, qa = (t, e, s) => e in t ? q0(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, $l = (t, e) => {
7347
7297
  for (var s in e || (e = {})) j0.call(e, s) && qa(t, s, e[s]);
7348
- if (Tl) for (var s of Tl(e)) W0.call(e, s) && qa(t, s, e[s]);
7298
+ if (Tl) for (var s of Tl(e)) H0.call(e, s) && qa(t, s, e[s]);
7349
7299
  return t;
7350
7300
  }, me = (t, e, s) => qa(t, typeof e != "symbol" ? e + "" : e, s);
7351
- let H0 = class extends Tf {
7301
+ let W0 = class extends Tf {
7352
7302
  constructor(e) {
7353
7303
  super(e), me(this, "protocol", "wc"), me(this, "version", 2), me(this, "core"), me(this, "logger"), me(this, "events", new mr.EventEmitter()), me(this, "provider"), me(this, "messages"), me(this, "subscriber"), me(this, "publisher"), me(this, "name", vw), me(this, "transportExplicitlyClosed", !1), me(this, "initialized", !1), me(this, "connectionAttemptInProgress", !1), me(this, "relayUrl"), me(this, "projectId"), me(this, "packageName"), me(this, "bundleId"), me(this, "hasExperiencedNetworkDisruption", !1), me(this, "pingTimeout"), me(this, "heartBeatTimeout", F.toMiliseconds(F.THIRTY_SECONDS + F.FIVE_SECONDS)), me(this, "reconnectTimeout"), me(this, "connectPromise"), me(this, "reconnectInProgress", !1), me(this, "requestsInFlight", []), me(this, "connectTimeout", F.toMiliseconds(F.ONE_SECOND * 15)), me(this, "request", async (s) => {
7354
7304
  var r, i;
@@ -7534,7 +7484,7 @@ let H0 = class extends Tf {
7534
7484
  async createProvider() {
7535
7485
  this.provider.connection && this.unregisterProviderListeners();
7536
7486
  const e = await this.core.crypto.signJWT(this.relayUrl);
7537
- this.provider = new Wt(new mp(zf({ sdkVersion: Ua, protocol: this.protocol, version: this.version, relayUrl: this.relayUrl, projectId: this.projectId, auth: e, useOnCloseEvent: !0, bundleId: this.bundleId, packageName: this.packageName }))), this.registerProviderListeners();
7487
+ this.provider = new Ht(new mp(zf({ sdkVersion: Ua, protocol: this.protocol, version: this.version, relayUrl: this.relayUrl, projectId: this.projectId, auth: e, useOnCloseEvent: !0, bundleId: this.bundleId, packageName: this.packageName }))), this.registerProviderListeners();
7538
7488
  }
7539
7489
  async recordMessageEvent(e, s) {
7540
7490
  const { topic: r, message: i } = e;
@@ -7873,7 +7823,7 @@ let Ab = class {
7873
7823
  }), ce(this, "deletePairing", async (r, i) => {
7874
7824
  await this.core.relayer.unsubscribe(r), await Promise.all([this.pairings.delete(r, qi("USER_DISCONNECTED")), this.core.crypto.deleteSymKey(r), i ? Promise.resolve() : this.core.expirer.del(r)]);
7875
7825
  }), ce(this, "cleanup", async () => {
7876
- const r = this.pairings.getAll().filter((i) => Wc(i.expiry));
7826
+ const r = this.pairings.getAll().filter((i) => Hc(i.expiry));
7877
7827
  await Promise.all(r.map((i) => this.deletePairing(i.topic)));
7878
7828
  }), ce(this, "onRelayEventRequest", async (r) => {
7879
7829
  const { topic: i, payload: n } = r;
@@ -7970,7 +7920,7 @@ let Ab = class {
7970
7920
  const { message: i } = ve("NO_MATCHING_KEY", `pairing topic doesn't exist: ${r}`);
7971
7921
  throw new Error(i);
7972
7922
  }
7973
- if (Wc(this.pairings.get(r).expiry)) {
7923
+ if (Hc(this.pairings.get(r).expiry)) {
7974
7924
  await this.deletePairing(r);
7975
7925
  const { message: i } = ve("EXPIRED", `pairing topic: ${r}`);
7976
7926
  throw new Error(i);
@@ -8356,46 +8306,46 @@ let Db = class extends Uf {
8356
8306
  }), this.logger = ft(s, this.context);
8357
8307
  }
8358
8308
  };
8359
- var Lb = Object.defineProperty, Ml = Object.getOwnPropertySymbols, Bb = Object.prototype.hasOwnProperty, Mb = Object.prototype.propertyIsEnumerable, Wa = (t, e, s) => e in t ? Lb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ki = (t, e) => {
8360
- for (var s in e || (e = {})) Bb.call(e, s) && Wa(t, s, e[s]);
8361
- if (Ml) for (var s of Ml(e)) Mb.call(e, s) && Wa(t, s, e[s]);
8309
+ var Lb = Object.defineProperty, Ml = Object.getOwnPropertySymbols, Bb = Object.prototype.hasOwnProperty, Mb = Object.prototype.propertyIsEnumerable, Ha = (t, e, s) => e in t ? Lb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ki = (t, e) => {
8310
+ for (var s in e || (e = {})) Bb.call(e, s) && Ha(t, s, e[s]);
8311
+ if (Ml) for (var s of Ml(e)) Mb.call(e, s) && Ha(t, s, e[s]);
8362
8312
  return t;
8363
- }, We = (t, e, s) => Wa(t, typeof e != "symbol" ? e + "" : e, s);
8313
+ }, He = (t, e, s) => Ha(t, typeof e != "symbol" ? e + "" : e, s);
8364
8314
  class Fb extends Df {
8365
8315
  constructor(e, s, r = !0) {
8366
- super(e, s, r), this.core = e, this.logger = s, We(this, "context", Fw), We(this, "storagePrefix", hs), We(this, "storageVersion", Mw), We(this, "events", /* @__PURE__ */ new Map()), We(this, "shouldPersist", !1), We(this, "init", async () => {
8316
+ super(e, s, r), this.core = e, this.logger = s, He(this, "context", Fw), He(this, "storagePrefix", hs), He(this, "storageVersion", Mw), He(this, "events", /* @__PURE__ */ new Map()), He(this, "shouldPersist", !1), He(this, "init", async () => {
8367
8317
  if (!wh()) try {
8368
- const i = { eventId: Hc(), timestamp: Date.now(), domain: this.getAppDomain(), props: { event: "INIT", type: "", properties: { client_id: await this.core.crypto.getClientId(), user_agent: gh(this.core.relayer.protocol, this.core.relayer.version, Ua) } } };
8318
+ const i = { eventId: Wc(), timestamp: Date.now(), domain: this.getAppDomain(), props: { event: "INIT", type: "", properties: { client_id: await this.core.crypto.getClientId(), user_agent: gh(this.core.relayer.protocol, this.core.relayer.version, Ua) } } };
8369
8319
  await this.sendEvent([i]);
8370
8320
  } catch (i) {
8371
8321
  this.logger.warn(i);
8372
8322
  }
8373
- }), We(this, "createEvent", (i) => {
8374
- const { event: n = "ERROR", type: o = "", properties: { topic: a, trace: c } } = i, l = Hc(), u = this.core.projectId || "", h = Date.now(), d = ki({ eventId: l, timestamp: h, props: { event: n, type: o, properties: { topic: a, trace: c } }, bundleId: u, domain: this.getAppDomain() }, this.setMethods(l));
8323
+ }), He(this, "createEvent", (i) => {
8324
+ const { event: n = "ERROR", type: o = "", properties: { topic: a, trace: c } } = i, l = Wc(), u = this.core.projectId || "", h = Date.now(), d = ki({ eventId: l, timestamp: h, props: { event: n, type: o, properties: { topic: a, trace: c } }, bundleId: u, domain: this.getAppDomain() }, this.setMethods(l));
8375
8325
  return this.telemetryEnabled && (this.events.set(l, d), this.shouldPersist = !0), d;
8376
- }), We(this, "getEvent", (i) => {
8326
+ }), He(this, "getEvent", (i) => {
8377
8327
  const { eventId: n, topic: o } = i;
8378
8328
  if (n) return this.events.get(n);
8379
8329
  const a = Array.from(this.events.values()).find((c) => c.props.properties.topic === o);
8380
8330
  if (a) return ki(ki({}, a), this.setMethods(a.eventId));
8381
- }), We(this, "deleteEvent", (i) => {
8331
+ }), He(this, "deleteEvent", (i) => {
8382
8332
  const { eventId: n } = i;
8383
8333
  this.events.delete(n), this.shouldPersist = !0;
8384
- }), We(this, "setEventListeners", () => {
8334
+ }), He(this, "setEventListeners", () => {
8385
8335
  this.core.heartbeat.on(vi.pulse, async () => {
8386
8336
  this.shouldPersist && await this.persist(), this.events.forEach((i) => {
8387
8337
  F.fromMiliseconds(Date.now()) - F.fromMiliseconds(i.timestamp) > qw && (this.events.delete(i.eventId), this.shouldPersist = !0);
8388
8338
  });
8389
8339
  });
8390
- }), We(this, "setMethods", (i) => ({ addTrace: (n) => this.addTrace(i, n), setError: (n) => this.setError(i, n) })), We(this, "addTrace", (i, n) => {
8340
+ }), He(this, "setMethods", (i) => ({ addTrace: (n) => this.addTrace(i, n), setError: (n) => this.setError(i, n) })), He(this, "addTrace", (i, n) => {
8391
8341
  const o = this.events.get(i);
8392
8342
  o && (o.props.properties.trace.push(n), this.events.set(i, o), this.shouldPersist = !0);
8393
- }), We(this, "setError", (i, n) => {
8343
+ }), He(this, "setError", (i, n) => {
8394
8344
  const o = this.events.get(i);
8395
8345
  o && (o.props.type = n, o.timestamp = Date.now(), this.events.set(i, o), this.shouldPersist = !0);
8396
- }), We(this, "persist", async () => {
8346
+ }), He(this, "persist", async () => {
8397
8347
  await this.core.storage.setItem(this.storageKey, Array.from(this.events.values())), this.shouldPersist = !1;
8398
- }), We(this, "restore", async () => {
8348
+ }), He(this, "restore", async () => {
8399
8349
  try {
8400
8350
  const i = await this.core.storage.getItem(this.storageKey) || [];
8401
8351
  if (!i.length) return;
@@ -8405,7 +8355,7 @@ class Fb extends Df {
8405
8355
  } catch (i) {
8406
8356
  this.logger.warn(i);
8407
8357
  }
8408
- }), We(this, "submit", async () => {
8358
+ }), He(this, "submit", async () => {
8409
8359
  if (!this.telemetryEnabled || this.events.size === 0) return;
8410
8360
  const i = [];
8411
8361
  for (const [n, o] of this.events) o.props.type && i.push(o);
@@ -8414,10 +8364,10 @@ class Fb extends Df {
8414
8364
  } catch (n) {
8415
8365
  this.logger.warn(n);
8416
8366
  }
8417
- }), We(this, "sendEvent", async (i) => {
8367
+ }), He(this, "sendEvent", async (i) => {
8418
8368
  const n = this.getAppDomain() ? "" : "&sp=desktop";
8419
8369
  return await fetch(`${jw}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${Ua}${n}`, { method: "POST", body: JSON.stringify(i) });
8420
- }), We(this, "getAppDomain", () => jf().url), this.logger = ft(s, this.context), this.telemetryEnabled = r, r ? this.restore().then(async () => {
8370
+ }), He(this, "getAppDomain", () => jf().url), this.logger = ft(s, this.context), this.telemetryEnabled = r, r ? this.restore().then(async () => {
8421
8371
  await this.submit(), this.setEventListeners();
8422
8372
  }) : this.persist();
8423
8373
  }
@@ -8425,12 +8375,12 @@ class Fb extends Df {
8425
8375
  return this.storagePrefix + this.storageVersion + this.core.customStoragePrefix + "//" + this.context;
8426
8376
  }
8427
8377
  }
8428
- var qb = Object.defineProperty, Fl = Object.getOwnPropertySymbols, jb = Object.prototype.hasOwnProperty, Wb = Object.prototype.propertyIsEnumerable, Ha = (t, e, s) => e in t ? qb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ql = (t, e) => {
8429
- for (var s in e || (e = {})) jb.call(e, s) && Ha(t, s, e[s]);
8430
- if (Fl) for (var s of Fl(e)) Wb.call(e, s) && Ha(t, s, e[s]);
8378
+ var qb = Object.defineProperty, Fl = Object.getOwnPropertySymbols, jb = Object.prototype.hasOwnProperty, Hb = Object.prototype.propertyIsEnumerable, Wa = (t, e, s) => e in t ? qb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ql = (t, e) => {
8379
+ for (var s in e || (e = {})) jb.call(e, s) && Wa(t, s, e[s]);
8380
+ if (Fl) for (var s of Fl(e)) Hb.call(e, s) && Wa(t, s, e[s]);
8431
8381
  return t;
8432
- }, ke = (t, e, s) => Ha(t, typeof e != "symbol" ? e + "" : e, s);
8433
- let Hb = class ud extends If {
8382
+ }, ke = (t, e, s) => Wa(t, typeof e != "symbol" ? e + "" : e, s);
8383
+ let Wb = class ud extends If {
8434
8384
  constructor(e) {
8435
8385
  var s;
8436
8386
  super(e), ke(this, "protocol", Jh), ke(this, "version", Yh), ke(this, "name", Ra), ke(this, "relayUrl"), ke(this, "projectId"), ke(this, "customStoragePrefix"), ke(this, "events", new mr.EventEmitter()), ke(this, "logger"), ke(this, "heartbeat"), ke(this, "relayer"), ke(this, "crypto"), ke(this, "storage"), ke(this, "history"), ke(this, "expirer"), ke(this, "pairing"), ke(this, "verify"), ke(this, "echoClient"), ke(this, "linkModeSupportedApps"), ke(this, "eventClient"), ke(this, "initialized", !1), ke(this, "logChunkController"), ke(this, "on", (a, c) => this.events.on(a, c)), ke(this, "once", (a, c) => this.events.once(a, c)), ke(this, "off", (a, c) => this.events.off(a, c)), ke(this, "removeListener", (a, c) => this.events.removeListener(a, c)), ke(this, "dispatchEnvelope", ({ topic: a, message: c, sessionExists: l }) => {
@@ -8441,15 +8391,14 @@ let Hb = class ud extends If {
8441
8391
  const r = this.getGlobalCore(e == null ? void 0 : e.customStoragePrefix);
8442
8392
  if (r) try {
8443
8393
  return this.customStoragePrefix = r.customStoragePrefix, this.logger = r.logger, this.heartbeat = r.heartbeat, this.crypto = r.crypto, this.history = r.history, this.expirer = r.expirer, this.storage = r.storage, this.relayer = r.relayer, this.pairing = r.pairing, this.verify = r.verify, this.echoClient = r.echoClient, this.linkModeSupportedApps = r.linkModeSupportedApps, this.eventClient = r.eventClient, this.initialized = r.initialized, this.logChunkController = r.logChunkController, r;
8444
- } catch (a) {
8445
- console.warn("Failed to copy global core", a);
8394
+ } catch {
8446
8395
  }
8447
8396
  this.projectId = e == null ? void 0 : e.projectId, this.relayUrl = (e == null ? void 0 : e.relayUrl) || Xh, this.customStoragePrefix = e != null && e.customStoragePrefix ? `:${e.customStoragePrefix}` : "";
8448
8397
  const i = fn({ level: typeof (e == null ? void 0 : e.logger) == "string" && e.logger ? e.logger : uw.logger, name: Ra }), { logger: n, chunkLoggerController: o } = nh({ opts: i, maxSizeInBytes: e == null ? void 0 : e.maxLogBlobSizeInBytes, loggerOverride: e == null ? void 0 : e.logger });
8449
8398
  this.logChunkController = o, (s = this.logChunkController) != null && s.downloadLogsBlobInBrowser && (window.downloadLogsBlobInBrowser = async () => {
8450
8399
  var a, c;
8451
8400
  (a = this.logChunkController) != null && a.downloadLogsBlobInBrowser && ((c = this.logChunkController) == null || c.downloadLogsBlobInBrowser({ clientId: await this.crypto.getClientId() }));
8452
- }), this.logger = ft(n, this.name), this.heartbeat = new fp(), this.crypto = new w0(this, this.logger, e == null ? void 0 : e.keychain), this.history = new Sb(this, this.logger), this.expirer = new Tb(this, this.logger), this.storage = e != null && e.storage ? e.storage : new gp(ql(ql({}, hw), e == null ? void 0 : e.storageOptions)), this.relayer = new H0({ core: this, logger: this.logger, relayUrl: this.relayUrl, projectId: this.projectId }), this.pairing = new Ab(this, this.logger), this.verify = new xb(this, this.logger, this.storage), this.echoClient = new Db(this.projectId || "", this.logger), this.linkModeSupportedApps = [], this.eventClient = new Fb(this, this.logger, e == null ? void 0 : e.telemetryEnabled), this.setGlobalCore(this);
8401
+ }), this.logger = ft(n, this.name), this.heartbeat = new fp(), this.crypto = new w0(this, this.logger, e == null ? void 0 : e.keychain), this.history = new Sb(this, this.logger), this.expirer = new Tb(this, this.logger), this.storage = e != null && e.storage ? e.storage : new gp(ql(ql({}, hw), e == null ? void 0 : e.storageOptions)), this.relayer = new W0({ core: this, logger: this.logger, relayUrl: this.relayUrl, projectId: this.projectId }), this.pairing = new Ab(this, this.logger), this.verify = new xb(this, this.logger, this.storage), this.echoClient = new Db(this.projectId || "", this.logger), this.linkModeSupportedApps = [], this.eventClient = new Fb(this, this.logger, e == null ? void 0 : e.telemetryEnabled), this.setGlobalCore(this);
8453
8402
  }
8454
8403
  static async init(e) {
8455
8404
  const s = new ud(e);
@@ -8482,9 +8431,8 @@ let Hb = class ud extends If {
8482
8431
  try {
8483
8432
  if (this.isGlobalCoreDisabled()) return;
8484
8433
  const s = `_walletConnectCore_${e}`, r = `${s}_count`;
8485
- return globalThis[r] = (globalThis[r] || 0) + 1, globalThis[r] > 1 && console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[r]} times.`), globalThis[s];
8486
- } catch (s) {
8487
- console.warn("Failed to get global WalletConnect core", s);
8434
+ return globalThis[r] = (globalThis[r] || 0) + 1, globalThis[r] > 1, globalThis[s];
8435
+ } catch {
8488
8436
  return;
8489
8437
  }
8490
8438
  }
@@ -8494,8 +8442,7 @@ let Hb = class ud extends If {
8494
8442
  if (this.isGlobalCoreDisabled()) return;
8495
8443
  const r = `_walletConnectCore_${((s = e.opts) == null ? void 0 : s.customStoragePrefix) || ""}`;
8496
8444
  globalThis[r] = e;
8497
- } catch (r) {
8498
- console.warn("Failed to set global WalletConnect core", r);
8445
+ } catch {
8499
8446
  }
8500
8447
  }
8501
8448
  isGlobalCoreDisabled() {
@@ -8506,7 +8453,7 @@ let Hb = class ud extends If {
8506
8453
  }
8507
8454
  }
8508
8455
  };
8509
- const zb = Hb;
8456
+ const zb = Wb;
8510
8457
  var Vb = Object.defineProperty, Kb = (t, e, s) => e in t ? Vb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, jl = (t, e, s) => Kb(t, typeof e != "symbol" ? e + "" : e, s);
8511
8458
  let Gb = class {
8512
8459
  constructor(e) {
@@ -8525,9 +8472,9 @@ function ei(t) {
8525
8472
  function hd(t, e) {
8526
8473
  return t.includes(":") ? [t] : e.chains || [];
8527
8474
  }
8528
- var Zb = Object.defineProperty, Xb = Object.defineProperties, Qb = Object.getOwnPropertyDescriptors, Wl = Object.getOwnPropertySymbols, ev = Object.prototype.hasOwnProperty, tv = Object.prototype.propertyIsEnumerable, Hl = (t, e, s) => e in t ? Zb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, zl = (t, e) => {
8529
- for (var s in e || (e = {})) ev.call(e, s) && Hl(t, s, e[s]);
8530
- if (Wl) for (var s of Wl(e)) tv.call(e, s) && Hl(t, s, e[s]);
8475
+ var Zb = Object.defineProperty, Xb = Object.defineProperties, Qb = Object.getOwnPropertyDescriptors, Hl = Object.getOwnPropertySymbols, ev = Object.prototype.hasOwnProperty, tv = Object.prototype.propertyIsEnumerable, Wl = (t, e, s) => e in t ? Zb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, zl = (t, e) => {
8476
+ for (var s in e || (e = {})) ev.call(e, s) && Wl(t, s, e[s]);
8477
+ if (Hl) for (var s of Hl(e)) tv.call(e, s) && Wl(t, s, e[s]);
8531
8478
  return t;
8532
8479
  }, sv = (t, e) => Xb(t, Qb(e));
8533
8480
  const rv = "ReactNative", Yr = { reactNative: "react-native", node: "node", browser: "browser", unknown: "unknown" };
@@ -8547,9 +8494,9 @@ function nv(t) {
8547
8494
  var e, s;
8548
8495
  const r = ov();
8549
8496
  try {
8550
- return t != null && t.url && r.url && new URL(t.url).host !== new URL(r.url).host && (console.warn(`The configured WalletConnect 'metadata.url':${t.url} differs from the actual page url:${r.url}. This is probably unintended and can lead to issues.`), t.url = r.url), (e = t == null ? void 0 : t.icons) != null && e.length && t.icons.length > 0 && (t.icons = t.icons.filter((i) => i !== "")), sv(zl(zl({}, r), t), { url: (t == null ? void 0 : t.url) || r.url, name: (t == null ? void 0 : t.name) || r.name, description: (t == null ? void 0 : t.description) || r.description, icons: (s = t == null ? void 0 : t.icons) != null && s.length && t.icons.length > 0 ? t.icons : r.icons });
8551
- } catch (i) {
8552
- return console.warn("Error populating app metadata", i), t || r;
8497
+ return t != null && t.url && r.url && new URL(t.url).host !== new URL(r.url).host && (t.url = r.url), (e = t == null ? void 0 : t.icons) != null && e.length && t.icons.length > 0 && (t.icons = t.icons.filter((i) => i !== "")), sv(zl(zl({}, r), t), { url: (t == null ? void 0 : t.url) || r.url, name: (t == null ? void 0 : t.name) || r.name, description: (t == null ? void 0 : t.description) || r.description, icons: (s = t == null ? void 0 : t.icons) != null && s.length && t.icons.length > 0 ? t.icons : r.icons });
8498
+ } catch {
8499
+ return t || r;
8553
8500
  }
8554
8501
  }
8555
8502
  function ov() {
@@ -8600,14 +8547,11 @@ async function cv({ id: t, topic: e, wcDeepLink: s }) {
8600
8547
  if (typeof n != "string") return;
8601
8548
  const o = lv(n, t, e), a = iv();
8602
8549
  if (a === Yr.browser) {
8603
- if (!((r = xt.getDocument()) != null && r.hasFocus())) {
8604
- console.warn("Document does not have focus, skipping deeplink.");
8550
+ if (!((r = xt.getDocument()) != null && r.hasFocus()))
8605
8551
  return;
8606
- }
8607
8552
  uv(o);
8608
8553
  } else a === Yr.reactNative && typeof (ne == null ? void 0 : ne.Linking) < "u" && await ne.Linking.openURL(o);
8609
- } catch (i) {
8610
- console.error(i);
8554
+ } catch {
8611
8555
  }
8612
8556
  }
8613
8557
  function lv(t, e, s) {
@@ -8629,8 +8573,7 @@ async function hv(t, e) {
8629
8573
  try {
8630
8574
  if (fd() && (s = localStorage.getItem(e), s)) return s;
8631
8575
  s = await t.getItem(e);
8632
- } catch (r) {
8633
- console.error(r);
8576
+ } catch {
8634
8577
  }
8635
8578
  return s;
8636
8579
  }
@@ -8854,14 +8797,14 @@ async function qv(t, e, s, r, i, n) {
8854
8797
  try {
8855
8798
  const a = "0x1626ba7e", c = "0000000000000000000000000000000000000000000000000000000000000040", l = "0000000000000000000000000000000000000000000000000000000000000041", u = s.substring(2), h = Ed(e).substring(2), d = a + h + c + l + u, g = await fetch(`${n || Bv}/?chainId=${r}&projectId=${i}`, { method: "POST", body: JSON.stringify({ id: jv(), jsonrpc: "2.0", method: "eth_call", params: [{ to: t, data: d }, "latest"] }) }), { result: y } = await g.json();
8856
8799
  return y ? y.slice(0, a.length).toLowerCase() === a.toLowerCase() : !1;
8857
- } catch (a) {
8858
- return console.error("isValidEip1271Signature: ", a), !1;
8800
+ } catch {
8801
+ return !1;
8859
8802
  }
8860
8803
  }
8861
8804
  function jv() {
8862
8805
  return Date.now() + Math.floor(Math.random() * 1e3);
8863
8806
  }
8864
- function Wv(t) {
8807
+ function Hv(t) {
8865
8808
  const e = atob(t), s = new Uint8Array(e.length);
8866
8809
  for (let o = 0; o < e.length; o++) s[o] = e.charCodeAt(o);
8867
8810
  const r = s[0];
@@ -8872,7 +8815,7 @@ function Wv(t) {
8872
8815
  const n = ot.from(t, "base64").slice(1, 65);
8873
8816
  return ah.encode(n);
8874
8817
  }
8875
- var Hv = Object.defineProperty, zv = Object.defineProperties, Vv = Object.getOwnPropertyDescriptors, Xl = Object.getOwnPropertySymbols, Kv = Object.prototype.hasOwnProperty, Gv = Object.prototype.propertyIsEnumerable, Ql = (t, e, s) => e in t ? Hv(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Jv = (t, e) => {
8818
+ var Wv = Object.defineProperty, zv = Object.defineProperties, Vv = Object.getOwnPropertyDescriptors, Xl = Object.getOwnPropertySymbols, Kv = Object.prototype.hasOwnProperty, Gv = Object.prototype.propertyIsEnumerable, Ql = (t, e, s) => e in t ? Wv(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Jv = (t, e) => {
8876
8819
  for (var s in e || (e = {})) Kv.call(e, s) && Ql(t, s, e[s]);
8877
8820
  if (Xl) for (var s of Xl(e)) Gv.call(e, s) && Ql(t, s, e[s]);
8878
8821
  return t;
@@ -9512,7 +9455,7 @@ function Od(t) {
9512
9455
  function j1(t, e) {
9513
9456
  return t >> BigInt(e) & vo;
9514
9457
  }
9515
- function W1(t, e, s) {
9458
+ function H1(t, e, s) {
9516
9459
  return t | (s ? vo : bo) << BigInt(e);
9517
9460
  }
9518
9461
  const Ec = (t) => (L1 << BigInt(t - 1)) - vo, Yo = (t) => new Uint8Array(t), hu = (t) => Uint8Array.from(t);
@@ -9543,10 +9486,10 @@ function Td(t, e, s) {
9543
9486
  return o(), d;
9544
9487
  };
9545
9488
  }
9546
- const H1 = { bigint: (t) => typeof t == "bigint", function: (t) => typeof t == "function", boolean: (t) => typeof t == "boolean", string: (t) => typeof t == "string", stringOrUint8Array: (t) => typeof t == "string" || fr(t), isSafeInteger: (t) => Number.isSafeInteger(t), array: (t) => Array.isArray(t), field: (t, e) => e.Fp.isValid(t), hash: (t) => typeof t == "function" && Number.isSafeInteger(t.outputLen) };
9489
+ const W1 = { bigint: (t) => typeof t == "bigint", function: (t) => typeof t == "function", boolean: (t) => typeof t == "boolean", string: (t) => typeof t == "string", stringOrUint8Array: (t) => typeof t == "string" || fr(t), isSafeInteger: (t) => Number.isSafeInteger(t), array: (t) => Array.isArray(t), field: (t, e) => e.Fp.isValid(t), hash: (t) => typeof t == "function" && Number.isSafeInteger(t.outputLen) };
9547
9490
  function Ai(t, e, s = {}) {
9548
9491
  const r = (i, n, o) => {
9549
- const a = H1[n];
9492
+ const a = W1[n];
9550
9493
  if (typeof a != "function") throw new Error("invalid validator function");
9551
9494
  const c = t[i];
9552
9495
  if (!(o && c === void 0) && !a(c, t)) throw new Error("param " + String(i) + " is invalid. Expected " + n + ", got " + c);
@@ -9567,7 +9510,7 @@ function Ja(t) {
9567
9510
  return e.set(s, n), n;
9568
9511
  };
9569
9512
  }
9570
- var V1 = Object.freeze({ __proto__: null, isBytes: fr, abytes: An, abool: pi, bytesToHex: fi, numberToHexUnpadded: Zr, hexToNumber: vc, hexToBytes: gi, bytesToNumberBE: ar, bytesToNumberLE: ln, numberToBytesBE: mi, numberToBytesLE: Eo, numberToVarBytesBE: M1, ensureBytes: Tt, concatBytes: un, equalBytes: F1, utf8ToBytes: q1, inRange: Co, aInRange: Is, bitLen: Od, bitGet: j1, bitSet: W1, bitMask: Ec, createHmacDrbg: Td, validateObject: Ai, notImplemented: z1, memoized: Ja });
9513
+ var V1 = Object.freeze({ __proto__: null, isBytes: fr, abytes: An, abool: pi, bytesToHex: fi, numberToHexUnpadded: Zr, hexToNumber: vc, hexToBytes: gi, bytesToNumberBE: ar, bytesToNumberLE: ln, numberToBytesBE: mi, numberToBytesLE: Eo, numberToVarBytesBE: M1, ensureBytes: Tt, concatBytes: un, equalBytes: F1, utf8ToBytes: q1, inRange: Co, aInRange: Is, bitLen: Od, bitGet: j1, bitSet: H1, bitMask: Ec, createHmacDrbg: Td, validateObject: Ai, notImplemented: z1, memoized: Ja });
9571
9514
  const Xe = BigInt(0), Me = BigInt(1), er = BigInt(2), K1 = BigInt(3), Ya = BigInt(4), du = BigInt(5), pu = BigInt(8);
9572
9515
  function Ct(t, e) {
9573
9516
  const s = t % e;
@@ -10449,7 +10392,7 @@ function jE(t, e, s) {
10449
10392
  r || ro(i) || (r = De("UNSUPPORTED_CHAINS", `${s}, chain ${i} should be a string and conform to "namespace:chainId" format`));
10450
10393
  }) : ro(t) || (r = De("UNSUPPORTED_CHAINS", `${s}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)), r;
10451
10394
  }
10452
- function WE(t, e, s) {
10395
+ function HE(t, e, s) {
10453
10396
  let r = null;
10454
10397
  return Object.entries(t).forEach(([i, n]) => {
10455
10398
  if (r) return;
@@ -10457,7 +10400,7 @@ function WE(t, e, s) {
10457
10400
  o && (r = o);
10458
10401
  }), r;
10459
10402
  }
10460
- function HE(t, e) {
10403
+ function WE(t, e) {
10461
10404
  let s = null;
10462
10405
  return Fs(t) ? t.forEach((r) => {
10463
10406
  s || FE(r) || (s = De("UNSUPPORTED_ACCOUNTS", `${e}, account ${r} should be a string and conform to "namespace:chainId:address" format`));
@@ -10467,7 +10410,7 @@ function zE(t, e) {
10467
10410
  let s = null;
10468
10411
  return Object.values(t).forEach((r) => {
10469
10412
  if (s) return;
10470
- const i = HE(r == null ? void 0 : r.accounts, `${e} namespace`);
10413
+ const i = WE(r == null ? void 0 : r.accounts, `${e} namespace`);
10471
10414
  i && (s = i);
10472
10415
  }), s;
10473
10416
  }
@@ -10488,7 +10431,7 @@ function KE(t, e, s) {
10488
10431
  if (t && qs(t)) {
10489
10432
  const i = Fd(t, e);
10490
10433
  i && (r = i);
10491
- const n = WE(t, e, s);
10434
+ const n = HE(t, e, s);
10492
10435
  n && (r = n);
10493
10436
  } else r = Z("MISSING_OR_INVALID", `${e}, ${s} should be an object with data`);
10494
10437
  return r;
@@ -10595,7 +10538,7 @@ class Ui {
10595
10538
  delete na[e];
10596
10539
  }
10597
10540
  }
10598
- const jd = "wc", Wd = 2, Hd = "client", Ic = `${jd}@${Wd}:${Hd}:`, oa = { name: Hd, logger: "error" }, _u = "WALLETCONNECT_DEEPLINK_CHOICE", nC = "proposal", Su = "Proposal expired", oC = "session", kr = F.SEVEN_DAYS, aC = "engine", He = { wc_sessionPropose: { req: { ttl: F.FIVE_MINUTES, prompt: !0, tag: 1100 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1101 }, reject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1120 }, autoReject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1121 } }, wc_sessionSettle: { req: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1102 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1103 } }, wc_sessionUpdate: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1104 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1105 } }, wc_sessionExtend: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1106 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1107 } }, wc_sessionRequest: { req: { ttl: F.FIVE_MINUTES, prompt: !0, tag: 1108 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1109 } }, wc_sessionEvent: { req: { ttl: F.FIVE_MINUTES, prompt: !0, tag: 1110 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1111 } }, wc_sessionDelete: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1112 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1113 } }, wc_sessionPing: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1114 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1115 } }, wc_sessionAuthenticate: { req: { ttl: F.ONE_HOUR, prompt: !0, tag: 1116 }, res: { ttl: F.ONE_HOUR, prompt: !1, tag: 1117 }, reject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1118 }, autoReject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1119 } } }, aa = { min: F.FIVE_MINUTES, max: F.SEVEN_DAYS }, ns = { idle: "IDLE", active: "ACTIVE" }, Pu = { eth_sendTransaction: { key: "" }, eth_sendRawTransaction: { key: "" }, wallet_sendCalls: { key: "" }, solana_signTransaction: { key: "signature" }, solana_signAllTransactions: { key: "transactions" }, solana_signAndSendTransaction: { key: "signature" } }, cC = "request", lC = ["wc_sessionPropose", "wc_sessionRequest", "wc_authRequest", "wc_sessionAuthenticate"], uC = "wc", hC = "auth", dC = "authKeys", pC = "pairingTopics", fC = "requests", Ao = `${uC}@${1.5}:${hC}:`, Kn = `${Ao}:PUB_KEY`;
10541
+ const jd = "wc", Hd = 2, Wd = "client", Ic = `${jd}@${Hd}:${Wd}:`, oa = { name: Wd, logger: "error" }, _u = "WALLETCONNECT_DEEPLINK_CHOICE", nC = "proposal", Su = "Proposal expired", oC = "session", kr = F.SEVEN_DAYS, aC = "engine", We = { wc_sessionPropose: { req: { ttl: F.FIVE_MINUTES, prompt: !0, tag: 1100 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1101 }, reject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1120 }, autoReject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1121 } }, wc_sessionSettle: { req: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1102 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1103 } }, wc_sessionUpdate: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1104 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1105 } }, wc_sessionExtend: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1106 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1107 } }, wc_sessionRequest: { req: { ttl: F.FIVE_MINUTES, prompt: !0, tag: 1108 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1109 } }, wc_sessionEvent: { req: { ttl: F.FIVE_MINUTES, prompt: !0, tag: 1110 }, res: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1111 } }, wc_sessionDelete: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1112 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1113 } }, wc_sessionPing: { req: { ttl: F.ONE_DAY, prompt: !1, tag: 1114 }, res: { ttl: F.ONE_DAY, prompt: !1, tag: 1115 } }, wc_sessionAuthenticate: { req: { ttl: F.ONE_HOUR, prompt: !0, tag: 1116 }, res: { ttl: F.ONE_HOUR, prompt: !1, tag: 1117 }, reject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1118 }, autoReject: { ttl: F.FIVE_MINUTES, prompt: !1, tag: 1119 } } }, aa = { min: F.FIVE_MINUTES, max: F.SEVEN_DAYS }, ns = { idle: "IDLE", active: "ACTIVE" }, Pu = { eth_sendTransaction: { key: "" }, eth_sendRawTransaction: { key: "" }, wallet_sendCalls: { key: "" }, solana_signTransaction: { key: "signature" }, solana_signAllTransactions: { key: "transactions" }, solana_signAndSendTransaction: { key: "signature" } }, cC = "request", lC = ["wc_sessionPropose", "wc_sessionRequest", "wc_authRequest", "wc_sessionAuthenticate"], uC = "wc", hC = "auth", dC = "authKeys", pC = "pairingTopics", fC = "requests", Ao = `${uC}@${1.5}:${hC}:`, Kn = `${Ao}:PUB_KEY`;
10599
10542
  var gC = Object.defineProperty, mC = Object.defineProperties, wC = Object.getOwnPropertyDescriptors, Ou = Object.getOwnPropertySymbols, yC = Object.prototype.hasOwnProperty, bC = Object.prototype.propertyIsEnumerable, ec = (t, e, s) => e in t ? gC(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Oe = (t, e) => {
10600
10543
  for (var s in e || (e = {})) yC.call(e, s) && ec(t, s, e[s]);
10601
10544
  if (Ou) for (var s of Ou(e)) bC.call(e, s) && ec(t, s, e[s]);
@@ -10604,7 +10547,7 @@ var gC = Object.defineProperty, mC = Object.defineProperties, wC = Object.getOwn
10604
10547
  class vC extends Jb {
10605
10548
  constructor(e) {
10606
10549
  super(e), D(this, "name", aC), D(this, "events", new lc()), D(this, "initialized", !1), D(this, "requestQueue", { state: ns.idle, queue: [] }), D(this, "sessionRequestQueue", { state: ns.idle, queue: [] }), D(this, "requestQueueDelay", F.ONE_SECOND), D(this, "expectedPairingMethodMap", /* @__PURE__ */ new Map()), D(this, "recentlyDeletedMap", /* @__PURE__ */ new Map()), D(this, "recentlyDeletedLimit", 200), D(this, "relayMessageCache", []), D(this, "pendingSessions", /* @__PURE__ */ new Map()), D(this, "init", async () => {
10607
- this.initialized || (await this.cleanup(), this.registerRelayerEvents(), this.registerExpirerEvents(), this.registerPairingEvents(), await this.registerLinkModeListeners(), this.client.core.pairing.register({ methods: Object.keys(He) }), this.initialized = !0, setTimeout(async () => {
10550
+ this.initialized || (await this.cleanup(), this.registerRelayerEvents(), this.registerExpirerEvents(), this.registerPairingEvents(), await this.registerLinkModeListeners(), this.client.core.pairing.register({ methods: Object.keys(We) }), this.initialized = !0, setTimeout(async () => {
10608
10551
  await this.processPendingMessageEvents(), this.sessionRequestQueue.queue = this.getPendingSessionRequests(), this.processSessionRequestQueue();
10609
10552
  }, F.toMiliseconds(this.requestQueueDelay)));
10610
10553
  }), D(this, "connect", async (s) => {
@@ -10629,7 +10572,7 @@ class vC extends Jb {
10629
10572
  const { message: O } = Z("NO_MATCHING_KEY", `connect() pairing topic: ${u}`);
10630
10573
  throw new Error(O);
10631
10574
  }
10632
- const g = await this.client.core.crypto.generateKeyPair(), y = He.wc_sessionPropose.req.ttl || F.FIVE_MINUTES, f = bt(y), p = dt(Oe(Oe({ requiredNamespaces: n, optionalNamespaces: o, relays: l ?? [{ protocol: Zh }], proposer: { publicKey: g, metadata: this.client.metadata }, expiryTimestamp: f, pairingTopic: u }, a && { sessionProperties: a }), c && { scopedProperties: c }), { id: As() }), m = Pe("session_connect", p.id), { reject: w, resolve: C, done: P } = Sr(y, Su), R = ({ id: O }) => {
10575
+ const g = await this.client.core.crypto.generateKeyPair(), y = We.wc_sessionPropose.req.ttl || F.FIVE_MINUTES, f = bt(y), p = dt(Oe(Oe({ requiredNamespaces: n, optionalNamespaces: o, relays: l ?? [{ protocol: Zh }], proposer: { publicKey: g, metadata: this.client.metadata }, expiryTimestamp: f, pairingTopic: u }, a && { sessionProperties: a }), c && { scopedProperties: c }), { id: As() }), m = Pe("session_connect", p.id), { reject: w, resolve: C, done: P } = Sr(y, Su), R = ({ id: O }) => {
10633
10576
  O === p.id && (this.client.events.off("proposal_expire", R), this.pendingSessions.delete(p.id), this.events.emit(m, { error: { message: Su, code: 0 } }));
10634
10577
  };
10635
10578
  return this.client.events.on("proposal_expire", R), this.events.once(m, ({ error: O, session: S }) => {
@@ -10699,7 +10642,7 @@ class vC extends Jb {
10699
10642
  } catch (o) {
10700
10643
  throw this.client.logger.error(`reject() -> proposal.get(${r}) failed`), o;
10701
10644
  }
10702
- n && (await this.sendError({ id: r, topic: n, error: i, rpcOpts: He.wc_sessionPropose.reject }), await this.client.proposal.delete(r, De("USER_DISCONNECTED")));
10645
+ n && (await this.sendError({ id: r, topic: n, error: i, rpcOpts: We.wc_sessionPropose.reject }), await this.client.proposal.delete(r, De("USER_DISCONNECTED")));
10703
10646
  }), D(this, "update", async (s) => {
10704
10647
  this.isInitialized(), await this.confirmOnlineStateOrThrow();
10705
10648
  try {
@@ -10733,7 +10676,7 @@ class vC extends Jb {
10733
10676
  } catch (m) {
10734
10677
  throw this.client.logger.error("request() -> isValidRequest() failed"), m;
10735
10678
  }
10736
- const { chainId: r, request: i, topic: n, expiry: o = He.wc_sessionRequest.req.ttl } = s, a = this.client.session.get(n);
10679
+ const { chainId: r, request: i, topic: n, expiry: o = We.wc_sessionRequest.req.ttl } = s, a = this.client.session.get(n);
10737
10680
  (a == null ? void 0 : a.transportType) === xe.relay && await this.confirmOnlineStateOrThrow();
10738
10681
  const c = As(), l = Gr().toString(), { done: u, resolve: h, reject: d } = Sr(o, "Request expired. Please try again.");
10739
10682
  this.events.once(Pe("session_request", c), ({ error: m, result: w }) => {
@@ -10798,7 +10741,7 @@ class vC extends Jb {
10798
10741
  let M = r1(N, "request", f);
10799
10742
  Vn(m) && (M = n1(M, m.pop())), m.push(M);
10800
10743
  }
10801
- const O = p && p > He.wc_sessionAuthenticate.req.ttl ? p : He.wc_sessionAuthenticate.req.ttl, S = { authPayload: { type: d ?? "caip122", chains: a, statement: c, aud: l, domain: u, version: "1", nonce: h, iat: (/* @__PURE__ */ new Date()).toISOString(), exp: g, nbf: y, resources: m }, requester: { publicKey: P, metadata: this.client.metadata }, expiryTimestamp: bt(O) }, T = { eip155: { chains: a, methods: [.../* @__PURE__ */ new Set(["personal_sign", ...f])], events: ["chainChanged", "accountsChanged"] } }, v = { requiredNamespaces: {}, optionalNamespaces: T, relays: [{ protocol: "irn" }], pairingTopic: w, proposer: { publicKey: P, metadata: this.client.metadata }, expiryTimestamp: bt(He.wc_sessionPropose.req.ttl), id: As() }, { done: $, resolve: _, reject: x } = Sr(O, "Request expired"), L = As(), E = Pe("session_connect", v.id), A = Pe("session_request", L), I = async ({ error: N, session: M }) => {
10744
+ const O = p && p > We.wc_sessionAuthenticate.req.ttl ? p : We.wc_sessionAuthenticate.req.ttl, S = { authPayload: { type: d ?? "caip122", chains: a, statement: c, aud: l, domain: u, version: "1", nonce: h, iat: (/* @__PURE__ */ new Date()).toISOString(), exp: g, nbf: y, resources: m }, requester: { publicKey: P, metadata: this.client.metadata }, expiryTimestamp: bt(O) }, T = { eip155: { chains: a, methods: [.../* @__PURE__ */ new Set(["personal_sign", ...f])], events: ["chainChanged", "accountsChanged"] } }, v = { requiredNamespaces: {}, optionalNamespaces: T, relays: [{ protocol: "irn" }], pairingTopic: w, proposer: { publicKey: P, metadata: this.client.metadata }, expiryTimestamp: bt(We.wc_sessionPropose.req.ttl), id: As() }, { done: $, resolve: _, reject: x } = Sr(O, "Request expired"), L = As(), E = Pe("session_connect", v.id), A = Pe("session_request", L), I = async ({ error: N, session: M }) => {
10802
10745
  this.events.off(A, k), N ? x(N) : M && _({ session: M });
10803
10746
  }, k = async (N) => {
10804
10747
  var M, q, j;
@@ -10829,7 +10772,7 @@ class vC extends Jb {
10829
10772
  this.client.core.history.set(w, N);
10830
10773
  const M = await this.client.core.crypto.encode("", N, { type: AE, encoding: Ri });
10831
10774
  U = Ln(r, w, M);
10832
- } else await Promise.all([this.sendRequest({ topic: w, method: "wc_sessionAuthenticate", params: S, expiry: s.expiry, throwOnFailedPublish: !0, clientRpcId: L }), this.sendRequest({ topic: w, method: "wc_sessionPropose", params: v, expiry: He.wc_sessionPropose.req.ttl, throwOnFailedPublish: !0, clientRpcId: v.id })]);
10775
+ } else await Promise.all([this.sendRequest({ topic: w, method: "wc_sessionAuthenticate", params: S, expiry: s.expiry, throwOnFailedPublish: !0, clientRpcId: L }), this.sendRequest({ topic: w, method: "wc_sessionPropose", params: v, expiry: We.wc_sessionPropose.req.ttl, throwOnFailedPublish: !0, clientRpcId: v.id })]);
10833
10776
  } catch (N) {
10834
10777
  throw this.events.off(E, I), this.events.off(A, k), N;
10835
10778
  }
@@ -10885,7 +10828,7 @@ class vC extends Jb {
10885
10828
  if (!n) throw new Error(`Could not find pending auth request with id ${r}`);
10886
10829
  n.transportType === xe.relay && await this.confirmOnlineStateOrThrow();
10887
10830
  const o = n.requester.publicKey, a = await this.client.core.crypto.generateKeyPair(), c = ra(o), l = { type: sa, receiverPublicKey: o, senderPublicKey: a };
10888
- await this.sendError({ id: r, topic: c, error: i, encodeOpts: l, rpcOpts: He.wc_sessionAuthenticate.reject, appLink: this.getAppLinkIfEnabled(n.requester.metadata, n.transportType) }), await this.client.auth.requests.delete(r, { message: "rejected", code: 0 }), await this.client.proposal.delete(r, De("USER_DISCONNECTED"));
10831
+ await this.sendError({ id: r, topic: c, error: i, encodeOpts: l, rpcOpts: We.wc_sessionAuthenticate.reject, appLink: this.getAppLinkIfEnabled(n.requester.metadata, n.transportType) }), await this.client.auth.requests.delete(r, { message: "rejected", code: 0 }), await this.client.proposal.delete(r, De("USER_DISCONNECTED"));
10889
10832
  }), D(this, "formatAuthMessage", (s) => {
10890
10833
  this.isInitialized();
10891
10834
  const { request: r, iss: i } = s;
@@ -10930,12 +10873,12 @@ class vC extends Jb {
10930
10873
  }), D(this, "setExpiry", async (s, r) => {
10931
10874
  this.client.session.keys.includes(s) && (this.client.core.expirer.set(s, r), await this.client.session.update(s, { expiry: r }));
10932
10875
  }), D(this, "setProposal", async (s, r) => {
10933
- this.client.core.expirer.set(s, bt(He.wc_sessionPropose.req.ttl)), await this.client.proposal.set(s, r);
10876
+ this.client.core.expirer.set(s, bt(We.wc_sessionPropose.req.ttl)), await this.client.proposal.set(s, r);
10934
10877
  }), D(this, "setAuthRequest", async (s, r) => {
10935
10878
  const { request: i, pairingTopic: n, transportType: o = xe.relay } = r;
10936
10879
  this.client.core.expirer.set(s, i.expiryTimestamp), await this.client.auth.requests.set(s, { authPayload: i.authPayload, requester: i.requester, expiryTimestamp: i.expiryTimestamp, id: s, pairingTopic: n, verifyContext: i.verifyContext, transportType: o });
10937
10880
  }), D(this, "setPendingSessionRequest", async (s) => {
10938
- const { id: r, topic: i, params: n, verifyContext: o } = s, a = n.request.expiryTimestamp || bt(He.wc_sessionRequest.req.ttl);
10881
+ const { id: r, topic: i, params: n, verifyContext: o } = s, a = n.request.expiryTimestamp || bt(We.wc_sessionRequest.req.ttl);
10939
10882
  this.client.core.expirer.set(r, a), await this.client.pendingRequest.set(r, { id: r, topic: i, params: n, verifyContext: o });
10940
10883
  }), D(this, "sendRequest", async (s) => {
10941
10884
  const { topic: r, method: i, params: n, expiry: o, relayRpcId: a, clientRpcId: c, throwOnFailedPublish: l, appLink: u, tvf: h } = s, d = sr(i, n, c);
@@ -10952,12 +10895,12 @@ class vC extends Jb {
10952
10895
  const m = $r(JSON.stringify(d)), w = $r(g);
10953
10896
  f = await this.client.core.verify.register({ id: w, decryptedId: m });
10954
10897
  }
10955
- const p = He[i].req;
10898
+ const p = We[i].req;
10956
10899
  if (p.attestation = f, o && (p.ttl = o), a && (p.id = a), this.client.core.history.set(r, d), y) {
10957
10900
  const m = Ln(u, r, g);
10958
10901
  await ne.Linking.openURL(m, this.client.name);
10959
10902
  } else {
10960
- const m = He[i].req;
10903
+ const m = We[i].req;
10961
10904
  o && (m.ttl = o), a && (m.id = a), m.tvf = dt(Oe({}, h), { correlationId: d.id }), l ? (m.internal = dt(Oe({}, m.internal), { throwOnFailedPublish: !0 }), await this.client.core.relayer.publish(r, g, m)) : this.client.core.relayer.publish(r, g, m).catch((w) => this.client.logger.error(w));
10962
10905
  }
10963
10906
  return d.id;
@@ -10987,7 +10930,7 @@ class vC extends Jb {
10987
10930
  const y = Ln(c, i, u);
10988
10931
  await ne.Linking.openURL(y, this.client.name);
10989
10932
  } else {
10990
- const y = d.request.method, f = He[y].res;
10933
+ const y = d.request.method, f = We[y].res;
10991
10934
  f.tvf = dt(Oe({}, g), { correlationId: r }), o ? (f.internal = dt(Oe({}, f.internal), { throwOnFailedPublish: !0 }), await this.client.core.relayer.publish(i, u, f)) : this.client.core.relayer.publish(i, u, f).catch((p) => this.client.logger.error(p));
10992
10935
  }
10993
10936
  await this.client.core.history.resolve(l);
@@ -11011,7 +10954,7 @@ class vC extends Jb {
11011
10954
  const g = Ln(c, i, u);
11012
10955
  await ne.Linking.openURL(g, this.client.name);
11013
10956
  } else {
11014
- const g = d.request.method, y = a || He[g].res;
10957
+ const g = d.request.method, y = a || We[g].res;
11015
10958
  this.client.core.relayer.publish(i, u, y);
11016
10959
  }
11017
10960
  await this.client.core.history.resolve(l);
@@ -11096,13 +11039,13 @@ class vC extends Jb {
11096
11039
  const { topic: r, payload: i, attestation: n, encryptedId: o } = s, { params: a, id: c } = i;
11097
11040
  try {
11098
11041
  const l = this.client.core.eventClient.getEvent({ topic: r });
11099
- this.client.events.listenerCount("session_proposal") === 0 && (console.warn("No listener for session_proposal event"), l == null || l.setError(ws.proposal_listener_not_found)), this.isValidConnect(Oe({}, i.params));
11100
- const u = a.expiryTimestamp || bt(He.wc_sessionPropose.req.ttl), h = Oe({ id: c, pairingTopic: r, expiryTimestamp: u }, a);
11042
+ this.client.events.listenerCount("session_proposal") === 0 && (l == null || l.setError(ws.proposal_listener_not_found)), this.isValidConnect(Oe({}, i.params));
11043
+ const u = a.expiryTimestamp || bt(We.wc_sessionPropose.req.ttl), h = Oe({ id: c, pairingTopic: r, expiryTimestamp: u }, a);
11101
11044
  await this.setProposal(c, h);
11102
11045
  const d = await this.getVerifyContext({ attestationId: n, hash: $r(JSON.stringify(i)), encryptedId: o, metadata: h.proposer.metadata });
11103
11046
  l == null || l.addTrace(os.emit_session_proposal), this.client.events.emit("session_proposal", { id: c, params: h, verifyContext: d });
11104
11047
  } catch (l) {
11105
- await this.sendError({ id: c, topic: r, error: l, rpcOpts: He.wc_sessionPropose.autoReject }), this.client.logger.error(l);
11048
+ await this.sendError({ id: c, topic: r, error: l, rpcOpts: We.wc_sessionPropose.autoReject }), this.client.logger.error(l);
11106
11049
  }
11107
11050
  }), D(this, "onSessionProposeResponse", async (s, r, i) => {
11108
11051
  const { id: n } = r;
@@ -11234,7 +11177,7 @@ class vC extends Jb {
11234
11177
  } catch (l) {
11235
11178
  this.client.logger.error(l);
11236
11179
  const u = n.params.requester.publicKey, h = await this.client.core.crypto.generateKeyPair(), d = this.getAppLinkIfEnabled(n.params.requester.metadata, c), g = { type: sa, receiverPublicKey: u, senderPublicKey: h };
11237
- await this.sendError({ id: n.id, topic: i, error: l, encodeOpts: g, rpcOpts: He.wc_sessionAuthenticate.autoReject, appLink: d });
11180
+ await this.sendError({ id: n.id, topic: i, error: l, encodeOpts: g, rpcOpts: We.wc_sessionAuthenticate.autoReject, appLink: d });
11238
11181
  }
11239
11182
  }), D(this, "addSessionRequestToSessionRequestQueue", (s) => {
11240
11183
  this.sessionRequestQueue.queue.push(s);
@@ -11280,11 +11223,7 @@ class vC extends Jb {
11280
11223
  const { message: l } = Z("MISSING_OR_INVALID", `connect() relays: ${c}`);
11281
11224
  throw new Error(l);
11282
11225
  }
11283
- if (!It(i) && qs(i) !== 0) {
11284
- const l = "requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";
11285
- ["fatal", "error", "silent"].includes(this.client.logger.level) ? console.warn(l) : this.client.logger.warn(l), this.validateNamespaces(i, "requiredNamespaces");
11286
- }
11287
- if (!It(n) && qs(n) !== 0 && this.validateNamespaces(n, "optionalNamespaces"), It(o) || this.validateSessionProps(o, "sessionProperties"), !It(a)) {
11226
+ if (!It(i) && qs(i) !== 0 && (["fatal", "error", "silent"].includes(this.client.logger.level) || this.client.logger.warn("requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces"), this.validateNamespaces(i, "requiredNamespaces")), !It(n) && qs(n) !== 0 && this.validateNamespaces(n, "optionalNamespaces"), It(o) || this.validateSessionProps(o, "sessionProperties"), !It(a)) {
11288
11227
  this.validateSessionProps(a, "scopedProperties");
11289
11228
  const l = Object.keys(i || {}).concat(Object.keys(n || {}));
11290
11229
  if (!Object.keys(a).every((u) => l.includes(u))) throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(l)}`);
@@ -11527,7 +11466,7 @@ class vC extends Jb {
11527
11466
  const i = Pu[s];
11528
11467
  if (typeof r == "string") return [r];
11529
11468
  const n = r[i.key];
11530
- if (Fs(n)) return s === "solana_signAllTransactions" ? n.map((o) => Wv(o)) : n;
11469
+ if (Fs(n)) return s === "solana_signAllTransactions" ? n.map((o) => Hv(o)) : n;
11531
11470
  if (typeof n == "string") return [n];
11532
11471
  } catch (i) {
11533
11472
  this.client.logger.warn("Error extracting tx hashes from result", i);
@@ -11685,7 +11624,7 @@ class OC {
11685
11624
  var TC = Object.defineProperty, $C = (t, e, s) => e in t ? TC(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, le = (t, e, s) => $C(t, typeof e != "symbol" ? e + "" : e, s);
11686
11625
  let kC = class zd extends Gb {
11687
11626
  constructor(e) {
11688
- super(e), le(this, "protocol", jd), le(this, "version", Wd), le(this, "name", oa.name), le(this, "metadata"), le(this, "core"), le(this, "logger"), le(this, "events", new mr.EventEmitter()), le(this, "engine"), le(this, "session"), le(this, "proposal"), le(this, "pendingRequest"), le(this, "auth"), le(this, "signConfig"), le(this, "on", (r, i) => this.events.on(r, i)), le(this, "once", (r, i) => this.events.once(r, i)), le(this, "off", (r, i) => this.events.off(r, i)), le(this, "removeListener", (r, i) => this.events.removeListener(r, i)), le(this, "removeAllListeners", (r) => this.events.removeAllListeners(r)), le(this, "connect", async (r) => {
11627
+ super(e), le(this, "protocol", jd), le(this, "version", Hd), le(this, "name", oa.name), le(this, "metadata"), le(this, "core"), le(this, "logger"), le(this, "events", new mr.EventEmitter()), le(this, "engine"), le(this, "session"), le(this, "proposal"), le(this, "pendingRequest"), le(this, "auth"), le(this, "signConfig"), le(this, "on", (r, i) => this.events.on(r, i)), le(this, "once", (r, i) => this.events.once(r, i)), le(this, "off", (r, i) => this.events.off(r, i)), le(this, "removeListener", (r, i) => this.events.removeListener(r, i)), le(this, "removeAllListeners", (r) => this.events.removeAllListeners(r)), le(this, "connect", async (r) => {
11689
11628
  try {
11690
11629
  return await this.engine.connect(r);
11691
11630
  } catch (i) {
@@ -11812,7 +11751,7 @@ let kC = class zd extends Gb {
11812
11751
  }
11813
11752
  }
11814
11753
  };
11815
- const Tu = "error", xC = "wss://relay.walletconnect.org", RC = "wc", UC = "universal_provider", Bn = `${RC}@2:${UC}:`, Vd = "https://rpc.walletconnect.org/v1/", zr = "generic", DC = `${Vd}bundler`, Ht = { DEFAULT_CHAIN_CHANGED: "default_chain_changed" };
11754
+ const Tu = "error", xC = "wss://relay.walletconnect.org", RC = "wc", UC = "universal_provider", Bn = `${RC}@2:${UC}:`, Vd = "https://rpc.walletconnect.org/v1/", zr = "generic", DC = `${Vd}bundler`, Wt = { DEFAULT_CHAIN_CHANGED: "default_chain_changed" };
11816
11755
  function LC() {
11817
11756
  }
11818
11757
  function Ac(t) {
@@ -11851,7 +11790,7 @@ function Kd(t) {
11851
11790
  function Gd(t) {
11852
11791
  return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
11853
11792
  }
11854
- const MC = "[object RegExp]", Jd = "[object String]", Yd = "[object Number]", Zd = "[object Boolean]", Xd = "[object Arguments]", FC = "[object Symbol]", qC = "[object Date]", jC = "[object Map]", WC = "[object Set]", HC = "[object Array]", zC = "[object ArrayBuffer]", VC = "[object Object]", KC = "[object DataView]", GC = "[object Uint8Array]", JC = "[object Uint8ClampedArray]", YC = "[object Uint16Array]", ZC = "[object Uint32Array]", XC = "[object Int8Array]", QC = "[object Int16Array]", eI = "[object Int32Array]", tI = "[object Float32Array]", sI = "[object Float64Array]";
11793
+ const MC = "[object RegExp]", Jd = "[object String]", Yd = "[object Number]", Zd = "[object Boolean]", Xd = "[object Arguments]", FC = "[object Symbol]", qC = "[object Date]", jC = "[object Map]", HC = "[object Set]", WC = "[object Array]", zC = "[object ArrayBuffer]", VC = "[object Object]", KC = "[object DataView]", GC = "[object Uint8Array]", JC = "[object Uint8ClampedArray]", YC = "[object Uint16Array]", ZC = "[object Uint32Array]", XC = "[object Int8Array]", QC = "[object Int16Array]", eI = "[object Int32Array]", tI = "[object Float32Array]", sI = "[object Float64Array]";
11855
11794
  function rI(t, e) {
11856
11795
  return Qr(t, void 0, t, /* @__PURE__ */ new Map(), e);
11857
11796
  }
@@ -11923,7 +11862,7 @@ function tr(t, e, s = t, r, i) {
11923
11862
  function iI(t) {
11924
11863
  switch (Gd(t)) {
11925
11864
  case Xd:
11926
- case HC:
11865
+ case WC:
11927
11866
  case zC:
11928
11867
  case KC:
11929
11868
  case Zd:
@@ -11937,7 +11876,7 @@ function iI(t) {
11937
11876
  case Yd:
11938
11877
  case VC:
11939
11878
  case MC:
11940
- case WC:
11879
+ case HC:
11941
11880
  case Jd:
11942
11881
  case FC:
11943
11882
  case GC:
@@ -12102,7 +12041,7 @@ class bI {
12102
12041
  return this.namespace.methods.includes(e.request.method) ? this.client.request(e) : this.getHttpProvider().request(e.request);
12103
12042
  }
12104
12043
  setDefaultChain(e, s) {
12105
- this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12044
+ this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12106
12045
  }
12107
12046
  getAccounts() {
12108
12047
  const e = this.namespace.accounts;
@@ -12128,7 +12067,7 @@ class bI {
12128
12067
  createHttpProvider(e, s) {
12129
12068
  const r = s || Rt(e, this.namespace, this.client.core.projectId);
12130
12069
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12131
- return new Wt(new ts(r, ye("disableProviderPing")));
12070
+ return new Ht(new ts(r, ye("disableProviderPing")));
12132
12071
  }
12133
12072
  }
12134
12073
  var vI = Object.defineProperty, EI = Object.defineProperties, CI = Object.getOwnPropertyDescriptors, Mu = Object.getOwnPropertySymbols, II = Object.prototype.hasOwnProperty, AI = Object.prototype.propertyIsEnumerable, sc = (t, e, s) => e in t ? vI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Fu = (t, e) => {
@@ -12161,7 +12100,7 @@ class NI {
12161
12100
  this.namespace = Object.assign(this.namespace, e);
12162
12101
  }
12163
12102
  setDefaultChain(e, s) {
12164
- this.httpProviders[e] || this.setHttpProvider(parseInt(e), s), this.chainId = parseInt(e), this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12103
+ this.httpProviders[e] || this.setHttpProvider(parseInt(e), s), this.chainId = parseInt(e), this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12165
12104
  }
12166
12105
  requestAccounts() {
12167
12106
  return this.getAccounts();
@@ -12176,7 +12115,7 @@ class NI {
12176
12115
  createHttpProvider(e, s) {
12177
12116
  const r = s || Rt(`${this.name}:${e}`, this.namespace, this.client.core.projectId);
12178
12117
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12179
- return new Wt(new ts(r, ye("disableProviderPing")));
12118
+ return new Ht(new ts(r, ye("disableProviderPing")));
12180
12119
  }
12181
12120
  setHttpProvider(e, s) {
12182
12121
  const r = this.createHttpProvider(e, s);
@@ -12221,8 +12160,7 @@ class NI {
12221
12160
  const d = await this.client.request(e);
12222
12161
  try {
12223
12162
  await this.client.session.update(e.topic, { sessionProperties: qu(Fu({}, u.sessionProperties || {}), { capabilities: qu(Fu({}, h || {}), { [l]: d }) }) });
12224
- } catch (g) {
12225
- console.warn("Failed to update session with capabilities", g);
12163
+ } catch {
12226
12164
  }
12227
12165
  return d;
12228
12166
  }
@@ -12233,15 +12171,13 @@ class NI {
12233
12171
  const a = this.getBundlerUrl(e.chainId, n);
12234
12172
  try {
12235
12173
  return await this.getUserOperationReceipt(a, e);
12236
- } catch (c) {
12237
- console.warn("Failed to fetch call status from bundler", c, a);
12174
+ } catch {
12238
12175
  }
12239
12176
  }
12240
12177
  const o = (r = i.sessionProperties) == null ? void 0 : r.bundler_url;
12241
12178
  if (o) try {
12242
12179
  return await this.getUserOperationReceipt(o, e);
12243
- } catch (a) {
12244
- console.warn("Failed to fetch call status from custom bundler", a, o);
12180
+ } catch {
12245
12181
  }
12246
12182
  if (this.namespace.methods.includes(e.request.method)) return await this.client.request(e);
12247
12183
  throw new Error("Fetching call status not approved by the wallet.");
@@ -12271,7 +12207,7 @@ class PI {
12271
12207
  return this.namespace.methods.includes(e.request.method) ? this.client.request(e) : this.getHttpProvider().request(e.request);
12272
12208
  }
12273
12209
  setDefaultChain(e, s) {
12274
- this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12210
+ this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12275
12211
  }
12276
12212
  getDefaultChain() {
12277
12213
  if (this.chainId) return this.chainId;
@@ -12304,7 +12240,7 @@ class PI {
12304
12240
  createHttpProvider(e, s) {
12305
12241
  const r = s || Rt(e, this.namespace, this.client.core.projectId);
12306
12242
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12307
- return new Wt(new ts(r, ye("disableProviderPing")));
12243
+ return new Ht(new ts(r, ye("disableProviderPing")));
12308
12244
  }
12309
12245
  }
12310
12246
  var OI = Object.defineProperty, TI = (t, e, s) => e in t ? OI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Dr = (t, e, s) => TI(t, typeof e != "symbol" ? e + "" : e, s);
@@ -12329,7 +12265,7 @@ class $I {
12329
12265
  return this.namespace.methods.includes(e.request.method) ? this.client.request(e) : this.getHttpProvider().request(e.request);
12330
12266
  }
12331
12267
  setDefaultChain(e, s) {
12332
- this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12268
+ this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12333
12269
  }
12334
12270
  getAccounts() {
12335
12271
  const e = this.namespace.accounts;
@@ -12355,7 +12291,7 @@ class $I {
12355
12291
  createHttpProvider(e, s) {
12356
12292
  const r = s || Rt(e, this.namespace, this.client.core.projectId);
12357
12293
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12358
- return new Wt(new ts(r, ye("disableProviderPing")));
12294
+ return new Ht(new ts(r, ye("disableProviderPing")));
12359
12295
  }
12360
12296
  }
12361
12297
  var kI = Object.defineProperty, xI = (t, e, s) => e in t ? kI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Lr = (t, e, s) => xI(t, typeof e != "symbol" ? e + "" : e, s);
@@ -12378,7 +12314,7 @@ class RI {
12378
12314
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12379
12315
  this.setHttpProvider(e, r);
12380
12316
  }
12381
- this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12317
+ this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12382
12318
  }
12383
12319
  getDefaultChain() {
12384
12320
  if (this.chainId) return this.chainId;
@@ -12409,7 +12345,7 @@ class RI {
12409
12345
  }
12410
12346
  createHttpProvider(e, s) {
12411
12347
  const r = s || Rt(e, this.namespace, this.client.core.projectId);
12412
- return typeof r > "u" ? void 0 : new Wt(new ts(r, ye("disableProviderPing")));
12348
+ return typeof r > "u" ? void 0 : new Ht(new ts(r, ye("disableProviderPing")));
12413
12349
  }
12414
12350
  }
12415
12351
  var UI = Object.defineProperty, DI = (t, e, s) => e in t ? UI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Br = (t, e, s) => DI(t, typeof e != "symbol" ? e + "" : e, s);
@@ -12434,7 +12370,7 @@ class LI {
12434
12370
  return this.namespace.methods.includes(e.request.method) ? this.client.request(e) : this.getHttpProvider().request(e.request);
12435
12371
  }
12436
12372
  setDefaultChain(e, s) {
12437
- this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12373
+ this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12438
12374
  }
12439
12375
  getAccounts() {
12440
12376
  const e = this.namespace.accounts;
@@ -12463,7 +12399,7 @@ class LI {
12463
12399
  createHttpProvider(e, s) {
12464
12400
  const r = s || this.getCardanoRPCUrl(e);
12465
12401
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12466
- return new Wt(new ts(r, ye("disableProviderPing")));
12402
+ return new Ht(new ts(r, ye("disableProviderPing")));
12467
12403
  }
12468
12404
  }
12469
12405
  var BI = Object.defineProperty, MI = (t, e, s) => e in t ? BI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Mr = (t, e, s) => MI(t, typeof e != "symbol" ? e + "" : e, s);
@@ -12481,7 +12417,7 @@ class FI {
12481
12417
  return this.namespace.methods.includes(e.request.method) ? this.client.request(e) : this.getHttpProvider().request(e.request);
12482
12418
  }
12483
12419
  setDefaultChain(e, s) {
12484
- this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12420
+ this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12485
12421
  }
12486
12422
  getDefaultChain() {
12487
12423
  if (this.chainId) return this.chainId;
@@ -12514,11 +12450,11 @@ class FI {
12514
12450
  createHttpProvider(e, s) {
12515
12451
  const r = s || Rt(e, this.namespace, this.client.core.projectId);
12516
12452
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12517
- return new Wt(new ts(r, ye("disableProviderPing")));
12453
+ return new Ht(new ts(r, ye("disableProviderPing")));
12518
12454
  }
12519
12455
  }
12520
12456
  var qI = Object.defineProperty, jI = (t, e, s) => e in t ? qI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Fr = (t, e, s) => jI(t, typeof e != "symbol" ? e + "" : e, s);
12521
- class WI {
12457
+ class HI {
12522
12458
  constructor(e) {
12523
12459
  Fr(this, "name", "multiversx"), Fr(this, "client"), Fr(this, "httpProviders"), Fr(this, "events"), Fr(this, "namespace"), Fr(this, "chainId"), this.namespace = e.namespace, this.events = ye("events"), this.client = ye("client"), this.chainId = this.getDefaultChain(), this.httpProviders = this.createHttpProviders();
12524
12460
  }
@@ -12532,7 +12468,7 @@ class WI {
12532
12468
  return this.namespace.methods.includes(e.request.method) ? this.client.request(e) : this.getHttpProvider().request(e.request);
12533
12469
  }
12534
12470
  setDefaultChain(e, s) {
12535
- this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12471
+ this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12536
12472
  }
12537
12473
  getDefaultChain() {
12538
12474
  if (this.chainId) return this.chainId;
@@ -12565,10 +12501,10 @@ class WI {
12565
12501
  createHttpProvider(e, s) {
12566
12502
  const r = s || Rt(e, this.namespace, this.client.core.projectId);
12567
12503
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12568
- return new Wt(new ts(r, ye("disableProviderPing")));
12504
+ return new Ht(new ts(r, ye("disableProviderPing")));
12569
12505
  }
12570
12506
  }
12571
- var HI = Object.defineProperty, zI = (t, e, s) => e in t ? HI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, qr = (t, e, s) => zI(t, typeof e != "symbol" ? e + "" : e, s);
12507
+ var WI = Object.defineProperty, zI = (t, e, s) => e in t ? WI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, qr = (t, e, s) => zI(t, typeof e != "symbol" ? e + "" : e, s);
12572
12508
  class VI {
12573
12509
  constructor(e) {
12574
12510
  qr(this, "name", "near"), qr(this, "client"), qr(this, "httpProviders"), qr(this, "events"), qr(this, "namespace"), qr(this, "chainId"), this.namespace = e.namespace, this.events = ye("events"), this.client = ye("client"), this.chainId = this.getDefaultChain(), this.httpProviders = this.createHttpProviders();
@@ -12595,7 +12531,7 @@ class VI {
12595
12531
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12596
12532
  this.setHttpProvider(e, r);
12597
12533
  }
12598
- this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12534
+ this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12599
12535
  }
12600
12536
  getAccounts() {
12601
12537
  const e = this.namespace.accounts;
@@ -12619,7 +12555,7 @@ class VI {
12619
12555
  }
12620
12556
  createHttpProvider(e, s) {
12621
12557
  const r = s || Rt(e, this.namespace);
12622
- return typeof r > "u" ? void 0 : new Wt(new ts(r, ye("disableProviderPing")));
12558
+ return typeof r > "u" ? void 0 : new Ht(new ts(r, ye("disableProviderPing")));
12623
12559
  }
12624
12560
  }
12625
12561
  var KI = Object.defineProperty, GI = (t, e, s) => e in t ? KI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, jr = (t, e, s) => GI(t, typeof e != "symbol" ? e + "" : e, s);
@@ -12649,7 +12585,7 @@ class JI {
12649
12585
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12650
12586
  this.setHttpProvider(e, r);
12651
12587
  }
12652
- this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12588
+ this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${this.chainId}`);
12653
12589
  }
12654
12590
  getAccounts() {
12655
12591
  const e = this.namespace.accounts;
@@ -12672,13 +12608,13 @@ class JI {
12672
12608
  }
12673
12609
  createHttpProvider(e, s) {
12674
12610
  const r = s || Rt(e, this.namespace);
12675
- return typeof r > "u" ? void 0 : new Wt(new ts(r));
12611
+ return typeof r > "u" ? void 0 : new Ht(new ts(r));
12676
12612
  }
12677
12613
  }
12678
- var YI = Object.defineProperty, ZI = (t, e, s) => e in t ? YI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Wr = (t, e, s) => ZI(t, typeof e != "symbol" ? e + "" : e, s);
12614
+ var YI = Object.defineProperty, ZI = (t, e, s) => e in t ? YI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Hr = (t, e, s) => ZI(t, typeof e != "symbol" ? e + "" : e, s);
12679
12615
  class XI {
12680
12616
  constructor(e) {
12681
- Wr(this, "name", zr), Wr(this, "client"), Wr(this, "httpProviders"), Wr(this, "events"), Wr(this, "namespace"), Wr(this, "chainId"), this.namespace = e.namespace, this.events = ye("events"), this.client = ye("client"), this.chainId = this.getDefaultChain(), this.httpProviders = this.createHttpProviders();
12617
+ Hr(this, "name", zr), Hr(this, "client"), Hr(this, "httpProviders"), Hr(this, "events"), Hr(this, "namespace"), Hr(this, "chainId"), this.namespace = e.namespace, this.events = ye("events"), this.client = ye("client"), this.chainId = this.getDefaultChain(), this.httpProviders = this.createHttpProviders();
12682
12618
  }
12683
12619
  updateNamespace(e) {
12684
12620
  this.namespace.chains = [...new Set((this.namespace.chains || []).concat(e.chains || []))], this.namespace.accounts = [...new Set((this.namespace.accounts || []).concat(e.accounts || []))], this.namespace.methods = [...new Set((this.namespace.methods || []).concat(e.methods || []))], this.namespace.events = [...new Set((this.namespace.events || []).concat(e.events || []))], this.httpProviders = this.createHttpProviders();
@@ -12690,7 +12626,7 @@ class XI {
12690
12626
  return this.namespace.methods.includes(e.request.method) ? this.client.request(e) : this.getHttpProvider(e.chainId).request(e.request);
12691
12627
  }
12692
12628
  setDefaultChain(e, s) {
12693
- this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Ht.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12629
+ this.httpProviders[e] || this.setHttpProvider(e, s), this.chainId = e, this.events.emit(Wt.DEFAULT_CHAIN_CHANGED, `${this.name}:${e}`);
12694
12630
  }
12695
12631
  getDefaultChain() {
12696
12632
  if (this.chainId) return this.chainId;
@@ -12723,7 +12659,7 @@ class XI {
12723
12659
  createHttpProvider(e, s) {
12724
12660
  const r = s || Rt(e, this.namespace, this.client.core.projectId);
12725
12661
  if (!r) throw new Error(`No RPC url provided for chainId: ${e}`);
12726
- return new Wt(new ts(r, ye("disableProviderPing")));
12662
+ return new Ht(new ts(r, ye("disableProviderPing")));
12727
12663
  }
12728
12664
  }
12729
12665
  var QI = Object.defineProperty, eA = Object.defineProperties, tA = Object.getOwnPropertyDescriptors, ju = Object.getOwnPropertySymbols, sA = Object.prototype.hasOwnProperty, rA = Object.prototype.propertyIsEnumerable, rc = (t, e, s) => e in t ? QI(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, qn = (t, e) => {
@@ -12865,7 +12801,7 @@ let iA = class tp {
12865
12801
  this.rpcProviders[s] = new FI({ namespace: o });
12866
12802
  break;
12867
12803
  case "multiversx":
12868
- this.rpcProviders[s] = new WI({ namespace: o });
12804
+ this.rpcProviders[s] = new HI({ namespace: o });
12869
12805
  break;
12870
12806
  case "near":
12871
12807
  this.rpcProviders[s] = new VI({ namespace: o });
@@ -12905,7 +12841,7 @@ let iA = class tp {
12905
12841
  }), this.client.on("session_delete", async (e) => {
12906
12842
  var s;
12907
12843
  e.topic === ((s = this.session) == null ? void 0 : s.topic) && (await this.cleanup(), this.events.emit("session_delete", e), this.events.emit("disconnect", ha(qn({}, De("USER_DISCONNECTED")), { data: e.topic })));
12908
- }), this.on(Ht.DEFAULT_CHAIN_CHANGED, (e) => {
12844
+ }), this.on(Wt.DEFAULT_CHAIN_CHANGED, (e) => {
12909
12845
  this.onChainChanged(e, !0);
12910
12846
  });
12911
12847
  }
@@ -12993,7 +12929,7 @@ let iA = class tp {
12993
12929
  }
12994
12930
  };
12995
12931
  function jn(t, e) {
12996
- return H.getConnectorId(t) === e;
12932
+ return W.getConnectorId(t) === e;
12997
12933
  }
12998
12934
  function nA(t) {
12999
12935
  const e = Array.from(b.state.chains.keys());
@@ -13077,7 +13013,7 @@ const ks = {
13077
13013
  }
13078
13014
  };
13079
13015
  new AbortController();
13080
- const Hr = {
13016
+ const Wr = {
13081
13017
  UniversalProviderErrors: {
13082
13018
  UNAUTHORIZED_DOMAIN_NOT_ALLOWED: {
13083
13019
  message: "Unauthorized: origin not allowed",
@@ -13147,7 +13083,7 @@ const aA = {
13147
13083
  }, r;
13148
13084
  }
13149
13085
  }, cA = "rpc.walletconnect.org";
13150
- function Wu(t, e) {
13086
+ function Hu(t, e) {
13151
13087
  const s = new URL("https://rpc.walletconnect.org/v1/");
13152
13088
  return s.searchParams.set("chainId", t), s.searchParams.set("projectId", e), s.toString();
13153
13089
  }
@@ -13216,7 +13152,7 @@ const da = [
13216
13152
  getDefaultRpcUrl(t, e, s) {
13217
13153
  var i, n, o;
13218
13154
  const r = (o = (n = (i = t.rpcUrls) == null ? void 0 : i.default) == null ? void 0 : n.http) == null ? void 0 : o[0];
13219
- return da.includes(e) ? Wu(e, s) : r || "";
13155
+ return da.includes(e) ? Hu(e, s) : r || "";
13220
13156
  },
13221
13157
  extendCaipNetwork(t, { customNetworkImageUrls: e, projectId: s, customRpcUrls: r }) {
13222
13158
  var d, g, y, f, p;
@@ -13252,7 +13188,7 @@ const da = [
13252
13188
  const r = [];
13253
13189
  return s == null || s.forEach((a) => {
13254
13190
  r.push(Sn(a.url, a.config));
13255
- }), da.includes(t.caipNetworkId) && r.push(Sn(Wu(t.caipNetworkId, e), {
13191
+ }), da.includes(t.caipNetworkId) && r.push(Sn(Hu(t.caipNetworkId, e), {
13256
13192
  fetchOptions: {
13257
13193
  headers: {
13258
13194
  "Content-Type": "text/plain"
@@ -13347,7 +13283,7 @@ const da = [
13347
13283
  }
13348
13284
  }, ic = {
13349
13285
  filterOutDuplicatesByRDNS(t) {
13350
- const e = B.state.enableEIP6963 ? H.state.connectors : [], s = z.getRecentWallets(), r = e.map((a) => {
13286
+ const e = B.state.enableEIP6963 ? W.state.connectors : [], s = z.getRecentWallets(), r = e.map((a) => {
13351
13287
  var c;
13352
13288
  return (c = a.info) == null ? void 0 : c.rdns;
13353
13289
  }).filter(Boolean), i = s.map((a) => a.rdns).filter(Boolean), n = r.concat(i);
@@ -13358,7 +13294,7 @@ const da = [
13358
13294
  return t.filter((a) => !n.includes(String(a == null ? void 0 : a.rdns)));
13359
13295
  },
13360
13296
  filterOutDuplicatesByIds(t) {
13361
- const e = H.state.connectors.filter((a) => a.type === "ANNOUNCED" || a.type === "INJECTED"), s = z.getRecentWallets(), r = e.map((a) => a.explorerId), i = s.map((a) => a.id), n = r.concat(i);
13297
+ const e = W.state.connectors.filter((a) => a.type === "ANNOUNCED" || a.type === "INJECTED"), s = z.getRecentWallets(), r = e.map((a) => a.explorerId), i = s.map((a) => a.id), n = r.concat(i);
13362
13298
  return t.filter((a) => !n.includes(a == null ? void 0 : a.id));
13363
13299
  },
13364
13300
  filterOutDuplicateWallets(t) {
@@ -13366,7 +13302,7 @@ const da = [
13366
13302
  return this.filterOutDuplicatesByIds(e);
13367
13303
  },
13368
13304
  markWalletsAsInstalled(t) {
13369
- const { connectors: e } = H.state, { featuredWalletIds: s } = B.state, r = e.filter((o) => o.type === "ANNOUNCED").reduce((o, a) => {
13305
+ const { connectors: e } = W.state, { featuredWalletIds: s } = B.state, r = e.filter((o) => o.type === "ANNOUNCED").reduce((o, a) => {
13370
13306
  var c;
13371
13307
  return (c = a.info) != null && c.rdns && (o[a.info.rdns] = !0), o;
13372
13308
  }, {});
@@ -13391,7 +13327,7 @@ const da = [
13391
13327
  },
13392
13328
  getConnectOrderMethod(t, e) {
13393
13329
  var c;
13394
- const s = (t == null ? void 0 : t.connectMethodsOrder) || ((c = B.state.features) == null ? void 0 : c.connectMethodsOrder), r = e || H.state.connectors;
13330
+ const s = (t == null ? void 0 : t.connectMethodsOrder) || ((c = B.state.features) == null ? void 0 : c.connectMethodsOrder), r = e || W.state.connectors;
13395
13331
  if (s)
13396
13332
  return s;
13397
13333
  const { injected: i, announced: n } = Gn.getConnectorsByType(r, J.state.recommended, J.state.featured), o = i.filter(Gn.showConnector), a = n.filter(Gn.showConnector);
@@ -13421,7 +13357,7 @@ const da = [
13421
13357
  return !(t.type === "INJECTED" && (t.name === "Browser Wallet" && (!te.isMobile() || te.isMobile() && !e && !ee.checkInstalled()) || s || r) || (t.type === "ANNOUNCED" || t.type === "EXTERNAL") && (s || r));
13422
13358
  },
13423
13359
  getIsConnectedWithWC() {
13424
- return Array.from(b.state.chains.values()).some((s) => H.getConnectorId(s.namespace) === K.CONNECTOR_ID.WALLET_CONNECT);
13360
+ return Array.from(b.state.chains.values()).some((s) => W.getConnectorId(s.namespace) === K.CONNECTOR_ID.WALLET_CONNECT);
13425
13361
  },
13426
13362
  getConnectorTypeOrder({ recommended: t, featured: e, custom: s, recent: r, announced: i, injected: n, multiChain: o, external: a, overriddenConnectors: c = ((l) => (l = B.state.features) == null ? void 0 : l.connectorTypeOrder)() ?? [] }) {
13427
13363
  const u = Gn.getIsConnectedWithWC(), g = [
@@ -13436,7 +13372,7 @@ const da = [
13436
13372
  return Array.from(new Set([...f, ...p].map(({ type: m }) => m)));
13437
13373
  }
13438
13374
  };
13439
- const Jn = globalThis, Sc = Jn.ShadowRoot && (Jn.ShadyCSS === void 0 || Jn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Pc = Symbol(), Hu = /* @__PURE__ */ new WeakMap();
13375
+ const Jn = globalThis, Sc = Jn.ShadowRoot && (Jn.ShadyCSS === void 0 || Jn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Pc = Symbol(), Wu = /* @__PURE__ */ new WeakMap();
13440
13376
  let sp = class {
13441
13377
  constructor(e, s, r) {
13442
13378
  if (this._$cssResult$ = !0, r !== Pc) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -13447,7 +13383,7 @@ let sp = class {
13447
13383
  const s = this.t;
13448
13384
  if (Sc && e === void 0) {
13449
13385
  const r = s !== void 0 && s.length === 1;
13450
- r && (e = Hu.get(s)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && Hu.set(s, e));
13386
+ r && (e = Wu.get(s)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && Wu.set(s, e));
13451
13387
  }
13452
13388
  return e;
13453
13389
  }
@@ -13967,15 +13903,15 @@ Yn._$litElement$ = !0, Yn.finalized = !0, (rh = cr.litElementHydrateSupport) ==
13967
13903
  const ma = cr.litElementPolyfillSupport;
13968
13904
  ma == null || ma({ LitElement: Yn });
13969
13905
  (cr.litElementVersions ?? (cr.litElementVersions = [])).push("4.2.0");
13970
- let tn, Ws, Hs;
13906
+ let tn, Hs, Ws;
13971
13907
  function ON(t, e) {
13972
- tn = document.createElement("style"), Ws = document.createElement("style"), Hs = document.createElement("style"), tn.textContent = si(t).core.cssText, Ws.textContent = si(t).dark.cssText, Hs.textContent = si(t).light.cssText, document.head.appendChild(tn), document.head.appendChild(Ws), document.head.appendChild(Hs), lp(e);
13908
+ tn = document.createElement("style"), Hs = document.createElement("style"), Ws = document.createElement("style"), tn.textContent = si(t).core.cssText, Hs.textContent = si(t).dark.cssText, Ws.textContent = si(t).light.cssText, document.head.appendChild(tn), document.head.appendChild(Hs), document.head.appendChild(Ws), lp(e);
13973
13909
  }
13974
13910
  function lp(t) {
13975
- Ws && Hs && (t === "light" ? (Ws.removeAttribute("media"), Hs.media = "enabled") : (Hs.removeAttribute("media"), Ws.media = "enabled"));
13911
+ Hs && Ws && (t === "light" ? (Hs.removeAttribute("media"), Ws.media = "enabled") : (Ws.removeAttribute("media"), Hs.media = "enabled"));
13976
13912
  }
13977
13913
  function SA(t) {
13978
- tn && Ws && Hs && (tn.textContent = si(t).core.cssText, Ws.textContent = si(t).dark.cssText, Hs.textContent = si(t).light.cssText);
13914
+ tn && Hs && Ws && (tn.textContent = si(t).core.cssText, Hs.textContent = si(t).dark.cssText, Ws.textContent = si(t).light.cssText);
13979
13915
  }
13980
13916
  function si(t) {
13981
13917
  return {
@@ -14860,7 +14796,7 @@ const TN = ti`
14860
14796
  .wui-color-fg-350 {
14861
14797
  background-color: var(--wui-color-fg-350);
14862
14798
  }
14863
- `, Wi = {
14799
+ `, Hi = {
14864
14800
  ERROR_CODE_UNRECOGNIZED_CHAIN_ID: 4902,
14865
14801
  ERROR_CODE_DEFAULT: 5e3,
14866
14802
  ERROR_INVALID_CHAIN_ID: 32603,
@@ -15284,8 +15220,7 @@ class $A extends TA {
15284
15220
  async disconnect() {
15285
15221
  try {
15286
15222
  await this.getWalletConnectConnector().disconnect();
15287
- } catch (e) {
15288
- console.warn("UniversalAdapter:disconnect - error", e);
15223
+ } catch {
15289
15224
  }
15290
15225
  }
15291
15226
  async getAccounts({ namespace: e }) {
@@ -15398,7 +15333,7 @@ class $A extends TA {
15398
15333
  params: [{ chainId: xc(s.id) }]
15399
15334
  }));
15400
15335
  } catch (u) {
15401
- if (u.code === Wi.ERROR_CODE_UNRECOGNIZED_CHAIN_ID || u.code === Wi.ERROR_INVALID_CHAIN_ID || u.code === Wi.ERROR_CODE_DEFAULT || ((o = (n = u == null ? void 0 : u.data) == null ? void 0 : n.originalError) == null ? void 0 : o.code) === Wi.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)
15336
+ if (u.code === Hi.ERROR_CODE_UNRECOGNIZED_CHAIN_ID || u.code === Hi.ERROR_INVALID_CHAIN_ID || u.code === Hi.ERROR_CODE_DEFAULT || ((o = (n = u == null ? void 0 : u.data) == null ? void 0 : n.originalError) == null ? void 0 : o.code) === Hi.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)
15402
15337
  try {
15403
15338
  await ((l = r.provider) == null ? void 0 : l.request({
15404
15339
  method: "wallet_addEthereumChain",
@@ -15430,7 +15365,7 @@ const kA = [
15430
15365
  "onramp",
15431
15366
  "activity",
15432
15367
  "reownBranding"
15433
- ], Wn = {
15368
+ ], Hn = {
15434
15369
  email: {
15435
15370
  apiFeatureName: "social_login",
15436
15371
  localFeatureName: "email",
@@ -15512,12 +15447,12 @@ const kA = [
15512
15447
  },
15513
15448
  addWarning(t, e) {
15514
15449
  if (t !== void 0) {
15515
- const s = Wn[e], r = s.isLegacy ? `"features.${s.localFeatureName}" (now "${e}")` : `"features.${e}"`;
15450
+ const s = Hn[e], r = s.isLegacy ? `"features.${s.localFeatureName}" (now "${e}")` : `"features.${e}"`;
15516
15451
  this.localSettingsOverridden.add(r);
15517
15452
  }
15518
15453
  },
15519
15454
  processFeature(t, e, s, r, i) {
15520
- const n = Wn[t], o = e[n.localFeatureName];
15455
+ const n = Hn[t], o = e[n.localFeatureName];
15521
15456
  if (i && !n.isAvailableOnBasic)
15522
15457
  return !1;
15523
15458
  if (r) {
@@ -15527,10 +15462,10 @@ const kA = [
15527
15462
  return this.processFallbackFeature(t, o);
15528
15463
  },
15529
15464
  processApiFeature(t, e) {
15530
- return Wn[t].processApi(e);
15465
+ return Hn[t].processApi(e);
15531
15466
  },
15532
15467
  processFallbackFeature(t, e) {
15533
- return Wn[t].processFallback(e);
15468
+ return Hn[t].processFallback(e);
15534
15469
  },
15535
15470
  async fetchRemoteFeatures(t) {
15536
15471
  const e = t.basic ?? !1, s = t.features || {};
@@ -15538,8 +15473,7 @@ const kA = [
15538
15473
  let r = null, i = !1;
15539
15474
  try {
15540
15475
  r = await J.fetchProjectConfig(), i = r != null;
15541
- } catch (o) {
15542
- console.warn("[Reown Config] Failed to fetch remote project configuration. Using local/default values.", o);
15476
+ } catch {
15543
15477
  }
15544
15478
  const n = i && !e ? Te.DEFAULT_REMOTE_FEATURES : Te.DEFAULT_REMOTE_FEATURES_DISABLED;
15545
15479
  try {
@@ -15547,8 +15481,8 @@ const kA = [
15547
15481
  const a = this.processFeature(o, s, r, i, e);
15548
15482
  Object.assign(n, { [o]: a });
15549
15483
  }
15550
- } catch (o) {
15551
- return console.warn("[Reown Config] Failed to process the configuration from Cloud. Using default values.", o), Te.DEFAULT_REMOTE_FEATURES;
15484
+ } catch {
15485
+ return Te.DEFAULT_REMOTE_FEATURES;
15552
15486
  }
15553
15487
  if (i && this.localSettingsOverridden.size > 0) {
15554
15488
  const o = `Your local configuration for ${Array.from(this.localSettingsOverridden).join(", ")} was ignored because a remote configuration was successfully fetched. Please manage these features via your project dashboard on dashboard.reown.com.`;
@@ -15602,13 +15536,13 @@ class RA {
15602
15536
  }, this.setAllAccounts = (s, r) => {
15603
15537
  V.setAllAccounts(s, r), B.setHasMultipleAddresses((s == null ? void 0 : s.length) > 1);
15604
15538
  }, this.setStatus = (s, r) => {
15605
- V.setStatus(s, r), H.isConnected() ? z.setConnectionStatus("connected") : z.setConnectionStatus("disconnected");
15539
+ V.setStatus(s, r), W.isConnected() ? z.setConnectionStatus("connected") : z.setConnectionStatus("disconnected");
15606
15540
  }, this.getAddressByChainNamespace = (s) => b.getAccountProp("address", s), this.setConnectors = (s) => {
15607
- const r = [...H.state.allConnectors, ...s];
15608
- H.setConnectors(r);
15541
+ const r = [...W.state.allConnectors, ...s];
15542
+ W.setConnectors(r);
15609
15543
  }, this.setConnections = (s, r) => {
15610
15544
  ee.setConnections(s, r);
15611
- }, this.fetchIdentity = (s) => Q.fetchIdentity(s), this.getReownName = (s) => Ki.getNamesForAddress(s), this.getConnectors = () => H.getConnectors(), this.getConnectorImage = (s) => dh.getConnectorImage(s), this.setConnectedWalletInfo = (s, r) => {
15545
+ }, this.fetchIdentity = (s) => Q.fetchIdentity(s), this.getReownName = (s) => Ki.getNamesForAddress(s), this.getConnectors = () => W.getConnectors(), this.getConnectorImage = (s) => dh.getConnectorImage(s), this.setConnectedWalletInfo = (s, r) => {
15612
15546
  const i = Ue.getProviderId(r), n = s ? { ...s, type: i } : void 0;
15613
15547
  V.setConnectedWalletInfo(n, r);
15614
15548
  }, this.getIsConnectedState = () => !!b.state.activeCaipAddress, this.addAddressLabel = (s, r, i) => {
@@ -15618,7 +15552,7 @@ class RA {
15618
15552
  }, this.getAddress = (s) => b.state.activeChain === s || !s ? V.state.address : b.getAccountProp("address", s), this.setApprovedCaipNetworksData = (s) => b.setApprovedCaipNetworksData(s), this.resetNetwork = (s) => {
15619
15553
  b.resetNetwork(s);
15620
15554
  }, this.addConnector = (s) => {
15621
- H.addConnector(s);
15555
+ W.addConnector(s);
15622
15556
  }, this.resetWcConnection = () => {
15623
15557
  ee.resetWcConnection();
15624
15558
  }, this.setAddressExplorerUrl = (s, r) => {
@@ -15655,9 +15589,9 @@ class RA {
15655
15589
  const e = await J.fetchAllowedOrigins();
15656
15590
  if (e && te.isClient()) {
15657
15591
  const s = window.location.origin;
15658
- Zn.isOriginAllowed(s, e, Wi.DEFAULT_ALLOWED_ANCESTORS) || Zs.open(Hr.ALERT_ERRORS.INVALID_APP_CONFIGURATION, "error");
15592
+ Zn.isOriginAllowed(s, e, Hi.DEFAULT_ALLOWED_ANCESTORS) || Zs.open(Wr.ALERT_ERRORS.INVALID_APP_CONFIGURATION, "error");
15659
15593
  } else
15660
- Zs.open(Hr.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED, "error");
15594
+ Zs.open(Wr.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED, "error");
15661
15595
  }
15662
15596
  sendInitializeEvent(e) {
15663
15597
  var r;
@@ -15695,7 +15629,7 @@ class RA {
15695
15629
  ee.setWcBasic(e.basic ?? !1);
15696
15630
  }
15697
15631
  initializeConnectorController() {
15698
- H.initialize(this.chainNamespaces);
15632
+ W.initialize(this.chainNamespaces);
15699
15633
  }
15700
15634
  initializeProjectSettings(e) {
15701
15635
  B.setProjectId(e.projectId), B.setSdkVersion(e.sdkVersion);
@@ -15707,7 +15641,7 @@ class RA {
15707
15641
  V.setPreferredAccountTypes(r);
15708
15642
  const i = this.getDefaultMetaData();
15709
15643
  if (!e.metadata && i && (e.metadata = i), B.setMetadata(e.metadata), B.setDisableAppend(e.disableAppend), B.setEnableEmbedded(e.enableEmbedded), B.setSIWX(e.siwx), !e.projectId) {
15710
- Zs.open(Hr.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED, "error");
15644
+ Zs.open(Wr.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED, "error");
15711
15645
  return;
15712
15646
  }
15713
15647
  if (((o = e.adapters) == null ? void 0 : o.find((a) => a.namespace === K.CHAIN.EVM)) && e.siweConfig) {
@@ -15763,7 +15697,7 @@ class RA {
15763
15697
  async disconnectNamespace(e) {
15764
15698
  try {
15765
15699
  const s = this.getAdapter(e), r = Ue.getProvider(e), i = Ue.getProviderId(e), { caipAddress: n } = b.getAccountData(e) || {};
15766
- this.setLoading(!0, e), n && (s != null && s.disconnect) && await s.disconnect({ provider: r, providerType: i }), z.removeConnectedNamespace(e), Ue.resetChain(e), this.setUser(void 0, e), this.setStatus("disconnected", e), this.setConnectedWalletInfo(void 0, e), H.removeConnectorId(e), b.resetAccount(e), b.resetNetwork(e), this.setLoading(!1, e);
15700
+ this.setLoading(!0, e), n && (s != null && s.disconnect) && await s.disconnect({ provider: r, providerType: i }), z.removeConnectedNamespace(e), Ue.resetChain(e), this.setUser(void 0, e), this.setStatus("disconnected", e), this.setConnectedWalletInfo(void 0, e), W.removeConnectorId(e), b.resetAccount(e), b.resetNetwork(e), this.setLoading(!1, e);
15767
15701
  } catch (s) {
15768
15702
  throw this.setLoading(!1, e), new Error(`Failed to disconnect chain ${e}: ${s.message}`);
15769
15703
  }
@@ -15778,7 +15712,7 @@ class RA {
15778
15712
  throw new Error("Adapter not found");
15779
15713
  const i = await s.connectWalletConnect(r);
15780
15714
  this.close(), this.setClientId((i == null ? void 0 : i.clientId) || null), z.setConnectedNamespaces([...b.state.chains.keys()]), this.chainNamespaces.forEach((o) => {
15781
- H.setConnectorId(ks.CONNECTOR_TYPE_WALLET_CONNECT, o);
15715
+ W.setConnectorId(ks.CONNECTOR_TYPE_WALLET_CONNECT, o);
15782
15716
  }), await this.syncWalletConnectAccount();
15783
15717
  },
15784
15718
  connectExternal: async ({ id: e, info: s, type: r, provider: i, chain: n, caipNetwork: o, socialUri: a }) => {
@@ -15818,7 +15752,7 @@ class RA {
15818
15752
  const s = nA(e);
15819
15753
  try {
15820
15754
  const r = await Promise.allSettled(s.map(async ([n]) => this.disconnectNamespace(n)));
15821
- be.resetSend(), ee.resetWcConnection(), await Gi.clearSessions(), H.setFilterByNamespace(void 0);
15755
+ be.resetSend(), ee.resetWcConnection(), await Gi.clearSessions(), W.setFilterByNamespace(void 0);
15822
15756
  const i = r.filter((n) => n.status === "rejected");
15823
15757
  if (i.length > 0)
15824
15758
  throw new Error(i.map((n) => n.reason.message).join(", "));
@@ -16037,8 +15971,8 @@ class RA {
16037
15971
  }
16038
15972
  async syncNamespaceConnection(e) {
16039
15973
  try {
16040
- e === K.CHAIN.EVM && te.isSafeApp() && H.setConnectorId(K.CONNECTOR_ID.SAFE, e);
16041
- const s = H.getConnectorId(e);
15974
+ e === K.CHAIN.EVM && te.isSafeApp() && W.setConnectorId(K.CONNECTOR_ID.SAFE, e);
15975
+ const s = W.getConnectorId(e);
16042
15976
  switch (this.setStatus("connecting", e), s) {
16043
15977
  case K.CONNECTOR_ID.WALLET_CONNECT:
16044
15978
  await this.syncWalletConnectAccount();
@@ -16048,13 +15982,13 @@ class RA {
16048
15982
  default:
16049
15983
  await this.syncAdapterConnection(e);
16050
15984
  }
16051
- } catch (s) {
16052
- console.warn("AppKit couldn't sync existing connection", s), this.setStatus("disconnected", e);
15985
+ } catch {
15986
+ this.setStatus("disconnected", e);
16053
15987
  }
16054
15988
  }
16055
15989
  async syncAdapterConnection(e) {
16056
15990
  var a, c, l;
16057
- const s = this.getAdapter(e), r = H.getConnectorId(e), i = this.getCaipNetwork(e), o = H.getConnectors(e).find((u) => u.id === r);
15991
+ const s = this.getAdapter(e), r = W.getConnectorId(e), i = this.getCaipNetwork(e), o = W.getConnectors(e).find((u) => u.id === r);
16058
15992
  try {
16059
15993
  if (!s || !o)
16060
15994
  throw new Error(`Adapter or connector not found for namespace ${e}`);
@@ -16096,7 +16030,7 @@ class RA {
16096
16030
  Ue.setProvider(s, f);
16097
16031
  } else
16098
16032
  Ue.setProvider(s, this.universalProvider);
16099
- H.setConnectorId(K.CONNECTOR_ID.WALLET_CONNECT, s), z.addConnectedNamespace(s), this.syncWalletConnectAccounts(s), await this.syncAccount({
16033
+ W.setConnectorId(K.CONNECTOR_ID.WALLET_CONNECT, s), z.addConnectedNamespace(s), this.syncWalletConnectAccounts(s), await this.syncAccount({
16100
16034
  address: y,
16101
16035
  chainId: g,
16102
16036
  chainNamespace: s
@@ -16116,10 +16050,10 @@ class RA {
16116
16050
  s && this.setAllAccounts(s.map((c) => te.createAccount(e, c, e === "bip122" ? "payment" : "eoa")), e);
16117
16051
  }
16118
16052
  syncProvider({ type: e, provider: s, id: r, chainNamespace: i }) {
16119
- Ue.setProviderId(i, e), Ue.setProvider(i, s), H.setConnectorId(r, i);
16053
+ Ue.setProviderId(i, e), Ue.setProvider(i, s), W.setConnectorId(r, i);
16120
16054
  }
16121
16055
  async syncAllAccounts(e) {
16122
- const s = H.getConnectorId(e);
16056
+ const s = W.getConnectorId(e);
16123
16057
  if (!s)
16124
16058
  return;
16125
16059
  const r = this.getAdapter(e), i = await (r == null ? void 0 : r.getAccounts({ namespace: e, id: s }));
@@ -16170,7 +16104,7 @@ class RA {
16170
16104
  }
16171
16105
  syncConnectedWalletInfo(e) {
16172
16106
  var i;
16173
- const s = H.getConnectorId(e), r = Ue.getProviderId(e);
16107
+ const s = W.getConnectorId(e), r = Ue.getProviderId(e);
16174
16108
  if (r === ks.CONNECTOR_TYPE_ANNOUNCED || r === ks.CONNECTOR_TYPE_INJECTED) {
16175
16109
  if (s) {
16176
16110
  const n = this.getConnectors().find((o) => o.id === s);
@@ -16216,7 +16150,7 @@ class RA {
16216
16150
  async initializeUniversalAdapter() {
16217
16151
  var r, i, n, o, a, c, l, u, h, d;
16218
16152
  const e = aA.createLogger((g, ...y) => {
16219
- g && this.handleAlertError(g), console.error(...y);
16153
+ g && this.handleAlertError(g);
16220
16154
  }), s = {
16221
16155
  projectId: (r = this.options) == null ? void 0 : r.projectId,
16222
16156
  metadata: {
@@ -16267,15 +16201,15 @@ class RA {
16267
16201
  errorMessage: e instanceof Error ? e.message : "Unknown",
16268
16202
  uncaught: !1
16269
16203
  }
16270
- }), console.error("AppKit:getUniversalProvider - Cannot create provider", e);
16204
+ });
16271
16205
  }
16272
16206
  return this.universalProvider;
16273
16207
  }
16274
16208
  // - Utils -------------------------------------------------------------------
16275
16209
  handleAlertError(e) {
16276
- const s = Object.entries(Hr.UniversalProviderErrors).find(([, { message: a }]) => e.message.includes(a)), [r, i] = s ?? [], { message: n, alertErrorKey: o } = i ?? {};
16210
+ const s = Object.entries(Wr.UniversalProviderErrors).find(([, { message: a }]) => e.message.includes(a)), [r, i] = s ?? [], { message: n, alertErrorKey: o } = i ?? {};
16277
16211
  if (r && n && !this.reportedAlertErrors[r]) {
16278
- const a = Hr.ALERT_ERRORS[o];
16212
+ const a = Wr.ALERT_ERRORS[o];
16279
16213
  a && (Zs.open(a, "error"), this.reportedAlertErrors[r] = !0);
16280
16214
  }
16281
16215
  }
@@ -16331,7 +16265,7 @@ class RA {
16331
16265
  async switchNetwork(e) {
16332
16266
  const s = this.getCaipNetworks().find((r) => r.id === e.id);
16333
16267
  if (!s) {
16334
- Zs.open(Hr.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND, "error");
16268
+ Zs.open(Wr.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND, "error");
16335
16269
  return;
16336
16270
  }
16337
16271
  await b.switchActiveNetwork(s);
@@ -16371,7 +16305,7 @@ class RA {
16371
16305
  }
16372
16306
  getAccount(e) {
16373
16307
  var o;
16374
- const s = H.getAuthConnector(e), r = b.getAccountData(e), i = b.state.activeChain, n = z.getConnectedConnectorId(e || i);
16308
+ const s = W.getAuthConnector(e), r = b.getAccountData(e), i = b.state.activeChain, n = z.getConnectedConnectorId(e || i);
16375
16309
  if (r)
16376
16310
  return {
16377
16311
  allAccounts: r.allAccounts,
@@ -16401,7 +16335,7 @@ class RA {
16401
16335
  const i = this.getAccount(s);
16402
16336
  i && e(i);
16403
16337
  };
16404
- s ? b.subscribeChainProp("accountState", r, s) : b.subscribe(r), H.subscribe(r);
16338
+ s ? b.subscribeChainProp("accountState", r, s) : b.subscribe(r), W.subscribe(r);
16405
16339
  }
16406
16340
  subscribeNetwork(e) {
16407
16341
  return b.subscribe(({ activeCaipNetwork: s }) => {
@@ -16480,7 +16414,7 @@ class RA {
16480
16414
  B.setSocialsOrder(e);
16481
16415
  }
16482
16416
  getConnectMethodsOrder() {
16483
- return ic.getConnectOrderMethod(B.state.features, H.getConnectors());
16417
+ return ic.getConnectOrderMethod(B.state.features, W.getConnectors());
16484
16418
  }
16485
16419
  /**
16486
16420
  * Adds a network to an existing adapter in AppKit.
@@ -16510,7 +16444,7 @@ let sh = !1;
16510
16444
  class hp extends RA {
16511
16445
  // -- Overrides --------------------------------------------------------------
16512
16446
  async open(e) {
16513
- H.isConnected() || await super.open(e);
16447
+ W.isConnected() || await super.open(e);
16514
16448
  }
16515
16449
  async close() {
16516
16450
  await super.close(), this.options.manualWCControl && ee.finalizeWcConnection();
@@ -16523,7 +16457,7 @@ class hp extends RA {
16523
16457
  }
16524
16458
  async injectModalUi() {
16525
16459
  if (!sh && te.isClient()) {
16526
- if (await import("./basic-BgV8RQ-A.js"), await import("./w3m-modal-pIdI-nLd.js"), !document.querySelector("w3m-modal")) {
16460
+ if (await import("./basic-CfaJcj31.js"), await import("./w3m-modal-CuXPdser.js"), !document.querySelector("w3m-modal")) {
16527
16461
  const s = document.createElement("w3m-modal");
16528
16462
  !B.state.disableAppend && !B.state.enableEmbedded && document.body.insertAdjacentElement("beforeend", s);
16529
16463
  }
@@ -16547,7 +16481,7 @@ const xN = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16547
16481
  export {
16548
16482
  J as A,
16549
16483
  rp as B,
16550
- H as C,
16484
+ W as C,
16551
16485
  nc as D,
16552
16486
  Le as E,
16553
16487
  wi as F,