@multiversx/sdk-dapp 5.2.0 → 5.2.1
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 +1 -1
- package/out/__chunks__/{chunk-KZKD4NES.mjs → chunk-32ZBY2AE.mjs} +2 -2
- package/out/__chunks__/{chunk-NGQEAHDC.mjs → chunk-34ZJZYMC.mjs} +2 -2
- package/out/__chunks__/chunk-3JEK5A62.mjs +2 -0
- package/out/__chunks__/chunk-3MW2H273.mjs +2 -0
- package/out/__chunks__/{chunk-PNIZP27U.mjs → chunk-4G2T73DC.mjs} +2 -2
- package/out/__chunks__/{chunk-SHF44E27.mjs → chunk-4LTMFD6V.mjs} +2 -2
- package/out/__chunks__/{chunk-OHDUQQEH.mjs → chunk-4NQ35FCJ.mjs} +2 -2
- package/out/__chunks__/{chunk-PV2FIP47.mjs → chunk-57P66SOT.mjs} +2 -2
- package/out/__chunks__/{chunk-GBV4WTOL.mjs → chunk-5JVY6GJC.mjs} +2 -2
- package/out/__chunks__/chunk-5LFB2H3K.mjs +2 -0
- package/out/__chunks__/{chunk-BA4LPRGY.mjs → chunk-5PGKBWB6.mjs} +2 -2
- package/out/__chunks__/chunk-5UYF2YJN.mjs +2 -0
- package/out/__chunks__/{chunk-N3QIT4Z7.mjs → chunk-5VSKEHYA.mjs} +2 -2
- package/out/__chunks__/chunk-5W77GYVQ.mjs +2 -0
- package/out/__chunks__/{chunk-RKQMY4CO.mjs → chunk-62QLCUQH.mjs} +2 -2
- package/out/__chunks__/{chunk-Y4MBRY6P.mjs → chunk-6FPG2OTI.mjs} +2 -2
- package/out/__chunks__/{chunk-2Z5M6QQ2.mjs → chunk-7JATWFXB.mjs} +2 -2
- package/out/__chunks__/chunk-7Z665D57.mjs +2 -0
- package/out/__chunks__/{chunk-UBP6IFJF.mjs → chunk-AMS6KZTC.mjs} +2 -2
- package/out/__chunks__/{chunk-PVATJYBR.mjs → chunk-AS7XXEHY.mjs} +2 -2
- package/out/__chunks__/chunk-AS7XXEHY.mjs.map +7 -0
- package/out/__chunks__/{chunk-YK5QXCRF.mjs → chunk-B5K6T6DF.mjs} +2 -2
- package/out/__chunks__/{chunk-NF5BWZH7.mjs → chunk-BBCLPJC4.mjs} +2 -2
- package/out/__chunks__/{chunk-QKUOY7IT.mjs → chunk-BKVZCTUG.mjs} +2 -2
- package/out/__chunks__/{chunk-XHMGA5T6.mjs → chunk-C3Y3ANFE.mjs} +2 -2
- package/out/__chunks__/chunk-CGLVVKZU.mjs +2 -0
- package/out/__chunks__/chunk-CTITNRKA.mjs +2 -0
- package/out/__chunks__/{chunk-4TDQSARK.mjs → chunk-DE6O7BFR.mjs} +2 -2
- package/out/__chunks__/{chunk-F7QE2BXY.mjs → chunk-DHTRPE3R.mjs} +2 -2
- package/out/__chunks__/{chunk-HG5ZRYDO.mjs → chunk-DZ5FL2WV.mjs} +2 -2
- package/out/__chunks__/{chunk-6IQLBT4L.mjs → chunk-EIOADZ47.mjs} +2 -2
- package/out/__chunks__/{chunk-UPEKWDPU.mjs → chunk-EP4OBHW4.mjs} +2 -2
- package/out/__chunks__/{chunk-XELT67NG.mjs → chunk-EPMKXFFR.mjs} +2 -2
- package/out/__chunks__/{chunk-5L747MOB.mjs → chunk-GYYCA57F.mjs} +2 -2
- package/out/__chunks__/{chunk-QLVGLTKW.mjs → chunk-H2EFE4NU.mjs} +2 -2
- package/out/__chunks__/{chunk-DZITE34E.mjs → chunk-HEA7NFOF.mjs} +2 -2
- package/out/__chunks__/chunk-HSYMR5UW.mjs +2 -0
- package/out/__chunks__/{chunk-2A63CJKS.mjs → chunk-IGTIIBN6.mjs} +2 -2
- package/out/__chunks__/{chunk-YIJP3JDV.mjs → chunk-IJKCH7CT.mjs} +2 -2
- package/out/__chunks__/{chunk-LDX6YMAJ.mjs → chunk-IPIX74CB.mjs} +2 -2
- package/out/__chunks__/{chunk-CZIMPZY4.mjs → chunk-IV4LWBR3.mjs} +2 -2
- package/out/__chunks__/chunk-IYVM5B26.mjs +2 -0
- package/out/__chunks__/{chunk-M73ACNCZ.mjs → chunk-JIKCHL57.mjs} +2 -2
- package/out/__chunks__/{chunk-EOMHYWS3.mjs → chunk-JV4IJH7L.mjs} +2 -2
- package/out/__chunks__/chunk-K3OKY7NL.mjs +2 -0
- package/out/__chunks__/{chunk-5HY62GH7.mjs → chunk-N2KEJEOD.mjs} +2 -2
- package/out/__chunks__/{chunk-MEGUEXSX.mjs → chunk-NE4YNYCQ.mjs} +2 -2
- package/out/__chunks__/{chunk-76ECKPKT.mjs → chunk-O6RJHMIJ.mjs} +2 -2
- package/out/__chunks__/chunk-O72VJVJC.mjs +2 -0
- package/out/__chunks__/{chunk-RUHXQTPN.mjs → chunk-OFU3D2KB.mjs} +2 -2
- package/out/__chunks__/{chunk-QDQNGBSL.mjs → chunk-OHHNQ66F.mjs} +2 -2
- package/out/__chunks__/{chunk-CL7UO54N.mjs → chunk-OLOOCCNU.mjs} +2 -2
- package/out/__chunks__/{chunk-ILSJXAAO.mjs → chunk-OMZ6A4DO.mjs} +2 -2
- package/out/__chunks__/{chunk-C4KGS2BP.mjs → chunk-OPX7XWAC.mjs} +2 -2
- package/out/__chunks__/{chunk-6Y7RDZ2B.mjs → chunk-OXPZVCKM.mjs} +2 -2
- package/out/__chunks__/{chunk-VDYLK3NT.mjs → chunk-OYCDHRNS.mjs} +2 -2
- package/out/__chunks__/{chunk-6LV4HAFU.mjs → chunk-PGGSHHQJ.mjs} +2 -2
- package/out/__chunks__/chunk-QB4NUTLA.mjs +2 -0
- package/out/__chunks__/{chunk-ZEW4FMMF.mjs → chunk-QVGM6655.mjs} +2 -2
- package/out/__chunks__/{chunk-L4FBGQKW.mjs → chunk-R6QKRGY5.mjs} +2 -2
- package/out/__chunks__/{chunk-GGDZD3N6.mjs → chunk-R7667VN6.mjs} +2 -2
- package/out/__chunks__/chunk-R76CQZZH.mjs +2 -0
- package/out/__chunks__/{chunk-VY3JMNHD.mjs → chunk-RYOUAM3L.mjs} +2 -2
- package/out/__chunks__/{chunk-ZX3ZUYOZ.mjs → chunk-SBOOJTIB.mjs} +2 -2
- package/out/__chunks__/{chunk-5Q6G6CI4.mjs → chunk-SG5YZ37N.mjs} +2 -2
- package/out/__chunks__/chunk-SYWFZFFJ.mjs +2 -0
- package/out/__chunks__/{chunk-IO7VCKOO.mjs → chunk-TASSEE6N.mjs} +2 -2
- package/out/__chunks__/chunk-TSBH5KYD.mjs +2 -0
- package/out/__chunks__/{chunk-AFNZCTNZ.mjs → chunk-TZJL7CZF.mjs} +2 -2
- package/out/__chunks__/{chunk-M3SOIDF4.mjs → chunk-UN2MEJKC.mjs} +2 -2
- package/out/__chunks__/{chunk-M3SOIDF4.mjs.map → chunk-UN2MEJKC.mjs.map} +1 -1
- package/out/__chunks__/{chunk-22ANWLYS.mjs → chunk-VNMU246H.mjs} +2 -2
- package/out/__chunks__/{chunk-HZA2YT74.mjs → chunk-W75ZD7BB.mjs} +2 -2
- package/out/__chunks__/chunk-WAM7WNSA.mjs +2 -0
- package/out/__chunks__/{chunk-3MKQRKD2.mjs → chunk-WLXKUUZ3.mjs} +2 -2
- package/out/__chunks__/{chunk-ZB7BTA2Y.mjs → chunk-WQAFFPAS.mjs} +2 -2
- package/out/__chunks__/chunk-WVZRN2HX.mjs +2 -0
- package/out/__chunks__/{chunk-EAHD3FOU.mjs.map → chunk-WVZRN2HX.mjs.map} +1 -1
- package/out/__chunks__/{chunk-MUXOTXZA.mjs → chunk-X5IHXBJ3.mjs} +2 -2
- package/out/__chunks__/{chunk-JZ7B36OT.mjs → chunk-XI2BWIQP.mjs} +2 -2
- package/out/__chunks__/{chunk-5DP2QBUG.mjs → chunk-XU34NXIS.mjs} +2 -2
- package/out/__chunks__/{chunk-NLWJ7ERG.mjs → chunk-XV2BD67Y.mjs} +2 -2
- package/out/__chunks__/{chunk-QH4KZO24.mjs → chunk-ZEJRHV7U.mjs} +2 -2
- package/out/__chunks__/{chunk-7F3VGKXN.mjs → chunk-ZHGONRBM.mjs} +2 -2
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.cjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.cjs.map +2 -2
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs.map +2 -2
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/ToastManager/index.cjs +23 -0
- package/out/managers/ToastManager/index.cjs.map +7 -0
- package/out/managers/ToastManager/index.d.ts +1 -0
- package/out/managers/ToastManager/index.mjs +2 -0
- package/out/managers/ToastManager/index.mjs.map +7 -0
- 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.cjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.cjs.map +2 -2
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.cjs +1 -1
- package/out/methods/initApp/initApp.cjs.map +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +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 +1 -1
- package/out/__chunks__/chunk-2PNYAM6W.mjs +0 -2
- package/out/__chunks__/chunk-36TM2TJY.mjs +0 -2
- package/out/__chunks__/chunk-46AC63TA.mjs +0 -2
- package/out/__chunks__/chunk-EAHD3FOU.mjs +0 -2
- package/out/__chunks__/chunk-FZFUNR5U.mjs +0 -2
- package/out/__chunks__/chunk-HNLLV6SD.mjs +0 -2
- package/out/__chunks__/chunk-IJWP5CUJ.mjs +0 -2
- package/out/__chunks__/chunk-J26RADFN.mjs +0 -2
- package/out/__chunks__/chunk-KV4CJO6I.mjs +0 -2
- package/out/__chunks__/chunk-MRN73EEW.mjs +0 -2
- package/out/__chunks__/chunk-OE6IBPA7.mjs +0 -2
- package/out/__chunks__/chunk-PVATJYBR.mjs.map +0 -7
- package/out/__chunks__/chunk-S3SH4KCM.mjs +0 -2
- package/out/__chunks__/chunk-T2BTKWLR.mjs +0 -2
- package/out/__chunks__/chunk-U2IB2ADP.mjs +0 -2
- package/out/__chunks__/chunk-Y3RPKCXI.mjs +0 -2
- package/out/__chunks__/chunk-Y6BAA2ZQ.mjs +0 -2
- package/out/__chunks__/chunk-YHNHQL5A.mjs +0 -2
- package/out/__chunks__/chunk-ZO6NJYZ7.mjs +0 -2
- /package/out/__chunks__/{chunk-KZKD4NES.mjs.map → chunk-32ZBY2AE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NGQEAHDC.mjs.map → chunk-34ZJZYMC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IJWP5CUJ.mjs.map → chunk-3JEK5A62.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MRN73EEW.mjs.map → chunk-3MW2H273.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PNIZP27U.mjs.map → chunk-4G2T73DC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SHF44E27.mjs.map → chunk-4LTMFD6V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OHDUQQEH.mjs.map → chunk-4NQ35FCJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PV2FIP47.mjs.map → chunk-57P66SOT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GBV4WTOL.mjs.map → chunk-5JVY6GJC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-T2BTKWLR.mjs.map → chunk-5LFB2H3K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BA4LPRGY.mjs.map → chunk-5PGKBWB6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZO6NJYZ7.mjs.map → chunk-5UYF2YJN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N3QIT4Z7.mjs.map → chunk-5VSKEHYA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y6BAA2ZQ.mjs.map → chunk-5W77GYVQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RKQMY4CO.mjs.map → chunk-62QLCUQH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y4MBRY6P.mjs.map → chunk-6FPG2OTI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2Z5M6QQ2.mjs.map → chunk-7JATWFXB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-46AC63TA.mjs.map → chunk-7Z665D57.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UBP6IFJF.mjs.map → chunk-AMS6KZTC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YK5QXCRF.mjs.map → chunk-B5K6T6DF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NF5BWZH7.mjs.map → chunk-BBCLPJC4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QKUOY7IT.mjs.map → chunk-BKVZCTUG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XHMGA5T6.mjs.map → chunk-C3Y3ANFE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J26RADFN.mjs.map → chunk-CGLVVKZU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KV4CJO6I.mjs.map → chunk-CTITNRKA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4TDQSARK.mjs.map → chunk-DE6O7BFR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F7QE2BXY.mjs.map → chunk-DHTRPE3R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HG5ZRYDO.mjs.map → chunk-DZ5FL2WV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6IQLBT4L.mjs.map → chunk-EIOADZ47.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UPEKWDPU.mjs.map → chunk-EP4OBHW4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XELT67NG.mjs.map → chunk-EPMKXFFR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5L747MOB.mjs.map → chunk-GYYCA57F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QLVGLTKW.mjs.map → chunk-H2EFE4NU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DZITE34E.mjs.map → chunk-HEA7NFOF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S3SH4KCM.mjs.map → chunk-HSYMR5UW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2A63CJKS.mjs.map → chunk-IGTIIBN6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YIJP3JDV.mjs.map → chunk-IJKCH7CT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LDX6YMAJ.mjs.map → chunk-IPIX74CB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CZIMPZY4.mjs.map → chunk-IV4LWBR3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YHNHQL5A.mjs.map → chunk-IYVM5B26.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M73ACNCZ.mjs.map → chunk-JIKCHL57.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EOMHYWS3.mjs.map → chunk-JV4IJH7L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FZFUNR5U.mjs.map → chunk-K3OKY7NL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5HY62GH7.mjs.map → chunk-N2KEJEOD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MEGUEXSX.mjs.map → chunk-NE4YNYCQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-76ECKPKT.mjs.map → chunk-O6RJHMIJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2PNYAM6W.mjs.map → chunk-O72VJVJC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RUHXQTPN.mjs.map → chunk-OFU3D2KB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QDQNGBSL.mjs.map → chunk-OHHNQ66F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CL7UO54N.mjs.map → chunk-OLOOCCNU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ILSJXAAO.mjs.map → chunk-OMZ6A4DO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C4KGS2BP.mjs.map → chunk-OPX7XWAC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6Y7RDZ2B.mjs.map → chunk-OXPZVCKM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VDYLK3NT.mjs.map → chunk-OYCDHRNS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6LV4HAFU.mjs.map → chunk-PGGSHHQJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-36TM2TJY.mjs.map → chunk-QB4NUTLA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZEW4FMMF.mjs.map → chunk-QVGM6655.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L4FBGQKW.mjs.map → chunk-R6QKRGY5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GGDZD3N6.mjs.map → chunk-R7667VN6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OE6IBPA7.mjs.map → chunk-R76CQZZH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VY3JMNHD.mjs.map → chunk-RYOUAM3L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZX3ZUYOZ.mjs.map → chunk-SBOOJTIB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5Q6G6CI4.mjs.map → chunk-SG5YZ37N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HNLLV6SD.mjs.map → chunk-SYWFZFFJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IO7VCKOO.mjs.map → chunk-TASSEE6N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y3RPKCXI.mjs.map → chunk-TSBH5KYD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AFNZCTNZ.mjs.map → chunk-TZJL7CZF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-22ANWLYS.mjs.map → chunk-VNMU246H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HZA2YT74.mjs.map → chunk-W75ZD7BB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U2IB2ADP.mjs.map → chunk-WAM7WNSA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3MKQRKD2.mjs.map → chunk-WLXKUUZ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZB7BTA2Y.mjs.map → chunk-WQAFFPAS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MUXOTXZA.mjs.map → chunk-X5IHXBJ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JZ7B36OT.mjs.map → chunk-XI2BWIQP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5DP2QBUG.mjs.map → chunk-XU34NXIS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NLWJ7ERG.mjs.map → chunk-XV2BD67Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QH4KZO24.mjs.map → chunk-ZEJRHV7U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7F3VGKXN.mjs.map → chunk-ZHGONRBM.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WLXKUUZ3.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-EPMKXFFR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q as u}from"./chunk-4LTMFD6V.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-GYYCA57F.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-SBOOJTIB.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-H2EFE4NU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as c}from"./chunk-4LTMFD6V.mjs";import{a as o}from"./chunk-JMC7CMTU.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-HEA7NFOF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WVZRN2HX.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
|
|
2
|
+
//# sourceMappingURL=chunk-IGTIIBN6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-4LTMFD6V.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IJKCH7CT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-SYWFZFFJ.mjs";import{a as f}from"./chunk-SBOOJTIB.mjs";import{a as g}from"./chunk-5PGKBWB6.mjs";import{b as a}from"./chunk-4LTMFD6V.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IPIX74CB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-4LTMFD6V.mjs";import{e as a}from"./chunk-UERJ6AKK.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-IV4LWBR3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{w as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{w as g}from"./chunk-AS7XXEHY.mjs";import{a as c}from"./chunk-3JEK5A62.mjs";import{s as n}from"./chunk-4LTMFD6V.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=c(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=g(),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-JIKCHL57.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-WLXKUUZ3.mjs";import{a as t}from"./chunk-5LFB2H3K.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JV4IJH7L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-BBCLPJC4.mjs";import{a as d}from"./chunk-TZJL7CZF.mjs";import{a as f}from"./chunk-R76CQZZH.mjs";import{a as h}from"./chunk-3L7HZ2SO.mjs";var g=t=>t.sort((n,i)=>i.timestamp-n.timestamp),k=async({transactions:t,address:n,explorerAddress:i,egldLabel:u,skipFetchingTransactions:I=!1})=>{let o=[],e=[];if(t.forEach(s=>{let a=f(s.hash);a?o.push(a):e.push(s.hash)}),e.length===0)return g(o);let c=I?t.map(s=>({...s,txHash:s.hash})):await p(e),l=c.map(s=>s.txHash),T=e.filter(s=>!l.includes(s));if(T.length>0){let a=t.filter(r=>T.includes(r.hash)).map(r=>({...r,txHash:r.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...a)}let m=new Map;return o.forEach(s=>{let a=s.hash;a&&m.set(String(a),s)}),c.forEach(s=>{let a=h({transaction:s,address:n,explorerAddress:i,egldLabel:u});a.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:a}),m.set(s.txHash,a)}),g(Array.from(m.values()))};export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-N2KEJEOD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as s}from"./chunk-UN2MEJKC.mjs";import{a as u}from"./chunk-JV4IJH7L.mjs";import{s as c}from"./chunk-4LTMFD6V.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-6JSWL75O.mjs";import{a}from"./chunk-LJX4MW7B.mjs";var i=class i extends u{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 s.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.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=s.customProviders,t=[...Object.values(a).filter(n=>![a.none,a.webview].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NE4YNYCQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-KDWLSBQB.mjs";import{b as e,c as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-KDWLSBQB.mjs";import{b as e,c as i}from"./chunk-C3Y3ANFE.mjs";import{j as r}from"./chunk-65L5EBBL.mjs";import{q as n}from"./chunk-4LTMFD6V.mjs";async function E({results:u,hash:c,sessionId:s}){let a=u?.find(t=>t?.returnMessage!=="");i({sessionId:s,transaction:{...a,hash:c,status:"fail",inTransit:!1}});let{transactions:m}=n().getState();m[s].transactions.some(t=>r(t.status))||(e({sessionId:s,status:"fail",errorMessage:a?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O6RJHMIJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-WVZRN2HX.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
|
|
2
|
+
//# sourceMappingURL=chunk-OFU3D2KB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-JV4IJH7L.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-OHHNQ66F.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-IYVM5B26.mjs";import{a as m}from"./chunk-NZYB675D.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OLOOCCNU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-BBCLPJC4.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-OMZ6A4DO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-WVZRN2HX.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OPX7XWAC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-5VSKEHYA.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OXPZVCKM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-H2EFE4NU.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-OYCDHRNS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-BKVZCTUG.mjs";import{a}from"./chunk-O72VJVJC.mjs";import{a as u}from"./chunk-TASSEE6N.mjs";import{c as n}from"./chunk-IGTIIBN6.mjs";import{a as s}from"./chunk-WVZRN2HX.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-PGGSHHQJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-PLMCHSS6.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-BQX7MJR6.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-PLMCHSS6.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-BQX7MJR6.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-RYOUAM3L.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{w as G}from"./chunk-AS7XXEHY.mjs";import{a as L}from"./chunk-K3OKY7NL.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-PJWJZHIS.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-WVZRN2HX.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await x({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=O({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=G().getType(),at=v(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=L(),pt=h({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QVGM6655.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-JIKCHL57.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-3JEK5A62.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-R6QKRGY5.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{s 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{s as c}from"./chunk-4LTMFD6V.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-R7667VN6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-4LTMFD6V.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-RYOUAM3L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-62QLCUQH.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-SBOOJTIB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WVZRN2HX.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SG5YZ37N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as p,q as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as p,q as e}from"./chunk-4LTMFD6V.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-TASSEE6N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as a}from"./chunk-4LTMFD6V.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-TZJL7CZF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-XELT67NG.mjs";import{a as se}from"./chunk-2Y66XRQK.mjs";import{a as te}from"./chunk-MUXOTXZA.mjs";import{a as U}from"./chunk-4TDQSARK.mjs";import{a as ie}from"./chunk-L4FBGQKW.mjs";import{a as re}from"./chunk-M73ACNCZ.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-UPEKWDPU.mjs";import{a as p}from"./chunk-QH4KZO24.mjs";import{a as Z}from"./chunk-YK5QXCRF.mjs";import{a as ne}from"./chunk-6IQLBT4L.mjs";import{a as oe}from"./chunk-OHDUQQEH.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,u as M,v as P,w as L}from"./chunk-PVATJYBR.mjs";import{a as y}from"./chunk-IJWP5CUJ.mjs";import{a as q}from"./chunk-2PNYAM6W.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-IO7VCKOO.mjs";import{g as K}from"./chunk-2IUBMLF4.mjs";import{a as F,q as j,s as l}from"./chunk-SHF44E27.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-6JSWL75O.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!y())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>ie({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>n.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await oe(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var fe={passkey:n.passkey,metamask:n.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(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=o,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!y())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=y(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var 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 n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new T({type:pe.metamask});break}case n.passkey:{r=new T({type:pe.passkey});break}case n.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(n.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:n.none;d.updateData({name:x[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,z as f,k as g,T as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-EPMKXFFR.mjs";import{a as se}from"./chunk-2Y66XRQK.mjs";import{a as te}from"./chunk-X5IHXBJ3.mjs";import{a as U}from"./chunk-DE6O7BFR.mjs";import{a as ie}from"./chunk-R6QKRGY5.mjs";import{a as re}from"./chunk-JIKCHL57.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-EP4OBHW4.mjs";import{a as p}from"./chunk-ZEJRHV7U.mjs";import{a as Z}from"./chunk-B5K6T6DF.mjs";import{a as ne}from"./chunk-EIOADZ47.mjs";import{a as oe}from"./chunk-4NQ35FCJ.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,u as M,v as P,w as L}from"./chunk-AS7XXEHY.mjs";import{a as y}from"./chunk-3JEK5A62.mjs";import{a as q}from"./chunk-O72VJVJC.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-TASSEE6N.mjs";import{g as K}from"./chunk-2IUBMLF4.mjs";import{a as F,q as j,s as l}from"./chunk-4LTMFD6V.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-6JSWL75O.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!y())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>ie({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>n.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await oe(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var fe={passkey:n.passkey,metamask:n.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(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=o,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!y())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=y(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var 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 n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new T({type:pe.metamask});break}case n.passkey:{r=new T({type:pe.passkey});break}case n.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(n.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:n.none;d.updateData({name:x[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,z as f,k as g,T as h,_ as i};
|
|
2
|
+
//# sourceMappingURL=chunk-UN2MEJKC.mjs.map
|