@multiversx/sdk-dapp 5.2.6 → 5.2.7

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 (374) hide show
  1. package/out/__chunks__/chunk-22IJ3QB4.mjs +2 -0
  2. package/out/__chunks__/chunk-34PFLOIB.mjs +2 -0
  3. package/out/__chunks__/{chunk-WK4PPAAJ.mjs → chunk-37O2ROE4.mjs} +2 -2
  4. package/out/__chunks__/{chunk-O3YM7WCC.mjs → chunk-3Q5IOJ67.mjs} +2 -2
  5. package/out/__chunks__/{chunk-TFDVHULP.mjs → chunk-3WS7UAIF.mjs} +2 -2
  6. package/out/__chunks__/{chunk-RL2G66LY.mjs → chunk-4JCZWUDH.mjs} +2 -2
  7. package/out/__chunks__/chunk-4L2AXB2K.mjs +2 -0
  8. package/out/__chunks__/{chunk-MXNCPIER.mjs → chunk-4PQ3E6VH.mjs} +2 -2
  9. package/out/__chunks__/{chunk-74JXPSSX.mjs → chunk-5FZ5WUYZ.mjs} +2 -2
  10. package/out/__chunks__/chunk-5MKXCLBG.mjs +2 -0
  11. package/out/__chunks__/{chunk-Z5AFLXOE.mjs → chunk-5TNG3JR3.mjs} +2 -2
  12. package/out/__chunks__/chunk-63MIE6JF.mjs +2 -0
  13. package/out/__chunks__/chunk-6L7YQWGX.mjs +2 -0
  14. package/out/__chunks__/{chunk-PDKESLKC.mjs → chunk-A3D3GW7R.mjs} +2 -2
  15. package/out/__chunks__/{chunk-SUHXBGYR.mjs → chunk-A4KEELZM.mjs} +2 -2
  16. package/out/__chunks__/chunk-AORVRKD7.mjs +2 -0
  17. package/out/__chunks__/chunk-B4QT6VK6.mjs +2 -0
  18. package/out/__chunks__/{chunk-M2KI5WFN.mjs → chunk-B5ETDLE6.mjs} +2 -2
  19. package/out/__chunks__/chunk-BAWWEDTL.mjs +2 -0
  20. package/out/__chunks__/{chunk-R3U4ONSV.mjs → chunk-C6D4JSK4.mjs} +2 -2
  21. package/out/__chunks__/{chunk-JDTTHSQL.mjs → chunk-CT235ZUB.mjs} +2 -2
  22. package/out/__chunks__/{chunk-67JAXZGA.mjs → chunk-DP53BNR6.mjs} +2 -2
  23. package/out/__chunks__/{chunk-YSPLCVKY.mjs → chunk-EETNNBUP.mjs} +2 -2
  24. package/out/__chunks__/{chunk-YTIAXTQR.mjs → chunk-EEVAKQEF.mjs} +2 -2
  25. package/out/__chunks__/chunk-EYGPOZGS.mjs +2 -0
  26. package/out/__chunks__/{chunk-6ME6A43J.mjs → chunk-EYNHHGCH.mjs} +2 -2
  27. package/out/__chunks__/{chunk-MBBXTAA3.mjs → chunk-FNMAWOLC.mjs} +2 -2
  28. package/out/__chunks__/{chunk-HOBCDZ2D.mjs → chunk-FUFPNXYS.mjs} +2 -2
  29. package/out/__chunks__/{chunk-CMJSKAR5.mjs → chunk-G5VTJTDE.mjs} +2 -2
  30. package/out/__chunks__/{chunk-7QYO4UOP.mjs → chunk-GFEDWIDV.mjs} +2 -2
  31. package/out/__chunks__/{chunk-2NF5HX3H.mjs → chunk-HGQYSGTG.mjs} +2 -2
  32. package/out/__chunks__/{chunk-GMP2DZ26.mjs → chunk-I47BE6ON.mjs} +2 -2
  33. package/out/__chunks__/{chunk-RCNZOLEM.mjs → chunk-ICTG3GLU.mjs} +2 -2
  34. package/out/__chunks__/{chunk-YX7TMA3N.mjs → chunk-IF3IASJC.mjs} +2 -2
  35. package/out/__chunks__/{chunk-OXC2IURR.mjs → chunk-IGN5F3GN.mjs} +2 -2
  36. package/out/__chunks__/{chunk-SWZ5LDC3.mjs → chunk-J6WJ6ULQ.mjs} +2 -2
  37. package/out/__chunks__/{chunk-YHNOFYGM.mjs → chunk-JIIULTH3.mjs} +2 -2
  38. package/out/__chunks__/{chunk-7XASUTI2.mjs → chunk-JQ57YAGP.mjs} +2 -2
  39. package/out/__chunks__/chunk-JRRBXKOK.mjs +2 -0
  40. package/out/__chunks__/{chunk-6CUDZR72.mjs → chunk-JTIXXP4J.mjs} +2 -2
  41. package/out/__chunks__/{chunk-2VRRMEOY.mjs → chunk-JVRKUYW6.mjs} +2 -2
  42. package/out/__chunks__/{chunk-PT2OF4QJ.mjs → chunk-K3VNFEPP.mjs} +2 -2
  43. package/out/__chunks__/{chunk-CUMJOJXJ.mjs → chunk-K7X3YFJU.mjs} +2 -2
  44. package/out/__chunks__/{chunk-VVZ2I6CL.mjs → chunk-KLDTJCML.mjs} +2 -2
  45. package/out/__chunks__/chunk-KOLL3XGD.mjs +2 -0
  46. package/out/__chunks__/{chunk-ZDJN4F3W.mjs → chunk-LFBY6WV3.mjs} +2 -2
  47. package/out/__chunks__/{chunk-QJZ5YIXI.mjs → chunk-LUCBMBG7.mjs} +2 -2
  48. package/out/__chunks__/chunk-MSF6QQXH.mjs +2 -0
  49. package/out/__chunks__/{chunk-ANIJIRAY.mjs → chunk-NOIBKBS3.mjs} +2 -2
  50. package/out/__chunks__/{chunk-VQULIVGX.mjs → chunk-NUJ4VCBC.mjs} +2 -2
  51. package/out/__chunks__/chunk-O4I2ENO6.mjs +2 -0
  52. package/out/__chunks__/chunk-OPHTJKDE.mjs +2 -0
  53. package/out/__chunks__/{chunk-XA3AGZCX.mjs → chunk-PBTBNQ25.mjs} +2 -2
  54. package/out/__chunks__/{chunk-K3VVHPG3.mjs → chunk-PCTCQEFY.mjs} +2 -2
  55. package/out/__chunks__/{chunk-775THAIS.mjs → chunk-PI3A4HAK.mjs} +2 -2
  56. package/out/__chunks__/{chunk-3OEO7IVT.mjs → chunk-Q6RQNGJC.mjs} +2 -2
  57. package/out/__chunks__/chunk-QAOBZWSF.mjs +2 -0
  58. package/out/__chunks__/{chunk-Q4OG6NMJ.mjs.map → chunk-QAOBZWSF.mjs.map} +1 -1
  59. package/out/__chunks__/{chunk-U2IPYFJX.mjs → chunk-QSXHUZLS.mjs} +2 -2
  60. package/out/__chunks__/{chunk-FULNMU6J.mjs → chunk-QUPXSKV4.mjs} +2 -2
  61. package/out/__chunks__/{chunk-JDLVFGXF.mjs → chunk-RIB3PJIR.mjs} +2 -2
  62. package/out/__chunks__/{chunk-ZTUC7FCA.mjs → chunk-RXX3GSOM.mjs} +2 -2
  63. package/out/__chunks__/{chunk-TQIB47S6.mjs → chunk-SGNJ44D2.mjs} +2 -2
  64. package/out/__chunks__/{chunk-2TCIBFJT.mjs → chunk-TBCYELRO.mjs} +2 -2
  65. package/out/__chunks__/{chunk-OD6C4XKP.mjs → chunk-THWK4TAG.mjs} +2 -2
  66. package/out/__chunks__/{chunk-SV4C4UPN.mjs → chunk-TLW7RSAO.mjs} +2 -2
  67. package/out/__chunks__/{chunk-OVBYKKMB.mjs → chunk-UY57JRX7.mjs} +2 -2
  68. package/out/__chunks__/{chunk-4QPWKBSQ.mjs → chunk-V7P525KM.mjs} +2 -2
  69. package/out/__chunks__/{chunk-ET5L4CEA.mjs → chunk-VOJLXYJ3.mjs} +2 -2
  70. package/out/__chunks__/{chunk-KHBRO4FY.mjs → chunk-VW2RKDMX.mjs} +2 -2
  71. package/out/__chunks__/{chunk-4B3YTXMB.mjs → chunk-WGKDCYB7.mjs} +2 -2
  72. package/out/__chunks__/chunk-XFBUY46Y.mjs +2 -0
  73. package/out/__chunks__/{chunk-BCODBYYR.mjs → chunk-XH2ZG7PU.mjs} +2 -2
  74. package/out/__chunks__/{chunk-OU5Y3UTY.mjs → chunk-XYPOYVRU.mjs} +2 -2
  75. package/out/__chunks__/{chunk-XHM77HFZ.mjs → chunk-Y3OGRXWT.mjs} +2 -2
  76. package/out/__chunks__/{chunk-2K2QZVBC.mjs → chunk-Y5BESSJK.mjs} +2 -2
  77. package/out/__chunks__/{chunk-UCCJLDG6.mjs → chunk-Z3NZ36LQ.mjs} +2 -2
  78. package/out/__chunks__/{chunk-O7KFAU3B.mjs → chunk-Z64FHGQ2.mjs} +2 -2
  79. package/out/__chunks__/{chunk-5O725H7M.mjs → chunk-ZC6ENJP4.mjs} +2 -2
  80. package/out/__chunks__/{chunk-U54BL4SU.mjs → chunk-ZRMZYVMR.mjs} +2 -2
  81. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  82. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  83. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  84. package/out/apiCalls/index.mjs +1 -1
  85. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  86. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  87. package/out/apiCalls/tokens/index.mjs +1 -1
  88. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  89. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  90. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  91. package/out/constants/browser.constants.mjs +1 -1
  92. package/out/constants/index.mjs +1 -1
  93. package/out/constants/storage.constants.mjs +1 -1
  94. package/out/constants/window.constants.cjs +1 -1
  95. package/out/constants/window.constants.cjs.map +1 -1
  96. package/out/constants/window.constants.mjs +1 -1
  97. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  98. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  99. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  100. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  101. package/out/index.mjs +1 -1
  102. package/out/lib/sdkDappUi.mjs +1 -1
  103. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  104. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  105. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  106. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  107. package/out/managers/ToastManager/ToastUICoordinator.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.mjs +1 -1
  246. package/out/store/actions/ui/index.mjs +1 -1
  247. package/out/store/actions/ui/uiActions.mjs +1 -1
  248. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  249. package/out/store/middleware/index.mjs +1 -1
  250. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  251. package/out/store/storage/index.mjs +1 -1
  252. package/out/store/storage/storageCallback.mjs +1 -1
  253. package/out/store/store.mjs +1 -1
  254. package/out/utils/ComponentFactory.mjs +1 -1
  255. package/out/utils/account/index.mjs +1 -1
  256. package/out/utils/account/refreshAccount.mjs +1 -1
  257. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  258. package/out/utils/index.mjs +1 -1
  259. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  260. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  261. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  262. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  263. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  264. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  265. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  266. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  267. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  268. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  269. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  270. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  271. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  272. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  273. package/out/utils/transactions/index.mjs +1 -1
  274. package/out/utils/visual/index.mjs +1 -1
  275. package/out/utils/visual/switchTheme.mjs +1 -1
  276. package/out/utils/window/getIsInIframe.mjs +1 -1
  277. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  278. package/out/utils/window/index.mjs +1 -1
  279. package/package.json +2 -2
  280. package/out/__chunks__/chunk-6OIZTWJQ.mjs +0 -2
  281. package/out/__chunks__/chunk-7C3DDRSK.mjs +0 -2
  282. package/out/__chunks__/chunk-7GZRWUJQ.mjs +0 -2
  283. package/out/__chunks__/chunk-7UJCMFKV.mjs +0 -2
  284. package/out/__chunks__/chunk-BMSWZIEX.mjs +0 -2
  285. package/out/__chunks__/chunk-DMF2DF5I.mjs +0 -2
  286. package/out/__chunks__/chunk-DOBSLHLX.mjs +0 -2
  287. package/out/__chunks__/chunk-EUBOWXIH.mjs +0 -2
  288. package/out/__chunks__/chunk-FE5FK7I6.mjs +0 -2
  289. package/out/__chunks__/chunk-HAPHEGVZ.mjs +0 -2
  290. package/out/__chunks__/chunk-IE4SA26O.mjs +0 -2
  291. package/out/__chunks__/chunk-IHU6TBZQ.mjs +0 -2
  292. package/out/__chunks__/chunk-OYQAXY6H.mjs +0 -2
  293. package/out/__chunks__/chunk-Q4OG6NMJ.mjs +0 -2
  294. package/out/__chunks__/chunk-SKNUG6M5.mjs +0 -2
  295. package/out/__chunks__/chunk-W37M2LIA.mjs +0 -2
  296. package/out/__chunks__/chunk-WQZKREPI.mjs +0 -2
  297. /package/out/__chunks__/{chunk-DOBSLHLX.mjs.map → chunk-22IJ3QB4.mjs.map} +0 -0
  298. /package/out/__chunks__/{chunk-6OIZTWJQ.mjs.map → chunk-34PFLOIB.mjs.map} +0 -0
  299. /package/out/__chunks__/{chunk-WK4PPAAJ.mjs.map → chunk-37O2ROE4.mjs.map} +0 -0
  300. /package/out/__chunks__/{chunk-O3YM7WCC.mjs.map → chunk-3Q5IOJ67.mjs.map} +0 -0
  301. /package/out/__chunks__/{chunk-TFDVHULP.mjs.map → chunk-3WS7UAIF.mjs.map} +0 -0
  302. /package/out/__chunks__/{chunk-RL2G66LY.mjs.map → chunk-4JCZWUDH.mjs.map} +0 -0
  303. /package/out/__chunks__/{chunk-SKNUG6M5.mjs.map → chunk-4L2AXB2K.mjs.map} +0 -0
  304. /package/out/__chunks__/{chunk-MXNCPIER.mjs.map → chunk-4PQ3E6VH.mjs.map} +0 -0
  305. /package/out/__chunks__/{chunk-74JXPSSX.mjs.map → chunk-5FZ5WUYZ.mjs.map} +0 -0
  306. /package/out/__chunks__/{chunk-HAPHEGVZ.mjs.map → chunk-5MKXCLBG.mjs.map} +0 -0
  307. /package/out/__chunks__/{chunk-Z5AFLXOE.mjs.map → chunk-5TNG3JR3.mjs.map} +0 -0
  308. /package/out/__chunks__/{chunk-7C3DDRSK.mjs.map → chunk-63MIE6JF.mjs.map} +0 -0
  309. /package/out/__chunks__/{chunk-7UJCMFKV.mjs.map → chunk-6L7YQWGX.mjs.map} +0 -0
  310. /package/out/__chunks__/{chunk-PDKESLKC.mjs.map → chunk-A3D3GW7R.mjs.map} +0 -0
  311. /package/out/__chunks__/{chunk-SUHXBGYR.mjs.map → chunk-A4KEELZM.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-IHU6TBZQ.mjs.map → chunk-AORVRKD7.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-EUBOWXIH.mjs.map → chunk-B4QT6VK6.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-M2KI5WFN.mjs.map → chunk-B5ETDLE6.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-W37M2LIA.mjs.map → chunk-BAWWEDTL.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-R3U4ONSV.mjs.map → chunk-C6D4JSK4.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-JDTTHSQL.mjs.map → chunk-CT235ZUB.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-67JAXZGA.mjs.map → chunk-DP53BNR6.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-YSPLCVKY.mjs.map → chunk-EETNNBUP.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-YTIAXTQR.mjs.map → chunk-EEVAKQEF.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-7GZRWUJQ.mjs.map → chunk-EYGPOZGS.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-6ME6A43J.mjs.map → chunk-EYNHHGCH.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-MBBXTAA3.mjs.map → chunk-FNMAWOLC.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-HOBCDZ2D.mjs.map → chunk-FUFPNXYS.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-CMJSKAR5.mjs.map → chunk-G5VTJTDE.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-7QYO4UOP.mjs.map → chunk-GFEDWIDV.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-2NF5HX3H.mjs.map → chunk-HGQYSGTG.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-GMP2DZ26.mjs.map → chunk-I47BE6ON.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-RCNZOLEM.mjs.map → chunk-ICTG3GLU.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-YX7TMA3N.mjs.map → chunk-IF3IASJC.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-OXC2IURR.mjs.map → chunk-IGN5F3GN.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-SWZ5LDC3.mjs.map → chunk-J6WJ6ULQ.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-YHNOFYGM.mjs.map → chunk-JIIULTH3.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-7XASUTI2.mjs.map → chunk-JQ57YAGP.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-WQZKREPI.mjs.map → chunk-JRRBXKOK.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-6CUDZR72.mjs.map → chunk-JTIXXP4J.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-2VRRMEOY.mjs.map → chunk-JVRKUYW6.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-PT2OF4QJ.mjs.map → chunk-K3VNFEPP.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-CUMJOJXJ.mjs.map → chunk-K7X3YFJU.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-VVZ2I6CL.mjs.map → chunk-KLDTJCML.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-OYQAXY6H.mjs.map → chunk-KOLL3XGD.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-ZDJN4F3W.mjs.map → chunk-LFBY6WV3.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-QJZ5YIXI.mjs.map → chunk-LUCBMBG7.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-DMF2DF5I.mjs.map → chunk-MSF6QQXH.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-ANIJIRAY.mjs.map → chunk-NOIBKBS3.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-VQULIVGX.mjs.map → chunk-NUJ4VCBC.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-BMSWZIEX.mjs.map → chunk-O4I2ENO6.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-IE4SA26O.mjs.map → chunk-OPHTJKDE.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-XA3AGZCX.mjs.map → chunk-PBTBNQ25.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-K3VVHPG3.mjs.map → chunk-PCTCQEFY.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-775THAIS.mjs.map → chunk-PI3A4HAK.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-3OEO7IVT.mjs.map → chunk-Q6RQNGJC.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-U2IPYFJX.mjs.map → chunk-QSXHUZLS.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-FULNMU6J.mjs.map → chunk-QUPXSKV4.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-JDLVFGXF.mjs.map → chunk-RIB3PJIR.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-ZTUC7FCA.mjs.map → chunk-RXX3GSOM.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-TQIB47S6.mjs.map → chunk-SGNJ44D2.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-2TCIBFJT.mjs.map → chunk-TBCYELRO.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-OD6C4XKP.mjs.map → chunk-THWK4TAG.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-SV4C4UPN.mjs.map → chunk-TLW7RSAO.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-OVBYKKMB.mjs.map → chunk-UY57JRX7.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-4QPWKBSQ.mjs.map → chunk-V7P525KM.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-ET5L4CEA.mjs.map → chunk-VOJLXYJ3.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-KHBRO4FY.mjs.map → chunk-VW2RKDMX.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-4B3YTXMB.mjs.map → chunk-WGKDCYB7.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-FE5FK7I6.mjs.map → chunk-XFBUY46Y.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-BCODBYYR.mjs.map → chunk-XH2ZG7PU.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-OU5Y3UTY.mjs.map → chunk-XYPOYVRU.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-XHM77HFZ.mjs.map → chunk-Y3OGRXWT.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-2K2QZVBC.mjs.map → chunk-Y5BESSJK.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-UCCJLDG6.mjs.map → chunk-Z3NZ36LQ.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-O7KFAU3B.mjs.map → chunk-Z64FHGQ2.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-5O725H7M.mjs.map → chunk-ZC6ENJP4.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-U54BL4SU.mjs.map → chunk-ZRMZYVMR.mjs.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-ICTG3GLU.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";function g(r=t()){return e(r).egldLabel}export{g as a};
2
+ //# sourceMappingURL=chunk-22IJ3QB4.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-ICTG3GLU.mjs";import{c as r}from"./chunk-UERJ6AKK.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-34PFLOIB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-O7KFAU3B.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-WK4PPAAJ.mjs.map
1
+ import{a as e}from"./chunk-Z64FHGQ2.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-37O2ROE4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-3QWTD55I.mjs";import{s as m}from"./chunk-RCNZOLEM.mjs";import{b as a}from"./chunk-7VHTZYM2.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-O3YM7WCC.mjs.map
1
+ import{a as g}from"./chunk-3QWTD55I.mjs";import{s as m}from"./chunk-ICTG3GLU.mjs";import{b as a}from"./chunk-7VHTZYM2.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-3Q5IOJ67.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-67JAXZGA.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-IE4SA26O.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-TFDVHULP.mjs.map
1
+ import{a as l}from"./chunk-DP53BNR6.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-OPHTJKDE.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-3WS7UAIF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-BCODBYYR.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-RL2G66LY.mjs.map
1
+ import{a as e}from"./chunk-XH2ZG7PU.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-4JCZWUDH.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-ICTG3GLU.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";function d(t=e()){return r(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-4L2AXB2K.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-O3YM7WCC.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-MXNCPIER.mjs.map
1
+ import{a as l}from"./chunk-3Q5IOJ67.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-4PQ3E6VH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ZDJN4F3W.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-74JXPSSX.mjs.map
1
+ import{a as i}from"./chunk-LFBY6WV3.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-5FZ5WUYZ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-QAOBZWSF.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-5MKXCLBG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-SWZ5LDC3.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
- //# sourceMappingURL=chunk-Z5AFLXOE.mjs.map
1
+ import{a as t}from"./chunk-J6WJ6ULQ.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
+ //# sourceMappingURL=chunk-5TNG3JR3.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as r}from"./chunk-ICTG3GLU.mjs";import{b as t}from"./chunk-UTWIKUIK.mjs";var i=(e,o)=>t(`transaction-${e}`)(o??r())??null;export{i as a};
2
+ //# sourceMappingURL=chunk-63MIE6JF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-B5ETDLE6.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-6L7YQWGX.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as r}from"./chunk-RCNZOLEM.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
- //# sourceMappingURL=chunk-PDKESLKC.mjs.map
1
+ import{s as r}from"./chunk-ICTG3GLU.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
+ //# sourceMappingURL=chunk-A3D3GW7R.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-Q4OG6NMJ.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-SUHXBGYR.mjs.map
1
+ import{a as t}from"./chunk-QAOBZWSF.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-A4KEELZM.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-O4I2ENO6.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-AORVRKD7.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-ICTG3GLU.mjs";import{a as t}from"./chunk-UERJ6AKK.mjs";function n(r=o()){return t(r)}export{n as a};
2
+ //# sourceMappingURL=chunk-B4QT6VK6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-OVBYKKMB.mjs";import a from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(a(t))return[];let i=s(t);return r({transactions:i})};export{e as a};
2
- //# sourceMappingURL=chunk-M2KI5WFN.mjs.map
1
+ import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-UY57JRX7.mjs";import a from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(a(t))return[];let i=s(t);return r({transactions:i})};export{e as a};
2
+ //# sourceMappingURL=chunk-B5ETDLE6.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-K7X3YFJU.mjs";import{w as m}from"./chunk-TBCYELRO.mjs";import{s as n}from"./chunk-ICTG3GLU.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as p}from"./chunk-37O2ROE4.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-BAWWEDTL.mjs.map
@@ -1,2 +1,2 @@
1
- import{j as p,q as e}from"./chunk-RCNZOLEM.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-R3U4ONSV.mjs.map
1
+ import{j as p,q as e}from"./chunk-ICTG3GLU.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-C6D4JSK4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-EUBOWXIH.mjs";import{a as f}from"./chunk-ANIJIRAY.mjs";import{a as g}from"./chunk-YHNOFYGM.mjs";import{b as a}from"./chunk-RCNZOLEM.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-JDTTHSQL.mjs.map
1
+ import{a as u}from"./chunk-B4QT6VK6.mjs";import{a as f}from"./chunk-NOIBKBS3.mjs";import{a as g}from"./chunk-JIIULTH3.mjs";import{b as a}from"./chunk-ICTG3GLU.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-CT235ZUB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-FRDR4A7Z.mjs";import{x as g}from"./chunk-2TCIBFJT.mjs";import{a as c}from"./chunk-IE4SA26O.mjs";import{s as n}from"./chunk-RCNZOLEM.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=c(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=g(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
- //# sourceMappingURL=chunk-67JAXZGA.mjs.map
1
+ import{a as f}from"./chunk-FRDR4A7Z.mjs";import{x as g}from"./chunk-TBCYELRO.mjs";import{a as c}from"./chunk-OPHTJKDE.mjs";import{s as n}from"./chunk-ICTG3GLU.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=c(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=g(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
+ //# sourceMappingURL=chunk-DP53BNR6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-N55JEIM6.mjs";import{q as i}from"./chunk-RCNZOLEM.mjs";import{current as p}from"immer";var h=({transactions:s,transactionsDisplayInfo:r,status:e,sessionInformation:t})=>{let a=Date.now().toString();return i().setState(({transactions:n})=>{n[a]={transactions:s,status:e,transactionsDisplayInfo:r,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),a},T=({sessionId:s,status:r,errorMessage:e})=>{i().setState(({transactions:t})=>{if(!t[s])return;let a=p(t[s]).transactionsDisplayInfo??{},n=e||a?.errorMessage;t[s].status=r,t[s].errorMessage=n,t[s].transactionsDisplayInfo={...a,errorMessage:n}},!1,"updateTransactionsSession")},E=({sessionId:s,transaction:r})=>{let e=null;return i().setState(({transactions:t})=>{let a=t[s]?.transactions;if(a!=null){t[s].transactions=a.map(o=>o.hash===r.hash?{...o,...r??{}}:o);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},D=()=>{i().setState(({transactions:s,toasts:r})=>{let t=Object.keys(s).filter(n=>{let o=s[n];if(!o)return!1;let{status:c}=o;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let a=r.transactionToasts.filter(n=>!t.includes(n.toastId));r.transactionToasts=a},!1,"clearCompletedTransactions")};export{h as a,T as b,E as c,D as d};
2
- //# sourceMappingURL=chunk-YSPLCVKY.mjs.map
1
+ import{a as u}from"./chunk-N55JEIM6.mjs";import{q as i}from"./chunk-ICTG3GLU.mjs";import{current as p}from"immer";var h=({transactions:s,transactionsDisplayInfo:r,status:e,sessionInformation:t})=>{let a=Date.now().toString();return i().setState(({transactions:n})=>{n[a]={transactions:s,status:e,transactionsDisplayInfo:r,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),a},T=({sessionId:s,status:r,errorMessage:e})=>{i().setState(({transactions:t})=>{if(!t[s])return;let a=p(t[s]).transactionsDisplayInfo??{},n=e||a?.errorMessage;t[s].status=r,t[s].errorMessage=n,t[s].transactionsDisplayInfo={...a,errorMessage:n}},!1,"updateTransactionsSession")},E=({sessionId:s,transaction:r})=>{let e=null;return i().setState(({transactions:t})=>{let a=t[s]?.transactions;if(a!=null){t[s].transactions=a.map(o=>o.hash===r.hash?{...o,...r??{}}:o);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},D=()=>{i().setState(({transactions:s,toasts:r})=>{let t=Object.keys(s).filter(n=>{let o=s[n];if(!o)return!1;let{status:c}=o;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let a=r.transactionToasts.filter(n=>!t.includes(n.toastId));r.transactionToasts=a},!1,"clearCompletedTransactions")};export{h as a,T as b,E as c,D as d};
2
+ //# sourceMappingURL=chunk-EETNNBUP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-2K2QZVBC.mjs";import{b as r}from"./chunk-4QPWKBSQ.mjs";import{s as i}from"./chunk-RCNZOLEM.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
- //# sourceMappingURL=chunk-YTIAXTQR.mjs.map
1
+ import{a as n}from"./chunk-Y5BESSJK.mjs";import{b as r}from"./chunk-V7P525KM.mjs";import{s as i}from"./chunk-ICTG3GLU.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
+ //# sourceMappingURL=chunk-EEVAKQEF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{e}from"./chunk-M6MN4RXG.mjs";import{s as o}from"./chunk-ICTG3GLU.mjs";import{h as t}from"./chunk-7VHTZYM2.mjs";function m(){let r=t(o());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
+ //# sourceMappingURL=chunk-EYGPOZGS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-6OIZTWJQ.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-6ME6A43J.mjs.map
1
+ import{a as o}from"./chunk-34PFLOIB.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-EYNHHGCH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-4B3YTXMB.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-MBBXTAA3.mjs.map
1
+ import{a as e}from"./chunk-WGKDCYB7.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-FNMAWOLC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-RCNZOLEM.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
2
- //# sourceMappingURL=chunk-HOBCDZ2D.mjs.map
1
+ import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-ICTG3GLU.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
2
+ //# sourceMappingURL=chunk-FUFPNXYS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-Z5AFLXOE.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-CMJSKAR5.mjs.map
1
+ import{a as e}from"./chunk-5TNG3JR3.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-G5VTJTDE.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as a}from"./chunk-RCNZOLEM.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-7QYO4UOP.mjs.map
1
+ import{q as a}from"./chunk-ICTG3GLU.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-GFEDWIDV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-Q4OG6NMJ.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-2NF5HX3H.mjs.map
1
+ import{a as e}from"./chunk-QAOBZWSF.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-HGQYSGTG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-YHNOFYGM.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-GMP2DZ26.mjs.map
1
+ import{a}from"./chunk-JIIULTH3.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-I47BE6ON.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-HAPHEGVZ.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-RCNZOLEM.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-5MKXCLBG.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-ICTG3GLU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-ANIJIRAY.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-YX7TMA3N.mjs.map
1
+ import{a as r}from"./chunk-NOIBKBS3.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-IF3IASJC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-RCNZOLEM.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-OXC2IURR.mjs.map
1
+ import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-ICTG3GLU.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-IGN5F3GN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-ZDJN4F3W.mjs";import{a as t}from"./chunk-FE5FK7I6.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
2
- //# sourceMappingURL=chunk-SWZ5LDC3.mjs.map
1
+ import{a as n}from"./chunk-LFBY6WV3.mjs";import{a as t}from"./chunk-XFBUY46Y.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
2
+ //# sourceMappingURL=chunk-J6WJ6ULQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as e}from"./chunk-RCNZOLEM.mjs";import{b as o}from"./chunk-7VHTZYM2.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-YHNOFYGM.mjs.map
1
+ import{s as e}from"./chunk-ICTG3GLU.mjs";import{b as o}from"./chunk-7VHTZYM2.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-JIIULTH3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-Q4OG6NMJ.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
2
- //# sourceMappingURL=chunk-7XASUTI2.mjs.map
1
+ import{a as o}from"./chunk-QAOBZWSF.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
2
+ //# sourceMappingURL=chunk-JQ57YAGP.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-ICTG3GLU.mjs";import{b as t}from"./chunk-UERJ6AKK.mjs";function c(r=o()){return t(r)}export{c as a};
2
+ //# sourceMappingURL=chunk-JRRBXKOK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-YX7TMA3N.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-6CUDZR72.mjs.map
1
+ import{a as t}from"./chunk-IF3IASJC.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-JTIXXP4J.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-M6MN4RXG.mjs";import{s as e}from"./chunk-RCNZOLEM.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-2VRRMEOY.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-M6MN4RXG.mjs";import{s as e}from"./chunk-ICTG3GLU.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-JVRKUYW6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-2VRRMEOY.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{g as f}from"./chunk-2TCIBFJT.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{a as S}from"./chunk-YSPLCVKY.mjs";import{a as y}from"./chunk-N55JEIM6.mjs";import{a as h}from"./chunk-EUBOWXIH.mjs";import{h as g}from"./chunk-M6MN4RXG.mjs";import{s as l}from"./chunk-RCNZOLEM.mjs";import{b as m}from"./chunk-7VHTZYM2.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=y(s),n=S({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 f({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-PT2OF4QJ.mjs.map
1
+ import{a as A}from"./chunk-JVRKUYW6.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{g as f}from"./chunk-TBCYELRO.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{a as S}from"./chunk-EETNNBUP.mjs";import{a as y}from"./chunk-N55JEIM6.mjs";import{a as h}from"./chunk-B4QT6VK6.mjs";import{h as g}from"./chunk-M6MN4RXG.mjs";import{s as l}from"./chunk-ICTG3GLU.mjs";import{b as m}from"./chunk-7VHTZYM2.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=y(s),n=S({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 f({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-K3VNFEPP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as ce}from"./chunk-M3YL36ZL.mjs";import{a as A}from"./chunk-775THAIS.mjs";import{a as ae}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-3OEO7IVT.mjs";import{a as R}from"./chunk-74JXPSSX.mjs";import{a as ne}from"./chunk-TFDVHULP.mjs";import{a as ie}from"./chunk-67JAXZGA.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-SV4C4UPN.mjs";import{a as p}from"./chunk-OU5Y3UTY.mjs";import{a as re}from"./chunk-CMJSKAR5.mjs";import{a as S}from"./chunk-JDLVFGXF.mjs";import{a as se}from"./chunk-ET5L4CEA.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as ee}from"./chunk-4Z3DZ2A3.mjs";import{b as I,c as Z}from"./chunk-NRXYSTRW.mjs";import{i as J,m as U,v as M,w as C,x as L}from"./chunk-2TCIBFJT.mjs";import{a as y}from"./chunk-IE4SA26O.mjs";import{a as X}from"./chunk-6OIZTWJQ.mjs";import{a as N}from"./chunk-4TBVQD27.mjs";import{a as Q}from"./chunk-R3U4ONSV.mjs";import{g as Y}from"./chunk-M6MN4RXG.mjs";import{a as q,q as F,s as c}from"./chunk-RCNZOLEM.mjs";import{f as H}from"./chunk-UERJ6AKK.mjs";import{b as f,c as B}from"./chunk-7VHTZYM2.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as $,c as j}from"./chunk-6JM4DPOH.mjs";import{a as l,b as K}from"./chunk-6R2WFQ7U.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";var w=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!y())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await S({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 le({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((i,s)=>ne({manager:e,resolve:i,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,k=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let n=this.store.getState(),{providerType:e}=G(n),r=H(n);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let n=ee(c());if(!(!this.shouldCheckConnection()||n))try{await L().getProvider().getAddress()}catch{if(U.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let n=new w({shouldInitProvider:!0});await n.init();let e=new M(n);n.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,U.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var T=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 i=await this.provider.signTransactions(e)??[];return await se(i)}catch(i){throw await r({shouldCancelAction:!0}),i}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:l.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=b.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=f(c()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=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(i){throw await t({shouldCancelAction:!1}),i}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:l.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var W=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 S({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(i){throw await t({shouldCancelAction:!0}),i}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:l[o.metamask]})};this.walletUrl=r??"",this.provider=ce.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=f(c());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 o.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 we}from"@multiversx/sdk-wallet-connect-provider/out";var pe=[I.CANCEL_ACTION,I.SIGN_LOGIN_TOKEN],x=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 i=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{i.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:I.CANCEL_ACTION,action:we.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:l.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:i}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??N.walletConnectDeepLink;this._approval=i,A.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!y())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=y(),t=B(c());if($(c())&&pe.push(I.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:O={},walletConnectV2RelayAddress:D=""}=e,P=new Z(v,t,D,m,O);return await P.init(),{walletConnectProvider:P,dappMethods:pe}}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=A.getInstance(),{uri:i="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??N.walletConnectDeepLink;t.updateData({wcURI:i,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(i)}`});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:i="",signature:s=""}=t??{};return A.getInstance().handleClose({isLoginFinished:!!i}),{address:i,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 E=class{static set customProviders(n){this._customProviders=n}static get customProviders(){return this._customProviders}static async create({type:n,anchor:e}){let r=null;switch(n){case o.extension:{r=new _;break}case o.crossWindow:{r=new T;break}case o.ledger:{r=new w({anchor:e}),await k.getInstance().init();break}case o.metamask:{r=new W;break}case o.passkey:{let s=f(c());r=new T({walletAddress:`${s.walletAddress}?${K}=${o.passkey}`});break}case o.walletConnect:{let s=j(c());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=X();for(let d of this._customProviders)d.type===n&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);C(t);let i="provider"in r&&r.provider instanceof b;return ae(i?{skipLoginMethod:o.crossWindow}:null),t}static async destroy(){L().cancelLogin(),C(null),q(o.none)}};E._customProviders=[];var Pe=(a,n)=>a.some(e=>e.type===n);async function g({message:a,handleSignMessage:n,cancelAction:e,providerType:r}){return await new Promise(async(i,s)=>{let{manager:d,onClose:h}=await re({cancelAction:e}),v=Object.values(E.customProviders),m=v.reduce((u,V)=>(u[V.type]=V.name,u),{}),O={...l,...m},D=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let P=Pe(v,r)?r:o.none;d.updateData({name:O[P],type:P});try{let u=await n(a);i(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function le({message:a,handleSignMessage:n}){try{return await g({message:a,handleSignMessage:n,providerType:l.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{le as a,w as b,k as c,E as d,g as e,T as f,_ as g,W as h,x as i};
2
- //# sourceMappingURL=chunk-CUMJOJXJ.mjs.map
1
+ import{a as ce}from"./chunk-M3YL36ZL.mjs";import{a as A}from"./chunk-PI3A4HAK.mjs";import{a as ae}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-Q6RQNGJC.mjs";import{a as R}from"./chunk-5FZ5WUYZ.mjs";import{a as ne}from"./chunk-3WS7UAIF.mjs";import{a as ie}from"./chunk-DP53BNR6.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-TLW7RSAO.mjs";import{a as p}from"./chunk-XYPOYVRU.mjs";import{a as re}from"./chunk-G5VTJTDE.mjs";import{a as S}from"./chunk-RIB3PJIR.mjs";import{a as se}from"./chunk-VOJLXYJ3.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as ee}from"./chunk-4Z3DZ2A3.mjs";import{b as I,c as Z}from"./chunk-NRXYSTRW.mjs";import{i as J,m as U,v as M,w as C,x as L}from"./chunk-TBCYELRO.mjs";import{a as y}from"./chunk-OPHTJKDE.mjs";import{a as X}from"./chunk-34PFLOIB.mjs";import{a as N}from"./chunk-4TBVQD27.mjs";import{a as Q}from"./chunk-C6D4JSK4.mjs";import{g as Y}from"./chunk-M6MN4RXG.mjs";import{a as q,q as F,s as c}from"./chunk-ICTG3GLU.mjs";import{f as H}from"./chunk-UERJ6AKK.mjs";import{b as f,c as B}from"./chunk-7VHTZYM2.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as $,c as j}from"./chunk-6JM4DPOH.mjs";import{a as l,b as K}from"./chunk-6R2WFQ7U.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";var w=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!y())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await S({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 le({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((i,s)=>ne({manager:e,resolve:i,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,k=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let n=this.store.getState(),{providerType:e}=G(n),r=H(n);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let n=ee(c());if(!(!this.shouldCheckConnection()||n))try{await L().getProvider().getAddress()}catch{if(U.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let n=new w({shouldInitProvider:!0});await n.init();let e=new M(n);n.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,U.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var T=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 i=await this.provider.signTransactions(e)??[];return await se(i)}catch(i){throw await r({shouldCancelAction:!0}),i}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:l.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=b.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=f(c()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=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(i){throw await t({shouldCancelAction:!1}),i}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:l.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var W=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 S({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(i){throw await t({shouldCancelAction:!0}),i}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:l[o.metamask]})};this.walletUrl=r??"",this.provider=ce.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=f(c());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 o.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 we}from"@multiversx/sdk-wallet-connect-provider/out";var pe=[I.CANCEL_ACTION,I.SIGN_LOGIN_TOKEN],x=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 i=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{i.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:I.CANCEL_ACTION,action:we.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:l.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:i}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??N.walletConnectDeepLink;this._approval=i,A.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!y())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=y(),t=B(c());if($(c())&&pe.push(I.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:O={},walletConnectV2RelayAddress:D=""}=e,P=new Z(v,t,D,m,O);return await P.init(),{walletConnectProvider:P,dappMethods:pe}}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=A.getInstance(),{uri:i="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??N.walletConnectDeepLink;t.updateData({wcURI:i,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(i)}`});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:i="",signature:s=""}=t??{};return A.getInstance().handleClose({isLoginFinished:!!i}),{address:i,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 E=class{static set customProviders(n){this._customProviders=n}static get customProviders(){return this._customProviders}static async create({type:n,anchor:e}){let r=null;switch(n){case o.extension:{r=new _;break}case o.crossWindow:{r=new T;break}case o.ledger:{r=new w({anchor:e}),await k.getInstance().init();break}case o.metamask:{r=new W;break}case o.passkey:{let s=f(c());r=new T({walletAddress:`${s.walletAddress}?${K}=${o.passkey}`});break}case o.walletConnect:{let s=j(c());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=X();for(let d of this._customProviders)d.type===n&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);C(t);let i="provider"in r&&r.provider instanceof b;return ae(i?{skipLoginMethod:o.crossWindow}:null),t}static async destroy(){L().cancelLogin(),C(null),q(o.none)}};E._customProviders=[];var Pe=(a,n)=>a.some(e=>e.type===n);async function g({message:a,handleSignMessage:n,cancelAction:e,providerType:r}){return await new Promise(async(i,s)=>{let{manager:d,onClose:h}=await re({cancelAction:e}),v=Object.values(E.customProviders),m=v.reduce((u,V)=>(u[V.type]=V.name,u),{}),O={...l,...m},D=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let P=Pe(v,r)?r:o.none;d.updateData({name:O[P],type:P});try{let u=await n(a);i(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function le({message:a,handleSignMessage:n}){try{return await g({message:a,handleSignMessage:n,providerType:l.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{le as a,w as b,k as c,E as d,g as e,T as f,_ as g,W as h,x as i};
2
+ //# sourceMappingURL=chunk-K7X3YFJU.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as c}from"./chunk-RCNZOLEM.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-VVZ2I6CL.mjs.map
1
+ import{q as c}from"./chunk-ICTG3GLU.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-KLDTJCML.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-JTIXXP4J.mjs";import{c as n}from"./chunk-ICTG3GLU.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-KOLL3XGD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SUHXBGYR.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-ZDJN4F3W.mjs.map
1
+ import{a as s}from"./chunk-A4KEELZM.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-LFBY6WV3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SWZ5LDC3.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-QJZ5YIXI.mjs.map
1
+ import{a as s}from"./chunk-J6WJ6ULQ.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-LUCBMBG7.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-ICTG3GLU.mjs";import{a as t}from"./chunk-7VHTZYM2.mjs";function f(r=o()){return t(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-MSF6QQXH.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-GMP2DZ26.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-ANIJIRAY.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-I47BE6ON.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-NOIBKBS3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-RCNZOLEM.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
- //# sourceMappingURL=chunk-VQULIVGX.mjs.map
1
+ import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-ICTG3GLU.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
+ //# sourceMappingURL=chunk-NUJ4VCBC.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-ICTG3GLU.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-O4I2ENO6.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-ICTG3GLU.mjs";import{f as t}from"./chunk-UERJ6AKK.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-OPHTJKDE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-DMF2DF5I.mjs";import{a as m}from"./chunk-G7GU37XI.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
- //# sourceMappingURL=chunk-XA3AGZCX.mjs.map
1
+ import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-MSF6QQXH.mjs";import{a as m}from"./chunk-G7GU37XI.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
+ //# sourceMappingURL=chunk-PBTBNQ25.mjs.map
@@ -1,2 +1,2 @@
1
- import{x as n}from"./chunk-2TCIBFJT.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
- //# sourceMappingURL=chunk-K3VVHPG3.mjs.map
1
+ import{x as n}from"./chunk-TBCYELRO.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
+ //# sourceMappingURL=chunk-PCTCQEFY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-ZDJN4F3W.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-775THAIS.mjs.map
1
+ import{a as e}from"./chunk-LFBY6WV3.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-PI3A4HAK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-74JXPSSX.mjs";import{a as s}from"./chunk-XA3AGZCX.mjs";import{a as h}from"./chunk-B2RDSGON.mjs";import{a as k}from"./chunk-SKNUG6M5.mjs";import{b as L}from"./chunk-VVZ2I6CL.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-RCNZOLEM.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-LJX4MW7B.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink: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}),L({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
- //# sourceMappingURL=chunk-3OEO7IVT.mjs.map
1
+ import{a as A}from"./chunk-5FZ5WUYZ.mjs";import{a as s}from"./chunk-PBTBNQ25.mjs";import{a as h}from"./chunk-B2RDSGON.mjs";import{a as k}from"./chunk-4L2AXB2K.mjs";import{b as L}from"./chunk-KLDTJCML.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-ICTG3GLU.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-LJX4MW7B.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink: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}),L({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
+ //# sourceMappingURL=chunk-Q6RQNGJC.mjs.map
@@ -0,0 +1,2 @@
1
+ var o=typeof window<"u"?window:{},n="5.2.7";export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-QAOBZWSF.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/window.constants.ts"],
4
- "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.2.6'; // will be replaced at build time\n"],
4
+ "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.2.7'; // will be replaced at build time\n"],
5
5
  "mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
6
6
  "names": ["safeWindow", "version"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-UZTMRUVT.mjs";import{j as p,k as d,l as f,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as m}from"./chunk-NGM3AVCY.mjs";import{a as u}from"./chunk-OVBYKKMB.mjs";import{s as T}from"./chunk-RCNZOLEM.mjs";import{c}from"./chunk-UERJ6AKK.mjs";var H=async({existingCompletedTransactions:g=[],skipFetchingTransactions:y=!1,store:s=T()})=>{let n=[],a=[...g],F=l(s),C=m(s),P=c(s);for(let o of F.transactionToasts){let r=C[o.toastId];if(!r?.status)continue;let{status:t,transactions:h,transactionsDisplayInfo:x}=r,L=await u({transactions:h,skipFetchingTransactions:y,store:s}),O=I(t),R=f(t),b=d(t),e=O||R||b,k=p(t),{startTime:v,endTime:w}=o;if(e&&a.some(D=>D.toastId===o.toastId))continue;let i=S({toastId:o.toastId,address:P,status:t,transactions:L,transactionsDisplayInfo:x,startTime:v,endTime:w});e&&a.push(i),k&&n.push(i)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{H as a};
2
- //# sourceMappingURL=chunk-U2IPYFJX.mjs.map
1
+ import{a as S}from"./chunk-UZTMRUVT.mjs";import{j as p,k as d,l as f,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as m}from"./chunk-NGM3AVCY.mjs";import{a as u}from"./chunk-UY57JRX7.mjs";import{s as T}from"./chunk-ICTG3GLU.mjs";import{c}from"./chunk-UERJ6AKK.mjs";var H=async({existingCompletedTransactions:g=[],skipFetchingTransactions:y=!1,store:s=T()})=>{let n=[],a=[...g],F=l(s),C=m(s),P=c(s);for(let o of F.transactionToasts){let r=C[o.toastId];if(!r?.status)continue;let{status:t,transactions:h,transactionsDisplayInfo:x}=r,L=await u({transactions:h,skipFetchingTransactions:y,store:s}),O=I(t),R=f(t),b=d(t),e=O||R||b,k=p(t),{startTime:v,endTime:w}=o;if(e&&a.some(D=>D.toastId===o.toastId))continue;let i=S({toastId:o.toastId,address:P,status:t,transactions:L,transactionsDisplayInfo:x,startTime:v,endTime:w});e&&a.push(i),k&&n.push(i)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{H as a};
2
+ //# sourceMappingURL=chunk-QSXHUZLS.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-RCNZOLEM.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-FULNMU6J.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-ICTG3GLU.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-QUPXSKV4.mjs.map