@multiversx/sdk-dapp 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/out/__chunks__/{chunk-AWVWVATR.mjs → chunk-24YYMWQL.mjs} +2 -2
- package/out/__chunks__/{chunk-SKCBMUQL.mjs → chunk-2GOJSBHM.mjs} +2 -2
- package/out/__chunks__/{chunk-GDF5AJ5S.mjs → chunk-3KJKVWZX.mjs} +2 -2
- package/out/__chunks__/{chunk-F5Q64A5W.mjs → chunk-3MEAYEOP.mjs} +2 -2
- package/out/__chunks__/{chunk-IVSP42IE.mjs → chunk-4WOBJUND.mjs} +2 -2
- package/out/__chunks__/chunk-57JT3YYO.mjs +2 -0
- package/out/__chunks__/chunk-5CBADUK2.mjs +2 -0
- package/out/__chunks__/{chunk-VG7UDG2S.mjs → chunk-5EIUN6H3.mjs} +2 -2
- package/out/__chunks__/{chunk-JIAKT3GI.mjs → chunk-5PFAZNIO.mjs} +2 -2
- package/out/__chunks__/{chunk-NVE5YTZK.mjs → chunk-62NTXA3Q.mjs} +2 -2
- package/out/__chunks__/{chunk-OX6DILCF.mjs → chunk-64YGT5EQ.mjs} +2 -2
- package/out/__chunks__/{chunk-YVVAPGXF.mjs → chunk-6K5K2OJF.mjs} +2 -2
- package/out/__chunks__/{chunk-IINL5CEU.mjs → chunk-6QSDEIFP.mjs} +2 -2
- package/out/__chunks__/{chunk-EJ2HUL6D.mjs → chunk-A3CN5JWD.mjs} +2 -2
- package/out/__chunks__/{chunk-3OZWOKL7.mjs → chunk-AFO4MJ3Y.mjs} +2 -2
- package/out/__chunks__/{chunk-NEHR66XQ.mjs → chunk-AL3SMFKF.mjs} +2 -2
- package/out/__chunks__/{chunk-TRIPQLQM.mjs → chunk-ANRHXERH.mjs} +2 -2
- package/out/__chunks__/{chunk-5P5FMYGA.mjs → chunk-AZOEX4RJ.mjs} +2 -2
- package/out/__chunks__/{chunk-S5VF4GWN.mjs → chunk-B3E34X2P.mjs} +2 -2
- package/out/__chunks__/{chunk-M2ZSNGPS.mjs → chunk-B5DFRWKW.mjs} +2 -2
- package/out/__chunks__/{chunk-UVN6CHEM.mjs → chunk-B5OM6BTD.mjs} +2 -2
- package/out/__chunks__/{chunk-TZ2EDK3R.mjs → chunk-BDAB6XQS.mjs} +2 -2
- package/out/__chunks__/{chunk-GY2WKBFX.mjs → chunk-BHRUDWJV.mjs} +2 -2
- package/out/__chunks__/chunk-BPYUCILD.mjs +2 -0
- package/out/__chunks__/chunk-BTJWNUM6.mjs +2 -0
- package/out/__chunks__/chunk-BTJWNUM6.mjs.map +7 -0
- package/out/__chunks__/{chunk-DOU66R4K.mjs → chunk-BZCIDXIT.mjs} +2 -2
- package/out/__chunks__/chunk-CA5CTMET.mjs +2 -0
- package/out/__chunks__/{chunk-J6N7KVXV.mjs → chunk-CKPRCP4B.mjs} +2 -2
- package/out/__chunks__/{chunk-S6EACMBJ.mjs → chunk-CUSPTSTX.mjs} +2 -2
- package/out/__chunks__/{chunk-HLORMFN4.mjs → chunk-CV6QXSKF.mjs} +2 -2
- package/out/__chunks__/chunk-CXEW3QBW.mjs +2 -0
- package/out/__chunks__/chunk-D5DPZ3O3.mjs +2 -0
- package/out/__chunks__/{chunk-RPTQJKFR.mjs → chunk-DCD7Z6NA.mjs} +2 -2
- package/out/__chunks__/{chunk-K7R2V5KX.mjs → chunk-E26YTVSR.mjs} +2 -2
- package/out/__chunks__/{chunk-ODPJDT5F.mjs → chunk-EDKNWPTP.mjs} +2 -2
- package/out/__chunks__/{chunk-UTN4SJ54.mjs → chunk-F3VTVR46.mjs} +2 -2
- package/out/__chunks__/{chunk-RD2EB7NA.mjs → chunk-F7QRSVP4.mjs} +2 -2
- package/out/__chunks__/chunk-FINVDQGG.mjs +2 -0
- package/out/__chunks__/{chunk-BYJK2EOI.mjs → chunk-FK73FOXL.mjs} +2 -2
- package/out/__chunks__/{chunk-NKUK5GFB.mjs → chunk-FYJSQ5IQ.mjs} +2 -2
- package/out/__chunks__/{chunk-LWDK4NX3.mjs → chunk-H3YYJVD2.mjs} +2 -2
- package/out/__chunks__/{chunk-YTA6XGBJ.mjs → chunk-IEGMED5L.mjs} +2 -2
- package/out/__chunks__/{chunk-UKGXMWHE.mjs → chunk-ITL2BSZK.mjs} +2 -2
- package/out/__chunks__/{chunk-UO4CECP4.mjs → chunk-J7WSX6RF.mjs} +2 -2
- package/out/__chunks__/{chunk-LM2GCQL5.mjs → chunk-JGHTVPC7.mjs} +2 -2
- package/out/__chunks__/chunk-JKR3KSKZ.mjs +2 -0
- package/out/__chunks__/{chunk-N5DIMOWZ.mjs → chunk-KELD3JME.mjs} +2 -2
- package/out/__chunks__/{chunk-U7E2AVPF.mjs → chunk-KRHBIYXH.mjs} +2 -2
- package/out/__chunks__/{chunk-XFYYVB6G.mjs → chunk-MEGLLCCR.mjs} +2 -2
- package/out/__chunks__/chunk-MPCAGTJW.mjs +2 -0
- package/out/__chunks__/{chunk-GMX4XDVR.mjs → chunk-NQSC7H2H.mjs} +2 -2
- package/out/__chunks__/{chunk-QGNMCCFK.mjs → chunk-OO76QA6O.mjs} +2 -2
- package/out/__chunks__/{chunk-GUNYJMJE.mjs → chunk-PHBORH3K.mjs} +2 -2
- package/out/__chunks__/chunk-PHT4H7NQ.mjs +2 -0
- package/out/__chunks__/chunk-PL64ZI4J.mjs +2 -0
- package/out/__chunks__/{chunk-P4QMB34E.mjs.map → chunk-PL64ZI4J.mjs.map} +3 -3
- package/out/__chunks__/{chunk-KXK3FLN2.mjs → chunk-PO5CKWAW.mjs} +2 -2
- package/out/__chunks__/{chunk-3IKGFPT3.mjs → chunk-Q3WLMRWP.mjs} +2 -2
- package/out/__chunks__/{chunk-WTBHS6AM.mjs → chunk-Q6O5CYQO.mjs} +2 -2
- package/out/__chunks__/{chunk-WIHG6SHO.mjs → chunk-QC2L7ZLQ.mjs} +2 -2
- package/out/__chunks__/chunk-QW3IVSVZ.mjs +2 -0
- package/out/__chunks__/{chunk-HIKIVTTW.mjs → chunk-RJSOXNSA.mjs} +2 -2
- package/out/__chunks__/{chunk-M5T2OACP.mjs → chunk-RNLXKFRP.mjs} +2 -2
- package/out/__chunks__/{chunk-7YHMRUFS.mjs → chunk-RZURE24V.mjs} +2 -2
- package/out/__chunks__/chunk-S4QEQGMS.mjs +2 -0
- package/out/__chunks__/{chunk-RHCAOCW3.mjs → chunk-S7K3MC3O.mjs} +2 -2
- package/out/__chunks__/{chunk-CC4DXLNZ.mjs → chunk-T7DLVQ6J.mjs} +2 -2
- package/out/__chunks__/{chunk-QAHFVBCD.mjs → chunk-THNK25ZD.mjs} +2 -2
- package/out/__chunks__/chunk-TNL55CRB.mjs +2 -0
- package/out/__chunks__/{chunk-5AITBRJM.mjs → chunk-UBLZ4XV2.mjs} +2 -2
- package/out/__chunks__/chunk-WS2TTYTH.mjs +2 -0
- package/out/__chunks__/{chunk-3AALZJXX.mjs → chunk-WTNCKB4A.mjs} +2 -2
- package/out/__chunks__/{chunk-WBPXPWSV.mjs → chunk-XAYCFZAU.mjs} +2 -2
- package/out/__chunks__/{chunk-I5OYRIZC.mjs → chunk-XIXT6MEM.mjs} +2 -2
- package/out/__chunks__/{chunk-6JIZDYQM.mjs → chunk-Y3FWIS2E.mjs} +2 -2
- package/out/__chunks__/{chunk-PDEIJQWE.mjs → chunk-Y7YFB6KR.mjs} +2 -2
- package/out/__chunks__/{chunk-RSVM3MZD.mjs → chunk-YFM4XPJB.mjs} +2 -2
- package/out/__chunks__/{chunk-IXGPMW52.mjs → chunk-YRMDKZSS.mjs} +2 -2
- package/out/__chunks__/chunk-YRRGPWNG.mjs +2 -0
- package/out/__chunks__/chunk-Z36DGV3K.mjs +2 -0
- package/out/__chunks__/chunk-ZECWUL7N.mjs +2 -0
- package/out/__chunks__/{chunk-PWXGNRYT.mjs.map → chunk-ZECWUL7N.mjs.map} +1 -1
- package/out/__chunks__/chunk-ZT7AZLRE.mjs +2 -0
- package/out/__chunks__/{chunk-5IKWP24U.mjs → chunk-ZW3NEESY.mjs} +2 -2
- package/out/__mocks__/accountConfig.mjs +1 -1
- package/out/__mocks__/index.mjs +1 -1
- package/out/__mocks__/server.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getTransactionsStatus.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/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.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/initApp.mjs.map +3 -3
- 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.d.ts +1 -0
- 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/types/index.mjs +1 -1
- package/out/types/theme.types.d.ts +2 -1
- package/out/types/theme.types.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/getTransactionAsset.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/helpers/mapTransactionToListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.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-2S4GDHPC.mjs +0 -2
- package/out/__chunks__/chunk-5AGNJNHL.mjs +0 -2
- package/out/__chunks__/chunk-5J6OW5XP.mjs +0 -2
- package/out/__chunks__/chunk-66LM6A7E.mjs +0 -2
- package/out/__chunks__/chunk-6K6VHJWQ.mjs +0 -2
- package/out/__chunks__/chunk-C7NS47QA.mjs +0 -2
- package/out/__chunks__/chunk-CETMI3F5.mjs +0 -2
- package/out/__chunks__/chunk-DF5ZV5BO.mjs +0 -2
- package/out/__chunks__/chunk-DJWI5LZX.mjs +0 -2
- package/out/__chunks__/chunk-GSMTFDRE.mjs +0 -2
- package/out/__chunks__/chunk-H7E4BCEJ.mjs +0 -2
- package/out/__chunks__/chunk-IWHUAAVD.mjs +0 -2
- package/out/__chunks__/chunk-JR23TXKP.mjs +0 -2
- package/out/__chunks__/chunk-JR23TXKP.mjs.map +0 -7
- package/out/__chunks__/chunk-ML7FXWAD.mjs +0 -2
- package/out/__chunks__/chunk-MSQGMOCS.mjs +0 -2
- package/out/__chunks__/chunk-P4QMB34E.mjs +0 -2
- package/out/__chunks__/chunk-PWXGNRYT.mjs +0 -2
- package/out/__chunks__/chunk-QS2RBVTW.mjs +0 -2
- package/out/__chunks__/chunk-RU7UYXPW.mjs +0 -2
- package/out/__chunks__/chunk-UCJMQJM4.mjs +0 -2
- /package/out/__chunks__/{chunk-AWVWVATR.mjs.map → chunk-24YYMWQL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SKCBMUQL.mjs.map → chunk-2GOJSBHM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GDF5AJ5S.mjs.map → chunk-3KJKVWZX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F5Q64A5W.mjs.map → chunk-3MEAYEOP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IVSP42IE.mjs.map → chunk-4WOBJUND.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CETMI3F5.mjs.map → chunk-57JT3YYO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RU7UYXPW.mjs.map → chunk-5CBADUK2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VG7UDG2S.mjs.map → chunk-5EIUN6H3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JIAKT3GI.mjs.map → chunk-5PFAZNIO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NVE5YTZK.mjs.map → chunk-62NTXA3Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OX6DILCF.mjs.map → chunk-64YGT5EQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YVVAPGXF.mjs.map → chunk-6K5K2OJF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IINL5CEU.mjs.map → chunk-6QSDEIFP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EJ2HUL6D.mjs.map → chunk-A3CN5JWD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3OZWOKL7.mjs.map → chunk-AFO4MJ3Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NEHR66XQ.mjs.map → chunk-AL3SMFKF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TRIPQLQM.mjs.map → chunk-ANRHXERH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5P5FMYGA.mjs.map → chunk-AZOEX4RJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S5VF4GWN.mjs.map → chunk-B3E34X2P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M2ZSNGPS.mjs.map → chunk-B5DFRWKW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UVN6CHEM.mjs.map → chunk-B5OM6BTD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TZ2EDK3R.mjs.map → chunk-BDAB6XQS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GY2WKBFX.mjs.map → chunk-BHRUDWJV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MSQGMOCS.mjs.map → chunk-BPYUCILD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DOU66R4K.mjs.map → chunk-BZCIDXIT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H7E4BCEJ.mjs.map → chunk-CA5CTMET.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J6N7KVXV.mjs.map → chunk-CKPRCP4B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S6EACMBJ.mjs.map → chunk-CUSPTSTX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HLORMFN4.mjs.map → chunk-CV6QXSKF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UCJMQJM4.mjs.map → chunk-CXEW3QBW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IWHUAAVD.mjs.map → chunk-D5DPZ3O3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RPTQJKFR.mjs.map → chunk-DCD7Z6NA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K7R2V5KX.mjs.map → chunk-E26YTVSR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ODPJDT5F.mjs.map → chunk-EDKNWPTP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UTN4SJ54.mjs.map → chunk-F3VTVR46.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RD2EB7NA.mjs.map → chunk-F7QRSVP4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2S4GDHPC.mjs.map → chunk-FINVDQGG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BYJK2EOI.mjs.map → chunk-FK73FOXL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NKUK5GFB.mjs.map → chunk-FYJSQ5IQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LWDK4NX3.mjs.map → chunk-H3YYJVD2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YTA6XGBJ.mjs.map → chunk-IEGMED5L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UKGXMWHE.mjs.map → chunk-ITL2BSZK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UO4CECP4.mjs.map → chunk-J7WSX6RF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LM2GCQL5.mjs.map → chunk-JGHTVPC7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5AGNJNHL.mjs.map → chunk-JKR3KSKZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N5DIMOWZ.mjs.map → chunk-KELD3JME.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U7E2AVPF.mjs.map → chunk-KRHBIYXH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XFYYVB6G.mjs.map → chunk-MEGLLCCR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DF5ZV5BO.mjs.map → chunk-MPCAGTJW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GMX4XDVR.mjs.map → chunk-NQSC7H2H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QGNMCCFK.mjs.map → chunk-OO76QA6O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GUNYJMJE.mjs.map → chunk-PHBORH3K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5J6OW5XP.mjs.map → chunk-PHT4H7NQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KXK3FLN2.mjs.map → chunk-PO5CKWAW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3IKGFPT3.mjs.map → chunk-Q3WLMRWP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WTBHS6AM.mjs.map → chunk-Q6O5CYQO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WIHG6SHO.mjs.map → chunk-QC2L7ZLQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DJWI5LZX.mjs.map → chunk-QW3IVSVZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HIKIVTTW.mjs.map → chunk-RJSOXNSA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M5T2OACP.mjs.map → chunk-RNLXKFRP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7YHMRUFS.mjs.map → chunk-RZURE24V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ML7FXWAD.mjs.map → chunk-S4QEQGMS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RHCAOCW3.mjs.map → chunk-S7K3MC3O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CC4DXLNZ.mjs.map → chunk-T7DLVQ6J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QAHFVBCD.mjs.map → chunk-THNK25ZD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QS2RBVTW.mjs.map → chunk-TNL55CRB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5AITBRJM.mjs.map → chunk-UBLZ4XV2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-66LM6A7E.mjs.map → chunk-WS2TTYTH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3AALZJXX.mjs.map → chunk-WTNCKB4A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WBPXPWSV.mjs.map → chunk-XAYCFZAU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I5OYRIZC.mjs.map → chunk-XIXT6MEM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6JIZDYQM.mjs.map → chunk-Y3FWIS2E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PDEIJQWE.mjs.map → chunk-Y7YFB6KR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RSVM3MZD.mjs.map → chunk-YFM4XPJB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IXGPMW52.mjs.map → chunk-YRMDKZSS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6K6VHJWQ.mjs.map → chunk-YRRGPWNG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C7NS47QA.mjs.map → chunk-Z36DGV3K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GSMTFDRE.mjs.map → chunk-ZT7AZLRE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5IKWP24U.mjs.map → chunk-ZW3NEESY.mjs.map} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-OZ4ZZI3H.mjs";import{a as se}from"./chunk-M3YL36ZL.mjs";import{a as te}from"./chunk-GMX4XDVR.mjs";import{a as N}from"./chunk-DOU66R4K.mjs";import{a as ie}from"./chunk-IXGPMW52.mjs";import{a as re}from"./chunk-J6N7KVXV.mjs";import{a as C}from"./chunk-MSQGMOCS.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-TRIPQLQM.mjs";import{a as p}from"./chunk-GY2WKBFX.mjs";import{a as Z}from"./chunk-3IKGFPT3.mjs";import{a as ne}from"./chunk-U7E2AVPF.mjs";import{a as oe}from"./chunk-M2ZSNGPS.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as u,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as W,r as M,s as I,t as L}from"./chunk-GUNYJMJE.mjs";import{a as P}from"./chunk-WBPXPWSV.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as j}from"./chunk-DJWI5LZX.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-CC4DXLNZ.mjs";import{a as q,s as F,u as l}from"./chunk-M5T2OACP.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 d}from"./chunk-TI73UXGG.mjs";import{a as o}from"./chunk-S2FQWSUO.mjs";import{IframeLoginTypes as ge}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(!!C())return;await N.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await 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=N.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 me=3e4,he=5e3,ue=3e3,b=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=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(W.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,he)}},me))};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,I(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,W.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:ue,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:d.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 fe}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:d.extension})};this.provider=fe.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 we={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:d[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=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 we[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 le}from"@multiversx/sdk-wallet-connect-provider/out";var pe=[u.CANCEL_ACTION,u.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),await this.sendCustomRequest({method:u.CANCEL_ACTION,action:le.CANCEL_ACTION}),n}finally{r.closeUI()}};this.cancelAction=async()=>{await this.sendCustomRequest({method:u.CANCEL_ACTION,action:le.CANCEL_ACTION})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:d.extension})};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await 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,P.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await P.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=V(l());if(H(l())&&pe.push(u.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let m={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:v=>{}};try{let{walletConnectV2ProjectId:v,walletConnectV2Options:x={},walletConnectV2RelayAddress:O=""}=e,y=new Y(m,t,O,v,x);return await y.init(),{walletConnectProvider:y,dappMethods:pe}}catch(v){throw console.error("Unable to connect",v),r&&await this.logout(),v}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=P.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),c=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${c}?wallet-connect=${encodeURIComponent(n)}`});let w=await this.provider.login({approval:s,token:e?.token}),{address:m="",signature:v=""}=w??{};return t.handleClose({isLoginFinished:!!m}),{address:m,signature:v}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return P.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await b.getInstance().init();break}case o.metamask:{r=new T({type:ge.metamask});break}case o.passkey:{r=new T({type:ge.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=j();for(let c of this._customProviders)c.type===i&&(r=await c.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);I(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return ae(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),I(null),q(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:c,onClose:w}=await Z({cancelAction:e}),m=Object.values(A.customProviders),v=m.reduce((h,U)=>(h[U.type]=U.name,h),{}),x={...d,...v},O=async()=>{await w({shouldCancelAction:!0}),s({message:"Signing canceled"})};c.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",O);let y=Pe(m,r)?r:o.none;c.updateData({name:x[y],type:y});try{let h=await i(a);n(h)}catch(h){await w({shouldCancelAction:!0}),s(h)}finally{c.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:d.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,b as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-P4QMB34E.mjs.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|