@multiversx/sdk-dapp 5.1.0-alpha.1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/__chunks__/chunk-2STEP3VA.mjs +2 -0
- package/out/__chunks__/{chunk-GNSQLKQR.mjs → chunk-3HADWDDI.mjs} +2 -2
- package/out/__chunks__/{chunk-G2GQGPEF.mjs → chunk-4LYEVUGN.mjs} +2 -2
- package/out/__chunks__/{chunk-5B32DLXZ.mjs → chunk-66FC7DN2.mjs} +2 -2
- package/out/__chunks__/chunk-6A7TDVVR.mjs +2 -0
- package/out/__chunks__/{chunk-KHZB7LSH.mjs → chunk-6JRZP7XR.mjs} +2 -2
- package/out/__chunks__/{chunk-7Q6PORUU.mjs → chunk-6SNUC4WD.mjs} +2 -2
- package/out/__chunks__/{chunk-XY7AN7BR.mjs → chunk-77XEEKKC.mjs} +2 -2
- package/out/__chunks__/{chunk-KZSVL2QA.mjs → chunk-7ZGMZIYA.mjs} +2 -2
- package/out/__chunks__/{chunk-3ZMJLG66.mjs → chunk-A4KMW3VA.mjs} +2 -2
- package/out/__chunks__/{chunk-H2ZWJ34K.mjs → chunk-AE72PVLM.mjs} +2 -2
- package/out/__chunks__/{chunk-BXBBY5NS.mjs → chunk-AKS4K5LK.mjs} +2 -2
- package/out/__chunks__/{chunk-6YPTFKDW.mjs → chunk-AMSHQJ6K.mjs} +2 -2
- package/out/__chunks__/{chunk-EI6U57Z7.mjs → chunk-ARPLTX4I.mjs} +2 -2
- package/out/__chunks__/{chunk-WBBARDIY.mjs → chunk-BFU632AR.mjs} +2 -2
- package/out/__chunks__/{chunk-3AB7A4DU.mjs → chunk-BP7QTGW5.mjs} +2 -2
- package/out/__chunks__/{chunk-PXX6KX5M.mjs → chunk-BWYXCYFI.mjs} +2 -2
- package/out/__chunks__/chunk-CAHVJ3IF.mjs +2 -0
- package/out/__chunks__/{chunk-TSC5JUSI.mjs → chunk-CDIHVT44.mjs} +2 -2
- package/out/__chunks__/{chunk-UWE7FCPK.mjs → chunk-CGBCYY3B.mjs} +2 -2
- package/out/__chunks__/{chunk-G4DXRP2S.mjs → chunk-CJLUSPT2.mjs} +2 -2
- package/out/__chunks__/{chunk-VJCPD3UB.mjs → chunk-CK4X6HSF.mjs} +2 -2
- package/out/__chunks__/{chunk-3FFEKB64.mjs → chunk-COTPJZL3.mjs} +2 -2
- package/out/__chunks__/{chunk-NMDDRDKF.mjs → chunk-D54LWE3V.mjs} +2 -2
- package/out/__chunks__/{chunk-N64MNRHT.mjs → chunk-EB37CLFR.mjs} +2 -2
- package/out/__chunks__/{chunk-2ERAFZPI.mjs → chunk-EQBJVKBR.mjs} +2 -2
- package/out/__chunks__/{chunk-3PWF6ART.mjs → chunk-EV4KV3JC.mjs} +2 -2
- package/out/__chunks__/{chunk-RTGZOMWU.mjs → chunk-FIG2TQL2.mjs} +2 -2
- package/out/__chunks__/{chunk-FXKRAY4Q.mjs → chunk-FLBKETEZ.mjs} +2 -2
- package/out/__chunks__/{chunk-FANPMHGR.mjs → chunk-FODKR5LN.mjs} +2 -2
- package/out/__chunks__/chunk-GTRD4HFY.mjs +2 -0
- package/out/__chunks__/{chunk-GMB7FXLY.mjs.map → chunk-GTRD4HFY.mjs.map} +1 -1
- package/out/__chunks__/{chunk-DWGYZEIW.mjs → chunk-HVS56RA5.mjs} +2 -2
- package/out/__chunks__/{chunk-ZR3RGNNE.mjs → chunk-HXTDJ2E6.mjs} +2 -2
- package/out/__chunks__/{chunk-J5RMTTVV.mjs → chunk-HZKGE7EY.mjs} +2 -2
- package/out/__chunks__/{chunk-RAU7UU2O.mjs → chunk-HZMRXLHX.mjs} +2 -2
- package/out/__chunks__/{chunk-XLLZBIIX.mjs → chunk-IXDSHQ6O.mjs} +2 -2
- package/out/__chunks__/chunk-JRC47VFQ.mjs +2 -0
- package/out/__chunks__/chunk-KCUBSEZI.mjs +2 -0
- package/out/__chunks__/chunk-KMG6WM6K.mjs +2 -0
- package/out/__chunks__/{chunk-BJIMWI25.mjs → chunk-KTJGX4HU.mjs} +2 -2
- package/out/__chunks__/{chunk-V3WQSDU6.mjs → chunk-L5CHO4VF.mjs} +2 -2
- package/out/__chunks__/{chunk-LJ7EY2BA.mjs → chunk-LMJDCKJN.mjs} +2 -2
- package/out/__chunks__/{chunk-KVMYLOAD.mjs → chunk-LOCNDNZE.mjs} +2 -2
- package/out/__chunks__/{chunk-ERFWSTEQ.mjs → chunk-LYZ5P6TZ.mjs} +2 -2
- package/out/__chunks__/{chunk-KRLEJN27.mjs → chunk-LZLJ6HJT.mjs} +2 -2
- package/out/__chunks__/{chunk-MGRJMOOF.mjs → chunk-M2DFHKKK.mjs} +2 -2
- package/out/__chunks__/{chunk-KJBDSMSM.mjs → chunk-M6WW53TK.mjs} +2 -2
- package/out/__chunks__/chunk-M7CRSX65.mjs +2 -0
- package/out/__chunks__/{chunk-5LSBU75E.mjs → chunk-MA5C5FRG.mjs} +2 -2
- package/out/__chunks__/chunk-MGOTSAGH.mjs +2 -0
- package/out/__chunks__/{chunk-IBE265X3.mjs → chunk-MS44NLMW.mjs} +2 -2
- package/out/__chunks__/{chunk-BGOUHB42.mjs → chunk-MUIRAORV.mjs} +2 -2
- package/out/__chunks__/{chunk-RJ7N6HPY.mjs → chunk-MXKLHEGP.mjs} +2 -2
- package/out/__chunks__/chunk-OIIBPMNU.mjs +2 -0
- package/out/__chunks__/{chunk-IPXXWJDZ.mjs → chunk-PGCTCWAW.mjs} +2 -2
- package/out/__chunks__/{chunk-5YFGC2TQ.mjs → chunk-PIS56ZD4.mjs} +2 -2
- package/out/__chunks__/chunk-PPMUAFM4.mjs +2 -0
- package/out/__chunks__/{chunk-ZDDAWBNC.mjs → chunk-Q3C46OSS.mjs} +2 -2
- package/out/__chunks__/chunk-QI4FCSOB.mjs +2 -0
- package/out/__chunks__/{chunk-IP36FKML.mjs → chunk-R2EQDN33.mjs} +2 -2
- package/out/__chunks__/{chunk-5VLY6HQV.mjs → chunk-R32N5WCS.mjs} +2 -2
- package/out/__chunks__/{chunk-EFSN4DGB.mjs → chunk-R43WJEH6.mjs} +2 -2
- package/out/__chunks__/{chunk-VHIERNZZ.mjs → chunk-RGFZEURF.mjs} +2 -2
- package/out/__chunks__/{chunk-ZMJ7XT6G.mjs → chunk-RMARAUR3.mjs} +2 -2
- package/out/__chunks__/chunk-RW55WHHB.mjs +2 -0
- package/out/__chunks__/{chunk-BONURMBG.mjs → chunk-SHKZVFEF.mjs} +2 -2
- package/out/__chunks__/chunk-SK4EBR2Z.mjs +2 -0
- package/out/__chunks__/{chunk-S6CCVIIY.mjs → chunk-TA6TNNXH.mjs} +2 -2
- package/out/__chunks__/{chunk-DU7S4QJ6.mjs → chunk-TSWPPFHW.mjs} +2 -2
- package/out/__chunks__/{chunk-VLV2U5CP.mjs → chunk-U2Z42SAP.mjs} +2 -2
- package/out/__chunks__/{chunk-YGN327DT.mjs → chunk-UEFAPILB.mjs} +2 -2
- package/out/__chunks__/{chunk-CORFMBCN.mjs → chunk-VLYPDZLN.mjs} +2 -2
- package/out/__chunks__/{chunk-S6GILN6M.mjs → chunk-WDMNEF3T.mjs} +2 -2
- package/out/__chunks__/{chunk-H7Q2N2BI.mjs → chunk-X5HSYTDN.mjs} +2 -2
- package/out/__chunks__/{chunk-4ZVS5BEZ.mjs → chunk-XCKTWIKV.mjs} +2 -2
- package/out/__chunks__/{chunk-XRMNP6X3.mjs → chunk-XGK3JR3Z.mjs} +2 -2
- package/out/__chunks__/chunk-XNF5QLFW.mjs +2 -0
- package/out/__chunks__/{chunk-IV536PHY.mjs → chunk-XSS5NOQJ.mjs} +2 -2
- package/out/__chunks__/chunk-YZV64TMH.mjs +2 -0
- package/out/__chunks__/{chunk-7FD6ZSLN.mjs → chunk-ZI7JADBP.mjs} +2 -2
- package/out/__chunks__/chunk-ZUJ5KE7O.mjs +2 -0
- package/out/__chunks__/{chunk-6X3YYSNC.mjs → chunk-ZZZCOFQ7.mjs} +2 -2
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.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 +1 -1
- package/out/__chunks__/chunk-57ZPX3FC.mjs +0 -2
- package/out/__chunks__/chunk-BYT3MTLL.mjs +0 -2
- package/out/__chunks__/chunk-C4KR2YIK.mjs +0 -2
- package/out/__chunks__/chunk-EVO36CJH.mjs +0 -2
- package/out/__chunks__/chunk-EVSHHWQE.mjs +0 -2
- package/out/__chunks__/chunk-GF3PAMM5.mjs +0 -2
- package/out/__chunks__/chunk-GMB7FXLY.mjs +0 -2
- package/out/__chunks__/chunk-JFHY6UJS.mjs +0 -2
- package/out/__chunks__/chunk-JJZTPJKV.mjs +0 -2
- package/out/__chunks__/chunk-K4QCIO4Q.mjs +0 -2
- package/out/__chunks__/chunk-L6SS5X6V.mjs +0 -2
- package/out/__chunks__/chunk-MWFNUFFK.mjs +0 -2
- package/out/__chunks__/chunk-MX436TPT.mjs +0 -2
- package/out/__chunks__/chunk-QZA4VJ3X.mjs +0 -2
- package/out/__chunks__/chunk-WVY7RDDT.mjs +0 -2
- package/out/__chunks__/chunk-YVCDJYTY.mjs +0 -2
- package/out/__chunks__/chunk-YZ65W5KN.mjs +0 -2
- /package/out/__chunks__/{chunk-YVCDJYTY.mjs.map → chunk-2STEP3VA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GNSQLKQR.mjs.map → chunk-3HADWDDI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G2GQGPEF.mjs.map → chunk-4LYEVUGN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5B32DLXZ.mjs.map → chunk-66FC7DN2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BYT3MTLL.mjs.map → chunk-6A7TDVVR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KHZB7LSH.mjs.map → chunk-6JRZP7XR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7Q6PORUU.mjs.map → chunk-6SNUC4WD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XY7AN7BR.mjs.map → chunk-77XEEKKC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KZSVL2QA.mjs.map → chunk-7ZGMZIYA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3ZMJLG66.mjs.map → chunk-A4KMW3VA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H2ZWJ34K.mjs.map → chunk-AE72PVLM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BXBBY5NS.mjs.map → chunk-AKS4K5LK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6YPTFKDW.mjs.map → chunk-AMSHQJ6K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EI6U57Z7.mjs.map → chunk-ARPLTX4I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WBBARDIY.mjs.map → chunk-BFU632AR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3AB7A4DU.mjs.map → chunk-BP7QTGW5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PXX6KX5M.mjs.map → chunk-BWYXCYFI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JFHY6UJS.mjs.map → chunk-CAHVJ3IF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TSC5JUSI.mjs.map → chunk-CDIHVT44.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UWE7FCPK.mjs.map → chunk-CGBCYY3B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G4DXRP2S.mjs.map → chunk-CJLUSPT2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VJCPD3UB.mjs.map → chunk-CK4X6HSF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3FFEKB64.mjs.map → chunk-COTPJZL3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NMDDRDKF.mjs.map → chunk-D54LWE3V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N64MNRHT.mjs.map → chunk-EB37CLFR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2ERAFZPI.mjs.map → chunk-EQBJVKBR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3PWF6ART.mjs.map → chunk-EV4KV3JC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RTGZOMWU.mjs.map → chunk-FIG2TQL2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FXKRAY4Q.mjs.map → chunk-FLBKETEZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FANPMHGR.mjs.map → chunk-FODKR5LN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DWGYZEIW.mjs.map → chunk-HVS56RA5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZR3RGNNE.mjs.map → chunk-HXTDJ2E6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J5RMTTVV.mjs.map → chunk-HZKGE7EY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RAU7UU2O.mjs.map → chunk-HZMRXLHX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XLLZBIIX.mjs.map → chunk-IXDSHQ6O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JJZTPJKV.mjs.map → chunk-JRC47VFQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WVY7RDDT.mjs.map → chunk-KCUBSEZI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QZA4VJ3X.mjs.map → chunk-KMG6WM6K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BJIMWI25.mjs.map → chunk-KTJGX4HU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V3WQSDU6.mjs.map → chunk-L5CHO4VF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LJ7EY2BA.mjs.map → chunk-LMJDCKJN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KVMYLOAD.mjs.map → chunk-LOCNDNZE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ERFWSTEQ.mjs.map → chunk-LYZ5P6TZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KRLEJN27.mjs.map → chunk-LZLJ6HJT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MGRJMOOF.mjs.map → chunk-M2DFHKKK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KJBDSMSM.mjs.map → chunk-M6WW53TK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EVO36CJH.mjs.map → chunk-M7CRSX65.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5LSBU75E.mjs.map → chunk-MA5C5FRG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K4QCIO4Q.mjs.map → chunk-MGOTSAGH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IBE265X3.mjs.map → chunk-MS44NLMW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BGOUHB42.mjs.map → chunk-MUIRAORV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RJ7N6HPY.mjs.map → chunk-MXKLHEGP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EVSHHWQE.mjs.map → chunk-OIIBPMNU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IPXXWJDZ.mjs.map → chunk-PGCTCWAW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5YFGC2TQ.mjs.map → chunk-PIS56ZD4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GF3PAMM5.mjs.map → chunk-PPMUAFM4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZDDAWBNC.mjs.map → chunk-Q3C46OSS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YZ65W5KN.mjs.map → chunk-QI4FCSOB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IP36FKML.mjs.map → chunk-R2EQDN33.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5VLY6HQV.mjs.map → chunk-R32N5WCS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EFSN4DGB.mjs.map → chunk-R43WJEH6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VHIERNZZ.mjs.map → chunk-RGFZEURF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZMJ7XT6G.mjs.map → chunk-RMARAUR3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L6SS5X6V.mjs.map → chunk-RW55WHHB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BONURMBG.mjs.map → chunk-SHKZVFEF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MX436TPT.mjs.map → chunk-SK4EBR2Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S6CCVIIY.mjs.map → chunk-TA6TNNXH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DU7S4QJ6.mjs.map → chunk-TSWPPFHW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VLV2U5CP.mjs.map → chunk-U2Z42SAP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YGN327DT.mjs.map → chunk-UEFAPILB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CORFMBCN.mjs.map → chunk-VLYPDZLN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S6GILN6M.mjs.map → chunk-WDMNEF3T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H7Q2N2BI.mjs.map → chunk-X5HSYTDN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4ZVS5BEZ.mjs.map → chunk-XCKTWIKV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XRMNP6X3.mjs.map → chunk-XGK3JR3Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-57ZPX3FC.mjs.map → chunk-XNF5QLFW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IV536PHY.mjs.map → chunk-XSS5NOQJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MWFNUFFK.mjs.map → chunk-YZV64TMH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7FD6ZSLN.mjs.map → chunk-ZI7JADBP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C4KR2YIK.mjs.map → chunk-ZUJ5KE7O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6X3YYSNC.mjs.map → chunk-ZZZCOFQ7.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-Q3C46OSS.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-3HADWDDI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-QI4FCSOB.mjs";import{a as f}from"./chunk-6A7TDVVR.mjs";import{j as m,k as d,l as p,n as u}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-BP7QTGW5.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=l(),F=f();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await T({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=u(s),E=p(s),L=d(s),i=A||E||L,v=m(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4LYEVUGN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-XSS5NOQJ.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{a as e,b as t}from"./chunk-GTRD4HFY.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-66FC7DN2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-77XEEKKC.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-6JRZP7XR.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-ZI7JADBP.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-6SNUC4WD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-ZI7JADBP.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-77XEEKKC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-ZUJ5KE7O.mjs";import{a as f}from"./chunk-EQBJVKBR.mjs";import{a as g}from"./chunk-CK4X6HSF.mjs";import{b as a}from"./chunk-ZI7JADBP.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-7ZGMZIYA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-XGK3JR3Z.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-A4KMW3VA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-GTRD4HFY.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AE72PVLM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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 M}from"./chunk-BETSOJFK.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 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 M}from"./chunk-BETSOJFK.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-COTPJZL3.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{t as G}from"./chunk-XCKTWIKV.mjs";import{a as L}from"./chunk-QI4FCSOB.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-GTRD4HFY.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-AKS4K5LK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-R43WJEH6.mjs";import{b as r}from"./chunk-IXDSHQ6O.mjs";import{s as i}from"./chunk-ZI7JADBP.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-AMSHQJ6K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-HZKGE7EY.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ARPLTX4I.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-ZI7JADBP.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-BFU632AR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-77XEEKKC.mjs";import{a as p}from"./chunk-X5HSYTDN.mjs";import{a as d}from"./chunk-CAHVJ3IF.mjs";import{a as T}from"./chunk-3L7HZ2SO.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BP7QTGW5.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-BP7QTGW5.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-BWYXCYFI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-TSWPPFHW.mjs";import{a as t}from"./chunk-PPMUAFM4.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-CDIHVT44.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-MA5C5FRG.mjs";import{a as c}from"./chunk-KMG6WM6K.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-CGBCYY3B.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-ZI7JADBP.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-CJLUSPT2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-ZI7JADBP.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-CK4X6HSF.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-ZI7JADBP.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-COTPJZL3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-MUIRAORV.mjs";import{a as s}from"./chunk-R32N5WCS.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-QI4FCSOB.mjs";import{b as A}from"./chunk-TA6TNNXH.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-ZI7JADBP.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-PLUWBWJ2.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D54LWE3V.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-COTPJZL3.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-EB37CLFR.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-KTJGX4HU.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-EQBJVKBR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-MGOTSAGH.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EV4KV3JC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-HXTDJ2E6.mjs";import{a}from"./chunk-MGOTSAGH.mjs";import{a as u}from"./chunk-CJLUSPT2.mjs";import{c as n}from"./chunk-RGFZEURF.mjs";import{a as s}from"./chunk-GTRD4HFY.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-FIG2TQL2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-DLWDO7M6.mjs";import{d as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-DLWDO7M6.mjs";import{d as p}from"./chunk-M6WW53TK.mjs";import{s as n}from"./chunk-XCKTWIKV.mjs";import{s as m}from"./chunk-ZI7JADBP.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-PLUWBWJ2.mjs";import{a as f}from"./chunk-ARPLTX4I.mjs";async function u(){let i=s(),o=f()||i?e.webview:t(m());if(!o)return;let r=await p.create({type:o});if(!r)throw new Error("Provider not found");(i||o===e.webview&&r.isInitialized())&&await r.login(),n(r)}export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FLBKETEZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-ZI7JADBP.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FODKR5LN.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/window.constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.1.0
|
|
4
|
+
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.1.0'; // will be replaced at build time\n"],
|
|
5
5
|
"mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
|
|
6
6
|
"names": ["safeWindow", "version"]
|
|
7
7
|
}
|
|
@@ -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-R2EQDN33.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-HVS56RA5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-UEFAPILB.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-HXTDJ2E6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-GTRD4HFY.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-HZKGE7EY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as s}from"./chunk-M6WW53TK.mjs";import{a as u}from"./chunk-CDIHVT44.mjs";import{s as c}from"./chunk-ZI7JADBP.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.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:a})=>{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:a})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:a}),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(o).filter(n=>![o.none,o.webview,o.passkey].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-HZMRXLHX.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-ZI7JADBP.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-IXDSHQ6O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-CK4X6HSF.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KTJGX4HU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{t as n}from"./chunk-XCKTWIKV.mjs";import{a as i}from"./chunk-PLUWBWJ2.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-L5CHO4VF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-JRC47VFQ.mjs";import{a as k}from"./chunk-SK4EBR2Z.mjs";import{q as f}from"./chunk-ZI7JADBP.mjs";import{d as b}from"./chunk-UERJ6AKK.mjs";import{c as n}from"./chunk-RGFZEURF.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-LMJDCKJN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as B}from"./chunk-XNF5QLFW.mjs";import{a as b}from"./chunk-L5CHO4VF.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-XHKNB4IP.mjs";import{a as D}from"./chunk-AKS4K5LK.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as _}from"./chunk-PGCTCWAW.mjs";import{a as A}from"./chunk-RMARAUR3.mjs";import{a as O}from"./chunk-6A7TDVVR.mjs";import{s as x}from"./chunk-ZI7JADBP.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=O(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=A.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LOCNDNZE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-XCKTWIKV.mjs";import{q as u}from"./chunk-ZI7JADBP.mjs";import{a as p}from"./chunk-UERJ6AKK.mjs";import{a as h,c as l,g as c}from"./chunk-NTEMINYA.mjs";import{a as y}from"./chunk-GTRD4HFY.mjs";var M=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=u();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){y.addEventListener("message",this.handleMessage)}stopListening(){y.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case o.finalizeHandshakeRequest:this.handshake({event:e});break;case o.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case o.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case o.signTransactionsRequest:this.signTransactions({event:e});break;case i.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=p(this.store.getState()),r=g(),n=new c({address:new l(t),data:new Uint8Array(Buffer.from(a))}),d=(await r.signMessage(n))?.signature??"";e.source?.postMessage({type:i.loginResponse,payload:{data:{address:t,signature:Buffer.from(d).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&this.handleLoginCancelled()}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:i.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=p(this.store.getState()),{message:t}=s;try{let r=new c({address:new l(a),data:new Uint8Array(Buffer.from(t))}),d=(await g().signMessage(r))?.signature??"";e.source?.postMessage({type:i.signMessageResponse,payload:{data:{signature:Buffer.from(d).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(n=>h.newFromPlainObject(n)),r=await s.signTransactions(t);e.source?.postMessage({type:i.signTransactionsResponse,payload:{data:r.map(n=>n.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LYZ5P6TZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-GTRD4HFY.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-LZLJ6HJT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-GTRD4HFY.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-M2DFHKKK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-G4Z3ZQR6.mjs";import{a as se}from"./chunk-M3YL36ZL.mjs";import{a as te}from"./chunk-NMDDRDKF.mjs";import{a as U}from"./chunk-BGOUHB42.mjs";import{a as ie}from"./chunk-UWE7FCPK.mjs";import{a as re}from"./chunk-5LSBU75E.mjs";import{a as I}from"./chunk-QZA4VJ3X.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-5B32DLXZ.mjs";import{a as p}from"./chunk-IV536PHY.mjs";import{a as Z}from"./chunk-GNSQLKQR.mjs";import{a as ne}from"./chunk-KVMYLOAD.mjs";import{a as oe}from"./chunk-IPXXWJDZ.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-4ZVS5BEZ.mjs";import{a as y}from"./chunk-IBE265X3.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-K4QCIO4Q.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-G4DXRP2S.mjs";import{a as F,q as j,s as l}from"./chunk-7FD6ZSLN.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=se.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ae(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as ae}from"./chunk-G4Z3ZQR6.mjs";import{a as se}from"./chunk-M3YL36ZL.mjs";import{a as te}from"./chunk-D54LWE3V.mjs";import{a as U}from"./chunk-MUIRAORV.mjs";import{a as ie}from"./chunk-CGBCYY3B.mjs";import{a as re}from"./chunk-MA5C5FRG.mjs";import{a as I}from"./chunk-KMG6WM6K.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-66FC7DN2.mjs";import{a as p}from"./chunk-XSS5NOQJ.mjs";import{a as Z}from"./chunk-3HADWDDI.mjs";import{a as ne}from"./chunk-LOCNDNZE.mjs";import{a as oe}from"./chunk-PGCTCWAW.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-XCKTWIKV.mjs";import{a as y}from"./chunk-MS44NLMW.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-MGOTSAGH.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-CJLUSPT2.mjs";import{a as F,q as j,s as l}from"./chunk-ZI7JADBP.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=se.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ae(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
+
//# sourceMappingURL=chunk-M6WW53TK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-KMG6WM6K.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-XCKTWIKV.mjs";import{s as n}from"./chunk-ZI7JADBP.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=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-MA5C5FRG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-TSWPPFHW.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-MS44NLMW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-TSWPPFHW.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-MUIRAORV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-GTRD4HFY.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-MXKLHEGP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-ZUJ5KE7O.mjs";import{s as e}from"./chunk-ZI7JADBP.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PGCTCWAW.mjs.map
|