@multiversx/sdk-dapp 5.0.1 → 5.0.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/README.md +5 -1
- package/out/__chunks__/{chunk-T25ZUXIB.mjs → chunk-36VCBI2F.mjs} +2 -2
- package/out/__chunks__/chunk-4X3GF5DF.mjs +2 -0
- package/out/__chunks__/{chunk-MVWJW7DI.mjs → chunk-54I7T2PP.mjs} +2 -2
- package/out/__chunks__/{chunk-4EU55YPS.mjs → chunk-5ECETGF7.mjs} +2 -2
- package/out/__chunks__/chunk-62EX26PE.mjs +2 -0
- package/out/__chunks__/{chunk-NV24F4LU.mjs → chunk-673M5M6E.mjs} +2 -2
- package/out/__chunks__/{chunk-YLFF3FGK.mjs → chunk-6EBIYJLF.mjs} +2 -2
- package/out/__chunks__/{chunk-ZOYKRLX3.mjs → chunk-6IACSXVX.mjs} +2 -2
- package/out/__chunks__/chunk-6JEPIISC.mjs +2 -0
- package/out/__chunks__/{chunk-SAHYDY7R.mjs → chunk-6RAMYSEC.mjs} +2 -2
- package/out/__chunks__/{chunk-X4ZHTAK3.mjs → chunk-6RJQVLIY.mjs} +2 -2
- package/out/__chunks__/{chunk-4MZZTC2O.mjs → chunk-6TJVNG7O.mjs} +2 -2
- package/out/__chunks__/{chunk-EKQLIEZD.mjs → chunk-6W67LK22.mjs} +2 -2
- package/out/__chunks__/{chunk-6KWXVSHC.mjs → chunk-7D7CRUIW.mjs} +2 -2
- package/out/__chunks__/{chunk-GNZBRVMQ.mjs → chunk-A4RNPJJW.mjs} +2 -2
- package/out/__chunks__/{chunk-JK5DKI6N.mjs → chunk-A6IG4DO6.mjs} +2 -2
- package/out/__chunks__/{chunk-KGDFAELQ.mjs → chunk-AZMKY66I.mjs} +2 -2
- package/out/__chunks__/{chunk-KPKKMTAV.mjs → chunk-BVKUZJNB.mjs} +2 -2
- package/out/__chunks__/chunk-C5X7N2AN.mjs +2 -0
- package/out/__chunks__/chunk-C6NGX4MC.mjs +2 -0
- package/out/__chunks__/{chunk-Z6USXJA6.mjs → chunk-COZTBWPH.mjs} +2 -2
- package/out/__chunks__/{chunk-U5KZZ3SL.mjs → chunk-CQ5GZXM5.mjs} +2 -2
- package/out/__chunks__/chunk-D5IP4ZG2.mjs +2 -0
- package/out/__chunks__/{chunk-HVAT2QP5.mjs → chunk-DIV6ZH5K.mjs} +2 -2
- package/out/__chunks__/{chunk-OP3F2KDT.mjs → chunk-DPUWJW5E.mjs} +2 -2
- package/out/__chunks__/{chunk-3AARPJLE.mjs → chunk-EVTERXBU.mjs} +2 -2
- package/out/__chunks__/chunk-FZS7JL2U.mjs +2 -0
- package/out/__chunks__/{chunk-ZJO25VCQ.mjs → chunk-HCAXI2LY.mjs} +2 -2
- package/out/__chunks__/{chunk-JYG4XQGL.mjs → chunk-HVEI4BFC.mjs} +2 -2
- package/out/__chunks__/{chunk-RQ6IYTUI.mjs → chunk-I6BAZCYU.mjs} +2 -2
- package/out/__chunks__/chunk-I7NIOE4D.mjs +2 -0
- package/out/__chunks__/{chunk-WW5FDETV.mjs → chunk-ICZ6YALG.mjs} +2 -2
- package/out/__chunks__/{chunk-V4LGVF2H.mjs → chunk-IHKF4UNO.mjs} +2 -2
- package/out/__chunks__/{chunk-XT7JL5LN.mjs → chunk-IP3MMHXY.mjs} +2 -2
- package/out/__chunks__/{chunk-FIKCZQ2J.mjs → chunk-JESUVU73.mjs} +2 -2
- package/out/__chunks__/{chunk-AROH3QTC.mjs → chunk-JQ47IJOB.mjs} +2 -2
- package/out/__chunks__/{chunk-XF7JEPPX.mjs → chunk-JQTCROGW.mjs} +2 -2
- package/out/__chunks__/{chunk-X34UQOZD.mjs → chunk-KDCMWWIT.mjs} +2 -2
- package/out/__chunks__/{chunk-HCLEWSLP.mjs → chunk-KGXIPD5I.mjs} +2 -2
- package/out/__chunks__/{chunk-4WAEN6KC.mjs → chunk-KIQBMB2Y.mjs} +2 -2
- package/out/__chunks__/{chunk-P36YE74A.mjs → chunk-KO5KDKZ7.mjs} +2 -2
- package/out/__chunks__/{chunk-CSTNJXBE.mjs → chunk-KU74A6T3.mjs} +2 -2
- package/out/__chunks__/chunk-KZC44J42.mjs +2 -0
- package/out/__chunks__/{chunk-T2QCATZQ.mjs → chunk-LTHGO7JM.mjs} +2 -2
- package/out/__chunks__/{chunk-6AI3AGZ4.mjs → chunk-M7EUMCPG.mjs} +2 -2
- package/out/__chunks__/{chunk-UA3COBIJ.mjs → chunk-MD7CSIXL.mjs} +2 -2
- package/out/__chunks__/{chunk-2R5LWF2W.mjs → chunk-MELQLFCR.mjs} +2 -2
- package/out/__chunks__/{chunk-AG6XMOI3.mjs → chunk-MFK6BEXF.mjs} +2 -2
- package/out/__chunks__/{chunk-TCXS5HPN.mjs → chunk-MOOY3SNQ.mjs} +2 -2
- package/out/__chunks__/{chunk-LXGUUE34.mjs → chunk-MYSCFOXV.mjs} +2 -2
- package/out/__chunks__/{chunk-AODYWSUW.mjs → chunk-O4DQ3TWG.mjs} +2 -2
- package/out/__chunks__/{chunk-EHU5RQBI.mjs → chunk-OZCEAS6L.mjs} +2 -2
- package/out/__chunks__/{chunk-PKQWIPKE.mjs → chunk-PFXB2A66.mjs} +2 -2
- package/out/__chunks__/chunk-PO27JYMA.mjs +2 -0
- package/out/__chunks__/chunk-PQY2A63Y.mjs +2 -0
- package/out/__chunks__/chunk-PWEOLD6L.mjs +2 -0
- package/out/__chunks__/{chunk-T4GLLB7R.mjs.map → chunk-PWEOLD6L.mjs.map} +1 -1
- package/out/__chunks__/{chunk-PYBAW4QY.mjs → chunk-QZGJ5DCM.mjs} +2 -2
- package/out/__chunks__/{chunk-J66NP5YS.mjs → chunk-R5SGFTE7.mjs} +2 -2
- package/out/__chunks__/{chunk-F32BTVEV.mjs → chunk-ROYSFSCI.mjs} +2 -2
- package/out/__chunks__/{chunk-MK3PM2DT.mjs → chunk-RT44V62F.mjs} +2 -2
- package/out/__chunks__/{chunk-UUCTTBX3.mjs → chunk-RU7LAHKK.mjs} +2 -2
- package/out/__chunks__/{chunk-CSHGMI74.mjs → chunk-RVEEVVOA.mjs} +2 -2
- package/out/__chunks__/{chunk-ZOWAHQJJ.mjs → chunk-SRX2EMTG.mjs} +2 -2
- package/out/__chunks__/{chunk-IAKBA5XK.mjs → chunk-SXECAH2A.mjs} +2 -2
- package/out/__chunks__/{chunk-2EV6M7VE.mjs → chunk-T2BUXSZ5.mjs} +2 -2
- package/out/__chunks__/{chunk-3ZB7JXE7.mjs → chunk-T4BJTXVW.mjs} +2 -2
- package/out/__chunks__/{chunk-YJPW44AG.mjs → chunk-U22MXHMS.mjs} +2 -2
- package/out/__chunks__/chunk-U7R4JK6U.mjs +2 -0
- package/out/__chunks__/{chunk-45ZH7OXW.mjs → chunk-V4Z4FQJO.mjs} +2 -2
- package/out/__chunks__/{chunk-AWX5SSJV.mjs → chunk-VTJUZ3TY.mjs} +2 -2
- package/out/__chunks__/{chunk-FWJIV6IK.mjs → chunk-VWYDJFJH.mjs} +2 -2
- package/out/__chunks__/{chunk-5HHIOEWB.mjs → chunk-XALHL7VA.mjs} +2 -2
- package/out/__chunks__/chunk-XLVZQDL3.mjs +2 -0
- package/out/__chunks__/chunk-XTJQ2D6K.mjs +2 -0
- package/out/__chunks__/{chunk-3POGSGSD.mjs → chunk-XVAA5JSP.mjs} +2 -2
- package/out/__chunks__/{chunk-7Z3LULCU.mjs → chunk-XVFVG64Y.mjs} +2 -2
- package/out/__chunks__/chunk-YMNKYTXZ.mjs +2 -0
- package/out/__chunks__/chunk-YNEVRTJM.mjs +2 -0
- package/out/__chunks__/{chunk-VODKTFMS.mjs → chunk-YRCMHPYS.mjs} +2 -2
- package/out/__chunks__/{chunk-3L3E75PE.mjs → chunk-YUIJMELA.mjs} +2 -2
- package/out/__chunks__/chunk-ZU7V2CMU.mjs +2 -0
- 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.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/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.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/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +2 -2
- package/out/__chunks__/chunk-2A4BH65X.mjs +0 -2
- package/out/__chunks__/chunk-5AJYN23S.mjs +0 -2
- package/out/__chunks__/chunk-6LDLCMZI.mjs +0 -2
- package/out/__chunks__/chunk-7JIHOTRV.mjs +0 -2
- package/out/__chunks__/chunk-7Q275OU5.mjs +0 -2
- package/out/__chunks__/chunk-CWQ4LFF5.mjs +0 -2
- package/out/__chunks__/chunk-F5V7QBOX.mjs +0 -2
- package/out/__chunks__/chunk-FYSGC7MW.mjs +0 -2
- package/out/__chunks__/chunk-FZUIOPJF.mjs +0 -2
- package/out/__chunks__/chunk-LX6L54F3.mjs +0 -2
- package/out/__chunks__/chunk-O2IPPL6D.mjs +0 -2
- package/out/__chunks__/chunk-O75VXVPG.mjs +0 -2
- package/out/__chunks__/chunk-OPLNE5E4.mjs +0 -2
- package/out/__chunks__/chunk-P6A7X5MA.mjs +0 -2
- package/out/__chunks__/chunk-PY3U6O6G.mjs +0 -2
- package/out/__chunks__/chunk-RXQV73QD.mjs +0 -2
- package/out/__chunks__/chunk-T4GLLB7R.mjs +0 -2
- package/out/__chunks__/chunk-X2BF4TGY.mjs +0 -2
- /package/out/__chunks__/{chunk-T25ZUXIB.mjs.map → chunk-36VCBI2F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X2BF4TGY.mjs.map → chunk-4X3GF5DF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MVWJW7DI.mjs.map → chunk-54I7T2PP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4EU55YPS.mjs.map → chunk-5ECETGF7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PY3U6O6G.mjs.map → chunk-62EX26PE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NV24F4LU.mjs.map → chunk-673M5M6E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YLFF3FGK.mjs.map → chunk-6EBIYJLF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZOYKRLX3.mjs.map → chunk-6IACSXVX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P6A7X5MA.mjs.map → chunk-6JEPIISC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SAHYDY7R.mjs.map → chunk-6RAMYSEC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X4ZHTAK3.mjs.map → chunk-6RJQVLIY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4MZZTC2O.mjs.map → chunk-6TJVNG7O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EKQLIEZD.mjs.map → chunk-6W67LK22.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6KWXVSHC.mjs.map → chunk-7D7CRUIW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GNZBRVMQ.mjs.map → chunk-A4RNPJJW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JK5DKI6N.mjs.map → chunk-A6IG4DO6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KGDFAELQ.mjs.map → chunk-AZMKY66I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KPKKMTAV.mjs.map → chunk-BVKUZJNB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7Q275OU5.mjs.map → chunk-C5X7N2AN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O2IPPL6D.mjs.map → chunk-C6NGX4MC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z6USXJA6.mjs.map → chunk-COZTBWPH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U5KZZ3SL.mjs.map → chunk-CQ5GZXM5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FYSGC7MW.mjs.map → chunk-D5IP4ZG2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HVAT2QP5.mjs.map → chunk-DIV6ZH5K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OP3F2KDT.mjs.map → chunk-DPUWJW5E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3AARPJLE.mjs.map → chunk-EVTERXBU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6LDLCMZI.mjs.map → chunk-FZS7JL2U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZJO25VCQ.mjs.map → chunk-HCAXI2LY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JYG4XQGL.mjs.map → chunk-HVEI4BFC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RQ6IYTUI.mjs.map → chunk-I6BAZCYU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LX6L54F3.mjs.map → chunk-I7NIOE4D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WW5FDETV.mjs.map → chunk-ICZ6YALG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V4LGVF2H.mjs.map → chunk-IHKF4UNO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XT7JL5LN.mjs.map → chunk-IP3MMHXY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FIKCZQ2J.mjs.map → chunk-JESUVU73.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AROH3QTC.mjs.map → chunk-JQ47IJOB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XF7JEPPX.mjs.map → chunk-JQTCROGW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X34UQOZD.mjs.map → chunk-KDCMWWIT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HCLEWSLP.mjs.map → chunk-KGXIPD5I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4WAEN6KC.mjs.map → chunk-KIQBMB2Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P36YE74A.mjs.map → chunk-KO5KDKZ7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CSTNJXBE.mjs.map → chunk-KU74A6T3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F5V7QBOX.mjs.map → chunk-KZC44J42.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-T2QCATZQ.mjs.map → chunk-LTHGO7JM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6AI3AGZ4.mjs.map → chunk-M7EUMCPG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UA3COBIJ.mjs.map → chunk-MD7CSIXL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2R5LWF2W.mjs.map → chunk-MELQLFCR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AG6XMOI3.mjs.map → chunk-MFK6BEXF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TCXS5HPN.mjs.map → chunk-MOOY3SNQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LXGUUE34.mjs.map → chunk-MYSCFOXV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AODYWSUW.mjs.map → chunk-O4DQ3TWG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EHU5RQBI.mjs.map → chunk-OZCEAS6L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PKQWIPKE.mjs.map → chunk-PFXB2A66.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OPLNE5E4.mjs.map → chunk-PO27JYMA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2A4BH65X.mjs.map → chunk-PQY2A63Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PYBAW4QY.mjs.map → chunk-QZGJ5DCM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J66NP5YS.mjs.map → chunk-R5SGFTE7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F32BTVEV.mjs.map → chunk-ROYSFSCI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MK3PM2DT.mjs.map → chunk-RT44V62F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UUCTTBX3.mjs.map → chunk-RU7LAHKK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CSHGMI74.mjs.map → chunk-RVEEVVOA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZOWAHQJJ.mjs.map → chunk-SRX2EMTG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IAKBA5XK.mjs.map → chunk-SXECAH2A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2EV6M7VE.mjs.map → chunk-T2BUXSZ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3ZB7JXE7.mjs.map → chunk-T4BJTXVW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YJPW44AG.mjs.map → chunk-U22MXHMS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5AJYN23S.mjs.map → chunk-U7R4JK6U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-45ZH7OXW.mjs.map → chunk-V4Z4FQJO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AWX5SSJV.mjs.map → chunk-VTJUZ3TY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FWJIV6IK.mjs.map → chunk-VWYDJFJH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5HHIOEWB.mjs.map → chunk-XALHL7VA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RXQV73QD.mjs.map → chunk-XLVZQDL3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7JIHOTRV.mjs.map → chunk-XTJQ2D6K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3POGSGSD.mjs.map → chunk-XVAA5JSP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7Z3LULCU.mjs.map → chunk-XVFVG64Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FZUIOPJF.mjs.map → chunk-YMNKYTXZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O75VXVPG.mjs.map → chunk-YNEVRTJM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VODKTFMS.mjs.map → chunk-YRCMHPYS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3L3E75PE.mjs.map → chunk-YUIJMELA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CWQ4LFF5.mjs.map → chunk-ZU7V2CMU.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -747,7 +747,9 @@ If you want to override private components and create your own, you can implemen
|
|
|
747
747
|
|
|
748
748
|
## Debugging your dApp
|
|
749
749
|
|
|
750
|
-
|
|
750
|
+
> **Note:** For an advanced documentation on how internal flows are implemented, you can check out the [deepwiki](https://deepwiki.com/multiversx/mx-sdk-dapp) diagrams.
|
|
751
|
+
|
|
752
|
+
The recommended way to debug your application is by using [lerna](https://lerna.js.org/). Make sure you have the same package version in sdk-dapp's package.json and in your project's package.json.
|
|
751
753
|
|
|
752
754
|
If you preffer to use [npm link](https://docs.npmjs.com/cli/v11/commands/npm-link), make sure to use the `preserveSymlinks` option in the server configuration:
|
|
753
755
|
|
|
@@ -760,6 +762,8 @@ If you preffer to use [npm link](https://docs.npmjs.com/cli/v11/commands/npm-lin
|
|
|
760
762
|
},
|
|
761
763
|
```
|
|
762
764
|
|
|
765
|
+
Crome Redux DevTools are by default enabled to help you debug your application. You can find the extension in the Chrome Extensions store.
|
|
766
|
+
|
|
763
767
|
To build the library, run:
|
|
764
768
|
|
|
765
769
|
```bash
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-KGXIPD5I.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-36VCBI2F.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-FMQYLMTU.mjs";import{b as s,c as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-FMQYLMTU.mjs";import{b as s,c as r}from"./chunk-JQTCROGW.mjs";async function l({results:e,hash:i,sessionId:t}){let a=e?.find(o=>o?.returnMessage!=="");r({sessionId:t,transaction:{...a,hash:i,status:"fail",inTransit:!1}}),s({sessionId:t,status:"fail",errorMessage:a?.returnMessage}),await n({sessionId:t,status:"fail"})}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-54I7T2PP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-SRX2EMTG.mjs";import{b as r}from"./chunk-YUIJMELA.mjs";import{u as i}from"./chunk-SXECAH2A.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-5ECETGF7.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-JESUVU73.mjs";import{b as s}from"./chunk-TQA3JDNV.mjs";import{u as n}from"./chunk-SXECAH2A.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-62EX26PE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-MELQLFCR.mjs";import{a as s}from"./chunk-6EBIYJLF.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-6JEPIISC.mjs";import{b as A}from"./chunk-A4RNPJJW.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{g as p}from"./chunk-SXECAH2A.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-S2FQWSUO.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-673M5M6E.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-4X3GF5DF.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-J4CPYFK6.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6EBIYJLF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-A6IG4DO6.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
|
|
2
|
+
//# sourceMappingURL=chunk-6IACSXVX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-RT44V62F.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6RAMYSEC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-XTJQ2D6K.mjs";import{a as k}from"./chunk-62EX26PE.mjs";import{s as f}from"./chunk-SXECAH2A.mjs";import{d as b}from"./chunk-QJSB5NX4.mjs";import{c as n}from"./chunk-DIV6ZH5K.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-6RJQVLIY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as a}from"./chunk-SXECAH2A.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-6TJVNG7O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-SXECAH2A.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6W67LK22.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-PWEOLD6L.mjs";var n=class{static get create(){return this.createComponent}static set create(t){this.createComponent=t}};n.createComponent=async({name:t,anchor:o})=>{if(await r(e),!e.document)return{};let m=e.document.createElement(t);return(o||e.document.body).appendChild(m),await customElements.whenDefined(t),m};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7D7CRUIW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as c}from"./chunk-SXECAH2A.mjs";import{a as o}from"./chunk-BRBIUWAW.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
|
|
2
|
+
//# sourceMappingURL=chunk-A4RNPJJW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-DPUWJW5E.mjs";import{d as C,e as I}from"./chunk-A4RNPJJW.mjs";import{s as p}from"./chunk-SXECAH2A.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
|
|
2
|
+
//# sourceMappingURL=chunk-A6IG4DO6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-X6MN67NW.mjs";import{u as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-X6MN67NW.mjs";import{u as m}from"./chunk-SXECAH2A.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-AZMKY66I.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-6IACSXVX.mjs";import{a}from"./chunk-C5X7N2AN.mjs";import{a as u}from"./chunk-MFK6BEXF.mjs";import{c as n}from"./chunk-DIV6ZH5K.mjs";import{a as s}from"./chunk-PWEOLD6L.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-BVKUZJNB.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-EVTERXBU.mjs";import{c as n}from"./chunk-SXECAH2A.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-C6NGX4MC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{t as n}from"./chunk-MYSCFOXV.mjs";import{a as i}from"./chunk-S2FQWSUO.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-COZTBWPH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-SXECAH2A.mjs";import{e as a}from"./chunk-QJSB5NX4.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t||n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CQ5GZXM5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-PWEOLD6L.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map;export{r as a,i as b,p as c};
|
|
2
|
+
//# sourceMappingURL=chunk-DIV6ZH5K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-4TBVQD27.mjs";import{s as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-4TBVQD27.mjs";import{s as n}from"./chunk-SXECAH2A.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-DPUWJW5E.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-36VCBI2F.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EVTERXBU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-C5X7N2AN.mjs";import{c as e,g as s}from"./chunk-R53MCZI6.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-HCAXI2LY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ce}from"./chunk-OZ4ZZI3H.mjs";import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as oe}from"./chunk-NV24F4LU.mjs";import{a as R}from"./chunk-2R5LWF2W.mjs";import{a as ne}from"./chunk-P36YE74A.mjs";import{a as ie}from"./chunk-T2QCATZQ.mjs";import{a as C}from"./chunk-OPLNE5E4.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as le}from"./chunk-YJPW44AG.mjs";import{a as p}from"./chunk-EHU5RQBI.mjs";import{a as re}from"./chunk-CSTNJXBE.mjs";import{a as ae}from"./chunk-5HHIOEWB.mjs";import{a as se}from"./chunk-AWX5SSJV.mjs";import{a as ee}from"./chunk-QJGFIK7H.mjs";import{b as Z}from"./chunk-4Z3DZ2A3.mjs";import{e as u,f as Q}from"./chunk-FFHVVGYW.mjs";import{j as Y,l as N,r as S,s as I,t as b}from"./chunk-LXGUUE34.mjs";import{a as P}from"./chunk-RQ6IYTUI.mjs";import{g as X}from"./chunk-CAA4VJRH.mjs";import{a as $}from"./chunk-7Q275OU5.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as J}from"./chunk-AG6XMOI3.mjs";import{a as j,s as K,u as l}from"./chunk-IAKBA5XK.mjs";import{f as B}from"./chunk-QJSB5NX4.mjs";import{b as E,c as H}from"./chunk-SAAOQW7P.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as q,c as F}from"./chunk-6JM4DPOH.mjs";import{a as L}from"./chunk-VMFJUT3G.mjs";import{a as d}from"./chunk-TI73UXGG.mjs";import{a as o}from"./chunk-S2FQWSUO.mjs";import{a as M}from"./chunk-T4GLLB7R.mjs";import{IframeLoginTypes as ve}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 oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!C())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ae({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 pe({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw Y({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 L(M),await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ne({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,z=class a{constructor(){this.store=K();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=G(i),r=B(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=Z(l());if(!(!this.shouldCheckConnection()||i))try{await b().getProvider().getAddress()}catch{if(N.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,fe)}},ue))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new S(i);i.getType=()=>o.ledger,I(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var W=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 se(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:d.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=ee.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 ye}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=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:d.extension})};this.provider=ye.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 Pe={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:d[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 Pe[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 ge}from"@multiversx/sdk-wallet-connect-provider/out";var me=[u.CANCEL_ACTION,u.SIGN_LOGIN_TOKEN],x=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;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}),await this.sendCustomRequest({method:u.CANCEL_ACTION,action:ge.CANCEL_ACTION}),n}finally{r.closeUI()}};this.cancelAction=async()=>{await this.sendCustomRequest({method:u.CANCEL_ACTION,action:ge.CANCEL_ACTION})};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:d.extension})};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 L(M),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??U.walletConnectDeepLink;this._approval=n,P.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await P.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=H(l());if(q(l())&&me.push(u.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{J()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:O={},walletConnectV2RelayAddress:D=""}=e,y=new Q(v,t,D,m,O);return await y.init(),{walletConnectProvider:y,dappMethods:me}}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=P.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),c=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${c}?wallet-connect=${encodeURIComponent(n)}`});let w=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=w??{};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 P.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 _;break}case o.crossWindow:{r=new W;break}case o.ledger:{r=new f({anchor:e}),await z.getInstance().init();break}case o.metamask:{r=new T({type:ve.metamask});break}case o.passkey:{r=new T({type:ve.passkey});break}case o.walletConnect:{let s=F(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...s});break}case o.webview:{r=new le;break}default:{let s=$();for(let c of this._customProviders)c.type===i&&(r=await c.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new S(r);I(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ce(n?{skipLoginMethod:i}:null),t}static async destroy(){b().cancelLogin(),I(null),j(o.none)}};A._customProviders=[];var Ce=(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:c,onClose:w}=await re({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((h,V)=>(h[V.type]=V.name,h),{}),O={...d,...m},D=async()=>{await w({shouldCancelAction:!0}),s({message:"Signing canceled"})};c.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let y=Ce(v,r)?r:o.none;c.updateData({name:O[y],type:y});try{let h=await i(a);n(h)}catch(h){await w({shouldCancelAction:!0}),s(h)}finally{c.closeUI()}})}async function pe({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:d.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{pe as a,f as b,z as c,A as d,g as e,W as f,_ as g,T as h,x as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as ce}from"./chunk-OZ4ZZI3H.mjs";import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as oe}from"./chunk-673M5M6E.mjs";import{a as R}from"./chunk-MELQLFCR.mjs";import{a as ne}from"./chunk-KO5KDKZ7.mjs";import{a as ie}from"./chunk-LTHGO7JM.mjs";import{a as C}from"./chunk-PO27JYMA.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as le}from"./chunk-U22MXHMS.mjs";import{a as p}from"./chunk-OZCEAS6L.mjs";import{a as re}from"./chunk-KU74A6T3.mjs";import{a as ae}from"./chunk-XALHL7VA.mjs";import{a as se}from"./chunk-VTJUZ3TY.mjs";import{a as ee}from"./chunk-QJGFIK7H.mjs";import{b as Z}from"./chunk-4Z3DZ2A3.mjs";import{e as u,f as Q}from"./chunk-FFHVVGYW.mjs";import{j as Y,l as N,r as S,s as I,t as b}from"./chunk-MYSCFOXV.mjs";import{a as P}from"./chunk-I6BAZCYU.mjs";import{g as X}from"./chunk-CAA4VJRH.mjs";import{a as $}from"./chunk-C5X7N2AN.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as J}from"./chunk-MFK6BEXF.mjs";import{a as j,s as K,u as l}from"./chunk-SXECAH2A.mjs";import{f as B}from"./chunk-QJSB5NX4.mjs";import{b as E,c as H}from"./chunk-SAAOQW7P.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as q,c as F}from"./chunk-6JM4DPOH.mjs";import{a as L}from"./chunk-VMFJUT3G.mjs";import{a as d}from"./chunk-TI73UXGG.mjs";import{a as o}from"./chunk-S2FQWSUO.mjs";import{a as M}from"./chunk-PWEOLD6L.mjs";import{IframeLoginTypes as ve}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 oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!C())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ae({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 pe({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw Y({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 L(M),await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ne({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,z=class a{constructor(){this.store=K();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=G(i),r=B(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=Z(l());if(!(!this.shouldCheckConnection()||i))try{await b().getProvider().getAddress()}catch{if(N.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,fe)}},ue))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new S(i);i.getType=()=>o.ledger,I(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var W=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 se(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:d.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=ee.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 ye}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=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:d.extension})};this.provider=ye.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 Pe={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:d[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 Pe[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 ge}from"@multiversx/sdk-wallet-connect-provider/out";var me=[u.CANCEL_ACTION,u.SIGN_LOGIN_TOKEN],x=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;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}),await this.sendCustomRequest({method:u.CANCEL_ACTION,action:ge.CANCEL_ACTION}),n}finally{r.closeUI()}};this.cancelAction=async()=>{await this.sendCustomRequest({method:u.CANCEL_ACTION,action:ge.CANCEL_ACTION})};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:d.extension})};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 L(M),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??U.walletConnectDeepLink;this._approval=n,P.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await P.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=H(l());if(q(l())&&me.push(u.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{J()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:O={},walletConnectV2RelayAddress:D=""}=e,y=new Q(v,t,D,m,O);return await y.init(),{walletConnectProvider:y,dappMethods:me}}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=P.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),c=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${c}?wallet-connect=${encodeURIComponent(n)}`});let w=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=w??{};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 P.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 _;break}case o.crossWindow:{r=new W;break}case o.ledger:{r=new f({anchor:e}),await z.getInstance().init();break}case o.metamask:{r=new T({type:ve.metamask});break}case o.passkey:{r=new T({type:ve.passkey});break}case o.walletConnect:{let s=F(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...s});break}case o.webview:{r=new le;break}default:{let s=$();for(let c of this._customProviders)c.type===i&&(r=await c.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new S(r);I(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ce(n?{skipLoginMethod:i}:null),t}static async destroy(){b().cancelLogin(),I(null),j(o.none)}};A._customProviders=[];var Ce=(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:c,onClose:w}=await re({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((h,V)=>(h[V.type]=V.name,h),{}),O={...d,...m},D=async()=>{await w({shouldCancelAction:!0}),s({message:"Signing canceled"})};c.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let y=Ce(v,r)?r:o.none;c.updateData({name:O[y],type:y});try{let h=await i(a);n(h)}catch(h){await w({shouldCancelAction:!0}),s(h)}finally{c.closeUI()}})}async function pe({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:d.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{pe as a,f as b,z as c,A as d,g as e,W as f,_ as g,T as h,x as i};
|
|
2
|
+
//# sourceMappingURL=chunk-HVEI4BFC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-XVFVG64Y.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-I6BAZCYU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as l}from"./chunk-HVEI4BFC.mjs";import{a as p}from"./chunk-IP3MMHXY.mjs";import{u as c}from"./chunk-SXECAH2A.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-TI73UXGG.mjs";import{a}from"./chunk-S2FQWSUO.mjs";var i=class i extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await l.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await l.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=l.customProviders,r=[...Object.values(a).filter(n=>n!==a.none&&n!==a.webview),...e.map(n=>n.type)],P=e.reduce((n,t)=>(n[t.type]=t.name,n),{}),s={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>r.includes(n)):r).map(n=>{let t=e.find(g=>g.type===n);return t||{name:n in s?s[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var u=i;export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ICZ6YALG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-PWEOLD6L.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-IHKF4UNO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-XVFVG64Y.mjs";import{a as t}from"./chunk-D5IP4ZG2.mjs";var s=class extends n{constructor({uiDataUpdateEvent:e,uiTag:i}){super({uiDataUpdateEvent:e,uiTag:i});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}async destroy(){this.setIsSidePanelOpen(!1),await this.uiElement?.closeWithAnimation?.(),super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IP3MMHXY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-6RAMYSEC.mjs";import{a as S}from"./chunk-54I7T2PP.mjs";import{a as o}from"./chunk-FMQYLMTU.mjs";import{a as y}from"./chunk-MFUQ5NBC.mjs";import{b as i,c as f}from"./chunk-JQTCROGW.mjs";import{l}from"./chunk-65L5EBBL.mjs";var u={};async function d({serverTransaction:e,sessionId:t,isSequential:c}){let{hash:a,status:r,results:m,invalidTransaction:n,hasStatusChanged:p}=e;try{if(u[a]>30){i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"});return}if(n&&!c||r==="sent"){u[a]=u[a]?u[a]+1:1;return}if(c&&!r){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s});return}if(p){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s})}l(r)&&await S({sessionId:t,hash:a,results:m})}catch(T){console.error(T),i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"})}}async function R({sessionId:e,transactionBatch:t,isSequential:c}){try{if(t==null)return;let a=y(t),r=await h(a);for(let n of r)await d({serverTransaction:n,sessionId:e,isSequential:c});if(r.every(n=>n.status!=="pending")){if(r.every(s=>s.status==="success"))return i({sessionId:e,status:"success"});if(r.some(s=>s.status==="fail"))return i({sessionId:e,status:"fail"});if(r.every(s=>s.invalidTransaction))return i({sessionId:e,status:"invalid"})}}catch(a){console.error(a)}}export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JESUVU73.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-HBQQS6GA.mjs";import{u as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-HBQQS6GA.mjs";import{u as m}from"./chunk-SXECAH2A.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-JQ47IJOB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-L3MWDI6J.mjs";import{s as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-L3MWDI6J.mjs";import{s as i}from"./chunk-SXECAH2A.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-JQTCROGW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-JQ47IJOB.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-KDCMWWIT.mjs.map
|
|
@@ -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-ROYSFSCI.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-KGXIPD5I.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{u as e}from"./chunk-SXECAH2A.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-KIQBMB2Y.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-LTHGO7JM.mjs";import{a as c}from"./chunk-PO27JYMA.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KO5KDKZ7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-MD7CSIXL.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KU74A6T3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-PO27JYMA.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-MYSCFOXV.mjs";import{u as n}from"./chunk-SXECAH2A.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LTHGO7JM.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-O4DQ3TWG.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-M7EUMCPG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-IP3MMHXY.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-MD7CSIXL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-XVFVG64Y.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MELQLFCR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as p,s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as p,s as e}from"./chunk-SXECAH2A.mjs";import{c as i}from"./chunk-R53MCZI6.mjs";var T=()=>e().setState(p),m=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).hex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-MFK6BEXF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-SXECAH2A.mjs";import{a as n}from"./chunk-QJSB5NX4.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MOOY3SNQ.mjs.map
|