@multiversx/sdk-dapp 5.1.4-alpha.1 → 5.1.5
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 +50 -45
- package/out/__chunks__/chunk-2WWGLFNR.mjs +2 -0
- package/out/__chunks__/{chunk-FDXRQC6M.mjs → chunk-37ZYC4SQ.mjs} +2 -2
- package/out/__chunks__/{chunk-TY7QG7ZT.mjs → chunk-3NBR5S3K.mjs} +2 -2
- package/out/__chunks__/{chunk-KP6LJO7T.mjs → chunk-3PAQ2Z7N.mjs} +2 -2
- package/out/__chunks__/{chunk-QJAIPDD6.mjs → chunk-4ADFEGIK.mjs} +2 -2
- package/out/__chunks__/{chunk-UTBU4OCC.mjs → chunk-4JRSZ2WY.mjs} +2 -2
- package/out/__chunks__/{chunk-GFBHBIES.mjs → chunk-4PIC7DFH.mjs} +2 -2
- package/out/__chunks__/{chunk-6MVIMW4U.mjs → chunk-5GAD4GPI.mjs} +2 -2
- package/out/__chunks__/{chunk-II4C2MOU.mjs → chunk-5LRQIZ4G.mjs} +2 -2
- package/out/__chunks__/{chunk-3ZM355SG.mjs → chunk-5TAQLAW3.mjs} +2 -2
- package/out/__chunks__/{chunk-B3NG2NOR.mjs → chunk-6ILB52XY.mjs} +2 -2
- package/out/__chunks__/{chunk-JVUXLR26.mjs → chunk-6LATG7X5.mjs} +2 -2
- package/out/__chunks__/{chunk-B3MJTLY7.mjs → chunk-7MZD7YCO.mjs} +2 -2
- package/out/__chunks__/{chunk-2SQW3ZE6.mjs → chunk-7OBI7GUK.mjs} +2 -2
- package/out/__chunks__/{chunk-4I6XFBRI.mjs → chunk-A5BJAB7T.mjs} +2 -2
- package/out/__chunks__/{chunk-T7MRWPJP.mjs → chunk-ASVVZSNW.mjs} +2 -2
- package/out/__chunks__/{chunk-O2C5YGWB.mjs → chunk-AYPDQETP.mjs} +2 -2
- package/out/__chunks__/{chunk-64YE7QJ5.mjs → chunk-B3UFF7ML.mjs} +2 -2
- package/out/__chunks__/chunk-BMC2YI75.mjs +2 -0
- package/out/__chunks__/chunk-C4A4E2FY.mjs +2 -0
- package/out/__chunks__/{chunk-Z6LX4L3O.mjs → chunk-D4BQCSIY.mjs} +2 -2
- package/out/__chunks__/{chunk-QQBMLLIQ.mjs → chunk-DUNGWQ5A.mjs} +2 -2
- package/out/__chunks__/{chunk-A4QPQK4N.mjs → chunk-E2XW7YVE.mjs} +2 -2
- package/out/__chunks__/{chunk-OI62R74K.mjs → chunk-ECTE4GIA.mjs} +2 -2
- package/out/__chunks__/{chunk-3PH6XWVJ.mjs → chunk-EGM63G4K.mjs} +2 -2
- package/out/__chunks__/{chunk-RQAJIFZS.mjs → chunk-FCH3TZNB.mjs} +2 -2
- package/out/__chunks__/{chunk-SIRVEQCG.mjs → chunk-FLN5MNNT.mjs} +2 -2
- package/out/__chunks__/chunk-FXR3CXVB.mjs +2 -0
- package/out/__chunks__/chunk-FYEAQFW5.mjs +2 -0
- package/out/__chunks__/{chunk-LRJNWYVD.mjs → chunk-GOK56W56.mjs} +2 -2
- package/out/__chunks__/{chunk-OYHNC7AV.mjs → chunk-HAA2EO5S.mjs} +2 -2
- package/out/__chunks__/{chunk-BXVNRLKE.mjs → chunk-HVUUOFDY.mjs} +2 -2
- package/out/__chunks__/{chunk-I5S54KA7.mjs → chunk-IILEKPBI.mjs} +2 -2
- package/out/__chunks__/{chunk-2B3CQJ7O.mjs → chunk-ILGTFJZA.mjs} +2 -2
- package/out/__chunks__/chunk-JIOAD7MK.mjs +2 -0
- package/out/__chunks__/{chunk-PQCYKEZA.mjs → chunk-JVKQPCTQ.mjs} +2 -2
- package/out/__chunks__/chunk-KI2NE6MI.mjs +2 -0
- package/out/__chunks__/chunk-KJLFUHEH.mjs +2 -0
- package/out/__chunks__/{chunk-INYX52TZ.mjs.map → chunk-KJLFUHEH.mjs.map} +1 -1
- package/out/__chunks__/chunk-KN6ADSRW.mjs +2 -0
- package/out/__chunks__/chunk-KQ4LLKWZ.mjs +2 -0
- package/out/__chunks__/{chunk-63KWCFPE.mjs → chunk-LMNAVRBQ.mjs} +2 -2
- package/out/__chunks__/{chunk-V4O3VRWA.mjs → chunk-LPPO6LUR.mjs} +2 -2
- package/out/__chunks__/{chunk-F6JS7XZN.mjs → chunk-LS3YSRRM.mjs} +2 -2
- package/out/__chunks__/{chunk-POLYR7OE.mjs → chunk-MI73KXKA.mjs} +2 -2
- package/out/__chunks__/{chunk-PPH3RDAS.mjs → chunk-MUYR3PCB.mjs} +2 -2
- package/out/__chunks__/{chunk-ASFSZP4U.mjs → chunk-MZBHPAM4.mjs} +2 -2
- package/out/__chunks__/{chunk-RUWJKSCI.mjs → chunk-O5TU5QQI.mjs} +2 -2
- package/out/__chunks__/{chunk-X2YQF6XJ.mjs → chunk-OA5HXCGR.mjs} +2 -2
- package/out/__chunks__/{chunk-AHF2YGLI.mjs → chunk-OHUOJ5P3.mjs} +2 -2
- package/out/__chunks__/chunk-OKR2YV5J.mjs +2 -0
- package/out/__chunks__/{chunk-CWRVJWQD.mjs → chunk-OYO5HAC3.mjs} +2 -2
- package/out/__chunks__/{chunk-OMOTZPAR.mjs → chunk-PH34FNHZ.mjs} +2 -2
- package/out/__chunks__/{chunk-4H4K46HN.mjs → chunk-Q3XYMQWN.mjs} +2 -2
- package/out/__chunks__/{chunk-N3F2ZVI3.mjs → chunk-Q5BUVODR.mjs} +2 -2
- package/out/__chunks__/chunk-R55WPJMP.mjs +2 -0
- package/out/__chunks__/{chunk-7RHFBSVM.mjs → chunk-RFCXQES5.mjs} +2 -2
- package/out/__chunks__/{chunk-FJNU5VL6.mjs → chunk-SLWY5XP5.mjs} +2 -2
- package/out/__chunks__/{chunk-G4SHHDV6.mjs → chunk-TE5XVHX2.mjs} +2 -2
- package/out/__chunks__/chunk-U4MC4F2U.mjs +2 -0
- package/out/__chunks__/chunk-U6BZ2PHS.mjs +2 -0
- package/out/__chunks__/{chunk-LWQZ3ODY.mjs → chunk-UGJVHUID.mjs} +2 -2
- package/out/__chunks__/{chunk-55YZ3IRW.mjs → chunk-USDJ7CAG.mjs} +2 -2
- package/out/__chunks__/{chunk-JRF2RFTC.mjs → chunk-UVHONPA5.mjs} +2 -2
- package/out/__chunks__/{chunk-3MFQZN6P.mjs → chunk-VEEHHORJ.mjs} +2 -2
- package/out/__chunks__/{chunk-NDP6HUYZ.mjs → chunk-VOGVARHA.mjs} +2 -2
- package/out/__chunks__/{chunk-KBL2GVO3.mjs → chunk-VRXZUSWL.mjs} +2 -2
- package/out/__chunks__/{chunk-RTADPQGR.mjs → chunk-VXNZHN7T.mjs} +2 -2
- package/out/__chunks__/{chunk-EUUARGU3.mjs → chunk-WNEPIIEY.mjs} +2 -2
- package/out/__chunks__/{chunk-ROGNJB62.mjs → chunk-XFUNY6KC.mjs} +2 -2
- package/out/__chunks__/{chunk-B2CRU44C.mjs → chunk-XM4IYM4M.mjs} +2 -2
- package/out/__chunks__/{chunk-X6K7QVBT.mjs → chunk-XVCSSYCP.mjs} +2 -2
- package/out/__chunks__/{chunk-MBJNMOHO.mjs → chunk-YAMIPNLB.mjs} +2 -2
- package/out/__chunks__/{chunk-7IS6C4WK.mjs → chunk-YTR6YMAJ.mjs} +2 -2
- package/out/__chunks__/{chunk-I36BPJED.mjs → chunk-YUBLXI76.mjs} +2 -2
- package/out/__chunks__/chunk-Z35H36KH.mjs +2 -0
- package/out/__chunks__/{chunk-VNLWRVNS.mjs → chunk-Z745SBSQ.mjs} +2 -2
- package/out/__chunks__/chunk-ZDMHP47O.mjs +2 -0
- package/out/__chunks__/{chunk-7M2YZAHW.mjs → chunk-ZFJOYMJ7.mjs} +2 -2
- package/out/__chunks__/{chunk-XOM5JS7L.mjs → chunk-ZM5EFY6B.mjs} +2 -2
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +26 -6
- package/out/__chunks__/chunk-3SEYG2TH.mjs +0 -2
- package/out/__chunks__/chunk-4GD5ESS7.mjs +0 -2
- package/out/__chunks__/chunk-4PCBHSAB.mjs +0 -2
- package/out/__chunks__/chunk-5ZCTLMZK.mjs +0 -2
- package/out/__chunks__/chunk-C6QF2PWC.mjs +0 -2
- package/out/__chunks__/chunk-CN47OMNH.mjs +0 -2
- package/out/__chunks__/chunk-GJPOP2QV.mjs +0 -2
- package/out/__chunks__/chunk-INYX52TZ.mjs +0 -2
- package/out/__chunks__/chunk-NTPPGGDC.mjs +0 -2
- package/out/__chunks__/chunk-ORC2SCXO.mjs +0 -2
- package/out/__chunks__/chunk-Q2MLVJSP.mjs +0 -2
- package/out/__chunks__/chunk-RHB4T45O.mjs +0 -2
- package/out/__chunks__/chunk-SKPK57EU.mjs +0 -2
- package/out/__chunks__/chunk-U2UYK54X.mjs +0 -2
- package/out/__chunks__/chunk-VZSWUP43.mjs +0 -2
- package/out/__chunks__/chunk-ZOVDKYFX.mjs +0 -2
- /package/out/__chunks__/{chunk-C6QF2PWC.mjs.map → chunk-2WWGLFNR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FDXRQC6M.mjs.map → chunk-37ZYC4SQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TY7QG7ZT.mjs.map → chunk-3NBR5S3K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KP6LJO7T.mjs.map → chunk-3PAQ2Z7N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QJAIPDD6.mjs.map → chunk-4ADFEGIK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UTBU4OCC.mjs.map → chunk-4JRSZ2WY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GFBHBIES.mjs.map → chunk-4PIC7DFH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6MVIMW4U.mjs.map → chunk-5GAD4GPI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-II4C2MOU.mjs.map → chunk-5LRQIZ4G.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3ZM355SG.mjs.map → chunk-5TAQLAW3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B3NG2NOR.mjs.map → chunk-6ILB52XY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JVUXLR26.mjs.map → chunk-6LATG7X5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B3MJTLY7.mjs.map → chunk-7MZD7YCO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2SQW3ZE6.mjs.map → chunk-7OBI7GUK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4I6XFBRI.mjs.map → chunk-A5BJAB7T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-T7MRWPJP.mjs.map → chunk-ASVVZSNW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O2C5YGWB.mjs.map → chunk-AYPDQETP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-64YE7QJ5.mjs.map → chunk-B3UFF7ML.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4PCBHSAB.mjs.map → chunk-BMC2YI75.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VZSWUP43.mjs.map → chunk-C4A4E2FY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z6LX4L3O.mjs.map → chunk-D4BQCSIY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QQBMLLIQ.mjs.map → chunk-DUNGWQ5A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A4QPQK4N.mjs.map → chunk-E2XW7YVE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OI62R74K.mjs.map → chunk-ECTE4GIA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3PH6XWVJ.mjs.map → chunk-EGM63G4K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RQAJIFZS.mjs.map → chunk-FCH3TZNB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SIRVEQCG.mjs.map → chunk-FLN5MNNT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZOVDKYFX.mjs.map → chunk-FXR3CXVB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RHB4T45O.mjs.map → chunk-FYEAQFW5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LRJNWYVD.mjs.map → chunk-GOK56W56.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OYHNC7AV.mjs.map → chunk-HAA2EO5S.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BXVNRLKE.mjs.map → chunk-HVUUOFDY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I5S54KA7.mjs.map → chunk-IILEKPBI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2B3CQJ7O.mjs.map → chunk-ILGTFJZA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GJPOP2QV.mjs.map → chunk-JIOAD7MK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PQCYKEZA.mjs.map → chunk-JVKQPCTQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5ZCTLMZK.mjs.map → chunk-KI2NE6MI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U2UYK54X.mjs.map → chunk-KN6ADSRW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CN47OMNH.mjs.map → chunk-KQ4LLKWZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-63KWCFPE.mjs.map → chunk-LMNAVRBQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V4O3VRWA.mjs.map → chunk-LPPO6LUR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F6JS7XZN.mjs.map → chunk-LS3YSRRM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-POLYR7OE.mjs.map → chunk-MI73KXKA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PPH3RDAS.mjs.map → chunk-MUYR3PCB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ASFSZP4U.mjs.map → chunk-MZBHPAM4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RUWJKSCI.mjs.map → chunk-O5TU5QQI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X2YQF6XJ.mjs.map → chunk-OA5HXCGR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AHF2YGLI.mjs.map → chunk-OHUOJ5P3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3SEYG2TH.mjs.map → chunk-OKR2YV5J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CWRVJWQD.mjs.map → chunk-OYO5HAC3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OMOTZPAR.mjs.map → chunk-PH34FNHZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4H4K46HN.mjs.map → chunk-Q3XYMQWN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N3F2ZVI3.mjs.map → chunk-Q5BUVODR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ORC2SCXO.mjs.map → chunk-R55WPJMP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7RHFBSVM.mjs.map → chunk-RFCXQES5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FJNU5VL6.mjs.map → chunk-SLWY5XP5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G4SHHDV6.mjs.map → chunk-TE5XVHX2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NTPPGGDC.mjs.map → chunk-U4MC4F2U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SKPK57EU.mjs.map → chunk-U6BZ2PHS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LWQZ3ODY.mjs.map → chunk-UGJVHUID.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-55YZ3IRW.mjs.map → chunk-USDJ7CAG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JRF2RFTC.mjs.map → chunk-UVHONPA5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3MFQZN6P.mjs.map → chunk-VEEHHORJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NDP6HUYZ.mjs.map → chunk-VOGVARHA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KBL2GVO3.mjs.map → chunk-VRXZUSWL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RTADPQGR.mjs.map → chunk-VXNZHN7T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EUUARGU3.mjs.map → chunk-WNEPIIEY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ROGNJB62.mjs.map → chunk-XFUNY6KC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B2CRU44C.mjs.map → chunk-XM4IYM4M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X6K7QVBT.mjs.map → chunk-XVCSSYCP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MBJNMOHO.mjs.map → chunk-YAMIPNLB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7IS6C4WK.mjs.map → chunk-YTR6YMAJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I36BPJED.mjs.map → chunk-YUBLXI76.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q2MLVJSP.mjs.map → chunk-Z35H36KH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VNLWRVNS.mjs.map → chunk-Z745SBSQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4GD5ESS7.mjs.map → chunk-ZDMHP47O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7M2YZAHW.mjs.map → chunk-ZFJOYMJ7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XOM5JS7L.mjs.map → chunk-ZM5EFY6B.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ It is built for applications that use any of the following technologies:
|
|
|
17
17
|
- Angular (example: [Angular Template Dapp](https://github.com/multiversx/mx-template-dapp-angular))
|
|
18
18
|
- Vue (example: [Vue Template Dapp](https://github.com/multiversx/mx-template-dapp-vue))
|
|
19
19
|
- Any other JavaScript framework (e.g. Solid.js etc.) (example: [Solid.js Dapp](https://github.com/multiversx/mx-solidjs-template-dapp))
|
|
20
|
-
- React Native
|
|
20
|
+
- React Native (example: [React Native Dapp](https://github.com/multiversx/mx-template-dapp-react-native))
|
|
21
21
|
- Next.js (example: [Next.js Dapp](https://github.com/multiversx/mx-template-dapp-nextjs))
|
|
22
22
|
|
|
23
23
|
## GitHub project
|
|
@@ -50,6 +50,7 @@ or
|
|
|
50
50
|
```bash
|
|
51
51
|
yarn add @multiversx/sdk-dapp
|
|
52
52
|
```
|
|
53
|
+
|
|
53
54
|
> **Note:** Make sure you run your app on `https`, not `http`, otherwise some providers will not work.
|
|
54
55
|
|
|
55
56
|
If you're transitioning from `@multiversx/sdk-dapp@4.x`, you can check out the [Migration guide](https://github.com/multiversx/mx-template-dapp/blob/main/MIGRATION_GUIDE.md) and the [migration PR](https://github.com/multiversx/mx-template-dapp/pull/343) of Template Dapp
|
|
@@ -73,7 +74,7 @@ Having this knowledge, we can consider several steps needed to put a dApp togeth
|
|
|
73
74
|
| 1 | Configuration | - storage configuration (e.g. sessionStorage, localStorage etc.)<br>- chain configuration<br>- custom provider configuration (adding / disabling / changing providers) |
|
|
74
75
|
| 2 | Provider interaction | - logging in and out<br>- signing transactions / messages |
|
|
75
76
|
| 3 | Presenting data | - get store data (e.g. account balance, account address etc.)<br>- use components to display data (e.g. balance, address, transactions list) |
|
|
76
|
-
| 4 | Transactions | - sending transactions<br>- tracking transactions<br>-
|
|
77
|
+
| 4 | Transactions | - sending transactions<br>- tracking transactions<br>- displaying transactions history |
|
|
77
78
|
|
|
78
79
|
Each of these steps will be explained in more detail in the following sections.
|
|
79
80
|
|
|
@@ -118,6 +119,7 @@ initApp(config).then(() => {
|
|
|
118
119
|
Once your dApp has loaded, the first user action is logging in with a chosen provider. There are two ways to perform a login: using the `UnlockPanelManager` and programmatic login using the `ProviderFactory`.
|
|
119
120
|
|
|
120
121
|
#### 2.1 Using the `UnlockPanelManager`
|
|
122
|
+
|
|
121
123
|
By using the provided UI, you get the benefit of having all supported providers ready for login in a side panel. You simply need to link the `unlockPanelManager.openUnlockPanel` to a user action.
|
|
122
124
|
|
|
123
125
|
```typescript
|
|
@@ -141,17 +143,18 @@ export const ConnectButton = () => {
|
|
|
141
143
|
};
|
|
142
144
|
|
|
143
145
|
```
|
|
146
|
+
|
|
144
147
|
Once the user has logged in, if `nativeAuth` is configured in the `initApp` method, an automatic logout will be performed upon native auth expiration. Before the actual logout is performed, the `LogoutManager` will show a warning toast to the user. This toast can be customized by passing a `tokenExpirationToastWarningSeconds` to the `nativeAuth` config.
|
|
145
148
|
|
|
146
149
|
```typescript
|
|
147
150
|
// in initApp config
|
|
148
151
|
const config: InitAppType = {
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
// ...
|
|
153
|
+
nativeAuth: {
|
|
151
154
|
expirySeconds: 30, // test auto logout after 30 seconds
|
|
152
155
|
tokenExpirationToastWarningSeconds: 10 // show warning toast 10 seconds before auto logout
|
|
153
|
-
|
|
154
|
-
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
155
158
|
```
|
|
156
159
|
|
|
157
160
|
You have the option to stop this behavior by calling `LogoutManager.getInstance().stop()` after the user has logged in.
|
|
@@ -162,11 +165,11 @@ import { LogoutManager } from '@multiversx/sdk-dapp/out/managers/LogoutManager/L
|
|
|
162
165
|
loginHandler: () => {
|
|
163
166
|
navigate('/dashboard');
|
|
164
167
|
// optional, to stop the automatic logout upon native auth expiration
|
|
165
|
-
LogoutManager.getInstance().stop();
|
|
168
|
+
LogoutManager.getInstance().stop();
|
|
166
169
|
},
|
|
167
170
|
```
|
|
168
171
|
|
|
169
|
-
If you want to perform some actions as soon as the user has logged in, you will need to call `ProviderFactory.create` inside a handler accepting arguments.
|
|
172
|
+
If you want to perform some actions as soon as the user has logged in, you will need to call `ProviderFactory.create` inside a handler accepting arguments.
|
|
170
173
|
|
|
171
174
|
```typescript
|
|
172
175
|
export const AdvancedConnectButton = () => {
|
|
@@ -188,7 +191,8 @@ export const AdvancedConnectButton = () => {
|
|
|
188
191
|
|
|
189
192
|
```
|
|
190
193
|
|
|
191
|
-
#### 2.2
|
|
194
|
+
#### 2.2 Programmatic login using the `ProviderFactory`
|
|
195
|
+
|
|
192
196
|
If you want to login using your custom UI, you can link user actions to specific providers by calling the `ProviderFactory`.
|
|
193
197
|
|
|
194
198
|
```typescript
|
|
@@ -308,7 +312,6 @@ Then, to send the transactions, you need to use the `TransactionManager` class a
|
|
|
308
312
|
import { TransactionManager } from '@multiversx/sdk-dapp/out/managers/TransactionManager';
|
|
309
313
|
import type { TransactionsDisplayInfoType } from '@multiversx/sdk-dapp/out/types/transactions.types';
|
|
310
314
|
|
|
311
|
-
|
|
312
315
|
const txManager = TransactionManager.getInstance();
|
|
313
316
|
|
|
314
317
|
const sentTransactions = await txManager.send(signedTransactions);
|
|
@@ -317,16 +320,16 @@ const toastInformation: TransactionsDisplayInfoType = {
|
|
|
317
320
|
processingMessage: 'Processing transactions',
|
|
318
321
|
errorMessage: 'An error has occurred during transaction execution',
|
|
319
322
|
successMessage: 'Transactions executed'
|
|
320
|
-
}
|
|
323
|
+
};
|
|
321
324
|
|
|
322
325
|
const sessionId = await txManager.track(sentTransactions, {
|
|
323
|
-
transactionsDisplayInfo: toastInformation
|
|
326
|
+
transactionsDisplayInfo: toastInformation
|
|
324
327
|
});
|
|
325
328
|
```
|
|
326
329
|
|
|
327
330
|
#### 4.3 Using the Notifications Feed
|
|
328
331
|
|
|
329
|
-
The Notifications Feed is a component that displays **session transactions** in a list. Internally it gets initialized in the `initApp` method. It can be accessed via the `NotificationManager.getInstance()` method.
|
|
332
|
+
The Notifications Feed is a component that displays **session transactions** in a list. Internally it gets initialized in the `initApp` method. It can be accessed via the `NotificationManager.getInstance()` method.
|
|
330
333
|
Once the user logs out of the dApp, all transactions displayed by the Notifications Feed are removed from the store. Note that you can switch between toast notifications and Notifications Feed by pressing the View All button above the current pending transaction toast in the UI.
|
|
331
334
|
|
|
332
335
|
```typescript
|
|
@@ -363,8 +366,7 @@ const store = getStore(); // or use useStore hook for reactivity
|
|
|
363
366
|
const pendingSessions = pendingTransactionsSessionsSelector(store.getState());
|
|
364
367
|
const allTransactionSessions = transactionsSliceSelector(store.getState());
|
|
365
368
|
|
|
366
|
-
const isSessionIdPending =
|
|
367
|
-
Object.keys(pendingSessions).includes(sessionId);
|
|
369
|
+
const isSessionIdPending = Object.keys(pendingSessions).includes(sessionId);
|
|
368
370
|
const currentSession = allTransactionSessions[sessionId];
|
|
369
371
|
const currentSessionStatus = currentSession?.status;
|
|
370
372
|
const currentTransaction = currentSession?.transactions?.[0];
|
|
@@ -372,6 +374,7 @@ const currentTransactionStatus = currentTransaction?.status;
|
|
|
372
374
|
```
|
|
373
375
|
|
|
374
376
|
#### 4.5 Logging out
|
|
377
|
+
|
|
375
378
|
The user journey ends with calling the `provider.logout()` method.
|
|
376
379
|
|
|
377
380
|
```typescript
|
|
@@ -388,7 +391,7 @@ We have seen in the previous chapter what are the minimal steps to get up and ru
|
|
|
388
391
|
| # | Type | Description |
|
|
389
392
|
|---|------|-------------|
|
|
390
393
|
| 1 | Network | Chain configuration |
|
|
391
|
-
| 2 | Provider | The signing provider for logging in and
|
|
394
|
+
| 2 | Provider | The signing provider for logging in and signing transactions |
|
|
392
395
|
| 3 | Account | Inspecting user address and balance |
|
|
393
396
|
| 4 | Transactions Manager | Sending and tracking transactions |
|
|
394
397
|
| 5 | UI Components | Displaying UI information like balance, public keys etc. |
|
|
@@ -396,7 +399,6 @@ We have seen in the previous chapter what are the minimal steps to get up and ru
|
|
|
396
399
|
Since these are mixtures of business logic and UI components, the library is split into several folders to make it easier to navigate.
|
|
397
400
|
When inspecting the package, there is more content under `src`, but the folders of interest are:
|
|
398
401
|
|
|
399
|
-
|
|
400
402
|
```bash
|
|
401
403
|
src/
|
|
402
404
|
├── apiCalls/ ### methods for interacting with the API
|
|
@@ -413,13 +415,13 @@ Conceptually, these can be split into 3 main parts:
|
|
|
413
415
|
|
|
414
416
|
- First is the business logic in `apiCalls`, `constants`, `providers` and `methods`
|
|
415
417
|
- Then comes the persistence layer hosted in the `store` folder, using [Zustand](https://zustand.docs.pmnd.rs/) under the hood.
|
|
416
|
-
- Last are the UI components hosted in [@multiversx/sdk-dapp-ui](https://github.com/multiversx/mx-sdk-dapp-ui) with some components controlled on demand by classes defined in `
|
|
418
|
+
- Last are the UI components hosted in [@multiversx/sdk-dapp-ui](https://github.com/multiversx/mx-sdk-dapp-ui) with some components controlled on demand by classes defined in `controllers` and `managers`
|
|
417
419
|
|
|
418
420
|
Next, we will take the elements from Table 3 and detail them in the following sections.
|
|
419
421
|
|
|
420
422
|
### 1. Network
|
|
421
423
|
|
|
422
|
-
The network configuration is done in the `initApp` method, where you can make several
|
|
424
|
+
The network configuration is done in the `initApp` method, where you can make several configurations like:
|
|
423
425
|
|
|
424
426
|
- specifying the environment (`devnet`, `testnet`, `mainnet`)
|
|
425
427
|
- overriding certain network parameters like wallet address, explorer address etc.
|
|
@@ -447,9 +449,9 @@ const provider = await ProviderFactory.create({
|
|
|
447
449
|
await provider?.login();
|
|
448
450
|
```
|
|
449
451
|
|
|
450
|
-
#### Accessing
|
|
452
|
+
#### Accessing provider methods
|
|
451
453
|
|
|
452
|
-
Once the provider is initialized, you can get a reference to it using the `getAccountProvider` method. Then you can call the `login`, `logout`, `signTransactions`, `signMessage` methods, or other custom methods depending on the
|
|
454
|
+
Once the provider is initialized, you can get a reference to it using the `getAccountProvider` method. Then you can call the `login`, `logout`, `signTransactions`, `signMessage` methods, or other custom methods depending on the initialized provider (see ledger for example).
|
|
453
455
|
|
|
454
456
|
### 3. Account
|
|
455
457
|
|
|
@@ -505,7 +507,7 @@ The transaction lifecycle consists of the following steps:
|
|
|
505
507
|
|---|------|-------------|----|
|
|
506
508
|
| | `methods/transactions` | path | `react/transactions` |
|
|
507
509
|
| 1 | `getTransactionSessions()` | returns all transaction sessions |`useGetTransactionSessions()` |
|
|
508
|
-
| 2 | `getPendingTransactionsSessions()` | returns
|
|
510
|
+
| 2 | `getPendingTransactionsSessions()` | returns a record of pending sessions | `useGetPendingTransactionsSessions()`|
|
|
509
511
|
| 3 | `getPendingTransactions()` | returns an array of signed transactions | `useGetPendingTransactions()` |
|
|
510
512
|
| 4 | `getFailedTransactionsSessions()` | returns a record of failed sessions | `useGetFailedTransactionsSessions()`|
|
|
511
513
|
| 5 | `getFailedTransactions()` | returns an array of failed transactions | `useGetFailedTransactions()`|
|
|
@@ -513,7 +515,7 @@ The transaction lifecycle consists of the following steps:
|
|
|
513
515
|
| 7 | `getSuccessfulTransactions()` | returns an array of successful transactions | `useGetSuccessfulTransactions()`|
|
|
514
516
|
|
|
515
517
|
5. **User feedback** is provided through toast notifications, which are triggered to inform about transactions' progress. Additional tracking details can be optionally displayed in the toast UI.
|
|
516
|
-
There is an option to add custom toast messages by using the `createCustomToast` helper.
|
|
518
|
+
There is an option to add custom toast messages by using the `createCustomToast` helper.
|
|
517
519
|
|
|
518
520
|
```ts
|
|
519
521
|
import { createRoot } from 'react-dom/client';
|
|
@@ -538,14 +540,19 @@ createCustomToast({
|
|
|
538
540
|
message: 'This is a custom toast',
|
|
539
541
|
title: 'My custom toast'
|
|
540
542
|
});
|
|
541
|
-
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
// closing a custom toast
|
|
546
|
+
const toastManager = ToastManager.getInstance();
|
|
547
|
+
toastManager.closeToast('custom-toast') // toastId
|
|
542
548
|
|
|
543
549
|
```
|
|
544
550
|
|
|
545
551
|
6. **Error Handling & Recovery** is done through a custom toast that prompts the user to take appropriate action.
|
|
546
552
|
|
|
547
553
|
#### Methods
|
|
548
|
-
|
|
554
|
+
|
|
555
|
+
---
|
|
549
556
|
|
|
550
557
|
#### 1. Sending Transactions
|
|
551
558
|
|
|
@@ -553,7 +560,7 @@ In this way, all transactions are sent simultaneously. There is no limit to the
|
|
|
553
560
|
|
|
554
561
|
```typescript
|
|
555
562
|
const transactionManager = TransactionManager.getInstance();
|
|
556
|
-
const parallelTransactions:
|
|
563
|
+
const parallelTransactions: SignedTransactionType[] = [tx1, tx2, tx3, tx4];
|
|
557
564
|
const sentTransactions = await transactionManager.send(parallelTransactions);
|
|
558
565
|
```
|
|
559
566
|
|
|
@@ -579,12 +586,14 @@ import { TransactionManagerTrackOptionsType } from '@multiversx/sdk-dapp/out/man
|
|
|
579
586
|
|
|
580
587
|
const options: TransactionManagerTrackOptionsType = {
|
|
581
588
|
disableToasts: false, // `false` by default
|
|
582
|
-
transactionsDisplayInfo: {
|
|
589
|
+
transactionsDisplayInfo: {
|
|
590
|
+
// `undefined` by default
|
|
583
591
|
errorMessage: 'Failed adding stake',
|
|
584
592
|
successMessage: 'Stake successfully added',
|
|
585
593
|
processingMessage: 'Staking in progress'
|
|
586
594
|
},
|
|
587
|
-
sessionInformation: {
|
|
595
|
+
sessionInformation: {
|
|
596
|
+
// `undefined` by default. Use to perform additional actions based on the session information
|
|
588
597
|
stakeAmount: '1000000000000000000000000'
|
|
589
598
|
}
|
|
590
599
|
};
|
|
@@ -643,7 +652,7 @@ await tManager.track([plainTransaction]);
|
|
|
643
652
|
|
|
644
653
|
#### 3.2 Advanced Usage
|
|
645
654
|
|
|
646
|
-
If you need to check the status of the signed transactions, you can query the store
|
|
655
|
+
If you need to check the status of the signed transactions, you can query the store directly using the `sessionId` returned by the `track()` method.
|
|
647
656
|
|
|
648
657
|
```typescript
|
|
649
658
|
import { getStore } from '@multiversx/sdk-dapp/out/store/store';
|
|
@@ -659,7 +668,7 @@ Object.entries(state).forEach(([sessionKey, data]) => {
|
|
|
659
668
|
|
|
660
669
|
### 5. UI Components
|
|
661
670
|
|
|
662
|
-
`sdk-dapp` needs to make use of visual elements for allowing the user to interact with some providers (like the ledger), or to display messages to the user (like idle states or toasts). These visual elements
|
|
671
|
+
`sdk-dapp` needs to make use of visual elements for allowing the user to interact with some providers (like the ledger), or to display messages to the user (like idle states or toasts). These visual elements consist of webcomponents hosted in the `@multiversx/sdk-dapp-ui` package. Thus, `sdk-dapp` does not hold any UI elements, just business logic that controls external components. We can consider two types of UI components: internal and public. They are differentiated by the way they are controlled: internal components are controlled by `sdk-dapp`'s signing or logging in flows, while public components should be controlled by the dApp.
|
|
663
672
|
|
|
664
673
|
#### 5.1 Public components
|
|
665
674
|
|
|
@@ -670,22 +679,21 @@ The business logic for these components is served by a controller. The component
|
|
|
670
679
|
```tsx
|
|
671
680
|
import { TransactionsTableController } from '@multiversx/sdk-dapp/out/controllers/TransactionsTableController';
|
|
672
681
|
import { MvxTransactionsTable } from '@multiversx/sdk-dapp-ui/react';
|
|
673
|
-
|
|
674
|
-
const processedTransactions =
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
682
|
+
|
|
683
|
+
const processedTransactions =
|
|
684
|
+
await TransactionsTableController.processTransactions({
|
|
685
|
+
address,
|
|
686
|
+
egldLabel: network.egldLabel,
|
|
687
|
+
explorerAddress: network.explorerAddress,
|
|
688
|
+
transactions
|
|
689
|
+
});
|
|
680
690
|
|
|
681
691
|
// and use like this:
|
|
682
692
|
<MvxTransactionsTable transactions={processedTransaction} />;
|
|
683
|
-
|
|
684
693
|
```
|
|
685
694
|
|
|
686
695
|
- `MvxFormatAmount` - used to format the amount of the user's balance
|
|
687
696
|
|
|
688
|
-
|
|
689
697
|
```tsx
|
|
690
698
|
import { MvxFormatAmount } from '@multiversx/sdk-dapp-ui/react';
|
|
691
699
|
import { MvxFormatAmountPropsType } from '@multiversx/sdk-dapp-ui/types';
|
|
@@ -693,9 +701,7 @@ export { DECIMALS, DIGITS } from '@multiversx/sdk-dapp-utils/out/constants';
|
|
|
693
701
|
import { FormatAmountController } from '@multiversx/sdk-dapp/out/controllers/FormatAmountController';
|
|
694
702
|
export { useGetNetworkConfig } from '@multiversx/sdk-dapp/out/react/network/useGetNetworkConfig';
|
|
695
703
|
|
|
696
|
-
|
|
697
|
-
interface IFormatAmountProps
|
|
698
|
-
extends Partial<MvxFormatAmountPropsType> {
|
|
704
|
+
interface IFormatAmountProps extends Partial<MvxFormatAmountPropsType> {
|
|
699
705
|
value: string;
|
|
700
706
|
className?: string;
|
|
701
707
|
}
|
|
@@ -728,7 +734,6 @@ export const FormatAmount = (props: IFormatAmountProps) => {
|
|
|
728
734
|
};
|
|
729
735
|
```
|
|
730
736
|
|
|
731
|
-
|
|
732
737
|
#### 5.2 Internal components (advanced usage)
|
|
733
738
|
|
|
734
739
|
The way internal components are controlled is through a [pub-sub pattern](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern) called EventBus. Each webcomponent has a method of exposing its EventBus, thus allowing `sdk-dapp` to get a reference to it and use it for communication.
|
|
@@ -756,7 +761,7 @@ If you want to override private components and create your own, you can implemen
|
|
|
756
761
|
|
|
757
762
|
The recommended way to debug your application is by using [lerna](https://lerna.js.org/). Make sure you have the same package version in sdk-dapp's package.json and in your project's package.json.
|
|
758
763
|
|
|
759
|
-
If you
|
|
764
|
+
If you prefer to use [npm link](https://docs.npmjs.com/cli/v11/commands/npm-link), make sure to use the `preserveSymlinks` option in the server configuration:
|
|
760
765
|
|
|
761
766
|
```js
|
|
762
767
|
resolve: {
|
|
@@ -767,7 +772,7 @@ If you preffer to use [npm link](https://docs.npmjs.com/cli/v11/commands/npm-lin
|
|
|
767
772
|
},
|
|
768
773
|
```
|
|
769
774
|
|
|
770
|
-
|
|
775
|
+
Chrome Redux DevTools are by default enabled to help you debug your application. You can find the extension in the Chrome Extensions store.
|
|
771
776
|
|
|
772
777
|
To build the library, run:
|
|
773
778
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-LS3YSRRM.mjs";import{c as n}from"./chunk-YTR6YMAJ.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2WWGLFNR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-YTR6YMAJ.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-37ZYC4SQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-Z35H36KH.mjs";import{a as m}from"./chunk-NZYB675D.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3NBR5S3K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-37ZYC4SQ.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3PAQ2Z7N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-E2XW7YVE.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4ADFEGIK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KJLFUHEH.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4JRSZ2WY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-YTR6YMAJ.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4PIC7DFH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-YTR6YMAJ.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5GAD4GPI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-6LATG7X5.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-C4A4E2FY.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5LRQIZ4G.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-O5TU5QQI.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5TAQLAW3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-U6BZ2PHS.mjs";import{s as e}from"./chunk-YTR6YMAJ.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6ILB52XY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{w as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{w as g}from"./chunk-XVCSSYCP.mjs";import{a as c}from"./chunk-C4A4E2FY.mjs";import{s as n}from"./chunk-YTR6YMAJ.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=c(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=g(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6LATG7X5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as B}from"./chunk-FYEAQFW5.mjs";import{a as b}from"./chunk-VOGVARHA.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-TE5XVHX2.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-6ILB52XY.mjs";import{a as R}from"./chunk-YY724VZR.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as A}from"./chunk-YAMIPNLB.mjs";import{a as O}from"./chunk-FXR3CXVB.mjs";import{s as x}from"./chunk-YTR6YMAJ.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=O(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=A.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7MZD7YCO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-MI73KXKA.mjs";import{b as r}from"./chunk-LPPO6LUR.mjs";import{s as i}from"./chunk-YTR6YMAJ.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7OBI7GUK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-4ADFEGIK.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-UNBTFF6K.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-A5BJAB7T.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-LMNAVRBQ.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ASVVZSNW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-LMNAVRBQ.mjs";import{a as t}from"./chunk-KQ4LLKWZ.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AYPDQETP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-AYPDQETP.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-B3UFF7ML.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-B3UFF7ML.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D4BQCSIY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-U6BZ2PHS.mjs";import{a as f}from"./chunk-5TAQLAW3.mjs";import{a as g}from"./chunk-4PIC7DFH.mjs";import{b as a}from"./chunk-YTR6YMAJ.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DUNGWQ5A.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-YTR6YMAJ.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E2XW7YVE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-KJLFUHEH.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ECTE4GIA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-XFUNY6KC.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EGM63G4K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as c}from"./chunk-YTR6YMAJ.mjs";import{a as o}from"./chunk-JMC7CMTU.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
|
|
2
|
+
//# sourceMappingURL=chunk-FCH3TZNB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KJLFUHEH.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FLN5MNNT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-YTR6YMAJ.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
|
|
2
|
+
//# sourceMappingURL=chunk-GOK56W56.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-D4BQCSIY.mjs";import{a as e}from"./chunk-KI2NE6MI.mjs";import{a as i}from"./chunk-CDQ2BNUD.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-HAA2EO5S.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-GOK56W56.mjs";import{d as m,e as l}from"./chunk-FCH3TZNB.mjs";import{q as a}from"./chunk-YTR6YMAJ.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HVUUOFDY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-FMQYLMTU.mjs";import{b as e,c as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-FMQYLMTU.mjs";import{b as e,c as i}from"./chunk-Q5BUVODR.mjs";import{j as r}from"./chunk-65L5EBBL.mjs";import{q as n}from"./chunk-YTR6YMAJ.mjs";async function E({results:u,hash:c,sessionId:s}){let a=u?.find(t=>t?.returnMessage!=="");i({sessionId:s,transaction:{...a,hash:c,status:"fail",inTransit:!1}});let{transactions:m}=n().getState();m[s].transactions.some(t=>r(t.status))||(e({sessionId:s,status:"fail",errorMessage:a?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IILEKPBI.mjs.map
|