@multiversx/sdk-dapp 5.6.14 → 5.6.16
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.
- package/out/__chunks__/{chunk-KAY6QD6V.mjs → chunk-23NUXAHF.mjs} +2 -2
- package/out/__chunks__/{chunk-RVW6Z4XY.mjs → chunk-2RAHMAHQ.mjs} +2 -2
- package/out/__chunks__/{chunk-BI2PJ5FS.mjs → chunk-3AZMMFIU.mjs} +2 -2
- package/out/__chunks__/chunk-3LUX7BLO.mjs +2 -0
- package/out/__chunks__/{chunk-TWDQUDRP.mjs → chunk-4K5OAI42.mjs} +2 -2
- package/out/__chunks__/chunk-52TSBBIT.mjs +2 -0
- package/out/__chunks__/{chunk-YTKDRPWM.mjs → chunk-5HGAEMDS.mjs} +2 -2
- package/out/__chunks__/{chunk-RC4ZBXFJ.mjs → chunk-5K6TCZ46.mjs} +2 -2
- package/out/__chunks__/{chunk-YG6SFLZY.mjs → chunk-5UPKPHJ2.mjs} +2 -2
- package/out/__chunks__/chunk-5Z3PJJJG.mjs +2 -0
- package/out/__chunks__/{chunk-NK2JTYOC.mjs → chunk-67XKVYBS.mjs} +2 -2
- package/out/__chunks__/{chunk-XEDB2GXW.mjs → chunk-6CWGXDIH.mjs} +2 -2
- package/out/__chunks__/{chunk-HY5I67W7.mjs → chunk-6JGR42GR.mjs} +2 -2
- package/out/__chunks__/chunk-6K72GWPV.mjs +2 -0
- package/out/__chunks__/{chunk-L6SBIHCZ.mjs → chunk-6MOS734B.mjs} +2 -2
- package/out/__chunks__/chunk-72GVZOXP.mjs +2 -0
- package/out/__chunks__/chunk-7LPZWRM5.mjs +2 -0
- package/out/__chunks__/{chunk-QDUNEKJW.mjs → chunk-7XW6FDWR.mjs} +2 -2
- package/out/__chunks__/{chunk-3VPAVTVL.mjs → chunk-AIX4KC5I.mjs} +2 -2
- package/out/__chunks__/{chunk-YHON33YS.mjs → chunk-ARRFGZVU.mjs} +2 -2
- package/out/__chunks__/{chunk-GOUIWTTC.mjs → chunk-BN6HEM6G.mjs} +2 -2
- package/out/__chunks__/{chunk-EIUQFHRY.mjs → chunk-CXPHKFIO.mjs} +2 -2
- package/out/__chunks__/chunk-CZNMVOTE.mjs +2 -0
- package/out/__chunks__/{chunk-QRPH4JCL.mjs → chunk-DRDUVED6.mjs} +2 -2
- package/out/__chunks__/{chunk-6MBRTWME.mjs → chunk-DYLLFNND.mjs} +2 -2
- package/out/__chunks__/{chunk-YKYYWL4B.mjs → chunk-DZOKHLCE.mjs} +2 -2
- package/out/__chunks__/{chunk-6ECOAQX4.mjs → chunk-EBVPPHXD.mjs} +2 -2
- package/out/__chunks__/{chunk-L7HC5J53.mjs → chunk-EDBF5JW5.mjs} +2 -2
- package/out/__chunks__/{chunk-AU2YBHNW.mjs → chunk-EIYKKF3M.mjs} +2 -2
- package/out/__chunks__/{chunk-UY2X77BA.mjs → chunk-ER3UZZ3N.mjs} +2 -2
- package/out/__chunks__/{chunk-AIBBSVXP.mjs → chunk-EWTGACKQ.mjs} +2 -2
- package/out/__chunks__/{chunk-S72I2KYP.mjs → chunk-EXZ4QLVN.mjs} +2 -2
- package/out/__chunks__/{chunk-OGL4HN2P.mjs → chunk-EZWFRZYN.mjs} +2 -2
- package/out/__chunks__/{chunk-IPGIVRGN.mjs → chunk-G6ZLQ2G3.mjs} +2 -2
- package/out/__chunks__/{chunk-YDH26OGG.mjs → chunk-HL4HLIE5.mjs} +2 -2
- package/out/__chunks__/{chunk-LXSGLYGV.mjs → chunk-IGLH526P.mjs} +2 -2
- package/out/__chunks__/{chunk-VOCZMUMV.mjs → chunk-IL6GXHZS.mjs} +2 -2
- package/out/__chunks__/{chunk-JL6BHC7T.mjs → chunk-IQ4JEYZN.mjs} +2 -2
- package/out/__chunks__/{chunk-CVW52D7K.mjs → chunk-IUC57EHK.mjs} +2 -2
- package/out/__chunks__/chunk-J2AGCQ2K.mjs +2 -0
- package/out/__chunks__/{chunk-LT4RXTTQ.mjs → chunk-JN2FD4HT.mjs} +2 -2
- package/out/__chunks__/{chunk-QWBFB3BL.mjs → chunk-JZUCJMPD.mjs} +2 -2
- package/out/__chunks__/chunk-KN5R5TUO.mjs +2 -0
- package/out/__chunks__/{chunk-DKBOH236.mjs → chunk-KSUOXAPQ.mjs} +2 -2
- package/out/__chunks__/{chunk-CPGY3DQJ.mjs → chunk-KZ45U6FI.mjs} +2 -2
- package/out/__chunks__/{chunk-YAVOCSOD.mjs → chunk-LCJQISJT.mjs} +2 -2
- package/out/__chunks__/{chunk-VSOHM56Y.mjs → chunk-LFGMSYOO.mjs} +2 -2
- package/out/__chunks__/chunk-LJJVV434.mjs +2 -0
- package/out/__chunks__/{chunk-DDRH6O3X.mjs → chunk-LSQTGMWH.mjs} +2 -2
- package/out/__chunks__/{chunk-ZMZXHLYM.mjs → chunk-MC3TSFCJ.mjs} +2 -2
- package/out/__chunks__/{chunk-EJ4TUIIU.mjs → chunk-MWGEADCR.mjs} +2 -2
- package/out/__chunks__/{chunk-YXKQJKZV.mjs → chunk-NESRAOKG.mjs} +2 -2
- package/out/__chunks__/chunk-NGZ4MN3D.mjs +2 -0
- package/out/__chunks__/{chunk-YDR33UBM.mjs.map → chunk-NGZ4MN3D.mjs.map} +1 -1
- package/out/__chunks__/{chunk-QNXBITGY.mjs → chunk-O7YBYBL6.mjs} +2 -2
- package/out/__chunks__/{chunk-ZLGDFBX7.mjs → chunk-ONZCN65M.mjs} +2 -2
- package/out/__chunks__/{chunk-LYUGR2FR.mjs → chunk-OSOXJQ7L.mjs} +2 -2
- package/out/__chunks__/{chunk-Z72NFBTZ.mjs → chunk-OUKVNDTO.mjs} +2 -2
- package/out/__chunks__/{chunk-MFGDF3HI.mjs → chunk-PG2AWYWU.mjs} +2 -2
- package/out/__chunks__/{chunk-4IM7MMSB.mjs → chunk-PGDYOMKM.mjs} +2 -2
- package/out/__chunks__/{chunk-VCU3YP4J.mjs → chunk-PHZM3DZQ.mjs} +2 -2
- package/out/__chunks__/{chunk-QWVZ4NTR.mjs → chunk-PNSPGKFK.mjs} +2 -2
- package/out/__chunks__/{chunk-LJ5RLWEK.mjs → chunk-PVD6WIOT.mjs} +2 -2
- package/out/__chunks__/chunk-QLBLLXSR.mjs +2 -0
- package/out/__chunks__/{chunk-RNK62S6X.mjs → chunk-R6QS4YSC.mjs} +2 -2
- package/out/__chunks__/{chunk-WDL6SFHR.mjs → chunk-R7VIYF22.mjs} +2 -2
- package/out/__chunks__/{chunk-AQIZZ6YU.mjs → chunk-RELUCG4Q.mjs} +2 -2
- package/out/__chunks__/{chunk-FLFZN2T6.mjs → chunk-RHQNMUZP.mjs} +2 -2
- package/out/__chunks__/{chunk-B4WJMVF6.mjs → chunk-SLRWSVMJ.mjs} +2 -2
- package/out/__chunks__/{chunk-GPKU7JO2.mjs → chunk-SNMXP45N.mjs} +2 -2
- package/out/__chunks__/{chunk-GP6W6RR7.mjs → chunk-SWKXLTUP.mjs} +2 -2
- package/out/__chunks__/{chunk-UUFVP7SB.mjs → chunk-T7WRX2RA.mjs} +2 -2
- package/out/__chunks__/{chunk-F3PJPNGU.mjs → chunk-TMS5L2BX.mjs} +2 -2
- package/out/__chunks__/{chunk-C23VOAOY.mjs → chunk-TTKTNM5I.mjs} +2 -2
- package/out/__chunks__/{chunk-6UTLNODT.mjs → chunk-U53CQSS6.mjs} +2 -2
- package/out/__chunks__/{chunk-UDWPAR25.mjs → chunk-U5KHQ72A.mjs} +2 -2
- package/out/__chunks__/{chunk-V6HSYMMG.mjs → chunk-UOOERNTG.mjs} +2 -2
- package/out/__chunks__/{chunk-N6G3CMSC.mjs → chunk-URXZDOGS.mjs} +2 -2
- package/out/__chunks__/{chunk-TIX7PAYC.mjs → chunk-VCJHSHAR.mjs} +2 -2
- package/out/__chunks__/chunk-VK2YHJXJ.mjs +2 -0
- package/out/__chunks__/{chunk-VLRP4JQW.mjs → chunk-VR3G4SRA.mjs} +2 -2
- package/out/__chunks__/chunk-WBTUSJNL.mjs +2 -0
- package/out/__chunks__/{chunk-SWIPPQAS.mjs → chunk-WOVX745N.mjs} +2 -2
- package/out/__chunks__/{chunk-G2WU3X6R.mjs → chunk-WQYSQ4EF.mjs} +2 -2
- package/out/__chunks__/chunk-WYLU3B54.mjs +2 -0
- package/out/__chunks__/{chunk-CYA7ED2N.mjs → chunk-YW5OBEEO.mjs} +2 -2
- package/out/__chunks__/{chunk-CDU3ZELH.mjs → chunk-Z5QHVSVU.mjs} +2 -2
- package/out/__chunks__/{chunk-5NRAQWO4.mjs → chunk-Z7CZ3JPV.mjs} +2 -2
- package/out/__chunks__/{chunk-HPY6UNFO.mjs → chunk-ZXTGV6LH.mjs} +2 -2
- package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/economics/getEconomics.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/fetchAccount.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/package.json +2 -2
- package/out/__chunks__/chunk-22F6NHUW.mjs +0 -2
- package/out/__chunks__/chunk-365NUVE7.mjs +0 -2
- package/out/__chunks__/chunk-4FBGOTSX.mjs +0 -2
- package/out/__chunks__/chunk-DDS3DY4B.mjs +0 -2
- package/out/__chunks__/chunk-GJSAN3GO.mjs +0 -2
- package/out/__chunks__/chunk-JAXSTKEJ.mjs +0 -2
- package/out/__chunks__/chunk-LLVSK2AG.mjs +0 -2
- package/out/__chunks__/chunk-RFGBMNFA.mjs +0 -2
- package/out/__chunks__/chunk-SML7WOGP.mjs +0 -2
- package/out/__chunks__/chunk-SVG75M4S.mjs +0 -2
- package/out/__chunks__/chunk-UJA73JSW.mjs +0 -2
- package/out/__chunks__/chunk-UWBYA2GM.mjs +0 -2
- package/out/__chunks__/chunk-VA7KLP35.mjs +0 -2
- package/out/__chunks__/chunk-XELB2AVG.mjs +0 -2
- package/out/__chunks__/chunk-YDR33UBM.mjs +0 -2
- /package/out/__chunks__/{chunk-KAY6QD6V.mjs.map → chunk-23NUXAHF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RVW6Z4XY.mjs.map → chunk-2RAHMAHQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BI2PJ5FS.mjs.map → chunk-3AZMMFIU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UJA73JSW.mjs.map → chunk-3LUX7BLO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TWDQUDRP.mjs.map → chunk-4K5OAI42.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GJSAN3GO.mjs.map → chunk-52TSBBIT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YTKDRPWM.mjs.map → chunk-5HGAEMDS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RC4ZBXFJ.mjs.map → chunk-5K6TCZ46.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YG6SFLZY.mjs.map → chunk-5UPKPHJ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RFGBMNFA.mjs.map → chunk-5Z3PJJJG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NK2JTYOC.mjs.map → chunk-67XKVYBS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XEDB2GXW.mjs.map → chunk-6CWGXDIH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HY5I67W7.mjs.map → chunk-6JGR42GR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SML7WOGP.mjs.map → chunk-6K72GWPV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L6SBIHCZ.mjs.map → chunk-6MOS734B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DDS3DY4B.mjs.map → chunk-72GVZOXP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SVG75M4S.mjs.map → chunk-7LPZWRM5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QDUNEKJW.mjs.map → chunk-7XW6FDWR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3VPAVTVL.mjs.map → chunk-AIX4KC5I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YHON33YS.mjs.map → chunk-ARRFGZVU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GOUIWTTC.mjs.map → chunk-BN6HEM6G.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EIUQFHRY.mjs.map → chunk-CXPHKFIO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-22F6NHUW.mjs.map → chunk-CZNMVOTE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QRPH4JCL.mjs.map → chunk-DRDUVED6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6MBRTWME.mjs.map → chunk-DYLLFNND.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YKYYWL4B.mjs.map → chunk-DZOKHLCE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6ECOAQX4.mjs.map → chunk-EBVPPHXD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L7HC5J53.mjs.map → chunk-EDBF5JW5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AU2YBHNW.mjs.map → chunk-EIYKKF3M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UY2X77BA.mjs.map → chunk-ER3UZZ3N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AIBBSVXP.mjs.map → chunk-EWTGACKQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S72I2KYP.mjs.map → chunk-EXZ4QLVN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OGL4HN2P.mjs.map → chunk-EZWFRZYN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IPGIVRGN.mjs.map → chunk-G6ZLQ2G3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YDH26OGG.mjs.map → chunk-HL4HLIE5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LXSGLYGV.mjs.map → chunk-IGLH526P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VOCZMUMV.mjs.map → chunk-IL6GXHZS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JL6BHC7T.mjs.map → chunk-IQ4JEYZN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CVW52D7K.mjs.map → chunk-IUC57EHK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JAXSTKEJ.mjs.map → chunk-J2AGCQ2K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LT4RXTTQ.mjs.map → chunk-JN2FD4HT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QWBFB3BL.mjs.map → chunk-JZUCJMPD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XELB2AVG.mjs.map → chunk-KN5R5TUO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DKBOH236.mjs.map → chunk-KSUOXAPQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CPGY3DQJ.mjs.map → chunk-KZ45U6FI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YAVOCSOD.mjs.map → chunk-LCJQISJT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VSOHM56Y.mjs.map → chunk-LFGMSYOO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VA7KLP35.mjs.map → chunk-LJJVV434.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DDRH6O3X.mjs.map → chunk-LSQTGMWH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZMZXHLYM.mjs.map → chunk-MC3TSFCJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EJ4TUIIU.mjs.map → chunk-MWGEADCR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YXKQJKZV.mjs.map → chunk-NESRAOKG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QNXBITGY.mjs.map → chunk-O7YBYBL6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZLGDFBX7.mjs.map → chunk-ONZCN65M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LYUGR2FR.mjs.map → chunk-OSOXJQ7L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z72NFBTZ.mjs.map → chunk-OUKVNDTO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MFGDF3HI.mjs.map → chunk-PG2AWYWU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4IM7MMSB.mjs.map → chunk-PGDYOMKM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VCU3YP4J.mjs.map → chunk-PHZM3DZQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QWVZ4NTR.mjs.map → chunk-PNSPGKFK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LJ5RLWEK.mjs.map → chunk-PVD6WIOT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-365NUVE7.mjs.map → chunk-QLBLLXSR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RNK62S6X.mjs.map → chunk-R6QS4YSC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WDL6SFHR.mjs.map → chunk-R7VIYF22.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AQIZZ6YU.mjs.map → chunk-RELUCG4Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FLFZN2T6.mjs.map → chunk-RHQNMUZP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B4WJMVF6.mjs.map → chunk-SLRWSVMJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GPKU7JO2.mjs.map → chunk-SNMXP45N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GP6W6RR7.mjs.map → chunk-SWKXLTUP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UUFVP7SB.mjs.map → chunk-T7WRX2RA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F3PJPNGU.mjs.map → chunk-TMS5L2BX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C23VOAOY.mjs.map → chunk-TTKTNM5I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6UTLNODT.mjs.map → chunk-U53CQSS6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UDWPAR25.mjs.map → chunk-U5KHQ72A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V6HSYMMG.mjs.map → chunk-UOOERNTG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N6G3CMSC.mjs.map → chunk-URXZDOGS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TIX7PAYC.mjs.map → chunk-VCJHSHAR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4FBGOTSX.mjs.map → chunk-VK2YHJXJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VLRP4JQW.mjs.map → chunk-VR3G4SRA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UWBYA2GM.mjs.map → chunk-WBTUSJNL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SWIPPQAS.mjs.map → chunk-WOVX745N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G2WU3X6R.mjs.map → chunk-WQYSQ4EF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LLVSK2AG.mjs.map → chunk-WYLU3B54.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CYA7ED2N.mjs.map → chunk-YW5OBEEO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CDU3ZELH.mjs.map → chunk-Z5QHVSVU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5NRAQWO4.mjs.map → chunk-Z7CZ3JPV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HPY6UNFO.mjs.map → chunk-ZXTGV6LH.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-EBVPPHXD.mjs";import{a as p}from"./chunk-67XKVYBS.mjs";import{a as m}from"./chunk-EZWFRZYN.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-WBTUSJNL.mjs";import{b as a}from"./chunk-VCJHSHAR.mjs";import{f as i}from"./chunk-LFGMSYOO.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-23NUXAHF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-Z7CZ3JPV.mjs";var r=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.eventHandlers=new Map;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n);let s=this.eventHandlers.get(t)||[];s.push(e),this.eventHandlers.set(t,s)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}clearEventHandlers(t=Array.from(this.unsubscribeFunctions.keys())){t.forEach(e=>{(this.unsubscribeFunctions.get(e)||[]).forEach(n=>n()),this.unsubscribeFunctions.delete(e),this.eventHandlers.delete(e)})}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventHandlers.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}getEventHandlers(t){return this.eventHandlers.get(t)||[]}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await a.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2RAHMAHQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-NGZ4MN3D.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
|
|
2
|
+
//# sourceMappingURL=chunk-3AZMMFIU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as t}from"./chunk-LFGMSYOO.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},l=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},s=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,{type:"clearCache",payload:{value:null}})};export{r as a,l as b,s as c};
|
|
2
|
+
//# sourceMappingURL=chunk-4K5OAI42.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-LFGMSYOO.mjs";import{a as l}from"./chunk-SQVKVA7X.mjs";var e=o=>u().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...l,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await c(a),f=r.roundDuration?null:await w(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-5HGAEMDS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-SLRWSVMJ.mjs";import{a as e}from"./chunk-72GVZOXP.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-LFGMSYOO.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5K6TCZ46.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-KN5R5TUO.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-LFGMSYOO.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5UPKPHJ2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-EZWFRZYN.mjs";import{a as g}from"./chunk-YJCTRUJT.mjs";import{a as f}from"./chunk-2JKCBTYK.mjs";import{BigNumber as p}from"bignumber.js";async function b({manager:e,provider:s,login:a,token:u,explorerAddress:m,authData:x}){let o={manager:e,provider:s};return await new Promise(async function(A,I){async function d(t){let r=e?e.addressesPerPage??1:1,l=new p(t-1).times(r);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await n(o)}async function c(t){if(!(!s||!a)){e?.updateConfirmScreen({...x,selectedAddress:t.selectedAddress,explorerLink:g({to:`/${f}/${t.selectedAddress}`,explorerAddress:m})});try{let r=u?await s.tokenLogin({token:Buffer.from(`${u}{}`),addressIndex:t.addressIndex}):await a({addressIndex:t.addressIndex});e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),A({address:r.address,signature:r.signature?r.signature.toString("hex"):"",addressIndex:t.addressIndex})}catch(r){console.error("User rejected login:",r),!!e?.getConfirmScreenData()&&await n(o)}}}async function i(){await n(o),e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),I("User cancelled login")}e.subscribeToAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d})})}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-67XKVYBS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-3AZMMFIU.mjs";import{a as r}from"./chunk-WYLU3B54.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6CWGXDIH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-ZXTGV6LH.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
|
|
2
|
+
//# sourceMappingURL=chunk-6JGR42GR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-LFGMSYOO.mjs";import{a as o}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=i(e());return{origin:t?.origin||o().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6MOS734B.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-2RAHMAHQ.mjs";import{a as t}from"./chunk-6K72GWPV.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-7XW6FDWR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-LFGMSYOO.mjs";var r=e=>n().setState(({config:t})=>{t.nativeAuthConfig=e},!1,{type:"setNativeAuthConfig",payload:{value:e}}),c=e=>n().setState(({config:t})=>{t.websocketStatus=e},!1,{type:"setWebsocketStatus",payload:{value:e}}),C=e=>n().setState(({config:t})=>{if(e){let l=e.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,a=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:a,walletConnectV2RelayAddress:l}}else t.walletConnectConfig=null},!1,{type:"setWalletConnectConfig",payload:{value:e}}),f=e=>n().setState(({config:t})=>{t.settings=e},!1,{type:"setProviderSettings",payload:{value:e}}),g=e=>n().setState(({config:t})=>{t.settings||(t.settings={}),t.settings.isSigningUiEnabled=e},!1,{type:"setIsSigningUiEnabled",payload:{value:e}});export{r as a,c as b,C as c,f as d,g as e};
|
|
2
|
+
//# sourceMappingURL=chunk-AIX4KC5I.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Z}from"./chunk-DZOKHLCE.mjs";import{a as Q}from"./chunk-6UZHM5LW.mjs";import{c as W}from"./chunk-RELUCG4Q.mjs";import{a as rt}from"./chunk-EIYKKF3M.mjs";import{a as tt}from"./chunk-52TSBBIT.mjs";import{a as et}from"./chunk-NESRAOKG.mjs";import{a as nt}from"./chunk-LCJQISJT.mjs";import{a as ot}from"./chunk-ABBDCZHP.mjs";import{a as mt}from"./chunk-4ODPAHHA.mjs";import{a as at}from"./chunk-UOOERNTG.mjs";import{a as st}from"./chunk-J2AGCQ2K.mjs";import{a as ut}from"./chunk-DRDUVED6.mjs";import{a as M}from"./chunk-O7YBYBL6.mjs";import{a as ct}from"./chunk-OSOXJQ7L.mjs";import{b as A}from"./chunk-WQYSQ4EF.mjs";import{c as O}from"./chunk-3AZMMFIU.mjs";import{a as d}from"./chunk-5Z3PJJJG.mjs";import{a as J}from"./chunk-72GVZOXP.mjs";import{a as w}from"./chunk-PVD6WIOT.mjs";import{a as P,f as X}from"./chunk-VCJHSHAR.mjs";import{b as it}from"./chunk-SWKXLTUP.mjs";import{b as k}from"./chunk-RHQNMUZP.mjs";import{b as S}from"./chunk-V5ZSFCKJ.mjs";import{a as Y}from"./chunk-KN5R5TUO.mjs";import{a as _}from"./chunk-T7WRX2RA.mjs";import{a as y}from"./chunk-BSA3IGL6.mjs";import{a as j}from"./chunk-NWRCQLFI.mjs";import{a as b}from"./chunk-QLBLLXSR.mjs";import{a as L}from"./chunk-HORSXVIV.mjs";import{b as G}from"./chunk-NGM3AVCY.mjs";import{a as K,b as q,q as v,s as l}from"./chunk-LFGMSYOO.mjs";import{c as V,d as $,f as H}from"./chunk-FK6DWWZF.mjs";import{b as f}from"./chunk-VNLGNNIL.mjs";import{b as B}from"./chunk-2AJ5KJ2V.mjs";import{a as h}from"./chunk-LJX4MW7B.mjs";import{b as D,c as F,f as z}from"./chunk-DA76AK4I.mjs";import U from"bignumber.js";var Lt=async()=>{try{let o=J(),{network:e}=d();try{let t=await b({address:o,baseURL:e.apiAddress});if(t!=null){let n={...t,username:L(t.username),nonce:w(t)};return P(n),n}}catch(t){console.error("Failed getting account ",t)}}catch(o){console.error("Failed getting address ",o)}return null};async function I(){let o=T();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await Lt():void 0}catch(e){console.error("Failed initializing provider ",e)}}async function gt({sessionId:o,transactionBatch:e,isSequential:t}){try{if(e==null)return;let n=tt(),r=ot(e),i=await Z(r);for(let g of i)await et({serverTransaction:g,sessionId:o,isSequential:t});if(!i.every(g=>g.status!=="pending"))return;n&&await I();let{transactions:c}=l(),s=c?.[o];if(s.transactions.every(g=>g.status==="success"))return k({sessionId:o,status:"success"});if(s.transactions.some(g=>g.status==="fail"))return k({sessionId:o,status:"fail"});if(s.transactions.every(g=>g.status==="not executed"))return k({sessionId:o,status:"invalid"})}catch(n){console.error(n)}}async function pt(){let o=G(l()),e=Object.entries(o);e.length!==0&&await Promise.all(e.map(([t,{transactions:n}])=>gt({sessionId:t,transactionBatch:n})))}async function x(){let o=v(),e=nt(),t=null,n=$(o.getState())?.timestamp??null,r=async()=>{try{await pt()}catch(a){console.error("[trackTransactions] Error checking transaction status:",a)}},i=()=>{t||(t=setInterval(r,e))},p=()=>{t&&(clearInterval(t),t=null)},c=()=>{p();let a=o.subscribe(({account:{websocketEvent:m}})=>{m?.message&&m.timestamp!=null&&n!==m.timestamp&&(n=m.timestamp,r())});O.set("websocketEventReceived",a)};r();let s=()=>{p()},u=o.subscribe(({account:{address:a},config:{websocketStatus:m}},g)=>{if(g.config.websocketStatus!==m)switch(m){case"completed":c();break;case"pending":i();break;default:a?i():s();break}});return O.set("websocketStatusChanged",u),{stopTransactionsTracking:s}}async function N({address:o,provider:e,apiAddress:t}){let n=await b({address:o,baseURL:t});if(!n)throw new Error("Account not found");it({address:o,providerType:e.getType()});let r={...n,username:L(n.username),nonce:w(n)};P(r),await A(o),x(),n.shard!=null&&await rt({shard:Number(n.shard),apiAddress:t})}async function lt({provider:o,nativeAuthConfig:e,token:t}){let{network:{apiAddress:n}}=d(),r=_(e),i=t;i||(i=await r.initialize({noCache:!0}));let p=await o.login({token:i}),{address:c,signature:s,...u}=p;if(!c)return console.warn("Login cancelled."),null;if(!s)return console.error("Failed to sign login token"),null;let a=j(u?.accessToken),m=await at({loginData:p,nativeAuthConfig:e,loginToken:i}),g=a?u.accessToken:r.getToken({address:c,token:m,signature:s});q({loginToken:i,signature:s,nativeAuthToken:g});let C=await st({loginToken:i,extraInfoData:{multisig:u?.multisig,impersonate:u?.impersonate},address:c});return await N({address:C,provider:o,apiAddress:n}),{address:C,signature:s}}async function dt(o){let{network:{apiAddress:e}}=d();await o.login();let t=await o.getAddress();if(!t)throw new Error("Address not found");return await N({address:t,provider:o,apiAddress:e}),{address:t}}async function ft(o,e){let t=S(l());if(t)return await lt({provider:o,nativeAuthConfig:t,token:e?.token});let{address:n}=await dt(o);return await A(n),x(),{address:n,signature:""}}async function Tt({provider:o,transactions:e,options:t={}}){await I();let{isGuarded:n,activeGuardianAddress:r,nonce:i}=Y(),p=o.getType()===h.ledger,c=mt({latestNonce:i,transactions:e}),s=r&&n&&!t.skipGuardian?c?.map(a=>(a.version=D.withTxOptions().valueOf(),a.options=F.withOptions({guarded:!0,...p?{hashSign:!0}:{}}).valueOf(),a.guardian=z.newFromBech32(r),a)):c,u=await o.signTransactions(s,t)??[];return X(i+u.length),u}var E=class{constructor(e){this._isLoggingOut=!1;this.provider=e}init(){return this.provider.init()}async login(e){let t=await ft(this.provider,e);return K(this.provider.getType()),ht(this),R.getInstance().init(),t}isInitialized(){return this.provider.isInitialized()}async logout(e={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let t=await ct({provider:this.provider,options:e});return this._isLoggingOut=!1,t}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(e,t){try{return await Tt({provider:this.provider,transactions:e,options:t})}catch(n){let r=M(n);throw new Error(r)}}async signMessage(e,t){try{return await ut({provider:this.provider,message:e,options:t})}catch(n){let r=M(n,"warning");throw new Error(r)}}cancelLogin(){this.provider.cancelLogin?.()}};var vt=null;function ht(o){vt=o}function T(){return vt||new E(B)}var R=class o{constructor(){this.store=v();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let e=this.store.getState(),t=f(e),{isExpired:n}=y(t?.nativeAuthToken);n?T().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let e=this.store.getState(),t=f(e),n=H(e);return!!(t?.nativeAuthToken&&n)};this.addPlannedLogout=()=>{let e=T(),t=V(this.store.getState()),n=e.getType()===h.webview;if(!t||n)return;this.addLogoutWarning();let r=f(this.store.getState()),{secondsUntilExpires:i,expiresAt:p}=y(r?.nativeAuthToken),c=new U(String(i)),s=`${t}_${p}`,u=this.plannedLogoutKey===s;if(!(i&&c.isGreaterThan(0))||u)return;this.plannedLogoutKey=s,clearTimeout(this.plannedLogoutTimeoutRef??0);let m=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},m.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{e.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},m.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let e=S(this.store.getState()),t=f(this.store.getState()),{secondsUntilExpires:n}=y(t?.nativeAuthToken),r=new U(String(n)),i=r.times(1e3);if(!n||r.isLessThanOrEqualTo(0)||!e?.tokenExpirationToastWarningSeconds)return;let c=new U(e?.tokenExpirationToastWarningSeconds??0).times(1e3),s=r.times(1e3).minus(c),u=Q(i.toNumber()),a=s.isLessThanOrEqualTo(0)?0:s.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${u}!`}),this.warningLogoutTimeoutRef=null},a)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};export{R as a,gt as b,pt as c,x as d,N as e,lt as f,dt as g,ft as h,Tt as i,E as j,ht as k,T as l,I as m};
|
|
2
|
+
//# sourceMappingURL=chunk-ARRFGZVU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as t}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as t}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-LFGMSYOO.mjs";import{y as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";var c=async(s,a={apiAddress:""})=>{let{data:o}=await i.get(`${a.apiAddress||t(r())}/${e}`,{params:{hashes:s.join(","),withScResults:!0}});return o};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BN6HEM6G.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-G6ZLQ2G3.mjs";import{k as d}from"./chunk-ARRFGZVU.mjs";import{s as a}from"./chunk-LFGMSYOO.mjs";import{d as n}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as s}from"./chunk-YW5OBEEO.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-CXPHKFIO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-72GVZOXP.mjs";import{f as e,g as s}from"./chunk-DA76AK4I.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DRDUVED6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-T7WRX2RA.mjs";import{a as o}from"./chunk-HSF3JATH.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DYLLFNND.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-BN6HEM6G.mjs";var T=async a=>{let n=a.map(s=>s.hash),r=await e(n);return a.map(s=>{let t=r.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DZOKHLCE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-2RAHMAHQ.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a),this.resetData())}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EBVPPHXD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-4K5OAI42.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-CZNMVOTE.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-LFGMSYOO.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??h(),o=[],i=[];if(r.forEach(s=>{let e=S(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=u({transaction:s,address:T(t),explorerAddress:l(t),egldLabel:f(t)});e.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EDBF5JW5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-EXZ4QLVN.mjs";import{b as r}from"./chunk-5HGAEMDS.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-LFGMSYOO.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=i(o());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EIYKKF3M.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-ARRFGZVU.mjs";import{a as g}from"./chunk-52TSBBIT.mjs";import{s as e}from"./chunk-LFGMSYOO.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-ER3UZZ3N.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-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-LFGMSYOO.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EWTGACKQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-ZXTGV6LH.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EXZ4QLVN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as I}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as I}from"./chunk-PGDYOMKM.mjs";import{a as h}from"./chunk-5Z3PJJJG.mjs";import{a as x}from"./chunk-QLBLLXSR.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{f as g}from"./chunk-PJWJZHIS.mjs";import{a as f,f as b}from"./chunk-DA76AK4I.mjs";import y from"bignumber.js";var M=async({manager:e,provider:u})=>{let L=new f;if(!e||!u)throw new Error("Provider is not initialized.");let{network:l}=h(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await I({baseURL:l.apiAddress}),A=o=>o.index>=s&&o.index<s+e.addressesPerPage,O=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),p=r.filter(A),P=!!O[s];if(e.updateAccountScreen({isLoading:!P}),p.length>0){e.updateAccountScreen({accounts:p});return}try{let o=Math.floor(s/e.addressesPerPage),n=await u.getAccounts(o,e.addressesPerPage),S=n.map((t,c)=>{let i=L.getShardOfAddress(b.newFromBech32(t));return{address:t,balance:"...",index:c+s,shard:i}}),j=[...r,...S],B=n.map(t=>x({address:t,baseURL:l.apiAddress})),U=await Promise.all(B),d=j.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});U.forEach(t=>{if(!t||!a||!a.price)return;let c=new y(t.balance),i=c.dividedBy(y(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let N=w({amount:g({input:t.balance}),usd:a?.price});d[t.address].balance=i,d[t.address].usdValue=N});let m=Object.values(d).sort((t,c)=>t.index-c.index),E=m.filter(A);e.updateAllAccounts(m),e.updateAccountScreen({accounts:E,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EZWFRZYN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-VOCZMUMV.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-KAY6QD6V.mjs";import{a as V}from"./chunk-6ECOAQX4.mjs";import{a as ae}from"./chunk-N6G3CMSC.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-UY2X77BA.mjs";import{a as ge}from"./chunk-CPGY3DQJ.mjs";import{a as g}from"./chunk-RC4ZBXFJ.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-B4WJMVF6.mjs";import{a as z}from"./chunk-6UTLNODT.mjs";import{a as ce}from"./chunk-YG6SFLZY.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-YHON33YS.mjs";import{c as N}from"./chunk-AQIZZ6YU.mjs";import{a as C}from"./chunk-GJSAN3GO.mjs";import{a as Y}from"./chunk-DDS3DY4B.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-DKBOH236.mjs";import{a as re}from"./chunk-GP6W6RR7.mjs";import{a as U}from"./chunk-SML7WOGP.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-VSOHM56Y.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-
|
|
1
|
+
import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-IL6GXHZS.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-23NUXAHF.mjs";import{a as V}from"./chunk-EBVPPHXD.mjs";import{a as ae}from"./chunk-URXZDOGS.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-ER3UZZ3N.mjs";import{a as ge}from"./chunk-KZ45U6FI.mjs";import{a as g}from"./chunk-5K6TCZ46.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-SLRWSVMJ.mjs";import{a as z}from"./chunk-U53CQSS6.mjs";import{a as ce}from"./chunk-5UPKPHJ2.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-ARRFGZVU.mjs";import{c as N}from"./chunk-RELUCG4Q.mjs";import{a as C}from"./chunk-52TSBBIT.mjs";import{a as Y}from"./chunk-72GVZOXP.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-KSUOXAPQ.mjs";import{a as re}from"./chunk-SWKXLTUP.mjs";import{a as U}from"./chunk-6K72GWPV.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-LFGMSYOO.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-G6ZLQ2G3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-EWTGACKQ.mjs";import{a as c}from"./chunk-O5PAMBB3.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HL4HLIE5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-DYLLFNND.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-IGLH526P.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-2RAHMAHQ.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}get walletConnectData(){return{...this.data}}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IL6GXHZS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-NGZ4MN3D.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IQ4JEYZN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-U3UMCTU6.mjs";import{a as T}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-U3UMCTU6.mjs";import{a as T}from"./chunk-HL4HLIE5.mjs";import{a as p}from"./chunk-TWOVGGG2.mjs";import{a as i}from"./chunk-M3F2J3PW.mjs";import{a as k}from"./chunk-HYPARWQN.mjs";import{a as l}from"./chunk-YJCTRUJT.mjs";import{c as m}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-OQURAWR4.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:f}){let h=f.map(e=>k({address:v,explorerAddress:a,transaction:e}));return await Promise.all(h.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await T({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=p({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=u.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??m,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:l({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IUC57EHK.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-IGLH526P.mjs";import{c as n}from"./chunk-LFGMSYOO.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-J2AGCQ2K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-6MOS734B.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JN2FD4HT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s,d as i,h as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s,d as i,h as o}from"./chunk-KSUOXAPQ.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JZUCJMPD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-NJN53MJV.mjs";import{a as l}from"./chunk-YSCND2MX.mjs";import{q as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-NJN53MJV.mjs";import{a as l}from"./chunk-YSCND2MX.mjs";import{q as n}from"./chunk-LFGMSYOO.mjs";var c={},u={},p=(t,o)=>{n().setState(({toasts:s})=>{let a=s.customToasts.length>0?Math.max(...s.customToasts.map(m=>parseInt(m.toastId.split("-").pop()??"0"))):0,e=o??`custom-toast-${a+1}`,T=s.customToasts.findIndex(m=>m.toastId===e),i={...t,toastId:e};if(T!==-1){s.customToasts[T]=i;return}s.customToasts.push({...i,toastId:e})},!1,{type:"addCustomToast",payload:{value:{customToast:t,currentToastId:o}}})},C=t=>{n().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(s=>s.toastId!==t)},!1,{type:"removeCustomToast",payload:{value:t}})},I=()=>{n().setState(({toasts:t})=>{t.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},f=()=>{n().setState(({toasts:t})=>{t.transactionToasts=[]},!1,{type:"removeAllTransactionToasts",payload:{value:null}})},g=({toastId:t,totalDuration:o})=>{let s="";return n().setState(({toasts:a})=>{let e=a.transactionToasts.length>0?Math.max(...a.transactionToasts.map(T=>parseInt(T.toastId.split("-").pop()??"0"))):0;s=t??`transaction-toast-${e+1}`,a.transactionToasts.push({startTime:l(),endTime:r(o),toastId:s})},!1,{type:"addTransactionToast",payload:{value:{toastId:t,totalDuration:o}}}),s},v=t=>{n().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(s=>s.toastId!==t)},!1,{type:"removeTransactionToast",payload:{value:t}}),delete u[t],delete c[t]},h=t=>{let{toasts:o}=n().getState(),s=o.customToasts.length>0?Math.max(...o.customToasts.map(e=>parseInt(e.toastId.split("-").pop()??"0"))):0,a=t.toastId||`custom-toast-${s+1}`;return t.onClose&&(u[a]=t.onClose),t.instantiateToastElement?(c[a]=t.instantiateToastElement,n().setState(({toasts:e})=>{let T=e.customToasts.findIndex(m=>m.toastId===a),i={...t,instantiateToastElement:null,toastId:a};T!==-1?e.customToasts[T]=i:e.customToasts.push(i)},!1,{type:"createCustomToast",payload:{value:t}}),a):(p(t,a),a)};export{c as a,u as b,p as c,C as d,I as e,f,g,v as h,h as i};
|
|
2
|
+
//# sourceMappingURL=chunk-KSUOXAPQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-5K6TCZ46.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-NGZ4MN3D.mjs";import{WebviewProvider as d}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var a=class extends n{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(r,i)=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(t){throw this.cancelAction(),t}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=d.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return s.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(o);return this.address&&this.setAccount({address:this.address}),r}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-KZ45U6FI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-LFGMSYOO.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LCJQISJT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as u,b as S}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as u,b as S}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-WYLU3B54.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=u};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),r=s(e),{address:i,publicKey:D}=p(e);if(i&&D!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A,!1,{type:"logoutMiddleware",payload:{value:null}}))};var M=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:S(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(M),t},n,z=e=>{n=e},o=()=>(n||z(W(()=>new k)),n),Se=(e=I)=>{let t=W(e);return z(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,M as n,W as o,z as p,o as q,Se as r,de as s};
|
|
2
|
+
//# sourceMappingURL=chunk-LFGMSYOO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-U5KHQ72A.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-RHQNMUZP.mjs";import{s as n}from"./chunk-LFGMSYOO.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LSQTGMWH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as c}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as c}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-G6ZLQ2G3.mjs";import{a as s}from"./chunk-7XW6FDWR.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as a}from"./chunk-LFGMSYOO.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-MC3TSFCJ.mjs.map
|