@multiversx/sdk-dapp 5.6.21 → 5.6.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/out/__chunks__/{chunk-XKVXNSSB.mjs → chunk-24EHYHC2.mjs} +2 -2
  2. package/out/__chunks__/{chunk-FFLLP6HV.mjs → chunk-2ERFU36I.mjs} +2 -2
  3. package/out/__chunks__/{chunk-YG2LNQ5T.mjs → chunk-2FLZQLHL.mjs} +2 -2
  4. package/out/__chunks__/{chunk-ZSIO7JSR.mjs → chunk-2G3SQAIQ.mjs} +2 -2
  5. package/out/__chunks__/{chunk-IVLXJLSO.mjs → chunk-343D3AMA.mjs} +2 -2
  6. package/out/__chunks__/{chunk-36UNO4TU.mjs → chunk-37XBMJUS.mjs} +2 -2
  7. package/out/__chunks__/{chunk-7BDXFZLC.mjs → chunk-3EQSEETK.mjs} +2 -2
  8. package/out/__chunks__/{chunk-RVPI43J4.mjs → chunk-424NUJVK.mjs} +2 -2
  9. package/out/__chunks__/{chunk-SIYKRNB4.mjs → chunk-4PH2HU7S.mjs} +2 -2
  10. package/out/__chunks__/{chunk-WQA4S6LX.mjs → chunk-4PI7HK4C.mjs} +2 -2
  11. package/out/__chunks__/{chunk-ONJMXU3I.mjs → chunk-4TXZCVFN.mjs} +2 -2
  12. package/out/__chunks__/chunk-5IHSFFSC.mjs +2 -0
  13. package/out/__chunks__/{chunk-CWCSBPY3.mjs → chunk-66H5JBIN.mjs} +2 -2
  14. package/out/__chunks__/chunk-67EZNZ3G.mjs +2 -0
  15. package/out/__chunks__/{chunk-N2RUTSP4.mjs → chunk-6FVH2YRH.mjs} +2 -2
  16. package/out/__chunks__/{chunk-ZCVS66L2.mjs → chunk-6PLGNDMI.mjs} +2 -2
  17. package/out/__chunks__/{chunk-R4OESOQT.mjs → chunk-6VCA6ZLV.mjs} +2 -2
  18. package/out/__chunks__/{chunk-Y3ZV4LOO.mjs → chunk-6YJCCZLX.mjs} +2 -2
  19. package/out/__chunks__/{chunk-6GK6KSWM.mjs → chunk-7KVG225H.mjs} +2 -2
  20. package/out/__chunks__/{chunk-ZBSK4R4A.mjs → chunk-AX4TYCZE.mjs} +2 -2
  21. package/out/__chunks__/{chunk-HIYESNLH.mjs → chunk-B6WCLNVW.mjs} +2 -2
  22. package/out/__chunks__/{chunk-THUYZJOV.mjs → chunk-BYBNN4KR.mjs} +2 -2
  23. package/out/__chunks__/{chunk-2PSCCAFS.mjs → chunk-BYOB4BJX.mjs} +2 -2
  24. package/out/__chunks__/{chunk-TL33Y6UO.mjs → chunk-C47F2DSK.mjs} +2 -2
  25. package/out/__chunks__/{chunk-Q2D7XVUW.mjs → chunk-CHDYDRGH.mjs} +2 -2
  26. package/out/__chunks__/{chunk-TWXGPL2M.mjs → chunk-DC72YEOI.mjs} +2 -2
  27. package/out/__chunks__/{chunk-ZTIVKI3D.mjs → chunk-DMUBYMI7.mjs} +2 -2
  28. package/out/__chunks__/chunk-EPP4W6NS.mjs +2 -0
  29. package/out/__chunks__/{chunk-LPAOTMAD.mjs → chunk-GCK2BTWM.mjs} +2 -2
  30. package/out/__chunks__/{chunk-GB5MPULE.mjs → chunk-GFRD6DC7.mjs} +2 -2
  31. package/out/__chunks__/{chunk-JZ35QU6N.mjs → chunk-GJSKMZ5J.mjs} +2 -2
  32. package/out/__chunks__/chunk-GNLCNART.mjs +2 -0
  33. package/out/__chunks__/{chunk-XR57DPDK.mjs → chunk-GTPGGUVC.mjs} +2 -2
  34. package/out/__chunks__/chunk-GXYN7OW2.mjs +2 -0
  35. package/out/__chunks__/{chunk-5HLQD7ON.mjs → chunk-H6EQTKFK.mjs} +2 -2
  36. package/out/__chunks__/{chunk-5K6KEW4N.mjs → chunk-H7CCXMFQ.mjs} +2 -2
  37. package/out/__chunks__/{chunk-DGGKLREG.mjs → chunk-HLIKW6T5.mjs} +2 -2
  38. package/out/__chunks__/chunk-HRX4UVIG.mjs +2 -0
  39. package/out/__chunks__/{chunk-Z63GEE5L.mjs → chunk-I53YLZ2T.mjs} +2 -2
  40. package/out/__chunks__/chunk-I5N5DHKW.mjs +2 -0
  41. package/out/__chunks__/{chunk-PH5DYKBD.mjs → chunk-IEGHXK66.mjs} +2 -2
  42. package/out/__chunks__/{chunk-ZFCFCT73.mjs → chunk-IPDWDMEJ.mjs} +2 -2
  43. package/out/__chunks__/chunk-IXZES7OF.mjs +2 -0
  44. package/out/__chunks__/{chunk-PBW3OFFT.mjs.map → chunk-IXZES7OF.mjs.map} +1 -1
  45. package/out/__chunks__/{chunk-EXZKSKKB.mjs → chunk-K7MM6MKP.mjs} +2 -2
  46. package/out/__chunks__/chunk-KB3ZP2B6.mjs +2 -0
  47. package/out/__chunks__/{chunk-RLXA4V4H.mjs → chunk-L4K3TCX4.mjs} +2 -2
  48. package/out/__chunks__/{chunk-MIRIUZ3C.mjs → chunk-LR2KZ5ET.mjs} +2 -2
  49. package/out/__chunks__/{chunk-ZKN4TX5N.mjs → chunk-LVY5STWK.mjs} +2 -2
  50. package/out/__chunks__/{chunk-G7NA76AN.mjs → chunk-MAOQDCIZ.mjs} +2 -2
  51. package/out/__chunks__/{chunk-D5TPQCLQ.mjs → chunk-NL4PKIDQ.mjs} +2 -2
  52. package/out/__chunks__/{chunk-5HFZQ4N2.mjs → chunk-NSYAXXGG.mjs} +2 -2
  53. package/out/__chunks__/{chunk-ZTJXY43P.mjs → chunk-NYBAFM6F.mjs} +2 -2
  54. package/out/__chunks__/{chunk-P6VSCY3K.mjs → chunk-O3L2SB6F.mjs} +2 -2
  55. package/out/__chunks__/{chunk-CU5E5DOU.mjs → chunk-OED7DMRA.mjs} +2 -2
  56. package/out/__chunks__/{chunk-FSHND4CZ.mjs → chunk-OJZJL25C.mjs} +2 -2
  57. package/out/__chunks__/{chunk-7272OEPE.mjs → chunk-OPTOPG46.mjs} +2 -2
  58. package/out/__chunks__/{chunk-WEPJVRJF.mjs → chunk-OU2URX22.mjs} +2 -2
  59. package/out/__chunks__/{chunk-OIWPNSN6.mjs → chunk-OU767NB5.mjs} +2 -2
  60. package/out/__chunks__/{chunk-A7SY6BD6.mjs → chunk-PBSKORAJ.mjs} +2 -2
  61. package/out/__chunks__/{chunk-LZSVC4NN.mjs → chunk-PY6IUFCF.mjs} +2 -2
  62. package/out/__chunks__/{chunk-WDFPQEDF.mjs → chunk-Q7WN7N57.mjs} +2 -2
  63. package/out/__chunks__/chunk-QJN3GSGR.mjs +2 -0
  64. package/out/__chunks__/{chunk-XCOSMO6H.mjs → chunk-QMRLPDMP.mjs} +2 -2
  65. package/out/__chunks__/{chunk-6VAM4MQD.mjs → chunk-QYQAHWW2.mjs} +2 -2
  66. package/out/__chunks__/{chunk-L6YVJOFV.mjs → chunk-RI4M5KFL.mjs} +2 -2
  67. package/out/__chunks__/chunk-RRZQ6HWW.mjs +2 -0
  68. package/out/__chunks__/{chunk-GUUHEK5P.mjs → chunk-S65LFCFF.mjs} +2 -2
  69. package/out/__chunks__/{chunk-7T364XME.mjs → chunk-SBJU7P6G.mjs} +2 -2
  70. package/out/__chunks__/chunk-SCMTCC7N.mjs +2 -0
  71. package/out/__chunks__/{chunk-OCZK57JN.mjs → chunk-SCMZLTVG.mjs} +2 -2
  72. package/out/__chunks__/{chunk-OXX4FBXV.mjs → chunk-SXUZVRHH.mjs} +2 -2
  73. package/out/__chunks__/{chunk-G3YNJTM3.mjs → chunk-TEI63RXL.mjs} +2 -2
  74. package/out/__chunks__/chunk-TO6UIEGW.mjs +2 -0
  75. package/out/__chunks__/{chunk-MN7GKF42.mjs → chunk-TTRVY63G.mjs} +2 -2
  76. package/out/__chunks__/{chunk-X6XZ2UK4.mjs → chunk-UHHB4O7I.mjs} +2 -2
  77. package/out/__chunks__/chunk-VBGR4QMV.mjs +2 -0
  78. package/out/__chunks__/{chunk-QUZRZ53M.mjs → chunk-VR5JBT6Q.mjs} +2 -2
  79. package/out/__chunks__/{chunk-ZPIP6QTW.mjs → chunk-VSMZ5SR6.mjs} +2 -2
  80. package/out/__chunks__/{chunk-FMSNDHB7.mjs → chunk-WB5BLJUQ.mjs} +2 -2
  81. package/out/__chunks__/{chunk-HY3RU7TP.mjs → chunk-X5U557J2.mjs} +2 -2
  82. package/out/__chunks__/{chunk-NXET3SBP.mjs → chunk-X7L2EJHP.mjs} +2 -2
  83. package/out/__chunks__/{chunk-ZGOXY26T.mjs → chunk-XYIEJRUO.mjs} +2 -2
  84. package/out/__chunks__/{chunk-YUDHQLY2.mjs → chunk-YD5E43DF.mjs} +2 -2
  85. package/out/__chunks__/chunk-YEHAZN4U.mjs +2 -0
  86. package/out/__chunks__/chunk-YFTZSYJR.mjs +2 -0
  87. package/out/__chunks__/chunk-YFTZSYJR.mjs.map +7 -0
  88. package/out/__chunks__/{chunk-KEM2JVJR.mjs → chunk-YMDXIJ3P.mjs} +2 -2
  89. package/out/__chunks__/{chunk-DQNOCLT6.mjs → chunk-YYB5NTTG.mjs} +2 -2
  90. package/out/__chunks__/{chunk-SVI37OOZ.mjs → chunk-ZE3C4Y4K.mjs} +2 -2
  91. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  92. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  93. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  94. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  95. package/out/apiCalls/economics/getEconomics.mjs +1 -1
  96. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  97. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  98. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  99. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  100. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  101. package/out/constants/browser.constants.mjs +1 -1
  102. package/out/constants/storage.constants.mjs +1 -1
  103. package/out/constants/window.constants.cjs +1 -1
  104. package/out/constants/window.constants.cjs.map +1 -1
  105. package/out/constants/window.constants.mjs +1 -1
  106. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  107. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  108. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  109. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  110. package/out/lib/sdkDappUi.mjs +1 -1
  111. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  112. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  113. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  114. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  115. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  116. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  117. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  118. package/out/managers/ToastManager/index.mjs +1 -1
  119. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  120. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  121. package/out/managers/TransactionManager/index.mjs +1 -1
  122. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  123. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  124. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  125. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  126. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  127. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  128. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  129. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  130. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  131. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  132. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  133. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  134. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  135. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  136. package/out/methods/account/getAccount.mjs +1 -1
  137. package/out/methods/account/getAccountInfo.mjs +1 -1
  138. package/out/methods/account/getAddress.mjs +1 -1
  139. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  140. package/out/methods/account/getLatestNonce.mjs +1 -1
  141. package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
  142. package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
  143. package/out/methods/initApp/initApp.mjs +1 -1
  144. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  145. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  146. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  147. package/out/methods/network/getEgldLabel.mjs +1 -1
  148. package/out/methods/network/getExplorerAddress.mjs +1 -1
  149. package/out/methods/network/getNetworkConfig.mjs +1 -1
  150. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  151. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
  152. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
  153. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
  154. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
  155. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
  156. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  157. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  158. package/out/methods/trackTransactions/trackTransactions.cjs +1 -1
  159. package/out/methods/trackTransactions/trackTransactions.cjs.map +3 -3
  160. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  161. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  162. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  163. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  164. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  165. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  166. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  167. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  168. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  169. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  170. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  171. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  172. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  173. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
  174. package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
  175. package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
  176. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  177. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  178. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  179. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  180. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  181. package/out/providers/DappProvider/index.mjs +1 -1
  182. package/out/providers/ProviderFactory.mjs +1 -1
  183. package/out/providers/helpers/accountProvider.mjs +1 -1
  184. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  185. package/out/providers/helpers/restoreProvider.mjs +1 -1
  186. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  187. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  188. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  189. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  190. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  191. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  192. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  193. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  194. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
  195. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
  196. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  197. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
  198. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
  199. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
  200. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
  201. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  202. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  203. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  204. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  205. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  206. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  207. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  208. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  209. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  210. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  211. package/out/providers/strategies/helpers/index.mjs +1 -1
  212. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  213. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  214. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  215. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  216. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  217. package/out/react/account/useGetAccount.mjs +1 -1
  218. package/out/react/account/useGetAccountInfo.mjs +1 -1
  219. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  220. package/out/react/account/useGetLatestNonce.mjs +1 -1
  221. package/out/react/index.mjs +1 -1
  222. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  223. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  224. package/out/react/store/getReactStore.mjs +1 -1
  225. package/out/react/store/useSelector.mjs +1 -1
  226. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  227. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  228. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  229. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  230. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  231. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  232. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  233. package/out/services/nativeAuth/index.mjs +1 -1
  234. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  235. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  236. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  237. package/out/store/actions/account/accountActions.mjs +1 -1
  238. package/out/store/actions/account/index.mjs +1 -1
  239. package/out/store/actions/cache/cacheActions.mjs +1 -1
  240. package/out/store/actions/cache/index.mjs +1 -1
  241. package/out/store/actions/config/configActions.mjs +1 -1
  242. package/out/store/actions/config/index.mjs +1 -1
  243. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  244. package/out/store/actions/network/index.mjs +1 -1
  245. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  246. package/out/store/actions/network/networkActions.mjs +1 -1
  247. package/out/store/actions/sharedActions/index.mjs +1 -1
  248. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  249. package/out/store/actions/toasts/index.mjs +1 -1
  250. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  251. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  252. package/out/store/actions/ui/index.mjs +1 -1
  253. package/out/store/actions/ui/uiActions.mjs +1 -1
  254. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  255. package/out/store/middleware/index.mjs +1 -1
  256. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  257. package/out/store/storage/index.mjs +1 -1
  258. package/out/store/storage/storageCallback.mjs +1 -1
  259. package/out/store/store.mjs +1 -1
  260. package/out/utils/ComponentFactory.mjs +1 -1
  261. package/out/utils/account/fetchAccount.mjs +1 -1
  262. package/out/utils/account/refreshAccount.mjs +1 -1
  263. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  264. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  265. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  266. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  267. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  268. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  269. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  270. package/out/utils/visual/switchTheme.mjs +1 -1
  271. package/out/utils/window/getIsInIframe.mjs +1 -1
  272. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  273. package/package.json +2 -2
  274. package/out/__chunks__/chunk-23T4S2W7.mjs +0 -2
  275. package/out/__chunks__/chunk-3CN4NWJJ.mjs +0 -2
  276. package/out/__chunks__/chunk-4QBX5YOI.mjs +0 -2
  277. package/out/__chunks__/chunk-67P2AODT.mjs +0 -2
  278. package/out/__chunks__/chunk-6YWZ75XO.mjs +0 -2
  279. package/out/__chunks__/chunk-AQPP7RTM.mjs +0 -2
  280. package/out/__chunks__/chunk-IJSFLWC7.mjs +0 -2
  281. package/out/__chunks__/chunk-JAHPAXFC.mjs +0 -2
  282. package/out/__chunks__/chunk-JJRA6WO3.mjs +0 -2
  283. package/out/__chunks__/chunk-K2JQV7EN.mjs +0 -2
  284. package/out/__chunks__/chunk-KJDTBDRK.mjs +0 -2
  285. package/out/__chunks__/chunk-NCFTGD3Z.mjs +0 -2
  286. package/out/__chunks__/chunk-NCFTGD3Z.mjs.map +0 -7
  287. package/out/__chunks__/chunk-PBW3OFFT.mjs +0 -2
  288. package/out/__chunks__/chunk-PJQTJIIE.mjs +0 -2
  289. package/out/__chunks__/chunk-XHCPL7RE.mjs +0 -2
  290. package/out/__chunks__/chunk-YXUCUKMO.mjs +0 -2
  291. /package/out/__chunks__/{chunk-XKVXNSSB.mjs.map → chunk-24EHYHC2.mjs.map} +0 -0
  292. /package/out/__chunks__/{chunk-FFLLP6HV.mjs.map → chunk-2ERFU36I.mjs.map} +0 -0
  293. /package/out/__chunks__/{chunk-YG2LNQ5T.mjs.map → chunk-2FLZQLHL.mjs.map} +0 -0
  294. /package/out/__chunks__/{chunk-ZSIO7JSR.mjs.map → chunk-2G3SQAIQ.mjs.map} +0 -0
  295. /package/out/__chunks__/{chunk-IVLXJLSO.mjs.map → chunk-343D3AMA.mjs.map} +0 -0
  296. /package/out/__chunks__/{chunk-36UNO4TU.mjs.map → chunk-37XBMJUS.mjs.map} +0 -0
  297. /package/out/__chunks__/{chunk-7BDXFZLC.mjs.map → chunk-3EQSEETK.mjs.map} +0 -0
  298. /package/out/__chunks__/{chunk-RVPI43J4.mjs.map → chunk-424NUJVK.mjs.map} +0 -0
  299. /package/out/__chunks__/{chunk-SIYKRNB4.mjs.map → chunk-4PH2HU7S.mjs.map} +0 -0
  300. /package/out/__chunks__/{chunk-WQA4S6LX.mjs.map → chunk-4PI7HK4C.mjs.map} +0 -0
  301. /package/out/__chunks__/{chunk-ONJMXU3I.mjs.map → chunk-4TXZCVFN.mjs.map} +0 -0
  302. /package/out/__chunks__/{chunk-XHCPL7RE.mjs.map → chunk-5IHSFFSC.mjs.map} +0 -0
  303. /package/out/__chunks__/{chunk-CWCSBPY3.mjs.map → chunk-66H5JBIN.mjs.map} +0 -0
  304. /package/out/__chunks__/{chunk-3CN4NWJJ.mjs.map → chunk-67EZNZ3G.mjs.map} +0 -0
  305. /package/out/__chunks__/{chunk-N2RUTSP4.mjs.map → chunk-6FVH2YRH.mjs.map} +0 -0
  306. /package/out/__chunks__/{chunk-ZCVS66L2.mjs.map → chunk-6PLGNDMI.mjs.map} +0 -0
  307. /package/out/__chunks__/{chunk-R4OESOQT.mjs.map → chunk-6VCA6ZLV.mjs.map} +0 -0
  308. /package/out/__chunks__/{chunk-Y3ZV4LOO.mjs.map → chunk-6YJCCZLX.mjs.map} +0 -0
  309. /package/out/__chunks__/{chunk-6GK6KSWM.mjs.map → chunk-7KVG225H.mjs.map} +0 -0
  310. /package/out/__chunks__/{chunk-ZBSK4R4A.mjs.map → chunk-AX4TYCZE.mjs.map} +0 -0
  311. /package/out/__chunks__/{chunk-HIYESNLH.mjs.map → chunk-B6WCLNVW.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-THUYZJOV.mjs.map → chunk-BYBNN4KR.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-2PSCCAFS.mjs.map → chunk-BYOB4BJX.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-TL33Y6UO.mjs.map → chunk-C47F2DSK.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-Q2D7XVUW.mjs.map → chunk-CHDYDRGH.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-TWXGPL2M.mjs.map → chunk-DC72YEOI.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-ZTIVKI3D.mjs.map → chunk-DMUBYMI7.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-AQPP7RTM.mjs.map → chunk-EPP4W6NS.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-LPAOTMAD.mjs.map → chunk-GCK2BTWM.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-GB5MPULE.mjs.map → chunk-GFRD6DC7.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-JZ35QU6N.mjs.map → chunk-GJSKMZ5J.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-KJDTBDRK.mjs.map → chunk-GNLCNART.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-XR57DPDK.mjs.map → chunk-GTPGGUVC.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-6YWZ75XO.mjs.map → chunk-GXYN7OW2.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-5HLQD7ON.mjs.map → chunk-H6EQTKFK.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-5K6KEW4N.mjs.map → chunk-H7CCXMFQ.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-DGGKLREG.mjs.map → chunk-HLIKW6T5.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-IJSFLWC7.mjs.map → chunk-HRX4UVIG.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-Z63GEE5L.mjs.map → chunk-I53YLZ2T.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-JJRA6WO3.mjs.map → chunk-I5N5DHKW.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-PH5DYKBD.mjs.map → chunk-IEGHXK66.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-ZFCFCT73.mjs.map → chunk-IPDWDMEJ.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-EXZKSKKB.mjs.map → chunk-K7MM6MKP.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-4QBX5YOI.mjs.map → chunk-KB3ZP2B6.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-RLXA4V4H.mjs.map → chunk-L4K3TCX4.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-MIRIUZ3C.mjs.map → chunk-LR2KZ5ET.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-ZKN4TX5N.mjs.map → chunk-LVY5STWK.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-G7NA76AN.mjs.map → chunk-MAOQDCIZ.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-D5TPQCLQ.mjs.map → chunk-NL4PKIDQ.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-5HFZQ4N2.mjs.map → chunk-NSYAXXGG.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-ZTJXY43P.mjs.map → chunk-NYBAFM6F.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-P6VSCY3K.mjs.map → chunk-O3L2SB6F.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-CU5E5DOU.mjs.map → chunk-OED7DMRA.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-FSHND4CZ.mjs.map → chunk-OJZJL25C.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-7272OEPE.mjs.map → chunk-OPTOPG46.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-WEPJVRJF.mjs.map → chunk-OU2URX22.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-OIWPNSN6.mjs.map → chunk-OU767NB5.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-A7SY6BD6.mjs.map → chunk-PBSKORAJ.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-LZSVC4NN.mjs.map → chunk-PY6IUFCF.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-WDFPQEDF.mjs.map → chunk-Q7WN7N57.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-YXUCUKMO.mjs.map → chunk-QJN3GSGR.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-XCOSMO6H.mjs.map → chunk-QMRLPDMP.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-6VAM4MQD.mjs.map → chunk-QYQAHWW2.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-L6YVJOFV.mjs.map → chunk-RI4M5KFL.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-PJQTJIIE.mjs.map → chunk-RRZQ6HWW.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-GUUHEK5P.mjs.map → chunk-S65LFCFF.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-7T364XME.mjs.map → chunk-SBJU7P6G.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-23T4S2W7.mjs.map → chunk-SCMTCC7N.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-OCZK57JN.mjs.map → chunk-SCMZLTVG.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-OXX4FBXV.mjs.map → chunk-SXUZVRHH.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-G3YNJTM3.mjs.map → chunk-TEI63RXL.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-JAHPAXFC.mjs.map → chunk-TO6UIEGW.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-MN7GKF42.mjs.map → chunk-TTRVY63G.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-X6XZ2UK4.mjs.map → chunk-UHHB4O7I.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-K2JQV7EN.mjs.map → chunk-VBGR4QMV.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-QUZRZ53M.mjs.map → chunk-VR5JBT6Q.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-ZPIP6QTW.mjs.map → chunk-VSMZ5SR6.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-FMSNDHB7.mjs.map → chunk-WB5BLJUQ.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-HY3RU7TP.mjs.map → chunk-X5U557J2.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-NXET3SBP.mjs.map → chunk-X7L2EJHP.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-ZGOXY26T.mjs.map → chunk-XYIEJRUO.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-YUDHQLY2.mjs.map → chunk-YD5E43DF.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-67P2AODT.mjs.map → chunk-YEHAZN4U.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-KEM2JVJR.mjs.map → chunk-YMDXIJ3P.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-DQNOCLT6.mjs.map → chunk-YYB5NTTG.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-SVI37OOZ.mjs.map → chunk-ZE3C4Y4K.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-5K6KEW4N.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-N2RUTSP4.mjs";import{a as V}from"./chunk-ZBSK4R4A.mjs";import{a as ae}from"./chunk-L6YVJOFV.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-CWCSBPY3.mjs";import{a as ge}from"./chunk-ZSIO7JSR.mjs";import{a as g}from"./chunk-D5TPQCLQ.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-SIYKRNB4.mjs";import{a as z}from"./chunk-LZSVC4NN.mjs";import{a as ce}from"./chunk-5HFZQ4N2.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as te}from"./chunk-4Z3DZ2A3.mjs";import{j as S,k as T,l as L}from"./chunk-NCFTGD3Z.mjs";import{c as N}from"./chunk-ZPIP6QTW.mjs";import{a as C}from"./chunk-4QBX5YOI.mjs";import{a as Y}from"./chunk-23T4S2W7.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-R4OESOQT.mjs";import{a as re}from"./chunk-6VAM4MQD.mjs";import{a as U}from"./chunk-PJQTJIIE.mjs";import{b as Q,c as Z,d as ee}from"./chunk-V5ZSFCKJ.mjs";import{g as X}from"./chunk-M6MN4RXG.mjs";import{b as f,c as K}from"./chunk-7VHTZYM2.mjs";import{a as $,q as F,s as c}from"./chunk-XCOSMO6H.mjs";import{f as j}from"./chunk-FK6DWWZF.mjs";import{a as q}from"./chunk-VNLGNNIL.mjs";import{b as y,c as G}from"./chunk-7B7XIPV2.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";async function me({message:a,handleSignMessage:o}){try{return await m({message:a,handleSignMessage:o,providerType:l.ledger})}catch(e){let{errorMessage:r}=se(e);throw r?{message:r}:e}}var w=class extends g{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(!!C())return;await V.getInstance().init(e)};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await me({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ne({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"close",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=V.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((s,i)=>ae({manager:e,resolve:s,reject:i,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,O=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let o=this.store.getState(),{providerType:e}=q(o),r=j(o);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let o=te(c());if(!(!this.shouldCheckConnection()||o))try{await L().getProvider().getAddress()}catch{if(N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"close",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,fe)}},ue))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let o=new w({shouldInitProvider:!0});await o.init();let e=new S(o);o.getType=()=>n.ledger,T(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var A=class extends g{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:t,manager:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!0}),i}finally{s?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({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 n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as Pe}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=class extends g{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await s({shouldCancelAction:!1}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension})};this.provider=Pe.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var W=class extends g{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})}catch(i){throw await s({shouldCancelAction:!0}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l[n.metamask]})};this.walletUrl=r??"",this.provider=le.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 n.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as Ce}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[y.CANCEL_ACTION,y.SIGN_LOGIN_TOKEN],x=class extends g{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let d=new Promise((p,P)=>{i.addEventListener("abort",()=>{P(new Error("cancelled by user"))})}),v=await Promise.race([this.provider.signTransactions(e),d]);return await ce(v)}catch(d){throw await s({shouldCancelAction:!0}),d}finally{t?.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:y.CANCEL_ACTION,action:Ce.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((i,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension}),t])};this.config=e}async init(){try{if(this.provider?.isInitialized())return!0;await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:s}=await this.provider.connect({methods:this.methods}),i=this.config.walletConnectDeepLink??R.walletConnectDeepLink;this._approval=s,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${i}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=K(c());if(Q(c())&&ve.push(y.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{re()},onClientEvent:p=>{}};try{let{walletConnectV2ProjectId:p,walletConnectV2Options:P={},walletConnectV2RelayAddress:D=""}=e,M=new G(h,t,D,p,P);return await M.init(),{walletConnectProvider:M,dappMethods:ve}}catch(p){throw console.error("Unable to connect",p),r&&await this.logout(),p}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:s="",approval:i}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??R.walletConnectDeepLink;t.updateData({wcURI:s,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(s)}`});let v=await this.provider.login({approval:i,token:e?.token}),{address:h="",signature:p=""}=v??{};return t.handleClose({isLoginFinished:!!h}),{address:h,signature:p}}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:s="",signature:i=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!s}),{address:s,signature:i}}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(o){this._customProviders=o}static get customProviders(){return this._customProviders}static async create({type:o,anchor:e}){let r=null;switch(o){case n.extension:{r=new _;break}case n.crossWindow:{r=new A;break}case n.ledger:{r=new w({anchor:e}),await O.getInstance().init();break}case n.metamask:{r=new W;break}case n.passkey:{let i=f(c());r=new A({walletAddress:`${i.walletAddress}?${ie}=${n.passkey}`});break}case n.walletConnect:{let i=Z(c());if(!i?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...i});break}case n.webview:{r=new ge;break}default:{let i=Y();for(let d of this._customProviders)d.type===o&&(r=await d.constructor({address:i,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new S(r);T(t);let s="provider"in r&&r.provider instanceof b;return pe(s?{skipLoginMethod:n.crossWindow}:null),t}static async destroy(){L().cancelLogin(),T(null),$(n.none)}};E._customProviders=[];var Te=(a,o)=>a.some(e=>e.type===o);async function m({message:a,handleSignMessage:o,cancelAction:e,providerType:r}){if(ee(c())?.isSigningUiEnabled===!1){U(!0);try{return await o(a)}finally{U(!1)}}return await new Promise(async(i,d)=>{let{manager:v,onClose:h}=await de({cancelAction:e}),p=Object.values(E.customProviders),P=p.reduce((u,B)=>(u[B.type]=B.name,u),{}),D={...l,...P},M=async()=>{await h({shouldCancelAction:!0}),d({message:"Signing canceled"})};v.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",M);let H=Te(p,r)?r:n.none;v.updateData({name:D[H],type:H});try{let u=await o(a);i(u)}catch(u){await h({shouldCancelAction:!0}),d(u)}finally{v.closeUI()}})}export{m as a,me as b,w as c,O as d,A as e,_ as f,W as g,x as h,E as i};
2
- //# sourceMappingURL=chunk-XKVXNSSB.mjs.map
1
+ import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-H7CCXMFQ.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-6FVH2YRH.mjs";import{a as V}from"./chunk-AX4TYCZE.mjs";import{a as ae}from"./chunk-RI4M5KFL.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-66H5JBIN.mjs";import{a as ge}from"./chunk-2G3SQAIQ.mjs";import{a as g}from"./chunk-NL4PKIDQ.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-4PH2HU7S.mjs";import{a as z}from"./chunk-PY6IUFCF.mjs";import{a as ce}from"./chunk-NSYAXXGG.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as te}from"./chunk-4Z3DZ2A3.mjs";import{j as S,k as T,l as L}from"./chunk-YFTZSYJR.mjs";import{c as N}from"./chunk-VSMZ5SR6.mjs";import{a as C}from"./chunk-KB3ZP2B6.mjs";import{a as Y}from"./chunk-SCMTCC7N.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-6VCA6ZLV.mjs";import{a as re}from"./chunk-QYQAHWW2.mjs";import{a as U}from"./chunk-RRZQ6HWW.mjs";import{b as Q,c as Z,d as ee}from"./chunk-V5ZSFCKJ.mjs";import{g as X}from"./chunk-M6MN4RXG.mjs";import{b as f,c as K}from"./chunk-7VHTZYM2.mjs";import{a as $,q as F,s as c}from"./chunk-QMRLPDMP.mjs";import{f as j}from"./chunk-FK6DWWZF.mjs";import{a as q}from"./chunk-VNLGNNIL.mjs";import{b as y,c as G}from"./chunk-7B7XIPV2.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";async function me({message:a,handleSignMessage:o}){try{return await m({message:a,handleSignMessage:o,providerType:l.ledger})}catch(e){let{errorMessage:r}=se(e);throw r?{message:r}:e}}var w=class extends g{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(!!C())return;await V.getInstance().init(e)};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await me({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ne({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"close",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=V.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((s,i)=>ae({manager:e,resolve:s,reject:i,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,O=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let o=this.store.getState(),{providerType:e}=q(o),r=j(o);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let o=te(c());if(!(!this.shouldCheckConnection()||o))try{await L().getProvider().getAddress()}catch{if(N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"close",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,fe)}},ue))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let o=new w({shouldInitProvider:!0});await o.init();let e=new S(o);o.getType=()=>n.ledger,T(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var A=class extends g{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:t,manager:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!0}),i}finally{s?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({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 n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as Pe}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=class extends g{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await s({shouldCancelAction:!1}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension})};this.provider=Pe.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var W=class extends g{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})}catch(i){throw await s({shouldCancelAction:!0}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l[n.metamask]})};this.walletUrl=r??"",this.provider=le.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 n.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as Ce}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[y.CANCEL_ACTION,y.SIGN_LOGIN_TOKEN],x=class extends g{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let d=new Promise((p,P)=>{i.addEventListener("abort",()=>{P(new Error("cancelled by user"))})}),v=await Promise.race([this.provider.signTransactions(e),d]);return await ce(v)}catch(d){throw await s({shouldCancelAction:!0}),d}finally{t?.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:y.CANCEL_ACTION,action:Ce.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((i,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension}),t])};this.config=e}async init(){try{if(this.provider?.isInitialized())return!0;await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:s}=await this.provider.connect({methods:this.methods}),i=this.config.walletConnectDeepLink??R.walletConnectDeepLink;this._approval=s,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${i}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=K(c());if(Q(c())&&ve.push(y.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{re()},onClientEvent:p=>{}};try{let{walletConnectV2ProjectId:p,walletConnectV2Options:P={},walletConnectV2RelayAddress:D=""}=e,M=new G(h,t,D,p,P);return await M.init(),{walletConnectProvider:M,dappMethods:ve}}catch(p){throw console.error("Unable to connect",p),r&&await this.logout(),p}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:s="",approval:i}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??R.walletConnectDeepLink;t.updateData({wcURI:s,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(s)}`});let v=await this.provider.login({approval:i,token:e?.token}),{address:h="",signature:p=""}=v??{};return t.handleClose({isLoginFinished:!!h}),{address:h,signature:p}}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:s="",signature:i=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!s}),{address:s,signature:i}}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(o){this._customProviders=o}static get customProviders(){return this._customProviders}static async create({type:o,anchor:e}){let r=null;switch(o){case n.extension:{r=new _;break}case n.crossWindow:{r=new A;break}case n.ledger:{r=new w({anchor:e}),await O.getInstance().init();break}case n.metamask:{r=new W;break}case n.passkey:{let i=f(c());r=new A({walletAddress:`${i.walletAddress}?${ie}=${n.passkey}`});break}case n.walletConnect:{let i=Z(c());if(!i?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...i});break}case n.webview:{r=new ge;break}default:{let i=Y();for(let d of this._customProviders)d.type===o&&(r=await d.constructor({address:i,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new S(r);T(t);let s="provider"in r&&r.provider instanceof b;return pe(s?{skipLoginMethod:n.crossWindow}:null),t}static async destroy(){L().cancelLogin(),T(null),$(n.none)}};E._customProviders=[];var Te=(a,o)=>a.some(e=>e.type===o);async function m({message:a,handleSignMessage:o,cancelAction:e,providerType:r}){if(ee(c())?.isSigningUiEnabled===!1){U(!0);try{return await o(a)}finally{U(!1)}}return await new Promise(async(i,d)=>{let{manager:v,onClose:h}=await de({cancelAction:e}),p=Object.values(E.customProviders),P=p.reduce((u,B)=>(u[B.type]=B.name,u),{}),D={...l,...P},M=async()=>{await h({shouldCancelAction:!0}),d({message:"Signing canceled"})};v.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",M);let H=Te(p,r)?r:n.none;v.updateData({name:D[H],type:H});try{let u=await o(a);i(u)}catch(u){await h({shouldCancelAction:!0}),d(u)}finally{v.closeUI()}})}export{m as a,me as b,w as c,O as d,A as e,_ as f,W as g,x as h,E as i};
2
+ //# sourceMappingURL=chunk-24EHYHC2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-MIRIUZ3C.mjs";import{a as o}from"./chunk-HSF3JATH.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
- //# sourceMappingURL=chunk-FFLLP6HV.mjs.map
1
+ import{a as r}from"./chunk-LR2KZ5ET.mjs";import{a as o}from"./chunk-HSF3JATH.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
+ //# sourceMappingURL=chunk-2ERFU36I.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as c}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-XKVXNSSB.mjs";import{a as s}from"./chunk-DQNOCLT6.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as a}from"./chunk-XCOSMO6H.mjs";var e=class e extends s{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:n}=r(a()),i=d(t.customProviders,e.allowedProviders);this.data={providers:i,walletAddress:n},await this.openUI(),this.notifyDataUpdate()};this.selectProvider=n=>{if(!this.eventBus)throw new Error("Panel not initialized. Call openUnlockPanel() first.");this.eventBus.publish("SELECT_PROVIDER",{providerType:n})};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async n=>{!n?.isLoginFinished&&e.onClose&&await e.onClose(),this.closeUI()};this.handleLogin=async({type:n,anchor:i})=>{if(!e.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{if(c(e.loginHandler)){let o=await t.create({type:n,anchor:i}),l=e.token;await o.login(l?{token:l}:void 0),e.loginHandler()}else e.loginHandler({type:n,anchor:i});await this.handleCloseUI({isLoginFinished:!0})}catch(o){console.error(o),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await t.destroy(),e.onCancelLogin&&await e.onCancelLogin()};this.data=this.initialData}static getInstance(){return e.instance||(e.instance=new e),e.instance}static init(n){return this.loginHandler=n.loginHandler,this.allowedProviders=n.allowedProviders,n.onClose&&(this.onClose=n.onClose),n.onCancelLogin&&(this.onCancelLogin=n.onCancelLogin),n.token&&(this.token=n.token),this.getInstance()}};e.loginHandler=null,e.onClose=null,e.allowedProviders=null,e.onCancelLogin=null,e.token=null;var u=e;export{u as a};
2
- //# sourceMappingURL=chunk-YG2LNQ5T.mjs.map
1
+ import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as c}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-24EHYHC2.mjs";import{a as s}from"./chunk-YYB5NTTG.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as a}from"./chunk-QMRLPDMP.mjs";var e=class e extends s{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:n}=r(a()),i=d(t.customProviders,e.allowedProviders);this.data={providers:i,walletAddress:n},await this.openUI(),this.notifyDataUpdate()};this.selectProvider=n=>{if(!this.eventBus)throw new Error("Panel not initialized. Call openUnlockPanel() first.");this.eventBus.publish("SELECT_PROVIDER",{providerType:n})};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async n=>{!n?.isLoginFinished&&e.onClose&&await e.onClose(),this.closeUI()};this.handleLogin=async({type:n,anchor:i})=>{if(!e.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{if(c(e.loginHandler)){let o=await t.create({type:n,anchor:i}),l=e.token;await o.login(l?{token:l}:void 0),e.loginHandler()}else e.loginHandler({type:n,anchor:i});await this.handleCloseUI({isLoginFinished:!0})}catch(o){console.error(o),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await t.destroy(),e.onCancelLogin&&await e.onCancelLogin()};this.data=this.initialData}static getInstance(){return e.instance||(e.instance=new e),e.instance}static init(n){return this.loginHandler=n.loginHandler,this.allowedProviders=n.allowedProviders,n.onClose&&(this.onClose=n.onClose),n.onCancelLogin&&(this.onCancelLogin=n.onCancelLogin),n.token&&(this.token=n.token),this.getInstance()}};e.loginHandler=null,e.onClose=null,e.allowedProviders=null,e.onCancelLogin=null,e.token=null;var u=e;export{u as a};
2
+ //# sourceMappingURL=chunk-2FLZQLHL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-D5TPQCLQ.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-PBW3OFFT.mjs";import{WebviewProvider as d}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var a=class extends n{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(r,i)=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(t){throw this.cancelAction(),t}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=d.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return s.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(o);return this.address&&this.setAccount({address:this.address}),r}};export{a};
2
- //# sourceMappingURL=chunk-ZSIO7JSR.mjs.map
1
+ import{a as n}from"./chunk-NL4PKIDQ.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-IXZES7OF.mjs";import{WebviewProvider as d}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var a=class extends n{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(r,i)=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(t){throw this.cancelAction(),t}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=d.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return s.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(o);return this.address&&this.setAccount({address:this.address}),r}};export{a};
2
+ //# sourceMappingURL=chunk-2G3SQAIQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-23T4S2W7.mjs";import{f as e,g as s}from"./chunk-DA76AK4I.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
- //# sourceMappingURL=chunk-IVLXJLSO.mjs.map
1
+ import{a as o}from"./chunk-SCMTCC7N.mjs";import{f as e,g as s}from"./chunk-DA76AK4I.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
+ //# sourceMappingURL=chunk-343D3AMA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-XCOSMO6H.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-36UNO4TU.mjs.map
1
+ import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-QMRLPDMP.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-37XBMJUS.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as t}from"./chunk-XCOSMO6H.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},l=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},s=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,{type:"clearCache",payload:{value:null}})};export{r as a,l as b,s as c};
2
- //# sourceMappingURL=chunk-7BDXFZLC.mjs.map
1
+ import{q as t}from"./chunk-QMRLPDMP.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},l=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},s=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,{type:"clearCache",payload:{value:null}})};export{r as a,l as b,s as c};
2
+ //# sourceMappingURL=chunk-3EQSEETK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as U}from"./chunk-IJSFLWC7.mjs";import{a as B}from"./chunk-GBDHEWNQ.mjs";import{a as $}from"./chunk-6GK6KSWM.mjs";import{a as _}from"./chunk-AC3N236P.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-OMBZCVQZ.mjs";import{l as w}from"./chunk-NCFTGD3Z.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-36UNO4TU.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{k as x}from"./chunk-QNYO7NI5.mjs";import{a as A}from"./chunk-YJCTRUJT.mjs";import{a as h,c as G,f}from"./chunk-PJWJZHIS.mjs";import{a as L}from"./chunk-2JKCBTYK.mjs";import{c as F}from"./chunk-PWAP64SN.mjs";import{a as C}from"./chunk-PBW3OFFT.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:n,network:o,gasPriceData:T,price:S,address:m,username:q,shard:H,signedIndexes:e,parsedTransactionsByDataField:K}){let c=u[s],W=c?.transaction?.sender.toString(),p=c?.transaction,i=p?.toPlainObject(),D=null,y=null,t=await $({egldLabel:n,sender:W,apiAddress:o.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},J=g&&l&&l.length>0?`${g}-${l}`:g,Q=await v({tokenId:J}),{esdtPrice:X,tokenDecimals:Y,type:r,identifier:a,tokenImageUrl:Z}=Q;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Z};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(o.decimals):Y,digits:Number(o.digits),addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:X),ut=M({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===x?n:a)??n,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=R({transaction:p,price:S}),ot=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:o.gasStationMetadata}),{gasPriceOption:k}=T,et=w().getType(),it=O(et),N=u.length,rt=e.length>0?e[e.length-1]+1:0,P=F(i?.data??""),b=V(t?.transactionTokenInfo),at=_({data:P,identifier:a,highlight:b}),st=U(),mt=A({to:`/${L}/${m}`,explorerAddress:st}),ct=N===1||t?.needsSigning&&!e.includes(s),pt=f({input:k.toString(),decimals:G,addCommas:!0,digits:h}),dt=new St(i.gasLimit).toFormat({decimalSeparator:".",groupSeparator:",",groupSize:3});return{commonData:{receiver:i.receiver.toString(),data:P,decodedData:at,gasPrice:pt,gasLimit:dt,explorerLink:mt,gasPriceOption:k,gasPriceOptions:ot,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:s,currentIndexToSign:rt,highlight:b,scCall:z(t?.transactionTokenInfo),needsSigning:ct,isEditable:t?.needsSigning,providerName:it,address:m,username:q,origin:C.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{qt as a};
2
- //# sourceMappingURL=chunk-RVPI43J4.mjs.map
1
+ import{a as U}from"./chunk-HRX4UVIG.mjs";import{a as B}from"./chunk-GBDHEWNQ.mjs";import{a as $}from"./chunk-7KVG225H.mjs";import{a as _}from"./chunk-AC3N236P.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-OMBZCVQZ.mjs";import{l as w}from"./chunk-YFTZSYJR.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-37XBMJUS.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{k as x}from"./chunk-QNYO7NI5.mjs";import{a as A}from"./chunk-YJCTRUJT.mjs";import{a as h,c as G,f}from"./chunk-PJWJZHIS.mjs";import{a as L}from"./chunk-2JKCBTYK.mjs";import{c as F}from"./chunk-PWAP64SN.mjs";import{a as C}from"./chunk-IXZES7OF.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:n,network:o,gasPriceData:T,price:S,address:m,username:q,shard:H,signedIndexes:e,parsedTransactionsByDataField:K}){let c=u[s],W=c?.transaction?.sender.toString(),p=c?.transaction,i=p?.toPlainObject(),D=null,y=null,t=await $({egldLabel:n,sender:W,apiAddress:o.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},J=g&&l&&l.length>0?`${g}-${l}`:g,Q=await v({tokenId:J}),{esdtPrice:X,tokenDecimals:Y,type:r,identifier:a,tokenImageUrl:Z}=Q;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Z};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(o.decimals):Y,digits:Number(o.digits),addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:X),ut=M({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===x?n:a)??n,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=R({transaction:p,price:S}),ot=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:o.gasStationMetadata}),{gasPriceOption:k}=T,et=w().getType(),it=O(et),N=u.length,rt=e.length>0?e[e.length-1]+1:0,P=F(i?.data??""),b=V(t?.transactionTokenInfo),at=_({data:P,identifier:a,highlight:b}),st=U(),mt=A({to:`/${L}/${m}`,explorerAddress:st}),ct=N===1||t?.needsSigning&&!e.includes(s),pt=f({input:k.toString(),decimals:G,addCommas:!0,digits:h}),dt=new St(i.gasLimit).toFormat({decimalSeparator:".",groupSeparator:",",groupSize:3});return{commonData:{receiver:i.receiver.toString(),data:P,decodedData:at,gasPrice:pt,gasLimit:dt,explorerLink:mt,gasPriceOption:k,gasPriceOptions:ot,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:s,currentIndexToSign:rt,highlight:b,scCall:z(t?.transactionTokenInfo),needsSigning:ct,isEditable:t?.needsSigning,providerName:it,address:m,username:q,origin:C.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{qt as a};
2
+ //# sourceMappingURL=chunk-424NUJVK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-G3YNJTM3.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-SIYKRNB4.mjs.map
1
+ import{a as e}from"./chunk-TEI63RXL.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-4PH2HU7S.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-ZFCFCT73.mjs";var T=async a=>{let n=a.map(s=>s.hash),r=await e(n);return a.map(s=>{let t=r.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{T as a};
2
- //# sourceMappingURL=chunk-WQA4S6LX.mjs.map
1
+ import{a as e}from"./chunk-IPDWDMEJ.mjs";var T=async a=>{let n=a.map(s=>s.hash),r=await e(n);return a.map(s=>{let t=r.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{T as a};
2
+ //# sourceMappingURL=chunk-4PI7HK4C.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-7T364XME.mjs";import o from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(o(t))return[];let i=r(t);return s({transactions:i})};export{e as a};
2
- //# sourceMappingURL=chunk-ONJMXU3I.mjs.map
1
+ import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-SBJU7P6G.mjs";import o from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(o(t))return[];let i=r(t);return s({transactions:i})};export{e as a};
2
+ //# sourceMappingURL=chunk-4TXZCVFN.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-67EZNZ3G.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-5IHSFFSC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-NCFTGD3Z.mjs";import{a as g}from"./chunk-4QBX5YOI.mjs";import{s as e}from"./chunk-XCOSMO6H.mjs";import{g as n}from"./chunk-FK6DWWZF.mjs";import{e as d}from"./chunk-VNLGNNIL.mjs";import{HWProvider as P}from"@multiversx/sdk-hw-provider";async function S(s){let m=g(),t=s?.shouldInitProvider||!m,f=d(e()),o=n(e()),p=c(),i=new P;try{if(!t&&o){let u={version:o.version,dataEnabled:o.hasContractDataEnabled};return{ledgerProvider:i,ledgerConfig:u}}let r=await a({provider:p,ledgerProvider:i,ledgerLogin:f,shouldInitProvider:t}),v=await l(r);return{ledgerProvider:r,ledgerConfig:v}}catch(r){throw console.error("Could not initialize ledger app",r),r}}export{S as a};
2
- //# sourceMappingURL=chunk-CWCSBPY3.mjs.map
1
+ import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-YFTZSYJR.mjs";import{a as g}from"./chunk-KB3ZP2B6.mjs";import{s as e}from"./chunk-QMRLPDMP.mjs";import{g as n}from"./chunk-FK6DWWZF.mjs";import{e as d}from"./chunk-VNLGNNIL.mjs";import{HWProvider as P}from"@multiversx/sdk-hw-provider";async function S(s){let m=g(),t=s?.shouldInitProvider||!m,f=d(e()),o=n(e()),p=c(),i=new P;try{if(!t&&o){let u={version:o.version,dataEnabled:o.hasContractDataEnabled};return{ledgerProvider:i,ledgerConfig:u}}let r=await a({provider:p,ledgerProvider:i,ledgerLogin:f,shouldInitProvider:t}),v=await l(r);return{ledgerProvider:r,ledgerConfig:v}}catch(r){throw console.error("Could not initialize ledger app",r),r}}export{S as a};
2
+ //# sourceMappingURL=chunk-66H5JBIN.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-QMRLPDMP.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-67EZNZ3G.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-ZBSK4R4A.mjs";import{a as p}from"./chunk-KEM2JVJR.mjs";import{a as m}from"./chunk-Y3ZV4LOO.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-IJSFLWC7.mjs";import{b as a}from"./chunk-TL33Y6UO.mjs";import{f as i}from"./chunk-XCOSMO6H.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
- //# sourceMappingURL=chunk-N2RUTSP4.mjs.map
1
+ import{a as s}from"./chunk-AX4TYCZE.mjs";import{a as p}from"./chunk-YMDXIJ3P.mjs";import{a as m}from"./chunk-6YJCCZLX.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-HRX4UVIG.mjs";import{b as a}from"./chunk-C47F2DSK.mjs";import{f as i}from"./chunk-QMRLPDMP.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
+ //# sourceMappingURL=chunk-6FVH2YRH.mjs.map
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-XCOSMO6H.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
- //# sourceMappingURL=chunk-ZCVS66L2.mjs.map
1
+ import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-QMRLPDMP.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
+ //# sourceMappingURL=chunk-6PLGNDMI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-NJN53MJV.mjs";import{a as l}from"./chunk-YSCND2MX.mjs";import{q as n}from"./chunk-XCOSMO6H.mjs";var c={},u={},p=(t,o)=>{n().setState(({toasts:s})=>{let a=s.customToasts.length>0?Math.max(...s.customToasts.map(m=>parseInt(m.toastId.split("-").pop()??"0"))):0,e=o??`custom-toast-${a+1}`,T=s.customToasts.findIndex(m=>m.toastId===e),i={...t,toastId:e};if(T!==-1){s.customToasts[T]=i;return}s.customToasts.push({...i,toastId:e})},!1,{type:"addCustomToast",payload:{value:{customToast:t,currentToastId:o}}})},C=t=>{n().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(s=>s.toastId!==t)},!1,{type:"removeCustomToast",payload:{value:t}})},I=()=>{n().setState(({toasts:t})=>{t.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},f=()=>{n().setState(({toasts:t})=>{t.transactionToasts=[]},!1,{type:"removeAllTransactionToasts",payload:{value:null}})},g=({toastId:t,totalDuration:o})=>{let s="";return n().setState(({toasts:a})=>{let e=a.transactionToasts.length>0?Math.max(...a.transactionToasts.map(T=>parseInt(T.toastId.split("-").pop()??"0"))):0;s=t??`transaction-toast-${e+1}`,a.transactionToasts.push({startTime:l(),endTime:r(o),toastId:s})},!1,{type:"addTransactionToast",payload:{value:{toastId:t,totalDuration:o}}}),s},v=t=>{n().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(s=>s.toastId!==t)},!1,{type:"removeTransactionToast",payload:{value:t}}),delete u[t],delete c[t]},h=t=>{let{toasts:o}=n().getState(),s=o.customToasts.length>0?Math.max(...o.customToasts.map(e=>parseInt(e.toastId.split("-").pop()??"0"))):0,a=t.toastId||`custom-toast-${s+1}`;return t.onClose&&(u[a]=t.onClose),t.instantiateToastElement?(c[a]=t.instantiateToastElement,n().setState(({toasts:e})=>{let T=e.customToasts.findIndex(m=>m.toastId===a),i={...t,instantiateToastElement:null,toastId:a};T!==-1?e.customToasts[T]=i:e.customToasts.push(i)},!1,{type:"createCustomToast",payload:{value:t}}),a):(p(t,a),a)};export{c as a,u as b,p as c,C as d,I as e,f,g,v as h,h as i};
2
- //# sourceMappingURL=chunk-R4OESOQT.mjs.map
1
+ import{a as r}from"./chunk-NJN53MJV.mjs";import{a as l}from"./chunk-YSCND2MX.mjs";import{q as n}from"./chunk-QMRLPDMP.mjs";var c={},u={},p=(t,o)=>{n().setState(({toasts:s})=>{let a=s.customToasts.length>0?Math.max(...s.customToasts.map(m=>parseInt(m.toastId.split("-").pop()??"0"))):0,e=o??`custom-toast-${a+1}`,T=s.customToasts.findIndex(m=>m.toastId===e),i={...t,toastId:e};if(T!==-1){s.customToasts[T]=i;return}s.customToasts.push({...i,toastId:e})},!1,{type:"addCustomToast",payload:{value:{customToast:t,currentToastId:o}}})},C=t=>{n().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(s=>s.toastId!==t)},!1,{type:"removeCustomToast",payload:{value:t}})},I=()=>{n().setState(({toasts:t})=>{t.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},f=()=>{n().setState(({toasts:t})=>{t.transactionToasts=[]},!1,{type:"removeAllTransactionToasts",payload:{value:null}})},g=({toastId:t,totalDuration:o})=>{let s="";return n().setState(({toasts:a})=>{let e=a.transactionToasts.length>0?Math.max(...a.transactionToasts.map(T=>parseInt(T.toastId.split("-").pop()??"0"))):0;s=t??`transaction-toast-${e+1}`,a.transactionToasts.push({startTime:l(),endTime:r(o),toastId:s})},!1,{type:"addTransactionToast",payload:{value:{toastId:t,totalDuration:o}}}),s},v=t=>{n().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(s=>s.toastId!==t)},!1,{type:"removeTransactionToast",payload:{value:t}}),delete u[t],delete c[t]},h=t=>{let{toasts:o}=n().getState(),s=o.customToasts.length>0?Math.max(...o.customToasts.map(e=>parseInt(e.toastId.split("-").pop()??"0"))):0,a=t.toastId||`custom-toast-${s+1}`;return t.onClose&&(u[a]=t.onClose),t.instantiateToastElement?(c[a]=t.instantiateToastElement,n().setState(({toasts:e})=>{let T=e.customToasts.findIndex(m=>m.toastId===a),i={...t,instantiateToastElement:null,toastId:a};T!==-1?e.customToasts[T]=i:e.customToasts.push(i)},!1,{type:"createCustomToast",payload:{value:t}}),a):(p(t,a),a)};export{c as a,u as b,p as c,C as d,I as e,f,g,v as h,h as i};
2
+ //# sourceMappingURL=chunk-6VCA6ZLV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as I}from"./chunk-5HLQD7ON.mjs";import{a as h}from"./chunk-K2JQV7EN.mjs";import{a as x}from"./chunk-67P2AODT.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{f as g}from"./chunk-PJWJZHIS.mjs";import{a as f,f as b}from"./chunk-DA76AK4I.mjs";import y from"bignumber.js";var M=async({manager:e,provider:u})=>{let L=new f;if(!e||!u)throw new Error("Provider is not initialized.");let{network:l}=h(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await I({baseURL:l.apiAddress}),A=o=>o.index>=s&&o.index<s+e.addressesPerPage,O=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),p=r.filter(A),P=!!O[s];if(e.updateAccountScreen({isLoading:!P}),p.length>0){e.updateAccountScreen({accounts:p});return}try{let o=Math.floor(s/e.addressesPerPage),n=await u.getAccounts(o,e.addressesPerPage),S=n.map((t,c)=>{let i=L.getShardOfAddress(b.newFromBech32(t));return{address:t,balance:"...",index:c+s,shard:i}}),j=[...r,...S],B=n.map(t=>x({address:t,baseURL:l.apiAddress})),U=await Promise.all(B),d=j.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});U.forEach(t=>{if(!t||!a||!a.price)return;let c=new y(t.balance),i=c.dividedBy(y(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let N=w({amount:g({input:t.balance}),usd:a?.price});d[t.address].balance=i,d[t.address].usdValue=N});let m=Object.values(d).sort((t,c)=>t.index-c.index),E=m.filter(A);e.updateAllAccounts(m),e.updateAccountScreen({accounts:E,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{M as a};
2
- //# sourceMappingURL=chunk-Y3ZV4LOO.mjs.map
1
+ import{a as I}from"./chunk-H6EQTKFK.mjs";import{a as h}from"./chunk-VBGR4QMV.mjs";import{a as x}from"./chunk-YEHAZN4U.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{f as g}from"./chunk-PJWJZHIS.mjs";import{a as f,f as b}from"./chunk-DA76AK4I.mjs";import y from"bignumber.js";var M=async({manager:e,provider:u})=>{let L=new f;if(!e||!u)throw new Error("Provider is not initialized.");let{network:l}=h(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await I({baseURL:l.apiAddress}),A=o=>o.index>=s&&o.index<s+e.addressesPerPage,O=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),p=r.filter(A),P=!!O[s];if(e.updateAccountScreen({isLoading:!P}),p.length>0){e.updateAccountScreen({accounts:p});return}try{let o=Math.floor(s/e.addressesPerPage),n=await u.getAccounts(o,e.addressesPerPage),S=n.map((t,c)=>{let i=L.getShardOfAddress(b.newFromBech32(t));return{address:t,balance:"...",index:c+s,shard:i}}),j=[...r,...S],B=n.map(t=>x({address:t,baseURL:l.apiAddress})),U=await Promise.all(B),d=j.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});U.forEach(t=>{if(!t||!a||!a.price)return;let c=new y(t.balance),i=c.dividedBy(y(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let N=w({amount:g({input:t.balance}),usd:a?.price});d[t.address].balance=i,d[t.address].usdValue=N});let m=Object.values(d).sort((t,c)=>t.index-c.index),E=m.filter(A);e.updateAllAccounts(m),e.updateAccountScreen({accounts:E,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{M as a};
2
+ //# sourceMappingURL=chunk-6YJCCZLX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-MN7GKF42.mjs";import{a as l}from"./chunk-AIQMA75E.mjs";import{a as p}from"./chunk-OMT62YRR.mjs";import{a as I}from"./chunk-S5XV2COC.mjs";import{b as g}from"./chunk-EXZKSKKB.mjs";import{c as T}from"./chunk-PWAP64SN.mjs";var r={};function M({egldLabel:y,apiAddress:s,sender:t,address:e,parsedTransactionsByDataField:u}){return async o=>{if(o==null)return;let S=!t||t===e?null:await g({address:t,baseURL:s}),{transaction:a,multiTxData:A,transactionIndex:D}=o,c=T(a.data.toString()??""),d=p({data:c,multiTransactionData:A,parsedTransactionsByDataField:u}),{tokenId:f}=d,n=a.receiver.toBech32();if(t&&t!==e&&!l(S,e))throw console.error("You cannot sign transactions from a different account"),"You cannot sign transactions from a different account";let k=e!==n,x=n in r;if(n&&k&&!x){let i=await m({addressToVerify:n,baseURL:s});r={...r,...i?.scamInfo?{[n]:i.scamInfo}:{}}}let V=!!(f&&I({tokenId:f,egldLabel:y}));return{transaction:a,receiverScamInfo:r[n]?.info||null,transactionTokenInfo:d,isTokenTransaction:V,dataField:c,transactionIndex:D,needsSigning:o.needsSigning}}}export{M as a};
2
- //# sourceMappingURL=chunk-6GK6KSWM.mjs.map
1
+ import{a as m}from"./chunk-TTRVY63G.mjs";import{a as l}from"./chunk-AIQMA75E.mjs";import{a as p}from"./chunk-OMT62YRR.mjs";import{a as I}from"./chunk-S5XV2COC.mjs";import{b as g}from"./chunk-K7MM6MKP.mjs";import{c as T}from"./chunk-PWAP64SN.mjs";var r={};function M({egldLabel:y,apiAddress:s,sender:t,address:e,parsedTransactionsByDataField:u}){return async o=>{if(o==null)return;let S=!t||t===e?null:await g({address:t,baseURL:s}),{transaction:a,multiTxData:A,transactionIndex:D}=o,c=T(a.data.toString()??""),d=p({data:c,multiTransactionData:A,parsedTransactionsByDataField:u}),{tokenId:f}=d,n=a.receiver.toBech32();if(t&&t!==e&&!l(S,e))throw console.error("You cannot sign transactions from a different account"),"You cannot sign transactions from a different account";let k=e!==n,x=n in r;if(n&&k&&!x){let i=await m({addressToVerify:n,baseURL:s});r={...r,...i?.scamInfo?{[n]:i.scamInfo}:{}}}let V=!!(f&&I({tokenId:f,egldLabel:y}));return{transaction:a,receiverScamInfo:r[n]?.info||null,transactionTokenInfo:d,isTokenTransaction:V,dataField:c,transactionIndex:D,needsSigning:o.needsSigning}}}export{M as a};
2
+ //# sourceMappingURL=chunk-7KVG225H.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-GUUHEK5P.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a),this.resetData())}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-ZBSK4R4A.mjs.map
1
+ import{a as i}from"./chunk-S65LFCFF.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a),this.resetData())}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-AX4TYCZE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-DQNOCLT6.mjs";import{e}from"./chunk-QNYO7NI5.mjs";var o=class i extends r{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._gasPriceOptionMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,gasPriceOption:0,gasPriceOptions:[],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){a.filter(t=>t!=null).forEach(t=>{let s=t?Number(t.gasPrice):1e9;this.updateGasPriceMap({nonce:Number(t.nonce),gasPriceOption:s,initialGasPrice:s})});let n=Number(a[0]?.gasPrice)||1e9;this.updateCommonData({gasPriceOption:n})}updateGasPriceMap({nonce:a,gasPriceOption:n,initialGasPrice:t}){this._gasPriceOptionMap[a]={...this._gasPriceOptionMap[a],gasPriceOption:n},t&&(this._gasPriceOptionMap[a].initialGasPrice=t)}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,n){switch(a){case"NonFungibleESDT":this.data.nftTransaction=n,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=n,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get getGasPriceOptionMap(){return this._gasPriceOptionMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-HIYESNLH.mjs.map
1
+ import{a as r}from"./chunk-YYB5NTTG.mjs";import{e}from"./chunk-QNYO7NI5.mjs";var o=class i extends r{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._gasPriceOptionMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,gasPriceOption:0,gasPriceOptions:[],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){a.filter(t=>t!=null).forEach(t=>{let s=t?Number(t.gasPrice):1e9;this.updateGasPriceMap({nonce:Number(t.nonce),gasPriceOption:s,initialGasPrice:s})});let n=Number(a[0]?.gasPrice)||1e9;this.updateCommonData({gasPriceOption:n})}updateGasPriceMap({nonce:a,gasPriceOption:n,initialGasPrice:t}){this._gasPriceOptionMap[a]={...this._gasPriceOptionMap[a],gasPriceOption:n},t&&(this._gasPriceOptionMap[a].initialGasPrice=t)}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,n){switch(a){case"NonFungibleESDT":this.data.nftTransaction=n,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=n,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get getGasPriceOptionMap(){return this._gasPriceOptionMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-B6WCLNVW.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s,d as i,h as o}from"./chunk-R4OESOQT.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
- //# sourceMappingURL=chunk-THUYZJOV.mjs.map
1
+ import{b as s,d as i,h as o}from"./chunk-6VCA6ZLV.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
+ //# sourceMappingURL=chunk-BYBNN4KR.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-NCFTGD3Z.mjs";import{q as M}from"./chunk-XCOSMO6H.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-PBW3OFFT.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
2
- //# sourceMappingURL=chunk-2PSCCAFS.mjs.map
1
+ import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-YFTZSYJR.mjs";import{q as M}from"./chunk-QMRLPDMP.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-IXZES7OF.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
2
+ //# sourceMappingURL=chunk-BYOB4BJX.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-XCOSMO6H.mjs";import{a as c}from"./chunk-APCGI2A5.mjs";var p=t=>{o().setState(({account:e})=>{let s=e.address===t.address;e.accounts={[e.address]:s?t:c}},!1,{type:"setAccount",payload:{value:t}})},r=t=>o().setState(({account:e})=>{e.ledgerAccount=t},!1,{type:"setLedgerAccount",payload:{value:t}}),u=t=>o().setState(({account:e})=>{e.walletConnectAccount=t},!1,{type:"setWalletConnectAccount",payload:{value:t}}),l=t=>o().setState(({account:e})=>{e.websocketEvent={timestamp:Date.now(),message:t}},!1,{type:"setWebsocketEvent",payload:{value:t}}),d=t=>o().setState(({account:e})=>{e.websocketBatchEvent={timestamp:Date.now(),data:t}},!1,{type:"setWebsocketBatchEvent",payload:{value:t}}),y=t=>{o().setState(({account:e})=>{e.accounts[e.address].nonce=t},!1,{type:"setAccountNonce",payload:{value:t}})};export{p as a,r as b,u as c,l as d,d as e,y as f};
2
- //# sourceMappingURL=chunk-TL33Y6UO.mjs.map
1
+ import{q as o}from"./chunk-QMRLPDMP.mjs";import{a as c}from"./chunk-APCGI2A5.mjs";var p=t=>{o().setState(({account:e})=>{let s=e.address===t.address;e.accounts={[e.address]:s?t:c}},!1,{type:"setAccount",payload:{value:t}})},r=t=>o().setState(({account:e})=>{e.ledgerAccount=t},!1,{type:"setLedgerAccount",payload:{value:t}}),u=t=>o().setState(({account:e})=>{e.walletConnectAccount=t},!1,{type:"setWalletConnectAccount",payload:{value:t}}),l=t=>o().setState(({account:e})=>{e.websocketEvent={timestamp:Date.now(),message:t}},!1,{type:"setWebsocketEvent",payload:{value:t}}),d=t=>o().setState(({account:e})=>{e.websocketBatchEvent={timestamp:Date.now(),data:t}},!1,{type:"setWebsocketBatchEvent",payload:{value:t}}),y=t=>{o().setState(({account:e})=>{e.accounts[e.address].nonce=t},!1,{type:"setAccountNonce",payload:{value:t}})};export{p as a,r as b,u as c,l as d,d as e,y as f};
2
+ //# sourceMappingURL=chunk-C47F2DSK.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-XCOSMO6H.mjs";var d=s=>{let o=r(e()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
- //# sourceMappingURL=chunk-Q2D7XVUW.mjs.map
1
+ import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-QMRLPDMP.mjs";var d=s=>{let o=r(e()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
+ //# sourceMappingURL=chunk-CHDYDRGH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-XCOSMO6H.mjs";var r=e=>n().setState(({config:t})=>{t.nativeAuthConfig=e},!1,{type:"setNativeAuthConfig",payload:{value:e}}),c=e=>n().setState(({config:t})=>{t.websocketStatus=e},!1,{type:"setWebsocketStatus",payload:{value:e}}),C=e=>n().setState(({config:t})=>{if(e){let l=e.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,a=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:a,walletConnectV2RelayAddress:l}}else t.walletConnectConfig=null},!1,{type:"setWalletConnectConfig",payload:{value:e}}),f=e=>n().setState(({config:t})=>{t.settings=e},!1,{type:"setProviderSettings",payload:{value:e}}),g=e=>n().setState(({config:t})=>{t.settings||(t.settings={}),t.settings.isSigningUiEnabled=e},!1,{type:"setIsSigningUiEnabled",payload:{value:e}});export{r as a,c as b,C as c,f as d,g as e};
2
- //# sourceMappingURL=chunk-TWXGPL2M.mjs.map
1
+ import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-QMRLPDMP.mjs";var r=e=>n().setState(({config:t})=>{t.nativeAuthConfig=e},!1,{type:"setNativeAuthConfig",payload:{value:e}}),c=e=>n().setState(({config:t})=>{t.websocketStatus=e},!1,{type:"setWebsocketStatus",payload:{value:e}}),C=e=>n().setState(({config:t})=>{if(e){let l=e.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,a=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:a,walletConnectV2RelayAddress:l}}else t.walletConnectConfig=null},!1,{type:"setWalletConnectConfig",payload:{value:e}}),f=e=>n().setState(({config:t})=>{t.settings=e},!1,{type:"setProviderSettings",payload:{value:e}}),g=e=>n().setState(({config:t})=>{t.settings||(t.settings={}),t.settings.isSigningUiEnabled=e},!1,{type:"setIsSigningUiEnabled",payload:{value:e}});export{r as a,c as b,C as c,f as d,g as e};
2
+ //# sourceMappingURL=chunk-DC72YEOI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-XCOSMO6H.mjs";import{a as l}from"./chunk-SQVKVA7X.mjs";var e=o=>u().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...l,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await c(a),f=r.roundDuration?null:await w(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
2
- //# sourceMappingURL=chunk-ZTIVKI3D.mjs.map
1
+ import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-QMRLPDMP.mjs";import{a as l}from"./chunk-SQVKVA7X.mjs";var e=o=>u().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...l,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await c(a),f=r.roundDuration?null:await w(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
2
+ //# sourceMappingURL=chunk-DMUBYMI7.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as t}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-QMRLPDMP.mjs";function g(r=e()){return t(r).egldLabel}export{g as a};
2
+ //# sourceMappingURL=chunk-EPP4W6NS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-PBW3OFFT.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
2
- //# sourceMappingURL=chunk-LPAOTMAD.mjs.map
1
+ import{a as e}from"./chunk-IXZES7OF.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
2
+ //# sourceMappingURL=chunk-GCK2BTWM.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-XCOSMO6H.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
2
- //# sourceMappingURL=chunk-GB5MPULE.mjs.map
1
+ import{q as o}from"./chunk-QMRLPDMP.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
2
+ //# sourceMappingURL=chunk-GFRD6DC7.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as o}from"./chunk-ZKN4TX5N.mjs";import{a as r}from"./chunk-JJRA6WO3.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
2
- //# sourceMappingURL=chunk-JZ35QU6N.mjs.map
1
+ import{d as o}from"./chunk-LVY5STWK.mjs";import{a as r}from"./chunk-I5N5DHKW.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
2
+ //# sourceMappingURL=chunk-GJSKMZ5J.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-UTWIKUIK.mjs";import{s as t}from"./chunk-QMRLPDMP.mjs";var i=(e,o)=>r(`transaction-${e}`)(o??t())??null;export{i as a};
2
+ //# sourceMappingURL=chunk-GNLCNART.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-ZTJXY43P.mjs";import{a as u}from"./chunk-FSHND4CZ.mjs";import{a}from"./chunk-PMHRZ5Y7.mjs";import{l as p}from"./chunk-E2GGD7D4.mjs";import{b as o}from"./chunk-GB5MPULE.mjs";var n={};async function b({serverTransaction:r,sessionId:t,isSequential:c}){let{hash:e,status:s,invalidTransaction:f,hasStatusChanged:S}=r;try{if(n[e]>30){o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"});return}if(f&&!c||s==="sent"){n[e]=n[e]?n[e]+1:1;return}if(c&&!s){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i});return}if(S){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i})}p(s)&&await m({sessionId:t,transaction:r})}catch(T){console.error(T),o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"})}}export{b as a};
2
- //# sourceMappingURL=chunk-XR57DPDK.mjs.map
1
+ import{a as m}from"./chunk-NYBAFM6F.mjs";import{a as u}from"./chunk-OJZJL25C.mjs";import{a}from"./chunk-PMHRZ5Y7.mjs";import{l as p}from"./chunk-E2GGD7D4.mjs";import{b as o}from"./chunk-GFRD6DC7.mjs";var n={};async function b({serverTransaction:r,sessionId:t,isSequential:c}){let{hash:e,status:s,invalidTransaction:f,hasStatusChanged:S}=r;try{if(n[e]>30){o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"});return}if(f&&!c||s==="sent"){n[e]=n[e]?n[e]+1:1;return}if(c&&!s){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i});return}if(S){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i})}p(s)&&await m({sessionId:t,transaction:r})}catch(T){console.error(T),o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"})}}export{b as a};
2
+ //# sourceMappingURL=chunk-GTPGGUVC.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-4TXZCVFN.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-GXYN7OW2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-Q2D7XVUW.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
2
- //# sourceMappingURL=chunk-5HLQD7ON.mjs.map
1
+ import{a as n}from"./chunk-CHDYDRGH.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
2
+ //# sourceMappingURL=chunk-H6EQTKFK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-GUUHEK5P.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}get walletConnectData(){return{...this.data}}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
- //# sourceMappingURL=chunk-5K6KEW4N.mjs.map
1
+ import{a as e}from"./chunk-S65LFCFF.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}get walletConnectData(){return{...this.data}}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
+ //# sourceMappingURL=chunk-H7CCXMFQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-36UNO4TU.mjs";import{a as c}from"./chunk-O5PAMBB3.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{l as a};
2
- //# sourceMappingURL=chunk-DGGKLREG.mjs.map
1
+ import{a as u}from"./chunk-37XBMJUS.mjs";import{a as c}from"./chunk-O5PAMBB3.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{l as a};
2
+ //# sourceMappingURL=chunk-HLIKW6T5.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-QMRLPDMP.mjs";function d(t=r()){return e(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-HRX4UVIG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-LPAOTMAD.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-Z63GEE5L.mjs.map
1
+ import{a as e}from"./chunk-GCK2BTWM.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-I53YLZ2T.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-IXZES7OF.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-I5N5DHKW.mjs.map
@@ -1,2 +1,2 @@
1
- import{i as g}from"./chunk-R4OESOQT.mjs";import{a as i,b as a,g as c}from"./chunk-M6MN4RXG.mjs";var s={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${a}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${i}-${Date.now()}`}},m={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},E=n=>{for(let[r,e]of Object.entries(m))if(n.includes(r))return e;return"Error when signing"};function O(n,r="error"){let e=n?.message,o=E(e),t=o!=="Error when signing"?"warning":r,l=Object.keys(s).includes(t)?s[t]:s.error,{toastId:T,iconClassName:d,title:u}=l;return g({toastId:T,duration:1e4,icon:"close",iconClassName:d,message:o,title:u}),o}export{O as a};
2
- //# sourceMappingURL=chunk-PH5DYKBD.mjs.map
1
+ import{i as g}from"./chunk-6VCA6ZLV.mjs";import{a as i,b as a,g as c}from"./chunk-M6MN4RXG.mjs";var s={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${a}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${i}-${Date.now()}`}},m={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},E=n=>{for(let[r,e]of Object.entries(m))if(n.includes(r))return e;return"Error when signing"};function O(n,r="error"){let e=n?.message,o=E(e),t=o!=="Error when signing"?"warning":r,l=Object.keys(s).includes(t)?s[t]:s.error,{toastId:T,iconClassName:d,title:u}=l;return g({toastId:T,duration:1e4,icon:"close",iconClassName:d,message:o,title:u}),o}export{O as a};
2
+ //# sourceMappingURL=chunk-IEGHXK66.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as t}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-XCOSMO6H.mjs";import{y as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";var c=async(s,a={apiAddress:""})=>{let{data:o}=await i.get(`${a.apiAddress||t(r())}/${e}`,{params:{hashes:s.join(","),withScResults:!0}});return o};export{c as a};
2
- //# sourceMappingURL=chunk-ZFCFCT73.mjs.map
1
+ import{d as t}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-QMRLPDMP.mjs";import{y as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";var c=async(s,a={apiAddress:""})=>{let{data:o}=await i.get(`${a.apiAddress||t(r())}/${e}`,{params:{hashes:s.join(","),withScResults:!0}});return o};export{c as a};
2
+ //# sourceMappingURL=chunk-IPDWDMEJ.mjs.map
@@ -0,0 +1,2 @@
1
+ var o=typeof window<"u"?window:{},n="5.6.22";export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-IXZES7OF.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.6.21'; // 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.6.22'; // 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 i}from"./chunk-Q2D7XVUW.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
- //# sourceMappingURL=chunk-EXZKSKKB.mjs.map
1
+ import{a as i}from"./chunk-CHDYDRGH.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
+ //# sourceMappingURL=chunk-K7MM6MKP.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-QMRLPDMP.mjs";import{f as t}from"./chunk-FK6DWWZF.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-KB3ZP2B6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-HY3RU7TP.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-RLXA4V4H.mjs.map
1
+ import{a}from"./chunk-X5U557J2.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-L4K3TCX4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-BSA3IGL6.mjs";import{a as l}from"./chunk-RLXA4V4H.mjs";import{a as g}from"./chunk-OBIQ63DJ.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var N=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=l(h),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:m,timestamp:c}=n,p=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${m}.${r}.${p}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:f}};export{N as a};
2
- //# sourceMappingURL=chunk-MIRIUZ3C.mjs.map
1
+ import{a as f}from"./chunk-BSA3IGL6.mjs";import{a as l}from"./chunk-L4K3TCX4.mjs";import{a as g}from"./chunk-OBIQ63DJ.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var N=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=l(h),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:m,timestamp:c}=n,p=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${m}.${r}.${p}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:f}};export{N as a};
2
+ //# sourceMappingURL=chunk-LR2KZ5ET.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-PBW3OFFT.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-ZKN4TX5N.mjs.map
1
+ import{a as e}from"./chunk-IXZES7OF.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-LVY5STWK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-PVEBIM2W.mjs";import{a as T}from"./chunk-DGGKLREG.mjs";import{a as p}from"./chunk-TWOVGGG2.mjs";import{a as i}from"./chunk-M3F2J3PW.mjs";import{a as k}from"./chunk-HYPARWQN.mjs";import{a as l}from"./chunk-YJCTRUJT.mjs";import{c as m}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-OQURAWR4.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:f}){let h=f.map(e=>k({address:v,explorerAddress:a,transaction:e}));return await Promise.all(h.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await T({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=p({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=u.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??m,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:l({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
2
- //# sourceMappingURL=chunk-G7NA76AN.mjs.map
1
+ import{a as u}from"./chunk-PVEBIM2W.mjs";import{a as T}from"./chunk-HLIKW6T5.mjs";import{a as p}from"./chunk-TWOVGGG2.mjs";import{a as i}from"./chunk-M3F2J3PW.mjs";import{a as k}from"./chunk-HYPARWQN.mjs";import{a as l}from"./chunk-YJCTRUJT.mjs";import{c as m}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-OQURAWR4.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:f}){let h=f.map(e=>k({address:v,explorerAddress:a,transaction:e}));return await Promise.all(h.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await T({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=p({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=u.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??m,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:l({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
2
+ //# sourceMappingURL=chunk-MAOQDCIZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-SIYKRNB4.mjs";import{a as e}from"./chunk-23T4S2W7.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-XCOSMO6H.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
2
- //# sourceMappingURL=chunk-D5TPQCLQ.mjs.map
1
+ import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-4PH2HU7S.mjs";import{a as e}from"./chunk-SCMTCC7N.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-QMRLPDMP.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
2
+ //# sourceMappingURL=chunk-NL4PKIDQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-YXUCUKMO.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-XCOSMO6H.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
- //# sourceMappingURL=chunk-5HFZQ4N2.mjs.map
1
+ import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-QJN3GSGR.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-QMRLPDMP.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
+ //# sourceMappingURL=chunk-NSYAXXGG.mjs.map