@multiversx/sdk-dapp 5.6.15 → 5.6.17

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 (372) hide show
  1. package/out/__chunks__/chunk-264QHLQ6.mjs +2 -0
  2. package/out/__chunks__/{chunk-5UPKPHJ2.mjs → chunk-2GMLC2DS.mjs} +2 -2
  3. package/out/__chunks__/chunk-2YFKORNQ.mjs +2 -0
  4. package/out/__chunks__/chunk-37XA46ZD.mjs +2 -0
  5. package/out/__chunks__/{chunk-2RAHMAHQ.mjs → chunk-3OOEFQUC.mjs} +2 -2
  6. package/out/__chunks__/{chunk-3AZMMFIU.mjs → chunk-3RXJSE37.mjs} +2 -2
  7. package/out/__chunks__/{chunk-SWKXLTUP.mjs → chunk-47AYFELF.mjs} +2 -2
  8. package/out/__chunks__/{chunk-LSQTGMWH.mjs → chunk-4L7KZTJE.mjs} +2 -2
  9. package/out/__chunks__/chunk-4SG5GRKG.mjs +2 -0
  10. package/out/__chunks__/{chunk-EXZ4QLVN.mjs → chunk-5E5P6CWQ.mjs} +2 -2
  11. package/out/__chunks__/{chunk-HL4HLIE5.mjs → chunk-5FC73VMP.mjs} +2 -2
  12. package/out/__chunks__/{chunk-JN2FD4HT.mjs → chunk-5J4IWE7Q.mjs} +2 -2
  13. package/out/__chunks__/{chunk-ONZCN65M.mjs → chunk-5OI5GIVQ.mjs} +2 -2
  14. package/out/__chunks__/{chunk-DRDUVED6.mjs → chunk-64HF66JN.mjs} +2 -2
  15. package/out/__chunks__/chunk-64MTSCFM.mjs +2 -0
  16. package/out/__chunks__/{chunk-23NUXAHF.mjs → chunk-676S3ZXO.mjs} +2 -2
  17. package/out/__chunks__/{chunk-EZWFRZYN.mjs → chunk-6ISK5EQR.mjs} +2 -2
  18. package/out/__chunks__/{chunk-U5KHQ72A.mjs → chunk-7HZE5WEG.mjs} +2 -2
  19. package/out/__chunks__/chunk-A6ZFXHEW.mjs +2 -0
  20. package/out/__chunks__/{chunk-URXZDOGS.mjs → chunk-ARGJ3V72.mjs} +2 -2
  21. package/out/__chunks__/{chunk-U53CQSS6.mjs → chunk-B2B2TDUL.mjs} +2 -2
  22. package/out/__chunks__/{chunk-OUKVNDTO.mjs → chunk-BBIFIN3W.mjs} +2 -2
  23. package/out/__chunks__/{chunk-IQ4JEYZN.mjs → chunk-BCZWHACO.mjs} +2 -2
  24. package/out/__chunks__/{chunk-TTKTNM5I.mjs → chunk-C5FVAJRJ.mjs} +2 -2
  25. package/out/__chunks__/{chunk-Z7CZ3JPV.mjs → chunk-CIEMKL2O.mjs} +2 -2
  26. package/out/__chunks__/{chunk-ARRFGZVU.mjs → chunk-CY6KN5YG.mjs} +2 -2
  27. package/out/__chunks__/{chunk-KZ45U6FI.mjs → chunk-D5EZPRUN.mjs} +2 -2
  28. package/out/__chunks__/{chunk-RHQNMUZP.mjs → chunk-DJEEPI7Q.mjs} +2 -2
  29. package/out/__chunks__/{chunk-JZUCJMPD.mjs → chunk-DKSNT5LJ.mjs} +2 -2
  30. package/out/__chunks__/{chunk-RELUCG4Q.mjs → chunk-DNNIE76H.mjs} +2 -2
  31. package/out/__chunks__/{chunk-6MOS734B.mjs → chunk-E4YZV652.mjs} +2 -2
  32. package/out/__chunks__/chunk-G4EDYHSU.mjs +2 -0
  33. package/out/__chunks__/{chunk-Z5QHVSVU.mjs → chunk-GG4GZJTT.mjs} +2 -2
  34. package/out/__chunks__/{chunk-EBVPPHXD.mjs → chunk-GSUU2PBX.mjs} +2 -2
  35. package/out/__chunks__/{chunk-DYLLFNND.mjs → chunk-H3ASBOLT.mjs} +2 -2
  36. package/out/__chunks__/{chunk-6JGR42GR.mjs → chunk-I2C5F23X.mjs} +2 -2
  37. package/out/__chunks__/{chunk-PHZM3DZQ.mjs → chunk-IBJVJ7HA.mjs} +2 -2
  38. package/out/__chunks__/{chunk-SLRWSVMJ.mjs → chunk-IMKE7N5T.mjs} +2 -2
  39. package/out/__chunks__/{chunk-EIYKKF3M.mjs → chunk-IP5UKLWO.mjs} +2 -2
  40. package/out/__chunks__/chunk-IRBY2LR6.mjs +2 -0
  41. package/out/__chunks__/{chunk-PGDYOMKM.mjs → chunk-IYSSPSVB.mjs} +2 -2
  42. package/out/__chunks__/{chunk-EDBF5JW5.mjs → chunk-JG44VGD5.mjs} +2 -2
  43. package/out/__chunks__/{chunk-IL6GXHZS.mjs → chunk-JKM3XYCF.mjs} +2 -2
  44. package/out/__chunks__/{chunk-VCJHSHAR.mjs → chunk-JNW3DEA3.mjs} +2 -2
  45. package/out/__chunks__/{chunk-6CWGXDIH.mjs → chunk-JPUDVVZY.mjs} +2 -2
  46. package/out/__chunks__/{chunk-67XKVYBS.mjs → chunk-KBMUH73C.mjs} +2 -2
  47. package/out/__chunks__/{chunk-LFGMSYOO.mjs → chunk-KLKVV2YX.mjs} +2 -2
  48. package/out/__chunks__/chunk-KME5MTYJ.mjs +2 -0
  49. package/out/__chunks__/{chunk-TMS5L2BX.mjs → chunk-L34PPMTI.mjs} +2 -2
  50. package/out/__chunks__/{chunk-R7VIYF22.mjs → chunk-L7VHBKZV.mjs} +2 -2
  51. package/out/__chunks__/{chunk-5HGAEMDS.mjs → chunk-LLQX4NJE.mjs} +2 -2
  52. package/out/__chunks__/{chunk-EWTGACKQ.mjs → chunk-MFSHDWXD.mjs} +2 -2
  53. package/out/__chunks__/{chunk-5K6TCZ46.mjs → chunk-MORBVWN4.mjs} +2 -2
  54. package/out/__chunks__/{chunk-R6QS4YSC.mjs → chunk-NUZA2DSN.mjs} +2 -2
  55. package/out/__chunks__/{chunk-OSOXJQ7L.mjs → chunk-NXOMGRWS.mjs} +2 -2
  56. package/out/__chunks__/{chunk-ZXTGV6LH.mjs → chunk-OJ4YA7YX.mjs} +2 -2
  57. package/out/__chunks__/{chunk-4K5OAI42.mjs → chunk-P5XJESSE.mjs} +2 -2
  58. package/out/__chunks__/{chunk-VR3G4SRA.mjs → chunk-PES47F5C.mjs} +2 -2
  59. package/out/__chunks__/{chunk-NESRAOKG.mjs → chunk-QBZAZ6WB.mjs} +2 -2
  60. package/out/__chunks__/{chunk-WQYSQ4EF.mjs → chunk-QRNPEDC4.mjs} +2 -2
  61. package/out/__chunks__/{chunk-PG2AWYWU.mjs → chunk-R25SH3F4.mjs} +2 -2
  62. package/out/__chunks__/{chunk-IUC57EHK.mjs → chunk-RJU2PPYB.mjs} +2 -2
  63. package/out/__chunks__/chunk-RQCJMSAJ.mjs +2 -0
  64. package/out/__chunks__/{chunk-KSUOXAPQ.mjs → chunk-RSJBTSUT.mjs} +2 -2
  65. package/out/__chunks__/{chunk-LCJQISJT.mjs → chunk-TBB5SD2F.mjs} +2 -2
  66. package/out/__chunks__/{chunk-MWGEADCR.mjs → chunk-TFJT3FQL.mjs} +2 -2
  67. package/out/__chunks__/{chunk-IGLH526P.mjs → chunk-TMIEU2IG.mjs} +2 -2
  68. package/out/__chunks__/{chunk-MC3TSFCJ.mjs → chunk-TQIR4R7A.mjs} +2 -2
  69. package/out/__chunks__/{chunk-BN6HEM6G.mjs → chunk-UC5L5622.mjs} +2 -2
  70. package/out/__chunks__/{chunk-DZOKHLCE.mjs → chunk-UCOMADXM.mjs} +2 -2
  71. package/out/__chunks__/{chunk-PNSPGKFK.mjs → chunk-UMPEMJY4.mjs} +2 -2
  72. package/out/__chunks__/{chunk-T7WRX2RA.mjs → chunk-UWO2OMPK.mjs} +2 -2
  73. package/out/__chunks__/{chunk-UOOERNTG.mjs → chunk-V2A5JSZZ.mjs} +2 -2
  74. package/out/__chunks__/{chunk-WOVX745N.mjs → chunk-VBOB5XLW.mjs} +2 -2
  75. package/out/__chunks__/chunk-VI5FQEZN.mjs +2 -0
  76. package/out/__chunks__/{chunk-O7YBYBL6.mjs → chunk-VIQEU6ZA.mjs} +2 -2
  77. package/out/__chunks__/chunk-VKA6F7QH.mjs +2 -0
  78. package/out/__chunks__/{chunk-SNMXP45N.mjs → chunk-VRVJA2UC.mjs} +2 -2
  79. package/out/__chunks__/chunk-WKWRP3PH.mjs +2 -0
  80. package/out/__chunks__/{chunk-NGZ4MN3D.mjs.map → chunk-WKWRP3PH.mjs.map} +1 -1
  81. package/out/__chunks__/{chunk-PVD6WIOT.mjs → chunk-XY2LABQZ.mjs} +2 -2
  82. package/out/__chunks__/{chunk-7XW6FDWR.mjs → chunk-XZIQUMYI.mjs} +2 -2
  83. package/out/__chunks__/chunk-YANGTW26.mjs +2 -0
  84. package/out/__chunks__/{chunk-G6ZLQ2G3.mjs → chunk-YNPRZVAK.mjs} +2 -2
  85. package/out/__chunks__/{chunk-CXPHKFIO.mjs → chunk-YPWANG47.mjs} +2 -2
  86. package/out/__chunks__/{chunk-AIX4KC5I.mjs → chunk-ZCTSX5A6.mjs} +2 -2
  87. package/out/__chunks__/{chunk-YW5OBEEO.mjs → chunk-ZHWSTQEI.mjs} +2 -2
  88. package/out/__chunks__/chunk-ZTQ2OP6M.mjs +2 -0
  89. package/out/__chunks__/{chunk-ER3UZZ3N.mjs → chunk-ZTVEY37I.mjs} +2 -2
  90. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  91. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  92. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  93. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  94. package/out/apiCalls/economics/getEconomics.mjs +1 -1
  95. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  96. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  97. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  98. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  99. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  100. package/out/constants/browser.constants.mjs +1 -1
  101. package/out/constants/storage.constants.mjs +1 -1
  102. package/out/constants/window.constants.cjs +1 -1
  103. package/out/constants/window.constants.cjs.map +1 -1
  104. package/out/constants/window.constants.mjs +1 -1
  105. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  106. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  107. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  108. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  109. package/out/lib/sdkDappUi.mjs +1 -1
  110. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  111. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  112. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  113. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  114. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  115. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  116. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  117. package/out/managers/ToastManager/index.mjs +1 -1
  118. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  119. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  120. package/out/managers/TransactionManager/index.mjs +1 -1
  121. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  122. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  123. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  124. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  125. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  126. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  127. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  128. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  129. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  130. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  131. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  132. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  133. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  134. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  135. package/out/methods/account/getAccount.mjs +1 -1
  136. package/out/methods/account/getAccountInfo.mjs +1 -1
  137. package/out/methods/account/getAddress.mjs +1 -1
  138. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  139. package/out/methods/account/getLatestNonce.mjs +1 -1
  140. package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
  141. package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
  142. package/out/methods/initApp/initApp.mjs +1 -1
  143. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  144. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  145. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  146. package/out/methods/network/getEgldLabel.mjs +1 -1
  147. package/out/methods/network/getExplorerAddress.mjs +1 -1
  148. package/out/methods/network/getNetworkConfig.mjs +1 -1
  149. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  150. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
  151. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
  152. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
  153. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
  154. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
  155. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  156. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  157. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  158. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  159. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  160. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  161. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  162. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  163. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  164. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  165. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  166. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  167. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  168. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  169. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  170. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
  171. package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
  172. package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
  173. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  174. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  175. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  176. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  177. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  178. package/out/providers/DappProvider/index.mjs +1 -1
  179. package/out/providers/ProviderFactory.mjs +1 -1
  180. package/out/providers/helpers/accountProvider.mjs +1 -1
  181. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  182. package/out/providers/helpers/restoreProvider.mjs +1 -1
  183. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  184. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  185. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  186. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  187. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  188. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  189. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  190. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  191. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
  192. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
  193. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  194. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
  195. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
  196. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
  197. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
  198. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  199. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  200. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  201. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  202. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  203. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  204. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  205. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  206. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  207. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  208. package/out/providers/strategies/helpers/index.mjs +1 -1
  209. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  210. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  211. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  212. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  213. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  214. package/out/react/account/useGetAccount.mjs +1 -1
  215. package/out/react/account/useGetAccountInfo.mjs +1 -1
  216. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  217. package/out/react/account/useGetLatestNonce.mjs +1 -1
  218. package/out/react/index.mjs +1 -1
  219. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  220. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  221. package/out/react/store/getReactStore.mjs +1 -1
  222. package/out/react/store/useSelector.mjs +1 -1
  223. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  224. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  225. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  226. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  227. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  228. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  229. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  230. package/out/services/nativeAuth/index.mjs +1 -1
  231. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  232. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  233. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  234. package/out/store/actions/account/accountActions.mjs +1 -1
  235. package/out/store/actions/account/index.mjs +1 -1
  236. package/out/store/actions/cache/cacheActions.mjs +1 -1
  237. package/out/store/actions/cache/index.mjs +1 -1
  238. package/out/store/actions/config/configActions.mjs +1 -1
  239. package/out/store/actions/config/index.mjs +1 -1
  240. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  241. package/out/store/actions/network/index.mjs +1 -1
  242. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  243. package/out/store/actions/network/networkActions.mjs +1 -1
  244. package/out/store/actions/sharedActions/index.mjs +1 -1
  245. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  246. package/out/store/actions/toasts/index.mjs +1 -1
  247. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  248. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  249. package/out/store/actions/ui/index.mjs +1 -1
  250. package/out/store/actions/ui/uiActions.mjs +1 -1
  251. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  252. package/out/store/middleware/index.mjs +1 -1
  253. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  254. package/out/store/storage/index.mjs +1 -1
  255. package/out/store/storage/storageCallback.mjs +1 -1
  256. package/out/store/store.mjs +1 -1
  257. package/out/utils/ComponentFactory.mjs +1 -1
  258. package/out/utils/account/fetchAccount.mjs +1 -1
  259. package/out/utils/account/refreshAccount.mjs +1 -1
  260. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  261. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  262. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  263. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  264. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  265. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  266. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  267. package/out/utils/visual/switchTheme.mjs +1 -1
  268. package/out/utils/window/getIsInIframe.mjs +1 -1
  269. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  270. package/package.json +2 -2
  271. package/out/__chunks__/chunk-3LUX7BLO.mjs +0 -2
  272. package/out/__chunks__/chunk-52TSBBIT.mjs +0 -2
  273. package/out/__chunks__/chunk-5Z3PJJJG.mjs +0 -2
  274. package/out/__chunks__/chunk-6K72GWPV.mjs +0 -2
  275. package/out/__chunks__/chunk-72GVZOXP.mjs +0 -2
  276. package/out/__chunks__/chunk-7LPZWRM5.mjs +0 -2
  277. package/out/__chunks__/chunk-CZNMVOTE.mjs +0 -2
  278. package/out/__chunks__/chunk-J2AGCQ2K.mjs +0 -2
  279. package/out/__chunks__/chunk-KN5R5TUO.mjs +0 -2
  280. package/out/__chunks__/chunk-LJJVV434.mjs +0 -2
  281. package/out/__chunks__/chunk-NGZ4MN3D.mjs +0 -2
  282. package/out/__chunks__/chunk-QLBLLXSR.mjs +0 -2
  283. package/out/__chunks__/chunk-VK2YHJXJ.mjs +0 -2
  284. package/out/__chunks__/chunk-WBTUSJNL.mjs +0 -2
  285. package/out/__chunks__/chunk-WYLU3B54.mjs +0 -2
  286. /package/out/__chunks__/{chunk-CZNMVOTE.mjs.map → chunk-264QHLQ6.mjs.map} +0 -0
  287. /package/out/__chunks__/{chunk-5UPKPHJ2.mjs.map → chunk-2GMLC2DS.mjs.map} +0 -0
  288. /package/out/__chunks__/{chunk-LJJVV434.mjs.map → chunk-2YFKORNQ.mjs.map} +0 -0
  289. /package/out/__chunks__/{chunk-6K72GWPV.mjs.map → chunk-37XA46ZD.mjs.map} +0 -0
  290. /package/out/__chunks__/{chunk-2RAHMAHQ.mjs.map → chunk-3OOEFQUC.mjs.map} +0 -0
  291. /package/out/__chunks__/{chunk-3AZMMFIU.mjs.map → chunk-3RXJSE37.mjs.map} +0 -0
  292. /package/out/__chunks__/{chunk-SWKXLTUP.mjs.map → chunk-47AYFELF.mjs.map} +0 -0
  293. /package/out/__chunks__/{chunk-LSQTGMWH.mjs.map → chunk-4L7KZTJE.mjs.map} +0 -0
  294. /package/out/__chunks__/{chunk-52TSBBIT.mjs.map → chunk-4SG5GRKG.mjs.map} +0 -0
  295. /package/out/__chunks__/{chunk-EXZ4QLVN.mjs.map → chunk-5E5P6CWQ.mjs.map} +0 -0
  296. /package/out/__chunks__/{chunk-HL4HLIE5.mjs.map → chunk-5FC73VMP.mjs.map} +0 -0
  297. /package/out/__chunks__/{chunk-JN2FD4HT.mjs.map → chunk-5J4IWE7Q.mjs.map} +0 -0
  298. /package/out/__chunks__/{chunk-ONZCN65M.mjs.map → chunk-5OI5GIVQ.mjs.map} +0 -0
  299. /package/out/__chunks__/{chunk-DRDUVED6.mjs.map → chunk-64HF66JN.mjs.map} +0 -0
  300. /package/out/__chunks__/{chunk-72GVZOXP.mjs.map → chunk-64MTSCFM.mjs.map} +0 -0
  301. /package/out/__chunks__/{chunk-23NUXAHF.mjs.map → chunk-676S3ZXO.mjs.map} +0 -0
  302. /package/out/__chunks__/{chunk-EZWFRZYN.mjs.map → chunk-6ISK5EQR.mjs.map} +0 -0
  303. /package/out/__chunks__/{chunk-U5KHQ72A.mjs.map → chunk-7HZE5WEG.mjs.map} +0 -0
  304. /package/out/__chunks__/{chunk-WBTUSJNL.mjs.map → chunk-A6ZFXHEW.mjs.map} +0 -0
  305. /package/out/__chunks__/{chunk-URXZDOGS.mjs.map → chunk-ARGJ3V72.mjs.map} +0 -0
  306. /package/out/__chunks__/{chunk-U53CQSS6.mjs.map → chunk-B2B2TDUL.mjs.map} +0 -0
  307. /package/out/__chunks__/{chunk-OUKVNDTO.mjs.map → chunk-BBIFIN3W.mjs.map} +0 -0
  308. /package/out/__chunks__/{chunk-IQ4JEYZN.mjs.map → chunk-BCZWHACO.mjs.map} +0 -0
  309. /package/out/__chunks__/{chunk-TTKTNM5I.mjs.map → chunk-C5FVAJRJ.mjs.map} +0 -0
  310. /package/out/__chunks__/{chunk-Z7CZ3JPV.mjs.map → chunk-CIEMKL2O.mjs.map} +0 -0
  311. /package/out/__chunks__/{chunk-ARRFGZVU.mjs.map → chunk-CY6KN5YG.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-KZ45U6FI.mjs.map → chunk-D5EZPRUN.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-RHQNMUZP.mjs.map → chunk-DJEEPI7Q.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-JZUCJMPD.mjs.map → chunk-DKSNT5LJ.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-RELUCG4Q.mjs.map → chunk-DNNIE76H.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-6MOS734B.mjs.map → chunk-E4YZV652.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-5Z3PJJJG.mjs.map → chunk-G4EDYHSU.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-Z5QHVSVU.mjs.map → chunk-GG4GZJTT.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-EBVPPHXD.mjs.map → chunk-GSUU2PBX.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-DYLLFNND.mjs.map → chunk-H3ASBOLT.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-6JGR42GR.mjs.map → chunk-I2C5F23X.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-PHZM3DZQ.mjs.map → chunk-IBJVJ7HA.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-SLRWSVMJ.mjs.map → chunk-IMKE7N5T.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-EIYKKF3M.mjs.map → chunk-IP5UKLWO.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-QLBLLXSR.mjs.map → chunk-IRBY2LR6.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-PGDYOMKM.mjs.map → chunk-IYSSPSVB.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-EDBF5JW5.mjs.map → chunk-JG44VGD5.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-IL6GXHZS.mjs.map → chunk-JKM3XYCF.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-VCJHSHAR.mjs.map → chunk-JNW3DEA3.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-6CWGXDIH.mjs.map → chunk-JPUDVVZY.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-67XKVYBS.mjs.map → chunk-KBMUH73C.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-LFGMSYOO.mjs.map → chunk-KLKVV2YX.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-3LUX7BLO.mjs.map → chunk-KME5MTYJ.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-TMS5L2BX.mjs.map → chunk-L34PPMTI.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-R7VIYF22.mjs.map → chunk-L7VHBKZV.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-5HGAEMDS.mjs.map → chunk-LLQX4NJE.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-EWTGACKQ.mjs.map → chunk-MFSHDWXD.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-5K6TCZ46.mjs.map → chunk-MORBVWN4.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-R6QS4YSC.mjs.map → chunk-NUZA2DSN.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-OSOXJQ7L.mjs.map → chunk-NXOMGRWS.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-ZXTGV6LH.mjs.map → chunk-OJ4YA7YX.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-4K5OAI42.mjs.map → chunk-P5XJESSE.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-VR3G4SRA.mjs.map → chunk-PES47F5C.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-NESRAOKG.mjs.map → chunk-QBZAZ6WB.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-WQYSQ4EF.mjs.map → chunk-QRNPEDC4.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-PG2AWYWU.mjs.map → chunk-R25SH3F4.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-IUC57EHK.mjs.map → chunk-RJU2PPYB.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-J2AGCQ2K.mjs.map → chunk-RQCJMSAJ.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-KSUOXAPQ.mjs.map → chunk-RSJBTSUT.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-LCJQISJT.mjs.map → chunk-TBB5SD2F.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-MWGEADCR.mjs.map → chunk-TFJT3FQL.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-IGLH526P.mjs.map → chunk-TMIEU2IG.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-MC3TSFCJ.mjs.map → chunk-TQIR4R7A.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-BN6HEM6G.mjs.map → chunk-UC5L5622.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-DZOKHLCE.mjs.map → chunk-UCOMADXM.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-PNSPGKFK.mjs.map → chunk-UMPEMJY4.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-T7WRX2RA.mjs.map → chunk-UWO2OMPK.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-UOOERNTG.mjs.map → chunk-V2A5JSZZ.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-WOVX745N.mjs.map → chunk-VBOB5XLW.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-7LPZWRM5.mjs.map → chunk-VI5FQEZN.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-O7YBYBL6.mjs.map → chunk-VIQEU6ZA.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-KN5R5TUO.mjs.map → chunk-VKA6F7QH.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-SNMXP45N.mjs.map → chunk-VRVJA2UC.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-PVD6WIOT.mjs.map → chunk-XY2LABQZ.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-7XW6FDWR.mjs.map → chunk-XZIQUMYI.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-VK2YHJXJ.mjs.map → chunk-YANGTW26.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-G6ZLQ2G3.mjs.map → chunk-YNPRZVAK.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-CXPHKFIO.mjs.map → chunk-YPWANG47.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-AIX4KC5I.mjs.map → chunk-ZCTSX5A6.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-YW5OBEEO.mjs.map → chunk-ZHWSTQEI.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-WYLU3B54.mjs.map → chunk-ZTQ2OP6M.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-ER3UZZ3N.mjs.map → chunk-ZTVEY37I.mjs.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-UTWIKUIK.mjs";import{s as t}from"./chunk-KLKVV2YX.mjs";var i=(e,o)=>r(`transaction-${e}`)(o??t())??null;export{i as a};
2
+ //# sourceMappingURL=chunk-264QHLQ6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-KN5R5TUO.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-LFGMSYOO.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
- //# sourceMappingURL=chunk-5UPKPHJ2.mjs.map
1
+ import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-VKA6F7QH.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-KLKVV2YX.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
+ //# sourceMappingURL=chunk-2GMLC2DS.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-C5FVAJRJ.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-2YFKORNQ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as t}from"./chunk-KLKVV2YX.mjs";var l=e=>t().setState(({ui:a})=>{a.isSidePanelOpen=e},!1,{type:"setIsSidePanelOpen",payload:{value:e}});export{l as a};
2
+ //# sourceMappingURL=chunk-37XA46ZD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-Z7CZ3JPV.mjs";var r=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.eventHandlers=new Map;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);let s=this.eventHandlers.get(t)||[];s.push(e),this.eventHandlers.set(t,s)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}clearEventHandlers(t=Array.from(this.unsubscribeFunctions.keys())){t.forEach(e=>{(this.unsubscribeFunctions.get(e)||[]).forEach(n=>n()),this.unsubscribeFunctions.delete(e),this.eventHandlers.delete(e)})}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventHandlers.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}getEventHandlers(t){return this.eventHandlers.get(t)||[]}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 a.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{r as a};
2
- //# sourceMappingURL=chunk-2RAHMAHQ.mjs.map
1
+ import{a}from"./chunk-CIEMKL2O.mjs";var r=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.eventHandlers=new Map;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);let s=this.eventHandlers.get(t)||[];s.push(e),this.eventHandlers.set(t,s)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}clearEventHandlers(t=Array.from(this.unsubscribeFunctions.keys())){t.forEach(e=>{(this.unsubscribeFunctions.get(e)||[]).forEach(n=>n()),this.unsubscribeFunctions.delete(e),this.eventHandlers.delete(e)})}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventHandlers.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}getEventHandlers(t){return this.eventHandlers.get(t)||[]}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 a.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{r as a};
2
+ //# sourceMappingURL=chunk-3OOEFQUC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-NGZ4MN3D.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
2
- //# sourceMappingURL=chunk-3AZMMFIU.mjs.map
1
+ import{a as e}from"./chunk-WKWRP3PH.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
2
+ //# sourceMappingURL=chunk-3RXJSE37.mjs.map
@@ -1,2 +1,2 @@
1
- import{j as a,q as o}from"./chunk-LFGMSYOO.mjs";import{f as p}from"./chunk-DA76AK4I.mjs";var d=()=>o().setState(a,!1,{type:"logoutAction",payload:{value:null}}),s=({address:e,providerType:t})=>{o().setState(({account:r,loginInfo:i})=>{r.address=e,r.publicKey=new p(e).toHex(),i&&(i.providerType=t)},!1,{type:"loginAction",payload:{value:{address:e,providerType:t}}})};export{d as a,s as b};
2
- //# sourceMappingURL=chunk-SWKXLTUP.mjs.map
1
+ import{j as a,q as o}from"./chunk-KLKVV2YX.mjs";import{f as p}from"./chunk-DA76AK4I.mjs";var d=()=>o().setState(a,!1,{type:"logoutAction",payload:{value:null}}),s=({address:e,providerType:t})=>{o().setState(({account:r,loginInfo:i})=>{r.address=e,r.publicKey=new p(e).toHex(),i&&(i.providerType=t)},!1,{type:"loginAction",payload:{value:{address:e,providerType:t}}})};export{d as a,s as b};
2
+ //# sourceMappingURL=chunk-47AYFELF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-U5KHQ72A.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-RHQNMUZP.mjs";import{s as n}from"./chunk-LFGMSYOO.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
2
- //# sourceMappingURL=chunk-LSQTGMWH.mjs.map
1
+ import{a as e}from"./chunk-7HZE5WEG.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-DJEEPI7Q.mjs";import{s as n}from"./chunk-KLKVV2YX.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
2
+ //# sourceMappingURL=chunk-4L7KZTJE.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-KLKVV2YX.mjs";import{f as t}from"./chunk-FK6DWWZF.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-4SG5GRKG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-ZXTGV6LH.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
2
- //# sourceMappingURL=chunk-EXZ4QLVN.mjs.map
1
+ import{a as o}from"./chunk-OJ4YA7YX.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
2
+ //# sourceMappingURL=chunk-5E5P6CWQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-EWTGACKQ.mjs";import{a as c}from"./chunk-O5PAMBB3.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===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{l as a};
2
- //# sourceMappingURL=chunk-HL4HLIE5.mjs.map
1
+ import{a as u}from"./chunk-MFSHDWXD.mjs";import{a as c}from"./chunk-O5PAMBB3.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===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{l as a};
2
+ //# sourceMappingURL=chunk-5FC73VMP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6MOS734B.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
- //# sourceMappingURL=chunk-JN2FD4HT.mjs.map
1
+ import{a}from"./chunk-E4YZV652.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
+ //# sourceMappingURL=chunk-5J4IWE7Q.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-7XW6FDWR.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-ONZCN65M.mjs.map
1
+ import{a as t}from"./chunk-XZIQUMYI.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-5OI5GIVQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-72GVZOXP.mjs";import{f as e,g as s}from"./chunk-DA76AK4I.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
- //# sourceMappingURL=chunk-DRDUVED6.mjs.map
1
+ import{a as o}from"./chunk-64MTSCFM.mjs";import{f as e,g as s}from"./chunk-DA76AK4I.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
+ //# sourceMappingURL=chunk-64HF66JN.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-KLKVV2YX.mjs";import{c as r}from"./chunk-FK6DWWZF.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-64MTSCFM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-EBVPPHXD.mjs";import{a as p}from"./chunk-67XKVYBS.mjs";import{a as m}from"./chunk-EZWFRZYN.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-WBTUSJNL.mjs";import{b as a}from"./chunk-VCJHSHAR.mjs";import{f as i}from"./chunk-LFGMSYOO.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
- //# sourceMappingURL=chunk-23NUXAHF.mjs.map
1
+ import{a as s}from"./chunk-GSUU2PBX.mjs";import{a as p}from"./chunk-KBMUH73C.mjs";import{a as m}from"./chunk-6ISK5EQR.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-A6ZFXHEW.mjs";import{b as a}from"./chunk-JNW3DEA3.mjs";import{f as i}from"./chunk-KLKVV2YX.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
+ //# sourceMappingURL=chunk-676S3ZXO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as I}from"./chunk-PGDYOMKM.mjs";import{a as h}from"./chunk-5Z3PJJJG.mjs";import{a as x}from"./chunk-QLBLLXSR.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{f as g}from"./chunk-PJWJZHIS.mjs";import{a as f,f as b}from"./chunk-DA76AK4I.mjs";import y from"bignumber.js";var M=async({manager:e,provider:u})=>{let L=new f;if(!e||!u)throw new Error("Provider is not initialized.");let{network:l}=h(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await I({baseURL:l.apiAddress}),A=o=>o.index>=s&&o.index<s+e.addressesPerPage,O=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),p=r.filter(A),P=!!O[s];if(e.updateAccountScreen({isLoading:!P}),p.length>0){e.updateAccountScreen({accounts:p});return}try{let o=Math.floor(s/e.addressesPerPage),n=await u.getAccounts(o,e.addressesPerPage),S=n.map((t,c)=>{let i=L.getShardOfAddress(b.newFromBech32(t));return{address:t,balance:"...",index:c+s,shard:i}}),j=[...r,...S],B=n.map(t=>x({address:t,baseURL:l.apiAddress})),U=await Promise.all(B),d=j.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});U.forEach(t=>{if(!t||!a||!a.price)return;let c=new y(t.balance),i=c.dividedBy(y(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let N=w({amount:g({input:t.balance}),usd:a?.price});d[t.address].balance=i,d[t.address].usdValue=N});let m=Object.values(d).sort((t,c)=>t.index-c.index),E=m.filter(A);e.updateAllAccounts(m),e.updateAccountScreen({accounts:E,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{M as a};
2
- //# sourceMappingURL=chunk-EZWFRZYN.mjs.map
1
+ import{a as I}from"./chunk-IYSSPSVB.mjs";import{a as h}from"./chunk-G4EDYHSU.mjs";import{a as x}from"./chunk-IRBY2LR6.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{f as g}from"./chunk-PJWJZHIS.mjs";import{a as f,f as b}from"./chunk-DA76AK4I.mjs";import y from"bignumber.js";var M=async({manager:e,provider:u})=>{let L=new f;if(!e||!u)throw new Error("Provider is not initialized.");let{network:l}=h(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await I({baseURL:l.apiAddress}),A=o=>o.index>=s&&o.index<s+e.addressesPerPage,O=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),p=r.filter(A),P=!!O[s];if(e.updateAccountScreen({isLoading:!P}),p.length>0){e.updateAccountScreen({accounts:p});return}try{let o=Math.floor(s/e.addressesPerPage),n=await u.getAccounts(o,e.addressesPerPage),S=n.map((t,c)=>{let i=L.getShardOfAddress(b.newFromBech32(t));return{address:t,balance:"...",index:c+s,shard:i}}),j=[...r,...S],B=n.map(t=>x({address:t,baseURL:l.apiAddress})),U=await Promise.all(B),d=j.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});U.forEach(t=>{if(!t||!a||!a.price)return;let c=new y(t.balance),i=c.dividedBy(y(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let N=w({amount:g({input:t.balance}),usd:a?.price});d[t.address].balance=i,d[t.address].usdValue=N});let m=Object.values(d).sort((t,c)=>t.index-c.index),E=m.filter(A);e.updateAllAccounts(m),e.updateAccountScreen({accounts:E,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{M as a};
2
+ //# sourceMappingURL=chunk-6ISK5EQR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-TWYGNEQS.mjs";import{b as n,c as o}from"./chunk-RHQNMUZP.mjs";import{s}from"./chunk-LFGMSYOO.mjs";function T({sessionId:t,transaction:e}){o({sessionId:t,transaction:e});let i=s().transactions?.[t].transactions,a=r(i);return a&&n({sessionId:t,status:a}),a}export{T as a};
2
- //# sourceMappingURL=chunk-U5KHQ72A.mjs.map
1
+ import{a as r}from"./chunk-TWYGNEQS.mjs";import{b as n,c as o}from"./chunk-DJEEPI7Q.mjs";import{s}from"./chunk-KLKVV2YX.mjs";function T({sessionId:t,transaction:e}){o({sessionId:t,transaction:e});let i=s().transactions?.[t].transactions,a=r(i);return a&&n({sessionId:t,status:a}),a}export{T as a};
2
+ //# sourceMappingURL=chunk-7HZE5WEG.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-KLKVV2YX.mjs";function d(t=r()){return e(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-A6ZFXHEW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-YUFPUG5O.mjs";import{a}from"./chunk-ER3UZZ3N.mjs";import{a as c}from"./chunk-52TSBBIT.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await a({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=l(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
- //# sourceMappingURL=chunk-URXZDOGS.mjs.map
1
+ import{a as l}from"./chunk-YUFPUG5O.mjs";import{a}from"./chunk-ZTVEY37I.mjs";import{a as c}from"./chunk-4SG5GRKG.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await a({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=l(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
+ //# sourceMappingURL=chunk-ARGJ3V72.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as z}from"./chunk-SNMXP45N.mjs";import{a as H}from"./chunk-VK2YHJXJ.mjs";import{a as h}from"./chunk-Z5QHVSVU.mjs";import{a as j}from"./chunk-PGDYOMKM.mjs";import{a as O}from"./chunk-VR3G4SRA.mjs";import{a as K}from"./chunk-OMBZCVQZ.mjs";import{a as W}from"./chunk-5UPKPHJ2.mjs";import{a as X}from"./chunk-BKQQK7WP.mjs";import{a as C}from"./chunk-6K72GWPV.mjs";import{d as R}from"./chunk-V5ZSFCKJ.mjs";import{a as B}from"./chunk-KN5R5TUO.mjs";import{e as k}from"./chunk-QNYO7NI5.mjs";import{b as _}from"./chunk-7VHTZYM2.mjs";import{s as E}from"./chunk-LFGMSYOO.mjs";import{a as F,c as U,f as x}from"./chunk-PJWJZHIS.mjs";import{d as y}from"./chunk-DA76AK4I.mjs";async function On({transactions:$=[],handleSign:G,guardTransactions:L=W,options:q}){let{address:N,shard:D,username:M}=B(),u=_(E()),J=R(E()),v=H(),{allTransactions:o,parsedTransactionsByDataField:A}=X($),l=[];if(J?.isSigningUiEnabled===!1){C(!0);try{let d=[];for(let c of o){let p=await G([c.transaction]);p&&p.length>0&&d.push(p[0])}return await L(d)}finally{C(!1)}}let n=z.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let Q=async()=>{await h(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",Q),new Promise(async(d,f)=>{let c=[],p=await j({baseURL:u.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(o.map(a=>a.transaction));let S=p?.price,t=0,P=async()=>{let r=o[t]?.transaction,m=Number(r.nonce);try{n.updateIsLoading(!0);let{commonData:e,tokenTransaction:s,fungibleTransaction:i}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});s&&n.updateTokenTransaction(s),i&&n.updateNonFungibleTransaction(i.type,i),n.updateCommonData(e)}catch(e){throw console.error(`Error fetching common data for transaction at index ${t}:`,e),e}finally{n.updateIsLoading(!1)}},V=()=>{t>0&&(t--,P())},Y=(a=1e9)=>{let m=o[t].transaction,e=Number(m.nonce);n.updateGasPriceMap({nonce:e,gasPriceOption:a});let s=m.toPlainObject(),i=y.newFromPlainObject({...s,gasPrice:a}),g=K({transaction:i,price:S}),I=x({input:a.toString(),decimals:U,addCommas:!0,digits:F});n.updateCommonData({feeLimit:g.feeLimitFormatted,feeInFiatLimit:g.feeInFiatLimit,gasPrice:I,gasPriceOption:a})},Z=async()=>{f(new Error("Transaction signing cancelled by user")),await h(),n.closeUI()},w=()=>{t<n.transactionsCount-1&&(t++,P())},nn=async()=>{let r=o[t].transaction,m=Number(r.nonce),{commonData:e}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});if(!e.needsSigning)return l.push(t),w();let s=r.toPlainObject(),i=s.nonce,{gasPriceOption:g}=n.getGasPriceOptionMap[i],I=y.newFromPlainObject({...s,gasPrice:g});try{let T=await G([I]);T&&(l.push(t),c.push(T[0]));let on=t===o.length-1,en=o.filter(b=>b.needsSigning),rn=c.length===en.length;if(on&&rn){let b=await q?.callback?.(c)||c,sn=await L(b);return n.closeUI(),d(sn)}w()}catch(T){n.closeUI(),f(T)}},tn=new Map([["NEXT_SIGN_TRANSACTIONS",w],["CONFIRM_SIGN_TRANSACTIONS",nn],["CLOSE_SIGN_TRANSACTIONS",Z],["BACK_SIGN_TRANSACTIONS",V],["SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS",Y]]);function an(){for(let[a,r]of tn)n.subscribeToEventBus(a,r)}n.clearEventHandlers(["NEXT_SIGN_TRANSACTIONS","CONFIRM_SIGN_TRANSACTIONS","CLOSE_SIGN_TRANSACTIONS","BACK_SIGN_TRANSACTIONS","SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS"]),an(),await P()})}export{On as a};
2
- //# sourceMappingURL=chunk-U53CQSS6.mjs.map
1
+ import{a as z}from"./chunk-VRVJA2UC.mjs";import{a as H}from"./chunk-YANGTW26.mjs";import{a as h}from"./chunk-GG4GZJTT.mjs";import{a as j}from"./chunk-IYSSPSVB.mjs";import{a as O}from"./chunk-PES47F5C.mjs";import{a as K}from"./chunk-OMBZCVQZ.mjs";import{a as W}from"./chunk-2GMLC2DS.mjs";import{a as X}from"./chunk-BKQQK7WP.mjs";import{a as C}from"./chunk-37XA46ZD.mjs";import{d as R}from"./chunk-V5ZSFCKJ.mjs";import{a as B}from"./chunk-VKA6F7QH.mjs";import{e as k}from"./chunk-QNYO7NI5.mjs";import{b as _}from"./chunk-7VHTZYM2.mjs";import{s as E}from"./chunk-KLKVV2YX.mjs";import{a as F,c as U,f as x}from"./chunk-PJWJZHIS.mjs";import{d as y}from"./chunk-DA76AK4I.mjs";async function On({transactions:$=[],handleSign:G,guardTransactions:L=W,options:q}){let{address:N,shard:D,username:M}=B(),u=_(E()),J=R(E()),v=H(),{allTransactions:o,parsedTransactionsByDataField:A}=X($),l=[];if(J?.isSigningUiEnabled===!1){C(!0);try{let d=[];for(let c of o){let p=await G([c.transaction]);p&&p.length>0&&d.push(p[0])}return await L(d)}finally{C(!1)}}let n=z.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let Q=async()=>{await h(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",Q),new Promise(async(d,f)=>{let c=[],p=await j({baseURL:u.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(o.map(a=>a.transaction));let S=p?.price,t=0,P=async()=>{let r=o[t]?.transaction,m=Number(r.nonce);try{n.updateIsLoading(!0);let{commonData:e,tokenTransaction:s,fungibleTransaction:i}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});s&&n.updateTokenTransaction(s),i&&n.updateNonFungibleTransaction(i.type,i),n.updateCommonData(e)}catch(e){throw console.error(`Error fetching common data for transaction at index ${t}:`,e),e}finally{n.updateIsLoading(!1)}},V=()=>{t>0&&(t--,P())},Y=(a=1e9)=>{let m=o[t].transaction,e=Number(m.nonce);n.updateGasPriceMap({nonce:e,gasPriceOption:a});let s=m.toPlainObject(),i=y.newFromPlainObject({...s,gasPrice:a}),g=K({transaction:i,price:S}),I=x({input:a.toString(),decimals:U,addCommas:!0,digits:F});n.updateCommonData({feeLimit:g.feeLimitFormatted,feeInFiatLimit:g.feeInFiatLimit,gasPrice:I,gasPriceOption:a})},Z=async()=>{f(new Error("Transaction signing cancelled by user")),await h(),n.closeUI()},w=()=>{t<n.transactionsCount-1&&(t++,P())},nn=async()=>{let r=o[t].transaction,m=Number(r.nonce),{commonData:e}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});if(!e.needsSigning)return l.push(t),w();let s=r.toPlainObject(),i=s.nonce,{gasPriceOption:g}=n.getGasPriceOptionMap[i],I=y.newFromPlainObject({...s,gasPrice:g});try{let T=await G([I]);T&&(l.push(t),c.push(T[0]));let on=t===o.length-1,en=o.filter(b=>b.needsSigning),rn=c.length===en.length;if(on&&rn){let b=await q?.callback?.(c)||c,sn=await L(b);return n.closeUI(),d(sn)}w()}catch(T){n.closeUI(),f(T)}},tn=new Map([["NEXT_SIGN_TRANSACTIONS",w],["CONFIRM_SIGN_TRANSACTIONS",nn],["CLOSE_SIGN_TRANSACTIONS",Z],["BACK_SIGN_TRANSACTIONS",V],["SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS",Y]]);function an(){for(let[a,r]of tn)n.subscribeToEventBus(a,r)}n.clearEventHandlers(["NEXT_SIGN_TRANSACTIONS","CONFIRM_SIGN_TRANSACTIONS","CLOSE_SIGN_TRANSACTIONS","BACK_SIGN_TRANSACTIONS","SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS"]),an(),await P()})}export{On as a};
2
+ //# sourceMappingURL=chunk-B2B2TDUL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-CCD7PUHB.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-LFGMSYOO.mjs";import{a as n}from"./chunk-FK6DWWZF.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-OUKVNDTO.mjs.map
1
+ import{a as s}from"./chunk-CCD7PUHB.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-KLKVV2YX.mjs";import{a as n}from"./chunk-FK6DWWZF.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-BBIFIN3W.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-NGZ4MN3D.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
- //# sourceMappingURL=chunk-IQ4JEYZN.mjs.map
1
+ import{a as e}from"./chunk-WKWRP3PH.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
+ //# sourceMappingURL=chunk-BCZWHACO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-EDBF5JW5.mjs";import o from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(o(t))return[];let i=r(t);return s({transactions:i})};export{e as a};
2
- //# sourceMappingURL=chunk-TTKTNM5I.mjs.map
1
+ import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-JG44VGD5.mjs";import o from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(o(t))return[];let i=r(t);return s({transactions:i})};export{e as a};
2
+ //# sourceMappingURL=chunk-C5FVAJRJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-NGZ4MN3D.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
2
- //# sourceMappingURL=chunk-Z7CZ3JPV.mjs.map
1
+ import{a as t}from"./chunk-WKWRP3PH.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
2
+ //# sourceMappingURL=chunk-CIEMKL2O.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as Z}from"./chunk-DZOKHLCE.mjs";import{a as Q}from"./chunk-6UZHM5LW.mjs";import{c as W}from"./chunk-RELUCG4Q.mjs";import{a as rt}from"./chunk-EIYKKF3M.mjs";import{a as tt}from"./chunk-52TSBBIT.mjs";import{a as et}from"./chunk-NESRAOKG.mjs";import{a as nt}from"./chunk-LCJQISJT.mjs";import{a as ot}from"./chunk-ABBDCZHP.mjs";import{a as mt}from"./chunk-4ODPAHHA.mjs";import{a as at}from"./chunk-UOOERNTG.mjs";import{a as st}from"./chunk-J2AGCQ2K.mjs";import{a as ut}from"./chunk-DRDUVED6.mjs";import{a as M}from"./chunk-O7YBYBL6.mjs";import{a as ct}from"./chunk-OSOXJQ7L.mjs";import{b as A}from"./chunk-WQYSQ4EF.mjs";import{c as O}from"./chunk-3AZMMFIU.mjs";import{a as d}from"./chunk-5Z3PJJJG.mjs";import{a as J}from"./chunk-72GVZOXP.mjs";import{a as w}from"./chunk-PVD6WIOT.mjs";import{a as P,f as X}from"./chunk-VCJHSHAR.mjs";import{b as it}from"./chunk-SWKXLTUP.mjs";import{b as k}from"./chunk-RHQNMUZP.mjs";import{b as S}from"./chunk-V5ZSFCKJ.mjs";import{a as Y}from"./chunk-KN5R5TUO.mjs";import{a as _}from"./chunk-T7WRX2RA.mjs";import{a as y}from"./chunk-BSA3IGL6.mjs";import{a as j}from"./chunk-NWRCQLFI.mjs";import{a as b}from"./chunk-QLBLLXSR.mjs";import{a as L}from"./chunk-HORSXVIV.mjs";import{b as G}from"./chunk-NGM3AVCY.mjs";import{a as K,b as q,q as v,s as l}from"./chunk-LFGMSYOO.mjs";import{c as V,d as $,f as H}from"./chunk-FK6DWWZF.mjs";import{b as f}from"./chunk-VNLGNNIL.mjs";import{b as B}from"./chunk-2AJ5KJ2V.mjs";import{a as h}from"./chunk-LJX4MW7B.mjs";import{b as D,c as F,f as z}from"./chunk-DA76AK4I.mjs";import U from"bignumber.js";var Lt=async()=>{try{let o=J(),{network:e}=d();try{let t=await b({address:o,baseURL:e.apiAddress});if(t!=null){let n={...t,username:L(t.username),nonce:w(t)};return P(n),n}}catch(t){console.error("Failed getting account ",t)}}catch(o){console.error("Failed getting address ",o)}return null};async function I(){let o=T();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await Lt():void 0}catch(e){console.error("Failed initializing provider ",e)}}async function gt({sessionId:o,transactionBatch:e,isSequential:t}){try{if(e==null)return;let n=tt(),r=ot(e),i=await Z(r);for(let g of i)await et({serverTransaction:g,sessionId:o,isSequential:t});if(!i.every(g=>g.status!=="pending"))return;n&&await I();let{transactions:c}=l(),s=c?.[o];if(s.transactions.every(g=>g.status==="success"))return k({sessionId:o,status:"success"});if(s.transactions.some(g=>g.status==="fail"))return k({sessionId:o,status:"fail"});if(s.transactions.every(g=>g.status==="not executed"))return k({sessionId:o,status:"invalid"})}catch(n){console.error(n)}}async function pt(){let o=G(l()),e=Object.entries(o);e.length!==0&&await Promise.all(e.map(([t,{transactions:n}])=>gt({sessionId:t,transactionBatch:n})))}async function x(){let o=v(),e=nt(),t=null,n=$(o.getState())?.timestamp??null,r=async()=>{try{await pt()}catch(a){console.error("[trackTransactions] Error checking transaction status:",a)}},i=()=>{t||(t=setInterval(r,e))},p=()=>{t&&(clearInterval(t),t=null)},c=()=>{p();let a=o.subscribe(({account:{websocketEvent:m}})=>{m?.message&&m.timestamp!=null&&n!==m.timestamp&&(n=m.timestamp,r())});O.set("websocketEventReceived",a)};r();let s=()=>{p()},u=o.subscribe(({account:{address:a},config:{websocketStatus:m}},g)=>{if(g.config.websocketStatus!==m)switch(m){case"completed":c();break;case"pending":i();break;default:a?i():s();break}});return O.set("websocketStatusChanged",u),{stopTransactionsTracking:s}}async function N({address:o,provider:e,apiAddress:t}){let n=await b({address:o,baseURL:t});if(!n)throw new Error("Account not found");it({address:o,providerType:e.getType()});let r={...n,username:L(n.username),nonce:w(n)};P(r),await A(o),x(),n.shard!=null&&await rt({shard:Number(n.shard),apiAddress:t})}async function lt({provider:o,nativeAuthConfig:e,token:t}){let{network:{apiAddress:n}}=d(),r=_(e),i=t;i||(i=await r.initialize({noCache:!0}));let p=await o.login({token:i}),{address:c,signature:s,...u}=p;if(!c)return console.warn("Login cancelled."),null;if(!s)return console.error("Failed to sign login token"),null;let a=j(u?.accessToken),m=await at({loginData:p,nativeAuthConfig:e,loginToken:i}),g=a?u.accessToken:r.getToken({address:c,token:m,signature:s});q({loginToken:i,signature:s,nativeAuthToken:g});let C=await st({loginToken:i,extraInfoData:{multisig:u?.multisig,impersonate:u?.impersonate},address:c});return await N({address:C,provider:o,apiAddress:n}),{address:C,signature:s}}async function dt(o){let{network:{apiAddress:e}}=d();await o.login();let t=await o.getAddress();if(!t)throw new Error("Address not found");return await N({address:t,provider:o,apiAddress:e}),{address:t}}async function ft(o,e){let t=S(l());if(t)return await lt({provider:o,nativeAuthConfig:t,token:e?.token});let{address:n}=await dt(o);return await A(n),x(),{address:n,signature:""}}async function Tt({provider:o,transactions:e,options:t={}}){await I();let{isGuarded:n,activeGuardianAddress:r,nonce:i}=Y(),p=o.getType()===h.ledger,c=mt({latestNonce:i,transactions:e}),s=r&&n&&!t.skipGuardian?c?.map(a=>(a.version=D.withTxOptions().valueOf(),a.options=F.withOptions({guarded:!0,...p?{hashSign:!0}:{}}).valueOf(),a.guardian=z.newFromBech32(r),a)):c,u=await o.signTransactions(s,t)??[];return X(i+u.length),u}var E=class{constructor(e){this._isLoggingOut=!1;this.provider=e}init(){return this.provider.init()}async login(e){let t=await ft(this.provider,e);return K(this.provider.getType()),ht(this),R.getInstance().init(),t}isInitialized(){return this.provider.isInitialized()}async logout(e={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let t=await ct({provider:this.provider,options:e});return this._isLoggingOut=!1,t}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(e,t){try{return await Tt({provider:this.provider,transactions:e,options:t})}catch(n){let r=M(n);throw new Error(r)}}async signMessage(e,t){try{return await ut({provider:this.provider,message:e,options:t})}catch(n){let r=M(n,"warning");throw new Error(r)}}cancelLogin(){this.provider.cancelLogin?.()}};var vt=null;function ht(o){vt=o}function T(){return vt||new E(B)}var R=class o{constructor(){this.store=v();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let e=this.store.getState(),t=f(e),{isExpired:n}=y(t?.nativeAuthToken);n?T().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let e=this.store.getState(),t=f(e),n=H(e);return!!(t?.nativeAuthToken&&n)};this.addPlannedLogout=()=>{let e=T(),t=V(this.store.getState()),n=e.getType()===h.webview;if(!t||n)return;this.addLogoutWarning();let r=f(this.store.getState()),{secondsUntilExpires:i,expiresAt:p}=y(r?.nativeAuthToken),c=new U(String(i)),s=`${t}_${p}`,u=this.plannedLogoutKey===s;if(!(i&&c.isGreaterThan(0))||u)return;this.plannedLogoutKey=s,clearTimeout(this.plannedLogoutTimeoutRef??0);let m=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},m.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{e.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},m.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let e=S(this.store.getState()),t=f(this.store.getState()),{secondsUntilExpires:n}=y(t?.nativeAuthToken),r=new U(String(n)),i=r.times(1e3);if(!n||r.isLessThanOrEqualTo(0)||!e?.tokenExpirationToastWarningSeconds)return;let c=new U(e?.tokenExpirationToastWarningSeconds??0).times(1e3),s=r.times(1e3).minus(c),u=Q(i.toNumber()),a=s.isLessThanOrEqualTo(0)?0:s.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${u}!`}),this.warningLogoutTimeoutRef=null},a)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};export{R as a,gt as b,pt as c,x as d,N as e,lt as f,dt as g,ft as h,Tt as i,E as j,ht as k,T as l,I as m};
2
- //# sourceMappingURL=chunk-ARRFGZVU.mjs.map
1
+ import{a as Z}from"./chunk-UCOMADXM.mjs";import{a as Q}from"./chunk-6UZHM5LW.mjs";import{c as W}from"./chunk-DNNIE76H.mjs";import{a as rt}from"./chunk-IP5UKLWO.mjs";import{a as tt}from"./chunk-4SG5GRKG.mjs";import{a as et}from"./chunk-QBZAZ6WB.mjs";import{a as nt}from"./chunk-TBB5SD2F.mjs";import{a as ot}from"./chunk-ABBDCZHP.mjs";import{a as mt}from"./chunk-4ODPAHHA.mjs";import{a as at}from"./chunk-V2A5JSZZ.mjs";import{a as st}from"./chunk-RQCJMSAJ.mjs";import{a as ut}from"./chunk-64HF66JN.mjs";import{a as M}from"./chunk-VIQEU6ZA.mjs";import{a as ct}from"./chunk-NXOMGRWS.mjs";import{b as A}from"./chunk-QRNPEDC4.mjs";import{c as O}from"./chunk-3RXJSE37.mjs";import{a as d}from"./chunk-G4EDYHSU.mjs";import{a as J}from"./chunk-64MTSCFM.mjs";import{a as w}from"./chunk-XY2LABQZ.mjs";import{a as P,f as X}from"./chunk-JNW3DEA3.mjs";import{b as it}from"./chunk-47AYFELF.mjs";import{b as k}from"./chunk-DJEEPI7Q.mjs";import{b as S}from"./chunk-V5ZSFCKJ.mjs";import{a as Y}from"./chunk-VKA6F7QH.mjs";import{a as _}from"./chunk-UWO2OMPK.mjs";import{a as y}from"./chunk-BSA3IGL6.mjs";import{a as j}from"./chunk-NWRCQLFI.mjs";import{a as b}from"./chunk-IRBY2LR6.mjs";import{a as L}from"./chunk-HORSXVIV.mjs";import{b as G}from"./chunk-NGM3AVCY.mjs";import{a as K,b as q,q as v,s as l}from"./chunk-KLKVV2YX.mjs";import{c as V,d as $,f as H}from"./chunk-FK6DWWZF.mjs";import{b as f}from"./chunk-VNLGNNIL.mjs";import{b as B}from"./chunk-2AJ5KJ2V.mjs";import{a as h}from"./chunk-LJX4MW7B.mjs";import{b as D,c as F,f as z}from"./chunk-DA76AK4I.mjs";import U from"bignumber.js";var Lt=async()=>{try{let o=J(),{network:e}=d();try{let t=await b({address:o,baseURL:e.apiAddress});if(t!=null){let n={...t,username:L(t.username),nonce:w(t)};return P(n),n}}catch(t){console.error("Failed getting account ",t)}}catch(o){console.error("Failed getting address ",o)}return null};async function I(){let o=T();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await Lt():void 0}catch(e){console.error("Failed initializing provider ",e)}}async function gt({sessionId:o,transactionBatch:e,isSequential:t}){try{if(e==null)return;let n=tt(),r=ot(e),i=await Z(r);for(let g of i)await et({serverTransaction:g,sessionId:o,isSequential:t});if(!i.every(g=>g.status!=="pending"))return;n&&await I();let{transactions:c}=l(),s=c?.[o];if(s.transactions.every(g=>g.status==="success"))return k({sessionId:o,status:"success"});if(s.transactions.some(g=>g.status==="fail"))return k({sessionId:o,status:"fail"});if(s.transactions.every(g=>g.status==="not executed"))return k({sessionId:o,status:"invalid"})}catch(n){console.error(n)}}async function pt(){let o=G(l()),e=Object.entries(o);e.length!==0&&await Promise.all(e.map(([t,{transactions:n}])=>gt({sessionId:t,transactionBatch:n})))}async function x(){let o=v(),e=nt(),t=null,n=$(o.getState())?.timestamp??null,r=async()=>{try{await pt()}catch(a){console.error("[trackTransactions] Error checking transaction status:",a)}},i=()=>{t||(t=setInterval(r,e))},p=()=>{t&&(clearInterval(t),t=null)},c=()=>{p();let a=o.subscribe(({account:{websocketEvent:m}})=>{m?.message&&m.timestamp!=null&&n!==m.timestamp&&(n=m.timestamp,r())});O.set("websocketEventReceived",a)};r();let s=()=>{p()},u=o.subscribe(({account:{address:a},config:{websocketStatus:m}},g)=>{if(g.config.websocketStatus!==m)switch(m){case"completed":c();break;case"pending":i();break;default:a?i():s();break}});return O.set("websocketStatusChanged",u),{stopTransactionsTracking:s}}async function N({address:o,provider:e,apiAddress:t}){let n=await b({address:o,baseURL:t});if(!n)throw new Error("Account not found");it({address:o,providerType:e.getType()});let r={...n,username:L(n.username),nonce:w(n)};P(r),await A(o),x(),n.shard!=null&&await rt({shard:Number(n.shard),apiAddress:t})}async function lt({provider:o,nativeAuthConfig:e,token:t}){let{network:{apiAddress:n}}=d(),r=_(e),i=t;i||(i=await r.initialize({noCache:!0}));let p=await o.login({token:i}),{address:c,signature:s,...u}=p;if(!c)return console.warn("Login cancelled."),null;if(!s)return console.error("Failed to sign login token"),null;let a=j(u?.accessToken),m=await at({loginData:p,nativeAuthConfig:e,loginToken:i}),g=a?u.accessToken:r.getToken({address:c,token:m,signature:s});q({loginToken:i,signature:s,nativeAuthToken:g});let C=await st({loginToken:i,extraInfoData:{multisig:u?.multisig,impersonate:u?.impersonate},address:c});return await N({address:C,provider:o,apiAddress:n}),{address:C,signature:s}}async function dt(o){let{network:{apiAddress:e}}=d();await o.login();let t=await o.getAddress();if(!t)throw new Error("Address not found");return await N({address:t,provider:o,apiAddress:e}),{address:t}}async function ft(o,e){let t=S(l());if(t)return await lt({provider:o,nativeAuthConfig:t,token:e?.token});let{address:n}=await dt(o);return await A(n),x(),{address:n,signature:""}}async function Tt({provider:o,transactions:e,options:t={}}){await I();let{isGuarded:n,activeGuardianAddress:r,nonce:i}=Y(),p=o.getType()===h.ledger,c=mt({latestNonce:i,transactions:e}),s=r&&n&&!t.skipGuardian?c?.map(a=>(a.version=D.withTxOptions().valueOf(),a.options=F.withOptions({guarded:!0,...p?{hashSign:!0}:{}}).valueOf(),a.guardian=z.newFromBech32(r),a)):c,u=await o.signTransactions(s,t)??[];return X(i+u.length),u}var E=class{constructor(e){this._isLoggingOut=!1;this.provider=e}init(){return this.provider.init()}async login(e){let t=await ft(this.provider,e);return K(this.provider.getType()),ht(this),R.getInstance().init(),t}isInitialized(){return this.provider.isInitialized()}async logout(e={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let t=await ct({provider:this.provider,options:e});return this._isLoggingOut=!1,t}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(e,t){try{return await Tt({provider:this.provider,transactions:e,options:t})}catch(n){let r=M(n);throw new Error(r)}}async signMessage(e,t){try{return await ut({provider:this.provider,message:e,options:t})}catch(n){let r=M(n,"warning");throw new Error(r)}}cancelLogin(){this.provider.cancelLogin?.()}};var vt=null;function ht(o){vt=o}function T(){return vt||new E(B)}var R=class o{constructor(){this.store=v();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let e=this.store.getState(),t=f(e),{isExpired:n}=y(t?.nativeAuthToken);n?T().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let e=this.store.getState(),t=f(e),n=H(e);return!!(t?.nativeAuthToken&&n)};this.addPlannedLogout=()=>{let e=T(),t=V(this.store.getState()),n=e.getType()===h.webview;if(!t||n)return;this.addLogoutWarning();let r=f(this.store.getState()),{secondsUntilExpires:i,expiresAt:p}=y(r?.nativeAuthToken),c=new U(String(i)),s=`${t}_${p}`,u=this.plannedLogoutKey===s;if(!(i&&c.isGreaterThan(0))||u)return;this.plannedLogoutKey=s,clearTimeout(this.plannedLogoutTimeoutRef??0);let m=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},m.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{e.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},m.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let e=S(this.store.getState()),t=f(this.store.getState()),{secondsUntilExpires:n}=y(t?.nativeAuthToken),r=new U(String(n)),i=r.times(1e3);if(!n||r.isLessThanOrEqualTo(0)||!e?.tokenExpirationToastWarningSeconds)return;let c=new U(e?.tokenExpirationToastWarningSeconds??0).times(1e3),s=r.times(1e3).minus(c),u=Q(i.toNumber()),a=s.isLessThanOrEqualTo(0)?0:s.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${u}!`}),this.warningLogoutTimeoutRef=null},a)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};export{R as a,gt as b,pt as c,x as d,N as e,lt as f,dt as g,ft as h,Tt as i,E as j,ht as k,T as l,I as m};
2
+ //# sourceMappingURL=chunk-CY6KN5YG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-5K6TCZ46.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-NGZ4MN3D.mjs";import{WebviewProvider as d}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var a=class extends n{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(r,i)=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(t){throw this.cancelAction(),t}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=d.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return s.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(o);return this.address&&this.setAccount({address:this.address}),r}};export{a};
2
- //# sourceMappingURL=chunk-KZ45U6FI.mjs.map
1
+ import{a as n}from"./chunk-MORBVWN4.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-WKWRP3PH.mjs";import{WebviewProvider as d}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var a=class extends n{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(r,i)=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(t){throw this.cancelAction(),t}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=d.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return s.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(o);return this.address&&this.setAccount({address:this.address}),r}};export{a};
2
+ //# sourceMappingURL=chunk-D5EZPRUN.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-LFGMSYOO.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
2
- //# sourceMappingURL=chunk-RHQNMUZP.mjs.map
1
+ import{q as o}from"./chunk-KLKVV2YX.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
2
+ //# sourceMappingURL=chunk-DJEEPI7Q.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s,d as i,h as o}from"./chunk-KSUOXAPQ.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-JZUCJMPD.mjs.map
1
+ import{b as s,d as i,h as o}from"./chunk-RSJBTSUT.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-DKSNT5LJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-LJJVV434.mjs";import{a as p}from"./chunk-PG2AWYWU.mjs";import{a as O}from"./chunk-JZUCJMPD.mjs";import{a as M}from"./chunk-7XW6FDWR.mjs";import{k as I,l as F,n as N}from"./chunk-E2GGD7D4.mjs";import{a as b,b as C,d as g,e as v,g as E,h as y,i as S}from"./chunk-KSUOXAPQ.mjs";import{d as B}from"./chunk-RHQNMUZP.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-LFGMSYOO.mjs";import{a as d}from"./chunk-Z7CZ3JPV.mjs";import A from"lodash.isequal";import l from"lodash.isequal";var m=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||c(),this.notificationsFeedManager=t.notificationsFeedManager||h.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let s=await this.createToastListElement();if(!s)return;this.eventBus=await s.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await d.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var u=class a{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||c(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new m({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:s,transactions:i},{toasts:e,transactions:o})=>{let n=!l(e.transactionToasts,s.transactionToasts),r=!l(o,i);(n||r)&&await this.updateTransactionToastsList(),!l(e.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return a.instance||(a.instance=new a),a.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:e}=i,o=N(e),n=F(e),r=I(e),T=n||r||o;return T?(this.successfulToastLifetime&&this.lifetimeManager.start(t),T):(this.lifetimeManager.stop(t),T)}async createTransactionToast(t,s){let i=E({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),i}async createCustomToast(t){let s=S(t);return await this.updateCustomToastList(),s}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:s}=t,{pendingTransactionToasts:i,completedTransactionToasts:e}=await p({store:t});this.transactionToasts=[...i,...e];for(let o of s.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let e="message"in s?{...s}:{...s,instantiateToastElement:b[s.toastId]};this.customToasts.push(e),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(y(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=C[t];return i?.(),g(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),v()}};var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",h=class a extends M{constructor(s){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=s||c(),this.data={...this.initialData}}static getInstance(){return a.instance||(a.instance=new a),a.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){u.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:e,transactions:o},{toasts:n,transactions:r})=>{(!A(n.transactionToasts,e.transactionToasts)||!A(r,o))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=u.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s}=this.store.getState(),{pendingTransactionToasts:i}=await p();this.data.pendingTransactions=i;let e=Object.keys(s).reduce((o,n)=>(["sent","pending"].includes(String(s[n].status))||(o[n]=s[n]),o),{});this.data.historicTransactions=await w.getTransactionsHistory({transactionsSessions:e}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){B(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{h as a,m as b,u as c};
2
- //# sourceMappingURL=chunk-RELUCG4Q.mjs.map
1
+ import{a as w}from"./chunk-2YFKORNQ.mjs";import{a as p}from"./chunk-R25SH3F4.mjs";import{a as O}from"./chunk-DKSNT5LJ.mjs";import{a as M}from"./chunk-XZIQUMYI.mjs";import{k as I,l as F,n as N}from"./chunk-E2GGD7D4.mjs";import{a as b,b as C,d as g,e as v,g as E,h as y,i as S}from"./chunk-RSJBTSUT.mjs";import{d as B}from"./chunk-DJEEPI7Q.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-KLKVV2YX.mjs";import{a as d}from"./chunk-CIEMKL2O.mjs";import A from"lodash.isequal";import l from"lodash.isequal";var m=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||c(),this.notificationsFeedManager=t.notificationsFeedManager||h.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let s=await this.createToastListElement();if(!s)return;this.eventBus=await s.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await d.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var u=class a{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||c(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new m({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:s,transactions:i},{toasts:e,transactions:o})=>{let n=!l(e.transactionToasts,s.transactionToasts),r=!l(o,i);(n||r)&&await this.updateTransactionToastsList(),!l(e.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return a.instance||(a.instance=new a),a.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:e}=i,o=N(e),n=F(e),r=I(e),T=n||r||o;return T?(this.successfulToastLifetime&&this.lifetimeManager.start(t),T):(this.lifetimeManager.stop(t),T)}async createTransactionToast(t,s){let i=E({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),i}async createCustomToast(t){let s=S(t);return await this.updateCustomToastList(),s}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:s}=t,{pendingTransactionToasts:i,completedTransactionToasts:e}=await p({store:t});this.transactionToasts=[...i,...e];for(let o of s.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let e="message"in s?{...s}:{...s,instantiateToastElement:b[s.toastId]};this.customToasts.push(e),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(y(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=C[t];return i?.(),g(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),v()}};var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",h=class a extends M{constructor(s){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=s||c(),this.data={...this.initialData}}static getInstance(){return a.instance||(a.instance=new a),a.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){u.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:e,transactions:o},{toasts:n,transactions:r})=>{(!A(n.transactionToasts,e.transactionToasts)||!A(r,o))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=u.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s}=this.store.getState(),{pendingTransactionToasts:i}=await p();this.data.pendingTransactions=i;let e=Object.keys(s).reduce((o,n)=>(["sent","pending"].includes(String(s[n].status))||(o[n]=s[n]),o),{});this.data.historicTransactions=await w.getTransactionsHistory({transactionsSessions:e}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){B(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{h as a,m as b,u as c};
2
+ //# sourceMappingURL=chunk-DNNIE76H.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-LFGMSYOO.mjs";import{a as o}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=i(e());return{origin:t?.origin||o().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
- //# sourceMappingURL=chunk-6MOS734B.mjs.map
1
+ import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-KLKVV2YX.mjs";import{a as o}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=i(e());return{origin:t?.origin||o().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
+ //# sourceMappingURL=chunk-E4YZV652.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-KLKVV2YX.mjs";function f(r=t()){return o(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-G4EDYHSU.mjs.map
@@ -1,2 +1,2 @@
1
- import{l as n}from"./chunk-ARRFGZVU.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
- //# sourceMappingURL=chunk-Z5QHVSVU.mjs.map
1
+ import{l as n}from"./chunk-CY6KN5YG.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
+ //# sourceMappingURL=chunk-GG4GZJTT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-2RAHMAHQ.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),this.resetData())}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},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-EBVPPHXD.mjs.map
1
+ import{a as i}from"./chunk-3OOEFQUC.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),this.resetData())}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},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-GSUU2PBX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-T7WRX2RA.mjs";import{a as o}from"./chunk-HSF3JATH.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
- //# sourceMappingURL=chunk-DYLLFNND.mjs.map
1
+ import{a as r}from"./chunk-UWO2OMPK.mjs";import{a as o}from"./chunk-HSF3JATH.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
+ //# sourceMappingURL=chunk-H3ASBOLT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ZXTGV6LH.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
- //# sourceMappingURL=chunk-6JGR42GR.mjs.map
1
+ import{a as i}from"./chunk-OJ4YA7YX.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
+ //# sourceMappingURL=chunk-I2C5F23X.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-NGZ4MN3D.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
2
- //# sourceMappingURL=chunk-PHZM3DZQ.mjs.map
1
+ import{a as e}from"./chunk-WKWRP3PH.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
2
+ //# sourceMappingURL=chunk-IBJVJ7HA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-ONZCN65M.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-SLRWSVMJ.mjs.map
1
+ import{a as e}from"./chunk-5OI5GIVQ.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-IMKE7N5T.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-EXZ4QLVN.mjs";import{b as r}from"./chunk-5HGAEMDS.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-LFGMSYOO.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=i(o());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
- //# sourceMappingURL=chunk-EIYKKF3M.mjs.map
1
+ import{a as n}from"./chunk-5E5P6CWQ.mjs";import{b as r}from"./chunk-LLQX4NJE.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-KLKVV2YX.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=i(o());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
+ //# sourceMappingURL=chunk-IP5UKLWO.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as t}from"./chunk-I2C5F23X.mjs";var c=o=>t(o);export{c as a};
2
+ //# sourceMappingURL=chunk-IRBY2LR6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-ZXTGV6LH.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
2
- //# sourceMappingURL=chunk-PGDYOMKM.mjs.map
1
+ import{a as n}from"./chunk-OJ4YA7YX.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
2
+ //# sourceMappingURL=chunk-IYSSPSVB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-4K5OAI42.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-CZNMVOTE.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-LFGMSYOO.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??h(),o=[],i=[];if(r.forEach(s=>{let e=S(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=u({transaction:s,address:T(t),explorerAddress:l(t),egldLabel:f(t)});e.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
2
- //# sourceMappingURL=chunk-EDBF5JW5.mjs.map
1
+ import{a as d}from"./chunk-P5XJESSE.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-264QHLQ6.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-KLKVV2YX.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??h(),o=[],i=[];if(r.forEach(s=>{let e=S(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=u({transaction:s,address:T(t),explorerAddress:l(t),egldLabel:f(t)});e.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
2
+ //# sourceMappingURL=chunk-JG44VGD5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-2RAHMAHQ.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}get walletConnectData(){return{...this.data}}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
- //# sourceMappingURL=chunk-IL6GXHZS.mjs.map
1
+ import{a as e}from"./chunk-3OOEFQUC.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}get walletConnectData(){return{...this.data}}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
+ //# sourceMappingURL=chunk-JKM3XYCF.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-LFGMSYOO.mjs";import{a as c}from"./chunk-APCGI2A5.mjs";var p=t=>{o().setState(({account:e})=>{let s=e.address===t.address;e.accounts={[e.address]:s?t:c}},!1,{type:"setAccount",payload:{value:t}})},r=t=>o().setState(({account:e})=>{e.ledgerAccount=t},!1,{type:"setLedgerAccount",payload:{value:t}}),u=t=>o().setState(({account:e})=>{e.walletConnectAccount=t},!1,{type:"setWalletConnectAccount",payload:{value:t}}),l=t=>o().setState(({account:e})=>{e.websocketEvent={timestamp:Date.now(),message:t}},!1,{type:"setWebsocketEvent",payload:{value:t}}),d=t=>o().setState(({account:e})=>{e.websocketBatchEvent={timestamp:Date.now(),data:t}},!1,{type:"setWebsocketBatchEvent",payload:{value:t}}),y=t=>{o().setState(({account:e})=>{e.accounts[e.address].nonce=t},!1,{type:"setAccountNonce",payload:{value:t}})};export{p as a,r as b,u as c,l as d,d as e,y as f};
2
- //# sourceMappingURL=chunk-VCJHSHAR.mjs.map
1
+ import{q as o}from"./chunk-KLKVV2YX.mjs";import{a as c}from"./chunk-APCGI2A5.mjs";var p=t=>{o().setState(({account:e})=>{let s=e.address===t.address;e.accounts={[e.address]:s?t:c}},!1,{type:"setAccount",payload:{value:t}})},r=t=>o().setState(({account:e})=>{e.ledgerAccount=t},!1,{type:"setLedgerAccount",payload:{value:t}}),u=t=>o().setState(({account:e})=>{e.walletConnectAccount=t},!1,{type:"setWalletConnectAccount",payload:{value:t}}),l=t=>o().setState(({account:e})=>{e.websocketEvent={timestamp:Date.now(),message:t}},!1,{type:"setWebsocketEvent",payload:{value:t}}),d=t=>o().setState(({account:e})=>{e.websocketBatchEvent={timestamp:Date.now(),data:t}},!1,{type:"setWebsocketBatchEvent",payload:{value:t}}),y=t=>{o().setState(({account:e})=>{e.accounts[e.address].nonce=t},!1,{type:"setAccountNonce",payload:{value:t}})};export{p as a,r as b,u as c,l as d,d as e,y as f};
2
+ //# sourceMappingURL=chunk-JNW3DEA3.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as o}from"./chunk-3AZMMFIU.mjs";import{a as r}from"./chunk-WYLU3B54.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
2
- //# sourceMappingURL=chunk-6CWGXDIH.mjs.map
1
+ import{d as o}from"./chunk-3RXJSE37.mjs";import{a as r}from"./chunk-ZTQ2OP6M.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
2
+ //# sourceMappingURL=chunk-JPUDVVZY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-EZWFRZYN.mjs";import{a as g}from"./chunk-YJCTRUJT.mjs";import{a as f}from"./chunk-2JKCBTYK.mjs";import{BigNumber as p}from"bignumber.js";async function b({manager:e,provider:s,login:a,token:u,explorerAddress:m,authData:x}){let o={manager:e,provider:s};return await new Promise(async function(A,I){async function d(t){let r=e?e.addressesPerPage??1:1,l=new p(t-1).times(r);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await n(o)}async function c(t){if(!(!s||!a)){e?.updateConfirmScreen({...x,selectedAddress:t.selectedAddress,explorerLink:g({to:`/${f}/${t.selectedAddress}`,explorerAddress:m})});try{let r=u?await s.tokenLogin({token:Buffer.from(`${u}{}`),addressIndex:t.addressIndex}):await a({addressIndex:t.addressIndex});e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),A({address:r.address,signature:r.signature?r.signature.toString("hex"):"",addressIndex:t.addressIndex})}catch(r){console.error("User rejected login:",r),!!e?.getConfirmScreenData()&&await n(o)}}}async function i(){await n(o),e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),I("User cancelled login")}e.subscribeToAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d})})}export{b as a};
2
- //# sourceMappingURL=chunk-67XKVYBS.mjs.map
1
+ import{a as n}from"./chunk-6ISK5EQR.mjs";import{a as g}from"./chunk-YJCTRUJT.mjs";import{a as f}from"./chunk-2JKCBTYK.mjs";import{BigNumber as p}from"bignumber.js";async function b({manager:e,provider:s,login:a,token:u,explorerAddress:m,authData:x}){let o={manager:e,provider:s};return await new Promise(async function(A,I){async function d(t){let r=e?e.addressesPerPage??1:1,l=new p(t-1).times(r);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await n(o)}async function c(t){if(!(!s||!a)){e?.updateConfirmScreen({...x,selectedAddress:t.selectedAddress,explorerLink:g({to:`/${f}/${t.selectedAddress}`,explorerAddress:m})});try{let r=u?await s.tokenLogin({token:Buffer.from(`${u}{}`),addressIndex:t.addressIndex}):await a({addressIndex:t.addressIndex});e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),A({address:r.address,signature:r.signature?r.signature.toString("hex"):"",addressIndex:t.addressIndex})}catch(r){console.error("User rejected login:",r),!!e?.getConfirmScreenData()&&await n(o)}}}async function i(){await n(o),e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),I("User cancelled login")}e.subscribeToAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d})})}export{b as a};
2
+ //# sourceMappingURL=chunk-KBMUH73C.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as u,b as S}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-WYLU3B54.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=u};function H(){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),r=s(e),{address:i,publicKey:D}=p(e);if(i&&D!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A,!1,{type:"logoutMiddleware",payload:{value:null}}))};var M=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:S(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(M),t},n,z=e=>{n=e},o=()=>(n||z(W(()=>new k)),n),Se=(e=I)=>{let t=W(e);return z(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,M as n,W as o,z as p,o as q,Se as r,de as s};
2
- //# sourceMappingURL=chunk-LFGMSYOO.mjs.map
1
+ import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as u,b as S}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-ZTQ2OP6M.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=u};function H(){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),r=s(e),{address:i,publicKey:D}=p(e);if(i&&D!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A,!1,{type:"logoutMiddleware",payload:{value:null}}))};var M=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:S(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(M),t},n,z=e=>{n=e},o=()=>(n||z(W(()=>new k)),n),Se=(e=I)=>{let t=W(e);return z(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,M as n,W as o,z as p,o as q,Se as r,de as s};
2
+ //# sourceMappingURL=chunk-KLKVV2YX.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-KLKVV2YX.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-KME5MTYJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-ZXTGV6LH.mjs";import{k as r}from"./chunk-PKDR5ERF.mjs";import{a as o}from"./chunk-2JKCBTYK.mjs";import m from"axios";async function c({addressToVerify:s,baseURL:a}){let e=t(a),{data:i}=await m.get(`${e}/${o}/${s}`,{timeout:r});return i}export{c as a};
2
- //# sourceMappingURL=chunk-TMS5L2BX.mjs.map
1
+ import{a as t}from"./chunk-OJ4YA7YX.mjs";import{k as r}from"./chunk-PKDR5ERF.mjs";import{a as o}from"./chunk-2JKCBTYK.mjs";import m from"axios";async function c({addressToVerify:s,baseURL:a}){let e=t(a),{data:i}=await m.get(`${e}/${o}/${s}`,{timeout:r});return i}export{c as a};
2
+ //# sourceMappingURL=chunk-L34PPMTI.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-ARRFGZVU.mjs";import{q as M}from"./chunk-LFGMSYOO.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-NGZ4MN3D.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
2
- //# sourceMappingURL=chunk-R7VIYF22.mjs.map
1
+ import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-CY6KN5YG.mjs";import{q as M}from"./chunk-KLKVV2YX.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-WKWRP3PH.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
2
+ //# sourceMappingURL=chunk-L7VHBKZV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-LFGMSYOO.mjs";import{a as l}from"./chunk-SQVKVA7X.mjs";var e=o=>u().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...l,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await c(a),f=r.roundDuration?null:await w(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
2
- //# sourceMappingURL=chunk-5HGAEMDS.mjs.map
1
+ import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-KLKVV2YX.mjs";import{a as l}from"./chunk-SQVKVA7X.mjs";var e=o=>u().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...l,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await c(a),f=r.roundDuration?null:await w(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
2
+ //# sourceMappingURL=chunk-LLQX4NJE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-LFGMSYOO.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-EWTGACKQ.mjs.map
1
+ import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-KLKVV2YX.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-MFSHDWXD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-SLRWSVMJ.mjs";import{a as e}from"./chunk-72GVZOXP.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-LFGMSYOO.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
2
- //# sourceMappingURL=chunk-5K6TCZ46.mjs.map
1
+ import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-IMKE7N5T.mjs";import{a as e}from"./chunk-64MTSCFM.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-KLKVV2YX.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
2
+ //# sourceMappingURL=chunk-MORBVWN4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-NGZ4MN3D.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
2
- //# sourceMappingURL=chunk-R6QS4YSC.mjs.map
1
+ import{a as t}from"./chunk-WKWRP3PH.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
2
+ //# sourceMappingURL=chunk-NUZA2DSN.mjs.map