@multiversx/sdk-dapp 5.0.0-alpha.10 → 5.0.0-alpha.11

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 (498) hide show
  1. package/out/__chunks__/{chunk-QAVA2C6Y.mjs → chunk-2AB2KTYM.mjs} +2 -2
  2. package/out/__chunks__/{chunk-66JBXP4O.mjs → chunk-2I7FJNXZ.mjs} +2 -2
  3. package/out/__chunks__/{chunk-HEKAFHIA.mjs → chunk-2X62ALFS.mjs} +2 -2
  4. package/out/__chunks__/chunk-2ZNQYHNX.mjs +2 -0
  5. package/out/__chunks__/{chunk-IWB45745.mjs → chunk-3BXYTP4Q.mjs} +2 -2
  6. package/out/__chunks__/{chunk-XLHFU7XR.mjs → chunk-3EI6B7OU.mjs} +2 -2
  7. package/out/__chunks__/chunk-3GXUTDCB.mjs +2 -0
  8. package/out/__chunks__/{chunk-YEXBSKXL.mjs → chunk-3LBQYLDY.mjs} +2 -2
  9. package/out/__chunks__/{chunk-B2RDSGON.mjs → chunk-3OKWBJFM.mjs} +2 -2
  10. package/out/__chunks__/{chunk-IEJARRBP.mjs → chunk-3U6H4VPO.mjs} +2 -2
  11. package/out/__chunks__/chunk-3YK6SW7E.mjs +2 -0
  12. package/out/__chunks__/chunk-3ZEUVYQF.mjs +2 -0
  13. package/out/__chunks__/chunk-3ZEUVYQF.mjs.map +7 -0
  14. package/out/__chunks__/chunk-3ZHPM667.mjs +2 -0
  15. package/out/__chunks__/chunk-3ZHPM667.mjs.map +7 -0
  16. package/out/__chunks__/{chunk-INBKWOKQ.mjs → chunk-4RGFBPII.mjs} +2 -2
  17. package/out/__chunks__/{chunk-ZEIGMAXW.mjs → chunk-4RJ23OT7.mjs} +2 -2
  18. package/out/__chunks__/chunk-535PAVZN.mjs +2 -0
  19. package/out/__chunks__/chunk-5OQ6KHGF.mjs +2 -0
  20. package/out/__chunks__/chunk-62PJZCUP.mjs +2 -0
  21. package/out/__chunks__/{chunk-DEMKQ3CQ.mjs → chunk-6LY7ZRDT.mjs} +2 -2
  22. package/out/__chunks__/chunk-7B2IRMVK.mjs +2 -0
  23. package/out/__chunks__/{chunk-VCGAO6HH.mjs → chunk-7D2BEFUJ.mjs} +2 -2
  24. package/out/__chunks__/{chunk-PRULMJH7.mjs → chunk-AAMNTAXA.mjs} +2 -2
  25. package/out/__chunks__/{chunk-RHFDU5Y4.mjs → chunk-ABHYXD3U.mjs} +2 -2
  26. package/out/__chunks__/chunk-AFEGGHNM.mjs +2 -0
  27. package/out/__chunks__/{chunk-CEDRWVRS.mjs → chunk-AHHTRI3Y.mjs} +2 -2
  28. package/out/__chunks__/chunk-ASRYY6T3.mjs +2 -0
  29. package/out/__chunks__/chunk-AV6BSOLO.mjs +2 -0
  30. package/out/__chunks__/{chunk-S5FDHOXH.mjs → chunk-B5AW5LX5.mjs} +2 -2
  31. package/out/__chunks__/chunk-BMXLSDJM.mjs +2 -0
  32. package/out/__chunks__/{chunk-KPDCSGZD.mjs → chunk-BNWGWGXY.mjs} +2 -2
  33. package/out/__chunks__/{chunk-IOE5AG2R.mjs → chunk-C37IYZAK.mjs} +2 -2
  34. package/out/__chunks__/chunk-C6JD2OFD.mjs +2 -0
  35. package/out/__chunks__/chunk-C6JD2OFD.mjs.map +7 -0
  36. package/out/__chunks__/chunk-CAA4VJRH.mjs +2 -0
  37. package/out/__chunks__/{chunk-QD3CFFVT.mjs.map → chunk-CAA4VJRH.mjs.map} +3 -3
  38. package/out/__chunks__/chunk-DICSPHT2.mjs +2 -0
  39. package/out/__chunks__/{chunk-MQ5V5AJU.mjs → chunk-DKE2ONRB.mjs} +2 -2
  40. package/out/__chunks__/{chunk-TMP3REGQ.mjs → chunk-DPSC4NIK.mjs} +2 -2
  41. package/out/__chunks__/{chunk-SH5S4RA4.mjs → chunk-DVY6YKH6.mjs} +2 -2
  42. package/out/__chunks__/chunk-EQMLAAI2.mjs +2 -0
  43. package/out/__chunks__/chunk-EQMLAAI2.mjs.map +7 -0
  44. package/out/__chunks__/chunk-ESLVKRXK.mjs +2 -0
  45. package/out/__chunks__/{chunk-J3YO25EK.mjs → chunk-EUVZQRU5.mjs} +2 -2
  46. package/out/__chunks__/{chunk-QKHHW26T.mjs → chunk-FELZAGW5.mjs} +2 -2
  47. package/out/__chunks__/{chunk-A5EXECZV.mjs → chunk-FIVH6RKU.mjs} +2 -2
  48. package/out/__chunks__/{chunk-CCDTUFFG.mjs → chunk-FIXSEPFX.mjs} +2 -2
  49. package/out/__chunks__/chunk-FMQYLMTU.mjs +2 -0
  50. package/out/__chunks__/chunk-FMQYLMTU.mjs.map +7 -0
  51. package/out/__chunks__/{chunk-QP2EL7IE.mjs → chunk-FS2F24A7.mjs} +2 -2
  52. package/out/__chunks__/{chunk-ZK5BKLTG.mjs → chunk-HCDOXUDA.mjs} +2 -2
  53. package/out/__chunks__/{chunk-2FD2AMKA.mjs → chunk-HN244QVP.mjs} +2 -2
  54. package/out/__chunks__/{chunk-7WTWD4TL.mjs → chunk-HTVULYKB.mjs} +2 -2
  55. package/out/__chunks__/{chunk-ZU4LTEAC.mjs → chunk-IAK3KHJ7.mjs} +2 -2
  56. package/out/__chunks__/chunk-J75OEBAP.mjs +2 -0
  57. package/out/__chunks__/chunk-JAUTVROS.mjs +2 -0
  58. package/out/__chunks__/chunk-JAUTVROS.mjs.map +7 -0
  59. package/out/__chunks__/{chunk-DOUNJCQ4.mjs → chunk-JOB7ALAF.mjs} +2 -2
  60. package/out/__chunks__/chunk-JR23TXKP.mjs +2 -0
  61. package/out/__chunks__/chunk-JR23TXKP.mjs.map +7 -0
  62. package/out/__chunks__/{chunk-72PZKSKF.mjs → chunk-KEAFX54V.mjs} +2 -2
  63. package/out/__chunks__/{chunk-EOX35D4L.mjs → chunk-LIPGE2RA.mjs} +2 -2
  64. package/out/__chunks__/{chunk-7LUZJPO5.mjs → chunk-LKXBH3I3.mjs} +2 -2
  65. package/out/__chunks__/{chunk-YPCJBYUY.mjs → chunk-LUDF7ZUR.mjs} +2 -2
  66. package/out/__chunks__/{chunk-EDSX3LFL.mjs → chunk-LYTZPES3.mjs} +2 -2
  67. package/out/__chunks__/{chunk-LM5SF2NG.mjs → chunk-MJEZGI7G.mjs} +2 -2
  68. package/out/__chunks__/{chunk-445MWKMT.mjs → chunk-MRJ7P7KU.mjs} +2 -2
  69. package/out/__chunks__/{chunk-NBDECUQ3.mjs → chunk-N6SD2OVU.mjs} +2 -2
  70. package/out/__chunks__/{chunk-SYQ7SILM.mjs → chunk-NKJ7OVPV.mjs} +2 -2
  71. package/out/__chunks__/{chunk-5W4JJSFM.mjs → chunk-NXV7YLV6.mjs} +2 -2
  72. package/out/__chunks__/chunk-O2SZII5H.mjs +2 -0
  73. package/out/__chunks__/chunk-OEYIF65Y.mjs +2 -0
  74. package/out/__chunks__/chunk-OEYIF65Y.mjs.map +7 -0
  75. package/out/__chunks__/{chunk-NHXPNROG.mjs → chunk-OJV6XRG5.mjs} +1 -1
  76. package/out/__chunks__/{chunk-NHXPNROG.mjs.map → chunk-OJV6XRG5.mjs.map} +1 -1
  77. package/out/__chunks__/{chunk-45WVS4H5.mjs → chunk-ORHJGVU5.mjs} +2 -2
  78. package/out/__chunks__/{chunk-4OEPT2V4.mjs → chunk-P3BXXGQA.mjs} +2 -2
  79. package/out/__chunks__/{chunk-K3WBBSXJ.mjs → chunk-PCY7ULK2.mjs} +2 -2
  80. package/out/__chunks__/chunk-Q7L5T72K.mjs +2 -0
  81. package/out/__chunks__/{chunk-YN5ARP6C.mjs → chunk-QWIXKUDO.mjs} +2 -2
  82. package/out/__chunks__/{chunk-JQEKTKZR.mjs → chunk-QWNJJXNH.mjs} +2 -2
  83. package/out/__chunks__/{chunk-TR6FQZGE.mjs → chunk-RA4VU3NM.mjs} +2 -2
  84. package/out/__chunks__/{chunk-I7ODJJY3.mjs → chunk-REI3WYXH.mjs} +2 -2
  85. package/out/__chunks__/{chunk-CNWR7SER.mjs → chunk-RIFXW4D3.mjs} +2 -2
  86. package/out/__chunks__/{chunk-YQ3LRPGM.mjs → chunk-S75GQPJQ.mjs} +2 -2
  87. package/out/__chunks__/{chunk-BVYTCDU6.mjs → chunk-SHDTJ5GB.mjs} +2 -2
  88. package/out/__chunks__/{chunk-FUYWIC54.mjs → chunk-SNBLSIKQ.mjs} +2 -2
  89. package/out/__chunks__/{chunk-JSUJOYYB.mjs → chunk-TAQN5HUK.mjs} +2 -2
  90. package/out/__chunks__/chunk-U6KSTPE7.mjs +2 -0
  91. package/out/__chunks__/{chunk-KRBUXJ6B.mjs.map → chunk-U6KSTPE7.mjs.map} +1 -1
  92. package/out/__chunks__/chunk-UAW7SD6P.mjs +2 -0
  93. package/out/__chunks__/chunk-WHEXX3BD.mjs +1 -0
  94. package/out/__chunks__/{chunk-C5TNEYN6.mjs → chunk-WMY46KJS.mjs} +2 -2
  95. package/out/__chunks__/{chunk-7ECP7Y7M.mjs → chunk-X4ZYTNNA.mjs} +2 -2
  96. package/out/__chunks__/{chunk-XOJHIJKX.mjs → chunk-XGV7BGBC.mjs} +2 -2
  97. package/out/__chunks__/{chunk-LOEJYVD2.mjs → chunk-XOWM53LI.mjs} +2 -2
  98. package/out/__chunks__/chunk-XXKSDA5P.mjs +2 -0
  99. package/out/__chunks__/{chunk-QATM2UUN.mjs → chunk-XZVYUFVM.mjs} +2 -2
  100. package/out/__chunks__/{chunk-QM67ZEC5.mjs → chunk-Y53MWKLT.mjs} +2 -2
  101. package/out/__chunks__/chunk-YEAVK4T2.mjs +2 -0
  102. package/out/__chunks__/chunk-YEAVK4T2.mjs.map +7 -0
  103. package/out/__chunks__/chunk-YK4XGF57.mjs +2 -0
  104. package/out/__chunks__/chunk-YLN3OBBP.mjs +2 -0
  105. package/out/__chunks__/chunk-YUITECZ5.mjs +1 -0
  106. package/out/__chunks__/chunk-YUITECZ5.mjs.map +7 -0
  107. package/out/__chunks__/{chunk-ZHIYA3M7.mjs → chunk-YV2TRFYW.mjs} +2 -2
  108. package/out/__chunks__/{chunk-TEPQ5G4B.mjs → chunk-YZE4ECSF.mjs} +2 -2
  109. package/out/__chunks__/{chunk-IJB6XDNR.mjs → chunk-ZSVNTZ3Q.mjs} +2 -2
  110. package/out/__chunks__/{chunk-SJYCKFH4.mjs → chunk-ZXIBFH6X.mjs} +2 -2
  111. package/out/__chunks__/{chunk-XHIIMAIQ.mjs → chunk-ZZ53RJBO.mjs} +2 -2
  112. package/out/__chunks__/{chunk-P2C5G6H6.mjs → chunk-ZZDN5HHJ.mjs} +2 -2
  113. package/out/__mocks__/accountConfig.mjs +1 -1
  114. package/out/__mocks__/data/index.mjs +1 -1
  115. package/out/__mocks__/index.mjs +1 -1
  116. package/out/__mocks__/server.mjs +1 -1
  117. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  118. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  119. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  120. package/out/apiCalls/index.mjs +1 -1
  121. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  122. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  123. package/out/apiCalls/tokens/index.mjs +1 -1
  124. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  125. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  126. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  127. package/out/constants/browser.constants.mjs +1 -1
  128. package/out/constants/index.mjs +1 -1
  129. package/out/constants/providerFactory.constants.mjs +1 -1
  130. package/out/constants/storage.constants.mjs +1 -1
  131. package/out/constants/transactions.constants.d.ts +1 -0
  132. package/out/constants/transactions.constants.js +2 -1
  133. package/out/constants/transactions.constants.js.map +1 -1
  134. package/out/constants/transactions.constants.mjs +1 -1
  135. package/out/constants/window.constants.mjs +1 -1
  136. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  137. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  138. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  139. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  140. package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +1 -1
  141. package/out/index.mjs +1 -1
  142. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  143. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  144. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  145. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  146. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  147. package/out/managers/TransactionManager/helpers/getTransactionsStatus.mjs +1 -1
  148. package/out/managers/TransactionManager/helpers/sessionCallbacks.d.ts +7 -0
  149. package/out/managers/TransactionManager/helpers/sessionCallbacks.js +14 -0
  150. package/out/managers/TransactionManager/helpers/sessionCallbacks.js.map +1 -0
  151. package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs +2 -0
  152. package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs.map +7 -0
  153. package/out/managers/TransactionManager/index.mjs +1 -1
  154. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  155. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  156. package/out/managers/index.mjs +1 -1
  157. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  158. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  159. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  160. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  161. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  162. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  163. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  164. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  165. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  166. package/out/managers/internal/ToastManager/ToastManager.js +2 -1
  167. package/out/managers/internal/ToastManager/ToastManager.js.map +1 -1
  168. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  169. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  170. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  171. package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
  172. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
  173. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  174. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  175. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  176. package/out/managers/internal/index.mjs +1 -1
  177. package/out/methods/account/getAccount.mjs +1 -1
  178. package/out/methods/account/getAccountInfo.mjs +1 -1
  179. package/out/methods/account/getAddress.mjs +1 -1
  180. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  181. package/out/methods/account/getLatestNonce.mjs +1 -1
  182. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  183. package/out/methods/initApp/initApp.js +10 -1
  184. package/out/methods/initApp/initApp.js.map +1 -1
  185. package/out/methods/initApp/initApp.mjs +1 -1
  186. package/out/methods/initApp/initApp.mjs.map +3 -3
  187. package/out/methods/initApp/initApp.types.d.ts +34 -3
  188. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  189. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  190. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  191. package/out/methods/network/getEgldLabel.mjs +1 -1
  192. package/out/methods/network/getExplorerAddress.mjs +1 -1
  193. package/out/methods/network/getNetworkConfig.mjs +1 -1
  194. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.js +27 -10
  195. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.js.map +1 -1
  196. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  197. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  198. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  199. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.d.ts +1 -1
  200. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js +7 -2
  201. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js.map +1 -1
  202. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  203. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.d.ts +7 -0
  204. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js +24 -0
  205. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js.map +1 -0
  206. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs +2 -0
  207. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs.map +7 -0
  208. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  209. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  210. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  211. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  212. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  213. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  214. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  215. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  216. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  217. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  218. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  219. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  220. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  221. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  222. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  223. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  224. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  225. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  226. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  227. package/out/providers/DappProvider/index.mjs +1 -1
  228. package/out/providers/ProviderFactory.mjs +1 -1
  229. package/out/providers/helpers/accountProvider.mjs +1 -1
  230. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  231. package/out/providers/helpers/clearInitiatedLogins.mjs +1 -1
  232. package/out/providers/helpers/emptyProvider.mjs +1 -1
  233. package/out/providers/helpers/restoreProvider.mjs +1 -1
  234. package/out/providers/index.mjs +1 -1
  235. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  236. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  237. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  238. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  239. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  240. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  241. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  242. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  243. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  244. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  245. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  246. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  247. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  248. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  249. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  250. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  251. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  252. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  253. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  254. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  255. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  256. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js +9 -1
  257. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js.map +1 -1
  258. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  259. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  260. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  261. package/out/providers/strategies/helpers/index.mjs +1 -1
  262. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  263. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  264. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  265. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
  266. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  267. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  268. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  269. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  270. package/out/providers/strategies/index.mjs +1 -1
  271. package/out/providers/types/providerFactory.types.d.ts +1 -1
  272. package/out/providers/types/providerFactory.types.mjs +1 -1
  273. package/out/react/account/useGetAccount.mjs +1 -1
  274. package/out/react/account/useGetAccountInfo.mjs +1 -1
  275. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  276. package/out/react/account/useGetLatestNonce.mjs +1 -1
  277. package/out/react/index.mjs +1 -1
  278. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  279. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  280. package/out/react/store/getReactStore.mjs +1 -1
  281. package/out/react/store/useSelector.mjs +1 -1
  282. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  283. package/out/react/transactions/useGetFailedTransactionsSessions copy.mjs +1 -1
  284. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  285. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  286. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  287. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  288. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  289. package/out/services/index.mjs +1 -1
  290. package/out/services/nativeAuth/helpers/index.mjs +1 -1
  291. package/out/services/nativeAuth/index.mjs +1 -1
  292. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  293. package/out/store/actions/account/accountActions.mjs +1 -1
  294. package/out/store/actions/account/index.mjs +1 -1
  295. package/out/store/actions/cache/cacheActions.mjs +1 -1
  296. package/out/store/actions/cache/index.mjs +1 -1
  297. package/out/store/actions/config/configActions.mjs +1 -1
  298. package/out/store/actions/config/index.mjs +1 -1
  299. package/out/store/actions/index.mjs +1 -1
  300. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  301. package/out/store/actions/network/index.mjs +1 -1
  302. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  303. package/out/store/actions/network/networkActions.mjs +1 -1
  304. package/out/store/actions/sharedActions/index.mjs +1 -1
  305. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  306. package/out/store/actions/toasts/index.mjs +1 -1
  307. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  308. package/out/store/actions/transactions/transactionsActions.d.ts +2 -2
  309. package/out/store/actions/transactions/transactionsActions.js +13 -5
  310. package/out/store/actions/transactions/transactionsActions.js.map +1 -1
  311. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  312. package/out/store/actions/ui/index.mjs +1 -1
  313. package/out/store/actions/ui/uiActions.mjs +1 -1
  314. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  315. package/out/store/middleware/index.mjs +1 -1
  316. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  317. package/out/store/selectors/index.mjs +1 -1
  318. package/out/store/slices/index.mjs +1 -1
  319. package/out/store/storage/index.mjs +1 -1
  320. package/out/store/storage/storageCallback.mjs +1 -1
  321. package/out/store/store.mjs +1 -1
  322. package/out/types/index.d.ts +1 -0
  323. package/out/types/index.js +1 -0
  324. package/out/types/index.js.map +1 -1
  325. package/out/types/index.mjs +1 -1
  326. package/out/types/theme.types.d.ts +4 -0
  327. package/out/types/theme.types.js +9 -0
  328. package/out/types/theme.types.js.map +1 -0
  329. package/out/types/theme.types.mjs +2 -0
  330. package/out/types/theme.types.mjs.map +7 -0
  331. package/out/utils/account/index.mjs +1 -1
  332. package/out/utils/account/refreshAccount.mjs +1 -1
  333. package/out/utils/createUIElement.mjs +1 -1
  334. package/out/utils/decoders/index.mjs +1 -1
  335. package/out/utils/index.d.ts +1 -0
  336. package/out/utils/index.js +1 -0
  337. package/out/utils/index.js.map +1 -1
  338. package/out/utils/index.mjs +1 -1
  339. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  340. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  341. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
  342. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
  343. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromDataField.mjs +1 -1
  344. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromOperations.mjs +1 -1
  345. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
  346. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
  347. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  348. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  349. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  350. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  351. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  352. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  353. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  354. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  355. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  356. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAction.mjs +1 -1
  357. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
  358. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  359. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  360. package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
  361. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  362. package/out/utils/transactions/index.mjs +1 -1
  363. package/out/utils/validation/index.mjs +1 -1
  364. package/out/utils/validation/isContract.mjs +1 -1
  365. package/out/utils/visual/index.d.ts +1 -0
  366. package/out/utils/visual/index.js +18 -0
  367. package/out/utils/visual/index.js.map +1 -0
  368. package/out/utils/visual/index.mjs +2 -0
  369. package/out/utils/visual/index.mjs.map +7 -0
  370. package/out/utils/visual/switchTheme.d.ts +2 -0
  371. package/out/utils/visual/switchTheme.js +12 -0
  372. package/out/utils/visual/switchTheme.js.map +1 -0
  373. package/out/utils/visual/switchTheme.mjs +2 -0
  374. package/out/utils/visual/switchTheme.mjs.map +7 -0
  375. package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.mjs +1 -1
  376. package/out/utils/window/getIsInIframe.mjs +1 -1
  377. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  378. package/out/utils/window/index.mjs +1 -1
  379. package/package.json +3 -3
  380. package/out/__chunks__/chunk-26XVDGTO.mjs +0 -2
  381. package/out/__chunks__/chunk-26XVDGTO.mjs.map +0 -7
  382. package/out/__chunks__/chunk-2ONA7QPD.mjs +0 -2
  383. package/out/__chunks__/chunk-35XMV5ZL.mjs +0 -2
  384. package/out/__chunks__/chunk-6DNPTAY5.mjs +0 -2
  385. package/out/__chunks__/chunk-6F2QKI7Q.mjs +0 -2
  386. package/out/__chunks__/chunk-6WF4B5EG.mjs +0 -2
  387. package/out/__chunks__/chunk-76NGDJLC.mjs +0 -2
  388. package/out/__chunks__/chunk-ASWTHX52.mjs +0 -2
  389. package/out/__chunks__/chunk-BTRCRGTK.mjs +0 -2
  390. package/out/__chunks__/chunk-C6E6XICI.mjs +0 -2
  391. package/out/__chunks__/chunk-CNUQX7FI.mjs +0 -2
  392. package/out/__chunks__/chunk-CO3V5DOG.mjs +0 -1
  393. package/out/__chunks__/chunk-D7NHU6UF.mjs +0 -2
  394. package/out/__chunks__/chunk-D7NHU6UF.mjs.map +0 -7
  395. package/out/__chunks__/chunk-DFNESXSW.mjs +0 -2
  396. package/out/__chunks__/chunk-FPHLXGAT.mjs +0 -2
  397. package/out/__chunks__/chunk-FPHLXGAT.mjs.map +0 -7
  398. package/out/__chunks__/chunk-JKSF2U3C.mjs +0 -2
  399. package/out/__chunks__/chunk-JQU6F2FL.mjs +0 -2
  400. package/out/__chunks__/chunk-JZWEJ7SP.mjs +0 -2
  401. package/out/__chunks__/chunk-KRBUXJ6B.mjs +0 -2
  402. package/out/__chunks__/chunk-N5FYAXCA.mjs +0 -2
  403. package/out/__chunks__/chunk-OUNMWRYD.mjs +0 -2
  404. package/out/__chunks__/chunk-P5RR3CVM.mjs +0 -2
  405. package/out/__chunks__/chunk-QD3CFFVT.mjs +0 -2
  406. package/out/__chunks__/chunk-UZWRIJVB.mjs +0 -2
  407. package/out/__chunks__/chunk-VSUCRJYB.mjs +0 -2
  408. package/out/__chunks__/chunk-X7NCYKWT.mjs +0 -2
  409. package/out/__chunks__/chunk-X7NCYKWT.mjs.map +0 -7
  410. package/out/__chunks__/chunk-XFZOOFY5.mjs +0 -2
  411. package/out/__chunks__/chunk-XFZOOFY5.mjs.map +0 -7
  412. package/out/__chunks__/chunk-Z6R3RDWW.mjs +0 -2
  413. /package/out/__chunks__/{chunk-QAVA2C6Y.mjs.map → chunk-2AB2KTYM.mjs.map} +0 -0
  414. /package/out/__chunks__/{chunk-66JBXP4O.mjs.map → chunk-2I7FJNXZ.mjs.map} +0 -0
  415. /package/out/__chunks__/{chunk-HEKAFHIA.mjs.map → chunk-2X62ALFS.mjs.map} +0 -0
  416. /package/out/__chunks__/{chunk-JZWEJ7SP.mjs.map → chunk-2ZNQYHNX.mjs.map} +0 -0
  417. /package/out/__chunks__/{chunk-IWB45745.mjs.map → chunk-3BXYTP4Q.mjs.map} +0 -0
  418. /package/out/__chunks__/{chunk-XLHFU7XR.mjs.map → chunk-3EI6B7OU.mjs.map} +0 -0
  419. /package/out/__chunks__/{chunk-6WF4B5EG.mjs.map → chunk-3GXUTDCB.mjs.map} +0 -0
  420. /package/out/__chunks__/{chunk-YEXBSKXL.mjs.map → chunk-3LBQYLDY.mjs.map} +0 -0
  421. /package/out/__chunks__/{chunk-B2RDSGON.mjs.map → chunk-3OKWBJFM.mjs.map} +0 -0
  422. /package/out/__chunks__/{chunk-IEJARRBP.mjs.map → chunk-3U6H4VPO.mjs.map} +0 -0
  423. /package/out/__chunks__/{chunk-P5RR3CVM.mjs.map → chunk-3YK6SW7E.mjs.map} +0 -0
  424. /package/out/__chunks__/{chunk-INBKWOKQ.mjs.map → chunk-4RGFBPII.mjs.map} +0 -0
  425. /package/out/__chunks__/{chunk-ZEIGMAXW.mjs.map → chunk-4RJ23OT7.mjs.map} +0 -0
  426. /package/out/__chunks__/{chunk-C6E6XICI.mjs.map → chunk-535PAVZN.mjs.map} +0 -0
  427. /package/out/__chunks__/{chunk-BTRCRGTK.mjs.map → chunk-5OQ6KHGF.mjs.map} +0 -0
  428. /package/out/__chunks__/{chunk-2ONA7QPD.mjs.map → chunk-62PJZCUP.mjs.map} +0 -0
  429. /package/out/__chunks__/{chunk-DEMKQ3CQ.mjs.map → chunk-6LY7ZRDT.mjs.map} +0 -0
  430. /package/out/__chunks__/{chunk-DFNESXSW.mjs.map → chunk-7B2IRMVK.mjs.map} +0 -0
  431. /package/out/__chunks__/{chunk-VCGAO6HH.mjs.map → chunk-7D2BEFUJ.mjs.map} +0 -0
  432. /package/out/__chunks__/{chunk-PRULMJH7.mjs.map → chunk-AAMNTAXA.mjs.map} +0 -0
  433. /package/out/__chunks__/{chunk-RHFDU5Y4.mjs.map → chunk-ABHYXD3U.mjs.map} +0 -0
  434. /package/out/__chunks__/{chunk-35XMV5ZL.mjs.map → chunk-AFEGGHNM.mjs.map} +0 -0
  435. /package/out/__chunks__/{chunk-CEDRWVRS.mjs.map → chunk-AHHTRI3Y.mjs.map} +0 -0
  436. /package/out/__chunks__/{chunk-VSUCRJYB.mjs.map → chunk-ASRYY6T3.mjs.map} +0 -0
  437. /package/out/__chunks__/{chunk-UZWRIJVB.mjs.map → chunk-AV6BSOLO.mjs.map} +0 -0
  438. /package/out/__chunks__/{chunk-S5FDHOXH.mjs.map → chunk-B5AW5LX5.mjs.map} +0 -0
  439. /package/out/__chunks__/{chunk-76NGDJLC.mjs.map → chunk-BMXLSDJM.mjs.map} +0 -0
  440. /package/out/__chunks__/{chunk-KPDCSGZD.mjs.map → chunk-BNWGWGXY.mjs.map} +0 -0
  441. /package/out/__chunks__/{chunk-IOE5AG2R.mjs.map → chunk-C37IYZAK.mjs.map} +0 -0
  442. /package/out/__chunks__/{chunk-OUNMWRYD.mjs.map → chunk-DICSPHT2.mjs.map} +0 -0
  443. /package/out/__chunks__/{chunk-MQ5V5AJU.mjs.map → chunk-DKE2ONRB.mjs.map} +0 -0
  444. /package/out/__chunks__/{chunk-TMP3REGQ.mjs.map → chunk-DPSC4NIK.mjs.map} +0 -0
  445. /package/out/__chunks__/{chunk-SH5S4RA4.mjs.map → chunk-DVY6YKH6.mjs.map} +0 -0
  446. /package/out/__chunks__/{chunk-N5FYAXCA.mjs.map → chunk-ESLVKRXK.mjs.map} +0 -0
  447. /package/out/__chunks__/{chunk-J3YO25EK.mjs.map → chunk-EUVZQRU5.mjs.map} +0 -0
  448. /package/out/__chunks__/{chunk-QKHHW26T.mjs.map → chunk-FELZAGW5.mjs.map} +0 -0
  449. /package/out/__chunks__/{chunk-A5EXECZV.mjs.map → chunk-FIVH6RKU.mjs.map} +0 -0
  450. /package/out/__chunks__/{chunk-CCDTUFFG.mjs.map → chunk-FIXSEPFX.mjs.map} +0 -0
  451. /package/out/__chunks__/{chunk-QP2EL7IE.mjs.map → chunk-FS2F24A7.mjs.map} +0 -0
  452. /package/out/__chunks__/{chunk-ZK5BKLTG.mjs.map → chunk-HCDOXUDA.mjs.map} +0 -0
  453. /package/out/__chunks__/{chunk-2FD2AMKA.mjs.map → chunk-HN244QVP.mjs.map} +0 -0
  454. /package/out/__chunks__/{chunk-7WTWD4TL.mjs.map → chunk-HTVULYKB.mjs.map} +0 -0
  455. /package/out/__chunks__/{chunk-ZU4LTEAC.mjs.map → chunk-IAK3KHJ7.mjs.map} +0 -0
  456. /package/out/__chunks__/{chunk-6F2QKI7Q.mjs.map → chunk-J75OEBAP.mjs.map} +0 -0
  457. /package/out/__chunks__/{chunk-DOUNJCQ4.mjs.map → chunk-JOB7ALAF.mjs.map} +0 -0
  458. /package/out/__chunks__/{chunk-72PZKSKF.mjs.map → chunk-KEAFX54V.mjs.map} +0 -0
  459. /package/out/__chunks__/{chunk-EOX35D4L.mjs.map → chunk-LIPGE2RA.mjs.map} +0 -0
  460. /package/out/__chunks__/{chunk-7LUZJPO5.mjs.map → chunk-LKXBH3I3.mjs.map} +0 -0
  461. /package/out/__chunks__/{chunk-YPCJBYUY.mjs.map → chunk-LUDF7ZUR.mjs.map} +0 -0
  462. /package/out/__chunks__/{chunk-EDSX3LFL.mjs.map → chunk-LYTZPES3.mjs.map} +0 -0
  463. /package/out/__chunks__/{chunk-LM5SF2NG.mjs.map → chunk-MJEZGI7G.mjs.map} +0 -0
  464. /package/out/__chunks__/{chunk-445MWKMT.mjs.map → chunk-MRJ7P7KU.mjs.map} +0 -0
  465. /package/out/__chunks__/{chunk-NBDECUQ3.mjs.map → chunk-N6SD2OVU.mjs.map} +0 -0
  466. /package/out/__chunks__/{chunk-SYQ7SILM.mjs.map → chunk-NKJ7OVPV.mjs.map} +0 -0
  467. /package/out/__chunks__/{chunk-5W4JJSFM.mjs.map → chunk-NXV7YLV6.mjs.map} +0 -0
  468. /package/out/__chunks__/{chunk-CNUQX7FI.mjs.map → chunk-O2SZII5H.mjs.map} +0 -0
  469. /package/out/__chunks__/{chunk-45WVS4H5.mjs.map → chunk-ORHJGVU5.mjs.map} +0 -0
  470. /package/out/__chunks__/{chunk-4OEPT2V4.mjs.map → chunk-P3BXXGQA.mjs.map} +0 -0
  471. /package/out/__chunks__/{chunk-K3WBBSXJ.mjs.map → chunk-PCY7ULK2.mjs.map} +0 -0
  472. /package/out/__chunks__/{chunk-Z6R3RDWW.mjs.map → chunk-Q7L5T72K.mjs.map} +0 -0
  473. /package/out/__chunks__/{chunk-YN5ARP6C.mjs.map → chunk-QWIXKUDO.mjs.map} +0 -0
  474. /package/out/__chunks__/{chunk-JQEKTKZR.mjs.map → chunk-QWNJJXNH.mjs.map} +0 -0
  475. /package/out/__chunks__/{chunk-TR6FQZGE.mjs.map → chunk-RA4VU3NM.mjs.map} +0 -0
  476. /package/out/__chunks__/{chunk-I7ODJJY3.mjs.map → chunk-REI3WYXH.mjs.map} +0 -0
  477. /package/out/__chunks__/{chunk-CNWR7SER.mjs.map → chunk-RIFXW4D3.mjs.map} +0 -0
  478. /package/out/__chunks__/{chunk-YQ3LRPGM.mjs.map → chunk-S75GQPJQ.mjs.map} +0 -0
  479. /package/out/__chunks__/{chunk-BVYTCDU6.mjs.map → chunk-SHDTJ5GB.mjs.map} +0 -0
  480. /package/out/__chunks__/{chunk-FUYWIC54.mjs.map → chunk-SNBLSIKQ.mjs.map} +0 -0
  481. /package/out/__chunks__/{chunk-JSUJOYYB.mjs.map → chunk-TAQN5HUK.mjs.map} +0 -0
  482. /package/out/__chunks__/{chunk-ASWTHX52.mjs.map → chunk-UAW7SD6P.mjs.map} +0 -0
  483. /package/out/__chunks__/{chunk-CO3V5DOG.mjs.map → chunk-WHEXX3BD.mjs.map} +0 -0
  484. /package/out/__chunks__/{chunk-C5TNEYN6.mjs.map → chunk-WMY46KJS.mjs.map} +0 -0
  485. /package/out/__chunks__/{chunk-7ECP7Y7M.mjs.map → chunk-X4ZYTNNA.mjs.map} +0 -0
  486. /package/out/__chunks__/{chunk-XOJHIJKX.mjs.map → chunk-XGV7BGBC.mjs.map} +0 -0
  487. /package/out/__chunks__/{chunk-LOEJYVD2.mjs.map → chunk-XOWM53LI.mjs.map} +0 -0
  488. /package/out/__chunks__/{chunk-JKSF2U3C.mjs.map → chunk-XXKSDA5P.mjs.map} +0 -0
  489. /package/out/__chunks__/{chunk-QATM2UUN.mjs.map → chunk-XZVYUFVM.mjs.map} +0 -0
  490. /package/out/__chunks__/{chunk-QM67ZEC5.mjs.map → chunk-Y53MWKLT.mjs.map} +0 -0
  491. /package/out/__chunks__/{chunk-6DNPTAY5.mjs.map → chunk-YK4XGF57.mjs.map} +0 -0
  492. /package/out/__chunks__/{chunk-JQU6F2FL.mjs.map → chunk-YLN3OBBP.mjs.map} +0 -0
  493. /package/out/__chunks__/{chunk-ZHIYA3M7.mjs.map → chunk-YV2TRFYW.mjs.map} +0 -0
  494. /package/out/__chunks__/{chunk-TEPQ5G4B.mjs.map → chunk-YZE4ECSF.mjs.map} +0 -0
  495. /package/out/__chunks__/{chunk-IJB6XDNR.mjs.map → chunk-ZSVNTZ3Q.mjs.map} +0 -0
  496. /package/out/__chunks__/{chunk-SJYCKFH4.mjs.map → chunk-ZXIBFH6X.mjs.map} +0 -0
  497. /package/out/__chunks__/{chunk-XHIIMAIQ.mjs.map → chunk-ZZ53RJBO.mjs.map} +0 -0
  498. /package/out/__chunks__/{chunk-P2C5G6H6.mjs.map → chunk-ZZDN5HHJ.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{f as a}from"./chunk-VNLGNNIL.mjs";import{b as s,f as l}from"./chunk-QJSB5NX4.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-BTRCRGTK.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{a as T}from"./chunk-SUN3MVLZ.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as g,b as c}from"./chunk-7BP53CXF.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
