@multiversx/sdk-dapp 5.6.0 → 5.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/out/__chunks__/{chunk-HSBPXEYO.mjs → chunk-2NWOEEMH.mjs} +2 -2
  2. package/out/__chunks__/{chunk-YZ4QKLL4.mjs → chunk-2WF5ZWBD.mjs} +2 -2
  3. package/out/__chunks__/{chunk-T4B7EPFP.mjs → chunk-3NJIJ5ZX.mjs} +2 -2
  4. package/out/__chunks__/{chunk-MS4HJKFQ.mjs → chunk-3XSQSLWS.mjs} +2 -2
  5. package/out/__chunks__/{chunk-2S5WHIFT.mjs → chunk-4TXQTO5H.mjs} +2 -2
  6. package/out/__chunks__/{chunk-B7W4YLNC.mjs → chunk-5F6WZKJE.mjs} +2 -2
  7. package/out/__chunks__/{chunk-KX6CNV2K.mjs → chunk-5LFQBGNR.mjs} +2 -2
  8. package/out/__chunks__/chunk-5QZXFNXN.mjs +2 -0
  9. package/out/__chunks__/chunk-6AI6YEYF.mjs +2 -0
  10. package/out/__chunks__/{chunk-5UOXJCVE.mjs.map → chunk-6AI6YEYF.mjs.map} +1 -1
  11. package/out/__chunks__/{chunk-GYT3GRW7.mjs → chunk-6LCMMXSV.mjs} +2 -2
  12. package/out/__chunks__/{chunk-Z7OIZBTP.mjs → chunk-6Q6CYYJN.mjs} +2 -2
  13. package/out/__chunks__/{chunk-5MF4CGC2.mjs → chunk-6RTW3NNL.mjs} +2 -2
  14. package/out/__chunks__/chunk-6SODPG3Z.mjs +2 -0
  15. package/out/__chunks__/{chunk-W4PB2EPE.mjs → chunk-6TNJX6OV.mjs} +2 -2
  16. package/out/__chunks__/{chunk-OFCQKFNJ.mjs → chunk-76ZOY6VP.mjs} +2 -2
  17. package/out/__chunks__/chunk-7N7XGUEI.mjs +2 -0
  18. package/out/__chunks__/{chunk-5MIUR7TV.mjs → chunk-7SI5UL5T.mjs} +2 -2
  19. package/out/__chunks__/{chunk-CEEQLHQZ.mjs → chunk-7VIOX4FV.mjs} +2 -2
  20. package/out/__chunks__/{chunk-HQKLV6UC.mjs → chunk-7ZDQAOZA.mjs} +2 -2
  21. package/out/__chunks__/{chunk-5ETHXOLQ.mjs → chunk-AT2ULPIQ.mjs} +2 -2
  22. package/out/__chunks__/chunk-B7SOPVVG.mjs +2 -0
  23. package/out/__chunks__/{chunk-S6Z7SK4I.mjs → chunk-BDQDMYE2.mjs} +2 -2
  24. package/out/__chunks__/{chunk-PSMZAY5L.mjs → chunk-BPQUWNOJ.mjs} +2 -2
  25. package/out/__chunks__/{chunk-WDKKHXUY.mjs → chunk-BU5MQY6M.mjs} +2 -2
  26. package/out/__chunks__/{chunk-RQA4GYJ2.mjs → chunk-C4YMIBIT.mjs} +2 -2
  27. package/out/__chunks__/{chunk-2XGFPNHN.mjs → chunk-CP5EUGTA.mjs} +2 -2
  28. package/out/__chunks__/{chunk-AUUO3J3I.mjs → chunk-CRZWEGX4.mjs} +2 -2
  29. package/out/__chunks__/{chunk-YSJOMOP6.mjs → chunk-EGUUSWSY.mjs} +2 -2
  30. package/out/__chunks__/{chunk-XMZ5CAST.mjs → chunk-EVBHVGED.mjs} +2 -2
  31. package/out/__chunks__/{chunk-M2CIC466.mjs → chunk-FFA5EZQS.mjs} +2 -2
  32. package/out/__chunks__/chunk-FMC2XJDM.mjs +2 -0
  33. package/out/__chunks__/{chunk-SIS54TKT.mjs → chunk-G22AG5FA.mjs} +2 -2
  34. package/out/__chunks__/{chunk-FE7JVDOF.mjs → chunk-G32ZZQZJ.mjs} +2 -2
  35. package/out/__chunks__/{chunk-TSXYRZYR.mjs → chunk-GAARIX2L.mjs} +2 -2
  36. package/out/__chunks__/{chunk-LLP256EY.mjs → chunk-GDPJD7DM.mjs} +2 -2
  37. package/out/__chunks__/{chunk-OZHVKT7L.mjs → chunk-GN6MQETD.mjs} +2 -2
  38. package/out/__chunks__/{chunk-VQCBZHSJ.mjs → chunk-GRQXEWKY.mjs} +2 -2
  39. package/out/__chunks__/{chunk-75FZNOHX.mjs → chunk-GZLYHVRK.mjs} +2 -2
  40. package/out/__chunks__/chunk-HCQ72DY5.mjs +2 -0
  41. package/out/__chunks__/{chunk-5CTCDH76.mjs → chunk-HWW2JJMZ.mjs} +2 -2
  42. package/out/__chunks__/{chunk-C7JC6X43.mjs → chunk-HY3UHHJZ.mjs} +2 -2
  43. package/out/__chunks__/{chunk-3XGEELWS.mjs → chunk-I5DX7KW7.mjs} +2 -2
  44. package/out/__chunks__/{chunk-R4PQZ3KR.mjs → chunk-IF25XU42.mjs} +2 -2
  45. package/out/__chunks__/{chunk-KSZ6KLOV.mjs → chunk-ISHOC3HN.mjs} +2 -2
  46. package/out/__chunks__/{chunk-2NIE3WNK.mjs → chunk-JHN7ZXZD.mjs} +2 -2
  47. package/out/__chunks__/{chunk-THWJWM3U.mjs → chunk-JQJPJU2Q.mjs} +2 -2
  48. package/out/__chunks__/{chunk-EKYWBNA4.mjs → chunk-KCE7SWEX.mjs} +2 -2
  49. package/out/__chunks__/{chunk-UGOYRSVR.mjs → chunk-KCPZTM4J.mjs} +2 -2
  50. package/out/__chunks__/{chunk-YKGVZIZL.mjs → chunk-KUCQ5SRL.mjs} +2 -2
  51. package/out/__chunks__/{chunk-M46Q3HDT.mjs → chunk-KYRA3SU5.mjs} +2 -2
  52. package/out/__chunks__/chunk-LXHDLH3F.mjs +2 -0
  53. package/out/__chunks__/{chunk-IBNTHQ5J.mjs → chunk-MOUCHIKH.mjs} +2 -2
  54. package/out/__chunks__/{chunk-UUT43IJZ.mjs → chunk-MZHUPMBI.mjs} +2 -2
  55. package/out/__chunks__/{chunk-S56636YA.mjs → chunk-NOV7YLBH.mjs} +2 -2
  56. package/out/__chunks__/{chunk-Q55HCS7B.mjs → chunk-NQ33YSHO.mjs} +2 -2
  57. package/out/__chunks__/{chunk-3VJNYMSP.mjs → chunk-OTJG5BXN.mjs} +2 -2
  58. package/out/__chunks__/{chunk-3AYP4TKJ.mjs → chunk-OTZRBH74.mjs} +2 -2
  59. package/out/__chunks__/{chunk-OQ7JOMPY.mjs → chunk-OWY3ANBW.mjs} +2 -2
  60. package/out/__chunks__/{chunk-YEBTFFUW.mjs → chunk-PL54S5SZ.mjs} +2 -2
  61. package/out/__chunks__/{chunk-TRTXNUSR.mjs → chunk-QBZJ7YT2.mjs} +2 -2
  62. package/out/__chunks__/{chunk-4KA3OVFJ.mjs → chunk-QFFHMFYL.mjs} +2 -2
  63. package/out/__chunks__/{chunk-OEVIK4XL.mjs → chunk-QG7HIWZD.mjs} +2 -2
  64. package/out/__chunks__/chunk-QY47XP6Y.mjs +2 -0
  65. package/out/__chunks__/{chunk-HCPI3NQP.mjs → chunk-S5SYCA4F.mjs} +2 -2
  66. package/out/__chunks__/chunk-SDJBS6NR.mjs +2 -0
  67. package/out/__chunks__/{chunk-2PJP3H72.mjs → chunk-SHQJRZRG.mjs} +2 -2
  68. package/out/__chunks__/{chunk-KV2IW2CT.mjs → chunk-SM62HZ3V.mjs} +2 -2
  69. package/out/__chunks__/{chunk-IE7KB5QA.mjs → chunk-STLKOXG5.mjs} +2 -2
  70. package/out/__chunks__/chunk-UAB7GELA.mjs +2 -0
  71. package/out/__chunks__/{chunk-JRQIDKAA.mjs → chunk-UMOLH6HR.mjs} +1 -1
  72. package/out/__chunks__/{chunk-JRQIDKAA.mjs.map → chunk-UMOLH6HR.mjs.map} +1 -1
  73. package/out/__chunks__/chunk-VBFHQD63.mjs +2 -0
  74. package/out/__chunks__/chunk-VBFHQD63.mjs.map +7 -0
  75. package/out/__chunks__/{chunk-H7BMGYSW.mjs → chunk-VF5CEBTD.mjs} +2 -2
  76. package/out/__chunks__/{chunk-B2YN2K4Y.mjs → chunk-W4BZ6WZG.mjs} +2 -2
  77. package/out/__chunks__/{chunk-RVNLIKEM.mjs → chunk-WBHIPVL6.mjs} +2 -2
  78. package/out/__chunks__/{chunk-WO45TI6N.mjs → chunk-WFGN4M73.mjs} +2 -2
  79. package/out/__chunks__/{chunk-CSBQZF3J.mjs → chunk-WKVB6JZV.mjs} +2 -2
  80. package/out/__chunks__/chunk-WPT6RHNQ.mjs +2 -0
  81. package/out/__chunks__/chunk-WTZZWA22.mjs +2 -0
  82. package/out/__chunks__/{chunk-57EKOYML.mjs → chunk-X6QROJDH.mjs} +2 -2
  83. package/out/__chunks__/{chunk-UPPVQNFF.mjs → chunk-XHAYGFJ5.mjs} +2 -2
  84. package/out/__chunks__/chunk-XMRQCZT4.mjs +2 -0
  85. package/out/__chunks__/chunk-XMVBCQNY.mjs +2 -0
  86. package/out/__chunks__/{chunk-VNO3UPYV.mjs → chunk-XQOUUZGE.mjs} +2 -2
  87. package/out/__chunks__/{chunk-HZS3BVBK.mjs → chunk-XSXGXODH.mjs} +2 -2
  88. package/out/__chunks__/{chunk-ZG72FAAC.mjs → chunk-XTQHD33S.mjs} +2 -2
  89. package/out/__chunks__/{chunk-TUY5CCZR.mjs → chunk-XVQMJV6B.mjs} +2 -2
  90. package/out/__chunks__/{chunk-2DW7TQJ7.mjs → chunk-YVWXI3GJ.mjs} +2 -2
  91. package/out/__chunks__/{chunk-ZHLQ6ML2.mjs → chunk-ZBZA777X.mjs} +2 -2
  92. package/out/__chunks__/{chunk-L53UGE2V.mjs → chunk-ZMDQIRLX.mjs} +2 -2
  93. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  94. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  95. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  96. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  97. package/out/apiCalls/economics/getEconomics.mjs +1 -1
  98. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  99. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  100. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  101. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  102. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  103. package/out/constants/browser.constants.mjs +1 -1
  104. package/out/constants/storage.constants.mjs +1 -1
  105. package/out/constants/window.constants.cjs +1 -1
  106. package/out/constants/window.constants.cjs.map +1 -1
  107. package/out/constants/window.constants.mjs +1 -1
  108. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  109. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  110. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  111. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  112. package/out/lib/sdkDappUi.mjs +1 -1
  113. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  114. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  115. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  116. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  117. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  118. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  119. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  120. package/out/managers/ToastManager/index.mjs +1 -1
  121. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  122. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  123. package/out/managers/TransactionManager/index.mjs +1 -1
  124. package/out/managers/UnlockPanelManager/UnlockPanelManager.cjs +1 -1
  125. package/out/managers/UnlockPanelManager/UnlockPanelManager.cjs.map +3 -3
  126. package/out/managers/UnlockPanelManager/UnlockPanelManager.d.ts +1 -0
  127. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  128. package/out/managers/UnlockPanelManager/UnlockPanelManager.types.cjs +1 -1
  129. package/out/managers/UnlockPanelManager/UnlockPanelManager.types.cjs.map +1 -1
  130. package/out/managers/UnlockPanelManager/UnlockPanelManager.types.d.ts +8 -0
  131. package/out/managers/UnlockPanelManager/UnlockPanelManager.types.mjs +1 -1
  132. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  133. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  134. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  135. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  136. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  137. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  138. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  139. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  140. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  141. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  142. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  143. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  144. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  145. package/out/methods/account/getAccount.mjs +1 -1
  146. package/out/methods/account/getAccountInfo.mjs +1 -1
  147. package/out/methods/account/getAddress.mjs +1 -1
  148. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  149. package/out/methods/account/getLatestNonce.mjs +1 -1
  150. package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
  151. package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
  152. package/out/methods/initApp/initApp.mjs +1 -1
  153. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  154. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  155. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  156. package/out/methods/network/getEgldLabel.mjs +1 -1
  157. package/out/methods/network/getExplorerAddress.mjs +1 -1
  158. package/out/methods/network/getNetworkConfig.mjs +1 -1
  159. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  160. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
  161. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
  162. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
  163. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
  164. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
  165. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  166. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  167. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  168. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  169. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  170. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  171. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  172. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  173. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  174. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  175. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  176. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  177. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  178. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  179. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  180. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
  181. package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
  182. package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
  183. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  184. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  185. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  186. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  187. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  188. package/out/providers/DappProvider/index.mjs +1 -1
  189. package/out/providers/ProviderFactory.mjs +1 -1
  190. package/out/providers/helpers/accountProvider.mjs +1 -1
  191. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  192. package/out/providers/helpers/restoreProvider.mjs +1 -1
  193. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  194. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  195. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  196. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  197. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  198. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  199. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  200. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  201. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
  202. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
  203. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  204. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
  205. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
  206. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
  207. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
  208. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  209. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  210. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  211. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  212. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  213. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  214. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  215. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  216. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  217. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  218. package/out/providers/strategies/helpers/index.mjs +1 -1
  219. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  220. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  221. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  222. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  223. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  224. package/out/react/account/useGetAccount.mjs +1 -1
  225. package/out/react/account/useGetAccountInfo.mjs +1 -1
  226. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  227. package/out/react/account/useGetLatestNonce.mjs +1 -1
  228. package/out/react/index.mjs +1 -1
  229. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  230. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  231. package/out/react/store/getReactStore.mjs +1 -1
  232. package/out/react/store/useSelector.mjs +1 -1
  233. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  234. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  235. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  236. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  237. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  238. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  239. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  240. package/out/services/nativeAuth/index.mjs +1 -1
  241. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  242. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  243. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  244. package/out/store/actions/account/accountActions.mjs +1 -1
  245. package/out/store/actions/account/index.mjs +1 -1
  246. package/out/store/actions/cache/cacheActions.mjs +1 -1
  247. package/out/store/actions/cache/index.mjs +1 -1
  248. package/out/store/actions/config/configActions.mjs +1 -1
  249. package/out/store/actions/config/index.mjs +1 -1
  250. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  251. package/out/store/actions/network/index.mjs +1 -1
  252. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  253. package/out/store/actions/network/networkActions.mjs +1 -1
  254. package/out/store/actions/sharedActions/index.mjs +1 -1
  255. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  256. package/out/store/actions/toasts/index.mjs +1 -1
  257. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  258. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  259. package/out/store/actions/ui/index.mjs +1 -1
  260. package/out/store/actions/ui/uiActions.mjs +1 -1
  261. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  262. package/out/store/middleware/index.mjs +1 -1
  263. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  264. package/out/store/storage/index.mjs +1 -1
  265. package/out/store/storage/storageCallback.mjs +1 -1
  266. package/out/store/store.mjs +1 -1
  267. package/out/utils/ComponentFactory.mjs +1 -1
  268. package/out/utils/account/fetchAccount.mjs +1 -1
  269. package/out/utils/account/refreshAccount.mjs +1 -1
  270. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  271. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  272. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  273. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  274. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  275. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  276. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  277. package/out/utils/visual/switchTheme.mjs +1 -1
  278. package/out/utils/window/getIsInIframe.mjs +1 -1
  279. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  280. package/package.json +1 -1
  281. package/out/__chunks__/chunk-4U4NN2BV.mjs +0 -2
  282. package/out/__chunks__/chunk-5UOXJCVE.mjs +0 -2
  283. package/out/__chunks__/chunk-7KZRDBRD.mjs +0 -2
  284. package/out/__chunks__/chunk-D4TXTRNG.mjs +0 -2
  285. package/out/__chunks__/chunk-D4TXTRNG.mjs.map +0 -7
  286. package/out/__chunks__/chunk-D7EX7MUQ.mjs +0 -2
  287. package/out/__chunks__/chunk-DIRAY5XU.mjs +0 -2
  288. package/out/__chunks__/chunk-GI2BXTON.mjs +0 -2
  289. package/out/__chunks__/chunk-GNBEFY25.mjs +0 -2
  290. package/out/__chunks__/chunk-HX4LWMG4.mjs +0 -2
  291. package/out/__chunks__/chunk-IC7LTFNH.mjs +0 -2
  292. package/out/__chunks__/chunk-KWVOWN7D.mjs +0 -2
  293. package/out/__chunks__/chunk-QVSS57NF.mjs +0 -2
  294. package/out/__chunks__/chunk-TOTEIAZR.mjs +0 -2
  295. package/out/__chunks__/chunk-VCFLLUN2.mjs +0 -2
  296. package/out/__chunks__/chunk-XDV6WH5M.mjs +0 -2
  297. package/out/__chunks__/chunk-XPRJTAQX.mjs +0 -2
  298. /package/out/__chunks__/{chunk-HSBPXEYO.mjs.map → chunk-2NWOEEMH.mjs.map} +0 -0
  299. /package/out/__chunks__/{chunk-YZ4QKLL4.mjs.map → chunk-2WF5ZWBD.mjs.map} +0 -0
  300. /package/out/__chunks__/{chunk-T4B7EPFP.mjs.map → chunk-3NJIJ5ZX.mjs.map} +0 -0
  301. /package/out/__chunks__/{chunk-MS4HJKFQ.mjs.map → chunk-3XSQSLWS.mjs.map} +0 -0
  302. /package/out/__chunks__/{chunk-2S5WHIFT.mjs.map → chunk-4TXQTO5H.mjs.map} +0 -0
  303. /package/out/__chunks__/{chunk-B7W4YLNC.mjs.map → chunk-5F6WZKJE.mjs.map} +0 -0
  304. /package/out/__chunks__/{chunk-KX6CNV2K.mjs.map → chunk-5LFQBGNR.mjs.map} +0 -0
  305. /package/out/__chunks__/{chunk-TOTEIAZR.mjs.map → chunk-5QZXFNXN.mjs.map} +0 -0
  306. /package/out/__chunks__/{chunk-GYT3GRW7.mjs.map → chunk-6LCMMXSV.mjs.map} +0 -0
  307. /package/out/__chunks__/{chunk-Z7OIZBTP.mjs.map → chunk-6Q6CYYJN.mjs.map} +0 -0
  308. /package/out/__chunks__/{chunk-5MF4CGC2.mjs.map → chunk-6RTW3NNL.mjs.map} +0 -0
  309. /package/out/__chunks__/{chunk-QVSS57NF.mjs.map → chunk-6SODPG3Z.mjs.map} +0 -0
  310. /package/out/__chunks__/{chunk-W4PB2EPE.mjs.map → chunk-6TNJX6OV.mjs.map} +0 -0
  311. /package/out/__chunks__/{chunk-OFCQKFNJ.mjs.map → chunk-76ZOY6VP.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-HX4LWMG4.mjs.map → chunk-7N7XGUEI.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-5MIUR7TV.mjs.map → chunk-7SI5UL5T.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-CEEQLHQZ.mjs.map → chunk-7VIOX4FV.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-HQKLV6UC.mjs.map → chunk-7ZDQAOZA.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-5ETHXOLQ.mjs.map → chunk-AT2ULPIQ.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-VCFLLUN2.mjs.map → chunk-B7SOPVVG.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-S6Z7SK4I.mjs.map → chunk-BDQDMYE2.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-PSMZAY5L.mjs.map → chunk-BPQUWNOJ.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-WDKKHXUY.mjs.map → chunk-BU5MQY6M.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-RQA4GYJ2.mjs.map → chunk-C4YMIBIT.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-2XGFPNHN.mjs.map → chunk-CP5EUGTA.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-AUUO3J3I.mjs.map → chunk-CRZWEGX4.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-YSJOMOP6.mjs.map → chunk-EGUUSWSY.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-XMZ5CAST.mjs.map → chunk-EVBHVGED.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-M2CIC466.mjs.map → chunk-FFA5EZQS.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-4U4NN2BV.mjs.map → chunk-FMC2XJDM.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-SIS54TKT.mjs.map → chunk-G22AG5FA.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-FE7JVDOF.mjs.map → chunk-G32ZZQZJ.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-TSXYRZYR.mjs.map → chunk-GAARIX2L.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-LLP256EY.mjs.map → chunk-GDPJD7DM.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-OZHVKT7L.mjs.map → chunk-GN6MQETD.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-VQCBZHSJ.mjs.map → chunk-GRQXEWKY.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-75FZNOHX.mjs.map → chunk-GZLYHVRK.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-KWVOWN7D.mjs.map → chunk-HCQ72DY5.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-5CTCDH76.mjs.map → chunk-HWW2JJMZ.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-C7JC6X43.mjs.map → chunk-HY3UHHJZ.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-3XGEELWS.mjs.map → chunk-I5DX7KW7.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-R4PQZ3KR.mjs.map → chunk-IF25XU42.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-KSZ6KLOV.mjs.map → chunk-ISHOC3HN.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-2NIE3WNK.mjs.map → chunk-JHN7ZXZD.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-THWJWM3U.mjs.map → chunk-JQJPJU2Q.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-EKYWBNA4.mjs.map → chunk-KCE7SWEX.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-UGOYRSVR.mjs.map → chunk-KCPZTM4J.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-YKGVZIZL.mjs.map → chunk-KUCQ5SRL.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-M46Q3HDT.mjs.map → chunk-KYRA3SU5.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-GNBEFY25.mjs.map → chunk-LXHDLH3F.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-IBNTHQ5J.mjs.map → chunk-MOUCHIKH.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-UUT43IJZ.mjs.map → chunk-MZHUPMBI.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-S56636YA.mjs.map → chunk-NOV7YLBH.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-Q55HCS7B.mjs.map → chunk-NQ33YSHO.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-3VJNYMSP.mjs.map → chunk-OTJG5BXN.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-3AYP4TKJ.mjs.map → chunk-OTZRBH74.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-OQ7JOMPY.mjs.map → chunk-OWY3ANBW.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-YEBTFFUW.mjs.map → chunk-PL54S5SZ.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-TRTXNUSR.mjs.map → chunk-QBZJ7YT2.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-4KA3OVFJ.mjs.map → chunk-QFFHMFYL.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-OEVIK4XL.mjs.map → chunk-QG7HIWZD.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-GI2BXTON.mjs.map → chunk-QY47XP6Y.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-HCPI3NQP.mjs.map → chunk-S5SYCA4F.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-IC7LTFNH.mjs.map → chunk-SDJBS6NR.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-2PJP3H72.mjs.map → chunk-SHQJRZRG.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-KV2IW2CT.mjs.map → chunk-SM62HZ3V.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-IE7KB5QA.mjs.map → chunk-STLKOXG5.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-DIRAY5XU.mjs.map → chunk-UAB7GELA.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-H7BMGYSW.mjs.map → chunk-VF5CEBTD.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-B2YN2K4Y.mjs.map → chunk-W4BZ6WZG.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-RVNLIKEM.mjs.map → chunk-WBHIPVL6.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-WO45TI6N.mjs.map → chunk-WFGN4M73.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-CSBQZF3J.mjs.map → chunk-WKVB6JZV.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-XDV6WH5M.mjs.map → chunk-WPT6RHNQ.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-7KZRDBRD.mjs.map → chunk-WTZZWA22.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-57EKOYML.mjs.map → chunk-X6QROJDH.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-UPPVQNFF.mjs.map → chunk-XHAYGFJ5.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-D7EX7MUQ.mjs.map → chunk-XMRQCZT4.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-XPRJTAQX.mjs.map → chunk-XMVBCQNY.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-VNO3UPYV.mjs.map → chunk-XQOUUZGE.mjs.map} +0 -0
  378. /package/out/__chunks__/{chunk-HZS3BVBK.mjs.map → chunk-XSXGXODH.mjs.map} +0 -0
  379. /package/out/__chunks__/{chunk-ZG72FAAC.mjs.map → chunk-XTQHD33S.mjs.map} +0 -0
  380. /package/out/__chunks__/{chunk-TUY5CCZR.mjs.map → chunk-XVQMJV6B.mjs.map} +0 -0
  381. /package/out/__chunks__/{chunk-2DW7TQJ7.mjs.map → chunk-YVWXI3GJ.mjs.map} +0 -0
  382. /package/out/__chunks__/{chunk-ZHLQ6ML2.mjs.map → chunk-ZBZA777X.mjs.map} +0 -0
  383. /package/out/__chunks__/{chunk-L53UGE2V.mjs.map → chunk-ZMDQIRLX.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-57EKOYML.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-3AYP4TKJ.mjs.map
1
+ import{q as o}from"./chunk-X6QROJDH.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-OTZRBH74.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-THWJWM3U.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
- //# sourceMappingURL=chunk-OQ7JOMPY.mjs.map
1
+ import{a as t}from"./chunk-JQJPJU2Q.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
+ //# sourceMappingURL=chunk-OWY3ANBW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-CSBQZF3J.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-YEBTFFUW.mjs.map
1
+ import{a as n}from"./chunk-WKVB6JZV.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-PL54S5SZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-75FZNOHX.mjs";import{q as M}from"./chunk-57EKOYML.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-5UOXJCVE.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-TRTXNUSR.mjs.map
1
+ import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-GZLYHVRK.mjs";import{q as M}from"./chunk-X6QROJDH.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-6AI6YEYF.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-QBZJ7YT2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-XMZ5CAST.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-4KA3OVFJ.mjs.map
1
+ import{a}from"./chunk-EVBHVGED.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-QFFHMFYL.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-75FZNOHX.mjs";import{a as g}from"./chunk-GI2BXTON.mjs";import{s as e}from"./chunk-57EKOYML.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-OEVIK4XL.mjs.map
1
+ import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-GZLYHVRK.mjs";import{a as g}from"./chunk-QY47XP6Y.mjs";import{s as e}from"./chunk-X6QROJDH.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-QG7HIWZD.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-X6QROJDH.mjs";import{f as t}from"./chunk-FK6DWWZF.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-QY47XP6Y.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-57EKOYML.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-HCPI3NQP.mjs.map
1
+ import{q as o}from"./chunk-X6QROJDH.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-S5SYCA4F.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-X6QROJDH.mjs";function f(r=t()){return o(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-SDJBS6NR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-C7JC6X43.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-TUY5CCZR.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-2PJP3H72.mjs.map
1
+ import{a as m}from"./chunk-HY3UHHJZ.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-XVQMJV6B.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-SHQJRZRG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as U}from"./chunk-VCFLLUN2.mjs";import{a as B}from"./chunk-GBDHEWNQ.mjs";import{a as $}from"./chunk-2PJP3H72.mjs";import{a as _}from"./chunk-CB4IL76J.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 M}from"./chunk-75FZNOHX.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-2DW7TQJ7.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 L,f}from"./chunk-PJWJZHIS.mjs";import{a as G}from"./chunk-2JKCBTYK.mjs";import{c as F}from"./chunk-PWAP64SN.mjs";import{a as C}from"./chunk-5UOXJCVE.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:o,network:n,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:o,sender:W,apiAddress:n.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await v({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Y};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(n.decimals):X,digits:Number(n.digits),showLastNonZeroDecimal:!1,addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:Q),ut=w({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===x?o:a)??o,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:p,price:S}),nt=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:n.gasStationMetadata}),{gasPriceOption:N}=T,et=M().getType(),it=O(et),k=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:`/${G}/${m}`,explorerAddress:st}),ct=k===1||t?.needsSigning&&!e.includes(s),pt=f({input:N.toString(),decimals:L,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:N,gasPriceOptions:nt,egldLabel:o,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:k,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-KV2IW2CT.mjs.map
1
+ import{a as U}from"./chunk-B7SOPVVG.mjs";import{a as B}from"./chunk-GBDHEWNQ.mjs";import{a as $}from"./chunk-SHQJRZRG.mjs";import{a as _}from"./chunk-CB4IL76J.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 M}from"./chunk-GZLYHVRK.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-YVWXI3GJ.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 L,f}from"./chunk-PJWJZHIS.mjs";import{a as G}from"./chunk-2JKCBTYK.mjs";import{c as F}from"./chunk-PWAP64SN.mjs";import{a as C}from"./chunk-6AI6YEYF.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:o,network:n,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:o,sender:W,apiAddress:n.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await v({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Y};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(n.decimals):X,digits:Number(n.digits),showLastNonZeroDecimal:!1,addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:Q),ut=w({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===x?o:a)??o,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:p,price:S}),nt=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:n.gasStationMetadata}),{gasPriceOption:N}=T,et=M().getType(),it=O(et),k=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:`/${G}/${m}`,explorerAddress:st}),ct=k===1||t?.needsSigning&&!e.includes(s),pt=f({input:N.toString(),decimals:L,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:N,gasPriceOptions:nt,egldLabel:o,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:k,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-SM62HZ3V.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-PSMZAY5L.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-IE7KB5QA.mjs.map
1
+ import{a as i}from"./chunk-BPQUWNOJ.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-STLKOXG5.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-6AI6YEYF.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-UAB7GELA.mjs.map
@@ -1,2 +1,2 @@
1
1
  var e=(o=>(o.OPEN="OPEN",o.CLOSE="CLOSE",o.LOGIN="LOGIN",o.CANCEL_LOGIN="CANCEL_LOGIN",o.CANCEL_IN_PROVIDER="CANCEL_IN_PROVIDER",o.SELECT_PROVIDER="SELECT_PROVIDER",o.ANCHOR_CLOSE="ANCHOR_CLOSE",o))(e||{});export{e as a};
2
- //# sourceMappingURL=chunk-JRQIDKAA.mjs.map
2
+ //# sourceMappingURL=chunk-UMOLH6HR.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/managers/UnlockPanelManager/UnlockPanelManager.types.ts"],
4
- "sourcesContent": ["import {\n IProviderFactory,\n ProviderType\n} from 'providers/types/providerFactory.types';\n\nexport enum UnlockPanelEventsEnum {\n OPEN = 'OPEN',\n CLOSE = 'CLOSE',\n LOGIN = 'LOGIN',\n CANCEL_LOGIN = 'CANCEL_LOGIN',\n CANCEL_IN_PROVIDER = 'CANCEL_IN_PROVIDER',\n SELECT_PROVIDER = 'SELECT_PROVIDER',\n /**\n * User clicks Close button inside mounted provider\n */\n ANCHOR_CLOSE = 'ANCHOR_CLOSE'\n}\n\nexport type LoginFunctonType = ({\n type,\n anchor\n}: IProviderFactory) => Promise<void>;\n\nexport type LoginCallbackType = () => void;\n\nexport type LoginHandlerType = LoginFunctonType | LoginCallbackType;\nexport type OnCloseUnlockPanelType = () => Promise<void>;\n\nexport type UnlockPanelManagerInitParamsType = {\n /**\n * Accepts:\n * - 1\uFE0F\u20E3 a `callback` that is executed after login is performed\n * - 2\uFE0F\u20E3 a `function` that handles the full login process\n * @example\n * ```ts\n * // 1\uFE0F\u20E3 callback\n () => {\n navigate('/dashboard');\n };\n // 2\uFE0F\u20E3 login handler function\n async ({ type, anchor }: IProviderFactory) => {\n const provider = await ProviderFactory.create({\n type,\n anchor\n });\n await provider?.login();\n navigate('/dashboard');\n };\n * ```\n */\n loginHandler: LoginHandlerType;\n /**\n * Controls which providers are shown in the unlock panel. By default, all providers are shown.\n * Editing this property will allow you to:\n * - Hide specific providers\n * - Show only specific providers\n * - Reorder the providers\n * @example\n * ```ts\n * allowedProviders: [ProviderTypeEnum.walletConnect, 'inMemoryProvider']\n * ```\n */\n allowedProviders?: ProviderType[];\n /**\n * Callback function to handle UI behavior when the unlock panel is closed\n * without completing the login process.\n *\n * Common use case: redirecting the user away from the `/unlock` route\n * (e.g., back to the homepage or a previous screen) when login is cancelled or skipped.\n * \n * @example\n * ```ts\n onClose: async () => {\n navigate('/');\n }\n * ```\n */\n onClose?: OnCloseUnlockPanelType;\n /**\n * Callback function to handle UI behavior when the login is cancelled\n * @example\n * ```ts\n * onCancelLogin: async () => {\n * navigate('/');\n * }\n * ```\n */\n onCancelLogin?: () => Promise<void>;\n};\n"],
4
+ "sourcesContent": ["import {\n IProviderFactory,\n ProviderType\n} from 'providers/types/providerFactory.types';\n\nexport enum UnlockPanelEventsEnum {\n OPEN = 'OPEN',\n CLOSE = 'CLOSE',\n LOGIN = 'LOGIN',\n CANCEL_LOGIN = 'CANCEL_LOGIN',\n CANCEL_IN_PROVIDER = 'CANCEL_IN_PROVIDER',\n SELECT_PROVIDER = 'SELECT_PROVIDER',\n /**\n * User clicks Close button inside mounted provider\n */\n ANCHOR_CLOSE = 'ANCHOR_CLOSE'\n}\n\nexport type LoginFunctonType = ({\n type,\n anchor\n}: IProviderFactory) => Promise<void>;\n\nexport type LoginCallbackType = () => void;\n\nexport type LoginHandlerType = LoginFunctonType | LoginCallbackType;\nexport type OnCloseUnlockPanelType = () => Promise<void>;\n\nexport type UnlockPanelManagerInitParamsType = {\n /**\n * Accepts:\n * - 1\uFE0F\u20E3 a `callback` that is executed after login is performed\n * - 2\uFE0F\u20E3 a `function` that handles the full login process\n * @example\n * ```ts\n * // 1\uFE0F\u20E3 callback\n () => {\n navigate('/dashboard');\n };\n // 2\uFE0F\u20E3 login handler function\n async ({ type, anchor }: IProviderFactory) => {\n const provider = await ProviderFactory.create({\n type,\n anchor\n });\n await provider?.login();\n navigate('/dashboard');\n };\n * ```\n */\n loginHandler: LoginHandlerType;\n /**\n * Controls which providers are shown in the unlock panel. By default, all providers are shown.\n * Editing this property will allow you to:\n * - Hide specific providers\n * - Show only specific providers\n * - Reorder the providers\n * @example\n * ```ts\n * allowedProviders: [ProviderTypeEnum.walletConnect, 'inMemoryProvider']\n * ```\n */\n allowedProviders?: ProviderType[];\n /**\n * Callback function to handle UI behavior when the unlock panel is closed\n * without completing the login process.\n *\n * Common use case: redirecting the user away from the `/unlock` route\n * (e.g., back to the homepage or a previous screen) when login is cancelled or skipped.\n * \n * @example\n * ```ts\n onClose: async () => {\n navigate('/');\n }\n * ```\n */\n onClose?: OnCloseUnlockPanelType;\n /**\n * Callback function to handle UI behavior when the login is cancelled\n * @example\n * ```ts\n * onCancelLogin: async () => {\n * navigate('/');\n * }\n * ```\n */\n onCancelLogin?: () => Promise<void>;\n /**\n * Token to be used for login\n * @example\n * ```ts\n * token: '1234567890'\n * ```\n */\n token?: string | null;\n};\n"],
5
5
  "mappings": "AAKO,IAAKA,OACVA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QACRA,EAAA,aAAe,eACfA,EAAA,mBAAqB,qBACrBA,EAAA,gBAAkB,kBAIlBA,EAAA,aAAe,eAVLA,OAAA",
6
6
  "names": ["UnlockPanelEventsEnum"]
7
7
  }
