@multiversx/sdk-dapp 5.0.0-alpha.6 → 5.0.0-alpha.7
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-3W2X3GZO.mjs → chunk-264GC7EP.mjs} +2 -2
- package/out/__chunks__/chunk-2BJ6OPYI.mjs +2 -0
- package/out/__chunks__/{chunk-EVNL24SI.mjs → chunk-2ETIU6VR.mjs} +2 -2
- package/out/__chunks__/{chunk-CYFAX2FA.mjs → chunk-4HRKDTID.mjs} +2 -2
- package/out/__chunks__/{chunk-4XJLALSE.mjs → chunk-4KDUDO4R.mjs} +2 -2
- package/out/__chunks__/chunk-4KDUDO4R.mjs.map +7 -0
- package/out/__chunks__/{chunk-P3NFZKKS.mjs → chunk-4QA5GQQH.mjs} +2 -2
- package/out/__chunks__/{chunk-TTNVCEUD.mjs → chunk-4TH4J4EE.mjs} +2 -2
- package/out/__chunks__/{chunk-FKB6EYMV.mjs → chunk-5JZN3DEY.mjs} +2 -2
- package/out/__chunks__/chunk-5X25X3ZU.mjs +2 -0
- package/out/__chunks__/{chunk-4BRZWHKY.mjs.map → chunk-5X25X3ZU.mjs.map} +2 -2
- package/out/__chunks__/{chunk-S37QJIXF.mjs → chunk-6HVXWGV7.mjs} +2 -2
- package/out/__chunks__/chunk-6USJJJKT.mjs +2 -0
- package/out/__chunks__/{chunk-A2S6BDWO.mjs → chunk-A7ZZJU5B.mjs} +2 -2
- package/out/__chunks__/chunk-BHUV7XPT.mjs +2 -0
- package/out/__chunks__/chunk-BXQVIW3W.mjs +2 -0
- package/out/__chunks__/{chunk-6XUO2J7G.mjs → chunk-CUMDGAVL.mjs} +2 -2
- package/out/__chunks__/chunk-DNI2WCEF.mjs +2 -0
- package/out/__chunks__/chunk-EM6LKIB7.mjs +2 -0
- package/out/__chunks__/{chunk-JGWNKE3I.mjs.map → chunk-EM6LKIB7.mjs.map} +2 -2
- package/out/__chunks__/{chunk-W7TRO6AR.mjs → chunk-F2RJTQJP.mjs} +2 -2
- package/out/__chunks__/chunk-F7BK2C7W.mjs +2 -0
- package/out/__chunks__/{chunk-F33ED5VY.mjs → chunk-FFFC4KOM.mjs} +2 -2
- package/out/__chunks__/chunk-FP5KY5UQ.mjs +2 -0
- package/out/__chunks__/chunk-FSVV6MTL.mjs +2 -0
- package/out/__chunks__/{chunk-3XSKVLJW.mjs → chunk-G2NPJFHA.mjs} +2 -2
- package/out/__chunks__/{chunk-EUM7J3UT.mjs → chunk-GMMH7PLZ.mjs} +2 -2
- package/out/__chunks__/{chunk-7HJHGIBJ.mjs → chunk-H3XPCFFD.mjs} +2 -2
- package/out/__chunks__/{chunk-EA6FWJCX.mjs → chunk-HEH5CYKF.mjs} +2 -2
- package/out/__chunks__/{chunk-4KOEDU3Y.mjs → chunk-HW2MCEHM.mjs} +2 -2
- package/out/__chunks__/chunk-I6Y5E7TB.mjs +2 -0
- package/out/__chunks__/{chunk-UFOL2NTX.mjs.map → chunk-I6Y5E7TB.mjs.map} +2 -2
- package/out/__chunks__/chunk-I7ODJJY3.mjs +2 -0
- package/out/__chunks__/chunk-I7ODJJY3.mjs.map +7 -0
- package/out/__chunks__/chunk-ICVO7SST.mjs +2 -0
- package/out/__chunks__/{chunk-SJ4UJRDS.mjs.map → chunk-ICVO7SST.mjs.map} +2 -2
- package/out/__chunks__/chunk-IEJARRBP.mjs +2 -0
- package/out/__chunks__/chunk-IEJARRBP.mjs.map +7 -0
- package/out/__chunks__/chunk-IXBRSEAD.mjs +2 -0
- package/out/__chunks__/chunk-IXBRSEAD.mjs.map +7 -0
- package/out/__chunks__/{chunk-G3WS2SYA.mjs → chunk-K2UOPHUJ.mjs} +2 -2
- package/out/__chunks__/chunk-LDCOLXCM.mjs +2 -0
- package/out/__chunks__/{chunk-TKYDPA56.mjs → chunk-LT3PAYQB.mjs} +2 -2
- package/out/__chunks__/{chunk-IAAVRI6B.mjs → chunk-N2SRHMUK.mjs} +2 -2
- package/out/__chunks__/chunk-NHXPNROG.mjs +2 -0
- package/out/__chunks__/chunk-NHXPNROG.mjs.map +7 -0
- package/out/__chunks__/{chunk-KSNODP2B.mjs → chunk-NK6AUWSP.mjs} +2 -2
- package/out/__chunks__/{chunk-OPM4DDXX.mjs → chunk-OO2WCABO.mjs} +2 -2
- package/out/__chunks__/{chunk-YVDP2G6F.mjs → chunk-OWAQ72KE.mjs} +2 -2
- package/out/__chunks__/{chunk-PYJMQN53.mjs → chunk-PEF2OHNN.mjs} +2 -2
- package/out/__chunks__/chunk-PHU7P27U.mjs +2 -0
- package/out/__chunks__/{chunk-AW4W44IZ.mjs → chunk-PMA364GM.mjs} +2 -2
- package/out/__chunks__/chunk-PMEBJV22.mjs +2 -0
- package/out/__chunks__/{chunk-2ENRJCCA.mjs → chunk-PRRE63HV.mjs} +2 -2
- package/out/__chunks__/{chunk-Z2PS6O33.mjs → chunk-QH23KEBZ.mjs} +2 -2
- package/out/__chunks__/{chunk-CU47DEVW.mjs → chunk-QREEUQEX.mjs} +2 -2
- package/out/__chunks__/{chunk-S55MULGJ.mjs → chunk-R3WRJYVR.mjs} +2 -2
- package/out/__chunks__/{chunk-KMFCWHOG.mjs → chunk-R7N7SVGB.mjs} +2 -2
- package/out/__chunks__/{chunk-4X65PD55.mjs → chunk-S6RKVTOG.mjs} +2 -2
- package/out/__chunks__/chunk-SI4DMR7C.mjs +2 -0
- package/out/__chunks__/chunk-SI4DMR7C.mjs.map +7 -0
- package/out/__chunks__/chunk-SNNND5RB.mjs +2 -0
- package/out/__chunks__/chunk-SUE7UB6N.mjs +2 -0
- package/out/__chunks__/{chunk-GVA5Y5KR.mjs → chunk-T4QYEID4.mjs} +2 -2
- package/out/__chunks__/{chunk-QSAHAGTQ.mjs → chunk-V45NSWVD.mjs} +2 -2
- package/out/__chunks__/{chunk-NREOHZVN.mjs → chunk-V7JEC6M7.mjs} +2 -2
- package/out/__chunks__/{chunk-OIL7VMRM.mjs → chunk-VOE6ZSTO.mjs} +2 -2
- package/out/__chunks__/{chunk-PEURG4PE.mjs → chunk-W5NBJSZI.mjs} +2 -2
- package/out/__chunks__/chunk-WFUJNJVG.mjs +2 -0
- package/out/__chunks__/chunk-WFUJNJVG.mjs.map +7 -0
- package/out/__chunks__/chunk-XDSRFSN7.mjs +2 -0
- package/out/__chunks__/{chunk-6VL4U3SD.mjs.map → chunk-XDSRFSN7.mjs.map} +2 -2
- package/out/__chunks__/{chunk-CZYIK4AV.mjs → chunk-XGAMOGDQ.mjs} +2 -2
- package/out/__chunks__/{chunk-R6GCICL7.mjs → chunk-XRCG3U3J.mjs} +2 -2
- package/out/__chunks__/{chunk-YZ5ZS3VO.mjs → chunk-XYRJIHLL.mjs} +2 -2
- package/out/__chunks__/{chunk-F3ZH2WXR.mjs → chunk-XZVMG6ZI.mjs} +2 -2
- package/out/__chunks__/{chunk-7YA5JPZ3.mjs → chunk-Y6A3NQHA.mjs} +2 -2
- package/out/__chunks__/{chunk-HTPPS2MF.mjs → chunk-YB2E5WOO.mjs} +1 -1
- package/out/__chunks__/chunk-YB2E5WOO.mjs.map +7 -0
- package/out/__chunks__/chunk-YEXBSKXL.mjs +2 -0
- package/out/__chunks__/chunk-YEXBSKXL.mjs.map +7 -0
- package/out/__chunks__/chunk-YMKC64NV.mjs +2 -0
- package/out/__chunks__/chunk-YNQZ4KGU.mjs +2 -0
- package/out/__chunks__/chunk-YNQZ4KGU.mjs.map +7 -0
- package/out/__chunks__/{chunk-L7J5JJEB.mjs → chunk-ZLREP3MA.mjs} +1 -1
- package/out/__chunks__/{chunk-L7J5JJEB.mjs.map → chunk-ZLREP3MA.mjs.map} +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/index.mjs +1 -1
- package/out/constants/providerFactory.constants.d.ts +2 -1
- package/out/constants/providerFactory.constants.js +1 -0
- package/out/constants/providerFactory.constants.js.map +1 -1
- package/out/constants/providerFactory.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/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.d.ts +1 -1
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.js +7 -3
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.js.map +1 -1
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs.map +3 -3
- package/out/index.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.d.ts +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js +17 -7
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js.map +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.types.d.ts +4 -5
- package/out/managers/UnlockPanelManager/UnlockPanelManager.types.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/initApp.mjs.map +2 -2
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.d.ts +1 -44
- 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/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.d.ts +2 -45
- 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/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.js +8 -8
- package/out/providers/ProviderFactory.js.map +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/clearInitiatedLogins.d.ts +2 -2
- package/out/providers/helpers/clearInitiatedLogins.js.map +1 -1
- package/out/providers/helpers/clearInitiatedLogins.mjs +1 -1
- package/out/providers/helpers/emptyProvider.d.ts +2 -2
- package/out/providers/helpers/emptyProvider.js.map +1 -1
- package/out/providers/helpers/emptyProvider.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.d.ts +3 -3
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.js.map +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.d.ts +2 -2
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js.map +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.d.ts +2 -2
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.js.map +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.d.ts +2 -2
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.js.map +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.d.ts +2 -2
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.js.map +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 +2 -2
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js.map +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/WebviewProviderStrategy.d.ts +2 -2
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js.map +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.js +17 -2
- package/out/providers/strategies/helpers/signMessage/signMessage.js.map +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/providers/types/providerFactory.types.d.ts +18 -17
- package/out/providers/types/providerFactory.types.js +10 -11
- package/out/providers/types/providerFactory.types.js.map +1 -1
- package/out/providers/types/providerFactory.types.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.d.ts +1 -44
- 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/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.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.d.ts +2 -2
- package/out/store/actions/loginInfo/loginInfoActions.js.map +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.d.ts +3 -3
- package/out/store/actions/sharedActions/sharedActions.js.map +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/selectors/loginInfoSelectors.d.ts +2 -45
- package/out/store/slices/loginInfo/loginInfo.types.d.ts +3 -3
- package/out/store/slices/loginInfo/loginInfoSlice.d.ts +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/createUIElement.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/walletconnect/__mocks__/sdkWalletconnectProvider.mjs +1 -1
- package/package.json +2 -2
- package/out/__chunks__/chunk-2S52O7LI.mjs +0 -2
- package/out/__chunks__/chunk-2S52O7LI.mjs.map +0 -7
- package/out/__chunks__/chunk-2X7ENE6Y.mjs +0 -2
- package/out/__chunks__/chunk-2X7ENE6Y.mjs.map +0 -7
- package/out/__chunks__/chunk-4BRZWHKY.mjs +0 -2
- package/out/__chunks__/chunk-4HVG3HGD.mjs +0 -2
- package/out/__chunks__/chunk-4NY6ZQCB.mjs +0 -2
- package/out/__chunks__/chunk-4NY6ZQCB.mjs.map +0 -7
- package/out/__chunks__/chunk-4XJLALSE.mjs.map +0 -7
- package/out/__chunks__/chunk-53X5OIR3.mjs +0 -2
- package/out/__chunks__/chunk-5TS4PZ6V.mjs +0 -2
- package/out/__chunks__/chunk-5WQFV4QY.mjs +0 -2
- package/out/__chunks__/chunk-5WQFV4QY.mjs.map +0 -7
- package/out/__chunks__/chunk-6VL4U3SD.mjs +0 -2
- package/out/__chunks__/chunk-7EQBNFTV.mjs +0 -2
- package/out/__chunks__/chunk-AIO3CDMH.mjs +0 -2
- package/out/__chunks__/chunk-AIO3CDMH.mjs.map +0 -7
- package/out/__chunks__/chunk-BZWDNUS4.mjs +0 -2
- package/out/__chunks__/chunk-CQZVU4RB.mjs +0 -1
- package/out/__chunks__/chunk-CQZVU4RB.mjs.map +0 -7
- package/out/__chunks__/chunk-CWZPGMEQ.mjs +0 -2
- package/out/__chunks__/chunk-CWZPGMEQ.mjs.map +0 -7
- package/out/__chunks__/chunk-EGEUR6LK.mjs +0 -2
- package/out/__chunks__/chunk-EGEUR6LK.mjs.map +0 -7
- package/out/__chunks__/chunk-EJKW2LHT.mjs +0 -2
- package/out/__chunks__/chunk-EJKW2LHT.mjs.map +0 -7
- package/out/__chunks__/chunk-G57SJWVR.mjs +0 -1
- package/out/__chunks__/chunk-G57SJWVR.mjs.map +0 -7
- package/out/__chunks__/chunk-GAOXEYHA.mjs +0 -1
- package/out/__chunks__/chunk-GAOXEYHA.mjs.map +0 -7
- package/out/__chunks__/chunk-HTPPS2MF.mjs.map +0 -7
- package/out/__chunks__/chunk-I3DNTUGR.mjs +0 -2
- package/out/__chunks__/chunk-IEPJBJYE.mjs +0 -2
- package/out/__chunks__/chunk-IOFZWNJ4.mjs +0 -2
- package/out/__chunks__/chunk-IOFZWNJ4.mjs.map +0 -7
- package/out/__chunks__/chunk-JGWNKE3I.mjs +0 -2
- package/out/__chunks__/chunk-JHSDQ4NG.mjs +0 -2
- package/out/__chunks__/chunk-KDE4OU7S.mjs +0 -2
- package/out/__chunks__/chunk-L73MXRIY.mjs +0 -2
- package/out/__chunks__/chunk-MCOVQEK7.mjs +0 -2
- package/out/__chunks__/chunk-MCOVQEK7.mjs.map +0 -7
- package/out/__chunks__/chunk-OYA4AQFY.mjs +0 -2
- package/out/__chunks__/chunk-OYA4AQFY.mjs.map +0 -7
- package/out/__chunks__/chunk-PVNL2LED.mjs +0 -1
- package/out/__chunks__/chunk-PVNL2LED.mjs.map +0 -7
- package/out/__chunks__/chunk-QA26HI3B.mjs +0 -2
- package/out/__chunks__/chunk-QA26HI3B.mjs.map +0 -7
- package/out/__chunks__/chunk-QQU6SRAV.mjs +0 -2
- package/out/__chunks__/chunk-RTH5DJEI.mjs +0 -2
- package/out/__chunks__/chunk-RVHEUIC3.mjs +0 -2
- package/out/__chunks__/chunk-RVHEUIC3.mjs.map +0 -7
- package/out/__chunks__/chunk-SJ4UJRDS.mjs +0 -2
- package/out/__chunks__/chunk-THQWNWSE.mjs +0 -2
- package/out/__chunks__/chunk-THQWNWSE.mjs.map +0 -7
- package/out/__chunks__/chunk-U277O55E.mjs +0 -2
- package/out/__chunks__/chunk-U277O55E.mjs.map +0 -7
- package/out/__chunks__/chunk-UFOL2NTX.mjs +0 -2
- package/out/__chunks__/chunk-VZI2XGAI.mjs +0 -2
- package/out/__chunks__/chunk-XCKQMM73.mjs +0 -2
- package/out/__chunks__/chunk-XCKQMM73.mjs.map +0 -7
- package/out/__chunks__/chunk-XCLDLXPX.mjs +0 -2
- package/out/__chunks__/chunk-XKBQDG5H.mjs +0 -1
- package/out/__chunks__/chunk-XKBQDG5H.mjs.map +0 -7
- package/out/__chunks__/chunk-XNEYOZ7M.mjs +0 -1
- package/out/__chunks__/chunk-XNEYOZ7M.mjs.map +0 -7
- /package/out/__chunks__/{chunk-3W2X3GZO.mjs.map → chunk-264GC7EP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JHSDQ4NG.mjs.map → chunk-2BJ6OPYI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EVNL24SI.mjs.map → chunk-2ETIU6VR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CYFAX2FA.mjs.map → chunk-4HRKDTID.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P3NFZKKS.mjs.map → chunk-4QA5GQQH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TTNVCEUD.mjs.map → chunk-4TH4J4EE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FKB6EYMV.mjs.map → chunk-5JZN3DEY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S37QJIXF.mjs.map → chunk-6HVXWGV7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5TS4PZ6V.mjs.map → chunk-6USJJJKT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A2S6BDWO.mjs.map → chunk-A7ZZJU5B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RTH5DJEI.mjs.map → chunk-BHUV7XPT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VZI2XGAI.mjs.map → chunk-BXQVIW3W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6XUO2J7G.mjs.map → chunk-CUMDGAVL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4HVG3HGD.mjs.map → chunk-DNI2WCEF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W7TRO6AR.mjs.map → chunk-F2RJTQJP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L73MXRIY.mjs.map → chunk-F7BK2C7W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F33ED5VY.mjs.map → chunk-FFFC4KOM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KDE4OU7S.mjs.map → chunk-FP5KY5UQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BZWDNUS4.mjs.map → chunk-FSVV6MTL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3XSKVLJW.mjs.map → chunk-G2NPJFHA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EUM7J3UT.mjs.map → chunk-GMMH7PLZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7HJHGIBJ.mjs.map → chunk-H3XPCFFD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EA6FWJCX.mjs.map → chunk-HEH5CYKF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4KOEDU3Y.mjs.map → chunk-HW2MCEHM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G3WS2SYA.mjs.map → chunk-K2UOPHUJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XCLDLXPX.mjs.map → chunk-LDCOLXCM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TKYDPA56.mjs.map → chunk-LT3PAYQB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IAAVRI6B.mjs.map → chunk-N2SRHMUK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KSNODP2B.mjs.map → chunk-NK6AUWSP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OPM4DDXX.mjs.map → chunk-OO2WCABO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YVDP2G6F.mjs.map → chunk-OWAQ72KE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PYJMQN53.mjs.map → chunk-PEF2OHNN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IEPJBJYE.mjs.map → chunk-PHU7P27U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AW4W44IZ.mjs.map → chunk-PMA364GM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I3DNTUGR.mjs.map → chunk-PMEBJV22.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2ENRJCCA.mjs.map → chunk-PRRE63HV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z2PS6O33.mjs.map → chunk-QH23KEBZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CU47DEVW.mjs.map → chunk-QREEUQEX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S55MULGJ.mjs.map → chunk-R3WRJYVR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KMFCWHOG.mjs.map → chunk-R7N7SVGB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4X65PD55.mjs.map → chunk-S6RKVTOG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QQU6SRAV.mjs.map → chunk-SNNND5RB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-53X5OIR3.mjs.map → chunk-SUE7UB6N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GVA5Y5KR.mjs.map → chunk-T4QYEID4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QSAHAGTQ.mjs.map → chunk-V45NSWVD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NREOHZVN.mjs.map → chunk-V7JEC6M7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OIL7VMRM.mjs.map → chunk-VOE6ZSTO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PEURG4PE.mjs.map → chunk-W5NBJSZI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CZYIK4AV.mjs.map → chunk-XGAMOGDQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R6GCICL7.mjs.map → chunk-XRCG3U3J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YZ5ZS3VO.mjs.map → chunk-XYRJIHLL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F3ZH2WXR.mjs.map → chunk-XZVMG6ZI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7YA5JPZ3.mjs.map → chunk-Y6A3NQHA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7EQBNFTV.mjs.map → chunk-YMKC64NV.mjs.map} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var o=s=>`Unable to perform ${s}, Provider not initialized`,e=class{init(){return Promise.resolve(!1)}login(n){throw new Error(o(`login with options: ${n}`))}logout(n){throw new Error(o(`logout with options: ${n}`))}getAccount(){throw new Error(o("unable to get account"))}setAccount(n){throw new Error(o(`unable to set account with: ${n}`))}isInitialized(){return!1}isConnected(){return!1}sendTransaction(n,r){throw new Error(o(`sendTransaction with transactions: ${n} options: ${r}`))}signTransaction(n,r){throw new Error(o(`signTransaction with transactions: ${JSON.stringify(n)} options: ${r}`))}signTransactions(n){throw new Error(o(`signTransactions with transactions: ${JSON.stringify(n)}`))}signMessage(n,r){throw new Error(o(`signMessage with ${n} and options ${r}`))}sendCustomMessage({method:n,params:r}){throw new Error(o(`sendCustomMessage with method: ${n} params: ${r}`))}sendCustomRequest(n){throw new Error(o(`sendSessionEvent with options: ${n}`))}async getAddress(){throw new Error(o("getAddress"))}getType(){return""}},p=new e;export{e as a,p as b};
|
|
2
|
-
//# sourceMappingURL=chunk-THQWNWSE.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/providers/helpers/emptyProvider.ts"],
|
|
4
|
-
"sourcesContent": ["import { Message, Transaction } from '@multiversx/sdk-core';\nimport {\n IDAppProviderAccount,\n IDAppProviderOptions\n} from '@multiversx/sdk-dapp-utils/out';\nimport {\n IProvider,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\n\nimport { EngineTypes } from 'utils/walletconnect/__sdkWalletconnectProvider';\n\nconst notInitializedError = (caller: string) => {\n return `Unable to perform ${caller}, Provider not initialized`;\n};\n\nexport class EmptyProvider implements IProvider {\n init(): Promise<boolean> {\n return Promise.resolve(false);\n }\n\n login<TOptions = { callbackUrl?: string } | undefined, TResponse = string>(\n options?: TOptions\n ): Promise<TResponse> {\n throw new Error(notInitializedError(`login with options: ${options}`));\n }\n\n logout<TOptions = { callbackUrl?: string }, TResponse = boolean>(\n options?: TOptions\n ): Promise<TResponse> {\n throw new Error(notInitializedError(`logout with options: ${options}`));\n }\n\n getAccount(): IDAppProviderAccount | null {\n throw new Error(notInitializedError('unable to get account'));\n }\n setAccount(account: IDAppProviderAccount): void {\n throw new Error(\n notInitializedError(`unable to set account with: ${account}`)\n );\n }\n\n isInitialized(): boolean {\n return false;\n }\n\n isConnected(): boolean {\n return false;\n }\n\n sendTransaction?<\n TOptions = { callbackUrl?: string },\n TResponse = Transaction\n >(transaction: Transaction, options?: TOptions): Promise<TResponse> {\n throw new Error(\n notInitializedError(\n `sendTransaction with transactions: ${transaction} options: ${options}`\n )\n );\n }\n\n signTransaction<TOptions = { callbackUrl?: string }, TResponse = Transaction>(\n transaction: Transaction,\n options?: TOptions\n ): Promise<TResponse> {\n throw new Error(\n notInitializedError(\n `signTransaction with transactions: ${JSON.stringify(transaction)} options: ${options}`\n )\n );\n }\n\n signTransactions<T>(transactions: T[]): Promise<T[]> {\n throw new Error(\n notInitializedError(\n `signTransactions with transactions: ${JSON.stringify(transactions)}`\n )\n );\n }\n\n signMessage(\n message: Message,\n options?: IDAppProviderOptions\n ): Promise<Message | null> {\n throw new Error(\n notInitializedError(`signMessage with ${message} and options ${options}`)\n );\n }\n\n sendCustomMessage?({\n method,\n params\n }: {\n method: string;\n params: any;\n }): Promise<any> {\n throw new Error(\n notInitializedError(\n `sendCustomMessage with method: ${method} params: ${params}`\n )\n );\n }\n\n sendCustomRequest?(options?: {\n request: EngineTypes.RequestParams['request'];\n }): Promise<any> {\n throw new Error(\n notInitializedError(`sendSessionEvent with options: ${options}`)\n );\n }\n\n async getAddress(): Promise<string | undefined> {\n throw new Error(notInitializedError('getAddress'));\n }\n\n getType(): ProviderTypeEnum {\n return ProviderTypeEnum.none;\n }\n}\n\nexport const emptyProvider = new EmptyProvider();\n"],
|
|
5
|
-
"mappings": "AAYA,IAAMA,EAAuBC,GACpB,qBAAqBA,CAAM,6BAGvBC,EAAN,KAAyC,CAC9C,MAAyB,CACvB,OAAO,QAAQ,QAAQ,EAAK,CAC9B,CAEA,MACEC,EACoB,CACpB,MAAM,IAAI,MAAMH,EAAoB,uBAAuBG,CAAO,EAAE,CAAC,CACvE,CAEA,OACEA,EACoB,CACpB,MAAM,IAAI,MAAMH,EAAoB,wBAAwBG,CAAO,EAAE,CAAC,CACxE,CAEA,YAA0C,CACxC,MAAM,IAAI,MAAMH,EAAoB,uBAAuB,CAAC,CAC9D,CACA,WAAWI,EAAqC,CAC9C,MAAM,IAAI,MACRJ,EAAoB,+BAA+BI,CAAO,EAAE,CAC9D,CACF,CAEA,eAAyB,CACvB,MAAO,EACT,CAEA,aAAuB,CACrB,MAAO,EACT,CAEA,gBAGEC,EAA0BF,EAAwC,CAClE,MAAM,IAAI,MACRH,EACE,sCAAsCK,CAAW,aAAaF,CAAO,EACvE,CACF,CACF,CAEA,gBACEE,EACAF,EACoB,CACpB,MAAM,IAAI,MACRH,EACE,sCAAsC,KAAK,UAAUK,CAAW,CAAC,aAAaF,CAAO,EACvF,CACF,CACF,CAEA,iBAAoBG,EAAiC,CACnD,MAAM,IAAI,MACRN,EACE,uCAAuC,KAAK,UAAUM,CAAY,CAAC,EACrE,CACF,CACF,CAEA,YACEC,EACAJ,EACyB,CACzB,MAAM,IAAI,MACRH,EAAoB,oBAAoBO,CAAO,gBAAgBJ,CAAO,EAAE,CAC1E,CACF,CAEA,kBAAmB,CACjB,OAAAK,EACA,OAAAC,CACF,EAGiB,CACf,MAAM,IAAI,MACRT,EACE,kCAAkCQ,CAAM,YAAYC,CAAM,EAC5D,CACF,CACF,CAEA,kBAAmBN,EAEF,CACf,MAAM,IAAI,MACRH,EAAoB,kCAAkCG,CAAO,EAAE,CACjE,CACF,CAEA,MAAM,YAA0C,CAC9C,MAAM,IAAI,MAAMH,EAAoB,YAAY,CAAC,CACnD,CAEA,SAA4B,CAC1B,QACF,CACF,EAEaU,EAAgB,IAAIR",
|
|
6
|
-
"names": ["notInitializedError", "caller", "EmptyProvider", "options", "account", "transaction", "transactions", "message", "method", "params", "emptyProvider"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-SJ4UJRDS.mjs";import{a as t}from"./chunk-MHCIV2K5.mjs";import{a as v}from"./chunk-EGEUR6LK.mjs";import{a as c}from"./chunk-KSNODP2B.mjs";import{a as p}from"./chunk-7YA5JPZ3.mjs";import{a as g}from"./chunk-JHSDQ4NG.mjs";import{a}from"./chunk-4XJLALSE.mjs";import{a as h}from"./chunk-OPM4DDXX.mjs";import{i as s}from"./chunk-UFOL2NTX.mjs";import{g as n}from"./chunk-QD3CFFVT.mjs";import{a as d}from"./chunk-VMFJUT3G.mjs";import{a as o}from"./chunk-7QCBLUWB.mjs";var m=class extends a{constructor({address:r,anchor:e,shouldInitProvider:i}){super(r);this.provider=null;this.config=null;this.ledgerLogin=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!r||typeof r.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:e,signature:i}=await this.provider.login({addressIndex:r.addressIndex});return{address:e,signature:i??""}};this.loginOperation=async r=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await l({options:r,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async r=>{if(!!g())return;await t.getInstance().init(r)};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await h({transactions:r,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await v({message:r,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:e}=await p({shouldInitProvider:!0});this.provider=e}catch(e){throw s({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),e}}};this.options={anchor:e,shouldInitProvider:i},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"ledger"}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(r){return this.provider?.setAccount(r)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await d(o),await this.initLegderConnectManager(this.options?.anchor);let r=t.getInstance(),{ledgerProvider:e,ledgerConfig:i}=await new Promise((u,f)=>c({manager:r,resolve:u,reject:f,shouldInitProvider:this.options?.shouldInitProvider}));this.config=i,this.provider=e}};export{m as a};
|
|
2
|
-
//# sourceMappingURL=chunk-U277O55E.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.ts"],
|
|
4
|
-
"sourcesContent": ["import { IDAppProviderAccount } from '@multiversx/sdk-dapp-utils/out';\nimport { HWProvider } from '@multiversx/sdk-hw-provider';\nimport { safeWindow } from 'constants/index';\n\nimport { CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION } from 'constants/transactions.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { defineCustomElements } from 'lib/sdkDappUi';\nimport { LedgerConnectStateManager } from 'managers/internal/LedgerConnectStateManager/LedgerConnectStateManager';\nimport { ToastIconsEnum } from 'managers/internal/ToastManager/helpers/getToastDataStateByStatus';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { createCustomToast } from 'store/actions/toasts/toastsActions';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { getLedgerProvider } from './helpers';\nimport { authenticateLedgerAccount } from './helpers/authenticateLedgerAccount';\nimport { initializeLedgerProvider } from './helpers/initializeLedgerProvider';\nimport { signLedgerMessage } from './helpers/signLedgerMessage';\nimport { LedgerConfigType } from './types/ledgerProvider.types';\nimport {\n BaseProviderStrategy,\n LoginOptionsTypes\n} from '../BaseProviderStrategy/BaseProviderStrategy';\nimport { signTransactions } from '../helpers/signTransactions/signTransactions';\n\ntype LedgerProviderStrategyOptionsType = {\n anchor?: HTMLElement;\n shouldInitProvider?: boolean;\n};\n\ntype LedgerProviderStrategyType = LedgerProviderStrategyOptionsType & {\n address?: string;\n};\n\nexport class LedgerProviderStrategy extends BaseProviderStrategy {\n private provider: HWProvider | null = null;\n private config: LedgerConfigType | null = null;\n private readonly options?: LedgerProviderStrategyOptionsType;\n\n constructor({\n address,\n anchor,\n shouldInitProvider\n }: LedgerProviderStrategyType) {\n super(address);\n this.options = { anchor, shouldInitProvider };\n this._login = this.ledgerLogin.bind(this);\n }\n\n async init(): Promise<boolean> {\n try {\n this.initializeAddress();\n await this.initializeProvider();\n } catch {\n return false;\n }\n\n return true;\n }\n\n logout(): Promise<boolean> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.logout();\n }\n\n getType(): ProviderTypeEnum {\n return ProviderTypeEnum.ledger;\n }\n\n getAddress(): Promise<string | undefined> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.getAddress();\n }\n\n setAccount(account: IDAppProviderAccount): void {\n return this.provider?.setAccount(account);\n }\n\n isInitialized(): boolean {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.isInitialized();\n }\n\n private async initializeProvider() {\n await defineCustomElements(safeWindow);\n await this.initLegderConnectManager(this.options?.anchor);\n const ledgerConnectManager = LedgerConnectStateManager.getInstance();\n\n const { ledgerProvider, ledgerConfig } = await new Promise<\n Awaited<ReturnType<typeof getLedgerProvider>>\n >((resolve, reject) =>\n initializeLedgerProvider({\n manager: ledgerConnectManager,\n resolve,\n reject,\n shouldInitProvider: this.options?.shouldInitProvider\n })\n );\n\n this.config = ledgerConfig;\n this.provider = ledgerProvider;\n }\n\n private readonly ledgerLogin = async (\n options?: LoginOptionsTypes & { addressIndex?: number }\n ): Promise<{ address: string; signature: string }> => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n if (!options || typeof options.addressIndex !== 'number') {\n throw new Error('Missing addressIndex for Ledger login');\n }\n const { address, signature } = await this.provider.login({\n addressIndex: options.addressIndex\n });\n return {\n address,\n signature: signature ?? ''\n };\n };\n\n public override loginOperation = async (options?: LoginOptionsTypes) => {\n if (!this.provider || !this.config) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return await authenticateLedgerAccount({\n options,\n config: this.config,\n provider: this.provider,\n login: this.ledgerLogin.bind(this)\n });\n };\n\n private readonly initLegderConnectManager = async (anchor?: HTMLElement) => {\n const shouldInitiateLogin = !getIsLoggedIn();\n\n if (!shouldInitiateLogin) {\n return;\n }\n\n const ledgerConnectManager = LedgerConnectStateManager.getInstance();\n await ledgerConnectManager.init(anchor);\n };\n\n signTransactions = async (transactions: Transaction[]) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n await this.rebuildProvider();\n\n const signedTransactions = await signTransactions({\n transactions,\n handleSign: this.provider.signTransactions.bind(this.provider)\n });\n\n return signedTransactions;\n };\n\n signMessage = async (message: Message): Promise<Message> => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n await this.rebuildProvider();\n\n const signedMessage = await signLedgerMessage({\n message,\n handleSignMessage: this.provider.signMessage.bind(this.provider)\n });\n\n return signedMessage;\n };\n\n /**\n * Makes sure the device is accessible and if not, tries to initialize a new provider\n */\n private readonly rebuildProvider = async () => {\n try {\n await this.provider?.getAddress(); // can communicate with device\n } catch (_err) {\n try {\n const { ledgerProvider } = await getLedgerProvider({\n shouldInitProvider: true\n });\n this.provider = ledgerProvider;\n } catch (error) {\n createCustomToast({\n toastId: 'ledger-provider-rebuild-error',\n duration: CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n icon: ToastIconsEnum.times,\n iconClassName: 'warning',\n message: 'Unlock your device & open the MultiversX App',\n title: 'Ledger unavailable'\n });\n throw error;\n }\n }\n };\n}\n"],
|
|
5
|
-
"mappings": "ueAiCO,IAAMA,EAAN,cAAqCC,CAAqB,CAK/D,YAAY,CACV,QAAAC,EACA,OAAAC,EACA,mBAAAC,CACF,EAA+B,CAC7B,MAAMF,CAAO,EATf,KAAQ,SAA8B,KACtC,KAAQ,OAAkC,KA4E1C,KAAiB,YAAc,MAC7BG,GACoD,CACpD,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAEnD,GAAI,CAACA,GAAW,OAAOA,EAAQ,cAAiB,SAC9C,MAAM,IAAI,MAAM,uCAAuC,EAEzD,GAAM,CAAE,QAAAH,EAAS,UAAAI,CAAU,EAAI,MAAM,KAAK,SAAS,MAAM,CACvD,aAAcD,EAAQ,YACxB,CAAC,EACD,MAAO,CACL,QAAAH,EACA,UAAWI,GAAa,EAC1B,CACF,EAEA,KAAgB,eAAiB,MAAOD,GAAgC,CACtE,GAAI,CAAC,KAAK,UAAY,CAAC,KAAK,OAC1B,MAAM,IAAI,oCAAuC,EAGnD,OAAO,MAAME,EAA0B,CACrC,QAAAF,EACA,OAAQ,KAAK,OACb,SAAU,KAAK,SACf,MAAO,KAAK,YAAY,KAAK,IAAI,CACnC,CAAC,CACH,EAEA,KAAiB,yBAA2B,MAAOF,GAAyB,CAG1E,GAAI,CAFwB,CAACK,EAAc,EAGzC,OAIF,MAD6BC,EAA0B,YAAY,EACxC,KAAKN,CAAM,CACxC,EAEA,sBAAmB,MAAOO,GAAgC,CACxD,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,aAAM,KAAK,gBAAgB,EAEA,MAAMC,EAAiB,CAChD,aAAAD,EACA,WAAY,KAAK,SAAS,iBAAiB,KAAK,KAAK,QAAQ,CAC/D,CAAC,CAGH,EAEA,iBAAc,MAAOE,GAAuC,CAC1D,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,aAAM,KAAK,gBAAgB,EAEL,MAAMC,EAAkB,CAC5C,QAAAD,EACA,kBAAmB,KAAK,SAAS,YAAY,KAAK,KAAK,QAAQ,CACjE,CAAC,CAGH,EAKA,KAAiB,gBAAkB,SAAY,CAC7C,GAAI,CACF,MAAM,KAAK,UAAU,WAAW,CAClC,MAAe,CACb,GAAI,CACF,GAAM,CAAE,eAAAE,CAAe,EAAI,MAAMC,EAAkB,CACjD,mBAAoB,EACtB,CAAC,EACD,KAAK,SAAWD,CAClB,OAASE,EAAO,CACd,MAAAC,EAAkB,CAChB,QAAS,gCACT,SAAU,IACV,aACA,cAAe,UACf,QAAS,+CACT,MAAO,oBACT,CAAC,EACKD,CACR,CACF,CACF,EAnKE,KAAK,QAAU,CAAE,OAAAb,EAAQ,mBAAAC,CAAmB,EAC5C,KAAK,OAAS,KAAK,YAAY,KAAK,IAAI,CAC1C,CAEA,MAAM,MAAyB,CAC7B,GAAI,CACF,KAAK,kBAAkB,EACvB,MAAM,KAAK,mBAAmB,CAChC,MAAQ,CACN,MAAO,EACT,CAEA,MAAO,EACT,CAEA,QAA2B,CACzB,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,OAAO,KAAK,SAAS,OAAO,CAC9B,CAEA,SAA4B,CAC1B,cACF,CAEA,YAA0C,CACxC,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,OAAO,KAAK,SAAS,WAAW,CAClC,CAEA,WAAWc,EAAqC,CAC9C,OAAO,KAAK,UAAU,WAAWA,CAAO,CAC1C,CAEA,eAAyB,CACvB,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,OAAO,KAAK,SAAS,cAAc,CACrC,CAEA,MAAc,oBAAqB,CACjC,MAAMC,EAAqBC,CAAU,EACrC,MAAM,KAAK,yBAAyB,KAAK,SAAS,MAAM,EACxD,IAAMC,EAAuBZ,EAA0B,YAAY,EAE7D,CAAE,eAAAK,EAAgB,aAAAQ,CAAa,EAAI,MAAM,IAAI,QAEjD,CAACC,EAASC,IACVC,EAAyB,CACvB,QAASJ,EACT,QAAAE,EACA,OAAAC,EACA,mBAAoB,KAAK,SAAS,kBACpC,CAAC,CACH,EAEA,KAAK,OAASF,EACd,KAAK,SAAWR,CAClB,CAmGF",
|
|
6
|
-
"names": ["LedgerProviderStrategy", "BaseProviderStrategy", "address", "anchor", "shouldInitProvider", "options", "signature", "authenticateLedgerAccount", "getIsLoggedIn", "LedgerConnectStateManager", "transactions", "signTransactions", "message", "signLedgerMessage", "ledgerProvider", "getLedgerProvider", "error", "createCustomToast", "account", "defineCustomElements", "safeWindow", "ledgerConnectManager", "ledgerConfig", "resolve", "reject", "initializeLedgerProvider"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as F}from"./chunk-FKB6EYMV.mjs";import{a as v}from"./chunk-YZ5ZS3VO.mjs";import{a as O,b as D,g as R}from"./chunk-QD3CFFVT.mjs";import{a as W}from"./chunk-TKYDPA56.mjs";import{a as V}from"./chunk-4ODPAHHA.mjs";import{a as G}from"./chunk-Z5CDCI3Y.mjs";import{a as z}from"./chunk-JGWNKE3I.mjs";import{a as _}from"./chunk-4BRZWHKY.mjs";import{b as f}from"./chunk-OIL7VMRM.mjs";import{a as u}from"./chunk-VZI2XGAI.mjs";import{a as M}from"./chunk-KDE4OU7S.mjs";import{a as $}from"./chunk-BZWDNUS4.mjs";import{a as T}from"./chunk-3W2X3GZO.mjs";import{a as b}from"./chunk-TLKMUVQJ.mjs";import{a as l,f as L}from"./chunk-GVA5Y5KR.mjs";import{b as U}from"./chunk-IOFZWNJ4.mjs";import{a as g}from"./chunk-6FXEHNGW.mjs";import{a as B}from"./chunk-NJN53MJV.mjs";import{a as E}from"./chunk-YSCND2MX.mjs";import{a as h}from"./chunk-HORSXVIV.mjs";import{b as k,s as m,u as N}from"./chunk-L7J5JJEB.mjs";import{b as I}from"./chunk-IEJTMYFW.mjs";import{b as C,c as P,f as S}from"./chunk-R53MCZI6.mjs";import{b as j}from"./chunk-THQWNWSE.mjs";async function w({address:t,provider:o,apiAddress:r}){let e=await g({address:t,baseURL:r});if(!e)throw new Error("Account not found");U({address:t,providerType:o.getType()});let n={...e,username:h(e.username),nonce:T(e)};l(n),await f(t),v(),e.shard!=null&&await F({shard:Number(e.shard),apiAddress:r})}async function tt(t){let{network:{apiAddress:o}}=u();await t.login();let r=await t.getAddress();if(!r)throw new Error("Address not found");return await w({address:r,provider:t,apiAddress:o}),{address:r}}async function ot({provider:t,nativeAuthConfig:o,token:r}){let{network:{apiAddress:e}}=u(),n=b(o),s=r;s||(s=await n.initialize({noCache:!0}));let{address:i,signature:c,...a}=await t.login({token:s});if(!i)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let p=n.getToken({address:i,token:s,signature:c});k({loginToken:s,signature:c,nativeAuthToken:p});let d=await W({loginToken:s,extraInfoData:{multisig:a?.multisig,impersonate:a?.impersonate},address:i});return await w({address:d,provider:t,apiAddress:e}),{address:d,signature:c}}async function K(t,o){let r=I(N());if(r)return await ot({provider:t,nativeAuthConfig:r,token:o?.token});let{address:e}=await tt(t);return await f(e),v(),{address:e}}var y={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${D}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${O}-${Date.now()}`}},rt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},et=t=>{for(let[o,r]of Object.entries(rt))if(t.includes(o))return r;return"Error when signing"};function A(t,o="error"){let r=t?.message,e=et(r),s=e!=="Error when signing"?"warning":o,i=Object.keys(y).includes(s)?y[s]:y.error,{toastId:c,iconClassName:a,title:p}=i;return H({toastId:c,duration:1e4,icon:"times",iconClassName:a,message:e,title:p}),e}async function q({provider:t,transactions:o,options:r={}}){await J();let{isGuarded:e,activeGuardianAddress:n,nonce:s}=$(),i=t.getType()==="ledger",c=V({latestNonce:s,transactions:o}),a=n&&e&&!r.skipGuardian?c?.map(d=>(d.version=C.withTxOptions().valueOf(),d.options=S.withOptions({guarded:!0,...i?{hashSign:!0}:{}}).valueOf(),d.guardian=P.newFromBech32(n),d)):c,p=await t.signTransactions(a)??[];return L(s+p.length),p}var x=class{constructor(o){this.provider=o}init(){return this.provider.init()}async login(o){return await K(this.provider,o)}isInitialized(){return this.provider.isInitialized()}async logout(o={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}){return await _({provider:this.provider,options:o})}setShouldShowConsentPopup(o){this.provider.setShouldShowConsentPopup?.(o)}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(o,r){try{return await q({provider:this.provider,transactions:o,options:r})}catch(e){let n=A(e);throw new Error(n)}}async signMessage(o,r){try{return await z({provider:this.provider,message:o,options:r})}catch(e){let n=A(e,"warning");throw new Error(n)}}async verifyMessage(o){return await G(o)}cancelLogin(){this.provider.cancelLogin?.()}};var Q=null;function go(t){Q=t}function X(){return Q||new x(j)}var nt=async()=>{try{let t=M(),{network:o}=u();try{let r=await g({address:t,baseURL:o.apiAddress});if(r!=null){let e={...r,username:h(r.username),nonce:T(r)};return l(e),e}}catch(r){console.error("Failed getting account ",r)}}catch(t){console.error("Failed getting address ",t)}return null};async function J(){let t=X();if(t==null)throw"Provider not initialized";try{if(!t.init)throw"Current provider does not have init() function";return await t.init()?nt():void 0}catch(o){console.error("Failed initializing provider ",o)}}var Y={},Z={},st=(t,o)=>{m().setState(({toasts:r})=>{let e=r.customToasts.length>0?Math.max(...r.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=o??`custom-toast-${e+1}`,s=r.customToasts.findIndex(a=>a.toastId===n),i={...t,toastId:n};if(s!==-1){r.customToasts[s]=i;return}r.customToasts.push({...i,toastId:n})},!1,"addCustomToast")},_o=t=>{m().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(r=>r.toastId!==t)},!1,"removeCustomToast")},zo=()=>{m().setState(({toasts:t})=>{t.customToasts=[]},!1,"removeAllCustomToasts")},Go=()=>{m().setState(({toasts:t})=>{t.transactionToasts=[]})},$o=({toastId:t,totalDuration:o})=>{m().setState(({toasts:r})=>{let e=r.transactionToasts.length>0?Math.max(...r.transactionToasts.map(s=>parseInt(s.toastId.split("-").pop()??"0"))):0,n=t||`transaction-toast-${e+1}`;r.transactionToasts.push({startTime:E(),endTime:B(o),toastId:n})},!1,"addTransactionToast")},Vo=t=>{m().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(r=>r.toastId!==t)},!1,"removeTransactionToast"),delete Z[t],delete Y[t]},H=t=>{let{toasts:o}=m().getState(),r=o.customToasts.length>0?Math.max(...o.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=t.toastId||`custom-toast-${r+1}`;return t.onClose&&(Z[e]=t.onClose),t.instantiateToastElement?(Y[e]=t.instantiateToastElement,m().setState(({toasts:n})=>{let s=n.customToasts.findIndex(a=>a.toastId===e),i={...t,instantiateToastElement:null,toastId:e};s!==-1?n.customToasts[s]=i:n.customToasts.push(i)},!1,"createCustomToast"),e):(st(t,e),e)};export{Y as a,Z as b,st as c,_o as d,zo as e,Go as f,$o as g,Vo as h,H as i,w as j,K as k,A as l,q as m,x as n,go as o,X as p,J as q};
|
|
2
|
-
//# sourceMappingURL=chunk-UFOL2NTX.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as I}from"./chunk-RVHEUIC3.mjs";import{a as b}from"./chunk-OYA4AQFY.mjs";import{a as k}from"./chunk-5WQFV4QY.mjs";import{a as n}from"./chunk-CWZPGMEQ.mjs";import{a as w}from"./chunk-AIO3CDMH.mjs";import{a as g}from"./chunk-QA26HI3B.mjs";import{a as y}from"./chunk-4NY6ZQCB.mjs";import{a as f}from"./chunk-U277O55E.mjs";import{n as P,o as a,p as u}from"./chunk-UFOL2NTX.mjs";import{a as v}from"./chunk-KDE4OU7S.mjs";import{a as s,u as p}from"./chunk-L7J5JJEB.mjs";import{c as l}from"./chunk-IEJTMYFW.mjs";import{IframeLoginTypes as C}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var c=class{static set customProviders(r){this._customProviders=r}static get customProviders(){return this._customProviders}static async create({type:r,anchor:o}){let e=null;switch(r){case"extension":{e=new w;break}case"crossWindow":{e=new g;break}case"ledger":{e=new f({anchor:o}),await I.getInstance().init();break}case"metamask":{e=new n({type:C.metamask});break}case"passkey":{e=new n({type:C.passkey});break}case"walletConnect":{let t=l(p());if(!t?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");e=new y({anchor:o,...t});break}case"webview":{e=new k;break}default:{let t=v();for(let m of this._customProviders)m.type===r&&(e=await m.constructor({address:t,anchor:o}));break}}if(!e)throw new Error("Unable to create provider");await e.init();let d=new P(e);a(d);let i=r;s(i);let S=["crossWindow","metamask","passkey"].includes(i);return b(S?{skipLoginMethod:i}:null),d}static async destroy(){u().cancelLogin(),a(null),s("")}};c._customProviders=[];export{c as a};
|
|
2
|
-
//# sourceMappingURL=chunk-XCKQMM73.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/providers/ProviderFactory.ts"],
|
|
4
|
-
"sourcesContent": ["import { IframeLoginTypes } from '@multiversx/sdk-web-wallet-iframe-provider/out/constants';\nimport { LedgerIdleStateManager } from 'managers/internal/LedgerIdleStateManager/LedgerIdleStateManager';\nimport { getAddress } from 'methods/account/getAddress';\nimport {\n CrossWindowProviderStrategy,\n ExtensionProviderStrategy,\n IframeProviderStrategy,\n LedgerProviderStrategy,\n WalletConnectProviderStrategy,\n WalletConnectV2Error\n} from 'providers/strategies';\nimport { setProviderType } from 'store/actions/loginInfo/loginInfoActions';\nimport { walletConnectConfigSelector } from 'store/selectors/configSelectors';\nimport { getState } from 'store/store';\nimport { DappProvider } from './DappProvider/DappProvider';\nimport {\n getAccountProvider,\n setAccountProvider\n} from './helpers/accountProvider';\nimport { clearInitiatedLogins } from './helpers/clearInitiatedLogins';\nimport { WebviewProviderStrategy } from './strategies/WebviewProviderStrategy';\nimport {\n ICustomProvider,\n IProvider,\n IProviderFactory,\n ProviderTypeEnum\n} from './types/providerFactory.types';\n\nexport class ProviderFactory {\n private static _customProviders: ICustomProvider[] = [];\n\n public static set customProviders(providers: ICustomProvider[]) {\n this._customProviders = providers;\n }\n\n public static get customProviders() {\n return this._customProviders;\n }\n\n public static async create({\n type,\n anchor\n }: IProviderFactory): Promise<DappProvider> {\n let createdProvider: IProvider | null = null;\n\n switch (type) {\n case ProviderTypeEnum.extension: {\n createdProvider = new ExtensionProviderStrategy();\n\n break;\n }\n\n case ProviderTypeEnum.crossWindow: {\n createdProvider = new CrossWindowProviderStrategy();\n\n break;\n }\n\n case ProviderTypeEnum.ledger: {\n createdProvider = new LedgerProviderStrategy({ anchor });\n\n const ledgerIdleStateManager = LedgerIdleStateManager.getInstance();\n await ledgerIdleStateManager.init();\n\n break;\n }\n\n case ProviderTypeEnum.metamask: {\n createdProvider = new IframeProviderStrategy({\n type: IframeLoginTypes.metamask\n });\n\n break;\n }\n\n case ProviderTypeEnum.passkey: {\n createdProvider = new IframeProviderStrategy({\n type: IframeLoginTypes.passkey\n });\n\n break;\n }\n case ProviderTypeEnum.walletConnect: {\n const walletConnectConfig = walletConnectConfigSelector(getState());\n\n if (!walletConnectConfig?.walletConnectV2ProjectId) {\n throw new Error(WalletConnectV2Error.invalidConfig);\n }\n\n createdProvider = new WalletConnectProviderStrategy({\n anchor,\n ...walletConnectConfig\n });\n\n break;\n }\n case ProviderTypeEnum.webview: {\n createdProvider = new WebviewProviderStrategy();\n break;\n }\n\n default: {\n const address = getAddress();\n\n for (const customProvider of this._customProviders) {\n if (customProvider.type === type) {\n createdProvider = await customProvider.constructor({\n address,\n anchor\n });\n }\n }\n break;\n }\n }\n\n if (!createdProvider) {\n throw new Error('Unable to create provider');\n }\n\n await createdProvider.init();\n const dappProvider = new DappProvider(createdProvider);\n\n setAccountProvider(dappProvider);\n const providerType = type as ProviderTypeEnum;\n setProviderType(providerType);\n\n const shouldClearInitiatedLogins = [\n ProviderTypeEnum.crossWindow,\n ProviderTypeEnum.metamask,\n ProviderTypeEnum.passkey\n ].includes(providerType);\n\n // Clear initiated logins and skip the login method if it's crossWindow or metamask\n clearInitiatedLogins(\n shouldClearInitiatedLogins ? { skipLoginMethod: providerType } : null\n );\n\n return dappProvider;\n }\n\n public static async destroy() {\n const provider = getAccountProvider();\n provider.cancelLogin();\n setAccountProvider(null);\n setProviderType(ProviderTypeEnum.none);\n }\n}\n"],
|
|
5
|
-
"mappings": "igBAAA,OAAS,oBAAAA,MAAwB,2DA4B1B,IAAMC,EAAN,KAAsB,CAG3B,WAAkB,gBAAgBC,EAA8B,CAC9D,KAAK,iBAAmBA,CAC1B,CAEA,WAAkB,iBAAkB,CAClC,OAAO,KAAK,gBACd,CAEA,aAAoB,OAAO,CACzB,KAAAC,EACA,OAAAC,CACF,EAA4C,CAC1C,IAAIC,EAAoC,KAExC,OAAQF,EAAM,CACZ,gBAAiC,CAC/BE,EAAkB,IAAIC,EAEtB,KACF,CAEA,kBAAmC,CACjCD,EAAkB,IAAIE,EAEtB,KACF,CAEA,aAA8B,CAC5BF,EAAkB,IAAIG,EAAuB,CAAE,OAAAJ,CAAO,CAAC,EAGvD,MAD+BK,EAAuB,YAAY,EACrC,KAAK,EAElC,KACF,CAEA,eAAgC,CAC9BJ,EAAkB,IAAIK,EAAuB,CAC3C,KAAMC,EAAiB,QACzB,CAAC,EAED,KACF,CAEA,cAA+B,CAC7BN,EAAkB,IAAIK,EAAuB,CAC3C,KAAMC,EAAiB,OACzB,CAAC,EAED,KACF,CACA,oBAAqC,CACnC,IAAMC,EAAsBC,EAA4BC,EAAS,CAAC,EAElE,GAAI,CAACF,GAAqB,yBACxB,MAAM,IAAI,mCAAwC,EAGpDP,EAAkB,IAAIU,EAA8B,CAClD,OAAAX,EACA,GAAGQ,CACL,CAAC,EAED,KACF,CACA,cAA+B,CAC7BP,EAAkB,IAAIW,EACtB,KACF,CAEA,QAAS,CACP,IAAMC,EAAUC,EAAW,EAE3B,QAAWC,KAAkB,KAAK,iBAC5BA,EAAe,OAAShB,IAC1BE,EAAkB,MAAMc,EAAe,YAAY,CACjD,QAAAF,EACA,OAAAb,CACF,CAAC,GAGL,KACF,CACF,CAEA,GAAI,CAACC,EACH,MAAM,IAAI,MAAM,2BAA2B,EAG7C,MAAMA,EAAgB,KAAK,EAC3B,IAAMe,EAAe,IAAIC,EAAahB,CAAe,EAErDiB,EAAmBF,CAAY,EAC/B,IAAMG,EAAepB,EACrBqB,EAAgBD,CAAY,EAE5B,IAAME,EAA6B,mCAInC,EAAE,SAASF,CAAY,EAGvB,OAAAG,EACED,EAA6B,CAAE,gBAAiBF,CAAa,EAAI,IACnE,EAEOH,CACT,CAEA,aAAoB,SAAU,CACXO,EAAmB,EAC3B,YAAY,EACrBL,EAAmB,IAAI,EACvBE,IAAqC,CACvC,CACF,EAvHavB,EACI,iBAAsC,CAAC",
|
|
6
|
-
"names": ["IframeLoginTypes", "ProviderFactory", "providers", "type", "anchor", "createdProvider", "ExtensionProviderStrategy", "CrossWindowProviderStrategy", "LedgerProviderStrategy", "LedgerIdleStateManager", "IframeProviderStrategy", "IframeLoginTypes", "walletConnectConfig", "walletConnectConfigSelector", "getState", "WalletConnectProviderStrategy", "WebviewProviderStrategy", "address", "getAddress", "customProvider", "dappProvider", "DappProvider", "setAccountProvider", "providerType", "setProviderType", "shouldClearInitiatedLogins", "clearInitiatedLogins", "getAccountProvider"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-EVNL24SI.mjs";import{b as s}from"./chunk-JR3FBBRR.mjs";import{u as n}from"./chunk-L7J5JJEB.mjs";async function f(){let t=s(n());if(Object.keys(t).length>0)for(let[e,{transactions:c}]of Object.entries(t))await o({sessionId:e,transactionBatch:c})}export{f as a};
|
|
2
|
-
//# sourceMappingURL=chunk-XCLDLXPX.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-XKBQDG5H.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-XNEYOZ7M.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
|