@blockend/widget 1.0.61-beta.1 → 1.0.61-beta.2

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