@multiversx/sdk-dapp 5.2.2-alpha.1 → 5.2.3
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-24C5LP2A.mjs +2 -0
- package/out/__chunks__/{chunk-FEZKCHK7.mjs → chunk-2DOX4XMK.mjs} +2 -2
- package/out/__chunks__/chunk-2GGIYSMR.mjs +2 -0
- package/out/__chunks__/{chunk-NSW7SBHH.mjs → chunk-476M52X7.mjs} +2 -2
- package/out/__chunks__/chunk-4FVVKVQH.mjs +2 -0
- package/out/__chunks__/{chunk-J7JGI5JV.mjs → chunk-4KTAXWHS.mjs} +2 -2
- package/out/__chunks__/{chunk-YDK5V2BZ.mjs → chunk-4MBPMZP7.mjs} +2 -2
- package/out/__chunks__/{chunk-EHMHIAOC.mjs → chunk-4PMRBZVR.mjs} +2 -2
- package/out/__chunks__/{chunk-QIN2VFBM.mjs → chunk-4XZ2LJKD.mjs} +2 -2
- package/out/__chunks__/{chunk-VVRC7ANW.mjs → chunk-53YTBT65.mjs} +2 -2
- package/out/__chunks__/chunk-7OUDTQCF.mjs +2 -0
- package/out/__chunks__/chunk-7OUDTQCF.mjs.map +7 -0
- package/out/__chunks__/{chunk-OWO6FJAZ.mjs → chunk-7RM2765V.mjs} +2 -2
- package/out/__chunks__/{chunk-5HBNM4M2.mjs → chunk-AQHQWVF7.mjs} +2 -2
- package/out/__chunks__/{chunk-MUPCSQI2.mjs → chunk-B3VUBSL4.mjs} +2 -2
- package/out/__chunks__/chunk-B5EFA3UI.mjs +2 -0
- package/out/__chunks__/{chunk-JR7IKIR6.mjs → chunk-BDAAMNBN.mjs} +2 -2
- package/out/__chunks__/{chunk-Z5RRBB6V.mjs → chunk-C7FCKWVR.mjs} +2 -2
- package/out/__chunks__/{chunk-TB2Y5M67.mjs → chunk-COBXCFVC.mjs} +2 -2
- package/out/__chunks__/{chunk-MIODWPNV.mjs → chunk-DDOXD4IN.mjs} +2 -2
- package/out/__chunks__/{chunk-7P3DNMWN.mjs → chunk-DJX43EJZ.mjs} +2 -2
- package/out/__chunks__/{chunk-UTU2EQJA.mjs → chunk-DR66NBJB.mjs} +2 -2
- package/out/__chunks__/{chunk-2QW7XAGS.mjs → chunk-DWKNS2L6.mjs} +2 -2
- package/out/__chunks__/{chunk-PQ2PJ25S.mjs → chunk-DWVQFEQG.mjs} +2 -2
- package/out/__chunks__/{chunk-RORFSL37.mjs → chunk-EGBOHDEU.mjs} +2 -2
- package/out/__chunks__/chunk-EINZFJLE.mjs +2 -0
- package/out/__chunks__/{chunk-EFZBU2L3.mjs → chunk-EOIEYWZV.mjs} +2 -2
- package/out/__chunks__/{chunk-Y5UBM4II.mjs → chunk-EPTFZ77Y.mjs} +2 -2
- package/out/__chunks__/{chunk-LH7HQXQ7.mjs → chunk-F4B56PJO.mjs} +2 -2
- package/out/__chunks__/chunk-F7LAL7TT.mjs +2 -0
- package/out/__chunks__/{chunk-KFS4ZIKP.mjs → chunk-FHLON6CU.mjs} +2 -2
- package/out/__chunks__/{chunk-72BJ253L.mjs → chunk-FNVS326O.mjs} +2 -2
- package/out/__chunks__/{chunk-CRQHYOGT.mjs → chunk-FZCVPUJU.mjs} +2 -2
- package/out/__chunks__/{chunk-26EQVDJ2.mjs → chunk-GJJZZWVD.mjs} +2 -2
- package/out/__chunks__/{chunk-KMNG6RHN.mjs → chunk-I5YANLWR.mjs} +2 -2
- package/out/__chunks__/chunk-J3N3E7IG.mjs +2 -0
- package/out/__chunks__/{chunk-BODBU56I.mjs → chunk-JNYQYPLX.mjs} +2 -2
- package/out/__chunks__/{chunk-FLJAPLZE.mjs → chunk-JSDC7MZY.mjs} +2 -2
- package/out/__chunks__/{chunk-XHOY6ZTM.mjs → chunk-K4VQ6UWP.mjs} +2 -2
- package/out/__chunks__/chunk-KBHVNJKO.mjs +2 -0
- package/out/__chunks__/chunk-KY32AS5A.mjs +2 -0
- package/out/__chunks__/{chunk-7BYCH7J2.mjs.map → chunk-KY32AS5A.mjs.map} +1 -1
- package/out/__chunks__/{chunk-CYWT37FT.mjs → chunk-LSRKINNP.mjs} +2 -2
- package/out/__chunks__/{chunk-VR7K4BBB.mjs → chunk-MVTZTMVB.mjs} +2 -2
- package/out/__chunks__/{chunk-XJWZ6BDQ.mjs → chunk-NBY6GGN5.mjs} +2 -2
- package/out/__chunks__/{chunk-NUUOYZJB.mjs → chunk-OFSRI5RR.mjs} +2 -2
- package/out/__chunks__/{chunk-LWYHD7UG.mjs → chunk-OGZTCDLF.mjs} +2 -2
- package/out/__chunks__/{chunk-756GEXZI.mjs → chunk-ORJELHOZ.mjs} +2 -2
- package/out/__chunks__/{chunk-HBXJVW2D.mjs → chunk-OU4PEXX6.mjs} +2 -2
- package/out/__chunks__/{chunk-ZEYX332S.mjs → chunk-OW6TI77R.mjs} +2 -2
- package/out/__chunks__/{chunk-FSJ6P7DN.mjs → chunk-OXQS44QJ.mjs} +2 -2
- package/out/__chunks__/chunk-OZIFKO5Z.mjs +2 -0
- package/out/__chunks__/chunk-P3UF6ZIP.mjs +2 -0
- package/out/__chunks__/{chunk-PEBY7O46.mjs → chunk-PC6HDNCW.mjs} +2 -2
- package/out/__chunks__/{chunk-3VA7OXBH.mjs → chunk-PMMHNOCU.mjs} +2 -2
- package/out/__chunks__/{chunk-MT47AO63.mjs → chunk-PUFX36NA.mjs} +2 -2
- package/out/__chunks__/{chunk-EHSW5LVN.mjs → chunk-PYDEFY6F.mjs} +2 -2
- package/out/__chunks__/{chunk-LSHOMXXT.mjs → chunk-QP6RME6L.mjs} +2 -2
- package/out/__chunks__/chunk-RICEXBPH.mjs +2 -0
- package/out/__chunks__/chunk-RNST72DL.mjs +2 -0
- package/out/__chunks__/{chunk-3XKIU7VA.mjs → chunk-RVQLK36O.mjs} +2 -2
- package/out/__chunks__/{chunk-PGCZMYUZ.mjs → chunk-S3KFVBK5.mjs} +2 -2
- package/out/__chunks__/{chunk-X5C4JWTG.mjs → chunk-SI4DRNUN.mjs} +2 -2
- package/out/__chunks__/{chunk-TXRPUKQM.mjs → chunk-SIXE5BNQ.mjs} +2 -2
- package/out/__chunks__/chunk-SJM4QVVT.mjs +2 -0
- package/out/__chunks__/{chunk-WNTY5HJN.mjs → chunk-SN3EZ6GY.mjs} +2 -2
- package/out/__chunks__/{chunk-BPIUSUQG.mjs → chunk-TWPRIAIS.mjs} +2 -2
- package/out/__chunks__/{chunk-MXO2L46I.mjs → chunk-TYWA6773.mjs} +2 -2
- package/out/__chunks__/chunk-UIXNOVHP.mjs +2 -0
- package/out/__chunks__/chunk-UPQEWATF.mjs +2 -0
- package/out/__chunks__/{chunk-SRHQKUXP.mjs → chunk-UUCM2B5J.mjs} +2 -2
- package/out/__chunks__/{chunk-YOJ6MVBW.mjs → chunk-VM7SOWPA.mjs} +2 -2
- package/out/__chunks__/{chunk-5CJ4UDMA.mjs → chunk-WDIKEQ4G.mjs} +2 -2
- package/out/__chunks__/{chunk-RI45GLZ7.mjs → chunk-WKAAF3SF.mjs} +2 -2
- package/out/__chunks__/chunk-WMLOH6TA.mjs +2 -0
- package/out/__chunks__/{chunk-R2VTYQ7O.mjs → chunk-WO6VWFRK.mjs} +2 -2
- package/out/__chunks__/{chunk-JLE5ZH6J.mjs → chunk-WWL53TSG.mjs} +2 -2
- package/out/__chunks__/{chunk-QNT5Z55W.mjs → chunk-XZ52KQTC.mjs} +2 -2
- package/out/__chunks__/{chunk-LNYGKGJE.mjs → chunk-XZIUMXWJ.mjs} +2 -2
- package/out/__chunks__/{chunk-ATGWLKGR.mjs → chunk-Y4QU4QCG.mjs} +2 -2
- package/out/__chunks__/{chunk-X4KR5OSC.mjs → chunk-YV26DNK5.mjs} +2 -2
- 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/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.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/index.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/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/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/getAreTransactionsCorssShards.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/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/managers/internal/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/gastStationMetadata/setGasStationMetadata.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/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.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/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/index.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.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/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/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.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/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.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/providers/strategies/index.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/index.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/methods/index.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/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.cjs +8 -3
- package/out/store/actions/transactions/transactionsActions.cjs.map +2 -2
- 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/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.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/index.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/transactions/index.mjs +1 -1
- package/out/utils/visual/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/out/utils/window/index.mjs +1 -1
- package/package.json +3 -3
- package/out/__chunks__/chunk-2L23OQ3D.mjs +0 -2
- package/out/__chunks__/chunk-2WIGLKYG.mjs +0 -2
- package/out/__chunks__/chunk-5FPOZ2AY.mjs +0 -2
- package/out/__chunks__/chunk-5JDTRILF.mjs +0 -2
- package/out/__chunks__/chunk-7BYCH7J2.mjs +0 -2
- package/out/__chunks__/chunk-DBQCAF6H.mjs +0 -2
- package/out/__chunks__/chunk-FAUGS6HG.mjs +0 -2
- package/out/__chunks__/chunk-FKTD2GRY.mjs +0 -2
- package/out/__chunks__/chunk-G6PZFECX.mjs +0 -2
- package/out/__chunks__/chunk-HNB7MO3A.mjs +0 -2
- package/out/__chunks__/chunk-LKI7Z4RK.mjs +0 -2
- package/out/__chunks__/chunk-MMG52PCY.mjs +0 -2
- package/out/__chunks__/chunk-MRHKKGSJ.mjs +0 -2
- package/out/__chunks__/chunk-OQWBS4SC.mjs +0 -2
- package/out/__chunks__/chunk-SMON5ZO5.mjs +0 -2
- package/out/__chunks__/chunk-SOQYOVR7.mjs +0 -2
- package/out/__chunks__/chunk-VV7CPNPW.mjs +0 -2
- package/out/__chunks__/chunk-VV7CPNPW.mjs.map +0 -7
- package/out/__chunks__/chunk-YL7WVJQO.mjs +0 -2
- /package/out/__chunks__/{chunk-5JDTRILF.mjs.map → chunk-24C5LP2A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FEZKCHK7.mjs.map → chunk-2DOX4XMK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FAUGS6HG.mjs.map → chunk-2GGIYSMR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NSW7SBHH.mjs.map → chunk-476M52X7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G6PZFECX.mjs.map → chunk-4FVVKVQH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J7JGI5JV.mjs.map → chunk-4KTAXWHS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YDK5V2BZ.mjs.map → chunk-4MBPMZP7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EHMHIAOC.mjs.map → chunk-4PMRBZVR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QIN2VFBM.mjs.map → chunk-4XZ2LJKD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VVRC7ANW.mjs.map → chunk-53YTBT65.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OWO6FJAZ.mjs.map → chunk-7RM2765V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5HBNM4M2.mjs.map → chunk-AQHQWVF7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MUPCSQI2.mjs.map → chunk-B3VUBSL4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HNB7MO3A.mjs.map → chunk-B5EFA3UI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JR7IKIR6.mjs.map → chunk-BDAAMNBN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z5RRBB6V.mjs.map → chunk-C7FCKWVR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TB2Y5M67.mjs.map → chunk-COBXCFVC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MIODWPNV.mjs.map → chunk-DDOXD4IN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7P3DNMWN.mjs.map → chunk-DJX43EJZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UTU2EQJA.mjs.map → chunk-DR66NBJB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2QW7XAGS.mjs.map → chunk-DWKNS2L6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PQ2PJ25S.mjs.map → chunk-DWVQFEQG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RORFSL37.mjs.map → chunk-EGBOHDEU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DBQCAF6H.mjs.map → chunk-EINZFJLE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EFZBU2L3.mjs.map → chunk-EOIEYWZV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y5UBM4II.mjs.map → chunk-EPTFZ77Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LH7HQXQ7.mjs.map → chunk-F4B56PJO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MRHKKGSJ.mjs.map → chunk-F7LAL7TT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KFS4ZIKP.mjs.map → chunk-FHLON6CU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-72BJ253L.mjs.map → chunk-FNVS326O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CRQHYOGT.mjs.map → chunk-FZCVPUJU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-26EQVDJ2.mjs.map → chunk-GJJZZWVD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KMNG6RHN.mjs.map → chunk-I5YANLWR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SOQYOVR7.mjs.map → chunk-J3N3E7IG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BODBU56I.mjs.map → chunk-JNYQYPLX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FLJAPLZE.mjs.map → chunk-JSDC7MZY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XHOY6ZTM.mjs.map → chunk-K4VQ6UWP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2WIGLKYG.mjs.map → chunk-KBHVNJKO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CYWT37FT.mjs.map → chunk-LSRKINNP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VR7K4BBB.mjs.map → chunk-MVTZTMVB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XJWZ6BDQ.mjs.map → chunk-NBY6GGN5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NUUOYZJB.mjs.map → chunk-OFSRI5RR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LWYHD7UG.mjs.map → chunk-OGZTCDLF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-756GEXZI.mjs.map → chunk-ORJELHOZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HBXJVW2D.mjs.map → chunk-OU4PEXX6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZEYX332S.mjs.map → chunk-OW6TI77R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FSJ6P7DN.mjs.map → chunk-OXQS44QJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FKTD2GRY.mjs.map → chunk-OZIFKO5Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YL7WVJQO.mjs.map → chunk-P3UF6ZIP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PEBY7O46.mjs.map → chunk-PC6HDNCW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3VA7OXBH.mjs.map → chunk-PMMHNOCU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MT47AO63.mjs.map → chunk-PUFX36NA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EHSW5LVN.mjs.map → chunk-PYDEFY6F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LSHOMXXT.mjs.map → chunk-QP6RME6L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MMG52PCY.mjs.map → chunk-RICEXBPH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2L23OQ3D.mjs.map → chunk-RNST72DL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3XKIU7VA.mjs.map → chunk-RVQLK36O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PGCZMYUZ.mjs.map → chunk-S3KFVBK5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X5C4JWTG.mjs.map → chunk-SI4DRNUN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TXRPUKQM.mjs.map → chunk-SIXE5BNQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5FPOZ2AY.mjs.map → chunk-SJM4QVVT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WNTY5HJN.mjs.map → chunk-SN3EZ6GY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BPIUSUQG.mjs.map → chunk-TWPRIAIS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MXO2L46I.mjs.map → chunk-TYWA6773.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OQWBS4SC.mjs.map → chunk-UIXNOVHP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SMON5ZO5.mjs.map → chunk-UPQEWATF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SRHQKUXP.mjs.map → chunk-UUCM2B5J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YOJ6MVBW.mjs.map → chunk-VM7SOWPA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5CJ4UDMA.mjs.map → chunk-WDIKEQ4G.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RI45GLZ7.mjs.map → chunk-WKAAF3SF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LKI7Z4RK.mjs.map → chunk-WMLOH6TA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R2VTYQ7O.mjs.map → chunk-WO6VWFRK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JLE5ZH6J.mjs.map → chunk-WWL53TSG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QNT5Z55W.mjs.map → chunk-XZ52KQTC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LNYGKGJE.mjs.map → chunk-XZIUMXWJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ATGWLKGR.mjs.map → chunk-Y4QU4QCG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X4KR5OSC.mjs.map → chunk-YV26DNK5.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Et}from"./chunk-EHSW5LVN.mjs";import{a as gt}from"./chunk-FKTD2GRY.mjs";import{a as It}from"./chunk-6UZHM5LW.mjs";import{a as k}from"./chunk-VR7K4BBB.mjs";import{a as xt}from"./chunk-KMNG6RHN.mjs";import{a as wt}from"./chunk-G6PZFECX.mjs";import{a as At}from"./chunk-5JDTRILF.mjs";import{a as Lt}from"./chunk-CYWT37FT.mjs";import{a as y}from"./chunk-KDWLSBQB.mjs";import{a as Ct}from"./chunk-MFUQ5NBC.mjs";import{a as Rt}from"./chunk-4ODPAHHA.mjs";import{a as Ot}from"./chunk-JR7IKIR6.mjs";import{b as F}from"./chunk-EHMHIAOC.mjs";import{a as kt}from"./chunk-DBQCAF6H.mjs";import{a as Pt}from"./chunk-MDVI45IV.mjs";import{a as Ft}from"./chunk-MT47AO63.mjs";import{a as S}from"./chunk-MMG52PCY.mjs";import{a as ut}from"./chunk-SOQYOVR7.mjs";import{a as yt}from"./chunk-QIN2VFBM.mjs";import{a as x}from"./chunk-BODBU56I.mjs";import{a as O,f as bt}from"./chunk-756GEXZI.mjs";import{b as f,c as q,d as vt}from"./chunk-VV7CPNPW.mjs";import{k as ft,l as N,n as ht}from"./chunk-65L5EBBL.mjs";import{b as Nt}from"./chunk-26EQVDJ2.mjs";import{a as P}from"./chunk-HORSXVIV.mjs";import{a as Mt}from"./chunk-SMON5ZO5.mjs";import{a as ct}from"./chunk-5HBNM4M2.mjs";import{a as L}from"./chunk-QTKK6OSJ.mjs";import{a as rt}from"./chunk-6ACLOUQ3.mjs";import{a as A}from"./chunk-NZYB675D.mjs";import{a as at}from"./chunk-YSCND2MX.mjs";import{a as Dt}from"./chunk-NJN53MJV.mjs";import{a as lt,b as pt,g as Tt,l as dt}from"./chunk-2IUBMLF4.mjs";import{b as mt}from"./chunk-TQA3JDNV.mjs";import{a as nt,b as it,q as u,s as E}from"./chunk-X5C4JWTG.mjs";import{c as Q,d as X,f as tt}from"./chunk-UERJ6AKK.mjs";import{b as v}from"./chunk-VNLGNNIL.mjs";import{b}from"./chunk-6JM4DPOH.mjs";import{b as st,c as et,f as ot}from"./chunk-NTEMINYA.mjs";import{b as Bt}from"./chunk-S6NHNEQK.mjs";import{a as St}from"./chunk-Y5UBM4II.mjs";import{c as w}from"./chunk-LNYGKGJE.mjs";import{b as z}from"./chunk-GGBMHKR4.mjs";import{a as C}from"./chunk-ZONHCECO.mjs";import Vt from"lodash.isequal";import J from"lodash.isequal";import V from"bignumber.js";var M=class o{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=v(t),{isExpired:e}=L(s?.nativeAuthToken);e?I().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 t=this.store.getState(),s=v(t),e=tt(t);return!!(s?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=I(),s=Q(this.store.getState()),e=t.getType()===C.webview;if(!s||e)return;this.addLogoutWarning();let n=v(this.store.getState()),{secondsUntilExpires:i,expiresAt:r}=L(n?.nativeAuthToken),c=new V(String(i)),a=`${s}_${r}`,m=this.plannedLogoutKey===a;if(!(i&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=a,clearTimeout(this.plannedLogoutTimeoutRef??0);let T=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},T.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},T.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=b(this.store.getState()),s=v(this.store.getState()),{secondsUntilExpires:e}=L(s?.nativeAuthToken),n=new V(String(e)),i=n.times(1e3);if(!e||n.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new V(t?.tokenExpirationToastWarningSeconds??0).times(1e3),a=n.times(1e3).minus(c),m=It(i.toNumber()),l=a.isLessThanOrEqualTo(0)?0:a.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};var R={};async function Zt({serverTransaction:o,sessionId:t,isSequential:s}){let{hash:e,status:n,results:i,invalidTransaction:r,hasStatusChanged:c}=o;try{if(R[e]>30){f({sessionId:t,status:"timedOut"}),await y({sessionId:t,status:"timedOut"});return}if(r&&!s||n==="sent"){R[e]=R[e]?R[e]+1:1;return}if(s&&!n){let m=q({sessionId:t,transaction:o});await y({sessionId:t,status:m});return}if(c){let m=q({sessionId:t,transaction:o});await y({sessionId:t,status:m})}N(n)&&await Lt({sessionId:t,hash:e,results:i})}catch(a){console.error(a),f({sessionId:t,status:"timedOut"}),await y({sessionId:t,status:"timedOut"})}}async function Ut({sessionId:o,transactionBatch:t,isSequential:s}){try{if(t==null)return;let e=wt(),n=Ct(t),i=await Et(n);for(let p of i)await Zt({serverTransaction:p,sessionId:o,isSequential:s});if(!i.every(p=>p.status!=="pending"))return;e&&await B();let{transactions:c}=u().getState(),a=c[o];if(a.transactions.every(p=>p.status==="success"))return f({sessionId:o,status:"success"});if(a.transactions.some(p=>p.status==="fail"))return f({sessionId:o,status:"fail"});if(a.transactions.every(p=>p.status==="not executed"))return f({sessionId:o,status:"invalid"})}catch(e){console.error(e)}}async function _t(){let o=mt(E());if(Object.keys(o).length>0)for(let[t,{transactions:s}]of Object.entries(o))await Ut({sessionId:t,transactionBatch:s})}async function D(){let o=u(),t=At(),s=null,e=null,n=X(o.getState())?.timestamp,i=()=>{_t()},r=()=>{s??=setInterval(i,t)},c=()=>{s&&(clearInterval(s),s=null)},a=()=>{c();let p=o.subscribe(({account:{websocketEvent:g}})=>{g?.message&&n!==g.timestamp&&(n=g.timestamp,i())});w.set("websocketEventReceived",p)},m=()=>{z.status!=="not_initialized"||e||(e=setInterval(()=>{z.status==="completed"&&(clearInterval(e),e=null,a())},1e3))};i();let l=()=>{c(),e&&(clearInterval(e),e=null)},T=o.subscribe(({account:{address:p},config:{websocketStatus:g}},jt)=>{if(jt.config.websocketStatus!==g)switch(g){case"completed":a();break;case"pending":r(),m();break;default:p?r():l();break}});return w.set("websocketStatusChanged",T),w.set("websocketEventReceived",l),{stopTransactionsTracking:l}}async function j({address:o,provider:t,apiAddress:s}){let e=await A({address:o,baseURL:s});if(!e)throw new Error("Account not found");Nt({address:o,providerType:t.getType()});let n={...e,username:P(e.username),nonce:x(e)};O(n),await F(o),D(),e.shard!=null&&await xt({shard:Number(e.shard),apiAddress:s})}async function Jt(o){let{network:{apiAddress:t}}=S();await o.login();let s=await o.getAddress();if(!s)throw new Error("Address not found");return await j({address:s,provider:o,apiAddress:t}),{address:s}}async function Qt({provider:o,nativeAuthConfig:t,token:s}){let{network:{apiAddress:e}}=S(),n=ct(t),i=s;i||(i=await n.initialize({noCache:!0}));let{address:r,signature:c,...a}=await o.login({token:i});if(!r)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let l=rt(a?.accessToken)?a.accessToken:n.getToken({address:r,token:i,signature:c});it({loginToken:i,signature:c,nativeAuthToken:l});let T=await kt({loginToken:i,extraInfoData:{multisig:a?.multisig,impersonate:a?.impersonate},address:r});return await j({address:T,provider:o,apiAddress:e}),{address:T,signature:c}}async function Wt(o,t){let s=b(E());if(s)return await Qt({provider:o,nativeAuthConfig:s,token:t?.token});let{address:e}=await Jt(o);return await F(e),D(),{address:e,signature:""}}var Y={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${pt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${lt}-${Date.now()}`}},Xt={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"},ts=o=>{for(let[t,s]of Object.entries(Xt))if(o.includes(t))return s;return"Error when signing"};function Z(o,t="error"){let s=o?.message,e=ts(s),i=e!=="Error when signing"?"warning":t,r=Object.keys(Y).includes(i)?Y[i]:Y.error,{toastId:c,iconClassName:a,title:m}=r;return U({toastId:c,duration:1e4,icon:"times",iconClassName:a,message:e,title:m}),e}async function Ht({provider:o,transactions:t,options:s={}}){await B();let{isGuarded:e,activeGuardianAddress:n,nonce:i}=Mt(),r=o.getType()===C.ledger,c=Rt({latestNonce:i,transactions:t}),a=n&&e&&!s.skipGuardian?c?.map(l=>(l.version=st.withTxOptions().valueOf(),l.options=ot.withOptions({guarded:!0,...r?{hashSign:!0}:{}}).valueOf(),l.guardian=et.newFromBech32(n),l)):c,m=await o.signTransactions(a)??[];return bt(i+m.length),m}var _=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await Wt(this.provider,t);return nt(this.provider.getType()),Gt(this),M.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await Ot({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ht({provider:this.provider,transactions:t,options:s})}catch(e){let n=Z(e);throw new Error(n)}}async signMessage(t,s){try{return await Ft({provider:this.provider,message:t,options:s})}catch(e){let n=Z(e,"warning");throw new Error(n)}}async verifyMessage(t){return await Pt(t)}cancelLogin(){this.provider.cancelLogin?.()}};var $t=null;function Gt(o){$t=o}function I(){return $t||new _(Bt)}var ss=async()=>{try{let o=ut(),{network:t}=S();try{let s=await A({address:o,baseURL:t.apiAddress});if(s!=null){let e={...s,username:P(s.username),nonce:x(s)};return O(e),e}}catch(s){console.error("Failed getting account ",s)}}catch(o){console.error("Failed getting address ",o)}return null};async function B(){let o=I();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await ss():void 0}catch(t){console.error("Failed initializing provider ",t)}}var W={},h={},es=(o,t)=>{u().setState(({toasts:s})=>{let e=s.customToasts.length>0?Math.max(...s.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=t??`custom-toast-${e+1}`,i=s.customToasts.findIndex(a=>a.toastId===n),r={...o,toastId:n};if(i!==-1){s.customToasts[i]=r;return}s.customToasts.push({...r,toastId:n})},!1,"addCustomToast")},H=o=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==o)},!1,"removeCustomToast")},Kt=()=>{u().setState(({toasts:o})=>{o.customToasts=[]},!1,"removeAllCustomToasts")},No=()=>{u().setState(({toasts:o})=>{o.transactionToasts=[]})},zt=({toastId:o,totalDuration:t})=>{let s="";return u().setState(({toasts:e})=>{let n=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0;s=o??`transaction-toast-${n+1}`,e.transactionToasts.push({startTime:at(),endTime:Dt(t),toastId:s})},!1,"addTransactionToast"),s},G=o=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==o)},!1,"removeTransactionToast"),delete h[o],delete W[o]},U=o=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=o.toastId||`custom-toast-${s+1}`;return o.onClose&&(h[e]=o.onClose),o.instantiateToastElement?(W[e]=o.instantiateToastElement,u().setState(({toasts:n})=>{let i=n.customToasts.findIndex(a=>a.toastId===e),r={...o,instantiateToastElement:null,toastId:e};i!==-1?n.customToasts[i]=r:n.customToasts.push(r)},!1,"createCustomToast"),e):(es(o,e),e)};var qt=1e4,$=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=qt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{G(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let e=setTimeout(()=>{H(t);let n=h[t];n?.()},s);this.timeoutIntervals.set(t,e)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||qt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var d=class o{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new $,this.notificationsFeedManager=K.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:e},{toasts:n,transactions:i})=>{let r=!J(n.transactionToasts,s.transactionToasts),c=!J(i,e);(r||c)&&await this.updateTransactionToastsList({skipFetchingTransactions:c}),!J(n.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return o.instance||(o.instance=new o),o.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),e=s[t];if(!e)return!1;let{status:n}=e,i=ht(n),r=N(n),c=ft(n),a=r||c||i;return a?(this.successfulToastLifetime&&this.lifetimeManager.start(t),a):(this.lifetimeManager.stop(t),a)}async createTransactionToast(t,s){let e=zt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}createCustomToast(t){let s=U(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(t){let{toasts:s,transactions:e,account:n}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:r}=await k({toastList:s,transactionsSessions:e,account:n,skipFetchingTransactions:t?.skipFetchingTransactions});this.transactionToasts=[...i,...r];for(let c of s.transactionToasts)this.handleCompletedTransaction(c.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let n="message"in s?{...s}:{...s,instantiateToastElement:W[s.toastId]};this.customToasts.push(n),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await St.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&G(t)}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.closeToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.closeToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=h[t];e?.(),H(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),Kt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};var ns="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",K=class o extends yt{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.data={...this.initialData}}static getInstance(){return o.instance||(o.instance=new o),o.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:n,transactions:i},{toasts:r,transactions:c})=>{(!Vt(r.transactionToasts,n.transactionToasts)||!Vt(c,i))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(ns,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=d.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,account:e,toasts:n,network:i}=this.store.getState(),{pendingTransactionToasts:r}=await k({toastList:n,transactionsSessions:s,account:e});this.data.pendingTransactions=r,this.data.historicTransactions=await gt.getTransactionsHistory({transactionsSessions:s,address:e.address,explorerAddress:i.network.explorerAddress,egldLabel:i.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){vt(),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{K as a,W as b,h as c,es as d,H as e,Kt as f,No as g,zt as h,G as i,U as j,$ as k,d as l,M as m,Ut as n,_t as o,D as p,j as q,Wt as r,Z as s,Ht as t,_ as u,Gt as v,I as w,B as x};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Et}from"./chunk-PYDEFY6F.mjs";import{a as gt}from"./chunk-OZIFKO5Z.mjs";import{a as It}from"./chunk-6UZHM5LW.mjs";import{a as k}from"./chunk-MVTZTMVB.mjs";import{a as xt}from"./chunk-I5YANLWR.mjs";import{a as wt}from"./chunk-4FVVKVQH.mjs";import{a as At}from"./chunk-24C5LP2A.mjs";import{a as Lt}from"./chunk-LSRKINNP.mjs";import{a as y}from"./chunk-KDWLSBQB.mjs";import{a as Ct}from"./chunk-MFUQ5NBC.mjs";import{a as Rt}from"./chunk-4ODPAHHA.mjs";import{a as Ot}from"./chunk-BDAAMNBN.mjs";import{b as F}from"./chunk-4PMRBZVR.mjs";import{a as kt}from"./chunk-EINZFJLE.mjs";import{a as Pt}from"./chunk-MDVI45IV.mjs";import{a as Ft}from"./chunk-PUFX36NA.mjs";import{a as S}from"./chunk-RICEXBPH.mjs";import{a as ut}from"./chunk-J3N3E7IG.mjs";import{a as yt}from"./chunk-4XZ2LJKD.mjs";import{a as x}from"./chunk-JNYQYPLX.mjs";import{a as O,f as bt}from"./chunk-ORJELHOZ.mjs";import{b as f,c as q,d as vt}from"./chunk-7OUDTQCF.mjs";import{k as ft,l as N,n as ht}from"./chunk-65L5EBBL.mjs";import{b as Nt}from"./chunk-GJJZZWVD.mjs";import{a as P}from"./chunk-HORSXVIV.mjs";import{a as Mt}from"./chunk-UPQEWATF.mjs";import{a as ct}from"./chunk-AQHQWVF7.mjs";import{a as L}from"./chunk-QTKK6OSJ.mjs";import{a as rt}from"./chunk-6ACLOUQ3.mjs";import{a as A}from"./chunk-NZYB675D.mjs";import{a as at}from"./chunk-YSCND2MX.mjs";import{a as Dt}from"./chunk-NJN53MJV.mjs";import{a as lt,b as pt,g as Tt,l as dt}from"./chunk-2IUBMLF4.mjs";import{b as mt}from"./chunk-TQA3JDNV.mjs";import{a as nt,b as it,q as u,s as E}from"./chunk-SI4DRNUN.mjs";import{c as Q,d as X,f as tt}from"./chunk-UERJ6AKK.mjs";import{b as v}from"./chunk-VNLGNNIL.mjs";import{b}from"./chunk-6JM4DPOH.mjs";import{b as st,c as et,f as ot}from"./chunk-NTEMINYA.mjs";import{b as Bt}from"./chunk-S6NHNEQK.mjs";import{a as St}from"./chunk-EPTFZ77Y.mjs";import{c as w}from"./chunk-XZIUMXWJ.mjs";import{b as z}from"./chunk-GGBMHKR4.mjs";import{a as C}from"./chunk-ZONHCECO.mjs";import Vt from"lodash.isequal";import J from"lodash.isequal";import V from"bignumber.js";var M=class o{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=v(t),{isExpired:e}=L(s?.nativeAuthToken);e?I().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 t=this.store.getState(),s=v(t),e=tt(t);return!!(s?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=I(),s=Q(this.store.getState()),e=t.getType()===C.webview;if(!s||e)return;this.addLogoutWarning();let n=v(this.store.getState()),{secondsUntilExpires:i,expiresAt:r}=L(n?.nativeAuthToken),c=new V(String(i)),a=`${s}_${r}`,m=this.plannedLogoutKey===a;if(!(i&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=a,clearTimeout(this.plannedLogoutTimeoutRef??0);let T=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},T.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},T.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=b(this.store.getState()),s=v(this.store.getState()),{secondsUntilExpires:e}=L(s?.nativeAuthToken),n=new V(String(e)),i=n.times(1e3);if(!e||n.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new V(t?.tokenExpirationToastWarningSeconds??0).times(1e3),a=n.times(1e3).minus(c),m=It(i.toNumber()),l=a.isLessThanOrEqualTo(0)?0:a.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};var R={};async function Zt({serverTransaction:o,sessionId:t,isSequential:s}){let{hash:e,status:n,results:i,invalidTransaction:r,hasStatusChanged:c}=o;try{if(R[e]>30){f({sessionId:t,status:"timedOut"}),await y({sessionId:t,status:"timedOut"});return}if(r&&!s||n==="sent"){R[e]=R[e]?R[e]+1:1;return}if(s&&!n){let m=q({sessionId:t,transaction:o});await y({sessionId:t,status:m});return}if(c){let m=q({sessionId:t,transaction:o});await y({sessionId:t,status:m})}N(n)&&await Lt({sessionId:t,hash:e,results:i})}catch(a){console.error(a),f({sessionId:t,status:"timedOut"}),await y({sessionId:t,status:"timedOut"})}}async function Ut({sessionId:o,transactionBatch:t,isSequential:s}){try{if(t==null)return;let e=wt(),n=Ct(t),i=await Et(n);for(let p of i)await Zt({serverTransaction:p,sessionId:o,isSequential:s});if(!i.every(p=>p.status!=="pending"))return;e&&await B();let{transactions:c}=u().getState(),a=c[o];if(a.transactions.every(p=>p.status==="success"))return f({sessionId:o,status:"success"});if(a.transactions.some(p=>p.status==="fail"))return f({sessionId:o,status:"fail"});if(a.transactions.every(p=>p.status==="not executed"))return f({sessionId:o,status:"invalid"})}catch(e){console.error(e)}}async function _t(){let o=mt(E());if(Object.keys(o).length>0)for(let[t,{transactions:s}]of Object.entries(o))await Ut({sessionId:t,transactionBatch:s})}async function D(){let o=u(),t=At(),s=null,e=null,n=X(o.getState())?.timestamp,i=()=>{_t()},r=()=>{s??=setInterval(i,t)},c=()=>{s&&(clearInterval(s),s=null)},a=()=>{c();let p=o.subscribe(({account:{websocketEvent:g}})=>{g?.message&&n!==g.timestamp&&(n=g.timestamp,i())});w.set("websocketEventReceived",p)},m=()=>{z.status!=="not_initialized"||e||(e=setInterval(()=>{z.status==="completed"&&(clearInterval(e),e=null,a())},1e3))};i();let l=()=>{c(),e&&(clearInterval(e),e=null)},T=o.subscribe(({account:{address:p},config:{websocketStatus:g}},jt)=>{if(jt.config.websocketStatus!==g)switch(g){case"completed":a();break;case"pending":r(),m();break;default:p?r():l();break}});return w.set("websocketStatusChanged",T),w.set("websocketEventReceived",l),{stopTransactionsTracking:l}}async function j({address:o,provider:t,apiAddress:s}){let e=await A({address:o,baseURL:s});if(!e)throw new Error("Account not found");Nt({address:o,providerType:t.getType()});let n={...e,username:P(e.username),nonce:x(e)};O(n),await F(o),D(),e.shard!=null&&await xt({shard:Number(e.shard),apiAddress:s})}async function Jt(o){let{network:{apiAddress:t}}=S();await o.login();let s=await o.getAddress();if(!s)throw new Error("Address not found");return await j({address:s,provider:o,apiAddress:t}),{address:s}}async function Qt({provider:o,nativeAuthConfig:t,token:s}){let{network:{apiAddress:e}}=S(),n=ct(t),i=s;i||(i=await n.initialize({noCache:!0}));let{address:r,signature:c,...a}=await o.login({token:i});if(!r)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let l=rt(a?.accessToken)?a.accessToken:n.getToken({address:r,token:i,signature:c});it({loginToken:i,signature:c,nativeAuthToken:l});let T=await kt({loginToken:i,extraInfoData:{multisig:a?.multisig,impersonate:a?.impersonate},address:r});return await j({address:T,provider:o,apiAddress:e}),{address:T,signature:c}}async function Wt(o,t){let s=b(E());if(s)return await Qt({provider:o,nativeAuthConfig:s,token:t?.token});let{address:e}=await Jt(o);return await F(e),D(),{address:e,signature:""}}var Y={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${pt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${lt}-${Date.now()}`}},Xt={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"},ts=o=>{for(let[t,s]of Object.entries(Xt))if(o.includes(t))return s;return"Error when signing"};function Z(o,t="error"){let s=o?.message,e=ts(s),i=e!=="Error when signing"?"warning":t,r=Object.keys(Y).includes(i)?Y[i]:Y.error,{toastId:c,iconClassName:a,title:m}=r;return U({toastId:c,duration:1e4,icon:"times",iconClassName:a,message:e,title:m}),e}async function Ht({provider:o,transactions:t,options:s={}}){await B();let{isGuarded:e,activeGuardianAddress:n,nonce:i}=Mt(),r=o.getType()===C.ledger,c=Rt({latestNonce:i,transactions:t}),a=n&&e&&!s.skipGuardian?c?.map(l=>(l.version=st.withTxOptions().valueOf(),l.options=ot.withOptions({guarded:!0,...r?{hashSign:!0}:{}}).valueOf(),l.guardian=et.newFromBech32(n),l)):c,m=await o.signTransactions(a)??[];return bt(i+m.length),m}var _=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await Wt(this.provider,t);return nt(this.provider.getType()),Gt(this),M.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await Ot({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ht({provider:this.provider,transactions:t,options:s})}catch(e){let n=Z(e);throw new Error(n)}}async signMessage(t,s){try{return await Ft({provider:this.provider,message:t,options:s})}catch(e){let n=Z(e,"warning");throw new Error(n)}}async verifyMessage(t){return await Pt(t)}cancelLogin(){this.provider.cancelLogin?.()}};var $t=null;function Gt(o){$t=o}function I(){return $t||new _(Bt)}var ss=async()=>{try{let o=ut(),{network:t}=S();try{let s=await A({address:o,baseURL:t.apiAddress});if(s!=null){let e={...s,username:P(s.username),nonce:x(s)};return O(e),e}}catch(s){console.error("Failed getting account ",s)}}catch(o){console.error("Failed getting address ",o)}return null};async function B(){let o=I();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await ss():void 0}catch(t){console.error("Failed initializing provider ",t)}}var W={},h={},es=(o,t)=>{u().setState(({toasts:s})=>{let e=s.customToasts.length>0?Math.max(...s.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=t??`custom-toast-${e+1}`,i=s.customToasts.findIndex(a=>a.toastId===n),r={...o,toastId:n};if(i!==-1){s.customToasts[i]=r;return}s.customToasts.push({...r,toastId:n})},!1,"addCustomToast")},H=o=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==o)},!1,"removeCustomToast")},Kt=()=>{u().setState(({toasts:o})=>{o.customToasts=[]},!1,"removeAllCustomToasts")},No=()=>{u().setState(({toasts:o})=>{o.transactionToasts=[]})},zt=({toastId:o,totalDuration:t})=>{let s="";return u().setState(({toasts:e})=>{let n=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0;s=o??`transaction-toast-${n+1}`,e.transactionToasts.push({startTime:at(),endTime:Dt(t),toastId:s})},!1,"addTransactionToast"),s},G=o=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==o)},!1,"removeTransactionToast"),delete h[o],delete W[o]},U=o=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=o.toastId||`custom-toast-${s+1}`;return o.onClose&&(h[e]=o.onClose),o.instantiateToastElement?(W[e]=o.instantiateToastElement,u().setState(({toasts:n})=>{let i=n.customToasts.findIndex(a=>a.toastId===e),r={...o,instantiateToastElement:null,toastId:e};i!==-1?n.customToasts[i]=r:n.customToasts.push(r)},!1,"createCustomToast"),e):(es(o,e),e)};var qt=1e4,$=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=qt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{G(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let e=setTimeout(()=>{H(t);let n=h[t];n?.()},s);this.timeoutIntervals.set(t,e)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||qt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var d=class o{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new $,this.notificationsFeedManager=K.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:e},{toasts:n,transactions:i})=>{let r=!J(n.transactionToasts,s.transactionToasts),c=!J(i,e);(r||c)&&await this.updateTransactionToastsList({skipFetchingTransactions:c}),!J(n.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return o.instance||(o.instance=new o),o.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),e=s[t];if(!e)return!1;let{status:n}=e,i=ht(n),r=N(n),c=ft(n),a=r||c||i;return a?(this.successfulToastLifetime&&this.lifetimeManager.start(t),a):(this.lifetimeManager.stop(t),a)}async createTransactionToast(t,s){let e=zt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}createCustomToast(t){let s=U(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(t){let{toasts:s,transactions:e,account:n}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:r}=await k({toastList:s,transactionsSessions:e,account:n,skipFetchingTransactions:t?.skipFetchingTransactions});this.transactionToasts=[...i,...r];for(let c of s.transactionToasts)this.handleCompletedTransaction(c.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let n="message"in s?{...s}:{...s,instantiateToastElement:W[s.toastId]};this.customToasts.push(n),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await St.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&G(t)}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.closeToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.closeToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=h[t];e?.(),H(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),Kt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};var ns="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",K=class o extends yt{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.data={...this.initialData}}static getInstance(){return o.instance||(o.instance=new o),o.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:n,transactions:i},{toasts:r,transactions:c})=>{(!Vt(r.transactionToasts,n.transactionToasts)||!Vt(c,i))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(ns,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=d.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,account:e,toasts:n,network:i}=this.store.getState(),{pendingTransactionToasts:r}=await k({toastList:n,transactionsSessions:s,account:e});this.data.pendingTransactions=r,this.data.historicTransactions=await gt.getTransactionsHistory({transactionsSessions:s,address:e.address,explorerAddress:i.network.explorerAddress,egldLabel:i.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){vt(),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{K as a,W as b,h as c,es as d,H as e,Kt as f,No as g,zt as h,G as i,U as j,$ as k,d as l,M as m,Ut as n,_t as o,D as p,j as q,Wt as r,Z as s,Ht as t,_ as u,Gt as v,I as w,B as x};
|
|
2
|
+
//# sourceMappingURL=chunk-OXQS44QJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-KY32AS5A.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
|
|
2
|
+
//# sourceMappingURL=chunk-PC6HDNCW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-UPQEWATF.mjs";import{a as f}from"./chunk-AQHQWVF7.mjs";import{a as g}from"./chunk-YV26DNK5.mjs";import{b as a}from"./chunk-SI4DRNUN.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PMMHNOCU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-J3N3E7IG.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PUFX36NA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-FNVS326O.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PYDEFY6F.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-SI4DRNUN.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QP6RME6L.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-WWL53TSG.mjs";import{v as m}from"./chunk-OXQS44QJ.mjs";import{s as n}from"./chunk-SI4DRNUN.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-ZONHCECO.mjs";import{a as p}from"./chunk-B3VUBSL4.mjs";async function g(){let t=a(),d=p(),r=s(n()),e=d||t?i.webview:r,c=Object.values(i).includes(r);if(r&&!c&&(e=r),!e)return;let o=await v.create({type:e});if(!o)throw new Error("Provider not found");(t||e===i.webview&&o.isInitialized())&&await o.login(),m(o)}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RNST72DL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-FNVS326O.mjs";import{a as d}from"./chunk-TYWA6773.mjs";import{a as f}from"./chunk-P3UF6ZIP.mjs";import{a as h}from"./chunk-3L7HZ2SO.mjs";var g=t=>t.sort((n,i)=>i.timestamp-n.timestamp),k=async({transactions:t,address:n,explorerAddress:i,egldLabel:u,skipFetchingTransactions:I=!1})=>{let o=[],e=[];if(t.forEach(s=>{let a=f(s.hash);a?o.push(a):e.push(s.hash)}),e.length===0)return g(o);let c=I?t.map(s=>({...s,txHash:s.hash})):await p(e),l=c.map(s=>s.txHash),T=e.filter(s=>!l.includes(s));if(T.length>0){let a=t.filter(r=>T.includes(r.hash)).map(r=>({...r,txHash:r.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...a)}let m=new Map;return o.forEach(s=>{let a=s.hash;a&&m.set(String(a),s)}),c.forEach(s=>{let a=h({transaction:s,address:n,explorerAddress:i,egldLabel:u});a.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:a}),m.set(s.txHash,a)}),g(Array.from(m.values()))};export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RVQLK36O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KY32AS5A.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-S3KFVBK5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-KBHVNJKO.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as T}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as l}from"./chunk-NTEMINYA.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=c,e.loginInfo=m,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=a(e),n=p(e),{address:i,publicKey:M}=s(e);if(i&&M!==new l(i).toHex()&&A(e),!t)return;if(n==null){w(H());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var z=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:O(e)})));return t.subscribe(z),t},r,D=e=>{r=e},o=()=>(r||D(W(()=>new v)),r),pe=(e=k)=>{let t=W(e);return D(t),t},le=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{me as a,fe as b,Se as c,ue as d,de as e,Le as f,xe as g,E as h,b as i,A as j,H as k,w as l,C as m,z as n,W as o,D as p,o as q,pe as r,le as s};
|
|
2
|
+
//# sourceMappingURL=chunk-SI4DRNUN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-QP6RME6L.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SIXE5BNQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{w as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{w as g}from"./chunk-OXQS44QJ.mjs";import{q as M}from"./chunk-SI4DRNUN.mjs";import{a as d}from"./chunk-UERJ6AKK.mjs";import{a as u,c as p,g as c}from"./chunk-NTEMINYA.mjs";import{a as l}from"./chunk-KY32AS5A.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(){l.addEventListener("message",this.handleMessage)}stopListening(){l.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 o.finalizeHandshakeRequest:this.handshake({event:e});break;case o.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case o.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case o.signTransactionsRequest:this.signTransactions({event:e});break;case i.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}=d(this.store.getState()),r=g(),n=`${t}${a}`,y=new c({address:new p(t),data:new Uint8Array(Buffer.from(n))}),f=(await r.signMessage(y))?.signature??"";e.source?.postMessage({type:i.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&this.handleLoginCancelled()}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:i.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=d(this.store.getState()),{message:t}=s;try{let r=new c({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(r))?.signature??"";e.source?.postMessage({type:i.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(n=>u.newFromPlainObject(n)),r=await s.signTransactions(t);e.source?.postMessage({type:i.signTransactionsResponse,payload:{data:r.map(n=>n.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SN3EZ6GY.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-SI4DRNUN.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
|
|
2
|
+
//# sourceMappingURL=chunk-TWPRIAIS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as a}from"./chunk-SI4DRNUN.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-TYWA6773.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-4XZ2LJKD.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UUCM2B5J.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KY32AS5A.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-VM7SOWPA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-OGZTCDLF.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WDIKEQ4G.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-SI4DRNUN.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WKAAF3SF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-COBXCFVC.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-WO6VWFRK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-5CJ4UDMA.mjs";import{a as se}from"./chunk-7ZUH3TQ2.mjs";import{a as ie}from"./chunk-XJWZ6BDQ.mjs";import{a as N}from"./chunk-NSW7SBHH.mjs";import{a as oe}from"./chunk-VVRC7ANW.mjs";import{a as te}from"./chunk-Z5RRBB6V.mjs";import{a as re}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-YDK5V2BZ.mjs";import{a as p}from"./chunk-NUUOYZJB.mjs";import{a as ee}from"./chunk-MIODWPNV.mjs";import{a as L}from"./chunk-J7JGI5JV.mjs";import{a as ne}from"./chunk-RORFSL37.mjs";import{a as Z}from"./chunk-QJGFIK7H.mjs";import{b as Q}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as J}from"./chunk-NRXYSTRW.mjs";import{j as X,l as D,u as E,v as y,w as M}from"./chunk-FSJ6P7DN.mjs";import{a as P}from"./chunk-G6PZFECX.mjs";import{a as K}from"./chunk-SOQYOVR7.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as Y}from"./chunk-26EQVDJ2.mjs";import{g as $}from"./chunk-2IUBMLF4.mjs";import{a as q,q as F,s as l}from"./chunk-X5C4JWTG.mjs";import{f as V}from"./chunk-UERJ6AKK.mjs";import{b as A,c as B}from"./chunk-SAAOQW7P.mjs";import{a as H}from"./chunk-VNLGNNIL.mjs";import{b as G,c as j}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-ZVIKYGX5.mjs";import{a as n}from"./chunk-ZONHCECO.mjs";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await ie({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!P())return;await N.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await te({shouldInitProvider:!0});this.provider=r}catch(r){throw X({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return 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=N.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>oe({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ge=3e4,ve=5e3,me=3e3,S=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=H(i),r=V(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=Q(l());if(!(!this.shouldCheckConnection()||i))try{await M().getProvider().getAddress()}catch{if(D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,ve)}},ge))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new E(i);i.getType=()=>n.ledger,y(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:me,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 z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await ne(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Z.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=A(l()),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 he}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=he.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 x=class extends p{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[n.metamask]})};this.walletUrl=r??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=A(l());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 fe}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],W=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:fe.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return 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:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??U.walletConnectDeepLink;this._approval=o,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!P())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=P(),t=B(l());if(G(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Y()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:_={},walletConnectV2RelayAddress:O=""}=e,w=new J(v,t,O,m,_);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var T=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new x;break}case n.walletConnect:{let s=j(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new W({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=K();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new E(r);y(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){M().cancelLogin(),y(null),q(n.none)}};T._customProviders=[];var we=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await ee({cancelAction:e}),v=Object.values(T.customProviders),m=v.reduce((u,R)=>(u[R.type]=R.name,u),{}),_={...c,...m},O=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",O);let w=we(v,r)?r:n.none;d.updateData({name:_[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=re(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,T as d,g as e,z as f,k as g,x as h,W as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-WDIKEQ4G.mjs";import{a as se}from"./chunk-7ZUH3TQ2.mjs";import{a as ie}from"./chunk-NBY6GGN5.mjs";import{a as N}from"./chunk-476M52X7.mjs";import{a as oe}from"./chunk-53YTBT65.mjs";import{a as te}from"./chunk-C7FCKWVR.mjs";import{a as re}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-4MBPMZP7.mjs";import{a as p}from"./chunk-OFSRI5RR.mjs";import{a as ee}from"./chunk-DDOXD4IN.mjs";import{a as L}from"./chunk-4KTAXWHS.mjs";import{a as ne}from"./chunk-EGBOHDEU.mjs";import{a as Z}from"./chunk-QJGFIK7H.mjs";import{b as Q}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as J}from"./chunk-NRXYSTRW.mjs";import{j as X,l as D,u as E,v as y,w as M}from"./chunk-OXQS44QJ.mjs";import{a as P}from"./chunk-4FVVKVQH.mjs";import{a as K}from"./chunk-J3N3E7IG.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as Y}from"./chunk-GJJZZWVD.mjs";import{g as $}from"./chunk-2IUBMLF4.mjs";import{a as q,q as F,s as l}from"./chunk-SI4DRNUN.mjs";import{f as V}from"./chunk-UERJ6AKK.mjs";import{b as A,c as B}from"./chunk-SAAOQW7P.mjs";import{a as H}from"./chunk-VNLGNNIL.mjs";import{b as G,c as j}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-ZVIKYGX5.mjs";import{a as n}from"./chunk-ZONHCECO.mjs";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await ie({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!P())return;await N.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await te({shouldInitProvider:!0});this.provider=r}catch(r){throw X({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return 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=N.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>oe({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ge=3e4,ve=5e3,me=3e3,S=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=H(i),r=V(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=Q(l());if(!(!this.shouldCheckConnection()||i))try{await M().getProvider().getAddress()}catch{if(D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,ve)}},ge))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new E(i);i.getType=()=>n.ledger,y(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,D.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:me,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 z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await ne(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Z.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=A(l()),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 he}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=he.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 x=class extends p{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await L({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[n.metamask]})};this.walletUrl=r??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=A(l());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 fe}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],W=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:fe.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return 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:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??U.walletConnectDeepLink;this._approval=o,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!P())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=P(),t=B(l());if(G(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Y()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:_={},walletConnectV2RelayAddress:O=""}=e,w=new J(v,t,O,m,_);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var T=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new x;break}case n.walletConnect:{let s=j(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new W({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=K();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new E(r);y(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){M().cancelLogin(),y(null),q(n.none)}};T._customProviders=[];var we=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await ee({cancelAction:e}),v=Object.values(T.customProviders),m=v.reduce((u,R)=>(u[R.type]=R.name,u),{}),_={...c,...m},O=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",O);let w=we(v,r)?r:n.none;d.updateData({name:_[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=re(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,T as d,g as e,z as f,k as g,x as h,W as i};
|
|
2
|
+
//# sourceMappingURL=chunk-WWL53TSG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-SI4DRNUN.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XZ52KQTC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KY32AS5A.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-XZIUMXWJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-YV26DNK5.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Y4QU4QCG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-SI4DRNUN.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YV26DNK5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-D2JYGLAC.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-D2JYGLAC.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../__chunks__/chunk-F4B56PJO.mjs";import"../../__chunks__/chunk-ZVIKYGX5.mjs";import"../../__chunks__/chunk-LHEH7L4L.mjs";import"../../__chunks__/chunk-EJV4VNJG.mjs";import"../../__chunks__/chunk-XZIUMXWJ.mjs";import"../../__chunks__/chunk-FI444OX3.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-ZONHCECO.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";export{a as getScamAddressData};
|
|
2
2
|
//# sourceMappingURL=getScamAddressData.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-XZ52KQTC.mjs";import"../../__chunks__/chunk-SI4DRNUN.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-KBHVNJKO.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";export{a as getCleanApiAddress};
|
|
2
2
|
//# sourceMappingURL=getCleanApiAddress.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-K4VQ6UWP.mjs";import"../../__chunks__/chunk-XZ52KQTC.mjs";import"../../__chunks__/chunk-SI4DRNUN.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-KBHVNJKO.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";export{a as getGasStationMetadataFromApi};
|
|
2
2
|
//# sourceMappingURL=getGasStationMetadata.mjs.map
|
package/out/apiCalls/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../__chunks__/chunk-YV7ZJBAY.mjs";import"../__chunks__/chunk-K5MJ4FMD.mjs";import{a as F}from"../__chunks__/chunk-
|
|
1
|
+
import"../__chunks__/chunk-YV7ZJBAY.mjs";import"../__chunks__/chunk-K5MJ4FMD.mjs";import{a as F}from"../__chunks__/chunk-OU4PEXX6.mjs";import"../__chunks__/chunk-DXRSXWLQ.mjs";import"../__chunks__/chunk-INRKVOET.mjs";import"../__chunks__/chunk-6ET5BDZH.mjs";import{a as G}from"../__chunks__/chunk-D2JYGLAC.mjs";import"../__chunks__/chunk-ZFXAT6MD.mjs";import{a as H}from"../__chunks__/chunk-Q2Q4XN4M.mjs";import{a as D}from"../__chunks__/chunk-YK7T6MBD.mjs";import{a as E}from"../__chunks__/chunk-KMJMQEXI.mjs";import{a as B,b as C}from"../__chunks__/chunk-SLOQOCEU.mjs";import{a as A}from"../__chunks__/chunk-3GGBXXXJ.mjs";import{a as z}from"../__chunks__/chunk-O7LCTC4K.mjs";import"../__chunks__/chunk-SI4DRNUN.mjs";import"../__chunks__/chunk-T4FRQ4JG.mjs";import"../__chunks__/chunk-UTWIKUIK.mjs";import"../__chunks__/chunk-UERJ6AKK.mjs";import"../__chunks__/chunk-KPK72MOE.mjs";import"../__chunks__/chunk-SAAOQW7P.mjs";import"../__chunks__/chunk-VNLGNNIL.mjs";import"../__chunks__/chunk-6JM4DPOH.mjs";import"../__chunks__/chunk-ZODTYAYF.mjs";import"../__chunks__/chunk-NLRDRI7Q.mjs";import"../__chunks__/chunk-DKX6JUT6.mjs";import"../__chunks__/chunk-KBHVNJKO.mjs";import"../__chunks__/chunk-KRWR77QE.mjs";import"../__chunks__/chunk-B7YCKWDU.mjs";import"../__chunks__/chunk-HDJOER66.mjs";import"../__chunks__/chunk-A7FTKX2A.mjs";import"../__chunks__/chunk-XKU5QBXG.mjs";import"../__chunks__/chunk-WZGG2YKQ.mjs";import"../__chunks__/chunk-JMC7CMTU.mjs";import"../__chunks__/chunk-S2B2ZKIJ.mjs";import"../__chunks__/chunk-T2YPFNVM.mjs";import"../__chunks__/chunk-M7BM6QPB.mjs";import"../__chunks__/chunk-5N4F5T5L.mjs";import"../__chunks__/chunk-CYCS3K6Q.mjs";import"../__chunks__/chunk-YMPZDHKF.mjs";import"../__chunks__/chunk-VKEESSBI.mjs";import"../__chunks__/chunk-2DNGCNYM.mjs";import"../__chunks__/chunk-SQVKVA7X.mjs";import"../__chunks__/chunk-I24YBVHK.mjs";import"../__chunks__/chunk-NB7A4C7L.mjs";import"../__chunks__/chunk-PJWJZHIS.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y}from"../__chunks__/chunk-KD2IQ32V.mjs";import"../__chunks__/chunk-NTEMINYA.mjs";import"../__chunks__/chunk-3FXHIV6O.mjs";import"../__chunks__/chunk-ULUZWP2P.mjs";import"../__chunks__/chunk-MGFIOCA4.mjs";import"../__chunks__/chunk-GGBMHKR4.mjs";import"../__chunks__/chunk-GLXG5BES.mjs";import"../__chunks__/chunk-KY32AS5A.mjs";export{a as ACCOUNTS_ENDPOINT,b as ADDRESS_ENDPOINT,c as BLOCKS_ENDPOINT,d as CODE_ENDPOINT,e as COLLECTIONS_ENDPOINT,f as CONFIG_ENDPOINT,g as CONTRACTS_ENDPOINT,h as ECONOMICS_ENDPOINT,i as IDENTITIES_ENDPOINT,j as KEYS_ENDPOINT,k as LOCKED_ACCOUNTS_ENDPOINT,l as LOGS_ENDPOINT,m as MINIBLOCKS_ENDPOINT,n as NETWORK_CONFIG_ENDPOINT,o as NFTS_ENDPOINT,p as NODES_ENDPOINT,q as PROVIDERS_ENDPOINT,r as ROLES_ENDPOINT,s as SC_RESULTS_ENDPOINT,t as STAKE_ENDPOINT,u as TOKENS_ENDPOINT,w as TRANSACTIONS_BATCH,v as TRANSACTIONS_COUNT_ENDPOINT,x as TRANSACTIONS_ENDPOINT,y as TRANSFERS_ENDPOINT,B as accountFetcher,G as axiosFetcher,z as axiosInstance,C as getAccountFromApi,A as getCleanApiAddress,E as getNetworkConfigFromApi,D as getServerConfiguration,F as getTokenDetails,H as getWebsocketUrl};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-QP6RME6L.mjs";import"../../__chunks__/chunk-LGAWIVRO.mjs";import"../../__chunks__/chunk-C4TBDJVT.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-SI4DRNUN.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-KBHVNJKO.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";export{a as getPersistedTokenDetails};
|
|
2
2
|
//# sourceMappingURL=getPersistedTokenDetails.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-OU4PEXX6.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-SI4DRNUN.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-KBHVNJKO.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";export{a as getTokenDetails};
|
|
2
2
|
//# sourceMappingURL=getTokenDetails.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../__chunks__/chunk-K5MJ4FMD.mjs";import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import"../../__chunks__/chunk-K5MJ4FMD.mjs";import{a}from"../../__chunks__/chunk-OU4PEXX6.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-SI4DRNUN.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-KBHVNJKO.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";export{a as getTokenDetails};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-FNVS326O.mjs";import"../../__chunks__/chunk-SI4DRNUN.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-KBHVNJKO.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";export{a as getServerTransactionsByHashes};
|
|
2
2
|
//# sourceMappingURL=getServerTransactionsByHashes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as o}from"../../__chunks__/chunk-
|
|
1
|
+
import{s as o}from"../../__chunks__/chunk-SI4DRNUN.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import{b as t}from"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-KBHVNJKO.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{x as r}from"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-KY32AS5A.mjs";import m from"axios";var T=e=>{let{apiAddress:i}=t(o());return m.get(`${i}/${r}/${e}`,{timeout:1e4})};export{T as getTransactionByHash};
|
|
2
2
|
//# sourceMappingURL=getTransactionByHash.mjs.map
|