@multiversx/sdk-dapp 5.1.2-alpha.0 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/out/__chunks__/{chunk-VIVOTJDI.mjs → chunk-27OTZWDO.mjs} +2 -2
  2. package/out/__chunks__/{chunk-HDXMYXAN.mjs → chunk-2DUVXRMU.mjs} +2 -2
  3. package/out/__chunks__/{chunk-XESXJCCF.mjs → chunk-2HKAVY3C.mjs} +2 -2
  4. package/out/__chunks__/{chunk-5J65NBYA.mjs → chunk-2L25IGHZ.mjs} +2 -2
  5. package/out/__chunks__/{chunk-ARSG3XHK.mjs → chunk-2SVWHJC4.mjs} +2 -2
  6. package/out/__chunks__/{chunk-CE7HOUHL.mjs → chunk-3CKDOF3O.mjs} +2 -2
  7. package/out/__chunks__/chunk-3NQTC6AZ.mjs +2 -0
  8. package/out/__chunks__/{chunk-NE26WBXK.mjs → chunk-4AUL3FHT.mjs} +2 -2
  9. package/out/__chunks__/chunk-4EMQSUU6.mjs +2 -0
  10. package/out/__chunks__/{chunk-ERKG75NR.mjs → chunk-4XIT3N7Y.mjs} +2 -2
  11. package/out/__chunks__/{chunk-VMGQKRG7.mjs → chunk-54XYKDH7.mjs} +2 -2
  12. package/out/__chunks__/{chunk-RP4AE3QR.mjs → chunk-5AZZG5KG.mjs} +2 -2
  13. package/out/__chunks__/chunk-5JYD7XMI.mjs +2 -0
  14. package/out/__chunks__/{chunk-KLLIQMQO.mjs → chunk-6BF62TP4.mjs} +2 -2
  15. package/out/__chunks__/{chunk-CSN46RUW.mjs → chunk-6PDGQGIS.mjs} +2 -2
  16. package/out/__chunks__/{chunk-KPW6VTHT.mjs → chunk-72D44IHE.mjs} +2 -2
  17. package/out/__chunks__/{chunk-SMGE6R45.mjs → chunk-7ONKP4ZG.mjs} +2 -2
  18. package/out/__chunks__/{chunk-Q6JFJI2W.mjs → chunk-7VNNDJ7P.mjs} +2 -2
  19. package/out/__chunks__/chunk-AQ6D3F5K.mjs +2 -0
  20. package/out/__chunks__/chunk-AQ6D3F5K.mjs.map +7 -0
  21. package/out/__chunks__/{chunk-VMAGG3NR.mjs → chunk-ARAO6B2F.mjs} +2 -2
  22. package/out/__chunks__/{chunk-EJICHLEZ.mjs → chunk-AXCK3KRV.mjs} +2 -2
  23. package/out/__chunks__/{chunk-CGJKZTBA.mjs → chunk-BGUYSNNW.mjs} +2 -2
  24. package/out/__chunks__/{chunk-IMPOALRX.mjs → chunk-BIVZJPSH.mjs} +1 -1
  25. package/out/__chunks__/{chunk-IMPOALRX.mjs.map → chunk-BIVZJPSH.mjs.map} +2 -2
  26. package/out/__chunks__/{chunk-TPVEFH7Q.mjs → chunk-BQP6NPQM.mjs} +2 -2
  27. package/out/__chunks__/{chunk-KQPYTMH7.mjs → chunk-CAAMS3C5.mjs} +2 -2
  28. package/out/__chunks__/{chunk-KSF6BZCK.mjs → chunk-CYEMHPEX.mjs} +2 -2
  29. package/out/__chunks__/{chunk-LJIXYBGR.mjs → chunk-DCX2NQAU.mjs} +2 -2
  30. package/out/__chunks__/{chunk-HGJYBXPW.mjs → chunk-DG77T3NS.mjs} +2 -2
  31. package/out/__chunks__/{chunk-DB3IGD5A.mjs → chunk-DJ2HTZOV.mjs} +2 -2
  32. package/out/__chunks__/{chunk-ECLO2FEO.mjs → chunk-E5CUE265.mjs} +2 -2
  33. package/out/__chunks__/{chunk-SXR4CTVB.mjs → chunk-FFHHIKMI.mjs} +2 -2
  34. package/out/__chunks__/chunk-FVFVOSQ4.mjs +2 -0
  35. package/out/__chunks__/{chunk-PJDJEPY2.mjs.map → chunk-FVFVOSQ4.mjs.map} +3 -3
  36. package/out/__chunks__/{chunk-WBOZI3GT.mjs → chunk-GSRRAPL5.mjs} +2 -2
  37. package/out/__chunks__/{chunk-R3A4BWLM.mjs → chunk-H4DISFAI.mjs} +2 -2
  38. package/out/__chunks__/{chunk-6STWYHWF.mjs → chunk-HOJ7JMTW.mjs} +2 -2
  39. package/out/__chunks__/{chunk-LV6C2ZIZ.mjs → chunk-I4HR64FU.mjs} +2 -2
  40. package/out/__chunks__/{chunk-PKWIVZGN.mjs → chunk-I6WJ63GD.mjs} +2 -2
  41. package/out/__chunks__/{chunk-SDF2UGGL.mjs → chunk-IR743HKQ.mjs} +2 -2
  42. package/out/__chunks__/chunk-IRBGQJE4.mjs +2 -0
  43. package/out/__chunks__/{chunk-WQVNPEBR.mjs → chunk-IWROXIQ5.mjs} +2 -2
  44. package/out/__chunks__/{chunk-RJJC6N2Y.mjs → chunk-IZ4B4B35.mjs} +2 -2
  45. package/out/__chunks__/chunk-J64N3RXX.mjs +2 -0
  46. package/out/__chunks__/chunk-JN5CTLWW.mjs +2 -0
  47. package/out/__chunks__/{chunk-MHUBH54G.mjs → chunk-JV7AJLRI.mjs} +2 -2
  48. package/out/__chunks__/{chunk-P7HXQCT3.mjs → chunk-KAQ5IXKK.mjs} +2 -2
  49. package/out/__chunks__/chunk-KK25BEMY.mjs +2 -0
  50. package/out/__chunks__/{chunk-R7VBD5LY.mjs → chunk-KP4MUQKU.mjs} +2 -2
  51. package/out/__chunks__/chunk-KX5J6EMC.mjs +2 -0
  52. package/out/__chunks__/{chunk-COXGLRHQ.mjs.map → chunk-KX5J6EMC.mjs.map} +1 -1
  53. package/out/__chunks__/chunk-KXUILKL2.mjs +2 -0
  54. package/out/__chunks__/chunk-KXUILKL2.mjs.map +7 -0
  55. package/out/__chunks__/{chunk-EMEEMCT2.mjs → chunk-LPGMDX6Q.mjs} +2 -2
  56. package/out/__chunks__/{chunk-RJVEJVHX.mjs → chunk-LQ6WESDL.mjs} +2 -2
  57. package/out/__chunks__/chunk-LTRQRVWX.mjs +2 -0
  58. package/out/__chunks__/{chunk-I4CVTZ26.mjs → chunk-LY3MRREN.mjs} +2 -2
  59. package/out/__chunks__/chunk-MGHFXYZ5.mjs +2 -0
  60. package/out/__chunks__/chunk-MK36TMYT.mjs +2 -0
  61. package/out/__chunks__/{chunk-7BD7CF6T.mjs → chunk-N6QD4PLA.mjs} +2 -2
  62. package/out/__chunks__/{chunk-A3ZOFLAI.mjs → chunk-NZWPA245.mjs} +2 -2
  63. package/out/__chunks__/{chunk-HLX4P4C4.mjs → chunk-O24MRZB2.mjs} +2 -2
  64. package/out/__chunks__/{chunk-QGJXV5ZQ.mjs → chunk-OCGNA44K.mjs} +2 -2
  65. package/out/__chunks__/chunk-OF3XH6ZU.mjs +2 -0
  66. package/out/__chunks__/{chunk-LHKQURVT.mjs → chunk-OP2PPPAN.mjs} +2 -2
  67. package/out/__chunks__/{chunk-G45WQH2G.mjs → chunk-PAAJPYAE.mjs} +2 -2
  68. package/out/__chunks__/{chunk-HU7G374W.mjs → chunk-PHMJQ5FC.mjs} +2 -2
  69. package/out/__chunks__/chunk-PLTUKRYU.mjs +2 -0
  70. package/out/__chunks__/chunk-PLTUKRYU.mjs.map +7 -0
  71. package/out/__chunks__/{chunk-JQJQRKHP.mjs → chunk-PO3ODHJ7.mjs} +2 -2
  72. package/out/__chunks__/chunk-QQEQNSRI.mjs +2 -0
  73. package/out/__chunks__/{chunk-ZMEDSH63.mjs → chunk-RJOP7SCI.mjs} +2 -2
  74. package/out/__chunks__/{chunk-2DT3JTAQ.mjs → chunk-RNSBN5JT.mjs} +2 -2
  75. package/out/__chunks__/{chunk-KQVZYJYV.mjs → chunk-S53SAYHR.mjs} +2 -2
  76. package/out/__chunks__/{chunk-ASMKQJPY.mjs → chunk-S5YFFC7A.mjs} +2 -2
  77. package/out/__chunks__/chunk-SGQJOLH2.mjs +2 -0
  78. package/out/__chunks__/chunk-STVYY4LI.mjs +2 -0
  79. package/out/__chunks__/{chunk-RSVTEVC5.mjs.map → chunk-STVYY4LI.mjs.map} +2 -2
  80. package/out/__chunks__/{chunk-NNLNKPWT.mjs → chunk-TMMUB3IK.mjs} +2 -2
  81. package/out/__chunks__/chunk-TMOMM4JN.mjs +2 -0
  82. package/out/__chunks__/{chunk-N6D4EFG5.mjs → chunk-UJUAT5NK.mjs} +2 -2
  83. package/out/__chunks__/{chunk-K76FSBWQ.mjs → chunk-UXYMY3HG.mjs} +2 -2
  84. package/out/__chunks__/{chunk-DRKUYUHQ.mjs → chunk-VRG2R5C7.mjs} +2 -2
  85. package/out/__chunks__/{chunk-NBBR2XGD.mjs → chunk-WJI5FXSZ.mjs} +2 -2
  86. package/out/__chunks__/{chunk-MW7UEV36.mjs → chunk-XNIJIKGB.mjs} +2 -2
  87. package/out/__chunks__/{chunk-UTQEMLG5.mjs → chunk-XUADWD55.mjs} +2 -2
  88. package/out/__chunks__/chunk-XUI3Z5NN.mjs +2 -0
  89. package/out/__chunks__/{chunk-STL2SPYK.mjs → chunk-Y7QM3LPW.mjs} +2 -2
  90. package/out/__chunks__/{chunk-UHRB45CO.mjs → chunk-YD2O3NV7.mjs} +2 -2
  91. package/out/__chunks__/{chunk-G74VQHJR.mjs → chunk-YFXATY46.mjs} +2 -2
  92. package/out/__chunks__/chunk-YVLFUMPH.mjs +2 -0
  93. package/out/__chunks__/{chunk-DMEWFKXU.mjs → chunk-Z63LDNZJ.mjs} +2 -2
  94. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  95. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  96. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  97. package/out/apiCalls/index.mjs +1 -1
  98. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  99. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  100. package/out/apiCalls/tokens/index.mjs +1 -1
  101. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  102. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  103. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  104. package/out/constants/browser.constants.mjs +1 -1
  105. package/out/constants/index.mjs +1 -1
  106. package/out/constants/storage.constants.mjs +1 -1
  107. package/out/constants/window.constants.cjs +1 -1
  108. package/out/constants/window.constants.cjs.map +1 -1
  109. package/out/constants/window.constants.mjs +1 -1
  110. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  111. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  112. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  113. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  114. package/out/index.mjs +1 -1
  115. package/out/lib/sdkDappUi.mjs +1 -1
  116. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  117. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  118. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  119. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  120. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  121. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  122. package/out/managers/TransactionManager/index.mjs +1 -1
  123. package/out/managers/UnlockPanelManager/UnlockPanelManager.cjs +1 -3
  124. package/out/managers/UnlockPanelManager/UnlockPanelManager.cjs.map +2 -2
  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.mjs +1 -1
  134. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  135. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  136. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  137. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  138. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  139. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  140. package/out/managers/internal/ToastManager/helpers/createTransactionToast.cjs +3 -1
  141. package/out/managers/internal/ToastManager/helpers/createTransactionToast.cjs.map +2 -2
  142. package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
  143. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.cjs +8 -7
  144. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.cjs.map +2 -2
  145. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.d.ts +1 -1
  146. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
  147. package/out/managers/internal/ToastManager/types/index.mjs +1 -1
  148. package/out/managers/internal/ToastManager/types/toast.types.cjs.map +2 -2
  149. package/out/managers/internal/ToastManager/types/toast.types.d.ts +1 -0
  150. package/out/managers/internal/ToastManager/types/toast.types.mjs +1 -1
  151. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  152. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  153. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  154. package/out/managers/internal/index.mjs +1 -1
  155. package/out/methods/account/getAccount.mjs +1 -1
  156. package/out/methods/account/getAccountInfo.mjs +1 -1
  157. package/out/methods/account/getAddress.mjs +1 -1
  158. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  159. package/out/methods/account/getLatestNonce.mjs +1 -1
  160. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  161. package/out/methods/initApp/initApp.cjs +2 -0
  162. package/out/methods/initApp/initApp.cjs.map +2 -2
  163. package/out/methods/initApp/initApp.mjs +1 -1
  164. package/out/methods/initApp/initApp.mjs.map +3 -3
  165. package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs +28 -74
  166. package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs.map +2 -2
  167. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  168. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  169. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  170. package/out/methods/network/getEgldLabel.mjs +1 -1
  171. package/out/methods/network/getExplorerAddress.mjs +1 -1
  172. package/out/methods/network/getNetworkConfig.mjs +1 -1
  173. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  174. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  175. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  176. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  177. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  178. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  179. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  180. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  181. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  182. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  183. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  184. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  185. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  186. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  187. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  188. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  189. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  190. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  191. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  192. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  193. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  194. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  195. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  196. package/out/providers/DappProvider/index.mjs +1 -1
  197. package/out/providers/ProviderFactory.mjs +1 -1
  198. package/out/providers/helpers/accountProvider.mjs +1 -1
  199. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  200. package/out/providers/helpers/clearInitiatedLogins.cjs +0 -9
  201. package/out/providers/helpers/clearInitiatedLogins.cjs.map +2 -2
  202. package/out/providers/helpers/clearInitiatedLogins.mjs +1 -1
  203. package/out/providers/helpers/restoreProvider.mjs +1 -1
  204. package/out/providers/index.mjs +1 -1
  205. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  206. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  207. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  208. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  209. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  210. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  211. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  212. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  213. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  214. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  215. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  216. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  217. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  218. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  219. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  220. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  221. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  222. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  223. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  224. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  225. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  226. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  227. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  228. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  229. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  230. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  231. package/out/providers/strategies/helpers/index.mjs +1 -1
  232. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  233. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  234. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  235. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  236. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  237. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  238. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  239. package/out/providers/strategies/index.mjs +1 -1
  240. package/out/react/account/useGetAccount.mjs +1 -1
  241. package/out/react/account/useGetAccountInfo.mjs +1 -1
  242. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  243. package/out/react/account/useGetLatestNonce.mjs +1 -1
  244. package/out/react/index.mjs +1 -1
  245. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  246. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  247. package/out/react/store/getReactStore.mjs +1 -1
  248. package/out/react/store/useSelector.mjs +1 -1
  249. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  250. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  251. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  252. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  253. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  254. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  255. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  256. package/out/services/index.mjs +1 -1
  257. package/out/services/nativeAuth/index.mjs +1 -1
  258. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  259. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  260. package/out/services/nativeAuth/methods/index.mjs +1 -1
  261. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  262. package/out/store/actions/account/accountActions.mjs +1 -1
  263. package/out/store/actions/account/index.mjs +1 -1
  264. package/out/store/actions/cache/cacheActions.mjs +1 -1
  265. package/out/store/actions/cache/index.mjs +1 -1
  266. package/out/store/actions/config/configActions.mjs +1 -1
  267. package/out/store/actions/config/index.mjs +1 -1
  268. package/out/store/actions/index.mjs +1 -1
  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/storage/index.mjs +1 -1
  284. package/out/store/storage/storageCallback.mjs +1 -1
  285. package/out/store/store.mjs +1 -1
  286. package/out/utils/ComponentFactory.mjs +1 -1
  287. package/out/utils/account/index.mjs +1 -1
  288. package/out/utils/account/refreshAccount.mjs +1 -1
  289. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  290. package/out/utils/index.mjs +1 -1
  291. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  292. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  293. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  294. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  295. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  296. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  297. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  298. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  299. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  300. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  301. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  302. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  303. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  304. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  305. package/out/utils/transactions/index.mjs +1 -1
  306. package/out/utils/validation/tests/addressIsValid.test.d.ts +1 -0
  307. package/out/utils/visual/index.mjs +1 -1
  308. package/out/utils/visual/switchTheme.mjs +1 -1
  309. package/out/utils/window/getIsInIframe.mjs +1 -1
  310. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  311. package/out/utils/window/index.mjs +1 -1
  312. package/package.json +4 -3
  313. package/out/__chunks__/chunk-273ASRFM.mjs +0 -2
  314. package/out/__chunks__/chunk-4HEE3XZP.mjs +0 -2
  315. package/out/__chunks__/chunk-4HEE3XZP.mjs.map +0 -7
  316. package/out/__chunks__/chunk-BHDHYIGP.mjs +0 -2
  317. package/out/__chunks__/chunk-BLT4QEB3.mjs +0 -2
  318. package/out/__chunks__/chunk-BLT4QEB3.mjs.map +0 -7
  319. package/out/__chunks__/chunk-BOCDE46O.mjs +0 -2
  320. package/out/__chunks__/chunk-COXGLRHQ.mjs +0 -2
  321. package/out/__chunks__/chunk-DNPGXK4T.mjs +0 -2
  322. package/out/__chunks__/chunk-G4Z3ZQR6.mjs +0 -2
  323. package/out/__chunks__/chunk-G4Z3ZQR6.mjs.map +0 -7
  324. package/out/__chunks__/chunk-KE56KOKW.mjs +0 -2
  325. package/out/__chunks__/chunk-MD7PPF72.mjs +0 -2
  326. package/out/__chunks__/chunk-NW4NQUQU.mjs +0 -2
  327. package/out/__chunks__/chunk-NYDL2UFN.mjs +0 -2
  328. package/out/__chunks__/chunk-OQOI2ACZ.mjs +0 -2
  329. package/out/__chunks__/chunk-P3OFXVHK.mjs +0 -2
  330. package/out/__chunks__/chunk-PJDJEPY2.mjs +0 -2
  331. package/out/__chunks__/chunk-QVRCGDF7.mjs +0 -2
  332. package/out/__chunks__/chunk-RSVTEVC5.mjs +0 -2
  333. package/out/__chunks__/chunk-T2SCPX2U.mjs +0 -2
  334. package/out/__chunks__/chunk-W446N53W.mjs +0 -2
  335. package/out/__chunks__/chunk-WEP6YL4P.mjs +0 -2
  336. package/out/__chunks__/chunk-X5APGIEK.mjs +0 -2
  337. package/out/__chunks__/chunk-Z77MATGU.mjs +0 -2
  338. /package/out/__chunks__/{chunk-VIVOTJDI.mjs.map → chunk-27OTZWDO.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-HDXMYXAN.mjs.map → chunk-2DUVXRMU.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-XESXJCCF.mjs.map → chunk-2HKAVY3C.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-5J65NBYA.mjs.map → chunk-2L25IGHZ.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-ARSG3XHK.mjs.map → chunk-2SVWHJC4.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-CE7HOUHL.mjs.map → chunk-3CKDOF3O.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-NW4NQUQU.mjs.map → chunk-3NQTC6AZ.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-NE26WBXK.mjs.map → chunk-4AUL3FHT.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-MD7PPF72.mjs.map → chunk-4EMQSUU6.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-ERKG75NR.mjs.map → chunk-4XIT3N7Y.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-VMGQKRG7.mjs.map → chunk-54XYKDH7.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-RP4AE3QR.mjs.map → chunk-5AZZG5KG.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-QVRCGDF7.mjs.map → chunk-5JYD7XMI.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-KLLIQMQO.mjs.map → chunk-6BF62TP4.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-CSN46RUW.mjs.map → chunk-6PDGQGIS.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-KPW6VTHT.mjs.map → chunk-72D44IHE.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-SMGE6R45.mjs.map → chunk-7ONKP4ZG.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-Q6JFJI2W.mjs.map → chunk-7VNNDJ7P.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-VMAGG3NR.mjs.map → chunk-ARAO6B2F.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-EJICHLEZ.mjs.map → chunk-AXCK3KRV.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-CGJKZTBA.mjs.map → chunk-BGUYSNNW.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-TPVEFH7Q.mjs.map → chunk-BQP6NPQM.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-KQPYTMH7.mjs.map → chunk-CAAMS3C5.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-KSF6BZCK.mjs.map → chunk-CYEMHPEX.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-LJIXYBGR.mjs.map → chunk-DCX2NQAU.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-HGJYBXPW.mjs.map → chunk-DG77T3NS.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-DB3IGD5A.mjs.map → chunk-DJ2HTZOV.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-ECLO2FEO.mjs.map → chunk-E5CUE265.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-SXR4CTVB.mjs.map → chunk-FFHHIKMI.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-WBOZI3GT.mjs.map → chunk-GSRRAPL5.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-R3A4BWLM.mjs.map → chunk-H4DISFAI.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-6STWYHWF.mjs.map → chunk-HOJ7JMTW.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-LV6C2ZIZ.mjs.map → chunk-I4HR64FU.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-PKWIVZGN.mjs.map → chunk-I6WJ63GD.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-SDF2UGGL.mjs.map → chunk-IR743HKQ.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-273ASRFM.mjs.map → chunk-IRBGQJE4.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-WQVNPEBR.mjs.map → chunk-IWROXIQ5.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-RJJC6N2Y.mjs.map → chunk-IZ4B4B35.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-W446N53W.mjs.map → chunk-J64N3RXX.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-P3OFXVHK.mjs.map → chunk-JN5CTLWW.mjs.map} +0 -0
  378. /package/out/__chunks__/{chunk-MHUBH54G.mjs.map → chunk-JV7AJLRI.mjs.map} +0 -0
  379. /package/out/__chunks__/{chunk-P7HXQCT3.mjs.map → chunk-KAQ5IXKK.mjs.map} +0 -0
  380. /package/out/__chunks__/{chunk-BHDHYIGP.mjs.map → chunk-KK25BEMY.mjs.map} +0 -0
  381. /package/out/__chunks__/{chunk-R7VBD5LY.mjs.map → chunk-KP4MUQKU.mjs.map} +0 -0
  382. /package/out/__chunks__/{chunk-EMEEMCT2.mjs.map → chunk-LPGMDX6Q.mjs.map} +0 -0
  383. /package/out/__chunks__/{chunk-RJVEJVHX.mjs.map → chunk-LQ6WESDL.mjs.map} +0 -0
  384. /package/out/__chunks__/{chunk-KE56KOKW.mjs.map → chunk-LTRQRVWX.mjs.map} +0 -0
  385. /package/out/__chunks__/{chunk-I4CVTZ26.mjs.map → chunk-LY3MRREN.mjs.map} +0 -0
  386. /package/out/__chunks__/{chunk-NYDL2UFN.mjs.map → chunk-MGHFXYZ5.mjs.map} +0 -0
  387. /package/out/__chunks__/{chunk-BOCDE46O.mjs.map → chunk-MK36TMYT.mjs.map} +0 -0
  388. /package/out/__chunks__/{chunk-7BD7CF6T.mjs.map → chunk-N6QD4PLA.mjs.map} +0 -0
  389. /package/out/__chunks__/{chunk-A3ZOFLAI.mjs.map → chunk-NZWPA245.mjs.map} +0 -0
  390. /package/out/__chunks__/{chunk-HLX4P4C4.mjs.map → chunk-O24MRZB2.mjs.map} +0 -0
  391. /package/out/__chunks__/{chunk-QGJXV5ZQ.mjs.map → chunk-OCGNA44K.mjs.map} +0 -0
  392. /package/out/__chunks__/{chunk-Z77MATGU.mjs.map → chunk-OF3XH6ZU.mjs.map} +0 -0
  393. /package/out/__chunks__/{chunk-LHKQURVT.mjs.map → chunk-OP2PPPAN.mjs.map} +0 -0
  394. /package/out/__chunks__/{chunk-G45WQH2G.mjs.map → chunk-PAAJPYAE.mjs.map} +0 -0
  395. /package/out/__chunks__/{chunk-HU7G374W.mjs.map → chunk-PHMJQ5FC.mjs.map} +0 -0
  396. /package/out/__chunks__/{chunk-JQJQRKHP.mjs.map → chunk-PO3ODHJ7.mjs.map} +0 -0
  397. /package/out/__chunks__/{chunk-DNPGXK4T.mjs.map → chunk-QQEQNSRI.mjs.map} +0 -0
  398. /package/out/__chunks__/{chunk-ZMEDSH63.mjs.map → chunk-RJOP7SCI.mjs.map} +0 -0
  399. /package/out/__chunks__/{chunk-2DT3JTAQ.mjs.map → chunk-RNSBN5JT.mjs.map} +0 -0
  400. /package/out/__chunks__/{chunk-KQVZYJYV.mjs.map → chunk-S53SAYHR.mjs.map} +0 -0
  401. /package/out/__chunks__/{chunk-ASMKQJPY.mjs.map → chunk-S5YFFC7A.mjs.map} +0 -0
  402. /package/out/__chunks__/{chunk-WEP6YL4P.mjs.map → chunk-SGQJOLH2.mjs.map} +0 -0
  403. /package/out/__chunks__/{chunk-NNLNKPWT.mjs.map → chunk-TMMUB3IK.mjs.map} +0 -0
  404. /package/out/__chunks__/{chunk-X5APGIEK.mjs.map → chunk-TMOMM4JN.mjs.map} +0 -0
  405. /package/out/__chunks__/{chunk-N6D4EFG5.mjs.map → chunk-UJUAT5NK.mjs.map} +0 -0
  406. /package/out/__chunks__/{chunk-K76FSBWQ.mjs.map → chunk-UXYMY3HG.mjs.map} +0 -0
  407. /package/out/__chunks__/{chunk-DRKUYUHQ.mjs.map → chunk-VRG2R5C7.mjs.map} +0 -0
  408. /package/out/__chunks__/{chunk-NBBR2XGD.mjs.map → chunk-WJI5FXSZ.mjs.map} +0 -0
  409. /package/out/__chunks__/{chunk-MW7UEV36.mjs.map → chunk-XNIJIKGB.mjs.map} +0 -0
  410. /package/out/__chunks__/{chunk-UTQEMLG5.mjs.map → chunk-XUADWD55.mjs.map} +0 -0
  411. /package/out/__chunks__/{chunk-T2SCPX2U.mjs.map → chunk-XUI3Z5NN.mjs.map} +0 -0
  412. /package/out/__chunks__/{chunk-STL2SPYK.mjs.map → chunk-Y7QM3LPW.mjs.map} +0 -0
  413. /package/out/__chunks__/{chunk-UHRB45CO.mjs.map → chunk-YD2O3NV7.mjs.map} +0 -0
  414. /package/out/__chunks__/{chunk-G74VQHJR.mjs.map → chunk-YFXATY46.mjs.map} +0 -0
  415. /package/out/__chunks__/{chunk-OQOI2ACZ.mjs.map → chunk-YVLFUMPH.mjs.map} +0 -0
  416. /package/out/__chunks__/{chunk-DMEWFKXU.mjs.map → chunk-Z63LDNZJ.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-JQJQRKHP.mjs";import{a}from"./chunk-Z77MATGU.mjs";import{a as u}from"./chunk-XESXJCCF.mjs";import{c as n}from"./chunk-ARSG3XHK.mjs";import{a as s}from"./chunk-COXGLRHQ.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-VIVOTJDI.mjs.map
1
+ import{a as i}from"./chunk-PO3ODHJ7.mjs";import{a}from"./chunk-OF3XH6ZU.mjs";import{a as u}from"./chunk-2HKAVY3C.mjs";import{c as n}from"./chunk-2SVWHJC4.mjs";import{a as s}from"./chunk-KX5J6EMC.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-27OTZWDO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-DNPGXK4T.mjs";import{a as k}from"./chunk-W446N53W.mjs";import{q as f}from"./chunk-EMEEMCT2.mjs";import{d as b}from"./chunk-UERJ6AKK.mjs";import{c as n}from"./chunk-ARSG3XHK.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-HDXMYXAN.mjs.map
1
+ import{a as g}from"./chunk-QQEQNSRI.mjs";import{a as k}from"./chunk-J64N3RXX.mjs";import{q as f}from"./chunk-LPGMDX6Q.mjs";import{d as b}from"./chunk-UERJ6AKK.mjs";import{c as n}from"./chunk-2SVWHJC4.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-2DUVXRMU.mjs.map
@@ -1,2 +1,2 @@
1
- import{j as p,q as e}from"./chunk-EMEEMCT2.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
2
- //# sourceMappingURL=chunk-XESXJCCF.mjs.map
1
+ import{j as p,q as e}from"./chunk-LPGMDX6Q.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
2
+ //# sourceMappingURL=chunk-2HKAVY3C.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-LHKQURVT.mjs";import{a as s}from"./chunk-ERKG75NR.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-X5APGIEK.mjs";import{b as A}from"./chunk-A3ZOFLAI.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-EMEEMCT2.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-PLUWBWJ2.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
- //# sourceMappingURL=chunk-5J65NBYA.mjs.map
1
+ import{a as h}from"./chunk-OP2PPPAN.mjs";import{a as s}from"./chunk-4XIT3N7Y.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-TMOMM4JN.mjs";import{b as A}from"./chunk-NZWPA245.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-LPGMDX6Q.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-PLUWBWJ2.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
+ //# sourceMappingURL=chunk-2L25IGHZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-COXGLRHQ.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-ARSG3XHK.mjs.map
1
+ import{a as e}from"./chunk-KX5J6EMC.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-2SVWHJC4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-NNLNKPWT.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as f}from"./chunk-I4CVTZ26.mjs";import{h as u}from"./chunk-CAA4VJRH.mjs";import{b as S}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-2DT3JTAQ.mjs";import{a as g}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-QVRCGDF7.mjs";import{s as m}from"./chunk-EMEEMCT2.mjs";import{b as T}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{S({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!I(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(e=>({...e,status:e.status??"pending"})),o=g(n),s=y({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:o??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return s;let i=A(a);return f({toastId:s,totalDuration:i}),s};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=T(m());return await Promise.all(a.map(async s=>{let i=await w.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}),e=i.data.txHash;return{...s.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=h(),{apiAddress:n,apiTimeout:o}=T(m());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let s=this.buildBatchId(t),e={transactions:a.map(p=>p.map(c=>c.toPlainObject())),id:s},{data:l}=await w.post(`${n}/batch`,e,{timeout:Number(o)}),B=l.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...l,transactions:B}}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
- //# sourceMappingURL=chunk-CE7HOUHL.mjs.map
1
+ import{a as A}from"./chunk-TMMUB3IK.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as f}from"./chunk-LY3MRREN.mjs";import{h as u}from"./chunk-CAA4VJRH.mjs";import{b as S}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-RNSBN5JT.mjs";import{a as g}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-5JYD7XMI.mjs";import{s as m}from"./chunk-LPGMDX6Q.mjs";import{b as T}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{S({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!I(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(e=>({...e,status:e.status??"pending"})),o=g(n),s=y({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:o??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return s;let i=A(a);return f({toastId:s,totalDuration:i}),s};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=T(m());return await Promise.all(a.map(async s=>{let i=await w.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}),e=i.data.txHash;return{...s.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=h(),{apiAddress:n,apiTimeout:o}=T(m());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let s=this.buildBatchId(t),e={transactions:a.map(p=>p.map(c=>c.toPlainObject())),id:s},{data:l}=await w.post(`${n}/batch`,e,{timeout:Number(o)}),B=l.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...l,transactions:B}}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
+ //# sourceMappingURL=chunk-3CKDOF3O.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-LPGMDX6Q.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-3NQTC6AZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-RJJC6N2Y.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-DNFWIYZH.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
- //# sourceMappingURL=chunk-NE26WBXK.mjs.map
1
+ import{a as k}from"./chunk-IZ4B4B35.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-DNFWIYZH.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
+ //# sourceMappingURL=chunk-4AUL3FHT.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-PAAJPYAE.mjs";import{c as n}from"./chunk-LPGMDX6Q.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
2
+ //# sourceMappingURL=chunk-4EMQSUU6.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-KE56KOKW.mjs";import{a as m}from"./chunk-NZYB675D.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-ERKG75NR.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-LTRQRVWX.mjs";import{a as m}from"./chunk-NZYB675D.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-4XIT3N7Y.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-COXGLRHQ.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
2
- //# sourceMappingURL=chunk-VMGQKRG7.mjs.map
1
+ import{a as o}from"./chunk-KX5J6EMC.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
2
+ //# sourceMappingURL=chunk-54XYKDH7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-COXGLRHQ.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
- //# sourceMappingURL=chunk-RP4AE3QR.mjs.map
1
+ import{a as e}from"./chunk-KX5J6EMC.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
+ //# sourceMappingURL=chunk-5AZZG5KG.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-LPGMDX6Q.mjs";import{a as t}from"./chunk-UERJ6AKK.mjs";function n(r=o()){return t(r)}export{n as a};
2
+ //# sourceMappingURL=chunk-5JYD7XMI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-VMAGG3NR.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-KLLIQMQO.mjs.map
1
+ import{a as r}from"./chunk-ARAO6B2F.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-6BF62TP4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-COXGLRHQ.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-CSN46RUW.mjs.map
1
+ import{a as t}from"./chunk-KX5J6EMC.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-6PDGQGIS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-UTQEMLG5.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-KPW6VTHT.mjs.map
1
+ import{a as s}from"./chunk-XUADWD55.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-72D44IHE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-UTQEMLG5.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-SMGE6R45.mjs.map
1
+ import{a as t}from"./chunk-XUADWD55.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-7ONKP4ZG.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-5J65NBYA.mjs";import{a as U}from"./chunk-LHKQURVT.mjs";import{a as ie}from"./chunk-DRKUYUHQ.mjs";import{a as re}from"./chunk-NBBR2XGD.mjs";import{a as I}from"./chunk-WEP6YL4P.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-LJIXYBGR.mjs";import{a as p}from"./chunk-STL2SPYK.mjs";import{a as Z}from"./chunk-ZMEDSH63.mjs";import{a as ne}from"./chunk-HLX4P4C4.mjs";import{a as oe}from"./chunk-R7VBD5LY.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-I4CVTZ26.mjs";import{a as y}from"./chunk-ECLO2FEO.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-Z77MATGU.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-XESXJCCF.mjs";import{a as F,q as j,s as l}from"./chunk-EMEEMCT2.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-Q6JFJI2W.mjs.map
1
+ import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as se}from"./chunk-AQ6D3F5K.mjs";import{a as te}from"./chunk-2L25IGHZ.mjs";import{a as U}from"./chunk-OP2PPPAN.mjs";import{a as ie}from"./chunk-VRG2R5C7.mjs";import{a as re}from"./chunk-WJI5FXSZ.mjs";import{a as I}from"./chunk-SGQJOLH2.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-DCX2NQAU.mjs";import{a as p}from"./chunk-Y7QM3LPW.mjs";import{a as Z}from"./chunk-RJOP7SCI.mjs";import{a as ne}from"./chunk-O24MRZB2.mjs";import{a as oe}from"./chunk-KP4MUQKU.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-LY3MRREN.mjs";import{a as y}from"./chunk-E5CUE265.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-OF3XH6ZU.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-2HKAVY3C.mjs";import{a as F,q as j,s as l}from"./chunk-LPGMDX6Q.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=de.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 ae;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 se(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-7VNNDJ7P.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-QJGFIK7H.mjs";import{a as r}from"./chunk-PLUWBWJ2.mjs";var a=n=>(Object.values(r).forEach(o=>{if(o!==n?.skipLoginMethod)switch(o){case r.crossWindow:{let e=i.getInstance();e.isInitialized()&&e.onDestroy();break}default:break}}),null);export{a};
2
+ //# sourceMappingURL=chunk-AQ6D3F5K.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/helpers/clearInitiatedLogins.ts"],
4
+ "sourcesContent": ["import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider';\nimport { ProviderTypeEnum, ProviderType } from '../types/providerFactory.types';\n\nexport const clearInitiatedLogins = (\n props?: {\n skipLoginMethod: ProviderType;\n } | null\n) => {\n Object.values(ProviderTypeEnum).forEach((method) => {\n if (method === props?.skipLoginMethod) {\n return;\n }\n\n switch (method) {\n case ProviderTypeEnum.crossWindow: {\n const crossWindowProvider = CrossWindowProvider.getInstance();\n if (crossWindowProvider.isInitialized()) {\n // Clean up the crossWindowProvider state without triggering a full logout.\n crossWindowProvider.onDestroy();\n }\n break;\n }\n\n default:\n break;\n }\n });\n\n return null;\n};\n"],
5
+ "mappings": "kFAGO,IAAMA,EACXC,IAIA,OAAO,OAAOC,CAAgB,EAAE,QAASC,GAAW,CAClD,GAAIA,IAAWF,GAAO,gBAItB,OAAQE,EAAQ,CACd,KAAKD,EAAiB,YAAa,CACjC,IAAME,EAAsBC,EAAoB,YAAY,EACxDD,EAAoB,cAAc,GAEpCA,EAAoB,UAAU,EAEhC,KACF,CAEA,QACE,KACJ,CACF,CAAC,EAEM",
6
+ "names": ["clearInitiatedLogins", "props", "ProviderTypeEnum", "method", "crossWindowProvider", "CrossWindowProvider"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-CGJKZTBA.mjs";import{a as g}from"./chunk-3S57OP4Z.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
2
- //# sourceMappingURL=chunk-VMAGG3NR.mjs.map
1
+ import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-BGUYSNNW.mjs";import{a as g}from"./chunk-3S57OP4Z.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
2
+ //# sourceMappingURL=chunk-ARAO6B2F.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-MHUBH54G.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
- //# sourceMappingURL=chunk-EJICHLEZ.mjs.map
1
+ import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-JV7AJLRI.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
+ //# sourceMappingURL=chunk-AXCK3KRV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-WQVNPEBR.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-CGJKZTBA.mjs.map
1
+ import{a}from"./chunk-IWROXIQ5.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-BGUYSNNW.mjs.map
@@ -1,2 +1,2 @@
1
1
  var a=(t=>(t.success="Transaction successful",t.received="Transaction received",t.failed="Transaction failed",t.pending="Processing transaction",t.timedOut="Transaction timed out",t.invalid="Transaction invalid",t))(a||{}),r=(t=>(t.OPEN_NOTIFICATIONS_FEED="OPEN_NOTIFICATIONS_FEED",t.CLOSE="CLOSE_TOAST",t.TRANSACTION_TOAST_DATA_UPDATE="TRANSACTION_TOAST_DATA_UPDATE",t.CUSTOM_TOAST_DATA_UPDATE="CUSTOM_TOAST_DATA_UPDATE",t.HIDE="HIDE_TOAST_LIST",t.SHOW="SHOW_TOAST_LIST",t))(r||{});export{a,r as b};
2
- //# sourceMappingURL=chunk-IMPOALRX.mjs.map
2
+ //# sourceMappingURL=chunk-BIVZJPSH.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/managers/internal/ToastManager/types/toast.types.ts"],
4
- "sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\n\nexport enum TransactionsDefaultTitles {\n success = 'Transaction successful',\n received = 'Transaction received',\n failed = 'Transaction failed',\n pending = 'Processing transaction',\n timedOut = 'Transaction timed out',\n invalid = 'Transaction invalid'\n}\n\nexport interface GetToastsOptionsDataPropsType {\n address: string;\n sender: string;\n status?: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n toastId: string;\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n}\n\nexport interface IToastDataState {\n id: string;\n icon: string;\n hasCloseButton: boolean;\n title: string;\n iconClassName: string;\n}\nexport interface ITransactionProgressState {\n startTime: number;\n endTime: number;\n}\nexport interface ITransaction {\n hash: string;\n status: string;\n link: string;\n}\nexport interface ITransactionToast {\n toastId: string;\n processedTransactionsStatus: string;\n transactions: ITransactionListItem[];\n toastDataState: IToastDataState;\n transactionProgressState?: ITransactionProgressState | null;\n}\n\nexport enum ToastEventsEnum {\n OPEN_NOTIFICATIONS_FEED = 'OPEN_NOTIFICATIONS_FEED',\n CLOSE = 'CLOSE_TOAST',\n // Event to update the transaction toast data\n TRANSACTION_TOAST_DATA_UPDATE = 'TRANSACTION_TOAST_DATA_UPDATE',\n // Event to update the custom toast data\n CUSTOM_TOAST_DATA_UPDATE = 'CUSTOM_TOAST_DATA_UPDATE',\n HIDE = 'HIDE_TOAST_LIST',\n SHOW = 'SHOW_TOAST_LIST'\n}\n"],
5
- "mappings": "AAOO,IAAKA,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,uBACXA,EAAA,OAAS,qBACTA,EAAA,QAAU,yBACVA,EAAA,SAAW,wBACXA,EAAA,QAAU,sBANAA,OAAA,IAyCAC,OACVA,EAAA,wBAA0B,0BAC1BA,EAAA,MAAQ,cAERA,EAAA,8BAAgC,gCAEhCA,EAAA,yBAA2B,2BAC3BA,EAAA,KAAO,kBACPA,EAAA,KAAO,kBARGA,OAAA",
4
+ "sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\n\nexport enum TransactionsDefaultTitles {\n success = 'Transaction successful',\n received = 'Transaction received',\n failed = 'Transaction failed',\n pending = 'Processing transaction',\n timedOut = 'Transaction timed out',\n invalid = 'Transaction invalid'\n}\n\nexport interface GetToastsOptionsDataPropsType {\n address: string;\n sender: string;\n status?: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n toastId: string;\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n txActionName?: string;\n}\n\nexport interface IToastDataState {\n id: string;\n icon: string;\n hasCloseButton: boolean;\n title: string;\n iconClassName: string;\n}\nexport interface ITransactionProgressState {\n startTime: number;\n endTime: number;\n}\nexport interface ITransaction {\n hash: string;\n status: string;\n link: string;\n}\nexport interface ITransactionToast {\n toastId: string;\n processedTransactionsStatus: string;\n transactions: ITransactionListItem[];\n toastDataState: IToastDataState;\n transactionProgressState?: ITransactionProgressState | null;\n}\n\nexport enum ToastEventsEnum {\n OPEN_NOTIFICATIONS_FEED = 'OPEN_NOTIFICATIONS_FEED',\n CLOSE = 'CLOSE_TOAST',\n // Event to update the transaction toast data\n TRANSACTION_TOAST_DATA_UPDATE = 'TRANSACTION_TOAST_DATA_UPDATE',\n // Event to update the custom toast data\n CUSTOM_TOAST_DATA_UPDATE = 'CUSTOM_TOAST_DATA_UPDATE',\n HIDE = 'HIDE_TOAST_LIST',\n SHOW = 'SHOW_TOAST_LIST'\n}\n"],
5
+ "mappings": "AAOO,IAAKA,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,uBACXA,EAAA,OAAS,qBACTA,EAAA,QAAU,yBACVA,EAAA,SAAW,wBACXA,EAAA,QAAU,sBANAA,OAAA,IA0CAC,OACVA,EAAA,wBAA0B,0BAC1BA,EAAA,MAAQ,cAERA,EAAA,8BAAgC,gCAEhCA,EAAA,yBAA2B,2BAC3BA,EAAA,KAAO,kBACPA,EAAA,KAAO,kBARGA,OAAA",
6
6
  "names": ["TransactionsDefaultTitles", "ToastEventsEnum"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-WBOZI3GT.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-TPVEFH7Q.mjs.map
1
+ import{a as e}from"./chunk-GSRRAPL5.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-BQP6NPQM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-TPVEFH7Q.mjs";import{b as r}from"./chunk-RJVEJVHX.mjs";import{s as i}from"./chunk-EMEEMCT2.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-KQPYTMH7.mjs.map
1
+ import{a as n}from"./chunk-BQP6NPQM.mjs";import{b as r}from"./chunk-LQ6WESDL.mjs";import{s as i}from"./chunk-LPGMDX6Q.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-CAAMS3C5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-EMEEMCT2.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
- //# sourceMappingURL=chunk-KSF6BZCK.mjs.map
1
+ import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-LPGMDX6Q.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
+ //# sourceMappingURL=chunk-CYEMHPEX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-STL2SPYK.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{a as e,b as t}from"./chunk-COXGLRHQ.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-LJIXYBGR.mjs.map
1
+ import{a as s}from"./chunk-Y7QM3LPW.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{a as e,b as t}from"./chunk-KX5J6EMC.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-DCX2NQAU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-COXGLRHQ.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-HGJYBXPW.mjs.map
1
+ import{a as e}from"./chunk-KX5J6EMC.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-DG77T3NS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-QVRCGDF7.mjs";import{a as f}from"./chunk-VMAGG3NR.mjs";import{a as g}from"./chunk-WQVNPEBR.mjs";import{b as a}from"./chunk-EMEEMCT2.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
- //# sourceMappingURL=chunk-DB3IGD5A.mjs.map
1
+ import{a as u}from"./chunk-5JYD7XMI.mjs";import{a as f}from"./chunk-ARAO6B2F.mjs";import{a as g}from"./chunk-IWROXIQ5.mjs";import{b as a}from"./chunk-LPGMDX6Q.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
+ //# sourceMappingURL=chunk-DJ2HTZOV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-SXR4CTVB.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
- //# sourceMappingURL=chunk-ECLO2FEO.mjs.map
1
+ import{a as e}from"./chunk-FFHHIKMI.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
+ //# sourceMappingURL=chunk-E5CUE265.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-CSN46RUW.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
- //# sourceMappingURL=chunk-SXR4CTVB.mjs.map
1
+ import{a as s}from"./chunk-6PDGQGIS.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
+ //# sourceMappingURL=chunk-FFHHIKMI.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-VDMJZZU4.mjs";import{b as r}from"./chunk-PLTUKRYU.mjs";import{j as n}from"./chunk-65L5EBBL.mjs";var y=({toastId:a,address:e,status:s,transactions:t,transactionsDisplayInfo:i,startTime:c,endTime:T})=>{let m=n(s),p=t[0]?.action?.name,f=r({address:e,sender:t[0]?.interactor??"",toastId:a,status:s,transactionsDisplayInfo:i,txActionName:p}),u=o(t);return{toastDataState:f,processedTransactionsStatus:u,transactionProgressState:m?{endTime:T,startTime:c}:null,toastId:a,transactions:t}};export{y as a};
2
+ //# sourceMappingURL=chunk-FVFVOSQ4.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/managers/internal/ToastManager/helpers/createTransactionToast.ts"],
4
- "sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\nimport { getToastDataStateByStatus } from './getToastDataStateByStatus';\nimport { getToastTransactionsStatus } from './getToastTransactionsStatus';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateTransactionToastParamsType {\n toastId: string;\n address: string;\n status: TransactionServerStatusesEnum;\n transactions: ITransactionListItem[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n explorerAddress: string;\n startTime: number;\n endTime: number;\n}\n\nexport const createTransactionToast = ({\n toastId,\n address,\n status,\n transactions,\n transactionsDisplayInfo,\n startTime,\n endTime\n}: CreateTransactionToastParamsType): ITransactionToast => {\n const isPending = getIsTransactionPending(status);\n\n const toastDataState = getToastDataStateByStatus({\n address,\n sender: transactions[0]?.interactor ?? '',\n toastId,\n status,\n transactionsDisplayInfo\n });\n\n const processedTransactionsStatus = getToastTransactionsStatus(transactions);\n\n const transactionProgressState = isPending\n ? {\n endTime,\n startTime\n }\n : null;\n\n return {\n toastDataState,\n processedTransactionsStatus,\n transactionProgressState,\n toastId,\n transactions\n };\n};\n"],
5
- "mappings": "2HAkBO,IAAMA,EAAyB,CAAC,CACrC,QAAAC,EACA,QAAAC,EACA,OAAAC,EACA,aAAAC,EACA,wBAAAC,EACA,UAAAC,EACA,QAAAC,CACF,IAA2D,CACzD,IAAMC,EAAYC,EAAwBN,CAAM,EAE1CO,EAAiBC,EAA0B,CAC/C,QAAAT,EACA,OAAQE,EAAa,CAAC,GAAG,YAAc,GACvC,QAAAH,EACA,OAAAE,EACA,wBAAAE,CACF,CAAC,EAEKO,EAA8BC,EAA2BT,CAAY,EAS3E,MAAO,CACL,eAAAM,EACA,4BAAAE,EACA,yBAV+BJ,EAC7B,CACE,QAAAD,EACA,UAAAD,CACF,EACA,KAMF,QAAAL,EACA,aAAAG,CACF,CACF",
6
- "names": ["createTransactionToast", "toastId", "address", "status", "transactions", "transactionsDisplayInfo", "startTime", "endTime", "isPending", "getIsTransactionPending", "toastDataState", "getToastDataStateByStatus", "processedTransactionsStatus", "getToastTransactionsStatus"]
4
+ "sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\nimport { getToastDataStateByStatus } from './getToastDataStateByStatus';\nimport { getToastTransactionsStatus } from './getToastTransactionsStatus';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateTransactionToastParamsType {\n toastId: string;\n address: string;\n status: TransactionServerStatusesEnum;\n transactions: ITransactionListItem[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n explorerAddress: string;\n startTime: number;\n endTime: number;\n}\n\nexport const createTransactionToast = ({\n toastId,\n address,\n status,\n transactions,\n transactionsDisplayInfo,\n startTime,\n endTime\n}: CreateTransactionToastParamsType): ITransactionToast => {\n const isPending = getIsTransactionPending(status);\n // Extracts action name from the first transaction\n const txActionName = transactions[0]?.action?.name;\n\n const toastDataState = getToastDataStateByStatus({\n address,\n sender: transactions[0]?.interactor ?? '',\n toastId,\n status,\n transactionsDisplayInfo,\n txActionName\n });\n\n const processedTransactionsStatus = getToastTransactionsStatus(transactions);\n\n const transactionProgressState = isPending\n ? {\n endTime,\n startTime\n }\n : null;\n\n return {\n toastDataState,\n processedTransactionsStatus,\n transactionProgressState,\n toastId,\n transactions\n };\n};\n"],
5
+ "mappings": "2HAkBO,IAAMA,EAAyB,CAAC,CACrC,QAAAC,EACA,QAAAC,EACA,OAAAC,EACA,aAAAC,EACA,wBAAAC,EACA,UAAAC,EACA,QAAAC,CACF,IAA2D,CACzD,IAAMC,EAAYC,EAAwBN,CAAM,EAE1CO,EAAeN,EAAa,CAAC,GAAG,QAAQ,KAExCO,EAAiBC,EAA0B,CAC/C,QAAAV,EACA,OAAQE,EAAa,CAAC,GAAG,YAAc,GACvC,QAAAH,EACA,OAAAE,EACA,wBAAAE,EACA,aAAAK,CACF,CAAC,EAEKG,EAA8BC,EAA2BV,CAAY,EAS3E,MAAO,CACL,eAAAO,EACA,4BAAAE,EACA,yBAV+BL,EAC7B,CACE,QAAAD,EACA,UAAAD,CACF,EACA,KAMF,QAAAL,EACA,aAAAG,CACF,CACF",
6
+ "names": ["createTransactionToast", "toastId", "address", "status", "transactions", "transactionsDisplayInfo", "startTime", "endTime", "isPending", "getIsTransactionPending", "txActionName", "toastDataState", "getToastDataStateByStatus", "processedTransactionsStatus", "getToastTransactionsStatus"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{s as r}from"./chunk-EMEEMCT2.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
- //# sourceMappingURL=chunk-WBOZI3GT.mjs.map
1
+ import{s as r}from"./chunk-LPGMDX6Q.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
+ //# sourceMappingURL=chunk-GSRRAPL5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-COXGLRHQ.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
2
- //# sourceMappingURL=chunk-R3A4BWLM.mjs.map
1
+ import{a as t}from"./chunk-KX5J6EMC.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
2
+ //# sourceMappingURL=chunk-H4DISFAI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-EMEEMCT2.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
2
- //# sourceMappingURL=chunk-6STWYHWF.mjs.map
1
+ import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-LPGMDX6Q.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
2
+ //# sourceMappingURL=chunk-HOJ7JMTW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-HGJYBXPW.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
2
- //# sourceMappingURL=chunk-LV6C2ZIZ.mjs.map
1
+ import{a as e}from"./chunk-DG77T3NS.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
2
+ //# sourceMappingURL=chunk-I4HR64FU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-EMEEMCT2.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-PKWIVZGN.mjs.map
1
+ import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-LPGMDX6Q.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-I6WJ63GD.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-I4CVTZ26.mjs";import{q as u}from"./chunk-EMEEMCT2.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-COXGLRHQ.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-SDF2UGGL.mjs.map
1
+ import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-LY3MRREN.mjs";import{q as u}from"./chunk-LPGMDX6Q.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-KX5J6EMC.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-IR743HKQ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as n}from"./chunk-LPGMDX6Q.mjs";import{b as t}from"./chunk-UTWIKUIK.mjs";var c=a=>t(`transaction-${a}`)(n().getState())??null;export{c as a};
2
+ //# sourceMappingURL=chunk-IRBGQJE4.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as e}from"./chunk-EMEEMCT2.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
- //# sourceMappingURL=chunk-WQVNPEBR.mjs.map
1
+ import{s as e}from"./chunk-LPGMDX6Q.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
+ //# sourceMappingURL=chunk-IWROXIQ5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-PKWIVZGN.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-RJJC6N2Y.mjs.map
1
+ import{a as l}from"./chunk-I6WJ63GD.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-IZ4B4B35.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-S53SAYHR.mjs";import{b as s}from"./chunk-TQA3JDNV.mjs";import{s as n}from"./chunk-LPGMDX6Q.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-J64N3RXX.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-KX5J6EMC.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-JN5CTLWW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-7BD7CF6T.mjs";import{a as p}from"./chunk-HU7G374W.mjs";import{a as d}from"./chunk-273ASRFM.mjs";import{a as T}from"./chunk-3L7HZ2SO.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-MHUBH54G.mjs.map
1
+ import{a as h}from"./chunk-N6QD4PLA.mjs";import{a as p}from"./chunk-PHMJQ5FC.mjs";import{a as d}from"./chunk-IRBGQJE4.mjs";import{a as T}from"./chunk-3L7HZ2SO.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-JV7AJLRI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-Z77MATGU.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-P7HXQCT3.mjs.map
1
+ import{a as o}from"./chunk-OF3XH6ZU.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-KAQ5IXKK.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as e}from"./chunk-LPGMDX6Q.mjs";var o=t=>e().setState(({ui:n})=>{n.isSidePanelOpen=t},!1,"setIsSidePanelOpen");export{o as a};
2
+ //# sourceMappingURL=chunk-KK25BEMY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-QVRCGDF7.mjs";import{s as e}from"./chunk-EMEEMCT2.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
- //# sourceMappingURL=chunk-R7VBD5LY.mjs.map
1
+ import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-5JYD7XMI.mjs";import{s as e}from"./chunk-LPGMDX6Q.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
+ //# sourceMappingURL=chunk-KP4MUQKU.mjs.map
@@ -0,0 +1,2 @@
1
+ var o=typeof window<"u"?window:{},n="5.1.2";export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-KX5J6EMC.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/window.constants.ts"],
4
- "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.1.2-alpha.0'; // will be replaced at build time\n"],
4
+ "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.1.2'; // will be replaced at build time\n"],
5
5
  "mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
6
6
  "names": ["safeWindow", "version"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-HOJ7JMTW.mjs";import{d as m,e as l}from"./chunk-NZWPA245.mjs";import{q as a}from"./chunk-LPGMDX6Q.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
2
+ //# sourceMappingURL=chunk-KXUILKL2.mjs.map