2
- //# sourceMappingURL=chunk-DOUNJCQ4.mjs.map
1
+ import{f as a}from"./chunk-VNLGNNIL.mjs";import{b as s,f as l}from"./chunk-QJSB5NX4.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{a as g,b as c}from"./chunk-7BP53CXF.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as T}from"./chunk-SUN3MVLZ.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-5OQ6KHGF.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
2
+ //# sourceMappingURL=chunk-JOB7ALAF.mjs.map
@@ -0,0 +1,2 @@
1
+ var r=(t=>(t.light="mvx:light-theme",t.dark="mvx:dark-theme",t))(r||{});export{r as a};
2
+ //# sourceMappingURL=chunk-JR23TXKP.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/types/theme.types.ts"],
4
+ "sourcesContent": ["export enum ThemesEnum {\n light = 'mvx:light-theme',\n dark = 'mvx:dark-theme'\n}\n"],
5
+ "mappings": "AAAO,IAAKA,OACVA,EAAA,MAAQ,kBACRA,EAAA,KAAO,iBAFGA,OAAA",
6
+ "names": ["ThemesEnum"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{u as r}from"./chunk-DOUNJCQ4.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-72PZKSKF.mjs.map
1
+ import{u as r}from"./chunk-JOB7ALAF.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-KEAFX54V.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as T}from"./chunk-HMHP5DPL.mjs";import{a as u}from"./chunk-QSBLXZFC.mjs";import{a as d}from"./chunk-TX7PTLVP.mjs";import I from"lodash.startcase";import C from"lodash.uniq";var M=(e=>(e.mex="mex",e.stake="stake",e))(M||{}),R=({currentUserAddress:g,transaction:t,egldLabel:e,isPending:A=!1})=>{if(A)return{name:"Pending..."};let l={},y=Object.entries(T).reduce((s,[x,D])=>Object.assign(s,{[x]:D}),l),n=t.action,r=n&&n.arguments,i=n&&n.category?n.category:null,b=r&&n.name==="transfer",a=r&&Array.isArray(r.transfers)?r.transfers:[],c=a.map(s=>s.type),[m]=C(c),L=e??"EGLD",p=d({transaction:t,transferType:m,currentUserAddress:g}),E=u({allTransferTypes:c,transferType:m,transactionTransfers:a}),h=i&&["mex","stake"].includes(i),o=n&&h?n.description:void 0,f=t.function&&t.function!=="transfer"?y[t.function]??I(t.function):null;return b&&r?{name:`${p} ${E}`,description:o}:f?{name:f,description:o}:{name:`${p} ${L}`,description:o}};export{M as a,R as b};
2
- //# sourceMappingURL=chunk-EOX35D4L.mjs.map
1
+ import{a as u}from"./chunk-QSBLXZFC.mjs";import{a as d}from"./chunk-TX7PTLVP.mjs";import{b as T}from"./chunk-HMHP5DPL.mjs";import I from"lodash.startcase";import C from"lodash.uniq";var M=(e=>(e.mex="mex",e.stake="stake",e))(M||{}),R=({currentUserAddress:g,transaction:t,egldLabel:e,isPending:A=!1})=>{if(A)return{name:"Pending..."};let l={},y=Object.entries(T).reduce((s,[x,D])=>Object.assign(s,{[x]:D}),l),n=t.action,r=n&&n.arguments,i=n&&n.category?n.category:null,b=r&&n.name==="transfer",a=r&&Array.isArray(r.transfers)?r.transfers:[],c=a.map(s=>s.type),[m]=C(c),L=e??"EGLD",p=d({transaction:t,transferType:m,currentUserAddress:g}),E=u({allTransferTypes:c,transferType:m,transactionTransfers:a}),h=i&&["mex","stake"].includes(i),o=n&&h?n.description:void 0,f=t.function&&t.function!=="transfer"?y[t.function]??I(t.function):null;return b&&r?{name:`${p} ${E}`,description:o}:f?{name:f,description:o}:{name:`${p} ${L}`,description:o}};export{M as a,R as b};
2
+ //# sourceMappingURL=chunk-LIPGE2RA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-CCDTUFFG.mjs";import{a as u}from"./chunk-6DNPTAY5.mjs";import{a as g}from"./chunk-CEDRWVRS.mjs";import{c as n}from"./chunk-7WTWD4TL.mjs";import{a}from"./chunk-NHXPNROG.mjs";import{a as s}from"./chunk-KRBUXJ6B.mjs";var c=(o,r)=>{let t=`sdk-dapp-logout-event-${o}`,e=r.getItem(t);e&&o!==e||(r.setItem(t,o),r.removeItem(t))};async function h({provider:o,options:r={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}}){let t=u();r.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(t,s.localStorage);try{return g(),r.hasConsentPopup&&o.getType()===a.crossWindow&&o.setShouldShowConsentPopup(!0),n.forEach(p=>p()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{h as a};
2
- //# sourceMappingURL=chunk-7LUZJPO5.mjs.map
1
+ import{a as i}from"./chunk-FIXSEPFX.mjs";import{a as u}from"./chunk-YK4XGF57.mjs";import{a as g}from"./chunk-AHHTRI3Y.mjs";import{c as n}from"./chunk-HTVULYKB.mjs";import{a}from"./chunk-OJV6XRG5.mjs";import{a as s}from"./chunk-U6KSTPE7.mjs";var c=(o,r)=>{let t=`sdk-dapp-logout-event-${o}`,e=r.getItem(t);e&&o!==e||(r.setItem(t,o),r.removeItem(t))};async function h({provider:o,options:r={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}}){let t=u();r.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(t,s.localStorage);try{return g(),r.hasConsentPopup&&o.getType()===a.crossWindow&&o.setShouldShowConsentPopup(!0),n.forEach(p=>p()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{h as a};
2
+ //# sourceMappingURL=chunk-LKXBH3I3.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as I}from"./chunk-EOX35D4L.mjs";import{a as g}from"./chunk-3MWXXTQQ.mjs";import{a as f}from"./chunk-ISPRIGOE.mjs";import{a as u}from"./chunk-VDDXFGB2.mjs";import{a as p}from"./chunk-WZ2DNB3R.mjs";import{a as T}from"./chunk-BRJNX4JF.mjs";import{a as c}from"./chunk-DBIIY2TX.mjs";var E=({transaction:t,address:e,explorerAddress:v,egldLabel:o,isPending:a=!1})=>{let{receiver:r,receiverAssets:n}=p(t),s=e===r,S=I({transaction:t,currentUserAddress:e,egldLabel:o,isPending:a}),i=g({userIsReceiver:r===e,transaction:t,egldLabel:o}),m=t.originalTxHash??t.txHash;return{asset:f({...t,transactionAssets:i,showDefaultState:a,status:t.status}),interactor:s?t.sender:r,interactorAsset:s?t.senderAssets?.iconSvg??t.senderAssets?.iconPng:n?.iconSvg??n?.iconPng,directionLabel:s?"From":"To",action:S,amount:u({transactionAssets:i,isIncomingTransaction:s}),hash:m,status:t.status,timestamp:t.timestamp,link:T({explorerAddress:v,to:c.transactionDetails(m)})}};export{E as a};
2
- //# sourceMappingURL=chunk-YPCJBYUY.mjs.map
1
+ import{b as I}from"./chunk-LIPGE2RA.mjs";import{a as p}from"./chunk-WZ2DNB3R.mjs";import{a as g}from"./chunk-3MWXXTQQ.mjs";import{a as f}from"./chunk-ISPRIGOE.mjs";import{a as u}from"./chunk-VDDXFGB2.mjs";import{a as T}from"./chunk-BRJNX4JF.mjs";import{a as c}from"./chunk-DBIIY2TX.mjs";var E=({transaction:t,address:e,explorerAddress:v,egldLabel:o,isPending:a=!1})=>{let{receiver:r,receiverAssets:n}=p(t),s=e===r,S=I({transaction:t,currentUserAddress:e,egldLabel:o,isPending:a}),i=g({userIsReceiver:r===e,transaction:t,egldLabel:o}),m=t.originalTxHash??t.txHash;return{asset:f({...t,transactionAssets:i,showDefaultState:a,status:t.status}),interactor:s?t.sender:r,interactorAsset:s?t.senderAssets?.iconSvg??t.senderAssets?.iconPng:n?.iconSvg??n?.iconPng,directionLabel:s?"From":"To",action:S,amount:u({transactionAssets:i,isIncomingTransaction:s}),hash:m,status:t.status,timestamp:t.timestamp,link:T({explorerAddress:v,to:c.transactionDetails(m)})}};export{E as a};
2
+ //# sourceMappingURL=chunk-LUDF7ZUR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-LM5SF2NG.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-EDSX3LFL.mjs.map
1
+ import{a as i}from"./chunk-MJEZGI7G.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-LYTZPES3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-INBKWOKQ.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({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-LM5SF2NG.mjs.map
1
+ import{a as s}from"./chunk-4RGFBPII.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({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-MJEZGI7G.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-BVYTCDU6.mjs";import{a as e}from"./chunk-6DNPTAY5.mjs";import{a as i}from"./chunk-I7ODJJY3.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
2
- //# sourceMappingURL=chunk-445MWKMT.mjs.map
1
+ import{a as s}from"./chunk-SHDTJ5GB.mjs";import{a as e}from"./chunk-YK4XGF57.mjs";import{a as i}from"./chunk-REI3WYXH.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
2
+ //# sourceMappingURL=chunk-MRJ7P7KU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-LM5SF2NG.mjs";import{a as t}from"./chunk-Z6R3RDWW.mjs";var s=class extends n{constructor({uiDataUpdateEvent:e,uiTag:i}){super({uiDataUpdateEvent:e,uiTag:i});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}async destroy(){this.setIsSidePanelOpen(!1),await this.uiElement?.closeWithAnimation?.(),super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{s as a};
2
- //# sourceMappingURL=chunk-NBDECUQ3.mjs.map
1
+ import{a as n}from"./chunk-MJEZGI7G.mjs";import{a as t}from"./chunk-Q7L5T72K.mjs";var s=class extends n{constructor({uiDataUpdateEvent:e,uiTag:i}){super({uiDataUpdateEvent:e,uiTag:i});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}async destroy(){this.setIsSidePanelOpen(!1),await this.uiElement?.closeWithAnimation?.(),super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{s as a};
2
+ //# sourceMappingURL=chunk-N6SD2OVU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-KRBUXJ6B.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-SYQ7SILM.mjs.map
1
+ import{a as o}from"./chunk-U6KSTPE7.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-NKJ7OVPV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as x}from"./chunk-TMP3REGQ.mjs";import{a as k}from"./chunk-JQU6F2FL.mjs";import{a as B}from"./chunk-OUNMWRYD.mjs";import{a as b}from"./chunk-UZWRIJVB.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-ZU4LTEAC.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-VCGAO6HH.mjs";import{a as R}from"./chunk-ZMEIT65B.mjs";import{u as A}from"./chunk-DOUNJCQ4.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=k(),g=v(A()),h=B(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=x.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
- //# sourceMappingURL=chunk-5W4JJSFM.mjs.map
1
+ import{a as k}from"./chunk-YLN3OBBP.mjs";import{a as x}from"./chunk-DPSC4NIK.mjs";import{a as B}from"./chunk-DICSPHT2.mjs";import{a as b}from"./chunk-AV6BSOLO.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-ZMEIT65B.mjs";import{a as D}from"./chunk-IAK3KHJ7.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-7D2BEFUJ.mjs";import{u as A}from"./chunk-JOB7ALAF.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=k(),g=v(A()),h=B(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=x.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
+ //# sourceMappingURL=chunk-NXV7YLV6.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as e}from"./chunk-JOB7ALAF.mjs";import{f as t}from"./chunk-QJSB5NX4.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-O2SZII5H.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-U6KSTPE7.mjs";function n(m){e&&(e.document.documentElement.dataset.theme=m)}export{n as a};
2
+ //# sourceMappingURL=chunk-OEYIF65Y.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/visual/switchTheme.ts"],
4
+ "sourcesContent": ["import { safeWindow } from 'constants/window.constants';\nimport { ThemesEnum } from 'types';\n\nexport function switchTheme(theme: `${ThemesEnum}`) {\n if (!safeWindow) {\n return;\n }\n\n safeWindow.document.documentElement.dataset.theme = theme;\n}\n"],
5
+ "mappings": "yCAGO,SAASA,EAAYC,EAAwB,CAC7CC,IAILA,EAAW,SAAS,gBAAgB,QAAQ,MAAQD,EACtD",
6
+ "names": ["switchTheme", "theme", "safeWindow"]
7
+ }
@@ -1,2 +1,2 @@
1
1
  var e={extension:"extension",metamask:"metamask",passkey:"passkey",walletConnect:"walletConnect",ledger:"ledger",crossWindow:"crossWindow",webview:"webview",none:""};export{e as a};
2
- //# sourceMappingURL=chunk-NHXPNROG.mjs.map
2
+ //# sourceMappingURL=chunk-OJV6XRG5.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/providers/types/providerFactory.types.ts"],
4
- "sourcesContent": ["import type { IDAppProviderBase } from '@multiversx/sdk-dapp-utils';\n\nexport interface IProvider<T extends ProviderType = ProviderType>\n extends IDAppProviderBase {\n init: () => Promise<boolean>;\n login: (options?: { callbackUrl?: string; token?: string }) => Promise<{\n address: string;\n signature: string;\n multisig?: string;\n impersonate?: string;\n [key: string]: unknown;\n }>;\n logout: () => Promise<boolean>;\n cancelLogin?: () => void;\n setShouldShowConsentPopup?: (shouldShow: boolean) => void;\n getType: () => T;\n getAddress(): Promise<string | undefined>;\n}\n\nexport interface IProviderConfig {\n account?: {\n address: string;\n };\n}\n\nexport const ProviderTypeEnum = {\n extension: 'extension',\n metamask: 'metamask',\n passkey: 'passkey',\n walletConnect: 'walletConnect',\n ledger: 'ledger',\n crossWindow: 'crossWindow',\n webview: 'webview',\n none: ''\n} as const;\n\nexport type ProviderType =\n (typeof ProviderTypeEnum)[keyof typeof ProviderTypeEnum];\n\nexport interface IProviderFactory<T extends ProviderType = ProviderType> {\n type: T;\n anchor?: HTMLElement;\n}\n\nexport interface IProviderBase<T extends ProviderType = ProviderType> {\n name: string;\n type: T;\n iconUrl?: string;\n}\nexport interface ICustomProvider<T extends ProviderType = ProviderType>\n extends IProviderBase<T> {\n constructor: (options?: {\n address?: string;\n anchor?: HTMLElement;\n }) => Promise<IProvider>;\n}\n"],
4
+ "sourcesContent": ["import type { IDAppProviderBase } from '@multiversx/sdk-dapp-utils';\n\nexport interface IProvider<T extends ProviderType = ProviderType>\n extends IDAppProviderBase {\n init: () => Promise<boolean>;\n login: (options?: { callbackUrl?: string; token?: string }) => Promise<{\n address: string;\n signature: string;\n multisig?: string;\n impersonate?: string;\n [key: string]: unknown;\n }>;\n logout: () => Promise<boolean>;\n cancelLogin?: () => void;\n setShouldShowConsentPopup?: (shouldShow: boolean) => void;\n getType: () => T;\n getAddress(): Promise<string | undefined>;\n}\n\nexport interface IProviderConfig {\n account?: {\n address: string;\n };\n}\n\nexport const ProviderTypeEnum = {\n extension: 'extension',\n metamask: 'metamask',\n passkey: 'passkey',\n walletConnect: 'walletConnect',\n ledger: 'ledger',\n crossWindow: 'crossWindow',\n webview: 'webview',\n none: ''\n} as const;\n\nexport type ProviderType =\n | (typeof ProviderTypeEnum)[keyof typeof ProviderTypeEnum]\n | (string & {}); // This allows custom providers to be used as a string\n\nexport interface IProviderFactory<T extends ProviderType = ProviderType> {\n type: T;\n anchor?: HTMLElement;\n}\n\nexport interface IProviderBase<T extends ProviderType = ProviderType> {\n name: string;\n type: T;\n iconUrl?: string;\n}\nexport interface ICustomProvider<T extends ProviderType = ProviderType>\n extends IProviderBase<T> {\n constructor: (options?: {\n address?: string;\n anchor?: HTMLElement;\n }) => Promise<IProvider>;\n}\n"],
5
5
  "mappings": "AAyBO,IAAMA,EAAmB,CAC9B,UAAW,YACX,SAAU,WACV,QAAS,UACT,cAAe,gBACf,OAAQ,SACR,YAAa,cACb,QAAS,UACT,KAAM,EACR",
6
6
  "names": ["ProviderTypeEnum"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as f}from"./chunk-RIQNG4I7.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=f(h),n=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>n.getCurrentBlockHash(),e=t?.latestBlockInfo;e||(e=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache}));let{hash:p,timestamp:c}=e,m=n.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${n.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:e})=>n.getToken(t,a,e),getTokenExpiration:l}};export{H as a};
2
- //# sourceMappingURL=chunk-45WVS4H5.mjs.map
1
+ import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as f}from"./chunk-RIQNG4I7.mjs";import{a as g}from"./chunk-3S57OP4Z.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=f(h),n=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>n.getCurrentBlockHash(),e=t?.latestBlockInfo;e||(e=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache}));let{hash:p,timestamp:c}=e,m=n.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${n.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:e})=>n.getToken(t,a,e),getTokenExpiration:l}};export{H as a};
2
+ //# sourceMappingURL=chunk-ORHJGVU5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as D}from"./chunk-O6VPG7AF.mjs";import{a as m,b as p,c as s,d as c}from"./chunk-I2YHVWIX.mjs";import{a as k}from"./chunk-266T724O.mjs";import{a as f}from"./chunk-A5EXECZV.mjs";import{a as d}from"./chunk-JIJSBQEU.mjs";import{a as A}from"./chunk-SJYCKFH4.mjs";import{a as V}from"./chunk-DHPD6E7P.mjs";import{a as l}from"./chunk-FEFZKA2B.mjs";import{b as T}from"./chunk-UQU2VWPJ.mjs";import{c as o,f as i}from"./chunk-J4CPYFK6.mjs";import{a as u}from"./chunk-DBIIY2TX.mjs";var H=({transaction:t,hideMultipleBadge:g})=>{if(t.action){if(p.includes(t.action.name))return l(t.value);if(s.includes(t.action.name))return V(t);if(m.includes(t.action.name))return A(t);if(c.includes(t.action.name))return k(t);let a=D(t);if(a.length){let e=a[0],I=Object.values(T).includes(e.type),r=!g&&a.length>1?f(a):"";if(I){let{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y}=d({token:e});return{nftValueData:{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y,transactionTokens:a,token:e,value:n!=null?e.value:null,decimals:n!=null?e.decimals:null,titleText:r}}}let x=e.value?i({input:e.value,decimals:e.decimals??o,digits:2,addCommas:!0}):null;return{tokenValueData:{tokenExplorerLink:u.tokenDetails(String(e.token)),showFormattedAmount:!1,tokenFormattedAmount:x,tokenLinkText:e.ticker,transactionTokens:a,token:e,value:e.value,decimals:e.decimals??o,titleText:r}}}}return l(t.value)};export{H as a};
2
- //# sourceMappingURL=chunk-4OEPT2V4.mjs.map
1
+ import{a as D}from"./chunk-O6VPG7AF.mjs";import{a as m,b as p,c as s,d as c}from"./chunk-I2YHVWIX.mjs";import{a as A}from"./chunk-ZXIBFH6X.mjs";import{a as V}from"./chunk-DHPD6E7P.mjs";import{a as k}from"./chunk-266T724O.mjs";import{a as f}from"./chunk-FIVH6RKU.mjs";import{a as d}from"./chunk-JIJSBQEU.mjs";import{a as l}from"./chunk-FEFZKA2B.mjs";import{b as T}from"./chunk-UQU2VWPJ.mjs";import{c as o,f as i}from"./chunk-J4CPYFK6.mjs";import{a as u}from"./chunk-DBIIY2TX.mjs";var H=({transaction:t,hideMultipleBadge:g})=>{if(t.action){if(p.includes(t.action.name))return l(t.value);if(s.includes(t.action.name))return V(t);if(m.includes(t.action.name))return A(t);if(c.includes(t.action.name))return k(t);let a=D(t);if(a.length){let e=a[0],I=Object.values(T).includes(e.type),r=!g&&a.length>1?f(a):"";if(I){let{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y}=d({token:e});return{nftValueData:{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y,transactionTokens:a,token:e,value:n!=null?e.value:null,decimals:n!=null?e.decimals:null,titleText:r}}}let x=e.value?i({input:e.value,decimals:e.decimals??o,digits:2,addCommas:!0}):null;return{tokenValueData:{tokenExplorerLink:u.tokenDetails(String(e.token)),showFormattedAmount:!1,tokenFormattedAmount:x,tokenLinkText:e.ticker,transactionTokens:a,token:e,value:e.value,decimals:e.decimals??o,titleText:r}}}}return l(t.value)};export{H as a};
2
+ //# sourceMappingURL=chunk-P3BXXGQA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-PRULMJH7.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
- //# sourceMappingURL=chunk-K3WBBSXJ.mjs.map
1
+ import{a as t}from"./chunk-AAMNTAXA.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
+ //# sourceMappingURL=chunk-PCY7ULK2.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-JOB7ALAF.mjs";var o=t=>e().setState(({ui:n})=>{n.isSidePanelOpen=t},!1,"setIsSidePanelOpen");export{o as a};
2
+ //# sourceMappingURL=chunk-Q7L5T72K.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as e}from"./chunk-DOUNJCQ4.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
- //# sourceMappingURL=chunk-YN5ARP6C.mjs.map
1
+ import{u as e}from"./chunk-JOB7ALAF.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
+ //# sourceMappingURL=chunk-QWIXKUDO.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as s}from"./chunk-XOJHIJKX.mjs";import{a as p}from"./chunk-NBDECUQ3.mjs";import{u as c}from"./chunk-DOUNJCQ4.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-I7ODJJY3.mjs";import{a}from"./chunk-NHXPNROG.mjs";var n=class n extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&n.onClose&&n.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!n.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(n.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),n.loginHandler()):n.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,r=[...Object.values(a).filter(i=>i!==a.none&&i!==a.webview),...e.map(i=>i.type)],P=e.reduce((i,t)=>(i[t.type]=t.name,i),{}),l={...v,...P};return(n.allowedProviders?n?.allowedProviders.map(i=>i.type).filter(i=>r.includes(i)):r).map(i=>{let t=e.find(g=>g.type===i);return t||{name:i in l?l[i]:i,type:i}})}};n.loginHandler=null,n.onClose=null,n.allowedProviders=null;var u=n;export{u as a};
2
- //# sourceMappingURL=chunk-JQEKTKZR.mjs.map
1
+ import{d as s}from"./chunk-XGV7BGBC.mjs";import{a as p}from"./chunk-N6SD2OVU.mjs";import{u as c}from"./chunk-JOB7ALAF.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-REI3WYXH.mjs";import{a}from"./chunk-OJV6XRG5.mjs";var n=class n extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&n.onClose&&n.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!n.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(n.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),n.loginHandler()):n.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,r=[...Object.values(a).filter(i=>i!==a.none&&i!==a.webview),...e.map(i=>i.type)],P=e.reduce((i,t)=>(i[t.type]=t.name,i),{}),l={...v,...P};return(n.allowedProviders?n?.allowedProviders.map(i=>i.type).filter(i=>r.includes(i)):r).map(i=>{let t=e.find(g=>g.type===i);return t||{name:i in l?l[i]:i,type:i}})}};n.loginHandler=null,n.onClose=null,n.allowedProviders=null;var u=n;export{u as a};
2
+ //# sourceMappingURL=chunk-QWNJJXNH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-QD3CFFVT.mjs";import{u as e}from"./chunk-DOUNJCQ4.mjs";import{a as n}from"./chunk-QJSB5NX4.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
- //# sourceMappingURL=chunk-TR6FQZGE.mjs.map
1
+ import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-JOB7ALAF.mjs";import{a as n}from"./chunk-QJSB5NX4.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
+ //# sourceMappingURL=chunk-RA4VU3NM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-NHXPNROG.mjs";var s={[e.crossWindow]:"MultiversX Web Wallet",[e.extension]:"MultiversX Wallet Extension",[e.walletConnect]:"xPortal App",[e.ledger]:"Ledger",[e.metamask]:"MetaMask Snap",[e.passkey]:"Passkey",[e.webview]:"Webview",[e.none]:""};export{s as a};
2
- //# sourceMappingURL=chunk-I7ODJJY3.mjs.map
1
+ import{a as e}from"./chunk-OJV6XRG5.mjs";var s={[e.crossWindow]:"MultiversX Web Wallet",[e.extension]:"MultiversX Wallet Extension",[e.walletConnect]:"xPortal App",[e.ledger]:"Ledger",[e.metamask]:"MetaMask Snap",[e.passkey]:"Passkey",[e.webview]:"Webview",[e.none]:""};export{s as a};
2
+ //# sourceMappingURL=chunk-REI3WYXH.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s,d as i,h as o}from"./chunk-P2C5G6H6.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
- //# sourceMappingURL=chunk-CNWR7SER.mjs.map
1
+ import{b as s,d as i,h as o}from"./chunk-ZZDN5HHJ.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
+ //# sourceMappingURL=chunk-RIFXW4D3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as T}from"./chunk-YN5ARP6C.mjs";import{a as h}from"./chunk-SH5S4RA4.mjs";import{a as d}from"./chunk-35XMV5ZL.mjs";import{a as p}from"./chunk-YPCJBYUY.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 T(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=p({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&h({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
- //# sourceMappingURL=chunk-YQ3LRPGM.mjs.map
1
+ import{a as T}from"./chunk-QWIXKUDO.mjs";import{a as h}from"./chunk-DVY6YKH6.mjs";import{a as d}from"./chunk-AFEGGHNM.mjs";import{a as p}from"./chunk-LUDF7ZUR.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 T(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=p({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&h({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
+ //# sourceMappingURL=chunk-S75GQPJQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-LOEJYVD2.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
- //# sourceMappingURL=chunk-BVYTCDU6.mjs.map
1
+ import{a as e}from"./chunk-XOWM53LI.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
+ //# sourceMappingURL=chunk-SHDTJ5GB.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-DOUNJCQ4.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
- //# sourceMappingURL=chunk-FUYWIC54.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-JOB7ALAF.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
+ //# sourceMappingURL=chunk-SNBLSIKQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-EDSX3LFL.mjs";import{a as s}from"./chunk-QATM2UUN.mjs";import{a as h}from"./chunk-B2RDSGON.mjs";import{a as k}from"./chunk-6F2QKI7Q.mjs";import{b as I}from"./chunk-QP2EL7IE.mjs";import{g as p}from"./chunk-DOUNJCQ4.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-NHXPNROG.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({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:L({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}),I({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
- //# sourceMappingURL=chunk-JSUJOYYB.mjs.map
1
+ import{a as A}from"./chunk-LYTZPES3.mjs";import{a as s}from"./chunk-XZVYUFVM.mjs";import{a as h}from"./chunk-3OKWBJFM.mjs";import{a as k}from"./chunk-J75OEBAP.mjs";import{b as I}from"./chunk-FS2F24A7.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{g as p}from"./chunk-JOB7ALAF.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-OJV6XRG5.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({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:L({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}),I({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
+ //# sourceMappingURL=chunk-TAQN5HUK.mjs.map
@@ -0,0 +1,2 @@
1
+ var o=typeof window<"u"?window:{},n="5.0.0-alpha.11";export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-U6KSTPE7.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.0.0-alpha.10'; // 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.0.0-alpha.11'; // 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 r}from"./chunk-XKOORMTN.mjs";import{a as s}from"./chunk-GMBSZ4AZ.mjs";import{a as o}from"./chunk-2SOS3KAT.mjs";function p(e){return Array.from(new Set([...s(e),...r(e),o(e)])).filter(t=>!!t)}export{p as a};
2
+ //# sourceMappingURL=chunk-UAW7SD6P.mjs.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-WHEXX3BD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as I}from"./chunk-5AR7YU5K.mjs";import{a as l}from"./chunk-OUNMWRYD.mjs";import{a as f}from"./chunk-6F2QKI7Q.mjs";import{j as T,k as m,l as d,n as p}from"./chunk-65L5EBBL.mjs";import{a as u}from"./chunk-YQ3LRPGM.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=f(),F=l();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await u({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=p(s),E=d(s),L=m(s),i=A||E||L,v=T(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
2
- //# sourceMappingURL=chunk-C5TNEYN6.mjs.map
1
+ import{a as I}from"./chunk-5AR7YU5K.mjs";import{a as l}from"./chunk-DICSPHT2.mjs";import{a as f}from"./chunk-J75OEBAP.mjs";import{j as T,k as m,l as d,n as p}from"./chunk-65L5EBBL.mjs";import{a as u}from"./chunk-S75GQPJQ.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=f(),F=l();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await u({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=p(s),E=d(s),L=m(s),i=A||E||L,v=T(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
2
+ //# sourceMappingURL=chunk-WMY46KJS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-VSUCRJYB.mjs";import{a as k}from"./chunk-P5RR3CVM.mjs";import{s as f}from"./chunk-DOUNJCQ4.mjs";import{d as b}from"./chunk-QJSB5NX4.mjs";import{c as n}from"./chunk-7WTWD4TL.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-7ECP7Y7M.mjs.map
1
+ import{a as g}from"./chunk-ASRYY6T3.mjs";import{a as k}from"./chunk-3YK6SW7E.mjs";import{s as f}from"./chunk-JOB7ALAF.mjs";import{d as b}from"./chunk-QJSB5NX4.mjs";import{c as n}from"./chunk-HTVULYKB.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-X4ZYTNNA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-DEMKQ3CQ.mjs";import{a as ce}from"./chunk-IEJARRBP.mjs";import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as oe}from"./chunk-JSUJOYYB.mjs";import{a as R}from"./chunk-EDSX3LFL.mjs";import{a as ne}from"./chunk-KPDCSGZD.mjs";import{a as ie}from"./chunk-IJB6XDNR.mjs";import{a as T}from"./chunk-CNUQX7FI.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as le}from"./chunk-FPHLXGAT.mjs";import{a as p}from"./chunk-445MWKMT.mjs";import{a as re}from"./chunk-BVYTCDU6.mjs";import{a as ae}from"./chunk-5W4JJSFM.mjs";import{a as se}from"./chunk-VCGAO6HH.mjs";import{a as ee}from"./chunk-FFNSZC37.mjs";import{b as $}from"./chunk-4Z3DZ2A3.mjs";import{e as f,f as Z}from"./chunk-FFHVVGYW.mjs";import{i as P,n as b,o as C,p as I}from"./chunk-P2C5G6H6.mjs";import{g as J}from"./chunk-QD3CFFVT.mjs";import{a as Y}from"./chunk-6DNPTAY5.mjs";import{a as Q}from"./chunk-CEDRWVRS.mjs";import{a as U,s as K,u as d}from"./chunk-DOUNJCQ4.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as q,c as F,d as j}from"./chunk-IEJTMYFW.mjs";import{a as B}from"./chunk-QJSB5NX4.mjs";import{b as L,c as H}from"./chunk-SAAOQW7P.mjs";import{a as z}from"./chunk-VMFJUT3G.mjs";import{a as c}from"./chunk-I7ODJJY3.mjs";import{b as X}from"./chunk-SYQ7SILM.mjs";import{a as o}from"./chunk-NHXPNROG.mjs";import{a as S}from"./chunk-KRBUXJ6B.mjs";import{IframeLoginTypes as me}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var w=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 oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!T())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ae({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 pe({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw P({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 z(S),await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ne({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,W=class a{constructor(){this.store=K();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let{providerType:i}=G(this.store.getState()),e=B(this.store.getState()).address;return!!(i===o.ledger&&e)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=$(d());if(!(!this.shouldCheckConnection()||i))try{await I().getProvider().getAddress()}catch{if(P({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,fe)}},ue))};this.getLedgerAddress=async()=>this.shouldCheckConnection()?await I().getProvider().getAddress():void 0;this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new w({shouldInitProvider:!0});await i.init();let e=new b(i);i.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,P({toastId:"ledger-provider-idle-warning",duration:we,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 _=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();this.setPopupConsent();try{let n=await this.provider.signTransactions(e)??[];return await se(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 this.setPopupConsent(),await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.setPopupConsent=()=>{let e=j(d());if(!this.provider)throw new Error("Provider is not initialized.");(e?.isBrowserWithPopupConfirmation||X)&&this.provider.setShouldShowConsentPopup(!0)};this.walletAddress=e?.walletAddress,this.provider=ee.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=L(d()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.setPopupConsent(),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 ye}from"@multiversx/sdk-extension-provider/out/extensionProvider";var x=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=ye.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 Pe={passkey:o.passkey,metamask:o.metamask},E=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=L(d());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 Pe[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 ge}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[f.CANCEL_ACTION,f.SIGN_LOGIN_TOKEN],O=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;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}),await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION}),n}finally{r.closeUI()}};this.cancelAction=async()=>{await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION})};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.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 z(S),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});this._approval=n,A.getInstance().updateData({wcURI:t})}async initWalletConnectManager(){if(!!T())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=T(),t=H(d());if(q(d())&&ve.push(f.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:v=>{}};try{let{walletConnectV2ProjectId:v,walletConnectV2Options:N={},walletConnectV2RelayAddress:D=""}=e,y=new Z(h,t,D,v,N);return await y.init(),{walletConnectProvider:y,dappMethods:ve}}catch(v){throw console.error("Unable to connect",v),r&&await this.logout(),v}}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=A.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods});t.updateData({wcURI:n});let l=await this.provider.login({approval:s,token:e?.token}),{address:m="",signature:h=""}=l??{};return t.handleClose({isLoginFinished:!!m}),{address:m,signature:h}}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 A.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 M=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 x;break}case o.crossWindow:{r=new _;break}case o.ledger:{r=new w({anchor:e}),await W.getInstance().init();break}case o.metamask:{r=new E({type:me.metamask});break}case o.passkey:{r=new E({type:me.passkey});break}case o.walletConnect:{let s=F(d());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new O({anchor:e,...s});break}case o.webview:{r=new le;break}default:{let s=Y();for(let l of this._customProviders)l.type===i&&(r=await l.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new b(r);C(t),U(i);let n=i in[o.crossWindow,o.metamask,o.passkey];return ce(n?{skipLoginMethod:i}:null),t}static async destroy(){I().cancelLogin(),C(null),U(o.none)}};M._customProviders=[];var Ie=(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:l,onClose:m}=await re({cancelAction:e}),h=Object.values(M.customProviders),v=h.reduce((u,V)=>(u[V.type]=V.name,u),{}),N={...c,...v},D=async()=>{await m({shouldCancelAction:!0}),s({message:"Signing canceled"})};l.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let y=Ie(h,r)?r:o.none;l.updateData({name:N[y],type:y});try{let u=await i(a);n(u)}catch(u){await m({shouldCancelAction:!0}),s(u)}finally{l.closeUI()}})}async function pe({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{pe as a,w as b,W as c,M as d,g as e,_ as f,x as g,E as h,O as i};
2
- //# sourceMappingURL=chunk-XOJHIJKX.mjs.map
1
+ import{a as A}from"./chunk-6LY7ZRDT.mjs";import{a as ce}from"./chunk-3U6H4VPO.mjs";import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as oe}from"./chunk-TAQN5HUK.mjs";import{a as R}from"./chunk-LYTZPES3.mjs";import{a as ne}from"./chunk-BNWGWGXY.mjs";import{a as ie}from"./chunk-ZSVNTZ3Q.mjs";import{a as T}from"./chunk-O2SZII5H.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as le}from"./chunk-EQMLAAI2.mjs";import{a as p}from"./chunk-MRJ7P7KU.mjs";import{a as ae}from"./chunk-NXV7YLV6.mjs";import{a as se}from"./chunk-7D2BEFUJ.mjs";import{a as ee}from"./chunk-FFNSZC37.mjs";import{a as re}from"./chunk-SHDTJ5GB.mjs";import{b as $}from"./chunk-4Z3DZ2A3.mjs";import{e as f,f as Z}from"./chunk-FFHVVGYW.mjs";import{i as P,n as b,o as C,p as I}from"./chunk-ZZDN5HHJ.mjs";import{g as J}from"./chunk-CAA4VJRH.mjs";import{a as Y}from"./chunk-YK4XGF57.mjs";import{a as Q}from"./chunk-AHHTRI3Y.mjs";import{a as U,s as K,u as d}from"./chunk-JOB7ALAF.mjs";import{b as L,c as H}from"./chunk-SAAOQW7P.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as q,c as F,d as j}from"./chunk-IEJTMYFW.mjs";import{a as B}from"./chunk-QJSB5NX4.mjs";import{a as z}from"./chunk-VMFJUT3G.mjs";import{b as X}from"./chunk-NKJ7OVPV.mjs";import{a as c}from"./chunk-REI3WYXH.mjs";import{a as o}from"./chunk-OJV6XRG5.mjs";import{a as S}from"./chunk-U6KSTPE7.mjs";import{IframeLoginTypes as me}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var w=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 oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!T())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ae({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 pe({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw P({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 z(S),await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ne({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,W=class a{constructor(){this.store=K();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let{providerType:i}=G(this.store.getState()),e=B(this.store.getState()).address;return!!(i===o.ledger&&e)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=$(d());if(!(!this.shouldCheckConnection()||i))try{await I().getProvider().getAddress()}catch{if(P({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,fe)}},ue))};this.getLedgerAddress=async()=>this.shouldCheckConnection()?await I().getProvider().getAddress():void 0;this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new w({shouldInitProvider:!0});await i.init();let e=new b(i);i.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,P({toastId:"ledger-provider-idle-warning",duration:we,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 _=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();this.setPopupConsent();try{let n=await this.provider.signTransactions(e)??[];return await se(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 this.setPopupConsent(),await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.setPopupConsent=()=>{let e=j(d());if(!this.provider)throw new Error("Provider is not initialized.");(e?.isBrowserWithPopupConfirmation||X)&&this.provider.setShouldShowConsentPopup(!0)};this.walletAddress=e?.walletAddress,this.provider=ee.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=L(d()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.setPopupConsent(),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 ye}from"@multiversx/sdk-extension-provider/out/extensionProvider";var x=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=ye.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 Pe={passkey:o.passkey,metamask:o.metamask},E=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=L(d());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 Pe[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 ge}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[f.CANCEL_ACTION,f.SIGN_LOGIN_TOKEN],O=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;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}),await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION}),n}finally{r.closeUI()}};this.cancelAction=async()=>{await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION})};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.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 z(S),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});this._approval=n,A.getInstance().updateData({wcURI:t})}async initWalletConnectManager(){if(!!T())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=T(),t=H(d());if(q(d())&&ve.push(f.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:v=>{}};try{let{walletConnectV2ProjectId:v,walletConnectV2Options:N={},walletConnectV2RelayAddress:D=""}=e,y=new Z(h,t,D,v,N);return await y.init(),{walletConnectProvider:y,dappMethods:ve}}catch(v){throw console.error("Unable to connect",v),r&&await this.logout(),v}}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=A.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods});t.updateData({wcURI:n});let l=await this.provider.login({approval:s,token:e?.token}),{address:m="",signature:h=""}=l??{};return t.handleClose({isLoginFinished:!!m}),{address:m,signature:h}}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 A.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 M=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 x;break}case o.crossWindow:{r=new _;break}case o.ledger:{r=new w({anchor:e}),await W.getInstance().init();break}case o.metamask:{r=new E({type:me.metamask});break}case o.passkey:{r=new E({type:me.passkey});break}case o.walletConnect:{let s=F(d());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new O({anchor:e,...s});break}case o.webview:{r=new le;break}default:{let s=Y();for(let l of this._customProviders)l.type===i&&(r=await l.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new b(r);C(t),U(i);let n=i in[o.crossWindow,o.metamask,o.passkey];return ce(n?{skipLoginMethod:i}:null),t}static async destroy(){I().cancelLogin(),C(null),U(o.none)}};M._customProviders=[];var Ie=(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:l,onClose:m}=await re({cancelAction:e}),h=Object.values(M.customProviders),v=h.reduce((u,V)=>(u[V.type]=V.name,u),{}),N={...c,...v},D=async()=>{await m({shouldCancelAction:!0}),s({message:"Signing canceled"})};l.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let y=Ie(h,r)?r:o.none;l.updateData({name:N[y],type:y});try{let u=await i(a);n(u)}catch(u){await m({shouldCancelAction:!0}),s(u)}finally{l.closeUI()}})}async function pe({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{pe as a,w as b,W as c,M as d,g as e,_ as f,x as g,E as h,O as i};
2
+ //# sourceMappingURL=chunk-XGV7BGBC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-NBDECUQ3.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-LOEJYVD2.mjs.map
1
+ import{a as t}from"./chunk-N6SD2OVU.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-XOWM53LI.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as o}from"./chunk-JOB7ALAF.mjs";import{a as t}from"./chunk-SAAOQW7P.mjs";function f(r=o()){return t(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-XXKSDA5P.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-JKSF2U3C.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-J4CPYFK6.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
- //# sourceMappingURL=chunk-QATM2UUN.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-XXKSDA5P.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-J4CPYFK6.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
+ //# sourceMappingURL=chunk-XZVYUFVM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-ZK5BKLTG.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-QM67ZEC5.mjs.map
1
+ import{a as l}from"./chunk-HCDOXUDA.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-Y53MWKLT.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as u}from"./chunk-L3MWDI6J.mjs";import{s as i}from"./chunk-JOB7ALAF.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
2
+ //# sourceMappingURL=chunk-YEAVK4T2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/actions/transactions/transactionsActions.ts"],
4
+ "sourcesContent": ["import { getTransactionsSessionStatus } from 'managers/TransactionManager/helpers/getTransactionsStatus';\nimport { getStore } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport {\n TransactionsDisplayInfoType,\n SignedTransactionType\n} from 'types/transactions.types';\n\nexport type CreateTransactionsSessionType = {\n transactions: SignedTransactionType[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n status: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n sessionInformation?: any;\n};\n\nexport const createTransactionsSession = ({\n transactions,\n transactionsDisplayInfo,\n status,\n sessionInformation\n}: CreateTransactionsSessionType) => {\n const sessionId = Date.now().toString();\n getStore().setState(\n ({ transactions: state }) => {\n state[sessionId] = {\n transactions,\n status,\n transactionsDisplayInfo,\n interpretedTransactions: {},\n sessionInformation\n };\n },\n false,\n 'createTransactionsSession'\n );\n return sessionId;\n};\n\nexport const updateSessionStatus = ({\n sessionId,\n status,\n errorMessage\n}: {\n sessionId: string;\n status: TransactionBatchStatusesEnum;\n errorMessage?: string;\n}) => {\n getStore().setState(\n ({ transactions: state }) => {\n state[sessionId].status = status;\n state[sessionId].errorMessage = errorMessage;\n },\n false,\n 'updateTransactionsSession'\n );\n};\n\nexport const updateTransactionStatus = ({\n sessionId,\n transaction: updatedTransaction\n}: {\n sessionId: string;\n transaction: SignedTransactionType;\n}): TransactionBatchStatusesEnum | null => {\n let newStatus: TransactionBatchStatusesEnum | null = null;\n getStore().setState(\n ({ transactions: state }) => {\n const transactions = state[sessionId]?.transactions;\n if (transactions != null) {\n state[sessionId].transactions = transactions.map((transaction) => {\n if (transaction.hash === updatedTransaction.hash) {\n return {\n ...transaction,\n ...(updatedTransaction ?? {})\n };\n }\n return transaction;\n });\n\n const status = getTransactionsSessionStatus([\n ...state[sessionId].transactions // Create a copy of the transactions array to avoid Proxy issues\n ]);\n\n if (status) {\n updateSessionStatus({\n sessionId,\n status\n });\n newStatus = status;\n }\n }\n },\n false,\n 'updateTransactionStatus'\n );\n\n return newStatus;\n};\n\nexport const clearCompletedTransactions = () => {\n getStore().setState(\n ({ transactions: state, toasts: toastsState }) => {\n const sessionIds = Object.keys(state);\n\n const completedSessionIds = sessionIds.filter((sessionId) => {\n const session = state[sessionId];\n if (!session) {\n return false;\n }\n\n const { status } = session;\n\n const isPending =\n status === TransactionServerStatusesEnum.pending ||\n status === TransactionBatchStatusesEnum.signed ||\n status === TransactionBatchStatusesEnum.sent;\n\n return !isPending;\n });\n\n completedSessionIds.forEach((sessionId) => {\n delete state[sessionId];\n });\n\n const filteredTransactionToasts = toastsState.transactionToasts.filter(\n (toast) => !completedSessionIds.includes(toast.toastId)\n );\n\n toastsState.transactionToasts = filteredTransactionToasts;\n },\n false,\n 'clearCompletedTransactions'\n );\n};\n"],
5
+ "mappings": "kFAkBO,IAAMA,EAA4B,CAAC,CACxC,aAAAC,EACA,wBAAAC,EACA,OAAAC,EACA,mBAAAC,CACF,IAAqC,CACnC,IAAMC,EAAY,KAAK,IAAI,EAAE,SAAS,EACtC,OAAAC,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3BA,EAAMF,CAAS,EAAI,CACjB,aAAAJ,EACA,OAAAE,EACA,wBAAAD,EACA,wBAAyB,CAAC,EAC1B,mBAAAE,CACF,CACF,EACA,GACA,2BACF,EACOC,CACT,EAEaG,EAAsB,CAAC,CAClC,UAAAH,EACA,OAAAF,EACA,aAAAM,CACF,IAIM,CACJH,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3BA,EAAMF,CAAS,EAAE,OAASF,EAC1BI,EAAMF,CAAS,EAAE,aAAeI,CAClC,EACA,GACA,2BACF,CACF,EAEaC,EAA0B,CAAC,CACtC,UAAAL,EACA,YAAaM,CACf,IAG2C,CACzC,IAAIC,EAAiD,KACrD,OAAAN,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3B,IAAMN,EAAeM,EAAMF,CAAS,GAAG,aACvC,GAAIJ,GAAgB,KAAM,CACxBM,EAAMF,CAAS,EAAE,aAAeJ,EAAa,IAAKY,GAC5CA,EAAY,OAASF,EAAmB,KACnC,CACL,GAAGE,EACH,GAAIF,GAAsB,CAAC,CAC7B,EAEKE,CACR,EAED,IAAMV,EAASW,EAA6B,CAC1C,GAAGP,EAAMF,CAAS,EAAE,YACtB,CAAC,EAEGF,IACFK,EAAoB,CAClB,UAAAH,EACA,OAAAF,CACF,CAAC,EACDS,EAAYT,EAEhB,CACF,EACA,GACA,yBACF,EAEOS,CACT,EAEaG,EAA6B,IAAM,CAC9CT,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,EAAO,OAAQS,CAAY,IAAM,CAGhD,IAAMC,EAFa,OAAO,KAAKV,CAAK,EAEG,OAAQF,GAAc,CAC3D,IAAMa,EAAUX,EAAMF,CAAS,EAC/B,GAAI,CAACa,EACH,MAAO,GAGT,GAAM,CAAE,OAAAf,CAAO,EAAIe,EAOnB,MAAO,EAJLf,eACAA,cACAA,WAGJ,CAAC,EAEDc,EAAoB,QAASZ,GAAc,CACzC,OAAOE,EAAMF,CAAS,CACxB,CAAC,EAED,IAAMc,EAA4BH,EAAY,kBAAkB,OAC7DI,GAAU,CAACH,EAAoB,SAASG,EAAM,OAAO,CACxD,EAEAJ,EAAY,kBAAoBG,CAClC,EACA,GACA,4BACF,CACF",
6
+ "names": ["createTransactionsSession", "transactions", "transactionsDisplayInfo", "status", "sessionInformation", "sessionId", "getStore", "state", "updateSessionStatus", "errorMessage", "updateTransactionStatus", "updatedTransaction", "newStatus", "transaction", "getTransactionsSessionStatus", "clearCompletedTransactions", "toastsState", "completedSessionIds", "session", "filteredTransactionToasts", "toast"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{u as t}from"./chunk-JOB7ALAF.mjs";import{c as r}from"./chunk-QJSB5NX4.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-YK4XGF57.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as o}from"./chunk-JOB7ALAF.mjs";import{b as t}from"./chunk-QJSB5NX4.mjs";function c(r=o()){return t(r)}export{c as a};
2
+ //# sourceMappingURL=chunk-YLN3OBBP.mjs.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-YUITECZ5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-4TBVQD27.mjs";import{s as o}from"./chunk-DOUNJCQ4.mjs";var l=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>o().setState(({config:e})=>{let s=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,i=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:i,walletConnectV2RelayAddress:s}},!1,"setWalletConnectConfig"),r=t=>o().setState(({config:e})=>{e.crossWindowConfig=t},!1,"setCrossWindowConfig");export{l as a,c as b,f as c,r as d};
2
- //# sourceMappingURL=chunk-ZHIYA3M7.mjs.map
1
+ import{a as n}from"./chunk-4TBVQD27.mjs";import{s as o}from"./chunk-JOB7ALAF.mjs";var l=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>o().setState(({config:e})=>{let s=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,i=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:i,walletConnectV2RelayAddress:s}},!1,"setWalletConnectConfig"),r=t=>o().setState(({config:e})=>{e.crossWindowConfig=t},!1,"setCrossWindowConfig");export{l as a,c as b,f as c,r as d};
2
+ //# sourceMappingURL=chunk-YV2TRFYW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6DNPTAY5.mjs";import{c as o,g as n}from"./chunk-R53MCZI6.mjs";import{a as r}from"./chunk-NHXPNROG.mjs";async function M({message:i,provider:s,options:e}){let t=a(),d=new n({address:new o(t),data:i.data});return e?.hasConsentPopup&&s.getType()===r.crossWindow&&s.setShouldShowConsentPopup(!0),await s.signMessage(d,e)}export{M as a};
2
- //# sourceMappingURL=chunk-TEPQ5G4B.mjs.map
1
+ import{a}from"./chunk-YK4XGF57.mjs";import{c as o,g as n}from"./chunk-R53MCZI6.mjs";import{a as r}from"./chunk-OJV6XRG5.mjs";async function M({message:i,provider:s,options:e}){let t=a(),d=new n({address:new o(t),data:i.data});return e?.hasConsentPopup&&s.getType()===r.crossWindow&&s.setShouldShowConsentPopup(!0),await s.signMessage(d,e)}export{M as a};
2
+ //# sourceMappingURL=chunk-YZE4ECSF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-CNUQX7FI.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{p as c}from"./chunk-P2C5G6H6.mjs";import{u as n}from"./chunk-DOUNJCQ4.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
- //# sourceMappingURL=chunk-IJB6XDNR.mjs.map
1
+ import{a as g}from"./chunk-O2SZII5H.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{p as c}from"./chunk-ZZDN5HHJ.mjs";import{u as n}from"./chunk-JOB7ALAF.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
+ //# sourceMappingURL=chunk-ZSVNTZ3Q.mjs.map
@@ -1,3 +1,3 @@
1
- import{a as t}from"./chunk-ZEUNADU7.mjs";import{a as r}from"./chunk-FEFZKA2B.mjs";var o=!1,i=e=>{o||(console.error(`Operations field missing for txHash: ${e}.
1
+ import{a as r}from"./chunk-FEFZKA2B.mjs";import{a as t}from"./chunk-ZEUNADU7.mjs";var o=!1,i=e=>{o||(console.error(`Operations field missing for txHash: ${e}.
2
2
  Unable to compute value field.`),o=!0)};function p(e){try{if(e.operations){let[a]=t(e);return r(a?.value)}else i(e.txHash)}catch{i(e.txHash)}return r(e.value)}export{p as a};
3
- //# sourceMappingURL=chunk-SJYCKFH4.mjs.map
3
+ //# sourceMappingURL=chunk-ZXIBFH6X.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-KRBUXJ6B.mjs";function t(){if(!e)return"";try{if(e.document.referrer)return new URL(e.document.referrer).origin;let r=e.location.ancestorOrigins;return r.length<1?"":new URL(r[r.length-1]).origin}catch(r){return console.error(r),""}}export{t as a};
2
- //# sourceMappingURL=chunk-XHIIMAIQ.mjs.map
1
+ import{a as e}from"./chunk-U6KSTPE7.mjs";function t(){if(!e)return"";try{if(e.document.referrer)return new URL(e.document.referrer).origin;let r=e.location.ancestorOrigins;return r.length<1?"":new URL(r[r.length-1]).origin}catch(r){return console.error(r),""}}export{t as a};
2
+ //# sourceMappingURL=chunk-ZZ53RJBO.mjs.map