@multiversx/sdk-dapp 5.2.2-alpha.1 → 5.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/out/__chunks__/{chunk-EHMHIAOC.mjs → chunk-2V734BC5.mjs} +2 -2
  2. package/out/__chunks__/{chunk-X4KR5OSC.mjs → chunk-2ZUMLHAK.mjs} +2 -2
  3. package/out/__chunks__/chunk-3ASKGOPL.mjs +2 -0
  4. package/out/__chunks__/{chunk-RI45GLZ7.mjs → chunk-4VC77F6P.mjs} +2 -2
  5. package/out/__chunks__/{chunk-2QW7XAGS.mjs → chunk-6FBHK747.mjs} +2 -2
  6. package/out/__chunks__/{chunk-2L23OQ3D.mjs → chunk-6JWLY5O6.mjs} +2 -2
  7. package/out/__chunks__/{chunk-26EQVDJ2.mjs → chunk-6XX6ZLRH.mjs} +2 -2
  8. package/out/__chunks__/{chunk-SRHQKUXP.mjs → chunk-7SSBY22M.mjs} +2 -2
  9. package/out/__chunks__/{chunk-LNYGKGJE.mjs → chunk-AKWG6QLG.mjs} +2 -2
  10. package/out/__chunks__/chunk-ASWAR3QU.mjs +2 -0
  11. package/out/__chunks__/{chunk-R2VTYQ7O.mjs → chunk-ASZPRMFV.mjs} +2 -2
  12. package/out/__chunks__/{chunk-YDK5V2BZ.mjs → chunk-AZEXDP7Y.mjs} +2 -2
  13. package/out/__chunks__/{chunk-KFS4ZIKP.mjs → chunk-BI66JHPZ.mjs} +2 -2
  14. package/out/__chunks__/{chunk-MIODWPNV.mjs → chunk-CDASOTMO.mjs} +2 -2
  15. package/out/__chunks__/{chunk-TB2Y5M67.mjs → chunk-CTQMOQW3.mjs} +2 -2
  16. package/out/__chunks__/{chunk-3VA7OXBH.mjs → chunk-DLGYHG2V.mjs} +2 -2
  17. package/out/__chunks__/chunk-DQ4VYTW5.mjs +2 -0
  18. package/out/__chunks__/{chunk-NSW7SBHH.mjs → chunk-E55Y5DJE.mjs} +2 -2
  19. package/out/__chunks__/{chunk-MUPCSQI2.mjs → chunk-E7CEJGJQ.mjs} +2 -2
  20. package/out/__chunks__/{chunk-XJWZ6BDQ.mjs → chunk-EGLXC3FA.mjs} +2 -2
  21. package/out/__chunks__/{chunk-RORFSL37.mjs → chunk-EWFCQIZV.mjs} +2 -2
  22. package/out/__chunks__/{chunk-BODBU56I.mjs → chunk-FQEB6SMB.mjs} +2 -2
  23. package/out/__chunks__/chunk-FVEANNWZ.mjs +2 -0
  24. package/out/__chunks__/{chunk-CYWT37FT.mjs → chunk-GFRJNBRK.mjs} +2 -2
  25. package/out/__chunks__/{chunk-MXO2L46I.mjs → chunk-GFS4Q6Z7.mjs} +2 -2
  26. package/out/__chunks__/chunk-GM4REL44.mjs +2 -0
  27. package/out/__chunks__/{chunk-Y5UBM4II.mjs → chunk-GMOPF52N.mjs} +2 -2
  28. package/out/__chunks__/{chunk-J7JGI5JV.mjs → chunk-HSK376OG.mjs} +2 -2
  29. package/out/__chunks__/chunk-HVNTW6GO.mjs +2 -0
  30. package/out/__chunks__/{chunk-VVRC7ANW.mjs → chunk-I2FFTRVB.mjs} +2 -2
  31. package/out/__chunks__/chunk-IIUIUPNC.mjs +2 -0
  32. package/out/__chunks__/{chunk-OWO6FJAZ.mjs → chunk-IUYBATCJ.mjs} +2 -2
  33. package/out/__chunks__/{chunk-JLE5ZH6J.mjs → chunk-JJUBN3OG.mjs} +2 -2
  34. package/out/__chunks__/{chunk-PGCZMYUZ.mjs → chunk-JPWJSEO6.mjs} +2 -2
  35. package/out/__chunks__/{chunk-LSHOMXXT.mjs → chunk-KAGEHYS4.mjs} +2 -2
  36. package/out/__chunks__/{chunk-7P3DNMWN.mjs → chunk-KCGV3ZXW.mjs} +2 -2
  37. package/out/__chunks__/{chunk-MT47AO63.mjs → chunk-LB4OQBQA.mjs} +2 -2
  38. package/out/__chunks__/{chunk-CRQHYOGT.mjs → chunk-LSPPEREA.mjs} +2 -2
  39. package/out/__chunks__/chunk-LTJ6QYTI.mjs +2 -0
  40. package/out/__chunks__/{chunk-756GEXZI.mjs → chunk-MBX42DL3.mjs} +2 -2
  41. package/out/__chunks__/{chunk-FLJAPLZE.mjs → chunk-MPLHCQ4R.mjs} +2 -2
  42. package/out/__chunks__/{chunk-ATGWLKGR.mjs → chunk-MXW4MATE.mjs} +2 -2
  43. package/out/__chunks__/chunk-N4S6ABHB.mjs +2 -0
  44. package/out/__chunks__/{chunk-PEBY7O46.mjs → chunk-NEZI3IWF.mjs} +2 -2
  45. package/out/__chunks__/{chunk-PQ2PJ25S.mjs → chunk-NKBWNOLA.mjs} +2 -2
  46. package/out/__chunks__/{chunk-5CJ4UDMA.mjs → chunk-NQXLA34W.mjs} +2 -2
  47. package/out/__chunks__/chunk-OA5MR4Y6.mjs +2 -0
  48. package/out/__chunks__/{chunk-EHSW5LVN.mjs → chunk-OIEDIWGP.mjs} +2 -2
  49. package/out/__chunks__/{chunk-LWYHD7UG.mjs → chunk-OJ4UPDFE.mjs} +2 -2
  50. package/out/__chunks__/chunk-OKTLLLTC.mjs +2 -0
  51. package/out/__chunks__/{chunk-TXRPUKQM.mjs → chunk-OLSMED5W.mjs} +2 -2
  52. package/out/__chunks__/{chunk-5HBNM4M2.mjs → chunk-OYMPU3D4.mjs} +2 -2
  53. package/out/__chunks__/chunk-P5EESGJF.mjs +2 -0
  54. package/out/__chunks__/{chunk-X5C4JWTG.mjs → chunk-PFYTYBW3.mjs} +2 -2
  55. package/out/__chunks__/chunk-PR365NU7.mjs +2 -0
  56. package/out/__chunks__/chunk-Q4ZRXII2.mjs +2 -0
  57. package/out/__chunks__/{chunk-ZEYX332S.mjs → chunk-QZ6GNARF.mjs} +2 -2
  58. package/out/__chunks__/{chunk-KMNG6RHN.mjs → chunk-R2DIXNM2.mjs} +2 -2
  59. package/out/__chunks__/{chunk-UTU2EQJA.mjs → chunk-R4CE7CDZ.mjs} +2 -2
  60. package/out/__chunks__/{chunk-HBXJVW2D.mjs → chunk-R5VO5NAQ.mjs} +2 -2
  61. package/out/__chunks__/{chunk-VR7K4BBB.mjs → chunk-REID2WXN.mjs} +2 -2
  62. package/out/__chunks__/{chunk-LH7HQXQ7.mjs → chunk-SBMC65W6.mjs} +2 -2
  63. package/out/__chunks__/{chunk-FEZKCHK7.mjs → chunk-SEBWQEIV.mjs} +2 -2
  64. package/out/__chunks__/{chunk-FSJ6P7DN.mjs → chunk-SMW2Y5YA.mjs} +2 -2
  65. package/out/__chunks__/chunk-SUSUR4QF.mjs +2 -0
  66. package/out/__chunks__/{chunk-JR7IKIR6.mjs → chunk-T3LDKSIQ.mjs} +2 -2
  67. package/out/__chunks__/{chunk-NUUOYZJB.mjs → chunk-TPZ2PFCM.mjs} +2 -2
  68. package/out/__chunks__/{chunk-Z5RRBB6V.mjs → chunk-TXJIXRMC.mjs} +2 -2
  69. package/out/__chunks__/{chunk-YOJ6MVBW.mjs → chunk-VQDBI6YM.mjs} +2 -2
  70. package/out/__chunks__/{chunk-72BJ253L.mjs → chunk-W32KHY5V.mjs} +2 -2
  71. package/out/__chunks__/{chunk-XHOY6ZTM.mjs → chunk-W3Y4J4D3.mjs} +2 -2
  72. package/out/__chunks__/chunk-WOJOOCI6.mjs +2 -0
  73. package/out/__chunks__/{chunk-7BYCH7J2.mjs.map → chunk-WOJOOCI6.mjs.map} +1 -1
  74. package/out/__chunks__/{chunk-QNT5Z55W.mjs → chunk-XFVBNWP2.mjs} +2 -2
  75. package/out/__chunks__/{chunk-QIN2VFBM.mjs → chunk-Y5ERFLZ5.mjs} +2 -2
  76. package/out/__chunks__/{chunk-3XKIU7VA.mjs → chunk-YI4TACNU.mjs} +2 -2
  77. package/out/__chunks__/{chunk-EFZBU2L3.mjs → chunk-YJ4OUGHL.mjs} +2 -2
  78. package/out/__chunks__/chunk-YOE2FKZ6.mjs +2 -0
  79. package/out/__chunks__/chunk-YOE2FKZ6.mjs.map +7 -0
  80. package/out/__chunks__/{chunk-WNTY5HJN.mjs → chunk-ZD7FEKSG.mjs} +2 -2
  81. package/out/__chunks__/{chunk-BPIUSUQG.mjs → chunk-ZRFBDO7U.mjs} +2 -2
  82. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  83. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  84. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  85. package/out/apiCalls/index.mjs +1 -1
  86. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  87. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  88. package/out/apiCalls/tokens/index.mjs +1 -1
  89. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  90. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  91. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  92. package/out/constants/browser.constants.mjs +1 -1
  93. package/out/constants/index.mjs +1 -1
  94. package/out/constants/storage.constants.mjs +1 -1
  95. package/out/constants/window.constants.cjs +1 -1
  96. package/out/constants/window.constants.cjs.map +1 -1
  97. package/out/constants/window.constants.mjs +1 -1
  98. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  99. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  100. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  101. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  102. package/out/index.mjs +1 -1
  103. package/out/lib/sdkDappUi.mjs +1 -1
  104. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  105. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  106. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  107. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  108. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  109. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  110. package/out/managers/ToastManager/index.mjs +1 -1
  111. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  112. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  113. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  114. package/out/managers/TransactionManager/index.mjs +1 -1
  115. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  116. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  117. package/out/managers/index.mjs +1 -1
  118. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  119. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  120. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  121. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  122. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  123. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  124. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  125. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  126. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  127. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  128. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  129. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  130. package/out/managers/internal/index.mjs +1 -1
  131. package/out/methods/account/getAccount.mjs +1 -1
  132. package/out/methods/account/getAccountInfo.mjs +1 -1
  133. package/out/methods/account/getAddress.mjs +1 -1
  134. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  135. package/out/methods/account/getLatestNonce.mjs +1 -1
  136. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  137. package/out/methods/initApp/initApp.mjs +1 -1
  138. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  139. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  140. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  141. package/out/methods/network/getEgldLabel.mjs +1 -1
  142. package/out/methods/network/getExplorerAddress.mjs +1 -1
  143. package/out/methods/network/getNetworkConfig.mjs +1 -1
  144. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  145. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  146. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  147. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  148. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  149. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  150. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  151. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  152. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  153. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  154. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  155. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  156. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  157. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  158. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  159. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  160. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  161. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  162. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  163. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  164. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  165. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  166. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  167. package/out/providers/DappProvider/index.mjs +1 -1
  168. package/out/providers/ProviderFactory.mjs +1 -1
  169. package/out/providers/helpers/accountProvider.mjs +1 -1
  170. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  171. package/out/providers/helpers/restoreProvider.mjs +1 -1
  172. package/out/providers/index.mjs +1 -1
  173. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  174. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  175. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  176. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  177. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  178. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  179. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  180. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  181. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  182. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  183. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  184. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  185. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  186. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  187. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  188. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  189. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  190. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  191. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  192. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  193. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  194. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  195. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  196. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  197. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  198. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  199. package/out/providers/strategies/helpers/index.mjs +1 -1
  200. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  201. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  202. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  203. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  204. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  205. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  206. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  207. package/out/providers/strategies/index.mjs +1 -1
  208. package/out/react/account/useGetAccount.mjs +1 -1
  209. package/out/react/account/useGetAccountInfo.mjs +1 -1
  210. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  211. package/out/react/account/useGetLatestNonce.mjs +1 -1
  212. package/out/react/index.mjs +1 -1
  213. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  214. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  215. package/out/react/store/getReactStore.mjs +1 -1
  216. package/out/react/store/useSelector.mjs +1 -1
  217. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  218. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  219. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  220. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  221. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  222. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  223. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  224. package/out/services/index.mjs +1 -1
  225. package/out/services/nativeAuth/index.mjs +1 -1
  226. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  227. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  228. package/out/services/nativeAuth/methods/index.mjs +1 -1
  229. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  230. package/out/store/actions/account/accountActions.mjs +1 -1
  231. package/out/store/actions/account/index.mjs +1 -1
  232. package/out/store/actions/cache/cacheActions.mjs +1 -1
  233. package/out/store/actions/cache/index.mjs +1 -1
  234. package/out/store/actions/config/configActions.mjs +1 -1
  235. package/out/store/actions/config/index.mjs +1 -1
  236. package/out/store/actions/index.mjs +1 -1
  237. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  238. package/out/store/actions/network/index.mjs +1 -1
  239. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  240. package/out/store/actions/network/networkActions.mjs +1 -1
  241. package/out/store/actions/sharedActions/index.mjs +1 -1
  242. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  243. package/out/store/actions/toasts/index.mjs +1 -1
  244. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  245. package/out/store/actions/transactions/transactionsActions.cjs +3 -2
  246. package/out/store/actions/transactions/transactionsActions.cjs.map +2 -2
  247. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  248. package/out/store/actions/ui/index.mjs +1 -1
  249. package/out/store/actions/ui/uiActions.mjs +1 -1
  250. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  251. package/out/store/middleware/index.mjs +1 -1
  252. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  253. package/out/store/storage/index.mjs +1 -1
  254. package/out/store/storage/storageCallback.mjs +1 -1
  255. package/out/store/store.mjs +1 -1
  256. package/out/utils/ComponentFactory.mjs +1 -1
  257. package/out/utils/account/index.mjs +1 -1
  258. package/out/utils/account/refreshAccount.mjs +1 -1
  259. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  260. package/out/utils/index.mjs +1 -1
  261. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  262. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  263. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  264. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  265. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  266. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  267. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  268. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  269. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  270. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  271. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  272. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  273. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  274. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  275. package/out/utils/transactions/index.mjs +1 -1
  276. package/out/utils/visual/index.mjs +1 -1
  277. package/out/utils/visual/switchTheme.mjs +1 -1
  278. package/out/utils/window/getIsInIframe.mjs +1 -1
  279. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  280. package/out/utils/window/index.mjs +1 -1
  281. package/package.json +3 -3
  282. package/out/__chunks__/chunk-2WIGLKYG.mjs +0 -2
  283. package/out/__chunks__/chunk-5FPOZ2AY.mjs +0 -2
  284. package/out/__chunks__/chunk-5JDTRILF.mjs +0 -2
  285. package/out/__chunks__/chunk-7BYCH7J2.mjs +0 -2
  286. package/out/__chunks__/chunk-DBQCAF6H.mjs +0 -2
  287. package/out/__chunks__/chunk-FAUGS6HG.mjs +0 -2
  288. package/out/__chunks__/chunk-FKTD2GRY.mjs +0 -2
  289. package/out/__chunks__/chunk-G6PZFECX.mjs +0 -2
  290. package/out/__chunks__/chunk-HNB7MO3A.mjs +0 -2
  291. package/out/__chunks__/chunk-LKI7Z4RK.mjs +0 -2
  292. package/out/__chunks__/chunk-MMG52PCY.mjs +0 -2
  293. package/out/__chunks__/chunk-MRHKKGSJ.mjs +0 -2
  294. package/out/__chunks__/chunk-OQWBS4SC.mjs +0 -2
  295. package/out/__chunks__/chunk-SMON5ZO5.mjs +0 -2
  296. package/out/__chunks__/chunk-SOQYOVR7.mjs +0 -2
  297. package/out/__chunks__/chunk-VV7CPNPW.mjs +0 -2
  298. package/out/__chunks__/chunk-VV7CPNPW.mjs.map +0 -7
  299. package/out/__chunks__/chunk-YL7WVJQO.mjs +0 -2
  300. /package/out/__chunks__/{chunk-EHMHIAOC.mjs.map → chunk-2V734BC5.mjs.map} +0 -0
  301. /package/out/__chunks__/{chunk-X4KR5OSC.mjs.map → chunk-2ZUMLHAK.mjs.map} +0 -0
  302. /package/out/__chunks__/{chunk-FKTD2GRY.mjs.map → chunk-3ASKGOPL.mjs.map} +0 -0
  303. /package/out/__chunks__/{chunk-RI45GLZ7.mjs.map → chunk-4VC77F6P.mjs.map} +0 -0
  304. /package/out/__chunks__/{chunk-2QW7XAGS.mjs.map → chunk-6FBHK747.mjs.map} +0 -0
  305. /package/out/__chunks__/{chunk-2L23OQ3D.mjs.map → chunk-6JWLY5O6.mjs.map} +0 -0
  306. /package/out/__chunks__/{chunk-26EQVDJ2.mjs.map → chunk-6XX6ZLRH.mjs.map} +0 -0
  307. /package/out/__chunks__/{chunk-SRHQKUXP.mjs.map → chunk-7SSBY22M.mjs.map} +0 -0
  308. /package/out/__chunks__/{chunk-LNYGKGJE.mjs.map → chunk-AKWG6QLG.mjs.map} +0 -0
  309. /package/out/__chunks__/{chunk-G6PZFECX.mjs.map → chunk-ASWAR3QU.mjs.map} +0 -0
  310. /package/out/__chunks__/{chunk-R2VTYQ7O.mjs.map → chunk-ASZPRMFV.mjs.map} +0 -0
  311. /package/out/__chunks__/{chunk-YDK5V2BZ.mjs.map → chunk-AZEXDP7Y.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-KFS4ZIKP.mjs.map → chunk-BI66JHPZ.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-MIODWPNV.mjs.map → chunk-CDASOTMO.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-TB2Y5M67.mjs.map → chunk-CTQMOQW3.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-3VA7OXBH.mjs.map → chunk-DLGYHG2V.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-OQWBS4SC.mjs.map → chunk-DQ4VYTW5.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-NSW7SBHH.mjs.map → chunk-E55Y5DJE.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-MUPCSQI2.mjs.map → chunk-E7CEJGJQ.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-XJWZ6BDQ.mjs.map → chunk-EGLXC3FA.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-RORFSL37.mjs.map → chunk-EWFCQIZV.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-BODBU56I.mjs.map → chunk-FQEB6SMB.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-YL7WVJQO.mjs.map → chunk-FVEANNWZ.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-CYWT37FT.mjs.map → chunk-GFRJNBRK.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-MXO2L46I.mjs.map → chunk-GFS4Q6Z7.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-HNB7MO3A.mjs.map → chunk-GM4REL44.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-Y5UBM4II.mjs.map → chunk-GMOPF52N.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-J7JGI5JV.mjs.map → chunk-HSK376OG.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-2WIGLKYG.mjs.map → chunk-HVNTW6GO.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-VVRC7ANW.mjs.map → chunk-I2FFTRVB.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-MRHKKGSJ.mjs.map → chunk-IIUIUPNC.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-OWO6FJAZ.mjs.map → chunk-IUYBATCJ.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-JLE5ZH6J.mjs.map → chunk-JJUBN3OG.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-PGCZMYUZ.mjs.map → chunk-JPWJSEO6.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-LSHOMXXT.mjs.map → chunk-KAGEHYS4.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-7P3DNMWN.mjs.map → chunk-KCGV3ZXW.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-MT47AO63.mjs.map → chunk-LB4OQBQA.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-CRQHYOGT.mjs.map → chunk-LSPPEREA.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-LKI7Z4RK.mjs.map → chunk-LTJ6QYTI.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-756GEXZI.mjs.map → chunk-MBX42DL3.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-FLJAPLZE.mjs.map → chunk-MPLHCQ4R.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-ATGWLKGR.mjs.map → chunk-MXW4MATE.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-FAUGS6HG.mjs.map → chunk-N4S6ABHB.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-PEBY7O46.mjs.map → chunk-NEZI3IWF.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-PQ2PJ25S.mjs.map → chunk-NKBWNOLA.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-5CJ4UDMA.mjs.map → chunk-NQXLA34W.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-DBQCAF6H.mjs.map → chunk-OA5MR4Y6.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-EHSW5LVN.mjs.map → chunk-OIEDIWGP.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-LWYHD7UG.mjs.map → chunk-OJ4UPDFE.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-MMG52PCY.mjs.map → chunk-OKTLLLTC.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-TXRPUKQM.mjs.map → chunk-OLSMED5W.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-5HBNM4M2.mjs.map → chunk-OYMPU3D4.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-5JDTRILF.mjs.map → chunk-P5EESGJF.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-X5C4JWTG.mjs.map → chunk-PFYTYBW3.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-5FPOZ2AY.mjs.map → chunk-PR365NU7.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-SMON5ZO5.mjs.map → chunk-Q4ZRXII2.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-ZEYX332S.mjs.map → chunk-QZ6GNARF.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-KMNG6RHN.mjs.map → chunk-R2DIXNM2.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-UTU2EQJA.mjs.map → chunk-R4CE7CDZ.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-HBXJVW2D.mjs.map → chunk-R5VO5NAQ.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-VR7K4BBB.mjs.map → chunk-REID2WXN.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-LH7HQXQ7.mjs.map → chunk-SBMC65W6.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-FEZKCHK7.mjs.map → chunk-SEBWQEIV.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-FSJ6P7DN.mjs.map → chunk-SMW2Y5YA.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-SOQYOVR7.mjs.map → chunk-SUSUR4QF.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-JR7IKIR6.mjs.map → chunk-T3LDKSIQ.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-NUUOYZJB.mjs.map → chunk-TPZ2PFCM.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-Z5RRBB6V.mjs.map → chunk-TXJIXRMC.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-YOJ6MVBW.mjs.map → chunk-VQDBI6YM.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-72BJ253L.mjs.map → chunk-W32KHY5V.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-XHOY6ZTM.mjs.map → chunk-W3Y4J4D3.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-QNT5Z55W.mjs.map → chunk-XFVBNWP2.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-QIN2VFBM.mjs.map → chunk-Y5ERFLZ5.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-3XKIU7VA.mjs.map → chunk-YI4TACNU.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-EFZBU2L3.mjs.map → chunk-YJ4OUGHL.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-WNTY5HJN.mjs.map → chunk-ZD7FEKSG.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-BPIUSUQG.mjs.map → chunk-ZRFBDO7U.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-2QW7XAGS.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
- //# sourceMappingURL=chunk-EHMHIAOC.mjs.map
1
+ import{a as e}from"./chunk-6FBHK747.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
+ //# sourceMappingURL=chunk-2V734BC5.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as e}from"./chunk-X5C4JWTG.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
- //# sourceMappingURL=chunk-X4KR5OSC.mjs.map
1
+ import{s as e}from"./chunk-PFYTYBW3.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
+ //# sourceMappingURL=chunk-2ZUMLHAK.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-YJ4OUGHL.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-3ASKGOPL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-X5C4JWTG.mjs";import{a as n}from"./chunk-UERJ6AKK.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-RI45GLZ7.mjs.map
1
+ import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-PFYTYBW3.mjs";import{a as n}from"./chunk-UERJ6AKK.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-4VC77F6P.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-BPIUSUQG.mjs";import{d as m,e as l}from"./chunk-756GEXZI.mjs";import{q as a}from"./chunk-X5C4JWTG.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
2
- //# sourceMappingURL=chunk-2QW7XAGS.mjs.map
1
+ import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-ZRFBDO7U.mjs";import{d as m,e as l}from"./chunk-MBX42DL3.mjs";import{q as a}from"./chunk-PFYTYBW3.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
2
+ //# sourceMappingURL=chunk-6FBHK747.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-JLE5ZH6J.mjs";import{v as m}from"./chunk-FSJ6P7DN.mjs";import{s as n}from"./chunk-X5C4JWTG.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-ZONHCECO.mjs";import{a as p}from"./chunk-MUPCSQI2.mjs";async function g(){let t=a(),d=p(),r=s(n()),e=d||t?i.webview:r,c=Object.values(i).includes(r);if(r&&!c&&(e=r),!e)return;let o=await v.create({type:e});if(!o)throw new Error("Provider not found");(t||e===i.webview&&o.isInitialized())&&await o.login(),m(o)}export{g as a};
2
- //# sourceMappingURL=chunk-2L23OQ3D.mjs.map
1
+ import{a}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-JJUBN3OG.mjs";import{v as m}from"./chunk-SMW2Y5YA.mjs";import{s as n}from"./chunk-PFYTYBW3.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-ZONHCECO.mjs";import{a as p}from"./chunk-E7CEJGJQ.mjs";async function g(){let t=a(),d=p(),r=s(n()),e=d||t?i.webview:r,c=Object.values(i).includes(r);if(r&&!c&&(e=r),!e)return;let o=await v.create({type:e});if(!o)throw new Error("Provider not found");(t||e===i.webview&&o.isInitialized())&&await o.login(),m(o)}export{g as a};
2
+ //# sourceMappingURL=chunk-6JWLY5O6.mjs.map
@@ -1,2 +1,2 @@
1
- import{j as p,q as e}from"./chunk-X5C4JWTG.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
2
- //# sourceMappingURL=chunk-26EQVDJ2.mjs.map
1
+ import{j as p,q as e}from"./chunk-PFYTYBW3.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
2
+ //# sourceMappingURL=chunk-6XX6ZLRH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-QIN2VFBM.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-SRHQKUXP.mjs.map
1
+ import{a as s}from"./chunk-Y5ERFLZ5.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-7SSBY22M.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-7BYCH7J2.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-LNYGKGJE.mjs.map
1
+ import{a as e}from"./chunk-WOJOOCI6.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-AKWG6QLG.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-PFYTYBW3.mjs";import{f as t}from"./chunk-UERJ6AKK.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-ASWAR3QU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-TB2Y5M67.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
- //# sourceMappingURL=chunk-R2VTYQ7O.mjs.map
1
+ import{a as t}from"./chunk-CTQMOQW3.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
+ //# sourceMappingURL=chunk-ASZPRMFV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-NUUOYZJB.mjs";import{a as o}from"./chunk-ZONHCECO.mjs";import{a as e,b as t}from"./chunk-7BYCH7J2.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
2
- //# sourceMappingURL=chunk-YDK5V2BZ.mjs.map
1
+ import{a as s}from"./chunk-TPZ2PFCM.mjs";import{a as o}from"./chunk-ZONHCECO.mjs";import{a as e,b as t}from"./chunk-WOJOOCI6.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
2
+ //# sourceMappingURL=chunk-AZEXDP7Y.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as U}from"./chunk-PLMCHSS6.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-LN5UXO64.mjs";import{a as B}from"./chunk-PHOF3Z5D.mjs";import{a as $}from"./chunk-RBZC4PEU.mjs";import{a as _}from"./chunk-BQX7MJR6.mjs";import{a as R}from"./chunk-URJQWHBM.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as w}from"./chunk-LSHOMXXT.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{w as v}from"./chunk-FSJ6P7DN.mjs";import{a as x}from"./chunk-OQWBS4SC.mjs";import{a as G}from"./chunk-BRJNX4JF.mjs";import{a as C,c as F,f}from"./chunk-PJWJZHIS.mjs";import{a as b}from"./chunk-KD2IQ32V.mjs";import{c as L}from"./chunk-TI37DKBT.mjs";import{k as h}from"./chunk-LHEH7L4L.mjs";import{a as A}from"./chunk-7BYCH7J2.mjs";import{BigNumber as Dt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:s,egldLabel:n,network:e,gasPriceData:m,price:S,address:c,username:q,shard:H,signedIndexes:i,parsedTransactionsByDataField:K}){let p=T[s],W=p?.transaction?.sender.toString(),d=p?.transaction,o=d.toPlainObject(),D=null,I=null,t=await _({egldLabel:n,sender:W,apiAddress:e.apiAddress,address:c,parsedTransactionsByDataField:K})(p),g=!t?.transactionTokenInfo?.tokenId,{tokenId:l,nonce:u,amount:y=""}=t?.transactionTokenInfo??{},Z=l&&u&&u.length>0?`${l}-${u}`:l,J=await w({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")I={type:r,identifier:a,amount:y,imageURL:Y};else{let P=({addCommas:St})=>f({input:g?d.value.toString():y,decimals:g?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:St}),lt=P({addCommas:!0}),ut=P({addCommas:!1}),ft=Number(g?S:Q),Tt=M({amount:ut,usd:ft,addEqualSign:!0});D={identifier:(a===h?n:a)??n,amount:lt,usdValue:Tt}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:d,price:S}),nt=V({shard:H,initialGasPrice:m.initialGasPrice,transaction:o,gasStationMetadata:e.gasStationMetadata}),et=B({transaction:o,gasPriceData:m}),it=v().getType(),rt=O(it),N=T.length,at=i.length>0?i[i.length-1]+1:0,k=L(o?.data??""),E=$(t?.transactionTokenInfo),st=U({data:k,identifier:a,highlight:E}),mt=x(),ct=G({to:`/${b}/${c}`,explorerAddress:mt}),pt=N===1||t?.needsSigning&&!i.includes(s),dt=f({input:et.toString(),decimals:F,addCommas:!0,digits:C}),gt=new Dt(o.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:o.receiver.toString(),data:k,decodedData:st,gasPrice:dt,gasLimit:gt,explorerLink:ct,ppu:m.ppu,ppuOptions:nt,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:N,currentIndex:s,currentIndexToSign:at,highlight:E,scCall:z(t?.transactionTokenInfo),needsSigning:pt,isEditable:t?.needsSigning,providerName:rt,address:c,username:q,origin:A.location?.origin},tokenTransaction:D,fungibleTransaction:I}}export{Kt as a};
2
- //# sourceMappingURL=chunk-KFS4ZIKP.mjs.map
1
+ import{a as U}from"./chunk-PLMCHSS6.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-LN5UXO64.mjs";import{a as B}from"./chunk-PHOF3Z5D.mjs";import{a as $}from"./chunk-RBZC4PEU.mjs";import{a as _}from"./chunk-BQX7MJR6.mjs";import{a as R}from"./chunk-URJQWHBM.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as w}from"./chunk-KAGEHYS4.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{w as v}from"./chunk-SMW2Y5YA.mjs";import{a as x}from"./chunk-DQ4VYTW5.mjs";import{a as G}from"./chunk-BRJNX4JF.mjs";import{a as C,c as F,f}from"./chunk-PJWJZHIS.mjs";import{a as b}from"./chunk-KD2IQ32V.mjs";import{c as L}from"./chunk-TI37DKBT.mjs";import{k as h}from"./chunk-LHEH7L4L.mjs";import{a as A}from"./chunk-WOJOOCI6.mjs";import{BigNumber as Dt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:s,egldLabel:n,network:e,gasPriceData:m,price:S,address:c,username:q,shard:H,signedIndexes:i,parsedTransactionsByDataField:K}){let p=T[s],W=p?.transaction?.sender.toString(),d=p?.transaction,o=d.toPlainObject(),D=null,I=null,t=await _({egldLabel:n,sender:W,apiAddress:e.apiAddress,address:c,parsedTransactionsByDataField:K})(p),g=!t?.transactionTokenInfo?.tokenId,{tokenId:l,nonce:u,amount:y=""}=t?.transactionTokenInfo??{},Z=l&&u&&u.length>0?`${l}-${u}`:l,J=await w({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")I={type:r,identifier:a,amount:y,imageURL:Y};else{let P=({addCommas:St})=>f({input:g?d.value.toString():y,decimals:g?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:St}),lt=P({addCommas:!0}),ut=P({addCommas:!1}),ft=Number(g?S:Q),Tt=M({amount:ut,usd:ft,addEqualSign:!0});D={identifier:(a===h?n:a)??n,amount:lt,usdValue:Tt}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:d,price:S}),nt=V({shard:H,initialGasPrice:m.initialGasPrice,transaction:o,gasStationMetadata:e.gasStationMetadata}),et=B({transaction:o,gasPriceData:m}),it=v().getType(),rt=O(it),N=T.length,at=i.length>0?i[i.length-1]+1:0,k=L(o?.data??""),E=$(t?.transactionTokenInfo),st=U({data:k,identifier:a,highlight:E}),mt=x(),ct=G({to:`/${b}/${c}`,explorerAddress:mt}),pt=N===1||t?.needsSigning&&!i.includes(s),dt=f({input:et.toString(),decimals:F,addCommas:!0,digits:C}),gt=new Dt(o.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:o.receiver.toString(),data:k,decodedData:st,gasPrice:dt,gasLimit:gt,explorerLink:ct,ppu:m.ppu,ppuOptions:nt,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:N,currentIndex:s,currentIndexToSign:at,highlight:E,scCall:z(t?.transactionTokenInfo),needsSigning:pt,isEditable:t?.needsSigning,providerName:rt,address:c,username:q,origin:A.location?.origin},tokenTransaction:D,fungibleTransaction:I}}export{Kt as a};
2
+ //# sourceMappingURL=chunk-BI66JHPZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-UTU2EQJA.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-MIODWPNV.mjs.map
1
+ import{a as e}from"./chunk-R4CE7CDZ.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-CDASOTMO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-5HBNM4M2.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
- //# sourceMappingURL=chunk-TB2Y5M67.mjs.map
1
+ import{a as r}from"./chunk-OYMPU3D4.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
+ //# sourceMappingURL=chunk-CTQMOQW3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-SMON5ZO5.mjs";import{a as f}from"./chunk-5HBNM4M2.mjs";import{a as g}from"./chunk-X4KR5OSC.mjs";import{b as a}from"./chunk-X5C4JWTG.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
- //# sourceMappingURL=chunk-3VA7OXBH.mjs.map
1
+ import{a as u}from"./chunk-Q4ZRXII2.mjs";import{a as f}from"./chunk-OYMPU3D4.mjs";import{a as g}from"./chunk-2ZUMLHAK.mjs";import{b as a}from"./chunk-PFYTYBW3.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
+ //# sourceMappingURL=chunk-DLGYHG2V.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-PFYTYBW3.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";function d(t=e()){return r(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-DQ4VYTW5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-LWYHD7UG.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-NSW7SBHH.mjs.map
1
+ import{a as i}from"./chunk-OJ4UPDFE.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-E55Y5DJE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-PGCZMYUZ.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
2
- //# sourceMappingURL=chunk-MUPCSQI2.mjs.map
1
+ import{a as e}from"./chunk-JPWJSEO6.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
2
+ //# sourceMappingURL=chunk-E7CEJGJQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-NSW7SBHH.mjs";import{a as s}from"./chunk-ZEYX332S.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-OQWBS4SC.mjs";import{b as A}from"./chunk-756GEXZI.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-X5C4JWTG.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-ZONHCECO.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
- //# sourceMappingURL=chunk-XJWZ6BDQ.mjs.map
1
+ import{a as h}from"./chunk-E55Y5DJE.mjs";import{a as s}from"./chunk-QZ6GNARF.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-DQ4VYTW5.mjs";import{b as A}from"./chunk-MBX42DL3.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-PFYTYBW3.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-ZONHCECO.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
+ //# sourceMappingURL=chunk-EGLXC3FA.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-SMON5ZO5.mjs";import{s as e}from"./chunk-X5C4JWTG.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
- //# sourceMappingURL=chunk-RORFSL37.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-Q4ZRXII2.mjs";import{s as e}from"./chunk-PFYTYBW3.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
+ //# sourceMappingURL=chunk-EWFCQIZV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-X5C4JWTG.mjs";import{e as a}from"./chunk-UERJ6AKK.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
2
- //# sourceMappingURL=chunk-BODBU56I.mjs.map
1
+ import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-PFYTYBW3.mjs";import{e as a}from"./chunk-UERJ6AKK.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
2
+ //# sourceMappingURL=chunk-FQEB6SMB.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as n}from"./chunk-PFYTYBW3.mjs";import{b as t}from"./chunk-UTWIKUIK.mjs";var c=a=>t(`transaction-${a}`)(n().getState())??null;export{c as a};
2
+ //# sourceMappingURL=chunk-FVEANNWZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-KDWLSBQB.mjs";import{b as e,c as i}from"./chunk-VV7CPNPW.mjs";import{j as r}from"./chunk-65L5EBBL.mjs";import{q as n}from"./chunk-X5C4JWTG.mjs";async function E({results:u,hash:c,sessionId:s}){let a=u?.find(t=>t?.returnMessage!=="");i({sessionId:s,transaction:{...a,hash:c,status:"fail",inTransit:!1}});let{transactions:m}=n().getState();m[s].transactions.some(t=>r(t.status))||(e({sessionId:s,status:"fail",errorMessage:a?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
2
- //# sourceMappingURL=chunk-CYWT37FT.mjs.map
1
+ import{a as o}from"./chunk-KDWLSBQB.mjs";import{b as e,c as i}from"./chunk-YOE2FKZ6.mjs";import{j as r}from"./chunk-65L5EBBL.mjs";import{q as n}from"./chunk-PFYTYBW3.mjs";async function E({results:u,hash:c,sessionId:s}){let a=u?.find(t=>t?.returnMessage!=="");i({sessionId:s,transaction:{...a,hash:c,status:"fail",inTransit:!1}});let{transactions:m}=n().getState();m[s].transactions.some(t=>r(t.status))||(e({sessionId:s,status:"fail",errorMessage:a?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
2
+ //# sourceMappingURL=chunk-GFRJNBRK.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as a}from"./chunk-X5C4JWTG.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
2
- //# sourceMappingURL=chunk-MXO2L46I.mjs.map
1
+ import{q as a}from"./chunk-PFYTYBW3.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
2
+ //# sourceMappingURL=chunk-GFS4Q6Z7.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-N4S6ABHB.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-GM4REL44.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-7BYCH7J2.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-Y5UBM4II.mjs.map
1
+ import{a as t}from"./chunk-WOJOOCI6.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-GMOPF52N.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-SRHQKUXP.mjs";import{a as B}from"./chunk-5FPOZ2AY.mjs";import{a as b}from"./chunk-7P3DNMWN.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-KFS4ZIKP.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-RORFSL37.mjs";import{a as R}from"./chunk-PZHQ37I6.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as A}from"./chunk-MRHKKGSJ.mjs";import{s as x}from"./chunk-X5C4JWTG.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=A(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=k.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
2
- //# sourceMappingURL=chunk-J7JGI5JV.mjs.map
1
+ import{a as k}from"./chunk-7SSBY22M.mjs";import{a as B}from"./chunk-PR365NU7.mjs";import{a as b}from"./chunk-KCGV3ZXW.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-BI66JHPZ.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-EWFCQIZV.mjs";import{a as R}from"./chunk-PZHQ37I6.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as A}from"./chunk-IIUIUPNC.mjs";import{s as x}from"./chunk-PFYTYBW3.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=A(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=k.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
2
+ //# sourceMappingURL=chunk-HSK376OG.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-WOJOOCI6.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-HVNTW6GO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-Z5RRBB6V.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-G6PZFECX.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 l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
- //# sourceMappingURL=chunk-VVRC7ANW.mjs.map
1
+ import{a as l}from"./chunk-TXJIXRMC.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-ASWAR3QU.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 l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
+ //# sourceMappingURL=chunk-I2FFTRVB.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-PFYTYBW3.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";function g(r=t()){return e(r).egldLabel}export{g as a};
2
+ //# sourceMappingURL=chunk-IIUIUPNC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-RI45GLZ7.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as S}from"./chunk-FSJ6P7DN.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{a as y}from"./chunk-VV7CPNPW.mjs";import{a as f}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-SMON5ZO5.mjs";import{h as g}from"./chunk-2IUBMLF4.mjs";import{s as l}from"./chunk-X5C4JWTG.mjs";import{b as m}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=f(s),n=y({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return S({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=m(l());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=h(),{apiAddress:s,apiTimeout:o}=m(l());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${g}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
- //# sourceMappingURL=chunk-OWO6FJAZ.mjs.map
1
+ import{a as A}from"./chunk-4VC77F6P.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as S}from"./chunk-SMW2Y5YA.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{a as y}from"./chunk-YOE2FKZ6.mjs";import{a as f}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-Q4ZRXII2.mjs";import{h as g}from"./chunk-2IUBMLF4.mjs";import{s as l}from"./chunk-PFYTYBW3.mjs";import{b as m}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=f(s),n=y({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return S({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=m(l());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=h(),{apiAddress:s,apiTimeout:o}=m(l());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${g}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
+ //# sourceMappingURL=chunk-IUYBATCJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-5CJ4UDMA.mjs";import{a as se}from"./chunk-7ZUH3TQ2.mjs";import{a as ie}from"./chunk-XJWZ6BDQ.mjs";import{a as N}from"./chunk-NSW7SBHH.mjs";import{a as oe}from"./chunk-VVRC7ANW.mjs";import{a as te}from"./chunk-Z5RRBB6V.mjs";import{a as re}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-YDK5V2BZ.mjs";import{a as p}from"./chunk-NUUOYZJB.mjs";import{a as ee}from"./chunk-MIODWPNV.mjs";import{a as L}from"./chunk-J7JGI5JV.mjs";import{a as ne}from"./chunk-RORFSL37.mjs";import{a as Z}from"./chunk-QJGFIK7H.mjs";import{b as Q}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as J}from"./chunk-NRXYSTRW.mjs";import{j as X,l as D,u as E,v as y,w as M}from"./chunk-FSJ6P7DN.mjs";import{a as P}from"./chunk-G6PZFECX.mjs";import{a as K}from"./chunk-SOQYOVR7.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as Y}from"./chunk-26EQVDJ2.mjs";import{g as $}from"./chunk-2IUBMLF4.mjs";import{a as q,q as F,s as l}from"./chunk-X5C4JWTG.mjs";import{f as V}from"./chunk-UERJ6AKK.mjs";import{b as A,c as B}from"./chunk-SAAOQW7P.mjs";import{a as H}from"./chunk-VNLGNNIL.mjs";import{b as G,c as j}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-ZVIKYGX5.mjs";import{a as n}from"./chunk-ZONHCECO.mjs";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await ie({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!P())return;await N.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await te({shouldInitProvider:!0});this.provider=r}catch(r){throw X({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=N.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>oe({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ge=3e4,ve=5e3,me=3e3,S=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=H(i),r=V(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=Q(l());if(!(!this.shouldCheckConnection()||i))try{await M().getProvider().getAddress()}catch{if(D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,ve)}},ge))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new E(i);i.getType=()=>n.ledger,y(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:me,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await ne(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Z.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=A(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as he}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=he.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var x=class extends p{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[n.metamask]})};this.walletUrl=r??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=A(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return n.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as fe}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],W=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:fe.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??U.walletConnectDeepLink;this._approval=o,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!P())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=P(),t=B(l());if(G(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Y()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:_={},walletConnectV2RelayAddress:O=""}=e,w=new J(v,t,O,m,_);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var T=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new x;break}case n.walletConnect:{let s=j(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new W({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=K();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new E(r);y(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){M().cancelLogin(),y(null),q(n.none)}};T._customProviders=[];var we=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await ee({cancelAction:e}),v=Object.values(T.customProviders),m=v.reduce((u,R)=>(u[R.type]=R.name,u),{}),_={...c,...m},O=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",O);let w=we(v,r)?r:n.none;d.updateData({name:_[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=re(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,T as d,g as e,z as f,k as g,x as h,W as i};
2
- //# sourceMappingURL=chunk-JLE5ZH6J.mjs.map
1
+ import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-NQXLA34W.mjs";import{a as se}from"./chunk-7ZUH3TQ2.mjs";import{a as ie}from"./chunk-EGLXC3FA.mjs";import{a as N}from"./chunk-E55Y5DJE.mjs";import{a as oe}from"./chunk-I2FFTRVB.mjs";import{a as te}from"./chunk-TXJIXRMC.mjs";import{a as re}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-AZEXDP7Y.mjs";import{a as p}from"./chunk-TPZ2PFCM.mjs";import{a as ee}from"./chunk-CDASOTMO.mjs";import{a as L}from"./chunk-HSK376OG.mjs";import{a as ne}from"./chunk-EWFCQIZV.mjs";import{a as Z}from"./chunk-QJGFIK7H.mjs";import{b as Q}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as J}from"./chunk-NRXYSTRW.mjs";import{j as X,l as D,u as E,v as y,w as M}from"./chunk-SMW2Y5YA.mjs";import{a as P}from"./chunk-ASWAR3QU.mjs";import{a as K}from"./chunk-SUSUR4QF.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as Y}from"./chunk-6XX6ZLRH.mjs";import{g as $}from"./chunk-2IUBMLF4.mjs";import{a as q,q as F,s as l}from"./chunk-PFYTYBW3.mjs";import{f as V}from"./chunk-UERJ6AKK.mjs";import{b as A,c as B}from"./chunk-SAAOQW7P.mjs";import{a as H}from"./chunk-VNLGNNIL.mjs";import{b as G,c as j}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-ZVIKYGX5.mjs";import{a as n}from"./chunk-ZONHCECO.mjs";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await ie({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!P())return;await N.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await te({shouldInitProvider:!0});this.provider=r}catch(r){throw X({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=N.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>oe({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ge=3e4,ve=5e3,me=3e3,S=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=H(i),r=V(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=Q(l());if(!(!this.shouldCheckConnection()||i))try{await M().getProvider().getAddress()}catch{if(D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,ve)}},ge))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new E(i);i.getType=()=>n.ledger,y(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:me,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await ne(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Z.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=A(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as he}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=he.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var x=class extends p{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[n.metamask]})};this.walletUrl=r??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=A(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return n.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as fe}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],W=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:fe.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??U.walletConnectDeepLink;this._approval=o,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!P())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=P(),t=B(l());if(G(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Y()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:_={},walletConnectV2RelayAddress:O=""}=e,w=new J(v,t,O,m,_);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var T=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new x;break}case n.walletConnect:{let s=j(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new W({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=K();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new E(r);y(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){M().cancelLogin(),y(null),q(n.none)}};T._customProviders=[];var we=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await ee({cancelAction:e}),v=Object.values(T.customProviders),m=v.reduce((u,R)=>(u[R.type]=R.name,u),{}),_={...c,...m},O=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",O);let w=we(v,r)?r:n.none;d.updateData({name:_[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=re(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,T as d,g as e,z as f,k as g,x as h,W as i};
2
+ //# sourceMappingURL=chunk-JJUBN3OG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-7BYCH7J2.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-PGCZMYUZ.mjs.map
1
+ import{a as e}from"./chunk-WOJOOCI6.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-JPWJSEO6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-X5C4JWTG.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-LSHOMXXT.mjs.map
1
+ import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-PFYTYBW3.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-KAGEHYS4.mjs.map
@@ -1,2 +1,2 @@
1
- import{w as n}from"./chunk-FSJ6P7DN.mjs";import{a as i}from"./chunk-ZONHCECO.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-7P3DNMWN.mjs.map
1
+ import{w as n}from"./chunk-SMW2Y5YA.mjs";import{a as i}from"./chunk-ZONHCECO.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-KCGV3ZXW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-SOQYOVR7.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
- //# sourceMappingURL=chunk-MT47AO63.mjs.map
1
+ import{a as o}from"./chunk-SUSUR4QF.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
+ //# sourceMappingURL=chunk-LB4OQBQA.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{s as c}from"./chunk-X5C4JWTG.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
- //# sourceMappingURL=chunk-CRQHYOGT.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{s as c}from"./chunk-PFYTYBW3.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
+ //# sourceMappingURL=chunk-LSPPEREA.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as e}from"./chunk-PFYTYBW3.mjs";var o=t=>e().setState(({ui:n})=>{n.isSidePanelOpen=t},!1,"setIsSidePanelOpen");export{o as a};
2
+ //# sourceMappingURL=chunk-LTJ6QYTI.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as c}from"./chunk-X5C4JWTG.mjs";import{a as o}from"./chunk-JMC7CMTU.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
2
- //# sourceMappingURL=chunk-756GEXZI.mjs.map
1
+ import{q as c}from"./chunk-PFYTYBW3.mjs";import{a as o}from"./chunk-JMC7CMTU.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
2
+ //# sourceMappingURL=chunk-MBX42DL3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-TXRPUKQM.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-UNBTFF6K.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
- //# sourceMappingURL=chunk-FLJAPLZE.mjs.map
1
+ import{a as k}from"./chunk-OLSMED5W.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-UNBTFF6K.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
+ //# sourceMappingURL=chunk-MPLHCQ4R.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-X4KR5OSC.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-ATGWLKGR.mjs.map
1
+ import{a}from"./chunk-2ZUMLHAK.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-MXW4MATE.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-PFYTYBW3.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-N4S6ABHB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-7BYCH7J2.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
2
- //# sourceMappingURL=chunk-PEBY7O46.mjs.map
1
+ import{a as t}from"./chunk-WOJOOCI6.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
2
+ //# sourceMappingURL=chunk-NEZI3IWF.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as s}from"./chunk-JLE5ZH6J.mjs";import{a as u}from"./chunk-QIN2VFBM.mjs";import{s as c}from"./chunk-X5C4JWTG.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-ZVIKYGX5.mjs";import{a}from"./chunk-ZONHCECO.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(a).filter(n=>![a.none,a.webview].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
2
- //# sourceMappingURL=chunk-PQ2PJ25S.mjs.map
1
+ import{d as s}from"./chunk-JJUBN3OG.mjs";import{a as u}from"./chunk-Y5ERFLZ5.mjs";import{s as c}from"./chunk-PFYTYBW3.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-ZVIKYGX5.mjs";import{a}from"./chunk-ZONHCECO.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(a).filter(n=>![a.none,a.webview].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
2
+ //# sourceMappingURL=chunk-NKBWNOLA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-LWYHD7UG.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
- //# sourceMappingURL=chunk-5CJ4UDMA.mjs.map
1
+ import{a as e}from"./chunk-OJ4UPDFE.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
+ //# sourceMappingURL=chunk-NQXLA34W.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-ASZPRMFV.mjs";import{c as n}from"./chunk-PFYTYBW3.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
2
+ //# sourceMappingURL=chunk-OA5MR4Y6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-72BJ253L.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
- //# sourceMappingURL=chunk-EHSW5LVN.mjs.map
1
+ import{a as e}from"./chunk-W32KHY5V.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
+ //# sourceMappingURL=chunk-OIEDIWGP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-Y5UBM4II.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
- //# sourceMappingURL=chunk-LWYHD7UG.mjs.map
1
+ import{a as s}from"./chunk-GMOPF52N.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
+ //# sourceMappingURL=chunk-OJ4UPDFE.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-PFYTYBW3.mjs";import{a as t}from"./chunk-SAAOQW7P.mjs";function f(r=o()){return t(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-OKTLLLTC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-LSHOMXXT.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
2
- //# sourceMappingURL=chunk-TXRPUKQM.mjs.map
1
+ import{a as l}from"./chunk-KAGEHYS4.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
2
+ //# sourceMappingURL=chunk-OLSMED5W.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-ATGWLKGR.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
2
- //# sourceMappingURL=chunk-5HBNM4M2.mjs.map
1
+ import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-MXW4MATE.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
2
+ //# sourceMappingURL=chunk-OYMPU3D4.mjs.map
@@ -0,0 +1,2 @@
1
+ import{e}from"./chunk-2IUBMLF4.mjs";import{s as o}from"./chunk-PFYTYBW3.mjs";import{e as t}from"./chunk-SAAOQW7P.mjs";function m(){let r=t(o());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
+ //# sourceMappingURL=chunk-P5EESGJF.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-2WIGLKYG.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as T}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as l}from"./chunk-NTEMINYA.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=c,e.loginInfo=m,e.transactions=d,e.toasts=S};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=a(e),n=p(e),{address:i,publicKey:M}=s(e);if(i&&M!==new l(i).toHex()&&A(e),!t)return;if(n==null){w(H());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var z=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:O(e)})));return t.subscribe(z),t},r,D=e=>{r=e},o=()=>(r||D(W(()=>new v)),r),pe=(e=k)=>{let t=W(e);return D(t),t},le=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{me as a,fe as b,Se as c,ue as d,de as e,Le as f,xe as g,E as h,b as i,A as j,H as k,w as l,C as m,z as n,W as o,D as p,o as q,pe as r,le as s};
2
- //# sourceMappingURL=chunk-X5C4JWTG.mjs.map
1
+ import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-HVNTW6GO.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as T}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as l}from"./chunk-NTEMINYA.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=c,e.loginInfo=m,e.transactions=d,e.toasts=S};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=a(e),n=p(e),{address:i,publicKey:M}=s(e);if(i&&M!==new l(i).toHex()&&A(e),!t)return;if(n==null){w(H());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var z=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:O(e)})));return t.subscribe(z),t},r,D=e=>{r=e},o=()=>(r||D(W(()=>new v)),r),pe=(e=k)=>{let t=W(e);return D(t),t},le=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{me as a,fe as b,Se as c,ue as d,de as e,Le as f,xe as g,E as h,b as i,A as j,H as k,w as l,C as m,z as n,W as o,D as p,o as q,pe as r,le as s};
2
+ //# sourceMappingURL=chunk-PFYTYBW3.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-PFYTYBW3.mjs";import{b as t}from"./chunk-UERJ6AKK.mjs";function c(r=o()){return t(r)}export{c as a};
2
+ //# sourceMappingURL=chunk-PR365NU7.mjs.map