@multiversx/sdk-dapp 5.6.4 → 5.6.6
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-B3GK3USO.mjs → chunk-2FEH3E6U.mjs} +2 -2
- package/out/__chunks__/{chunk-57ZAVLGR.mjs → chunk-35TLBLLZ.mjs} +2 -2
- package/out/__chunks__/{chunk-JDGCC7Y3.mjs → chunk-3B7DG5PU.mjs} +2 -2
- package/out/__chunks__/{chunk-LZ2FW6LV.mjs → chunk-4AOBQXI3.mjs} +2 -2
- package/out/__chunks__/{chunk-2ZEPX7P4.mjs → chunk-4EAIQB7E.mjs} +2 -2
- package/out/__chunks__/chunk-4G4G7FVT.mjs +2 -0
- package/out/__chunks__/{chunk-672HKIHY.mjs → chunk-4P6KVGFJ.mjs} +2 -2
- package/out/__chunks__/{chunk-KQ5DJCR3.mjs → chunk-4UNMUVTO.mjs} +2 -2
- package/out/__chunks__/{chunk-AJZGZTQQ.mjs → chunk-4W5VY3GO.mjs} +2 -2
- package/out/__chunks__/{chunk-IW4ENRTD.mjs → chunk-676U6OTI.mjs} +2 -2
- package/out/__chunks__/{chunk-Z2SUVJOJ.mjs → chunk-6B2GHZDF.mjs} +2 -2
- package/out/__chunks__/{chunk-PKCRQGFT.mjs → chunk-6PHKMRFV.mjs} +2 -2
- package/out/__chunks__/{chunk-74F3UX4H.mjs → chunk-7YCD5466.mjs} +2 -2
- package/out/__chunks__/{chunk-NRADHAQW.mjs → chunk-7ZU5KDF4.mjs} +2 -2
- package/out/__chunks__/chunk-AWODPMKF.mjs +2 -0
- package/out/__chunks__/{chunk-JLLWKFXE.mjs → chunk-B3PQJ4WY.mjs} +2 -2
- package/out/__chunks__/{chunk-KRCTOTPM.mjs → chunk-B7CFQZKI.mjs} +2 -2
- package/out/__chunks__/{chunk-YEKA6Y6E.mjs → chunk-BAWT2YA7.mjs} +2 -2
- package/out/__chunks__/{chunk-ZAKGTEKO.mjs → chunk-C2NRPSEA.mjs} +2 -2
- package/out/__chunks__/{chunk-BVZSQPHI.mjs → chunk-C6H5TEAY.mjs} +2 -2
- package/out/__chunks__/{chunk-LAHS3NW5.mjs → chunk-CDOZBMWB.mjs} +2 -2
- package/out/__chunks__/{chunk-DKL4Y4GZ.mjs → chunk-CGBSNDVZ.mjs} +2 -2
- package/out/__chunks__/{chunk-FRT5QYK4.mjs → chunk-CGGLWDGN.mjs} +2 -2
- package/out/__chunks__/{chunk-PRBQJUNN.mjs → chunk-CXCWCLFJ.mjs} +2 -2
- package/out/__chunks__/{chunk-D3XL4W2S.mjs → chunk-D67JUKPD.mjs} +2 -2
- package/out/__chunks__/{chunk-CG67MDHK.mjs → chunk-DZZ5M34O.mjs} +2 -2
- package/out/__chunks__/{chunk-K6ZNNKRM.mjs → chunk-EB6K5LCD.mjs} +2 -2
- package/out/__chunks__/{chunk-G2JIJXCT.mjs → chunk-EQBGROHI.mjs} +2 -2
- package/out/__chunks__/{chunk-4KACM3PB.mjs → chunk-F4LRBZHI.mjs} +2 -2
- package/out/__chunks__/{chunk-RF66M4RE.mjs → chunk-F75YW37Y.mjs} +2 -2
- package/out/__chunks__/{chunk-M3SZWB42.mjs → chunk-FJW5NQC5.mjs} +2 -2
- package/out/__chunks__/{chunk-D565Z65W.mjs → chunk-FQ6P5OK7.mjs} +2 -2
- package/out/__chunks__/{chunk-XWB6JKXR.mjs → chunk-FUUOCOBX.mjs} +2 -2
- package/out/__chunks__/{chunk-5TTBHL7E.mjs → chunk-FVVRPNSD.mjs} +2 -2
- package/out/__chunks__/{chunk-U56RBBL2.mjs → chunk-G6OHKF3V.mjs} +2 -2
- package/out/__chunks__/{chunk-2XHTMRXY.mjs → chunk-GAO3N3BI.mjs} +2 -2
- package/out/__chunks__/{chunk-DPT3EJEU.mjs → chunk-HIDRVWOQ.mjs} +2 -2
- package/out/__chunks__/chunk-I25KKLGU.mjs +2 -0
- package/out/__chunks__/{chunk-G32PARPM.mjs → chunk-IHBIVBQ3.mjs} +2 -2
- package/out/__chunks__/{chunk-EDV7C4FR.mjs → chunk-IVM526MS.mjs} +2 -2
- package/out/__chunks__/{chunk-PZEUNYVO.mjs → chunk-IWJRKPVP.mjs} +2 -2
- package/out/__chunks__/{chunk-6PQL4EIN.mjs → chunk-JDKOXHUE.mjs} +2 -2
- package/out/__chunks__/{chunk-K7SPAYRR.mjs → chunk-JFJMW7YZ.mjs} +2 -2
- package/out/__chunks__/{chunk-PEDYTKOX.mjs → chunk-JJRF4KKM.mjs} +2 -2
- package/out/__chunks__/{chunk-V2WZPEHT.mjs → chunk-JTI5OLEX.mjs} +2 -2
- package/out/__chunks__/chunk-KEZWPJRC.mjs +2 -0
- package/out/__chunks__/{chunk-LXJCK4ZF.mjs → chunk-L3RER46P.mjs} +2 -2
- package/out/__chunks__/{chunk-53C53FNO.mjs → chunk-LDPF47U7.mjs} +2 -2
- package/out/__chunks__/{chunk-P5APNMMV.mjs → chunk-LDPXTCNA.mjs} +2 -2
- package/out/__chunks__/{chunk-VINTNYCN.mjs → chunk-LNCEF7GF.mjs} +2 -2
- package/out/__chunks__/{chunk-BILVSKTS.mjs → chunk-LS4PX2PR.mjs} +2 -2
- package/out/__chunks__/chunk-M3LLNTKM.mjs +2 -0
- package/out/__chunks__/{chunk-KAB2ZR4V.mjs → chunk-M5JPM5BF.mjs} +2 -2
- package/out/__chunks__/{chunk-5TEKACX7.mjs → chunk-MKYGGOBL.mjs} +2 -2
- package/out/__chunks__/{chunk-F3TDG43X.mjs → chunk-MN25YLTY.mjs} +2 -2
- package/out/__chunks__/{chunk-6DH5LO3Z.mjs → chunk-MN3XDS7Q.mjs} +2 -2
- package/out/__chunks__/{chunk-QXV7AJGJ.mjs → chunk-MW6XCNWP.mjs} +2 -2
- package/out/__chunks__/chunk-NNPFUDB7.mjs +2 -0
- package/out/__chunks__/chunk-NPNP2H3A.mjs +2 -0
- package/out/__chunks__/chunk-NXF3BPNL.mjs +2 -0
- package/out/__chunks__/{chunk-3QS26QZE.mjs → chunk-OCXXTA4P.mjs} +2 -2
- package/out/__chunks__/{chunk-TSHXMENM.mjs → chunk-ODNGFTW5.mjs} +2 -2
- package/out/__chunks__/chunk-OSOBELOT.mjs +2 -0
- package/out/__chunks__/{chunk-RZBGPCSP.mjs → chunk-OUYP2DZU.mjs} +2 -2
- package/out/__chunks__/chunk-OX3ABKOU.mjs +2 -0
- package/out/__chunks__/chunk-PYDTFFI4.mjs +2 -0
- package/out/__chunks__/chunk-QL6WH4QS.mjs +2 -0
- package/out/__chunks__/chunk-QQANPK2G.mjs +2 -0
- package/out/__chunks__/{chunk-IBA6ELIY.mjs → chunk-RBEU3I23.mjs} +2 -2
- package/out/__chunks__/{chunk-5XNNNG4O.mjs → chunk-RHYDUBKD.mjs} +2 -2
- package/out/__chunks__/{chunk-CXY2KJ5A.mjs → chunk-SQIVM23U.mjs} +2 -2
- package/out/__chunks__/{chunk-3KGSRMKL.mjs → chunk-SRPTHL6W.mjs} +2 -2
- package/out/__chunks__/{chunk-SXHDQKUB.mjs → chunk-SW7NDWBA.mjs} +2 -2
- package/out/__chunks__/{chunk-26T7QIYD.mjs → chunk-TK7CPPUP.mjs} +2 -2
- package/out/__chunks__/{chunk-ICPVNPNF.mjs → chunk-V3ULNZJT.mjs} +2 -2
- package/out/__chunks__/{chunk-JQ6TXJRF.mjs → chunk-V73QDUSC.mjs} +2 -2
- package/out/__chunks__/chunk-VBHP2IVI.mjs +2 -0
- package/out/__chunks__/{chunk-YJHSAY7A.mjs.map → chunk-VBHP2IVI.mjs.map} +1 -1
- package/out/__chunks__/{chunk-GLTE54RZ.mjs → chunk-VEIRZX44.mjs} +2 -2
- package/out/__chunks__/chunk-W236J5R4.mjs +2 -0
- package/out/__chunks__/{chunk-5FPWPXXU.mjs.map → chunk-W236J5R4.mjs.map} +2 -2
- package/out/__chunks__/{chunk-GCOIFLYH.mjs → chunk-WGK62UNL.mjs} +2 -2
- package/out/__chunks__/{chunk-7KLQ6P3X.mjs → chunk-WX4NWPAS.mjs} +2 -2
- package/out/__chunks__/{chunk-XYLBJSKZ.mjs → chunk-XG2GIMBK.mjs} +2 -2
- package/out/__chunks__/{chunk-6G4LDVRE.mjs → chunk-XIRJCDWC.mjs} +2 -2
- package/out/__chunks__/{chunk-XWVERBOI.mjs → chunk-Y3BMPKJG.mjs} +2 -2
- package/out/__chunks__/{chunk-JUCHJANY.mjs → chunk-YIMUSXYK.mjs} +2 -2
- package/out/__chunks__/{chunk-OB3OZ2VU.mjs → chunk-ZBXKGK25.mjs} +2 -2
- package/out/__chunks__/{chunk-TDSLUSB5.mjs → chunk-ZLOPHDVT.mjs} +2 -2
- package/out/__chunks__/chunk-ZP2JSMSQ.mjs +2 -0
- 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.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs.map +2 -2
- 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-5FPWPXXU.mjs +0 -2
- package/out/__chunks__/chunk-6XSQV5PG.mjs +0 -2
- package/out/__chunks__/chunk-BKJIVCI2.mjs +0 -2
- package/out/__chunks__/chunk-CAYCWEIY.mjs +0 -2
- package/out/__chunks__/chunk-CEAIZWOO.mjs +0 -2
- package/out/__chunks__/chunk-CPAQWSJT.mjs +0 -2
- package/out/__chunks__/chunk-E6VMNIGN.mjs +0 -2
- package/out/__chunks__/chunk-EOTK322N.mjs +0 -2
- package/out/__chunks__/chunk-FOHDO4PI.mjs +0 -2
- package/out/__chunks__/chunk-FZNOC2TX.mjs +0 -2
- package/out/__chunks__/chunk-G6RBIZMN.mjs +0 -2
- package/out/__chunks__/chunk-JJBQF564.mjs +0 -2
- package/out/__chunks__/chunk-L3Q3Q6RC.mjs +0 -2
- package/out/__chunks__/chunk-RN2B2K2U.mjs +0 -2
- package/out/__chunks__/chunk-VNX5SAKR.mjs +0 -2
- package/out/__chunks__/chunk-YJHSAY7A.mjs +0 -2
- /package/out/__chunks__/{chunk-B3GK3USO.mjs.map → chunk-2FEH3E6U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-57ZAVLGR.mjs.map → chunk-35TLBLLZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JDGCC7Y3.mjs.map → chunk-3B7DG5PU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LZ2FW6LV.mjs.map → chunk-4AOBQXI3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2ZEPX7P4.mjs.map → chunk-4EAIQB7E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EOTK322N.mjs.map → chunk-4G4G7FVT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-672HKIHY.mjs.map → chunk-4P6KVGFJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KQ5DJCR3.mjs.map → chunk-4UNMUVTO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AJZGZTQQ.mjs.map → chunk-4W5VY3GO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IW4ENRTD.mjs.map → chunk-676U6OTI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z2SUVJOJ.mjs.map → chunk-6B2GHZDF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PKCRQGFT.mjs.map → chunk-6PHKMRFV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-74F3UX4H.mjs.map → chunk-7YCD5466.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NRADHAQW.mjs.map → chunk-7ZU5KDF4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CAYCWEIY.mjs.map → chunk-AWODPMKF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JLLWKFXE.mjs.map → chunk-B3PQJ4WY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KRCTOTPM.mjs.map → chunk-B7CFQZKI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YEKA6Y6E.mjs.map → chunk-BAWT2YA7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZAKGTEKO.mjs.map → chunk-C2NRPSEA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BVZSQPHI.mjs.map → chunk-C6H5TEAY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LAHS3NW5.mjs.map → chunk-CDOZBMWB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DKL4Y4GZ.mjs.map → chunk-CGBSNDVZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FRT5QYK4.mjs.map → chunk-CGGLWDGN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PRBQJUNN.mjs.map → chunk-CXCWCLFJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D3XL4W2S.mjs.map → chunk-D67JUKPD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CG67MDHK.mjs.map → chunk-DZZ5M34O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K6ZNNKRM.mjs.map → chunk-EB6K5LCD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G2JIJXCT.mjs.map → chunk-EQBGROHI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4KACM3PB.mjs.map → chunk-F4LRBZHI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RF66M4RE.mjs.map → chunk-F75YW37Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M3SZWB42.mjs.map → chunk-FJW5NQC5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D565Z65W.mjs.map → chunk-FQ6P5OK7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XWB6JKXR.mjs.map → chunk-FUUOCOBX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5TTBHL7E.mjs.map → chunk-FVVRPNSD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U56RBBL2.mjs.map → chunk-G6OHKF3V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2XHTMRXY.mjs.map → chunk-GAO3N3BI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DPT3EJEU.mjs.map → chunk-HIDRVWOQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VNX5SAKR.mjs.map → chunk-I25KKLGU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G32PARPM.mjs.map → chunk-IHBIVBQ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EDV7C4FR.mjs.map → chunk-IVM526MS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PZEUNYVO.mjs.map → chunk-IWJRKPVP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6PQL4EIN.mjs.map → chunk-JDKOXHUE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K7SPAYRR.mjs.map → chunk-JFJMW7YZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PEDYTKOX.mjs.map → chunk-JJRF4KKM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V2WZPEHT.mjs.map → chunk-JTI5OLEX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JJBQF564.mjs.map → chunk-KEZWPJRC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LXJCK4ZF.mjs.map → chunk-L3RER46P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-53C53FNO.mjs.map → chunk-LDPF47U7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P5APNMMV.mjs.map → chunk-LDPXTCNA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VINTNYCN.mjs.map → chunk-LNCEF7GF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BILVSKTS.mjs.map → chunk-LS4PX2PR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RN2B2K2U.mjs.map → chunk-M3LLNTKM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KAB2ZR4V.mjs.map → chunk-M5JPM5BF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5TEKACX7.mjs.map → chunk-MKYGGOBL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F3TDG43X.mjs.map → chunk-MN25YLTY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6DH5LO3Z.mjs.map → chunk-MN3XDS7Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QXV7AJGJ.mjs.map → chunk-MW6XCNWP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E6VMNIGN.mjs.map → chunk-NNPFUDB7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L3Q3Q6RC.mjs.map → chunk-NPNP2H3A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CEAIZWOO.mjs.map → chunk-NXF3BPNL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3QS26QZE.mjs.map → chunk-OCXXTA4P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TSHXMENM.mjs.map → chunk-ODNGFTW5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6XSQV5PG.mjs.map → chunk-OSOBELOT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RZBGPCSP.mjs.map → chunk-OUYP2DZU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FZNOC2TX.mjs.map → chunk-OX3ABKOU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G6RBIZMN.mjs.map → chunk-PYDTFFI4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CPAQWSJT.mjs.map → chunk-QL6WH4QS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FOHDO4PI.mjs.map → chunk-QQANPK2G.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IBA6ELIY.mjs.map → chunk-RBEU3I23.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5XNNNG4O.mjs.map → chunk-RHYDUBKD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CXY2KJ5A.mjs.map → chunk-SQIVM23U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3KGSRMKL.mjs.map → chunk-SRPTHL6W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SXHDQKUB.mjs.map → chunk-SW7NDWBA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-26T7QIYD.mjs.map → chunk-TK7CPPUP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ICPVNPNF.mjs.map → chunk-V3ULNZJT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JQ6TXJRF.mjs.map → chunk-V73QDUSC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GLTE54RZ.mjs.map → chunk-VEIRZX44.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GCOIFLYH.mjs.map → chunk-WGK62UNL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7KLQ6P3X.mjs.map → chunk-WX4NWPAS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XYLBJSKZ.mjs.map → chunk-XG2GIMBK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6G4LDVRE.mjs.map → chunk-XIRJCDWC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XWVERBOI.mjs.map → chunk-Y3BMPKJG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JUCHJANY.mjs.map → chunk-YIMUSXYK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OB3OZ2VU.mjs.map → chunk-ZBXKGK25.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TDSLUSB5.mjs.map → chunk-ZLOPHDVT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BKJIVCI2.mjs.map → chunk-ZP2JSMSQ.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as a,q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as a,q as o}from"./chunk-DZZ5M34O.mjs";import{f as p}from"./chunk-DA76AK4I.mjs";var d=()=>o().setState(a,!1,{type:"logoutAction",payload:{value:null}}),s=({address:e,providerType:t})=>{o().setState(({account:r,loginInfo:i})=>{r.address=e,r.publicKey=new p(e).toHex(),i&&(i.providerType=t)},!1,{type:"loginAction",payload:{value:{address:e,providerType:t}}})};export{d as a,s as b};
|
|
2
|
+
//# sourceMappingURL=chunk-2FEH3E6U.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-BAWT2YA7.mjs";import{a as g}from"./chunk-OX3ABKOU.mjs";import{s as e}from"./chunk-DZZ5M34O.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-35TLBLLZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as o}from"./chunk-DZZ5M34O.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-3B7DG5PU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-VBHP2IVI.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-4AOBQXI3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-VBHP2IVI.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4EAIQB7E.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-IVM526MS.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4P6KVGFJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as t}from"./chunk-DZZ5M34O.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-4UNMUVTO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-LDPF47U7.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-4W5VY3GO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-I25KKLGU.mjs";import{a as p}from"./chunk-EQBGROHI.mjs";import{a as O}from"./chunk-RHYDUBKD.mjs";import{a as M}from"./chunk-JJRF4KKM.mjs";import{k as I,l as F,n as N}from"./chunk-E2GGD7D4.mjs";import{a as b,b as C,d as g,e as v,g as E,h as y,i as S}from"./chunk-6B2GHZDF.mjs";import{d as B}from"./chunk-3B7DG5PU.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-DZZ5M34O.mjs";import{a as d}from"./chunk-JDKOXHUE.mjs";import A from"lodash.isequal";import l from"lodash.isequal";var m=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||c(),this.notificationsFeedManager=t.notificationsFeedManager||h.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let s=await this.createToastListElement();if(!s)return;this.eventBus=await s.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await d.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var u=class a{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||c(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new m({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:s,transactions:i},{toasts:e,transactions:o})=>{let n=!l(e.transactionToasts,s.transactionToasts),r=!l(o,i);(n||r)&&await this.updateTransactionToastsList(),!l(e.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return a.instance||(a.instance=new a),a.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:e}=i,o=N(e),n=F(e),r=I(e),T=n||r||o;return T?(this.successfulToastLifetime&&this.lifetimeManager.start(t),T):(this.lifetimeManager.stop(t),T)}async createTransactionToast(t,s){let i=E({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),i}async createCustomToast(t){let s=S(t);return await this.updateCustomToastList(),s}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:s}=t,{pendingTransactionToasts:i,completedTransactionToasts:e}=await p({store:t});this.transactionToasts=[...i,...e];for(let o of s.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let e="message"in s?{...s}:{...s,instantiateToastElement:b[s.toastId]};this.customToasts.push(e),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(y(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=C[t];return i?.(),g(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),v()}};var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",h=class a extends M{constructor(s){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=s||c(),this.data={...this.initialData}}static getInstance(){return a.instance||(a.instance=new a),a.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){u.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:e,transactions:o},{toasts:n,transactions:r})=>{(!A(n.transactionToasts,e.transactionToasts)||!A(r,o))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=u.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s}=this.store.getState(),{pendingTransactionToasts:i}=await p();this.data.pendingTransactions=i;let e=Object.keys(s).reduce((o,n)=>(["sent","pending"].includes(String(s[n].status))||(o[n]=s[n]),o),{});this.data.historicTransactions=await w.getTransactionsHistory({transactionsSessions:e}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){B(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{h as a,m as b,u as c};
|
|
2
|
+
//# sourceMappingURL=chunk-676U6OTI.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-DZZ5M34O.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-6B2GHZDF.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-DZZ5M34O.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6PHKMRFV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-CGBSNDVZ.mjs";import o from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(o(t))return[];let i=r(t);return s({transactions:i})};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7YCD5466.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-ZLOPHDVT.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-7ZU5KDF4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-VBHP2IVI.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-B3PQJ4WY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-ODNGFTW5.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-B7CFQZKI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Z}from"./chunk-JTI5OLEX.mjs";import{a as Q}from"./chunk-6UZHM5LW.mjs";import{c as W}from"./chunk-676U6OTI.mjs";import{a as rt}from"./chunk-F75YW37Y.mjs";import{a as tt}from"./chunk-OX3ABKOU.mjs";import{a as et}from"./chunk-MW6XCNWP.mjs";import{a as nt}from"./chunk-6PHKMRFV.mjs";import{a as ot}from"./chunk-ABBDCZHP.mjs";import{a as mt}from"./chunk-4ODPAHHA.mjs";import{a as at}from"./chunk-XG2GIMBK.mjs";import{a as st}from"./chunk-KEZWPJRC.mjs";import{a as ut}from"./chunk-M5JPM5BF.mjs";import{a as M}from"./chunk-JFJMW7YZ.mjs";import{a as ct}from"./chunk-ZBXKGK25.mjs";import{b as A}from"./chunk-LDPXTCNA.mjs";import{c as O}from"./chunk-4AOBQXI3.mjs";import{a as d}from"./chunk-QQANPK2G.mjs";import{a as J}from"./chunk-AWODPMKF.mjs";import{a as w}from"./chunk-C2NRPSEA.mjs";import{a as P,f as X}from"./chunk-RBEU3I23.mjs";import{b as it}from"./chunk-2FEH3E6U.mjs";import{b as k}from"./chunk-3B7DG5PU.mjs";import{b as S}from"./chunk-V5ZSFCKJ.mjs";import{a as Y}from"./chunk-NNPFUDB7.mjs";import{a as _}from"./chunk-G6OHKF3V.mjs";import{a as y}from"./chunk-BSA3IGL6.mjs";import{a as j}from"./chunk-NWRCQLFI.mjs";import{a as b}from"./chunk-QL6WH4QS.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-DZZ5M34O.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-BAWT2YA7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-NGM3AVCY.mjs";import{s as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-NGM3AVCY.mjs";import{s as u}from"./chunk-DZZ5M34O.mjs";import{e as s}from"./chunk-FK6DWWZF.mjs";function x(n){let e=u(),o=a(e),c=s(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-C2NRPSEA.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-DZZ5M34O.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-C6H5TEAY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-4W5VY3GO.mjs";import{a as p}from"./chunk-SRPTHL6W.mjs";import{a as m}from"./chunk-CXCWCLFJ.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-NXF3BPNL.mjs";import{b as a}from"./chunk-RBEU3I23.mjs";import{f as i}from"./chunk-DZZ5M34O.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-CDOZBMWB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-4UNMUVTO.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-PYDTFFI4.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-DZZ5M34O.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-CGBSNDVZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-6G4LDVRE.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-LAHS3NW5.mjs";import{a as V}from"./chunk-AJZGZTQQ.mjs";import{a as ae}from"./chunk-JUCHJANY.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-57ZAVLGR.mjs";import{a as ge}from"./chunk-2XHTMRXY.mjs";import{a as g}from"./chunk-F3TDG43X.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-672HKIHY.mjs";import{a as z}from"./chunk-XWVERBOI.mjs";import{a as ce}from"./chunk-M3SZWB42.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-YEKA6Y6E.mjs";import{c as N}from"./chunk-IW4ENRTD.mjs";import{a as C}from"./chunk-FZNOC2TX.mjs";import{a as Y}from"./chunk-CAYCWEIY.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-Z2SUVJOJ.mjs";import{a as re}from"./chunk-B3GK3USO.mjs";import{a as U}from"./chunk-BKJIVCI2.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-CG67MDHK.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-XIRJCDWC.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-CDOZBMWB.mjs";import{a as V}from"./chunk-4W5VY3GO.mjs";import{a as ae}from"./chunk-YIMUSXYK.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-35TLBLLZ.mjs";import{a as ge}from"./chunk-GAO3N3BI.mjs";import{a as g}from"./chunk-MN25YLTY.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-4P6KVGFJ.mjs";import{a as z}from"./chunk-Y3BMPKJG.mjs";import{a as ce}from"./chunk-FJW5NQC5.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-BAWT2YA7.mjs";import{c as N}from"./chunk-676U6OTI.mjs";import{a as C}from"./chunk-OX3ABKOU.mjs";import{a as Y}from"./chunk-AWODPMKF.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-6B2GHZDF.mjs";import{a as re}from"./chunk-2FEH3E6U.mjs";import{a as U}from"./chunk-ZP2JSMSQ.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-DZZ5M34O.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-CGGLWDGN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-B7CFQZKI.mjs";import{a as b}from"./chunk-QQANPK2G.mjs";import{a as g}from"./chunk-QL6WH4QS.mjs";import{a as m}from"./chunk-YGI3KXMZ.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>g({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=m({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CXCWCLFJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-BAWT2YA7.mjs";import{q as M}from"./chunk-DZZ5M34O.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-VBHP2IVI.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D67JUKPD.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-4G4G7FVT.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-DZZ5M34O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-ODNGFTW5.mjs";import{k as r}from"./chunk-PKDR5ERF.mjs";import{a as o}from"./chunk-2JKCBTYK.mjs";import m from"axios";async function c({addressToVerify:s,baseURL:a}){let e=t(a),{data:i}=await m.get(`${e}/${o}/${s}`,{timeout:r});return i}export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EB6K5LCD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-QFXS7HGL.mjs";import{j as d,k as f,l as u,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-QFXS7HGL.mjs";import{j as d,k as f,l as u,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as p}from"./chunk-CGBSNDVZ.mjs";import{a as c}from"./chunk-NGM3AVCY.mjs";import{s as m}from"./chunk-DZZ5M34O.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";async function G(g){let s=g?.store??m(),n=[],a=[],y=l(s),F=c(s),C=T(s);for(let o of y.transactionToasts){let r=F[o.toastId];if(!r?.status)continue;let{status:t,transactions:P,transactionsDisplayInfo:h}=r,L=await p({transactions:P,store:s}),O=I(t),R=u(t),v=f(t),e=O||R||v,w=d(t),{startTime:x,endTime:D}=o;if(e&&a.some(b=>b.toastId===o.toastId))continue;let i=S({toastId:o.toastId,address:C,status:t,transactions:L,transactionsDisplayInfo:h,startTime:x,endTime:D});e&&a.push(i),w&&n.push(i)}return{pendingTransactionToasts:n,completedTransactionToasts:a}}export{G as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EQBGROHI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-ODNGFTW5.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-F4LRBZHI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-F4LRBZHI.mjs";import{b as r}from"./chunk-OCXXTA4P.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-DZZ5M34O.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-F75YW37Y.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-NNPFUDB7.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-DZZ5M34O.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-FJW5NQC5.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-IWJRKPVP.mjs";import{a as p}from"./chunk-573LAOYN.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-FQ6P5OK7.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-DZZ5M34O.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-FUUOCOBX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-EB6K5LCD.mjs";import{a as l}from"./chunk-AIQMA75E.mjs";import{a as p}from"./chunk-OMT62YRR.mjs";import{a as I}from"./chunk-S5XV2COC.mjs";import{b as g}from"./chunk-HIDRVWOQ.mjs";import{c as T}from"./chunk-PWAP64SN.mjs";var r={};function M({egldLabel:y,apiAddress:s,sender:t,address:e,parsedTransactionsByDataField:u}){return async o=>{if(o==null)return;let S=!t||t===e?null:await g({address:t,baseURL:s}),{transaction:a,multiTxData:A,transactionIndex:D}=o,c=T(a.data.toString()??""),d=p({data:c,multiTransactionData:A,parsedTransactionsByDataField:u}),{tokenId:f}=d,n=a.receiver.toBech32();if(t&&t!==e&&!l(S,e))throw console.error("You cannot sign transactions from a different account"),"You cannot sign transactions from a different account";let k=e!==n,x=n in r;if(n&&k&&!x){let i=await m({addressToVerify:n,baseURL:s});r={...r,...i?.scamInfo?{[n]:i.scamInfo}:{}}}let V=!!(f&&I({tokenId:f,egldLabel:y}));return{transaction:a,receiverScamInfo:r[n]?.info||null,transactionTokenInfo:d,isTokenTransaction:V,dataField:c,transactionIndex:D,needsSigning:o.needsSigning}}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FVVRPNSD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-BSA3IGL6.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-BSA3IGL6.mjs";import{a as l}from"./chunk-SQIVM23U.mjs";import{a as g}from"./chunk-OBIQ63DJ.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var N=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=l(h),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:m,timestamp:c}=n,p=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${m}.${r}.${p}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:f}};export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-G6OHKF3V.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-MN25YLTY.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-VBHP2IVI.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-GAO3N3BI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-ODNGFTW5.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-HIDRVWOQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-VBHP2IVI.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IHBIVBQ3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-JJRF4KKM.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IVM526MS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-C6H5TEAY.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-IWJRKPVP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-VBHP2IVI.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JDKOXHUE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{i as g}from"./chunk-6B2GHZDF.mjs";import{a as i,b as a,g as c}from"./chunk-M6MN4RXG.mjs";var s={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${a}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${i}-${Date.now()}`}},m={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},E=n=>{for(let[r,e]of Object.entries(m))if(n.includes(r))return e;return"Error when signing"};function O(n,r="error"){let e=n?.message,o=E(e),t=o!=="Error when signing"?"warning":r,l=Object.keys(s).includes(t)?s[t]:s.error,{toastId:T,iconClassName:d,title:u}=l;return g({toastId:T,duration:1e4,icon:"close",iconClassName:d,message:o,title:u}),o}export{O as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JFJMW7YZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-LDPF47U7.mjs";import{a as t}from"./chunk-ZP2JSMSQ.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-JJRF4KKM.mjs.map
|