@@ -0,0 +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-ZBZA777X.mjs";import{a as s}from"./chunk-WBHIPVL6.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as a}from"./chunk-X6QROJDH.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-VBFHQD63.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/UnlockPanelManager/UnlockPanelManager.ts"],
4
+ "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxUnlockPanel } from 'lib/sdkDappUi';\nimport { ProviderFactory } from 'providers/ProviderFactory';\nimport {\n IProviderBase,\n IProviderFactory,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { networkSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport {\n OnCloseUnlockPanelType,\n LoginHandlerType,\n UnlockPanelEventsEnum,\n UnlockPanelManagerInitParamsType\n} from './UnlockPanelManager.types';\nimport { SidePanelBaseManager } from '../internal/SidePanelBaseManager';\nimport { getIsSimpleLoginCallback } from './helpers/getIsSimpleLoginCallback';\nimport { getProvidersList } from './helpers/getProviderList';\n\ninterface IUnlockPanelManagerData {\n providers: IProviderBase[] | null;\n walletAddress: string | null;\n}\n\nexport class UnlockPanelManager extends SidePanelBaseManager<\n MvxUnlockPanel,\n IUnlockPanelManagerData,\n UnlockPanelEventsEnum\n> {\n protected initialData: IUnlockPanelManagerData = {\n providers: null,\n walletAddress: null\n };\n\n private static instance: UnlockPanelManager;\n private static loginHandler: LoginHandlerType | null = null;\n private static onClose: OnCloseUnlockPanelType | null = null;\n private static allowedProviders?: ProviderType[] | null = null;\n private static onCancelLogin?: (() => Promise<void>) | null = null;\n private static token?: string | null = null;\n\n constructor() {\n super({\n uiTag: UITagsEnum.UNLOCK_PANEL,\n uiDataUpdateEvent: UnlockPanelEventsEnum.OPEN\n });\n\n this.data = this.initialData;\n }\n\n public static getInstance(): UnlockPanelManager {\n if (!UnlockPanelManager.instance) {\n UnlockPanelManager.instance = new UnlockPanelManager();\n }\n return UnlockPanelManager.instance;\n }\n\n public static init(params: UnlockPanelManagerInitParamsType) {\n this.loginHandler = params.loginHandler;\n this.allowedProviders = params.allowedProviders;\n\n if (params.onClose) {\n this.onClose = params.onClose;\n }\n\n if (params.onCancelLogin) {\n this.onCancelLogin = params.onCancelLogin;\n }\n\n if (params.token) {\n this.token = params.token;\n }\n\n return this.getInstance();\n }\n\n public openUnlockPanel = async () => {\n const { walletAddress } = networkSelector(getState());\n\n const providers = getProvidersList(\n ProviderFactory.customProviders,\n UnlockPanelManager.allowedProviders\n );\n\n this.data = {\n providers,\n walletAddress\n };\n\n await this.openUI();\n this.notifyDataUpdate();\n };\n\n public selectProvider = (providerType: ProviderType) => {\n if (!this.eventBus) {\n throw new Error('Panel not initialized. Call openUnlockPanel() first.');\n }\n\n this.eventBus.publish(UnlockPanelEventsEnum.SELECT_PROVIDER, {\n providerType\n });\n };\n\n protected setupEventListeners = async () => {\n if (!this.eventBus) {\n return;\n }\n\n this.subscribeToEventBus(UnlockPanelEventsEnum.LOGIN, this.handleLogin);\n this.subscribeToEventBus(\n UnlockPanelEventsEnum.CANCEL_LOGIN,\n this.handleCancelLogin\n );\n this.subscribeToEventBus(UnlockPanelEventsEnum.CLOSE, this.handleCloseUI);\n };\n\n private readonly handleCloseUI = async (options?: {\n isLoginFinished?: boolean;\n }) => {\n if (!options?.isLoginFinished && UnlockPanelManager.onClose) {\n await UnlockPanelManager.onClose();\n }\n\n this.closeUI();\n };\n\n private readonly handleLogin = async ({ type, anchor }: IProviderFactory) => {\n if (!UnlockPanelManager.loginHandler) {\n throw new Error(\n 'Login callback not initialized. Please call `init()` first.'\n );\n }\n\n try {\n if (getIsSimpleLoginCallback(UnlockPanelManager.loginHandler)) {\n const provider = await ProviderFactory.create({ type, anchor });\n const token = UnlockPanelManager.token;\n await provider.login(token ? { token } : undefined);\n UnlockPanelManager.loginHandler();\n } else {\n UnlockPanelManager.loginHandler({\n type,\n anchor\n });\n }\n await this.handleCloseUI({ isLoginFinished: true });\n } catch (error) {\n console.error(error);\n this.eventBus?.publish(\n UnlockPanelEventsEnum.CANCEL_IN_PROVIDER,\n this.data\n );\n }\n };\n\n private readonly handleCancelLogin = async () => {\n await ProviderFactory.destroy();\n if (UnlockPanelManager.onCancelLogin) {\n await UnlockPanelManager.onCancelLogin();\n }\n };\n}\n"],
5
+ "mappings": "sPAyBO,IAAMA,EAAN,MAAMA,UAA2BC,CAItC,CAaA,aAAc,CACZ,MAAM,CACJ,yBACA,wBACF,CAAC,EAhBH,KAAU,YAAuC,CAC/C,UAAW,KACX,cAAe,IACjB,EA4CA,KAAO,gBAAkB,SAAY,CACnC,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAgBC,EAAS,CAAC,EAE9CC,EAAYC,EAChBC,EAAgB,gBAChBP,EAAmB,gBACrB,EAEA,KAAK,KAAO,CACV,UAAAK,EACA,cAAAH,CACF,EAEA,MAAM,KAAK,OAAO,EAClB,KAAK,iBAAiB,CACxB,EAEA,KAAO,eAAkBM,GAA+B,CACtD,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,MAAM,sDAAsD,EAGxE,KAAK,SAAS,0BAA+C,CAC3D,aAAAA,CACF,CAAC,CACH,EAEA,KAAU,oBAAsB,SAAY,CACrC,KAAK,WAIV,KAAK,4BAAiD,KAAK,WAAW,EACtE,KAAK,mCAEH,KAAK,iBACP,EACA,KAAK,4BAAiD,KAAK,aAAa,EAC1E,EAEA,KAAiB,cAAgB,MAAOC,GAElC,CACA,CAACA,GAAS,iBAAmBT,EAAmB,SAClD,MAAMA,EAAmB,QAAQ,EAGnC,KAAK,QAAQ,CACf,EAEA,KAAiB,YAAc,MAAO,CAAE,KAAAU,EAAM,OAAAC,CAAO,IAAwB,CAC3E,GAAI,CAACX,EAAmB,aACtB,MAAM,IAAI,MACR,6DACF,EAGF,GAAI,CACF,GAAIY,EAAyBZ,EAAmB,YAAY,EAAG,CAC7D,IAAMa,EAAW,MAAMN,EAAgB,OAAO,CAAE,KAAAG,EAAM,OAAAC,CAAO,CAAC,EACxDG,EAAQd,EAAmB,MACjC,MAAMa,EAAS,MAAMC,EAAQ,CAAE,MAAAA,CAAM,EAAI,MAAS,EAClDd,EAAmB,aAAa,CAClC,MACEA,EAAmB,aAAa,CAC9B,KAAAU,EACA,OAAAC,CACF,CAAC,EAEH,MAAM,KAAK,cAAc,CAAE,gBAAiB,EAAK,CAAC,CACpD,OAASI,EAAO,CACd,QAAQ,MAAMA,CAAK,EACnB,KAAK,UAAU,6BAEb,KAAK,IACP,CACF,CACF,EAEA,KAAiB,kBAAoB,SAAY,CAC/C,MAAMR,EAAgB,QAAQ,EAC1BP,EAAmB,eACrB,MAAMA,EAAmB,cAAc,CAE3C,EAjHE,KAAK,KAAO,KAAK,WACnB,CAEA,OAAc,aAAkC,CAC9C,OAAKA,EAAmB,WACtBA,EAAmB,SAAW,IAAIA,GAE7BA,EAAmB,QAC5B,CAEA,OAAc,KAAKgB,EAA0C,CAC3D,YAAK,aAAeA,EAAO,aAC3B,KAAK,iBAAmBA,EAAO,iBAE3BA,EAAO,UACT,KAAK,QAAUA,EAAO,SAGpBA,EAAO,gBACT,KAAK,cAAgBA,EAAO,eAG1BA,EAAO,QACT,KAAK,MAAQA,EAAO,OAGf,KAAK,YAAY,CAC1B,CAuFF,EAzIahB,EAWI,aAAwC,KAX5CA,EAYI,QAAyC,KAZ7CA,EAaI,iBAA2C,KAb/CA,EAcI,cAA+C,KAdnDA,EAeI,MAAwB,KAflC,IAAMiB,EAANjB",
6
+ "names": ["_UnlockPanelManager", "SidePanelBaseManager", "walletAddress", "networkSelector", "getState", "providers", "getProvidersList", "ProviderFactory", "providerType", "options", "type", "anchor", "getIsSimpleLoginCallback", "provider", "token", "error", "params", "UnlockPanelManager"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-5UOXJCVE.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
2
- //# sourceMappingURL=chunk-H7BMGYSW.mjs.map
1
+ import{a as t}from"./chunk-6AI6YEYF.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
2
+ //# sourceMappingURL=chunk-VF5CEBTD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as z}from"./chunk-2XGFPNHN.mjs";import{a as H}from"./chunk-QVSS57NF.mjs";import{a as h}from"./chunk-L53UGE2V.mjs";import{a as j}from"./chunk-YEBTFFUW.mjs";import{a as O}from"./chunk-KV2IW2CT.mjs";import{a as K}from"./chunk-OMBZCVQZ.mjs";import{a as W}from"./chunk-TSXYRZYR.mjs";import{a as X}from"./chunk-BKQQK7WP.mjs";import{a as C}from"./chunk-HX4LWMG4.mjs";import{d as R}from"./chunk-V5ZSFCKJ.mjs";import{a as B}from"./chunk-GNBEFY25.mjs";import{e as k}from"./chunk-QNYO7NI5.mjs";import{b as _}from"./chunk-7VHTZYM2.mjs";import{s as E}from"./chunk-57EKOYML.mjs";import{a as F,c as U,f as x}from"./chunk-PJWJZHIS.mjs";import{d as y}from"./chunk-DA76AK4I.mjs";async function On({transactions:$=[],handleSign:G,guardTransactions:L=W,options:q}){let{address:N,shard:D,username:M}=B(),u=_(E()),J=R(E()),v=H(),{allTransactions:o,parsedTransactionsByDataField:A}=X($),l=[];if(J?.isSigningUiEnabled===!1){C(!0);try{let d=[];for(let c of o){let p=await G([c.transaction]);p&&p.length>0&&d.push(p[0])}return await L(d)}finally{C(!1)}}let n=z.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let Q=async()=>{await h(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",Q),new Promise(async(d,f)=>{let c=[],p=await j({baseURL:u.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(o.map(a=>a.transaction));let S=p?.price,t=0,P=async()=>{let r=o[t]?.transaction,m=Number(r.nonce);try{n.updateIsLoading(!0);let{commonData:e,tokenTransaction:s,fungibleTransaction:i}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});s&&n.updateTokenTransaction(s),i&&n.updateNonFungibleTransaction(i.type,i),n.updateCommonData(e)}catch(e){throw console.error(`Error fetching common data for transaction at index ${t}:`,e),e}finally{n.updateIsLoading(!1)}},V=()=>{t>0&&(t--,P())},Y=(a=1e9)=>{let m=o[t].transaction,e=Number(m.nonce);n.updateGasPriceMap({nonce:e,gasPriceOption:a});let s=m.toPlainObject(),i=y.newFromPlainObject({...s,gasPrice:a}),g=K({transaction:i,price:S}),I=x({input:a.toString(),decimals:U,addCommas:!0,digits:F});n.updateCommonData({feeLimit:g.feeLimitFormatted,feeInFiatLimit:g.feeInFiatLimit,gasPrice:I,gasPriceOption:a})},Z=async()=>{f(new Error("Transaction signing cancelled by user")),await h(),n.closeUI()},w=()=>{t<n.transactionsCount-1&&(t++,P())},nn=async()=>{let r=o[t].transaction,m=Number(r.nonce),{commonData:e}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});if(!e.needsSigning)return l.push(t),w();let s=r.toPlainObject(),i=s.nonce,{gasPriceOption:g}=n.getGasPriceOptionMap[i],I=y.newFromPlainObject({...s,gasPrice:g});try{let T=await G([I]);T&&(l.push(t),c.push(T[0]));let on=t===o.length-1,en=o.filter(b=>b.needsSigning),rn=c.length===en.length;if(on&&rn){let b=await q?.callback?.(c)||c,sn=await L(b);return n.closeUI(),d(sn)}w()}catch(T){n.closeUI(),f(T)}},tn=new Map([["NEXT_SIGN_TRANSACTIONS",w],["CONFIRM_SIGN_TRANSACTIONS",nn],["CLOSE_SIGN_TRANSACTIONS",Z],["BACK_SIGN_TRANSACTIONS",V],["SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS",Y]]);function an(){for(let[a,r]of tn)n.subscribeToEventBus(a,r)}n.clearEventHandlers(["NEXT_SIGN_TRANSACTIONS","CONFIRM_SIGN_TRANSACTIONS","CLOSE_SIGN_TRANSACTIONS","BACK_SIGN_TRANSACTIONS","SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS"]),an(),await P()})}export{On as a};
2
- //# sourceMappingURL=chunk-B2YN2K4Y.mjs.map
1
+ import{a as z}from"./chunk-CP5EUGTA.mjs";import{a as H}from"./chunk-6SODPG3Z.mjs";import{a as h}from"./chunk-ZMDQIRLX.mjs";import{a as j}from"./chunk-PL54S5SZ.mjs";import{a as O}from"./chunk-SM62HZ3V.mjs";import{a as K}from"./chunk-OMBZCVQZ.mjs";import{a as W}from"./chunk-GAARIX2L.mjs";import{a as X}from"./chunk-BKQQK7WP.mjs";import{a as C}from"./chunk-7N7XGUEI.mjs";import{d as R}from"./chunk-V5ZSFCKJ.mjs";import{a as B}from"./chunk-LXHDLH3F.mjs";import{e as k}from"./chunk-QNYO7NI5.mjs";import{b as _}from"./chunk-7VHTZYM2.mjs";import{s as E}from"./chunk-X6QROJDH.mjs";import{a as F,c as U,f as x}from"./chunk-PJWJZHIS.mjs";import{d as y}from"./chunk-DA76AK4I.mjs";async function On({transactions:$=[],handleSign:G,guardTransactions:L=W,options:q}){let{address:N,shard:D,username:M}=B(),u=_(E()),J=R(E()),v=H(),{allTransactions:o,parsedTransactionsByDataField:A}=X($),l=[];if(J?.isSigningUiEnabled===!1){C(!0);try{let d=[];for(let c of o){let p=await G([c.transaction]);p&&p.length>0&&d.push(p[0])}return await L(d)}finally{C(!1)}}let n=z.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let Q=async()=>{await h(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",Q),new Promise(async(d,f)=>{let c=[],p=await j({baseURL:u.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(o.map(a=>a.transaction));let S=p?.price,t=0,P=async()=>{let r=o[t]?.transaction,m=Number(r.nonce);try{n.updateIsLoading(!0);let{commonData:e,tokenTransaction:s,fungibleTransaction:i}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});s&&n.updateTokenTransaction(s),i&&n.updateNonFungibleTransaction(i.type,i),n.updateCommonData(e)}catch(e){throw console.error(`Error fetching common data for transaction at index ${t}:`,e),e}finally{n.updateIsLoading(!1)}},V=()=>{t>0&&(t--,P())},Y=(a=1e9)=>{let m=o[t].transaction,e=Number(m.nonce);n.updateGasPriceMap({nonce:e,gasPriceOption:a});let s=m.toPlainObject(),i=y.newFromPlainObject({...s,gasPrice:a}),g=K({transaction:i,price:S}),I=x({input:a.toString(),decimals:U,addCommas:!0,digits:F});n.updateCommonData({feeLimit:g.feeLimitFormatted,feeInFiatLimit:g.feeInFiatLimit,gasPrice:I,gasPriceOption:a})},Z=async()=>{f(new Error("Transaction signing cancelled by user")),await h(),n.closeUI()},w=()=>{t<n.transactionsCount-1&&(t++,P())},nn=async()=>{let r=o[t].transaction,m=Number(r.nonce),{commonData:e}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});if(!e.needsSigning)return l.push(t),w();let s=r.toPlainObject(),i=s.nonce,{gasPriceOption:g}=n.getGasPriceOptionMap[i],I=y.newFromPlainObject({...s,gasPrice:g});try{let T=await G([I]);T&&(l.push(t),c.push(T[0]));let on=t===o.length-1,en=o.filter(b=>b.needsSigning),rn=c.length===en.length;if(on&&rn){let b=await q?.callback?.(c)||c,sn=await L(b);return n.closeUI(),d(sn)}w()}catch(T){n.closeUI(),f(T)}},tn=new Map([["NEXT_SIGN_TRANSACTIONS",w],["CONFIRM_SIGN_TRANSACTIONS",nn],["CLOSE_SIGN_TRANSACTIONS",Z],["BACK_SIGN_TRANSACTIONS",V],["SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS",Y]]);function an(){for(let[a,r]of tn)n.subscribeToEventBus(a,r)}n.clearEventHandlers(["NEXT_SIGN_TRANSACTIONS","CONFIRM_SIGN_TRANSACTIONS","CLOSE_SIGN_TRANSACTIONS","BACK_SIGN_TRANSACTIONS","SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS"]),an(),await P()})}export{On as a};
2
+ //# sourceMappingURL=chunk-W4BZ6WZG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-PSMZAY5L.mjs";import{a as t}from"./chunk-HX4LWMG4.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
2
- //# sourceMappingURL=chunk-RVNLIKEM.mjs.map
1
+ import{a as n}from"./chunk-BPQUWNOJ.mjs";import{a as t}from"./chunk-7N7XGUEI.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
2
+ //# sourceMappingURL=chunk-WBHIPVL6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-CSBQZF3J.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
2
- //# sourceMappingURL=chunk-WO45TI6N.mjs.map
1
+ import{a as o}from"./chunk-WKVB6JZV.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
2
+ //# sourceMappingURL=chunk-WFGN4M73.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-57EKOYML.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-CSBQZF3J.mjs.map
1
+ import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-X6QROJDH.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-WKVB6JZV.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-OWY3ANBW.mjs";import{c as n}from"./chunk-X6QROJDH.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
2
+ //# sourceMappingURL=chunk-WPT6RHNQ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-X6QROJDH.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-WTZZWA22.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-DIRAY5XU.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),r=s(e),{address:i,publicKey:M}=p(e);if(i&&M!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:u(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(W),t},n,D=e=>{n=e},o=()=>(n||D(z(()=>new k)),n),ue=(e=I)=>{let t=z(e);return D(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,W as n,z as o,D as p,o as q,ue as r,de as s};
2
- //# sourceMappingURL=chunk-57EKOYML.mjs.map
1
+ import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-UAB7GELA.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),r=s(e),{address:i,publicKey:M}=p(e);if(i&&M!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:u(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(W),t},n,D=e=>{n=e},o=()=>(n||D(z(()=>new k)),n),ue=(e=I)=>{let t=z(e);return D(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,W as n,z as o,D as p,o as q,ue as r,de as s};
2
+ //# sourceMappingURL=chunk-X6QROJDH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-EKYWBNA4.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-TWYGNEQS.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{g as S}from"./chunk-MS4HJKFQ.mjs";import{a as h}from"./chunk-3AYP4TKJ.mjs";import{a as y}from"./chunk-GNBEFY25.mjs";import{h as f}from"./chunk-M6MN4RXG.mjs";import{b as l}from"./chunk-7VHTZYM2.mjs";import{a as g}from"./chunk-NI7XCWV5.mjs";import{s as m}from"./chunk-57EKOYML.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=b(s),n=h({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return S({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=l(m());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=y(),{apiAddress:s,apiTimeout:o}=l(m());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return g({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${f}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
- //# sourceMappingURL=chunk-UPPVQNFF.mjs.map
1
+ import{a as A}from"./chunk-KCE7SWEX.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-TWYGNEQS.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{g as S}from"./chunk-3XSQSLWS.mjs";import{a as h}from"./chunk-OTZRBH74.mjs";import{a as y}from"./chunk-LXHDLH3F.mjs";import{h as f}from"./chunk-M6MN4RXG.mjs";import{b as l}from"./chunk-7VHTZYM2.mjs";import{a as g}from"./chunk-NI7XCWV5.mjs";import{s as m}from"./chunk-X6QROJDH.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=b(s),n=h({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return S({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=l(m());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=y(),{apiAddress:s,apiTimeout:o}=l(m());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return g({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${f}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
+ //# sourceMappingURL=chunk-XHAYGFJ5.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-X6QROJDH.mjs";import{c as r}from"./chunk-FK6DWWZF.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-XMRQCZT4.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-MOUCHIKH.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-XMVBCQNY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-ZHLQ6ML2.mjs";import{k as d}from"./chunk-75FZNOHX.mjs";import{s as a}from"./chunk-57EKOYML.mjs";import{d as n}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as s}from"./chunk-R4PQZ3KR.mjs";async function S(){let t=c(),m=s(),e=n(a()),o=m||t?i.webview:e,p=Object.values(i).includes(e);if(e&&!p&&(o=e),!o)return;let r=await v.create({type:o});if(!r)throw new Error("Provider not found");if(t||o===i.webview&&r.isInitialized())try{await r.login()}catch(f){console.warn("Failed to login with provider",r.getType(),f)}d(r)}export{S as a};
2
- //# sourceMappingURL=chunk-VNO3UPYV.mjs.map
1
+ import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-ZBZA777X.mjs";import{k as d}from"./chunk-GZLYHVRK.mjs";import{s as a}from"./chunk-X6QROJDH.mjs";import{d as n}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as s}from"./chunk-IF25XU42.mjs";async function S(){let t=c(),m=s(),e=n(a()),o=m||t?i.webview:e,p=Object.values(i).includes(e);if(e&&!p&&(o=e),!o)return;let r=await v.create({type:o});if(!r)throw new Error("Provider not found");if(t||o===i.webview&&r.isInitialized())try{await r.login()}catch(f){console.warn("Failed to login with provider",r.getType(),f)}d(r)}export{S as a};
2
+ //# sourceMappingURL=chunk-XQOUUZGE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-YEBTFFUW.mjs";import{a as b}from"./chunk-IC7LTFNH.mjs";import{a as g}from"./chunk-KWVOWN7D.mjs";import{a as m}from"./chunk-YGI3KXMZ.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>g({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=m({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
- //# sourceMappingURL=chunk-HZS3BVBK.mjs.map
1
+ import{a as w}from"./chunk-PL54S5SZ.mjs";import{a as b}from"./chunk-SDJBS6NR.mjs";import{a as g}from"./chunk-HCQ72DY5.mjs";import{a as m}from"./chunk-YGI3KXMZ.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>g({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=m({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
+ //# sourceMappingURL=chunk-XSXGXODH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-5UOXJCVE.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
- //# sourceMappingURL=chunk-ZG72FAAC.mjs.map
1
+ import{a as e}from"./chunk-6AI6YEYF.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
+ //# sourceMappingURL=chunk-XTQHD33S.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-CSBQZF3J.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-TUY5CCZR.mjs.map
1
+ import{a as i}from"./chunk-WKVB6JZV.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-XVQMJV6B.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-57EKOYML.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-2DW7TQJ7.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-X6QROJDH.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-YVWXI3GJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-UUT43IJZ.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-Q55HCS7B.mjs";import{a as V}from"./chunk-IE7KB5QA.mjs";import{a as ae}from"./chunk-B7W4YLNC.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-OEVIK4XL.mjs";import{a as ge}from"./chunk-FE7JVDOF.mjs";import{a as g}from"./chunk-Z7OIZBTP.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-3XGEELWS.mjs";import{a as z}from"./chunk-B2YN2K4Y.mjs";import{a as ce}from"./chunk-TSXYRZYR.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-75FZNOHX.mjs";import{c as N}from"./chunk-HSBPXEYO.mjs";import{a as C}from"./chunk-GI2BXTON.mjs";import{a as Y}from"./chunk-D7EX7MUQ.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-MS4HJKFQ.mjs";import{a as re}from"./chunk-RQA4GYJ2.mjs";import{a as U}from"./chunk-HX4LWMG4.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-57EKOYML.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-ZHLQ6ML2.mjs.map
1
+ import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-MZHUPMBI.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-NQ33YSHO.mjs";import{a as V}from"./chunk-STLKOXG5.mjs";import{a as ae}from"./chunk-5F6WZKJE.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-QG7HIWZD.mjs";import{a as ge}from"./chunk-G32ZZQZJ.mjs";import{a as g}from"./chunk-6Q6CYYJN.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-I5DX7KW7.mjs";import{a as z}from"./chunk-W4BZ6WZG.mjs";import{a as ce}from"./chunk-GAARIX2L.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-GZLYHVRK.mjs";import{c as N}from"./chunk-2NWOEEMH.mjs";import{a as C}from"./chunk-QY47XP6Y.mjs";import{a as Y}from"./chunk-XMRQCZT4.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-3XSQSLWS.mjs";import{a as re}from"./chunk-C4YMIBIT.mjs";import{a as U}from"./chunk-7N7XGUEI.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-X6QROJDH.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-ZBZA777X.mjs.map
@@ -1,2 +1,2 @@
1
- import{l as n}from"./chunk-75FZNOHX.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
- //# sourceMappingURL=chunk-L53UGE2V.mjs.map
1
+ import{l as n}from"./chunk-GZLYHVRK.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
+ //# sourceMappingURL=chunk-ZMDQIRLX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../__chunks__/chunk-TUY5CCZR.mjs";import"../../__chunks__/chunk-CSBQZF3J.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-57EKOYML.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-DIRAY5XU.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-5UOXJCVE.mjs";export{a as accountFetcher,b as getAccountFromApi};
1
+ import{a,b}from"../../__chunks__/chunk-XVQMJV6B.mjs";import"../../__chunks__/chunk-WKVB6JZV.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-X6QROJDH.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-UAB7GELA.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-6AI6YEYF.mjs";export{a as accountFetcher,b as getAccountFromApi};
2
2
  //# sourceMappingURL=getAccountFromApi.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-C7JC6X43.mjs";import"../../__chunks__/chunk-CSBQZF3J.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-57EKOYML.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-DIRAY5XU.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-5UOXJCVE.mjs";export{a as getScamAddressData};
1
+ import{a}from"../../__chunks__/chunk-HY3UHHJZ.mjs";import"../../__chunks__/chunk-WKVB6JZV.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-X6QROJDH.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-UAB7GELA.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-6AI6YEYF.mjs";export{a as getScamAddressData};
2
2
  //# sourceMappingURL=getScamAddressData.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-CSBQZF3J.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-57EKOYML.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-DIRAY5XU.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-5UOXJCVE.mjs";export{a as getCleanApiAddress};
1
+ import{a}from"../../__chunks__/chunk-WKVB6JZV.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-X6QROJDH.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-UAB7GELA.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-6AI6YEYF.mjs";export{a as getCleanApiAddress};
2
2
  //# sourceMappingURL=getCleanApiAddress.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-WO45TI6N.mjs";import"../../__chunks__/chunk-CSBQZF3J.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-57EKOYML.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-DIRAY5XU.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-5UOXJCVE.mjs";export{a as getGasStationMetadataFromApi};
1
+ import{a}from"../../__chunks__/chunk-WFGN4M73.mjs";import"../../__chunks__/chunk-WKVB6JZV.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-X6QROJDH.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-UAB7GELA.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-6AI6YEYF.mjs";export{a as getGasStationMetadataFromApi};
2
2
  //# sourceMappingURL=getGasStationMetadata.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-YEBTFFUW.mjs";import"../../__chunks__/chunk-CSBQZF3J.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-57EKOYML.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-DIRAY5XU.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-5UOXJCVE.mjs";export{a as getEconomics};
1
+ import{a}from"../../__chunks__/chunk-PL54S5SZ.mjs";import"../../__chunks__/chunk-WKVB6JZV.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-X6QROJDH.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-UAB7GELA.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-6AI6YEYF.mjs";export{a as getEconomics};
2
2
  //# sourceMappingURL=getEconomics.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-2DW7TQJ7.mjs";import"../../__chunks__/chunk-NYZ726DG.mjs";import"../../__chunks__/chunk-SNPF3BD2.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-57EKOYML.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-DIRAY5XU.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-5UOXJCVE.mjs";export{a as getPersistedTokenDetails};
1
+ import{a}from"../../__chunks__/chunk-YVWXI3GJ.mjs";import"../../__chunks__/chunk-NYZ726DG.mjs";import"../../__chunks__/chunk-SNPF3BD2.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-X6QROJDH.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-UAB7GELA.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-6AI6YEYF.mjs";export{a as getPersistedTokenDetails};
2
2
  //# sourceMappingURL=getPersistedTokenDetails.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"../../__chunks__/chunk-N56SMVGU.mjs";import{b as m}from"../../__chunks__/chunk-7VHTZYM2.mjs";import{a as r}from"../../__chunks__/chunk-3FXHIV6O.mjs";import{s as i}from"../../__chunks__/chunk-57EKOYML.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-DIRAY5XU.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{o as s,u as a}from"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-5UOXJCVE.mjs";async function b({tokenId:o}){let t=m(i()),{isNft:k}=r(o),n=o,p=k?s:a;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await c.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as getTokenDetails};
1
+ import{a as c}from"../../__chunks__/chunk-N56SMVGU.mjs";import{b as m}from"../../__chunks__/chunk-7VHTZYM2.mjs";import{a as r}from"../../__chunks__/chunk-3FXHIV6O.mjs";import{s as i}from"../../__chunks__/chunk-X6QROJDH.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-UAB7GELA.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{o as s,u as a}from"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-6AI6YEYF.mjs";async function b({tokenId:o}){let t=m(i()),{isNft:k}=r(o),n=o,p=k?s:a;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await c.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as getTokenDetails};
2
2
  //# sourceMappingURL=getTokenDetails.mjs.map