@multiversx/sdk-dapp 5.0.11 → 5.0.13

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 (429) hide show
  1. package/out/__chunks__/chunk-3F3QCMGL.mjs +2 -0
  2. package/out/__chunks__/{chunk-MFYHPHET.mjs.map → chunk-3F3QCMGL.mjs.map} +2 -2
  3. package/out/__chunks__/{chunk-YRUQIWQX.mjs → chunk-3L6GBV7L.mjs} +2 -2
  4. package/out/__chunks__/{chunk-24XAM2VT.mjs → chunk-3WNAFMEK.mjs} +2 -2
  5. package/out/__chunks__/{chunk-JSFAGVXL.mjs → chunk-3YBH7N5W.mjs} +2 -2
  6. package/out/__chunks__/{chunk-FE3NXNR6.mjs → chunk-44IN6A4I.mjs} +2 -2
  7. package/out/__chunks__/chunk-4IS7AY5Q.mjs +2 -0
  8. package/out/__chunks__/{chunk-QET2OLJT.mjs.map → chunk-4IS7AY5Q.mjs.map} +1 -1
  9. package/out/__chunks__/{chunk-WDFZXGVF.mjs → chunk-534QBNPX.mjs} +2 -2
  10. package/out/__chunks__/{chunk-B7VHGVIW.mjs → chunk-57AGUNU6.mjs} +2 -2
  11. package/out/__chunks__/{chunk-QEEQRZS6.mjs → chunk-5DEHHVDS.mjs} +2 -2
  12. package/out/__chunks__/{chunk-NA5BUERU.mjs → chunk-5JYNGKVQ.mjs} +2 -2
  13. package/out/__chunks__/{chunk-M3S3XSZ7.mjs → chunk-6BJS5QNF.mjs} +2 -2
  14. package/out/__chunks__/{chunk-GJYL4HXE.mjs → chunk-6RRVRDXX.mjs} +2 -2
  15. package/out/__chunks__/chunk-73MKFMKP.mjs +2 -0
  16. package/out/__chunks__/chunk-76PSW6FH.mjs +2 -0
  17. package/out/__chunks__/chunk-76PSW6FH.mjs.map +7 -0
  18. package/out/__chunks__/{chunk-OEBWA3U7.mjs → chunk-7HGOYM67.mjs} +2 -2
  19. package/out/__chunks__/{chunk-6WVBN32G.mjs → chunk-7TUX3TKQ.mjs} +2 -2
  20. package/out/__chunks__/{chunk-R7SGU5J2.mjs → chunk-AL5D2VEW.mjs} +2 -2
  21. package/out/__chunks__/{chunk-FVHDVMP6.mjs → chunk-BDOJEJNA.mjs} +2 -2
  22. package/out/__chunks__/{chunk-DJY24BHS.mjs → chunk-BDXSVYER.mjs} +2 -2
  23. package/out/__chunks__/{chunk-TPKK34YE.mjs → chunk-BEPW7QRT.mjs} +2 -2
  24. package/out/__chunks__/{chunk-YXC4NJUD.mjs → chunk-BIIJSMXB.mjs} +2 -2
  25. package/out/__chunks__/chunk-BUHXFBUA.mjs +2 -0
  26. package/out/__chunks__/{chunk-6MXUKZB3.mjs → chunk-CIVS2YDU.mjs} +2 -2
  27. package/out/__chunks__/{chunk-ADE33SZY.mjs → chunk-CJYTBE3E.mjs} +2 -2
  28. package/out/__chunks__/{chunk-B5QFFY63.mjs → chunk-D5DHIEIM.mjs} +2 -2
  29. package/out/__chunks__/chunk-DTEI5SBP.mjs +2 -0
  30. package/out/__chunks__/{chunk-QIBUEZS3.mjs → chunk-DX6OA75E.mjs} +2 -2
  31. package/out/__chunks__/{chunk-SGGAZCOK.mjs → chunk-EC3CUSWI.mjs} +2 -2
  32. package/out/__chunks__/{chunk-7RLXMK3R.mjs → chunk-EJV4GLIF.mjs} +2 -2
  33. package/out/__chunks__/chunk-ETSUQ2R4.mjs +2 -0
  34. package/out/__chunks__/{chunk-IZMXB463.mjs → chunk-FFUT67H3.mjs} +2 -2
  35. package/out/__chunks__/chunk-FM6JYAAR.mjs +2 -0
  36. package/out/__chunks__/chunk-FQNOEYHK.mjs +2 -0
  37. package/out/__chunks__/chunk-FQNOEYHK.mjs.map +7 -0
  38. package/out/__chunks__/chunk-FZ72N7LX.mjs +2 -0
  39. package/out/__chunks__/{chunk-EVS2OAVI.mjs → chunk-GQOTAVAR.mjs} +2 -2
  40. package/out/__chunks__/chunk-H3PQUL5M.mjs +2 -0
  41. package/out/__chunks__/{chunk-PGY32PLX.mjs → chunk-HCGAZMW2.mjs} +2 -2
  42. package/out/__chunks__/chunk-HFEXCIZ2.mjs +2 -0
  43. package/out/__chunks__/{chunk-BNDFXYBM.mjs → chunk-HPC5WEQQ.mjs} +2 -2
  44. package/out/__chunks__/{chunk-RZNOYCZT.mjs → chunk-HWO7E325.mjs} +2 -2
  45. package/out/__chunks__/{chunk-QGUSK75W.mjs → chunk-IFWUP3FX.mjs} +2 -2
  46. package/out/__chunks__/{chunk-YFO4VEZA.mjs → chunk-IOTYH724.mjs} +2 -2
  47. package/out/__chunks__/{chunk-TRQA733J.mjs → chunk-JIF5QHA5.mjs} +2 -2
  48. package/out/__chunks__/{chunk-7CFPPCWC.mjs → chunk-JIXJ3S3H.mjs} +2 -2
  49. package/out/__chunks__/{chunk-Z2M3TCDN.mjs → chunk-JUSK5MVD.mjs} +2 -2
  50. package/out/__chunks__/{chunk-YZZYAO7Z.mjs → chunk-JUXIROQH.mjs} +2 -2
  51. package/out/__chunks__/{chunk-EHWT3WER.mjs → chunk-KASFKR36.mjs} +2 -2
  52. package/out/__chunks__/{chunk-EHWT3WER.mjs.map → chunk-KASFKR36.mjs.map} +2 -2
  53. package/out/__chunks__/{chunk-YKUDEXLD.mjs → chunk-KEUKJKQV.mjs} +2 -2
  54. package/out/__chunks__/{chunk-JJ23PMQB.mjs → chunk-LYUN4G56.mjs} +2 -2
  55. package/out/__chunks__/chunk-M7BM6QPB.mjs +2 -0
  56. package/out/__chunks__/{chunk-X4XULIVT.mjs.map → chunk-M7BM6QPB.mjs.map} +2 -2
  57. package/out/__chunks__/{chunk-RRRK4J56.mjs → chunk-N7UPPFCH.mjs} +2 -2
  58. package/out/__chunks__/{chunk-F2UXV2DY.mjs → chunk-NDUDQZDL.mjs} +2 -2
  59. package/out/__chunks__/{chunk-KU45KIR2.mjs → chunk-NLZHVYZR.mjs} +2 -2
  60. package/out/__chunks__/{chunk-JPGDRR3A.mjs → chunk-NNBLC3DP.mjs} +2 -2
  61. package/out/__chunks__/{chunk-TAWCCADM.mjs → chunk-O2ZZO4AS.mjs} +2 -2
  62. package/out/__chunks__/{chunk-2DS6LYYY.mjs → chunk-OINVR4SF.mjs} +2 -2
  63. package/out/__chunks__/{chunk-23TMKZFJ.mjs → chunk-OIWRUY4C.mjs} +2 -2
  64. package/out/__chunks__/{chunk-MD5HYIJO.mjs → chunk-OMSCPNRR.mjs} +2 -2
  65. package/out/__chunks__/chunk-OTHNSSYN.mjs +2 -0
  66. package/out/__chunks__/chunk-P6PCRGOG.mjs +2 -0
  67. package/out/__chunks__/chunk-PFMOMLPA.mjs +2 -0
  68. package/out/__chunks__/{chunk-YU6ZFE62.mjs.map → chunk-PFMOMLPA.mjs.map} +3 -3
  69. package/out/__chunks__/{chunk-SZOPMJSG.mjs → chunk-QO2DNBMF.mjs} +2 -2
  70. package/out/__chunks__/chunk-RFBR7WI3.mjs +2 -0
  71. package/out/__chunks__/{chunk-RHZYJH4K.mjs → chunk-ROH2QHUK.mjs} +2 -2
  72. package/out/__chunks__/chunk-RVCCJBPE.mjs +2 -0
  73. package/out/__chunks__/{chunk-KT6OP6QC.mjs → chunk-T3FY4DQE.mjs} +2 -2
  74. package/out/__chunks__/{chunk-3HNDMSWW.mjs → chunk-TOGQL2M5.mjs} +2 -2
  75. package/out/__chunks__/{chunk-66WRMAXV.mjs → chunk-TSETF6SY.mjs} +2 -2
  76. package/out/__chunks__/{chunk-ZRKEA6YR.mjs → chunk-TVXFF2PG.mjs} +2 -2
  77. package/out/__chunks__/{chunk-2ZU7DAXN.mjs → chunk-UQ6DOBYK.mjs} +2 -2
  78. package/out/__chunks__/chunk-V73SALVM.mjs +2 -0
  79. package/out/__chunks__/chunk-VTF5A3OJ.mjs +2 -0
  80. package/out/__chunks__/chunk-VVHC6HV6.mjs +2 -0
  81. package/out/__chunks__/{chunk-ZWOEWFL2.mjs → chunk-WBEMK5QL.mjs} +2 -2
  82. package/out/__chunks__/{chunk-MMLP7K73.mjs → chunk-WJHF6NNO.mjs} +2 -2
  83. package/out/__chunks__/{chunk-5HBROJL7.mjs → chunk-WSBN47MX.mjs} +2 -2
  84. package/out/__chunks__/{chunk-X5KTEL7F.mjs → chunk-WXCST3O7.mjs} +2 -2
  85. package/out/__chunks__/{chunk-PAT5TWYK.mjs → chunk-X4CDTS57.mjs} +2 -2
  86. package/out/__chunks__/chunk-YARUDMWQ.mjs +2 -0
  87. package/out/__chunks__/chunk-ZHOATTZ2.mjs +2 -0
  88. package/out/__chunks__/{chunk-WM2ARQV6.mjs.map → chunk-ZHOATTZ2.mjs.map} +2 -2
  89. package/out/__chunks__/{chunk-LST3XXIJ.mjs → chunk-ZIMECN23.mjs} +2 -2
  90. package/out/__chunks__/{chunk-QYUEIE7N.mjs → chunk-ZLS3BN2I.mjs} +2 -2
  91. package/out/__chunks__/chunk-ZTQR4O4A.mjs +2 -0
  92. package/out/__chunks__/chunk-ZTQR4O4A.mjs.map +7 -0
  93. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  94. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  95. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  96. package/out/apiCalls/index.mjs +1 -1
  97. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  98. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  99. package/out/apiCalls/tokens/index.mjs +1 -1
  100. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  101. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  102. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  103. package/out/constants/browser.constants.mjs +1 -1
  104. package/out/constants/index.mjs +1 -1
  105. package/out/constants/storage.constants.cjs +3 -0
  106. package/out/constants/storage.constants.cjs.map +2 -2
  107. package/out/constants/storage.constants.d.ts +1 -0
  108. package/out/constants/storage.constants.mjs +1 -1
  109. package/out/constants/window.constants.cjs +1 -1
  110. package/out/constants/window.constants.cjs.map +1 -1
  111. package/out/constants/window.constants.mjs +1 -1
  112. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  113. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  114. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  115. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  116. package/out/index.mjs +1 -1
  117. package/out/lib/sdkDappUi.mjs +1 -1
  118. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  119. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  120. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  121. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  122. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  123. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  124. package/out/managers/TransactionManager/index.mjs +1 -1
  125. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  126. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  127. package/out/managers/index.mjs +1 -1
  128. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  129. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  130. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  131. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  132. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  133. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.cjs +7 -2
  134. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.cjs.map +2 -2
  135. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.d.ts +1 -1
  136. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  137. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  138. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  139. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  140. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  141. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  142. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  143. package/out/managers/internal/UIBaseManager/UIBaseManager.cjs +1 -1
  144. package/out/managers/internal/UIBaseManager/UIBaseManager.cjs.map +2 -2
  145. package/out/managers/internal/UIBaseManager/UIBaseManager.d.ts +1 -1
  146. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  147. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  148. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  149. package/out/managers/internal/index.mjs +1 -1
  150. package/out/methods/account/getAccount.mjs +1 -1
  151. package/out/methods/account/getAccountInfo.mjs +1 -1
  152. package/out/methods/account/getAddress.mjs +1 -1
  153. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  154. package/out/methods/account/getLatestNonce.cjs +2 -1
  155. package/out/methods/account/getLatestNonce.cjs.map +2 -2
  156. package/out/methods/account/getLatestNonce.mjs +1 -1
  157. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  158. package/out/methods/initApp/initApp.cjs +22 -1
  159. package/out/methods/initApp/initApp.cjs.map +2 -2
  160. package/out/methods/initApp/initApp.mjs +1 -1
  161. package/out/methods/initApp/initApp.mjs.map +3 -3
  162. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  163. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  164. package/out/methods/loginInfo/getLoginInfo.d.ts +0 -5
  165. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  166. package/out/methods/network/getEgldLabel.mjs +1 -1
  167. package/out/methods/network/getExplorerAddress.mjs +1 -1
  168. package/out/methods/network/getNetworkConfig.mjs +1 -1
  169. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  170. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  171. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  172. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  173. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  174. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  175. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  176. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  177. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  178. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  179. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  180. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  181. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs.map +1 -1
  182. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  183. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  184. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  185. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  186. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  187. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  188. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  189. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  190. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  191. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  192. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  193. package/out/providers/DappProvider/index.mjs +1 -1
  194. package/out/providers/ProviderFactory.mjs +1 -1
  195. package/out/providers/helpers/accountProvider.mjs +1 -1
  196. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  197. package/out/providers/helpers/restoreProvider.mjs +1 -1
  198. package/out/providers/index.mjs +1 -1
  199. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  200. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  201. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  202. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  203. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  204. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  205. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  206. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  207. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  208. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  209. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  210. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  211. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  212. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  213. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  214. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  215. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  216. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  217. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  218. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  219. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  220. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  221. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  222. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  223. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  224. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  225. package/out/providers/strategies/helpers/index.mjs +1 -1
  226. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  227. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  228. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  229. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  230. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  231. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  232. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs +1 -0
  233. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs.map +2 -2
  234. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  235. package/out/providers/strategies/index.mjs +1 -1
  236. package/out/react/account/useGetAccount.mjs +1 -1
  237. package/out/react/account/useGetAccountInfo.mjs +1 -1
  238. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  239. package/out/react/account/useGetLatestNonce.mjs +1 -1
  240. package/out/react/index.mjs +1 -1
  241. package/out/react/loginInfo/useGetLoginInfo.d.ts +0 -5
  242. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  243. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  244. package/out/react/store/getReactStore.mjs +1 -1
  245. package/out/react/store/useSelector.mjs +1 -1
  246. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  247. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  248. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  249. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  250. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  251. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  252. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  253. package/out/services/index.mjs +1 -1
  254. package/out/services/nativeAuth/index.mjs +1 -1
  255. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  256. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  257. package/out/services/nativeAuth/methods/index.mjs +1 -1
  258. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  259. package/out/store/actions/account/accountActions.mjs +1 -1
  260. package/out/store/actions/account/index.mjs +1 -1
  261. package/out/store/actions/cache/cacheActions.mjs +1 -1
  262. package/out/store/actions/cache/index.mjs +1 -1
  263. package/out/store/actions/config/configActions.mjs +1 -1
  264. package/out/store/actions/config/index.mjs +1 -1
  265. package/out/store/actions/index.mjs +1 -1
  266. package/out/store/actions/loginInfo/loginInfoActions.cjs +2 -20
  267. package/out/store/actions/loginInfo/loginInfoActions.cjs.map +2 -2
  268. package/out/store/actions/loginInfo/loginInfoActions.d.ts +1 -3
  269. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  270. package/out/store/actions/network/index.mjs +1 -1
  271. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  272. package/out/store/actions/network/networkActions.mjs +1 -1
  273. package/out/store/actions/sharedActions/index.mjs +1 -1
  274. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  275. package/out/store/actions/toasts/index.mjs +1 -1
  276. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  277. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  278. package/out/store/actions/ui/index.mjs +1 -1
  279. package/out/store/actions/ui/uiActions.mjs +1 -1
  280. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  281. package/out/store/middleware/index.mjs +1 -1
  282. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  283. package/out/store/slices/index.mjs +1 -1
  284. package/out/store/slices/loginInfo/index.mjs +1 -1
  285. package/out/store/slices/loginInfo/loginInfo.types.cjs.map +1 -1
  286. package/out/store/slices/loginInfo/loginInfo.types.d.ts +0 -9
  287. package/out/store/slices/loginInfo/loginInfoSlice.cjs +0 -4
  288. package/out/store/slices/loginInfo/loginInfoSlice.cjs.map +2 -2
  289. package/out/store/slices/loginInfo/loginInfoSlice.mjs +1 -1
  290. package/out/store/storage/index.mjs +1 -1
  291. package/out/store/storage/storageCallback.mjs +1 -1
  292. package/out/store/store.cjs +3 -1
  293. package/out/store/store.cjs.map +2 -2
  294. package/out/store/store.d.ts +19 -1
  295. package/out/store/store.mjs +1 -1
  296. package/out/utils/ComponentFactory.mjs +1 -1
  297. package/out/utils/account/index.mjs +1 -1
  298. package/out/utils/account/refreshAccount.mjs +1 -1
  299. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  300. package/out/utils/index.mjs +1 -1
  301. package/out/utils/tests/getElementByDataTestIdDeep.jest.d.ts +9 -0
  302. package/out/utils/tests/getElementByDataTestIdDeep.playwright.d.ts +9 -0
  303. package/out/utils/tests/getElementByDataTestIdDeep.puppeteer.d.ts +9 -0
  304. package/out/utils/tests/shadowDomTraversal.d.ts +17 -0
  305. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  306. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  307. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  308. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  309. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  310. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  311. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  312. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  313. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  314. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  315. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  316. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  317. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  318. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  319. package/out/utils/transactions/index.mjs +1 -1
  320. package/out/utils/visual/index.mjs +1 -1
  321. package/out/utils/visual/switchTheme.mjs +1 -1
  322. package/out/utils/window/getIsInIframe.mjs +1 -1
  323. package/out/utils/window/getWindowParentOrigin.cjs +5 -8
  324. package/out/utils/window/getWindowParentOrigin.cjs.map +2 -2
  325. package/out/utils/window/getWindowParentOrigin.d.ts +1 -1
  326. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  327. package/out/utils/window/index.mjs +1 -1
  328. package/package.json +1 -1
  329. package/out/__chunks__/chunk-2AIOZ7AI.mjs +0 -2
  330. package/out/__chunks__/chunk-3BAZ5IKF.mjs +0 -2
  331. package/out/__chunks__/chunk-3BAZ5IKF.mjs.map +0 -7
  332. package/out/__chunks__/chunk-4IYHEFEY.mjs +0 -2
  333. package/out/__chunks__/chunk-4LT5LGQC.mjs +0 -2
  334. package/out/__chunks__/chunk-5MLAF3LT.mjs +0 -2
  335. package/out/__chunks__/chunk-6KY5GEWL.mjs +0 -2
  336. package/out/__chunks__/chunk-7KFLWTDT.mjs +0 -2
  337. package/out/__chunks__/chunk-BMFKD76W.mjs +0 -2
  338. package/out/__chunks__/chunk-BRWXITGZ.mjs +0 -2
  339. package/out/__chunks__/chunk-BRWXITGZ.mjs.map +0 -7
  340. package/out/__chunks__/chunk-CZYRFACG.mjs +0 -2
  341. package/out/__chunks__/chunk-HHGGPCIT.mjs +0 -2
  342. package/out/__chunks__/chunk-HRTYNOPV.mjs +0 -2
  343. package/out/__chunks__/chunk-IQNEWWWL.mjs +0 -2
  344. package/out/__chunks__/chunk-MFYHPHET.mjs +0 -2
  345. package/out/__chunks__/chunk-NSF7L6H7.mjs +0 -2
  346. package/out/__chunks__/chunk-OCT3B7SK.mjs +0 -2
  347. package/out/__chunks__/chunk-P6XFODV4.mjs +0 -2
  348. package/out/__chunks__/chunk-QET2OLJT.mjs +0 -2
  349. package/out/__chunks__/chunk-SBJ5SNMG.mjs +0 -2
  350. package/out/__chunks__/chunk-WEQQ52VT.mjs +0 -2
  351. package/out/__chunks__/chunk-WEQQ52VT.mjs.map +0 -7
  352. package/out/__chunks__/chunk-WM2ARQV6.mjs +0 -2
  353. package/out/__chunks__/chunk-WZLGCBPM.mjs +0 -2
  354. package/out/__chunks__/chunk-X4XULIVT.mjs +0 -2
  355. package/out/__chunks__/chunk-YU6ZFE62.mjs +0 -2
  356. /package/out/__chunks__/{chunk-YRUQIWQX.mjs.map → chunk-3L6GBV7L.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-24XAM2VT.mjs.map → chunk-3WNAFMEK.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-JSFAGVXL.mjs.map → chunk-3YBH7N5W.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-FE3NXNR6.mjs.map → chunk-44IN6A4I.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-WDFZXGVF.mjs.map → chunk-534QBNPX.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-B7VHGVIW.mjs.map → chunk-57AGUNU6.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-QEEQRZS6.mjs.map → chunk-5DEHHVDS.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-NA5BUERU.mjs.map → chunk-5JYNGKVQ.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-M3S3XSZ7.mjs.map → chunk-6BJS5QNF.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-GJYL4HXE.mjs.map → chunk-6RRVRDXX.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-5MLAF3LT.mjs.map → chunk-73MKFMKP.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-OEBWA3U7.mjs.map → chunk-7HGOYM67.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-6WVBN32G.mjs.map → chunk-7TUX3TKQ.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-R7SGU5J2.mjs.map → chunk-AL5D2VEW.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-FVHDVMP6.mjs.map → chunk-BDOJEJNA.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-DJY24BHS.mjs.map → chunk-BDXSVYER.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-TPKK34YE.mjs.map → chunk-BEPW7QRT.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-YXC4NJUD.mjs.map → chunk-BIIJSMXB.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-NSF7L6H7.mjs.map → chunk-BUHXFBUA.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-6MXUKZB3.mjs.map → chunk-CIVS2YDU.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-ADE33SZY.mjs.map → chunk-CJYTBE3E.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-B5QFFY63.mjs.map → chunk-D5DHIEIM.mjs.map} +0 -0
  378. /package/out/__chunks__/{chunk-2AIOZ7AI.mjs.map → chunk-DTEI5SBP.mjs.map} +0 -0
  379. /package/out/__chunks__/{chunk-QIBUEZS3.mjs.map → chunk-DX6OA75E.mjs.map} +0 -0
  380. /package/out/__chunks__/{chunk-SGGAZCOK.mjs.map → chunk-EC3CUSWI.mjs.map} +0 -0
  381. /package/out/__chunks__/{chunk-7RLXMK3R.mjs.map → chunk-EJV4GLIF.mjs.map} +0 -0
  382. /package/out/__chunks__/{chunk-BMFKD76W.mjs.map → chunk-ETSUQ2R4.mjs.map} +0 -0
  383. /package/out/__chunks__/{chunk-IZMXB463.mjs.map → chunk-FFUT67H3.mjs.map} +0 -0
  384. /package/out/__chunks__/{chunk-P6XFODV4.mjs.map → chunk-FM6JYAAR.mjs.map} +0 -0
  385. /package/out/__chunks__/{chunk-CZYRFACG.mjs.map → chunk-FZ72N7LX.mjs.map} +0 -0
  386. /package/out/__chunks__/{chunk-EVS2OAVI.mjs.map → chunk-GQOTAVAR.mjs.map} +0 -0
  387. /package/out/__chunks__/{chunk-6KY5GEWL.mjs.map → chunk-H3PQUL5M.mjs.map} +0 -0
  388. /package/out/__chunks__/{chunk-PGY32PLX.mjs.map → chunk-HCGAZMW2.mjs.map} +0 -0
  389. /package/out/__chunks__/{chunk-HHGGPCIT.mjs.map → chunk-HFEXCIZ2.mjs.map} +0 -0
  390. /package/out/__chunks__/{chunk-BNDFXYBM.mjs.map → chunk-HPC5WEQQ.mjs.map} +0 -0
  391. /package/out/__chunks__/{chunk-RZNOYCZT.mjs.map → chunk-HWO7E325.mjs.map} +0 -0
  392. /package/out/__chunks__/{chunk-QGUSK75W.mjs.map → chunk-IFWUP3FX.mjs.map} +0 -0
  393. /package/out/__chunks__/{chunk-YFO4VEZA.mjs.map → chunk-IOTYH724.mjs.map} +0 -0
  394. /package/out/__chunks__/{chunk-TRQA733J.mjs.map → chunk-JIF5QHA5.mjs.map} +0 -0
  395. /package/out/__chunks__/{chunk-7CFPPCWC.mjs.map → chunk-JIXJ3S3H.mjs.map} +0 -0
  396. /package/out/__chunks__/{chunk-Z2M3TCDN.mjs.map → chunk-JUSK5MVD.mjs.map} +0 -0
  397. /package/out/__chunks__/{chunk-YZZYAO7Z.mjs.map → chunk-JUXIROQH.mjs.map} +0 -0
  398. /package/out/__chunks__/{chunk-YKUDEXLD.mjs.map → chunk-KEUKJKQV.mjs.map} +0 -0
  399. /package/out/__chunks__/{chunk-JJ23PMQB.mjs.map → chunk-LYUN4G56.mjs.map} +0 -0
  400. /package/out/__chunks__/{chunk-RRRK4J56.mjs.map → chunk-N7UPPFCH.mjs.map} +0 -0
  401. /package/out/__chunks__/{chunk-F2UXV2DY.mjs.map → chunk-NDUDQZDL.mjs.map} +0 -0
  402. /package/out/__chunks__/{chunk-KU45KIR2.mjs.map → chunk-NLZHVYZR.mjs.map} +0 -0
  403. /package/out/__chunks__/{chunk-JPGDRR3A.mjs.map → chunk-NNBLC3DP.mjs.map} +0 -0
  404. /package/out/__chunks__/{chunk-TAWCCADM.mjs.map → chunk-O2ZZO4AS.mjs.map} +0 -0
  405. /package/out/__chunks__/{chunk-2DS6LYYY.mjs.map → chunk-OINVR4SF.mjs.map} +0 -0
  406. /package/out/__chunks__/{chunk-23TMKZFJ.mjs.map → chunk-OIWRUY4C.mjs.map} +0 -0
  407. /package/out/__chunks__/{chunk-MD5HYIJO.mjs.map → chunk-OMSCPNRR.mjs.map} +0 -0
  408. /package/out/__chunks__/{chunk-HRTYNOPV.mjs.map → chunk-OTHNSSYN.mjs.map} +0 -0
  409. /package/out/__chunks__/{chunk-IQNEWWWL.mjs.map → chunk-P6PCRGOG.mjs.map} +0 -0
  410. /package/out/__chunks__/{chunk-SZOPMJSG.mjs.map → chunk-QO2DNBMF.mjs.map} +0 -0
  411. /package/out/__chunks__/{chunk-4LT5LGQC.mjs.map → chunk-RFBR7WI3.mjs.map} +0 -0
  412. /package/out/__chunks__/{chunk-RHZYJH4K.mjs.map → chunk-ROH2QHUK.mjs.map} +0 -0
  413. /package/out/__chunks__/{chunk-WZLGCBPM.mjs.map → chunk-RVCCJBPE.mjs.map} +0 -0
  414. /package/out/__chunks__/{chunk-KT6OP6QC.mjs.map → chunk-T3FY4DQE.mjs.map} +0 -0
  415. /package/out/__chunks__/{chunk-3HNDMSWW.mjs.map → chunk-TOGQL2M5.mjs.map} +0 -0
  416. /package/out/__chunks__/{chunk-66WRMAXV.mjs.map → chunk-TSETF6SY.mjs.map} +0 -0
  417. /package/out/__chunks__/{chunk-ZRKEA6YR.mjs.map → chunk-TVXFF2PG.mjs.map} +0 -0
  418. /package/out/__chunks__/{chunk-2ZU7DAXN.mjs.map → chunk-UQ6DOBYK.mjs.map} +0 -0
  419. /package/out/__chunks__/{chunk-OCT3B7SK.mjs.map → chunk-V73SALVM.mjs.map} +0 -0
  420. /package/out/__chunks__/{chunk-4IYHEFEY.mjs.map → chunk-VTF5A3OJ.mjs.map} +0 -0
  421. /package/out/__chunks__/{chunk-SBJ5SNMG.mjs.map → chunk-VVHC6HV6.mjs.map} +0 -0
  422. /package/out/__chunks__/{chunk-ZWOEWFL2.mjs.map → chunk-WBEMK5QL.mjs.map} +0 -0
  423. /package/out/__chunks__/{chunk-MMLP7K73.mjs.map → chunk-WJHF6NNO.mjs.map} +0 -0
  424. /package/out/__chunks__/{chunk-5HBROJL7.mjs.map → chunk-WSBN47MX.mjs.map} +0 -0
  425. /package/out/__chunks__/{chunk-X5KTEL7F.mjs.map → chunk-WXCST3O7.mjs.map} +0 -0
  426. /package/out/__chunks__/{chunk-PAT5TWYK.mjs.map → chunk-X4CDTS57.mjs.map} +0 -0
  427. /package/out/__chunks__/{chunk-7KFLWTDT.mjs.map → chunk-YARUDMWQ.mjs.map} +0 -0
  428. /package/out/__chunks__/{chunk-LST3XXIJ.mjs.map → chunk-ZIMECN23.mjs.map} +0 -0
  429. /package/out/__chunks__/{chunk-QYUEIE7N.mjs.map → chunk-ZLS3BN2I.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-IZMXB463.mjs";import{a}from"./chunk-6KY5GEWL.mjs";import{a as u}from"./chunk-TAWCCADM.mjs";import{c as n}from"./chunk-YU6ZFE62.mjs";import{a as s}from"./chunk-QET2OLJT.mjs";var c=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(r,s.localStorage);try{return u(),n.forEach(g=>g()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
2
- //# sourceMappingURL=chunk-YKUDEXLD.mjs.map
1
+ import{a as i}from"./chunk-FFUT67H3.mjs";import{a}from"./chunk-H3PQUL5M.mjs";import{a as u}from"./chunk-O2ZZO4AS.mjs";import{c as n}from"./chunk-PFMOMLPA.mjs";import{a as s}from"./chunk-4IS7AY5Q.mjs";var c=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(r,s.localStorage);try{return u(),n.forEach(g=>g()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
2
+ //# sourceMappingURL=chunk-KEUKJKQV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-OEBWA3U7.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
- //# sourceMappingURL=chunk-JJ23PMQB.mjs.map
1
+ import{a as e}from"./chunk-7HGOYM67.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
+ //# sourceMappingURL=chunk-LYUN4G56.mjs.map
@@ -0,0 +1,2 @@
1
+ var o={providerType:null,walletConnectLogin:null,ledgerLogin:null,tokenLogin:null,loginExpiresAt:null};function e(){return()=>o}var n=e();export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-M7BM6QPB.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/slices/loginInfo/loginInfoSlice.ts"],
4
- "sourcesContent": ["import { StateCreator } from 'zustand/vanilla';\nimport { StoreType, MutatorsIn } from 'store/store.types';\nimport { LoginInfoSliceType } from './loginInfo.types';\n\nexport const initialState: LoginInfoSliceType = {\n providerType: null,\n walletConnectLogin: null,\n ledgerLogin: null,\n tokenLogin: null,\n walletLogin: null,\n extensionLogin: null,\n operaLogin: null,\n crossWindowLogin: null,\n loginExpiresAt: null\n};\n\nfunction getTokenInfoSlice(): StateCreator<\n StoreType,\n MutatorsIn,\n [],\n LoginInfoSliceType\n> {\n return () => initialState;\n}\n\nexport const loginInfoSlice = getTokenInfoSlice();\n"],
5
- "mappings": "AAIO,IAAMA,EAAmC,CAC9C,aAAc,KACd,mBAAoB,KACpB,YAAa,KACb,WAAY,KACZ,YAAa,KACb,eAAgB,KAChB,WAAY,KACZ,iBAAkB,KAClB,eAAgB,IAClB,EAEA,SAASC,GAKP,CACA,MAAO,IAAMD,CACf,CAEO,IAAME,EAAiBD,EAAkB",
4
+ "sourcesContent": ["import { StateCreator } from 'zustand/vanilla';\nimport { StoreType, MutatorsIn } from 'store/store.types';\nimport { LoginInfoSliceType } from './loginInfo.types';\n\nexport const initialState: LoginInfoSliceType = {\n providerType: null,\n walletConnectLogin: null,\n ledgerLogin: null,\n tokenLogin: null,\n loginExpiresAt: null\n};\n\nfunction getTokenInfoSlice(): StateCreator<\n StoreType,\n MutatorsIn,\n [],\n LoginInfoSliceType\n> {\n return () => initialState;\n}\n\nexport const loginInfoSlice = getTokenInfoSlice();\n"],
5
+ "mappings": "AAIO,IAAMA,EAAmC,CAC9C,aAAc,KACd,mBAAoB,KACpB,YAAa,KACb,WAAY,KACZ,eAAgB,IAClB,EAEA,SAASC,GAKP,CACA,MAAO,IAAMD,CACf,CAEO,IAAME,EAAiBD,EAAkB",
6
6
  "names": ["initialState", "getTokenInfoSlice", "loginInfoSlice"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-JSFAGVXL.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
- //# sourceMappingURL=chunk-RRRK4J56.mjs.map
1
+ import{a as r}from"./chunk-3YBH7N5W.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
+ //# sourceMappingURL=chunk-N7UPPFCH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-TPKK34YE.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
2
- //# sourceMappingURL=chunk-F2UXV2DY.mjs.map
1
+ import{a as l}from"./chunk-BEPW7QRT.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
2
+ //# sourceMappingURL=chunk-NDUDQZDL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-5MLAF3LT.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-QYUEIE7N.mjs";import{u as n}from"./chunk-3BAZ5IKF.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
- //# sourceMappingURL=chunk-KU45KIR2.mjs.map
1
+ import{a as g}from"./chunk-73MKFMKP.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-ZLS3BN2I.mjs";import{s as n}from"./chunk-76PSW6FH.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
+ //# sourceMappingURL=chunk-NLZHVYZR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-SBJ5SNMG.mjs";import{a as m}from"./chunk-6FXEHNGW.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
- //# sourceMappingURL=chunk-JPGDRR3A.mjs.map
1
+ import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-VVHC6HV6.mjs";import{a as m}from"./chunk-6FXEHNGW.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
+ //# sourceMappingURL=chunk-NNBLC3DP.mjs.map
@@ -1,2 +1,2 @@
1
- import{l as p,s as e}from"./chunk-3BAZ5IKF.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),m=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).hex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,m as b};
2
- //# sourceMappingURL=chunk-TAWCCADM.mjs.map
1
+ import{j as p,q as e}from"./chunk-76PSW6FH.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),m=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).hex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,m as b};
2
+ //# sourceMappingURL=chunk-O2ZZO4AS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-PGY32PLX.mjs";import{a as p}from"./chunk-GJYL4HXE.mjs";import{a as d}from"./chunk-BMFKD76W.mjs";import{a as T}from"./chunk-QQAW7UC2.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
- //# sourceMappingURL=chunk-2DS6LYYY.mjs.map
1
+ import{a as h}from"./chunk-HCGAZMW2.mjs";import{a as p}from"./chunk-6RRVRDXX.mjs";import{a as d}from"./chunk-ETSUQ2R4.mjs";import{a as T}from"./chunk-QQAW7UC2.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
+ //# sourceMappingURL=chunk-OINVR4SF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-QET2OLJT.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
2
- //# sourceMappingURL=chunk-23TMKZFJ.mjs.map
1
+ import{a as t}from"./chunk-4IS7AY5Q.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
2
+ //# sourceMappingURL=chunk-OIWRUY4C.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-4LT5LGQC.mjs";import{a as f}from"./chunk-HHGGPCIT.mjs";import{j as m,k as d,l as p,n as u}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-2DS6LYYY.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=l(),F=f();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await T({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=u(s),E=p(s),L=d(s),i=A||E||L,v=m(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
2
- //# sourceMappingURL=chunk-MD5HYIJO.mjs.map
1
+ import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-RFBR7WI3.mjs";import{a as f}from"./chunk-HFEXCIZ2.mjs";import{j as m,k as d,l as p,n as u}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-OINVR4SF.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=l(),F=f();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await T({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=u(s),E=p(s),L=d(s),i=A||E||L,v=m(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
2
+ //# sourceMappingURL=chunk-OMSCPNRR.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-76PSW6FH.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-OTHNSSYN.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-4IS7AY5Q.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-P6PCRGOG.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-4IS7AY5Q.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
2
+ //# sourceMappingURL=chunk-PFMOMLPA.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/storage.constants.ts"],
4
- "sourcesContent": ["import { createJSONStorage } from 'zustand/middleware';\nimport { SubscriptionsEnum } from 'types';\nimport { safeWindow } from './window.constants';\n\nexport const persistConfig: {\n persistReducersStorageType: 'localStorage' | 'sessionStorage';\n} = {\n persistReducersStorageType: 'localStorage'\n};\n\nexport const storage = safeWindow\n ? createJSONStorage(\n () => safeWindow[persistConfig.persistReducersStorageType]\n )\n : undefined;\n\nexport const subscriptions = new Map<SubscriptionsEnum, () => void>();\n"],
5
- "mappings": "yCAAA,OAAS,qBAAAA,MAAyB,qBAI3B,IAAMC,EAET,CACF,2BAA4B,cAC9B,EAEaC,EAAUC,EACnBC,EACE,IAAMD,EAAWF,EAAc,0BAA0B,CAC3D,EACA,OAESI,EAAgB,IAAI",
6
- "names": ["createJSONStorage", "persistConfig", "storage", "safeWindow", "createJSONStorage", "subscriptions"]
4
+ "sourcesContent": ["import { createJSONStorage } from 'zustand/middleware';\nimport { SubscriptionsEnum } from 'types';\nimport { safeWindow } from './window.constants';\n\nexport const persistConfig: {\n persistReducersStorageType: 'localStorage' | 'sessionStorage';\n} = {\n persistReducersStorageType: 'localStorage'\n};\n\nexport const storage = safeWindow\n ? createJSONStorage(\n () => safeWindow[persistConfig.persistReducersStorageType]\n )\n : undefined;\n\nexport const subscriptions = new Map<SubscriptionsEnum, () => void>();\n\nexport const REHYDRATE_STORE_TIMEOUT = 3000; // 3 seconds\n"],
5
+ "mappings": "yCAAA,OAAS,qBAAAA,MAAyB,qBAI3B,IAAMC,EAET,CACF,2BAA4B,cAC9B,EAEaC,EAAUC,EACnBC,EACE,IAAMD,EAAWF,EAAc,0BAA0B,CAC3D,EACA,OAESI,EAAgB,IAAI,IAEpBC,EAA0B",
6
+ "names": ["createJSONStorage", "persistConfig", "storage", "safeWindow", "createJSONStorage", "subscriptions", "REHYDRATE_STORE_TIMEOUT"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-6KY5GEWL.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
- //# sourceMappingURL=chunk-SZOPMJSG.mjs.map
1
+ import{a as o}from"./chunk-H3PQUL5M.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
+ //# sourceMappingURL=chunk-QO2DNBMF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-76PSW6FH.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";function d(t=e()){return r(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-RFBR7WI3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-PGY32PLX.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
- //# sourceMappingURL=chunk-RHZYJH4K.mjs.map
1
+ import{a as e}from"./chunk-HCGAZMW2.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
+ //# sourceMappingURL=chunk-ROH2QHUK.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-76PSW6FH.mjs";import{a as t}from"./chunk-UERJ6AKK.mjs";function n(r=o()){return t(r)}export{n as a};
2
+ //# sourceMappingURL=chunk-RVCCJBPE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as ae}from"./chunk-G4Z3ZQR6.mjs";import{a as se}from"./chunk-M3YL36ZL.mjs";import{a as te}from"./chunk-7CFPPCWC.mjs";import{a as U}from"./chunk-WDFZXGVF.mjs";import{a as ie}from"./chunk-QIBUEZS3.mjs";import{a as re}from"./chunk-KU45KIR2.mjs";import{a as I}from"./chunk-5MLAF3LT.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-3HNDMSWW.mjs";import{a as p}from"./chunk-BNDFXYBM.mjs";import{a as Z}from"./chunk-ADE33SZY.mjs";import{a as ne}from"./chunk-BRWXITGZ.mjs";import{a as oe}from"./chunk-5HBROJL7.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-QYUEIE7N.mjs";import{a as y}from"./chunk-B7VHGVIW.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-6KY5GEWL.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-TAWCCADM.mjs";import{a as F,s as j,u as l}from"./chunk-3BAZ5IKF.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=se.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ae(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
2
- //# sourceMappingURL=chunk-KT6OP6QC.mjs.map
1
+ import{a as ae}from"./chunk-G4Z3ZQR6.mjs";import{a as se}from"./chunk-M3YL36ZL.mjs";import{a as te}from"./chunk-JIXJ3S3H.mjs";import{a as U}from"./chunk-534QBNPX.mjs";import{a as ie}from"./chunk-DX6OA75E.mjs";import{a as re}from"./chunk-NLZHVYZR.mjs";import{a as I}from"./chunk-73MKFMKP.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-TOGQL2M5.mjs";import{a as p}from"./chunk-HPC5WEQQ.mjs";import{a as Z}from"./chunk-CJYTBE3E.mjs";import{a as ne}from"./chunk-FQNOEYHK.mjs";import{a as oe}from"./chunk-WSBN47MX.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-ZLS3BN2I.mjs";import{a as y}from"./chunk-57AGUNU6.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-H3PQUL5M.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-O2ZZO4AS.mjs";import{a as F,q as j,s as l}from"./chunk-76PSW6FH.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=se.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ae(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
2
+ //# sourceMappingURL=chunk-T3FY4DQE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-BNDFXYBM.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{a as e,b as t}from"./chunk-QET2OLJT.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
2
- //# sourceMappingURL=chunk-3HNDMSWW.mjs.map
1
+ import{a as s}from"./chunk-HPC5WEQQ.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{a as e,b as t}from"./chunk-4IS7AY5Q.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
2
+ //# sourceMappingURL=chunk-TOGQL2M5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-Z2M3TCDN.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
- //# sourceMappingURL=chunk-66WRMAXV.mjs.map
1
+ import{a}from"./chunk-JUSK5MVD.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
+ //# sourceMappingURL=chunk-TSETF6SY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-OCT3B7SK.mjs";import{a as k}from"./chunk-7KFLWTDT.mjs";import{s as f}from"./chunk-3BAZ5IKF.mjs";import{d as b}from"./chunk-UERJ6AKK.mjs";import{c as n}from"./chunk-YU6ZFE62.mjs";import{b as i}from"./chunk-GGBMHKR4.mjs";async function N(){let o=f(),I=g(),s=null,t=null,l=b(o.getState())?.timestamp,c=()=>{k()},u=()=>{s??=setInterval(c,I)},m=()=>{s&&(clearInterval(s),s=null)},p=()=>{m();let a=o.subscribe(({account:{websocketEvent:e}})=>{e?.message&&l!==e.timestamp&&(l=e.timestamp,c())});n.set("websocketEventReceived",a)},S=()=>{i.status!=="not_initialized"||t||(t=setInterval(()=>{i.status==="completed"&&(clearInterval(t),t=null,p())},1e3))};c();let r=()=>{m(),t&&(clearInterval(t),t=null)},v=o.subscribe(({account:{address:a},config:{websocketStatus:e}},T)=>{if(T.config.websocketStatus!==e)switch(e){case"completed":p();break;case"pending":u(),S();break;default:a?u():r();break}});return n.set("websocketStatusChanged",v),n.set("websocketEventReceived",r),{stopTransactionsTracking:r}}export{N as a};
2
- //# sourceMappingURL=chunk-ZRKEA6YR.mjs.map
1
+ import{a as g}from"./chunk-V73SALVM.mjs";import{a as k}from"./chunk-YARUDMWQ.mjs";import{q as f}from"./chunk-76PSW6FH.mjs";import{d as b}from"./chunk-UERJ6AKK.mjs";import{c as n}from"./chunk-PFMOMLPA.mjs";import{b as i}from"./chunk-GGBMHKR4.mjs";async function N(){let o=f(),I=g(),s=null,t=null,l=b(o.getState())?.timestamp,c=()=>{k()},u=()=>{s??=setInterval(c,I)},m=()=>{s&&(clearInterval(s),s=null)},p=()=>{m();let a=o.subscribe(({account:{websocketEvent:e}})=>{e?.message&&l!==e.timestamp&&(l=e.timestamp,c())});n.set("websocketEventReceived",a)},S=()=>{i.status!=="not_initialized"||t||(t=setInterval(()=>{i.status==="completed"&&(clearInterval(t),t=null,p())},1e3))};c();let r=()=>{m(),t&&(clearInterval(t),t=null)},v=o.subscribe(({account:{address:a},config:{websocketStatus:e}},T)=>{if(T.config.websocketStatus!==e)switch(e){case"completed":p();break;case"pending":u(),S();break;default:a?u():r();break}});return n.set("websocketStatusChanged",v),n.set("websocketEventReceived",r),{stopTransactionsTracking:r}}export{N as a};
2
+ //# sourceMappingURL=chunk-TVXFF2PG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-RHZYJH4K.mjs";import{a as S}from"./chunk-FVHDVMP6.mjs";import{a as o}from"./chunk-FMQYLMTU.mjs";import{a as y}from"./chunk-MFUQ5NBC.mjs";import{b as i,c as f}from"./chunk-FE3NXNR6.mjs";import{l}from"./chunk-65L5EBBL.mjs";var u={};async function d({serverTransaction:e,sessionId:t,isSequential:c}){let{hash:a,status:r,results:m,invalidTransaction:n,hasStatusChanged:p}=e;try{if(u[a]>30){i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"});return}if(n&&!c||r==="sent"){u[a]=u[a]?u[a]+1:1;return}if(c&&!r){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s});return}if(p){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s})}l(r)&&await S({sessionId:t,hash:a,results:m})}catch(T){console.error(T),i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"})}}async function R({sessionId:e,transactionBatch:t,isSequential:c}){try{if(t==null)return;let a=y(t),r=await h(a);for(let n of r)await d({serverTransaction:n,sessionId:e,isSequential:c});if(r.every(n=>n.status!=="pending")){if(r.every(s=>s.status==="success"))return i({sessionId:e,status:"success"});if(r.some(s=>s.status==="fail"))return i({sessionId:e,status:"fail"});if(r.every(s=>s.invalidTransaction))return i({sessionId:e,status:"invalid"})}}catch(a){console.error(a)}}export{R as a};
2
- //# sourceMappingURL=chunk-2ZU7DAXN.mjs.map
1
+ import{a as h}from"./chunk-ROH2QHUK.mjs";import{a as S}from"./chunk-BDOJEJNA.mjs";import{a as o}from"./chunk-FMQYLMTU.mjs";import{a as y}from"./chunk-MFUQ5NBC.mjs";import{b as i,c as f}from"./chunk-44IN6A4I.mjs";import{l}from"./chunk-65L5EBBL.mjs";var u={};async function d({serverTransaction:e,sessionId:t,isSequential:c}){let{hash:a,status:r,results:m,invalidTransaction:n,hasStatusChanged:p}=e;try{if(u[a]>30){i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"});return}if(n&&!c||r==="sent"){u[a]=u[a]?u[a]+1:1;return}if(c&&!r){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s});return}if(p){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s})}l(r)&&await S({sessionId:t,hash:a,results:m})}catch(T){console.error(T),i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"})}}async function R({sessionId:e,transactionBatch:t,isSequential:c}){try{if(t==null)return;let a=y(t),r=await h(a);for(let n of r)await d({serverTransaction:n,sessionId:e,isSequential:c});if(r.every(n=>n.status!=="pending")){if(r.every(s=>s.status==="success"))return i({sessionId:e,status:"success"});if(r.some(s=>s.status==="fail"))return i({sessionId:e,status:"fail"});if(r.every(s=>s.invalidTransaction))return i({sessionId:e,status:"invalid"})}}catch(a){console.error(a)}}export{R as a};
2
+ //# sourceMappingURL=chunk-UQ6DOBYK.mjs.map
@@ -0,0 +1,2 @@
1
+ import{e}from"./chunk-CAA4VJRH.mjs";import{s as o}from"./chunk-76PSW6FH.mjs";import{e as t}from"./chunk-SAAOQW7P.mjs";function m(){let r=t(o());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
+ //# sourceMappingURL=chunk-V73SALVM.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-OTHNSSYN.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-VTF5A3OJ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-76PSW6FH.mjs";import{a as t}from"./chunk-SAAOQW7P.mjs";function f(r=o()){return t(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-VVHC6HV6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-3BAZ5IKF.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
2
- //# sourceMappingURL=chunk-ZWOEWFL2.mjs.map
1
+ import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q as u}from"./chunk-76PSW6FH.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
2
+ //# sourceMappingURL=chunk-WBEMK5QL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-WM2ARQV6.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
- //# sourceMappingURL=chunk-MMLP7K73.mjs.map
1
+ import{a as t}from"./chunk-ZHOATTZ2.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
+ //# sourceMappingURL=chunk-WJHF6NNO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as o}from"./chunk-WZLGCBPM.mjs";import{u as n}from"./chunk-3BAZ5IKF.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:s}=o();if(!i({isGuarded:s,transactions:r}))return r;let a=r[0].getSender().bech32().toString(),{walletAddress:d}=e(n());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
- //# sourceMappingURL=chunk-5HBROJL7.mjs.map
1
+ import{a as i}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as o}from"./chunk-RVCCJBPE.mjs";import{s as n}from"./chunk-76PSW6FH.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:s}=o();if(!i({isGuarded:s,transactions:r}))return r;let a=r[0].getSender().bech32().toString(),{walletAddress:d}=e(n());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
+ //# sourceMappingURL=chunk-WSBN47MX.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-QYUEIE7N.mjs";import{s as u}from"./chunk-3BAZ5IKF.mjs";import{a as p}from"./chunk-UERJ6AKK.mjs";import{a as h,c as l,g as c}from"./chunk-NTEMINYA.mjs";import{a as y}from"./chunk-QET2OLJT.mjs";var M=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=u();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){y.addEventListener("message",this.handleMessage)}stopListening(){y.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case o.finalizeHandshakeRequest:this.handshake({event:e});break;case o.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case o.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case o.signTransactionsRequest:this.signTransactions({event:e});break;case i.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=p(this.store.getState()),r=g(),n=new c({address:new l(t),data:new Uint8Array(Buffer.from(a))}),d=(await r.signMessage(n))?.signature??"";e.source?.postMessage({type:i.loginResponse,payload:{data:{address:t,signature:Buffer.from(d).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&this.handleLoginCancelled()}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:i.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=p(this.store.getState()),{message:t}=s;try{let r=new c({address:new l(a),data:new Uint8Array(Buffer.from(t))}),d=(await g().signMessage(r))?.signature??"";e.source?.postMessage({type:i.signMessageResponse,payload:{data:{signature:Buffer.from(d).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(n=>h.newFromPlainObject(n)),r=await s.signTransactions(t);e.source?.postMessage({type:i.signTransactionsResponse,payload:{data:r.map(n=>n.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{M as a};
2
- //# sourceMappingURL=chunk-X5KTEL7F.mjs.map
1
+ import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-ZLS3BN2I.mjs";import{q as u}from"./chunk-76PSW6FH.mjs";import{a as p}from"./chunk-UERJ6AKK.mjs";import{a as h,c as l,g as c}from"./chunk-NTEMINYA.mjs";import{a as y}from"./chunk-4IS7AY5Q.mjs";var M=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=u();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){y.addEventListener("message",this.handleMessage)}stopListening(){y.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case o.finalizeHandshakeRequest:this.handshake({event:e});break;case o.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case o.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case o.signTransactionsRequest:this.signTransactions({event:e});break;case i.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=p(this.store.getState()),r=g(),n=new c({address:new l(t),data:new Uint8Array(Buffer.from(a))}),d=(await r.signMessage(n))?.signature??"";e.source?.postMessage({type:i.loginResponse,payload:{data:{address:t,signature:Buffer.from(d).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&this.handleLoginCancelled()}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:i.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=p(this.store.getState()),{message:t}=s;try{let r=new c({address:new l(a),data:new Uint8Array(Buffer.from(t))}),d=(await g().signMessage(r))?.signature??"";e.source?.postMessage({type:i.signMessageResponse,payload:{data:{signature:Buffer.from(d).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(n=>h.newFromPlainObject(n)),r=await s.signTransactions(t);e.source?.postMessage({type:i.signTransactionsResponse,payload:{data:r.map(n=>n.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{M as a};
2
+ //# sourceMappingURL=chunk-WXCST3O7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-JJ23PMQB.mjs";import{b as r}from"./chunk-ZWOEWFL2.mjs";import{u as i}from"./chunk-3BAZ5IKF.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
- //# sourceMappingURL=chunk-PAT5TWYK.mjs.map
1
+ import{a as n}from"./chunk-LYUN4G56.mjs";import{b as r}from"./chunk-WBEMK5QL.mjs";import{s as i}from"./chunk-76PSW6FH.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
+ //# sourceMappingURL=chunk-X4CDTS57.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-UQ6DOBYK.mjs";import{b as s}from"./chunk-TQA3JDNV.mjs";import{s as n}from"./chunk-76PSW6FH.mjs";async function f(){let t=s(n());if(Object.keys(t).length>0)for(let[e,{transactions:c}]of Object.entries(t))await o({sessionId:e,transactionBatch:c})}export{f as a};
2
+ //# sourceMappingURL=chunk-YARUDMWQ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-KASFKR36.mjs";import{a as t}from"./chunk-DTEI5SBP.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
2
+ //# sourceMappingURL=chunk-ZHOATTZ2.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/managers/internal/SidePanelBaseManager/SidePanelBaseManager.ts"],
4
- "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { setIsSidePanelOpen } from 'store/actions/ui/uiActions';\nimport { CreateEventBusUIElementType } from 'utils/ComponentFactory';\nimport { UIBaseManager } from '../UIBaseManager/UIBaseManager';\n\ninterface ISideManagerUIElement extends CreateEventBusUIElementType {\n closeWithAnimation?: () => Promise<unknown>;\n}\n\nexport abstract class SidePanelBaseManager<\n TElement extends ISideManagerUIElement,\n TData extends Record<string, any> | null,\n TEventEnum extends string\n> extends UIBaseManager<TElement, TData, TEventEnum> {\n protected isOpen = false;\n\n constructor({\n uiDataUpdateEvent,\n uiTag\n }: {\n uiTag: UITagsEnum;\n uiDataUpdateEvent: TEventEnum;\n }) {\n super({\n uiDataUpdateEvent,\n uiTag\n });\n this.data = this.getInitialData();\n }\n\n public async openUI() {\n if (this.isOpen && this.uiElement) {\n // UI element is already open\n return;\n }\n\n await super.init();\n this.setIsSidePanelOpen(true);\n }\n\n public async destroy() {\n this.setIsSidePanelOpen(false);\n await this.uiElement?.closeWithAnimation?.();\n\n super.destroy();\n }\n\n public closeUI(): void {\n this.resetData();\n this.destroy();\n }\n\n private setIsSidePanelOpen(isOpen: boolean): void {\n this.isOpen = isOpen;\n setIsSidePanelOpen(isOpen);\n }\n}\n"],
5
- "mappings": "kFASO,IAAeA,EAAf,cAIGC,CAA2C,CAGnD,YAAY,CACV,kBAAAC,EACA,MAAAC,CACF,EAGG,CACD,MAAM,CACJ,kBAAAD,EACA,MAAAC,CACF,CAAC,EAZH,KAAU,OAAS,GAajB,KAAK,KAAO,KAAK,eAAe,CAClC,CAEA,MAAa,QAAS,CAChB,KAAK,QAAU,KAAK,YAKxB,MAAM,MAAM,KAAK,EACjB,KAAK,mBAAmB,EAAI,EAC9B,CAEA,MAAa,SAAU,CACrB,KAAK,mBAAmB,EAAK,EAC7B,MAAM,KAAK,WAAW,qBAAqB,EAE3C,MAAM,QAAQ,CAChB,CAEO,SAAgB,CACrB,KAAK,UAAU,EACf,KAAK,QAAQ,CACf,CAEQ,mBAAmBC,EAAuB,CAChD,KAAK,OAASA,EACdC,EAAmBD,CAAM,CAC3B,CACF",
4
+ "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { setIsSidePanelOpen } from 'store/actions/ui/uiActions';\nimport { CreateEventBusUIElementType } from 'utils/ComponentFactory';\nimport { UIBaseManager } from '../UIBaseManager/UIBaseManager';\n\ninterface ISideManagerUIElement extends CreateEventBusUIElementType {\n closeWithAnimation?: () => Promise<unknown>;\n}\n\nexport abstract class SidePanelBaseManager<\n TElement extends ISideManagerUIElement,\n TData extends Record<string, any> | null,\n TEventEnum extends string\n> extends UIBaseManager<TElement, TData, TEventEnum> {\n protected isOpen = false;\n\n constructor({\n uiDataUpdateEvent,\n uiTag\n }: {\n uiTag: UITagsEnum;\n uiDataUpdateEvent: TEventEnum;\n }) {\n super({\n uiDataUpdateEvent,\n uiTag\n });\n this.data = this.getInitialData();\n }\n\n public async openUI() {\n if (this.isOpen && this.uiElement) {\n // UI element is already open\n return;\n }\n\n await super.init();\n this.setIsSidePanelOpen(true);\n }\n\n public destroy() {\n this.setIsSidePanelOpen(false);\n\n if (this.uiElement?.closeWithAnimation) {\n this.uiElement?.closeWithAnimation?.().finally(() => {\n super.destroy();\n });\n return;\n }\n super.destroy();\n }\n\n public closeUI(): void {\n this.resetData();\n this.destroy();\n }\n\n private setIsSidePanelOpen(isOpen: boolean): void {\n this.isOpen = isOpen;\n setIsSidePanelOpen(isOpen);\n }\n}\n"],
5
+ "mappings": "kFASO,IAAeA,EAAf,cAIGC,CAA2C,CAGnD,YAAY,CACV,kBAAAC,EACA,MAAAC,CACF,EAGG,CACD,MAAM,CACJ,kBAAAD,EACA,MAAAC,CACF,CAAC,EAZH,KAAU,OAAS,GAajB,KAAK,KAAO,KAAK,eAAe,CAClC,CAEA,MAAa,QAAS,CAChB,KAAK,QAAU,KAAK,YAKxB,MAAM,MAAM,KAAK,EACjB,KAAK,mBAAmB,EAAI,EAC9B,CAEO,SAAU,CAGf,GAFA,KAAK,mBAAmB,EAAK,EAEzB,KAAK,WAAW,mBAAoB,CACtC,KAAK,WAAW,qBAAqB,EAAE,QAAQ,IAAM,CACnD,MAAM,QAAQ,CAChB,CAAC,EACD,MACF,CACA,MAAM,QAAQ,CAChB,CAEO,SAAgB,CACrB,KAAK,UAAU,EACf,KAAK,QAAQ,CACf,CAEQ,mBAAmBC,EAAuB,CAChD,KAAK,OAASA,EACdC,EAAmBD,CAAM,CAC3B,CACF",
6
6
  "names": ["SidePanelBaseManager", "UIBaseManager", "uiDataUpdateEvent", "uiTag", "isOpen", "setIsSidePanelOpen"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{s as c}from"./chunk-3BAZ5IKF.mjs";import{a as o}from"./chunk-JMC7CMTU.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
2
- //# sourceMappingURL=chunk-LST3XXIJ.mjs.map
1
+ import{q as c}from"./chunk-76PSW6FH.mjs";import{a as o}from"./chunk-JMC7CMTU.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
2
+ //# sourceMappingURL=chunk-ZIMECN23.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as et}from"./chunk-CZYRFACG.mjs";import{a as mt}from"./chunk-6UZHM5LW.mjs";import{a as b}from"./chunk-MD5HYIJO.mjs";import{a as pt}from"./chunk-PAT5TWYK.mjs";import{a as w}from"./chunk-ZRKEA6YR.mjs";import{a as Z,b as tt,g as st,l as ot}from"./chunk-CAA4VJRH.mjs";import{a as gt}from"./chunk-YKUDEXLD.mjs";import{b as S}from"./chunk-IZMXB463.mjs";import{a as dt}from"./chunk-NSF7L6H7.mjs";import{a as It}from"./chunk-4ODPAHHA.mjs";import{a as ht}from"./chunk-MDVI45IV.mjs";import{a as ft}from"./chunk-SZOPMJSG.mjs";import{a as f}from"./chunk-SBJ5SNMG.mjs";import{a as X}from"./chunk-6KY5GEWL.mjs";import{a as ut}from"./chunk-WM2ARQV6.mjs";import{a as L}from"./chunk-MFYHPHET.mjs";import{a as C,f as lt}from"./chunk-LST3XXIJ.mjs";import{b as Tt}from"./chunk-TAWCCADM.mjs";import{d as rt}from"./chunk-FE3NXNR6.mjs";import{k as it,l as nt,n as at}from"./chunk-65L5EBBL.mjs";import{a as A}from"./chunk-HORSXVIV.mjs";import{a as vt}from"./chunk-WZLGCBPM.mjs";import{a as Q}from"./chunk-JSFAGVXL.mjs";import{a as E}from"./chunk-QTKK6OSJ.mjs";import{a as J}from"./chunk-6ACLOUQ3.mjs";import{a as y}from"./chunk-6FXEHNGW.mjs";import{a as yt}from"./chunk-NJN53MJV.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as V,b as q,s as u,u as Y}from"./chunk-3BAZ5IKF.mjs";import{c as H,f as $}from"./chunk-UERJ6AKK.mjs";import{b as g}from"./chunk-VNLGNNIL.mjs";import{b as v}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-NTEMINYA.mjs";import{b as Et}from"./chunk-76URRONH.mjs";import{a as ct}from"./chunk-23TMKZFJ.mjs";import{a as I}from"./chunk-PLUWBWJ2.mjs";import W from"lodash.isequal";import Lt from"lodash.isequal";var Ft="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",x=class e extends ut{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.closeUI=async()=>{this.data.pendingTransactions.length>0?(this.unsubscribeFunctions.forEach(s=>s.forEach(o=>o())),this.unsubscribeFunctions.clear(),await this.uiElement?.closeWithAnimation()):super.closeUI()};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){p.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let o=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!Lt(a.transactionToasts,i.transactionToasts)||!Lt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ft,[o]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=p.getInstance();await this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:o,toasts:i,network:n}=this.store.getState(),{pendingTransactionToasts:a}=await b({toastList:i,transactionsSessions:s,account:o});this.data.pendingTransactions=a,this.data.historicTransactions=await et.getTransactionsHistory({transactionsSessions:s,address:o.address,explorerAddress:n.network.explorerAddress,egldLabel:n.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){rt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};import R from"bignumber.js";var N=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=g(t),{isExpired:o}=E(s?.nativeAuthToken);o?h().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=g(t),o=$(t);return!!(s?.nativeAuthToken&&o)};this.addPlannedLogout=()=>{let t=h(),s=H(this.store.getState()),o=t.getType()===I.webview;if(!s||o)return;this.addLogoutWarning();let i=g(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=E(i?.nativeAuthToken),c=new R(String(n)),r=`${s}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let d=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},d.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},d.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=v(this.store.getState()),s=g(this.store.getState()),{secondsUntilExpires:o}=E(s?.nativeAuthToken),i=new R(String(o)),n=i.times(1e3);if(!o||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=mt(n.toNumber()),l=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:s}){let o=await y({address:e,baseURL:s});if(!o)throw new Error("Account not found");Tt({address:e,providerType:t.getType()});let i={...o,username:A(o.username),nonce:L(o)};C(i),await S(e),w(),o.shard!=null&&await pt({shard:Number(o.shard),apiAddress:s})}async function kt(e){let{network:{apiAddress:t}}=f();await e.login();let s=await e.getAddress();if(!s)throw new Error("Address not found");return await B({address:s,provider:e,apiAddress:t}),{address:s}}async function Dt({provider:e,nativeAuthConfig:t,token:s}){let{network:{apiAddress:o}}=f(),i=Q(t),n=s;n||(n=await i.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:n});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let l=J(r?.accessToken)?r.accessToken:i.getToken({address:a,token:n,signature:c});q({loginToken:n,signature:c,nativeAuthToken:l});let d=await dt({loginToken:n,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:d,provider:e,apiAddress:o}),{address:d,signature:c}}async function bt(e,t){let s=v(Y());if(s)return await Dt({provider:e,nativeAuthConfig:s,token:t?.token});let{address:o}=await kt(e);return await S(o),w(),{address:o}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${tt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${Z}-${Date.now()}`}},Rt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},Bt=e=>{for(let[t,s]of Object.entries(Rt))if(e.includes(t))return s;return"Error when signing"};function _(e,t="error"){let s=e?.message,o=Bt(s),n=o!=="Error when signing"?"warning":t,a=Object.keys(U).includes(n)?U[n]:U.error,{toastId:c,iconClassName:r,title:m}=a;return M({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:o,title:m}),o}async function Ct({provider:e,transactions:t,options:s={}}){await St();let{isGuarded:o,activeGuardianAddress:i,nonce:n}=vt(),a=e.getType()===I.ledger,c=It({latestNonce:n,transactions:t}),r=i&&o&&!s.skipGuardian?c?.map(l=>(l.version=G.withTxOptions().valueOf(),l.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),l.guardian=K.newFromBech32(i),l)):c,m=await e.signTransactions(r)??[];return lt(n+m.length),m}var O=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await bt(this.provider,t);return V(this.provider.getType()),wt(this),N.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await gt({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ct({provider:this.provider,transactions:t,options:s})}catch(o){let i=_(o);throw new Error(i)}}async signMessage(t,s){try{return await ft({provider:this.provider,message:t,options:s})}catch(o){let i=_(o,"warning");throw new Error(i)}}async verifyMessage(t){return await ht(t)}cancelLogin(){this.provider.cancelLogin?.()}};var At=null;function wt(e){At=e}function h(){return At||new O(Et)}var Ut=async()=>{try{let e=X(),{network:t}=f();try{let s=await y({address:e,baseURL:t.apiAddress});if(s!=null){let o={...s,username:A(s.username),nonce:L(s)};return C(o),o}}catch(s){console.error("Failed getting account ",s)}}catch(e){console.error("Failed getting address ",e)}return null};async function St(){let e=h();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var F={},T={},_t=(e,t)=>{u().setState(({toasts:s})=>{let o=s.customToasts.length>0?Math.max(...s.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${o+1}`,n=s.customToasts.findIndex(r=>r.toastId===i),a={...e,toastId:i};if(n!==-1){s.customToasts[n]=a;return}s.customToasts.push({...a,toastId:i})},!1,"addCustomToast")},P=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==e)},!1,"removeCustomToast")},xt=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},zo=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},Nt=({toastId:e,totalDuration:t})=>{let s="";return u().setState(({toasts:o})=>{let i=o.transactionToasts.length>0?Math.max(...o.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;s=e??`transaction-toast-${i+1}`,o.transactionToasts.push({startTime:j(),endTime:yt(t),toastId:s})},!1,"addTransactionToast"),s},k=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==e)},!1,"removeTransactionToast"),delete T[e],delete F[e]},M=e=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,o=e.toastId||`custom-toast-${s+1}`;return e.onClose&&(T[o]=e.onClose),e.instantiateToastElement?(F[o]=e.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===o),a={...e,instantiateToastElement:null,toastId:o};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),o):(_t(e,o),o)};var Mt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Mt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{k(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let o=setTimeout(()=>{P(t);let i=T[t];i?.()},s);this.timeoutIntervals.set(t,o)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Mt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var p=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=x.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:o},{toasts:i,transactions:n})=>{(!W(i.transactionToasts,s.transactionToasts)||!W(n,o))&&await this.updateTransactionToastsList(),W(i.customToasts,s.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),o=s[t];if(!o)return!1;let{status:i}=o,n=at(i),a=nt(i),c=it(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,s){let o=Nt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),o}createCustomToast(t){let s=M(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:o}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:n}=await b({toastList:t,transactionsSessions:s,account:o});this.transactionToasts=[...i,...n];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let i="message"in s?{...s}:{...s,instantiateToastElement:F[s.toastId]};this.customToasts.push(i),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ct.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&k(t)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.handleCloseToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.handleCloseToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(o=>o.toastId===t)){this.lifetimeManager.stop(t);let o=T[t];o?.(),P(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),xt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{x as a,F as b,T as c,_t as d,P as e,xt as f,zo as g,Nt as h,k as i,M as j,D as k,p as l,N as m,B as n,bt as o,_ as p,Ct as q,O as r,wt as s,h as t,St as u};
2
- //# sourceMappingURL=chunk-QYUEIE7N.mjs.map
1
+ import{a as et}from"./chunk-FZ72N7LX.mjs";import{a as mt}from"./chunk-6UZHM5LW.mjs";import{a as b}from"./chunk-OMSCPNRR.mjs";import{a as pt}from"./chunk-X4CDTS57.mjs";import{a as w}from"./chunk-TVXFF2PG.mjs";import{a as Z,b as tt,g as st,l as ot}from"./chunk-CAA4VJRH.mjs";import{a as gt}from"./chunk-KEUKJKQV.mjs";import{b as S}from"./chunk-FFUT67H3.mjs";import{a as dt}from"./chunk-BUHXFBUA.mjs";import{a as It}from"./chunk-4ODPAHHA.mjs";import{a as ht}from"./chunk-MDVI45IV.mjs";import{a as ft}from"./chunk-QO2DNBMF.mjs";import{a as f}from"./chunk-VVHC6HV6.mjs";import{a as X}from"./chunk-H3PQUL5M.mjs";import{a as ut}from"./chunk-ZHOATTZ2.mjs";import{a as L}from"./chunk-3F3QCMGL.mjs";import{a as C,f as lt}from"./chunk-ZIMECN23.mjs";import{b as Tt}from"./chunk-O2ZZO4AS.mjs";import{d as rt}from"./chunk-44IN6A4I.mjs";import{k as it,l as nt,n as at}from"./chunk-65L5EBBL.mjs";import{a as A}from"./chunk-HORSXVIV.mjs";import{a as vt}from"./chunk-RVCCJBPE.mjs";import{a as Q}from"./chunk-3YBH7N5W.mjs";import{a as E}from"./chunk-QTKK6OSJ.mjs";import{a as J}from"./chunk-6ACLOUQ3.mjs";import{a as y}from"./chunk-6FXEHNGW.mjs";import{a as yt}from"./chunk-NJN53MJV.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as V,b as q,q as u,s as Y}from"./chunk-76PSW6FH.mjs";import{c as H,f as $}from"./chunk-UERJ6AKK.mjs";import{b as g}from"./chunk-VNLGNNIL.mjs";import{b as v}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-NTEMINYA.mjs";import{b as Et}from"./chunk-76URRONH.mjs";import{a as ct}from"./chunk-OIWRUY4C.mjs";import{a as I}from"./chunk-PLUWBWJ2.mjs";import W from"lodash.isequal";import Lt from"lodash.isequal";var Ft="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",x=class e extends ut{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.closeUI=async()=>{this.data.pendingTransactions.length>0?(this.unsubscribeFunctions.forEach(s=>s.forEach(o=>o())),this.unsubscribeFunctions.clear(),await this.uiElement?.closeWithAnimation()):super.closeUI()};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){p.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let o=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!Lt(a.transactionToasts,i.transactionToasts)||!Lt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ft,[o]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=p.getInstance();await this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:o,toasts:i,network:n}=this.store.getState(),{pendingTransactionToasts:a}=await b({toastList:i,transactionsSessions:s,account:o});this.data.pendingTransactions=a,this.data.historicTransactions=await et.getTransactionsHistory({transactionsSessions:s,address:o.address,explorerAddress:n.network.explorerAddress,egldLabel:n.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){rt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};import R from"bignumber.js";var N=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=g(t),{isExpired:o}=E(s?.nativeAuthToken);o?h().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=g(t),o=$(t);return!!(s?.nativeAuthToken&&o)};this.addPlannedLogout=()=>{let t=h(),s=H(this.store.getState()),o=t.getType()===I.webview;if(!s||o)return;this.addLogoutWarning();let i=g(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=E(i?.nativeAuthToken),c=new R(String(n)),r=`${s}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let d=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},d.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},d.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=v(this.store.getState()),s=g(this.store.getState()),{secondsUntilExpires:o}=E(s?.nativeAuthToken),i=new R(String(o)),n=i.times(1e3);if(!o||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=mt(n.toNumber()),l=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:s}){let o=await y({address:e,baseURL:s});if(!o)throw new Error("Account not found");Tt({address:e,providerType:t.getType()});let i={...o,username:A(o.username),nonce:L(o)};C(i),await S(e),w(),o.shard!=null&&await pt({shard:Number(o.shard),apiAddress:s})}async function kt(e){let{network:{apiAddress:t}}=f();await e.login();let s=await e.getAddress();if(!s)throw new Error("Address not found");return await B({address:s,provider:e,apiAddress:t}),{address:s}}async function Dt({provider:e,nativeAuthConfig:t,token:s}){let{network:{apiAddress:o}}=f(),i=Q(t),n=s;n||(n=await i.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:n});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let l=J(r?.accessToken)?r.accessToken:i.getToken({address:a,token:n,signature:c});q({loginToken:n,signature:c,nativeAuthToken:l});let d=await dt({loginToken:n,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:d,provider:e,apiAddress:o}),{address:d,signature:c}}async function bt(e,t){let s=v(Y());if(s)return await Dt({provider:e,nativeAuthConfig:s,token:t?.token});let{address:o}=await kt(e);return await S(o),w(),{address:o}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${tt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${Z}-${Date.now()}`}},Rt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},Bt=e=>{for(let[t,s]of Object.entries(Rt))if(e.includes(t))return s;return"Error when signing"};function _(e,t="error"){let s=e?.message,o=Bt(s),n=o!=="Error when signing"?"warning":t,a=Object.keys(U).includes(n)?U[n]:U.error,{toastId:c,iconClassName:r,title:m}=a;return M({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:o,title:m}),o}async function Ct({provider:e,transactions:t,options:s={}}){await St();let{isGuarded:o,activeGuardianAddress:i,nonce:n}=vt(),a=e.getType()===I.ledger,c=It({latestNonce:n,transactions:t}),r=i&&o&&!s.skipGuardian?c?.map(l=>(l.version=G.withTxOptions().valueOf(),l.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),l.guardian=K.newFromBech32(i),l)):c,m=await e.signTransactions(r)??[];return lt(n+m.length),m}var O=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await bt(this.provider,t);return V(this.provider.getType()),wt(this),N.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await gt({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ct({provider:this.provider,transactions:t,options:s})}catch(o){let i=_(o);throw new Error(i)}}async signMessage(t,s){try{return await ft({provider:this.provider,message:t,options:s})}catch(o){let i=_(o,"warning");throw new Error(i)}}async verifyMessage(t){return await ht(t)}cancelLogin(){this.provider.cancelLogin?.()}};var At=null;function wt(e){At=e}function h(){return At||new O(Et)}var Ut=async()=>{try{let e=X(),{network:t}=f();try{let s=await y({address:e,baseURL:t.apiAddress});if(s!=null){let o={...s,username:A(s.username),nonce:L(s)};return C(o),o}}catch(s){console.error("Failed getting account ",s)}}catch(e){console.error("Failed getting address ",e)}return null};async function St(){let e=h();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var F={},T={},_t=(e,t)=>{u().setState(({toasts:s})=>{let o=s.customToasts.length>0?Math.max(...s.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${o+1}`,n=s.customToasts.findIndex(r=>r.toastId===i),a={...e,toastId:i};if(n!==-1){s.customToasts[n]=a;return}s.customToasts.push({...a,toastId:i})},!1,"addCustomToast")},P=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==e)},!1,"removeCustomToast")},xt=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},zo=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},Nt=({toastId:e,totalDuration:t})=>{let s="";return u().setState(({toasts:o})=>{let i=o.transactionToasts.length>0?Math.max(...o.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;s=e??`transaction-toast-${i+1}`,o.transactionToasts.push({startTime:j(),endTime:yt(t),toastId:s})},!1,"addTransactionToast"),s},k=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==e)},!1,"removeTransactionToast"),delete T[e],delete F[e]},M=e=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,o=e.toastId||`custom-toast-${s+1}`;return e.onClose&&(T[o]=e.onClose),e.instantiateToastElement?(F[o]=e.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===o),a={...e,instantiateToastElement:null,toastId:o};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),o):(_t(e,o),o)};var Mt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Mt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{k(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let o=setTimeout(()=>{P(t);let i=T[t];i?.()},s);this.timeoutIntervals.set(t,o)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Mt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var p=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=x.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:o},{toasts:i,transactions:n})=>{(!W(i.transactionToasts,s.transactionToasts)||!W(n,o))&&await this.updateTransactionToastsList(),W(i.customToasts,s.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),o=s[t];if(!o)return!1;let{status:i}=o,n=at(i),a=nt(i),c=it(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,s){let o=Nt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),o}createCustomToast(t){let s=M(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:o}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:n}=await b({toastList:t,transactionsSessions:s,account:o});this.transactionToasts=[...i,...n];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let i="message"in s?{...s}:{...s,instantiateToastElement:F[s.toastId]};this.customToasts.push(i),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ct.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&k(t)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.handleCloseToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.handleCloseToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(o=>o.toastId===t)){this.lifetimeManager.stop(t);let o=T[t];o?.(),P(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),xt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{x as a,F as b,T as c,_t as d,P as e,xt as f,zo as g,Nt as h,k as i,M as j,D as k,p as l,N as m,B as n,bt as o,_ as p,Ct as q,O as r,wt as s,h as t,St as u};
2
+ //# sourceMappingURL=chunk-ZLS3BN2I.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-4IS7AY5Q.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
2
+ //# sourceMappingURL=chunk-ZTQR4O4A.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/window/getWindowParentOrigin.ts"],
4
+ "sourcesContent": ["import { safeWindow } from 'constants/window.constants';\n\nexport const getWindowParentOrigin = () => {\n if (!safeWindow) {\n return '';\n }\n\n try {\n const referrer = safeWindow.document?.referrer;\n\n if (!referrer) {\n return '';\n }\n\n return new URL(referrer).origin;\n } catch (e) {\n console.error(e);\n return '';\n }\n};\n"],
5
+ "mappings": "yCAEO,IAAMA,EAAwB,IAAM,CACzC,GAAI,CAACC,EACH,MAAO,GAGT,GAAI,CACF,IAAMC,EAAWD,EAAW,UAAU,SAEtC,OAAKC,EAIE,IAAI,IAAIA,CAAQ,EAAE,OAHhB,EAIX,OAASC,EAAG,CACV,eAAQ,MAAMA,CAAC,EACR,EACT,CACF",
6
+ "names": ["getWindowParentOrigin", "safeWindow", "referrer", "e"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-LSKZWWBZ.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-X6MN67NW.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../__chunks__/chunk-CDQ2BNUD.mjs";import"../../__chunks__/chunk-LHEH7L4L.mjs";import"../../__chunks__/chunk-B5QFFY63.mjs";import"../../__chunks__/chunk-EJV4VNJG.mjs";import"../../__chunks__/chunk-YU6ZFE62.mjs";import"../../__chunks__/chunk-FI444OX3.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-PLUWBWJ2.mjs";import"../../__chunks__/chunk-QET2OLJT.mjs";export{a as getScamAddressData};
1
+ import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-LSKZWWBZ.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-X6MN67NW.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../__chunks__/chunk-CDQ2BNUD.mjs";import"../../__chunks__/chunk-LHEH7L4L.mjs";import"../../__chunks__/chunk-D5DHIEIM.mjs";import"../../__chunks__/chunk-EJV4VNJG.mjs";import"../../__chunks__/chunk-PFMOMLPA.mjs";import"../../__chunks__/chunk-FI444OX3.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-PLUWBWJ2.mjs";import"../../__chunks__/chunk-4IS7AY5Q.mjs";export{a as getScamAddressData};
2
2
  //# sourceMappingURL=getScamAddressData.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-OEBWA3U7.mjs";import"../../__chunks__/chunk-3BAZ5IKF.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-IQNEWWWL.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-X4XULIVT.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-QET2OLJT.mjs";export{a as getCleanApiAddress};
1
+ import{a}from"../../__chunks__/chunk-7HGOYM67.mjs";import"../../__chunks__/chunk-76PSW6FH.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-P6PCRGOG.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-4IS7AY5Q.mjs";export{a as getCleanApiAddress};
2
2
  //# sourceMappingURL=getCleanApiAddress.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-JJ23PMQB.mjs";import"../../__chunks__/chunk-OEBWA3U7.mjs";import"../../__chunks__/chunk-3BAZ5IKF.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-IQNEWWWL.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-X4XULIVT.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-QET2OLJT.mjs";export{a as getGasStationMetadataFromApi};
1
+ import{a}from"../../__chunks__/chunk-LYUN4G56.mjs";import"../../__chunks__/chunk-7HGOYM67.mjs";import"../../__chunks__/chunk-76PSW6FH.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-P6PCRGOG.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-4IS7AY5Q.mjs";export{a as getGasStationMetadataFromApi};
2
2
  //# sourceMappingURL=getGasStationMetadata.mjs.map
@@ -1,2 +1,2 @@
1
- import"../__chunks__/chunk-YV7ZJBAY.mjs";import"../__chunks__/chunk-DXRSXWLQ.mjs";import"../__chunks__/chunk-K5MJ4FMD.mjs";import{a as F}from"../__chunks__/chunk-TRQA733J.mjs";import"../__chunks__/chunk-INRKVOET.mjs";import"../__chunks__/chunk-6ET5BDZH.mjs";import{a as G}from"../__chunks__/chunk-LSKZWWBZ.mjs";import"../__chunks__/chunk-ZFXAT6MD.mjs";import{a as H}from"../__chunks__/chunk-Q2Q4XN4M.mjs";import{a as D}from"../__chunks__/chunk-YK7T6MBD.mjs";import{a as E}from"../__chunks__/chunk-KMJMQEXI.mjs";import{a as B,b as C}from"../__chunks__/chunk-ZLE5VUWG.mjs";import{a as A}from"../__chunks__/chunk-3GGBXXXJ.mjs";import{a as z}from"../__chunks__/chunk-X6MN67NW.mjs";import"../__chunks__/chunk-3BAZ5IKF.mjs";import"../__chunks__/chunk-T4FRQ4JG.mjs";import"../__chunks__/chunk-UERJ6AKK.mjs";import"../__chunks__/chunk-KPK72MOE.mjs";import"../__chunks__/chunk-SAAOQW7P.mjs";import"../__chunks__/chunk-VNLGNNIL.mjs";import"../__chunks__/chunk-6JM4DPOH.mjs";import"../__chunks__/chunk-UTWIKUIK.mjs";import"../__chunks__/chunk-ZODTYAYF.mjs";import"../__chunks__/chunk-NLRDRI7Q.mjs";import"../__chunks__/chunk-DKX6JUT6.mjs";import"../__chunks__/chunk-IQNEWWWL.mjs";import"../__chunks__/chunk-KRWR77QE.mjs";import"../__chunks__/chunk-B7YCKWDU.mjs";import"../__chunks__/chunk-HDJOER66.mjs";import"../__chunks__/chunk-A7FTKX2A.mjs";import"../__chunks__/chunk-XKU5QBXG.mjs";import"../__chunks__/chunk-WZGG2YKQ.mjs";import"../__chunks__/chunk-JMC7CMTU.mjs";import"../__chunks__/chunk-S2B2ZKIJ.mjs";import"../__chunks__/chunk-T2YPFNVM.mjs";import"../__chunks__/chunk-X4XULIVT.mjs";import"../__chunks__/chunk-5N4F5T5L.mjs";import"../__chunks__/chunk-CYCS3K6Q.mjs";import"../__chunks__/chunk-YMPZDHKF.mjs";import"../__chunks__/chunk-VKEESSBI.mjs";import"../__chunks__/chunk-2DNGCNYM.mjs";import"../__chunks__/chunk-SQVKVA7X.mjs";import"../__chunks__/chunk-I24YBVHK.mjs";import"../__chunks__/chunk-NB7A4C7L.mjs";import"../__chunks__/chunk-PJWJZHIS.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y}from"../__chunks__/chunk-KD2IQ32V.mjs";import"../__chunks__/chunk-NTEMINYA.mjs";import"../__chunks__/chunk-3FXHIV6O.mjs";import"../__chunks__/chunk-ULUZWP2P.mjs";import"../__chunks__/chunk-MGFIOCA4.mjs";import"../__chunks__/chunk-GGBMHKR4.mjs";import"../__chunks__/chunk-GLXG5BES.mjs";import"../__chunks__/chunk-QET2OLJT.mjs";export{a as ACCOUNTS_ENDPOINT,b as ADDRESS_ENDPOINT,c as BLOCKS_ENDPOINT,d as CODE_ENDPOINT,e as COLLECTIONS_ENDPOINT,f as CONFIG_ENDPOINT,g as CONTRACTS_ENDPOINT,h as ECONOMICS_ENDPOINT,i as IDENTITIES_ENDPOINT,j as KEYS_ENDPOINT,k as LOCKED_ACCOUNTS_ENDPOINT,l as LOGS_ENDPOINT,m as MINIBLOCKS_ENDPOINT,n as NETWORK_CONFIG_ENDPOINT,o as NFTS_ENDPOINT,p as NODES_ENDPOINT,q as PROVIDERS_ENDPOINT,r as ROLES_ENDPOINT,s as SC_RESULTS_ENDPOINT,t as STAKE_ENDPOINT,u as TOKENS_ENDPOINT,w as TRANSACTIONS_BATCH,v as TRANSACTIONS_COUNT_ENDPOINT,x as TRANSACTIONS_ENDPOINT,y as TRANSFERS_ENDPOINT,B as accountFetcher,G as axiosFetcher,z as axiosInstance,C as getAccountFromApi,A as getCleanApiAddress,E as getNetworkConfigFromApi,D as getServerConfiguration,F as getTokenDetails,H as getWebsocketUrl};
1
+ import"../__chunks__/chunk-YV7ZJBAY.mjs";import"../__chunks__/chunk-DXRSXWLQ.mjs";import"../__chunks__/chunk-K5MJ4FMD.mjs";import{a as F}from"../__chunks__/chunk-JIF5QHA5.mjs";import"../__chunks__/chunk-INRKVOET.mjs";import"../__chunks__/chunk-6ET5BDZH.mjs";import{a as G}from"../__chunks__/chunk-LSKZWWBZ.mjs";import"../__chunks__/chunk-ZFXAT6MD.mjs";import{a as H}from"../__chunks__/chunk-Q2Q4XN4M.mjs";import{a as D}from"../__chunks__/chunk-YK7T6MBD.mjs";import{a as E}from"../__chunks__/chunk-KMJMQEXI.mjs";import{a as B,b as C}from"../__chunks__/chunk-ZLE5VUWG.mjs";import{a as A}from"../__chunks__/chunk-3GGBXXXJ.mjs";import{a as z}from"../__chunks__/chunk-X6MN67NW.mjs";import"../__chunks__/chunk-76PSW6FH.mjs";import"../__chunks__/chunk-T4FRQ4JG.mjs";import"../__chunks__/chunk-UERJ6AKK.mjs";import"../__chunks__/chunk-KPK72MOE.mjs";import"../__chunks__/chunk-SAAOQW7P.mjs";import"../__chunks__/chunk-VNLGNNIL.mjs";import"../__chunks__/chunk-6JM4DPOH.mjs";import"../__chunks__/chunk-UTWIKUIK.mjs";import"../__chunks__/chunk-ZODTYAYF.mjs";import"../__chunks__/chunk-NLRDRI7Q.mjs";import"../__chunks__/chunk-DKX6JUT6.mjs";import"../__chunks__/chunk-P6PCRGOG.mjs";import"../__chunks__/chunk-KRWR77QE.mjs";import"../__chunks__/chunk-B7YCKWDU.mjs";import"../__chunks__/chunk-HDJOER66.mjs";import"../__chunks__/chunk-A7FTKX2A.mjs";import"../__chunks__/chunk-XKU5QBXG.mjs";import"../__chunks__/chunk-WZGG2YKQ.mjs";import"../__chunks__/chunk-JMC7CMTU.mjs";import"../__chunks__/chunk-S2B2ZKIJ.mjs";import"../__chunks__/chunk-T2YPFNVM.mjs";import"../__chunks__/chunk-M7BM6QPB.mjs";import"../__chunks__/chunk-5N4F5T5L.mjs";import"../__chunks__/chunk-CYCS3K6Q.mjs";import"../__chunks__/chunk-YMPZDHKF.mjs";import"../__chunks__/chunk-VKEESSBI.mjs";import"../__chunks__/chunk-2DNGCNYM.mjs";import"../__chunks__/chunk-SQVKVA7X.mjs";import"../__chunks__/chunk-I24YBVHK.mjs";import"../__chunks__/chunk-NB7A4C7L.mjs";import"../__chunks__/chunk-PJWJZHIS.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y}from"../__chunks__/chunk-KD2IQ32V.mjs";import"../__chunks__/chunk-NTEMINYA.mjs";import"../__chunks__/chunk-3FXHIV6O.mjs";import"../__chunks__/chunk-ULUZWP2P.mjs";import"../__chunks__/chunk-MGFIOCA4.mjs";import"../__chunks__/chunk-GGBMHKR4.mjs";import"../__chunks__/chunk-GLXG5BES.mjs";import"../__chunks__/chunk-4IS7AY5Q.mjs";export{a as ACCOUNTS_ENDPOINT,b as ADDRESS_ENDPOINT,c as BLOCKS_ENDPOINT,d as CODE_ENDPOINT,e as COLLECTIONS_ENDPOINT,f as CONFIG_ENDPOINT,g as CONTRACTS_ENDPOINT,h as ECONOMICS_ENDPOINT,i as IDENTITIES_ENDPOINT,j as KEYS_ENDPOINT,k as LOCKED_ACCOUNTS_ENDPOINT,l as LOGS_ENDPOINT,m as MINIBLOCKS_ENDPOINT,n as NETWORK_CONFIG_ENDPOINT,o as NFTS_ENDPOINT,p as NODES_ENDPOINT,q as PROVIDERS_ENDPOINT,r as ROLES_ENDPOINT,s as SC_RESULTS_ENDPOINT,t as STAKE_ENDPOINT,u as TOKENS_ENDPOINT,w as TRANSACTIONS_BATCH,v as TRANSACTIONS_COUNT_ENDPOINT,x as TRANSACTIONS_ENDPOINT,y as TRANSFERS_ENDPOINT,B as accountFetcher,G as axiosFetcher,z as axiosInstance,C as getAccountFromApi,A as getCleanApiAddress,E as getNetworkConfigFromApi,D as getServerConfiguration,F as getTokenDetails,H as getWebsocketUrl};
2
2
  //# sourceMappingURL=index.mjs.map