@multiversx/sdk-dapp 5.1.2-alpha.1 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/__chunks__/{chunk-XBRFDEG4.mjs → chunk-27OTZWDO.mjs} +2 -2
- package/out/__chunks__/{chunk-THI2ESLV.mjs → chunk-2DUVXRMU.mjs} +2 -2
- package/out/__chunks__/{chunk-A4R4G5XO.mjs → chunk-2HKAVY3C.mjs} +2 -2
- package/out/__chunks__/{chunk-SJ4MUNXH.mjs → chunk-2L25IGHZ.mjs} +2 -2
- package/out/__chunks__/{chunk-WSB5E7UB.mjs → chunk-2SVWHJC4.mjs} +2 -2
- package/out/__chunks__/{chunk-QW6CLOKD.mjs → chunk-3CKDOF3O.mjs} +2 -2
- package/out/__chunks__/chunk-3NQTC6AZ.mjs +2 -0
- package/out/__chunks__/{chunk-MH5NWDPB.mjs → chunk-4AUL3FHT.mjs} +2 -2
- package/out/__chunks__/chunk-4EMQSUU6.mjs +2 -0
- package/out/__chunks__/{chunk-G4J3ELJX.mjs → chunk-4XIT3N7Y.mjs} +2 -2
- package/out/__chunks__/{chunk-2FHHGZ3T.mjs → chunk-54XYKDH7.mjs} +2 -2
- package/out/__chunks__/{chunk-6KH3KBWW.mjs → chunk-5AZZG5KG.mjs} +2 -2
- package/out/__chunks__/chunk-5JYD7XMI.mjs +2 -0
- package/out/__chunks__/{chunk-KCW6EANO.mjs → chunk-6BF62TP4.mjs} +2 -2
- package/out/__chunks__/{chunk-JBMEDLYV.mjs → chunk-6PDGQGIS.mjs} +2 -2
- package/out/__chunks__/{chunk-NUGTEQDM.mjs → chunk-72D44IHE.mjs} +2 -2
- package/out/__chunks__/{chunk-IWEDMR3L.mjs → chunk-7ONKP4ZG.mjs} +2 -2
- package/out/__chunks__/{chunk-LQT4RCW4.mjs → chunk-7VNNDJ7P.mjs} +2 -2
- package/out/__chunks__/chunk-AQ6D3F5K.mjs +2 -0
- package/out/__chunks__/chunk-AQ6D3F5K.mjs.map +7 -0
- package/out/__chunks__/{chunk-55BUT2DM.mjs → chunk-ARAO6B2F.mjs} +2 -2
- package/out/__chunks__/{chunk-3JYOJ4YQ.mjs → chunk-AXCK3KRV.mjs} +2 -2
- package/out/__chunks__/{chunk-EL63EGMA.mjs → chunk-BGUYSNNW.mjs} +2 -2
- package/out/__chunks__/{chunk-IMPOALRX.mjs → chunk-BIVZJPSH.mjs} +1 -1
- package/out/__chunks__/{chunk-IMPOALRX.mjs.map → chunk-BIVZJPSH.mjs.map} +2 -2
- package/out/__chunks__/{chunk-KWOHYUBI.mjs → chunk-BQP6NPQM.mjs} +2 -2
- package/out/__chunks__/{chunk-NFNCA7X4.mjs → chunk-CAAMS3C5.mjs} +2 -2
- package/out/__chunks__/{chunk-MI4RORQZ.mjs → chunk-CYEMHPEX.mjs} +2 -2
- package/out/__chunks__/{chunk-MYDURWQE.mjs → chunk-DCX2NQAU.mjs} +2 -2
- package/out/__chunks__/{chunk-IRGVG3HG.mjs → chunk-DG77T3NS.mjs} +2 -2
- package/out/__chunks__/{chunk-7ZDBJIIG.mjs → chunk-DJ2HTZOV.mjs} +2 -2
- package/out/__chunks__/{chunk-M3TXYTY7.mjs → chunk-E5CUE265.mjs} +2 -2
- package/out/__chunks__/{chunk-VPA6IRSJ.mjs → chunk-FFHHIKMI.mjs} +2 -2
- package/out/__chunks__/chunk-FVFVOSQ4.mjs +2 -0
- package/out/__chunks__/{chunk-PJDJEPY2.mjs.map → chunk-FVFVOSQ4.mjs.map} +3 -3
- package/out/__chunks__/{chunk-EY4KOLUQ.mjs → chunk-GSRRAPL5.mjs} +2 -2
- package/out/__chunks__/{chunk-VMTIKPNF.mjs → chunk-H4DISFAI.mjs} +2 -2
- package/out/__chunks__/{chunk-AOAF6JOM.mjs → chunk-HOJ7JMTW.mjs} +2 -2
- package/out/__chunks__/{chunk-DNBALEVB.mjs → chunk-I4HR64FU.mjs} +2 -2
- package/out/__chunks__/{chunk-SX4YSAPS.mjs → chunk-I6WJ63GD.mjs} +2 -2
- package/out/__chunks__/{chunk-M362X4QE.mjs → chunk-IR743HKQ.mjs} +2 -2
- package/out/__chunks__/chunk-IRBGQJE4.mjs +2 -0
- package/out/__chunks__/{chunk-EMP4AJ5K.mjs → chunk-IWROXIQ5.mjs} +2 -2
- package/out/__chunks__/{chunk-QXHA5XJG.mjs → chunk-IZ4B4B35.mjs} +2 -2
- package/out/__chunks__/chunk-J64N3RXX.mjs +2 -0
- package/out/__chunks__/chunk-JN5CTLWW.mjs +2 -0
- package/out/__chunks__/{chunk-J3IIPBSL.mjs → chunk-JV7AJLRI.mjs} +2 -2
- package/out/__chunks__/{chunk-QPRSKCYO.mjs → chunk-KAQ5IXKK.mjs} +2 -2
- package/out/__chunks__/chunk-KK25BEMY.mjs +2 -0
- package/out/__chunks__/{chunk-5CKJT4NO.mjs → chunk-KP4MUQKU.mjs} +2 -2
- package/out/__chunks__/chunk-KX5J6EMC.mjs +2 -0
- package/out/__chunks__/{chunk-X4TO7DF4.mjs.map → chunk-KX5J6EMC.mjs.map} +1 -1
- package/out/__chunks__/chunk-KXUILKL2.mjs +2 -0
- package/out/__chunks__/chunk-KXUILKL2.mjs.map +7 -0
- package/out/__chunks__/{chunk-GZAYDA7W.mjs → chunk-LPGMDX6Q.mjs} +2 -2
- package/out/__chunks__/{chunk-VWKWN65J.mjs → chunk-LQ6WESDL.mjs} +2 -2
- package/out/__chunks__/chunk-LTRQRVWX.mjs +2 -0
- package/out/__chunks__/{chunk-PEVVIJ3R.mjs → chunk-LY3MRREN.mjs} +2 -2
- package/out/__chunks__/chunk-MGHFXYZ5.mjs +2 -0
- package/out/__chunks__/chunk-MK36TMYT.mjs +2 -0
- package/out/__chunks__/{chunk-J6IY7X4A.mjs → chunk-N6QD4PLA.mjs} +2 -2
- package/out/__chunks__/{chunk-LC3NMRQO.mjs → chunk-NZWPA245.mjs} +2 -2
- package/out/__chunks__/{chunk-LZQCDNHM.mjs → chunk-O24MRZB2.mjs} +2 -2
- package/out/__chunks__/{chunk-DXJ5LGIX.mjs → chunk-OCGNA44K.mjs} +2 -2
- package/out/__chunks__/chunk-OF3XH6ZU.mjs +2 -0
- package/out/__chunks__/{chunk-PPZ3GNGJ.mjs → chunk-OP2PPPAN.mjs} +2 -2
- package/out/__chunks__/{chunk-CV2NXEM6.mjs → chunk-PAAJPYAE.mjs} +2 -2
- package/out/__chunks__/{chunk-4LCYPBMP.mjs → chunk-PHMJQ5FC.mjs} +2 -2
- package/out/__chunks__/chunk-PLTUKRYU.mjs +2 -0
- package/out/__chunks__/chunk-PLTUKRYU.mjs.map +7 -0
- package/out/__chunks__/{chunk-OJZA7VEQ.mjs → chunk-PO3ODHJ7.mjs} +2 -2
- package/out/__chunks__/chunk-QQEQNSRI.mjs +2 -0
- package/out/__chunks__/{chunk-ZQ2G4FUO.mjs → chunk-RJOP7SCI.mjs} +2 -2
- package/out/__chunks__/{chunk-C4DY3CZP.mjs → chunk-RNSBN5JT.mjs} +2 -2
- package/out/__chunks__/{chunk-XWMIQG5L.mjs → chunk-S53SAYHR.mjs} +2 -2
- package/out/__chunks__/{chunk-7K52RCRP.mjs → chunk-S5YFFC7A.mjs} +2 -2
- package/out/__chunks__/chunk-SGQJOLH2.mjs +2 -0
- package/out/__chunks__/chunk-STVYY4LI.mjs +2 -0
- package/out/__chunks__/{chunk-LOK6ESLB.mjs.map → chunk-STVYY4LI.mjs.map} +2 -2
- package/out/__chunks__/{chunk-PQF47VZ5.mjs → chunk-TMMUB3IK.mjs} +2 -2
- package/out/__chunks__/chunk-TMOMM4JN.mjs +2 -0
- package/out/__chunks__/{chunk-4VPONYGE.mjs → chunk-UJUAT5NK.mjs} +2 -2
- package/out/__chunks__/{chunk-6WACOJG2.mjs → chunk-UXYMY3HG.mjs} +2 -2
- package/out/__chunks__/{chunk-4DNBZFZP.mjs → chunk-VRG2R5C7.mjs} +2 -2
- package/out/__chunks__/{chunk-S22DKQQQ.mjs → chunk-WJI5FXSZ.mjs} +2 -2
- package/out/__chunks__/{chunk-2DPKSENT.mjs → chunk-XNIJIKGB.mjs} +2 -2
- package/out/__chunks__/{chunk-CKPAEIWF.mjs → chunk-XUADWD55.mjs} +2 -2
- package/out/__chunks__/chunk-XUI3Z5NN.mjs +2 -0
- package/out/__chunks__/{chunk-DNGD7KKH.mjs → chunk-Y7QM3LPW.mjs} +2 -2
- package/out/__chunks__/{chunk-VTBN7CFO.mjs → chunk-YD2O3NV7.mjs} +2 -2
- package/out/__chunks__/{chunk-PHACGQQA.mjs → chunk-YFXATY46.mjs} +2 -2
- package/out/__chunks__/chunk-YVLFUMPH.mjs +2 -0
- package/out/__chunks__/{chunk-7CNSDGK5.mjs → chunk-Z63LDNZJ.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/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.cjs +1 -3
- package/out/managers/UnlockPanelManager/UnlockPanelManager.cjs.map +2 -2
- 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/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.cjs +3 -1
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.cjs.map +2 -2
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.cjs +8 -7
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.cjs.map +2 -2
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.d.ts +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
- package/out/managers/internal/ToastManager/types/index.mjs +1 -1
- package/out/managers/internal/ToastManager/types/toast.types.cjs.map +2 -2
- package/out/managers/internal/ToastManager/types/toast.types.d.ts +1 -0
- package/out/managers/internal/ToastManager/types/toast.types.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.cjs +2 -0
- package/out/methods/initApp/initApp.cjs.map +2 -2
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +3 -3
- package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs +28 -74
- package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs.map +2 -2
- 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/clearInitiatedLogins.cjs +0 -9
- package/out/providers/helpers/clearInitiatedLogins.cjs.map +2 -2
- package/out/providers/helpers/clearInitiatedLogins.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.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/validation/tests/addressIsValid.test.d.ts +1 -0
- 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 +4 -3
- package/out/__chunks__/chunk-2IA3N6X2.mjs +0 -2
- package/out/__chunks__/chunk-37Z3SLQK.mjs +0 -2
- package/out/__chunks__/chunk-4E4FWASC.mjs +0 -2
- package/out/__chunks__/chunk-4HEE3XZP.mjs +0 -2
- package/out/__chunks__/chunk-4HEE3XZP.mjs.map +0 -7
- package/out/__chunks__/chunk-4I5CGEEA.mjs +0 -2
- package/out/__chunks__/chunk-4MV4YBJL.mjs +0 -2
- package/out/__chunks__/chunk-54IH7FLV.mjs +0 -2
- package/out/__chunks__/chunk-AE4JJ7RL.mjs +0 -2
- package/out/__chunks__/chunk-C6L3VA2Y.mjs +0 -2
- package/out/__chunks__/chunk-C6L3VA2Y.mjs.map +0 -7
- package/out/__chunks__/chunk-DU4U4RQA.mjs +0 -2
- package/out/__chunks__/chunk-G4Z3ZQR6.mjs +0 -2
- package/out/__chunks__/chunk-G4Z3ZQR6.mjs.map +0 -7
- package/out/__chunks__/chunk-J5LYZT4O.mjs +0 -2
- package/out/__chunks__/chunk-LFT5SLMM.mjs +0 -2
- package/out/__chunks__/chunk-LOK6ESLB.mjs +0 -2
- package/out/__chunks__/chunk-LWYWMJNF.mjs +0 -2
- package/out/__chunks__/chunk-M34EBTB6.mjs +0 -2
- package/out/__chunks__/chunk-PJDJEPY2.mjs +0 -2
- package/out/__chunks__/chunk-SDDCT2O5.mjs +0 -2
- package/out/__chunks__/chunk-UCYN4JJO.mjs +0 -2
- package/out/__chunks__/chunk-X4TO7DF4.mjs +0 -2
- package/out/__chunks__/chunk-Y5TCOIV4.mjs +0 -2
- package/out/__chunks__/chunk-ZW4HQOAV.mjs +0 -2
- /package/out/__chunks__/{chunk-XBRFDEG4.mjs.map → chunk-27OTZWDO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-THI2ESLV.mjs.map → chunk-2DUVXRMU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A4R4G5XO.mjs.map → chunk-2HKAVY3C.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SJ4MUNXH.mjs.map → chunk-2L25IGHZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WSB5E7UB.mjs.map → chunk-2SVWHJC4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QW6CLOKD.mjs.map → chunk-3CKDOF3O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J5LYZT4O.mjs.map → chunk-3NQTC6AZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MH5NWDPB.mjs.map → chunk-4AUL3FHT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4I5CGEEA.mjs.map → chunk-4EMQSUU6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G4J3ELJX.mjs.map → chunk-4XIT3N7Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2FHHGZ3T.mjs.map → chunk-54XYKDH7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6KH3KBWW.mjs.map → chunk-5AZZG5KG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AE4JJ7RL.mjs.map → chunk-5JYD7XMI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KCW6EANO.mjs.map → chunk-6BF62TP4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JBMEDLYV.mjs.map → chunk-6PDGQGIS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NUGTEQDM.mjs.map → chunk-72D44IHE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IWEDMR3L.mjs.map → chunk-7ONKP4ZG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LQT4RCW4.mjs.map → chunk-7VNNDJ7P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-55BUT2DM.mjs.map → chunk-ARAO6B2F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3JYOJ4YQ.mjs.map → chunk-AXCK3KRV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EL63EGMA.mjs.map → chunk-BGUYSNNW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KWOHYUBI.mjs.map → chunk-BQP6NPQM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NFNCA7X4.mjs.map → chunk-CAAMS3C5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MI4RORQZ.mjs.map → chunk-CYEMHPEX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MYDURWQE.mjs.map → chunk-DCX2NQAU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IRGVG3HG.mjs.map → chunk-DG77T3NS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7ZDBJIIG.mjs.map → chunk-DJ2HTZOV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M3TXYTY7.mjs.map → chunk-E5CUE265.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VPA6IRSJ.mjs.map → chunk-FFHHIKMI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EY4KOLUQ.mjs.map → chunk-GSRRAPL5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VMTIKPNF.mjs.map → chunk-H4DISFAI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AOAF6JOM.mjs.map → chunk-HOJ7JMTW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DNBALEVB.mjs.map → chunk-I4HR64FU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SX4YSAPS.mjs.map → chunk-I6WJ63GD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M362X4QE.mjs.map → chunk-IR743HKQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M34EBTB6.mjs.map → chunk-IRBGQJE4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EMP4AJ5K.mjs.map → chunk-IWROXIQ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QXHA5XJG.mjs.map → chunk-IZ4B4B35.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4E4FWASC.mjs.map → chunk-J64N3RXX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LWYWMJNF.mjs.map → chunk-JN5CTLWW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J3IIPBSL.mjs.map → chunk-JV7AJLRI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QPRSKCYO.mjs.map → chunk-KAQ5IXKK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SDDCT2O5.mjs.map → chunk-KK25BEMY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5CKJT4NO.mjs.map → chunk-KP4MUQKU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GZAYDA7W.mjs.map → chunk-LPGMDX6Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VWKWN65J.mjs.map → chunk-LQ6WESDL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DU4U4RQA.mjs.map → chunk-LTRQRVWX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PEVVIJ3R.mjs.map → chunk-LY3MRREN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-37Z3SLQK.mjs.map → chunk-MGHFXYZ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y5TCOIV4.mjs.map → chunk-MK36TMYT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J6IY7X4A.mjs.map → chunk-N6QD4PLA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LC3NMRQO.mjs.map → chunk-NZWPA245.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LZQCDNHM.mjs.map → chunk-O24MRZB2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DXJ5LGIX.mjs.map → chunk-OCGNA44K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZW4HQOAV.mjs.map → chunk-OF3XH6ZU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PPZ3GNGJ.mjs.map → chunk-OP2PPPAN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CV2NXEM6.mjs.map → chunk-PAAJPYAE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4LCYPBMP.mjs.map → chunk-PHMJQ5FC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OJZA7VEQ.mjs.map → chunk-PO3ODHJ7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UCYN4JJO.mjs.map → chunk-QQEQNSRI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZQ2G4FUO.mjs.map → chunk-RJOP7SCI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C4DY3CZP.mjs.map → chunk-RNSBN5JT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XWMIQG5L.mjs.map → chunk-S53SAYHR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7K52RCRP.mjs.map → chunk-S5YFFC7A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4MV4YBJL.mjs.map → chunk-SGQJOLH2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PQF47VZ5.mjs.map → chunk-TMMUB3IK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2IA3N6X2.mjs.map → chunk-TMOMM4JN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4VPONYGE.mjs.map → chunk-UJUAT5NK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6WACOJG2.mjs.map → chunk-UXYMY3HG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4DNBZFZP.mjs.map → chunk-VRG2R5C7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S22DKQQQ.mjs.map → chunk-WJI5FXSZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2DPKSENT.mjs.map → chunk-XNIJIKGB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CKPAEIWF.mjs.map → chunk-XUADWD55.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LFT5SLMM.mjs.map → chunk-XUI3Z5NN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DNGD7KKH.mjs.map → chunk-Y7QM3LPW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VTBN7CFO.mjs.map → chunk-YD2O3NV7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PHACGQQA.mjs.map → chunk-YFXATY46.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-54IH7FLV.mjs.map → chunk-YVLFUMPH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7CNSDGK5.mjs.map → chunk-Z63LDNZJ.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-PO3ODHJ7.mjs";import{a}from"./chunk-OF3XH6ZU.mjs";import{a as u}from"./chunk-2HKAVY3C.mjs";import{c as n}from"./chunk-2SVWHJC4.mjs";import{a as s}from"./chunk-KX5J6EMC.mjs";var c=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(r,s.localStorage);try{return u(),n.forEach(g=>g()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-27OTZWDO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-QQEQNSRI.mjs";import{a as k}from"./chunk-J64N3RXX.mjs";import{q as f}from"./chunk-LPGMDX6Q.mjs";import{d as b}from"./chunk-UERJ6AKK.mjs";import{c as n}from"./chunk-2SVWHJC4.mjs";import{b as i}from"./chunk-GGBMHKR4.mjs";async function N(){let o=f(),I=g(),s=null,t=null,l=b(o.getState())?.timestamp,c=()=>{k()},u=()=>{s??=setInterval(c,I)},m=()=>{s&&(clearInterval(s),s=null)},p=()=>{m();let a=o.subscribe(({account:{websocketEvent:e}})=>{e?.message&&l!==e.timestamp&&(l=e.timestamp,c())});n.set("websocketEventReceived",a)},S=()=>{i.status!=="not_initialized"||t||(t=setInterval(()=>{i.status==="completed"&&(clearInterval(t),t=null,p())},1e3))};c();let r=()=>{m(),t&&(clearInterval(t),t=null)},v=o.subscribe(({account:{address:a},config:{websocketStatus:e}},T)=>{if(T.config.websocketStatus!==e)switch(e){case"completed":p();break;case"pending":u(),S();break;default:a?u():r();break}});return n.set("websocketStatusChanged",v),n.set("websocketEventReceived",r),{stopTransactionsTracking:r}}export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2DUVXRMU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as p,q as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as p,q as e}from"./chunk-LPGMDX6Q.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-2HKAVY3C.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-OP2PPPAN.mjs";import{a as s}from"./chunk-4XIT3N7Y.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-TMOMM4JN.mjs";import{b as A}from"./chunk-NZWPA245.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-LPGMDX6Q.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-PLUWBWJ2.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2L25IGHZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KX5J6EMC.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-2SVWHJC4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as A}from"./chunk-TMMUB3IK.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as f}from"./chunk-LY3MRREN.mjs";import{h as u}from"./chunk-CAA4VJRH.mjs";import{b as S}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-RNSBN5JT.mjs";import{a as g}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-5JYD7XMI.mjs";import{s as m}from"./chunk-LPGMDX6Q.mjs";import{b as T}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{S({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!I(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(e=>({...e,status:e.status??"pending"})),o=g(n),s=y({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:o??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return s;let i=A(a);return f({toastId:s,totalDuration:i}),s};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=T(m());return await Promise.all(a.map(async s=>{let i=await w.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}),e=i.data.txHash;return{...s.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=h(),{apiAddress:n,apiTimeout:o}=T(m());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let s=this.buildBatchId(t),e={transactions:a.map(p=>p.map(c=>c.toPlainObject())),id:s},{data:l}=await w.post(`${n}/batch`,e,{timeout:Number(o)}),B=l.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...l,transactions:B}}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3CKDOF3O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-IZ4B4B35.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-DNFWIYZH.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4AUL3FHT.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-PAAJPYAE.mjs";import{c as n}from"./chunk-LPGMDX6Q.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4EMQSUU6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-LTRQRVWX.mjs";import{a as m}from"./chunk-NZYB675D.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4XIT3N7Y.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-KX5J6EMC.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
|
|
2
|
+
//# sourceMappingURL=chunk-54XYKDH7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KX5J6EMC.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-5AZZG5KG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-ARAO6B2F.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6BF62TP4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-KX5J6EMC.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6PDGQGIS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-XUADWD55.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-72D44IHE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-XUADWD55.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7ONKP4ZG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-G4Z3ZQR6.mjs";import{a as se}from"./chunk-M3YL36ZL.mjs";import{a as te}from"./chunk-SJ4MUNXH.mjs";import{a as U}from"./chunk-PPZ3GNGJ.mjs";import{a as ie}from"./chunk-4DNBZFZP.mjs";import{a as re}from"./chunk-S22DKQQQ.mjs";import{a as I}from"./chunk-4MV4YBJL.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-MYDURWQE.mjs";import{a as p}from"./chunk-DNGD7KKH.mjs";import{a as Z}from"./chunk-ZQ2G4FUO.mjs";import{a as ne}from"./chunk-LZQCDNHM.mjs";import{a as oe}from"./chunk-5CKJT4NO.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-PEVVIJ3R.mjs";import{a as y}from"./chunk-M3TXYTY7.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-ZW4HQOAV.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-A4R4G5XO.mjs";import{a as F,q as j,s as l}from"./chunk-GZAYDA7W.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";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 te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({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 re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({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 o.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=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.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,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,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 k=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 n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}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=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(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 o.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 ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=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(n){throw await t({shouldCancelAction:!1}),n}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=ue.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 o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);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(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=se.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(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.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}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 ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=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 n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.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:ye.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 o.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:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);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=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});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:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,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 A=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 o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=q();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 M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ae(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(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}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as se}from"./chunk-AQ6D3F5K.mjs";import{a as te}from"./chunk-2L25IGHZ.mjs";import{a as U}from"./chunk-OP2PPPAN.mjs";import{a as ie}from"./chunk-VRG2R5C7.mjs";import{a as re}from"./chunk-WJI5FXSZ.mjs";import{a as I}from"./chunk-SGQJOLH2.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-DCX2NQAU.mjs";import{a as p}from"./chunk-Y7QM3LPW.mjs";import{a as Z}from"./chunk-RJOP7SCI.mjs";import{a as ne}from"./chunk-O24MRZB2.mjs";import{a as oe}from"./chunk-KP4MUQKU.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-LY3MRREN.mjs";import{a as y}from"./chunk-E5CUE265.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-OF3XH6ZU.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-2HKAVY3C.mjs";import{a as F,q as j,s as l}from"./chunk-LPGMDX6Q.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";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 te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({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 re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({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 o.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=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.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,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,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 k=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 n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}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=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(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 o.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 ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=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(n){throw await t({shouldCancelAction:!1}),n}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=ue.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 o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);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(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",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=E(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.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}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 ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=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 n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.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:ye.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 o.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:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);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=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});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:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,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 A=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 o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new ae;break}default:{let s=q();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 M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return se(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(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}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
+
//# sourceMappingURL=chunk-7VNNDJ7P.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-QJGFIK7H.mjs";import{a as r}from"./chunk-PLUWBWJ2.mjs";var a=n=>(Object.values(r).forEach(o=>{if(o!==n?.skipLoginMethod)switch(o){case r.crossWindow:{let e=i.getInstance();e.isInitialized()&&e.onDestroy();break}default:break}}),null);export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-AQ6D3F5K.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/helpers/clearInitiatedLogins.ts"],
|
|
4
|
+
"sourcesContent": ["import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider';\nimport { ProviderTypeEnum, ProviderType } from '../types/providerFactory.types';\n\nexport const clearInitiatedLogins = (\n props?: {\n skipLoginMethod: ProviderType;\n } | null\n) => {\n Object.values(ProviderTypeEnum).forEach((method) => {\n if (method === props?.skipLoginMethod) {\n return;\n }\n\n switch (method) {\n case ProviderTypeEnum.crossWindow: {\n const crossWindowProvider = CrossWindowProvider.getInstance();\n if (crossWindowProvider.isInitialized()) {\n // Clean up the crossWindowProvider state without triggering a full logout.\n crossWindowProvider.onDestroy();\n }\n break;\n }\n\n default:\n break;\n }\n });\n\n return null;\n};\n"],
|
|
5
|
+
"mappings": "kFAGO,IAAMA,EACXC,IAIA,OAAO,OAAOC,CAAgB,EAAE,QAASC,GAAW,CAClD,GAAIA,IAAWF,GAAO,gBAItB,OAAQE,EAAQ,CACd,KAAKD,EAAiB,YAAa,CACjC,IAAME,EAAsBC,EAAoB,YAAY,EACxDD,EAAoB,cAAc,GAEpCA,EAAoB,UAAU,EAEhC,KACF,CAEA,QACE,KACJ,CACF,CAAC,EAEM",
|
|
6
|
+
"names": ["clearInitiatedLogins", "props", "ProviderTypeEnum", "method", "crossWindowProvider", "CrossWindowProvider"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-BGUYSNNW.mjs";import{a as g}from"./chunk-3S57OP4Z.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ARAO6B2F.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-JV7AJLRI.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AXCK3KRV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-IWROXIQ5.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-BGUYSNNW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var a=(t=>(t.success="Transaction successful",t.received="Transaction received",t.failed="Transaction failed",t.pending="Processing transaction",t.timedOut="Transaction timed out",t.invalid="Transaction invalid",t))(a||{}),r=(t=>(t.OPEN_NOTIFICATIONS_FEED="OPEN_NOTIFICATIONS_FEED",t.CLOSE="CLOSE_TOAST",t.TRANSACTION_TOAST_DATA_UPDATE="TRANSACTION_TOAST_DATA_UPDATE",t.CUSTOM_TOAST_DATA_UPDATE="CUSTOM_TOAST_DATA_UPDATE",t.HIDE="HIDE_TOAST_LIST",t.SHOW="SHOW_TOAST_LIST",t))(r||{});export{a,r as b};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-BIVZJPSH.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/managers/internal/ToastManager/types/toast.types.ts"],
|
|
4
|
-
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\n\nexport enum TransactionsDefaultTitles {\n success = 'Transaction successful',\n received = 'Transaction received',\n failed = 'Transaction failed',\n pending = 'Processing transaction',\n timedOut = 'Transaction timed out',\n invalid = 'Transaction invalid'\n}\n\nexport interface GetToastsOptionsDataPropsType {\n address: string;\n sender: string;\n status?: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n toastId: string;\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n}\n\nexport interface IToastDataState {\n id: string;\n icon: string;\n hasCloseButton: boolean;\n title: string;\n iconClassName: string;\n}\nexport interface ITransactionProgressState {\n startTime: number;\n endTime: number;\n}\nexport interface ITransaction {\n hash: string;\n status: string;\n link: string;\n}\nexport interface ITransactionToast {\n toastId: string;\n processedTransactionsStatus: string;\n transactions: ITransactionListItem[];\n toastDataState: IToastDataState;\n transactionProgressState?: ITransactionProgressState | null;\n}\n\nexport enum ToastEventsEnum {\n OPEN_NOTIFICATIONS_FEED = 'OPEN_NOTIFICATIONS_FEED',\n CLOSE = 'CLOSE_TOAST',\n // Event to update the transaction toast data\n TRANSACTION_TOAST_DATA_UPDATE = 'TRANSACTION_TOAST_DATA_UPDATE',\n // Event to update the custom toast data\n CUSTOM_TOAST_DATA_UPDATE = 'CUSTOM_TOAST_DATA_UPDATE',\n HIDE = 'HIDE_TOAST_LIST',\n SHOW = 'SHOW_TOAST_LIST'\n}\n"],
|
|
5
|
-
"mappings": "AAOO,IAAKA,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,uBACXA,EAAA,OAAS,qBACTA,EAAA,QAAU,yBACVA,EAAA,SAAW,wBACXA,EAAA,QAAU,sBANAA,OAAA,
|
|
4
|
+
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\n\nexport enum TransactionsDefaultTitles {\n success = 'Transaction successful',\n received = 'Transaction received',\n failed = 'Transaction failed',\n pending = 'Processing transaction',\n timedOut = 'Transaction timed out',\n invalid = 'Transaction invalid'\n}\n\nexport interface GetToastsOptionsDataPropsType {\n address: string;\n sender: string;\n status?: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n toastId: string;\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n txActionName?: string;\n}\n\nexport interface IToastDataState {\n id: string;\n icon: string;\n hasCloseButton: boolean;\n title: string;\n iconClassName: string;\n}\nexport interface ITransactionProgressState {\n startTime: number;\n endTime: number;\n}\nexport interface ITransaction {\n hash: string;\n status: string;\n link: string;\n}\nexport interface ITransactionToast {\n toastId: string;\n processedTransactionsStatus: string;\n transactions: ITransactionListItem[];\n toastDataState: IToastDataState;\n transactionProgressState?: ITransactionProgressState | null;\n}\n\nexport enum ToastEventsEnum {\n OPEN_NOTIFICATIONS_FEED = 'OPEN_NOTIFICATIONS_FEED',\n CLOSE = 'CLOSE_TOAST',\n // Event to update the transaction toast data\n TRANSACTION_TOAST_DATA_UPDATE = 'TRANSACTION_TOAST_DATA_UPDATE',\n // Event to update the custom toast data\n CUSTOM_TOAST_DATA_UPDATE = 'CUSTOM_TOAST_DATA_UPDATE',\n HIDE = 'HIDE_TOAST_LIST',\n SHOW = 'SHOW_TOAST_LIST'\n}\n"],
|
|
5
|
+
"mappings": "AAOO,IAAKA,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,uBACXA,EAAA,OAAS,qBACTA,EAAA,QAAU,yBACVA,EAAA,SAAW,wBACXA,EAAA,QAAU,sBANAA,OAAA,IA0CAC,OACVA,EAAA,wBAA0B,0BAC1BA,EAAA,MAAQ,cAERA,EAAA,8BAAgC,gCAEhCA,EAAA,yBAA2B,2BAC3BA,EAAA,KAAO,kBACPA,EAAA,KAAO,kBARGA,OAAA",
|
|
6
6
|
"names": ["TransactionsDefaultTitles", "ToastEventsEnum"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-GSRRAPL5.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BQP6NPQM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-BQP6NPQM.mjs";import{b as r}from"./chunk-LQ6WESDL.mjs";import{s as i}from"./chunk-LPGMDX6Q.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CAAMS3C5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-LPGMDX6Q.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CYEMHPEX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-Y7QM3LPW.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{a as e,b as t}from"./chunk-KX5J6EMC.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DCX2NQAU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KX5J6EMC.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-DG77T3NS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-5JYD7XMI.mjs";import{a as f}from"./chunk-ARAO6B2F.mjs";import{a as g}from"./chunk-IWROXIQ5.mjs";import{b as a}from"./chunk-LPGMDX6Q.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-DJ2HTZOV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-FFHHIKMI.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-E5CUE265.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-6PDGQGIS.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-FFHHIKMI.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-VDMJZZU4.mjs";import{b as r}from"./chunk-PLTUKRYU.mjs";import{j as n}from"./chunk-65L5EBBL.mjs";var y=({toastId:a,address:e,status:s,transactions:t,transactionsDisplayInfo:i,startTime:c,endTime:T})=>{let m=n(s),p=t[0]?.action?.name,f=r({address:e,sender:t[0]?.interactor??"",toastId:a,status:s,transactionsDisplayInfo:i,txActionName:p}),u=o(t);return{toastDataState:f,processedTransactionsStatus:u,transactionProgressState:m?{endTime:T,startTime:c}:null,toastId:a,transactions:t}};export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FVFVOSQ4.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/managers/internal/ToastManager/helpers/createTransactionToast.ts"],
|
|
4
|
-
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\nimport { getToastDataStateByStatus } from './getToastDataStateByStatus';\nimport { getToastTransactionsStatus } from './getToastTransactionsStatus';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateTransactionToastParamsType {\n toastId: string;\n address: string;\n status: TransactionServerStatusesEnum;\n transactions: ITransactionListItem[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n explorerAddress: string;\n startTime: number;\n endTime: number;\n}\n\nexport const createTransactionToast = ({\n toastId,\n address,\n status,\n transactions,\n transactionsDisplayInfo,\n startTime,\n endTime\n}: CreateTransactionToastParamsType): ITransactionToast => {\n const isPending = getIsTransactionPending(status);\n\n const toastDataState = getToastDataStateByStatus({\n address,\n sender: transactions[0]?.interactor ?? '',\n toastId,\n status,\n transactionsDisplayInfo\n });\n\n const processedTransactionsStatus = getToastTransactionsStatus(transactions);\n\n const transactionProgressState = isPending\n ? {\n endTime,\n startTime\n }\n : null;\n\n return {\n toastDataState,\n processedTransactionsStatus,\n transactionProgressState,\n toastId,\n transactions\n };\n};\n"],
|
|
5
|
-
"mappings": "2HAkBO,IAAMA,EAAyB,CAAC,CACrC,QAAAC,EACA,QAAAC,EACA,OAAAC,EACA,aAAAC,EACA,wBAAAC,EACA,UAAAC,EACA,QAAAC,CACF,IAA2D,CACzD,IAAMC,EAAYC,EAAwBN,CAAM,EAE1CO,EAAiBC,EAA0B,CAC/C,
|
|
6
|
-
"names": ["createTransactionToast", "toastId", "address", "status", "transactions", "transactionsDisplayInfo", "startTime", "endTime", "isPending", "getIsTransactionPending", "toastDataState", "getToastDataStateByStatus", "processedTransactionsStatus", "getToastTransactionsStatus"]
|
|
4
|
+
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\nimport { getToastDataStateByStatus } from './getToastDataStateByStatus';\nimport { getToastTransactionsStatus } from './getToastTransactionsStatus';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateTransactionToastParamsType {\n toastId: string;\n address: string;\n status: TransactionServerStatusesEnum;\n transactions: ITransactionListItem[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n explorerAddress: string;\n startTime: number;\n endTime: number;\n}\n\nexport const createTransactionToast = ({\n toastId,\n address,\n status,\n transactions,\n transactionsDisplayInfo,\n startTime,\n endTime\n}: CreateTransactionToastParamsType): ITransactionToast => {\n const isPending = getIsTransactionPending(status);\n // Extracts action name from the first transaction\n const txActionName = transactions[0]?.action?.name;\n\n const toastDataState = getToastDataStateByStatus({\n address,\n sender: transactions[0]?.interactor ?? '',\n toastId,\n status,\n transactionsDisplayInfo,\n txActionName\n });\n\n const processedTransactionsStatus = getToastTransactionsStatus(transactions);\n\n const transactionProgressState = isPending\n ? {\n endTime,\n startTime\n }\n : null;\n\n return {\n toastDataState,\n processedTransactionsStatus,\n transactionProgressState,\n toastId,\n transactions\n };\n};\n"],
|
|
5
|
+
"mappings": "2HAkBO,IAAMA,EAAyB,CAAC,CACrC,QAAAC,EACA,QAAAC,EACA,OAAAC,EACA,aAAAC,EACA,wBAAAC,EACA,UAAAC,EACA,QAAAC,CACF,IAA2D,CACzD,IAAMC,EAAYC,EAAwBN,CAAM,EAE1CO,EAAeN,EAAa,CAAC,GAAG,QAAQ,KAExCO,EAAiBC,EAA0B,CAC/C,QAAAV,EACA,OAAQE,EAAa,CAAC,GAAG,YAAc,GACvC,QAAAH,EACA,OAAAE,EACA,wBAAAE,EACA,aAAAK,CACF,CAAC,EAEKG,EAA8BC,EAA2BV,CAAY,EAS3E,MAAO,CACL,eAAAO,EACA,4BAAAE,EACA,yBAV+BL,EAC7B,CACE,QAAAD,EACA,UAAAD,CACF,EACA,KAMF,QAAAL,EACA,aAAAG,CACF,CACF",
|
|
6
|
+
"names": ["createTransactionToast", "toastId", "address", "status", "transactions", "transactionsDisplayInfo", "startTime", "endTime", "isPending", "getIsTransactionPending", "txActionName", "toastDataState", "getToastDataStateByStatus", "processedTransactionsStatus", "getToastTransactionsStatus"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-LPGMDX6Q.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-GSRRAPL5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-KX5J6EMC.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-H4DISFAI.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-LPGMDX6Q.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-HOJ7JMTW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-DG77T3NS.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-I4HR64FU.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-LPGMDX6Q.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-I6WJ63GD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-LY3MRREN.mjs";import{q as u}from"./chunk-LPGMDX6Q.mjs";import{a as p}from"./chunk-UERJ6AKK.mjs";import{a as h,c as l,g as c}from"./chunk-NTEMINYA.mjs";import{a as y}from"./chunk-KX5J6EMC.mjs";var M=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=u();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){y.addEventListener("message",this.handleMessage)}stopListening(){y.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}=p(this.store.getState()),r=g(),n=new c({address:new l(t),data:new Uint8Array(Buffer.from(a))}),d=(await r.signMessage(n))?.signature??"";e.source?.postMessage({type:i.loginResponse,payload:{data:{address:t,signature:Buffer.from(d).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}=p(this.store.getState()),{message:t}=s;try{let r=new c({address:new l(a),data:new Uint8Array(Buffer.from(t))}),d=(await g().signMessage(r))?.signature??"";e.source?.postMessage({type:i.signMessageResponse,payload:{data:{signature:Buffer.from(d).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=>h.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-IR743HKQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-LPGMDX6Q.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-IWROXIQ5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-I6WJ63GD.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-IZ4B4B35.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-S53SAYHR.mjs";import{b as s}from"./chunk-TQA3JDNV.mjs";import{s as n}from"./chunk-LPGMDX6Q.mjs";async function f(){let t=s(n());if(Object.keys(t).length>0)for(let[e,{transactions:c}]of Object.entries(t))await o({sessionId:e,transactionBatch:c})}export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-J64N3RXX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-N6QD4PLA.mjs";import{a as p}from"./chunk-PHMJQ5FC.mjs";import{a as d}from"./chunk-IRBGQJE4.mjs";import{a as T}from"./chunk-3L7HZ2SO.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JV7AJLRI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-OF3XH6ZU.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-KAQ5IXKK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-5JYD7XMI.mjs";import{s as e}from"./chunk-LPGMDX6Q.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KP4MUQKU.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/window.constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.1.2
|
|
4
|
+
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.1.2'; // will be replaced at build time\n"],
|
|
5
5
|
"mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
|
|
6
6
|
"names": ["safeWindow", "version"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-HOJ7JMTW.mjs";import{d as m,e as l}from"./chunk-NZWPA245.mjs";import{q as a}from"./chunk-LPGMDX6Q.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KXUILKL2.mjs.map
|