@multiversx/sdk-dapp 5.0.13 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/__chunks__/chunk-2STEP3VA.mjs +2 -0
- package/out/__chunks__/{chunk-CJYTBE3E.mjs → chunk-3HADWDDI.mjs} +2 -2
- package/out/__chunks__/{chunk-QQAW7UC2.mjs → chunk-3L7HZ2SO.mjs} +2 -2
- package/out/__chunks__/{chunk-OMSCPNRR.mjs → chunk-4LYEVUGN.mjs} +2 -2
- package/out/__chunks__/{chunk-RM4VHHXR.mjs → chunk-5KVNYLOM.mjs} +2 -2
- package/out/__chunks__/{chunk-RM4VHHXR.mjs.map → chunk-5KVNYLOM.mjs.map} +2 -2
- package/out/__chunks__/{chunk-TOGQL2M5.mjs → chunk-66FC7DN2.mjs} +2 -2
- package/out/__chunks__/chunk-6A7TDVVR.mjs +2 -0
- package/out/__chunks__/{chunk-ROH2QHUK.mjs → chunk-6JRZP7XR.mjs} +2 -2
- package/out/__chunks__/{chunk-3F3QCMGL.mjs → chunk-6SNUC4WD.mjs} +2 -2
- package/out/__chunks__/{chunk-HCGAZMW2.mjs → chunk-77XEEKKC.mjs} +2 -2
- package/out/__chunks__/chunk-7CELSV4S.mjs +2 -0
- package/out/__chunks__/chunk-7CELSV4S.mjs.map +7 -0
- package/out/__chunks__/{chunk-BDXSVYER.mjs → chunk-7ZGMZIYA.mjs} +2 -2
- package/out/__chunks__/{chunk-HWO7E325.mjs → chunk-A4KMW3VA.mjs} +2 -2
- package/out/__chunks__/{chunk-5DEHHVDS.mjs → chunk-AE72PVLM.mjs} +2 -2
- package/out/__chunks__/{chunk-5JYNGKVQ.mjs → chunk-AKS4K5LK.mjs} +2 -2
- package/out/__chunks__/{chunk-X4CDTS57.mjs → chunk-AMSHQJ6K.mjs} +2 -2
- package/out/__chunks__/{chunk-CIVS2YDU.mjs → chunk-ARPLTX4I.mjs} +2 -2
- package/out/__chunks__/{chunk-BIIJSMXB.mjs → chunk-BFU632AR.mjs} +2 -2
- package/out/__chunks__/{chunk-HIUWEH2W.mjs → chunk-BNBD3WVN.mjs} +2 -2
- package/out/__chunks__/{chunk-OINVR4SF.mjs → chunk-BP7QTGW5.mjs} +2 -2
- package/out/__chunks__/{chunk-ROZAXUMC.mjs → chunk-BQX7MJR6.mjs} +2 -2
- package/out/__chunks__/{chunk-EC3CUSWI.mjs → chunk-BWYXCYFI.mjs} +2 -2
- package/out/__chunks__/chunk-CAHVJ3IF.mjs +2 -0
- package/out/__chunks__/{chunk-ZHOATTZ2.mjs → chunk-CDIHVT44.mjs} +2 -2
- package/out/__chunks__/{chunk-DX6OA75E.mjs → chunk-CGBCYY3B.mjs} +2 -2
- package/out/__chunks__/chunk-CJLUSPT2.mjs +2 -0
- package/out/__chunks__/chunk-CJLUSPT2.mjs.map +7 -0
- package/out/__chunks__/{chunk-JUSK5MVD.mjs → chunk-CK4X6HSF.mjs} +2 -2
- package/out/__chunks__/{chunk-BEPW7QRT.mjs → chunk-COTPJZL3.mjs} +2 -2
- package/out/__chunks__/chunk-D2JYGLAC.mjs +2 -0
- package/out/__chunks__/{chunk-JIXJ3S3H.mjs → chunk-D54LWE3V.mjs} +2 -2
- package/out/__chunks__/{chunk-FNYBJAH3.mjs → chunk-DNFWIYZH.mjs} +2 -2
- package/out/__chunks__/{chunk-NDUDQZDL.mjs → chunk-EB37CLFR.mjs} +2 -2
- package/out/__chunks__/{chunk-3YBH7N5W.mjs → chunk-EQBJVKBR.mjs} +2 -2
- package/out/__chunks__/{chunk-QO2DNBMF.mjs → chunk-EV4KV3JC.mjs} +2 -2
- package/out/__chunks__/{chunk-KEUKJKQV.mjs → chunk-FIG2TQL2.mjs} +2 -2
- package/out/__chunks__/{chunk-JUXIROQH.mjs → chunk-FLBKETEZ.mjs} +2 -2
- package/out/__chunks__/{chunk-7HGOYM67.mjs → chunk-FODKR5LN.mjs} +2 -2
- package/out/__chunks__/chunk-GTRD4HFY.mjs +2 -0
- package/out/__chunks__/{chunk-4IS7AY5Q.mjs.map → chunk-GTRD4HFY.mjs.map} +1 -1
- package/out/__chunks__/{chunk-BDOJEJNA.mjs → chunk-HVS56RA5.mjs} +2 -2
- package/out/__chunks__/{chunk-FFUT67H3.mjs → chunk-HXTDJ2E6.mjs} +2 -2
- package/out/__chunks__/{chunk-ZTQR4O4A.mjs → chunk-HZKGE7EY.mjs} +2 -2
- package/out/__chunks__/{chunk-3L6GBV7L.mjs → chunk-HZMRXLHX.mjs} +2 -2
- package/out/__chunks__/{chunk-WBEMK5QL.mjs → chunk-IXDSHQ6O.mjs} +2 -2
- package/out/__chunks__/chunk-JRC47VFQ.mjs +2 -0
- package/out/__chunks__/chunk-KCUBSEZI.mjs +2 -0
- package/out/__chunks__/chunk-KMG6WM6K.mjs +2 -0
- package/out/__chunks__/{chunk-TSETF6SY.mjs → chunk-KTJGX4HU.mjs} +2 -2
- package/out/__chunks__/{chunk-GQOTAVAR.mjs → chunk-L5CHO4VF.mjs} +2 -2
- package/out/__chunks__/{chunk-HBQQS6GA.mjs → chunk-LGAWIVRO.mjs} +2 -2
- package/out/__chunks__/{chunk-TVXFF2PG.mjs → chunk-LMJDCKJN.mjs} +2 -2
- package/out/__chunks__/{chunk-FQNOEYHK.mjs → chunk-LOCNDNZE.mjs} +2 -2
- package/out/__chunks__/{chunk-WXCST3O7.mjs → chunk-LYZ5P6TZ.mjs} +2 -2
- package/out/__chunks__/{chunk-IOTYH724.mjs → chunk-LZLJ6HJT.mjs} +2 -2
- package/out/__chunks__/{chunk-OIWRUY4C.mjs → chunk-M2DFHKKK.mjs} +2 -2
- package/out/__chunks__/{chunk-T3FY4DQE.mjs → chunk-M6WW53TK.mjs} +2 -2
- package/out/__chunks__/{chunk-T3FY4DQE.mjs.map → chunk-M6WW53TK.mjs.map} +1 -1
- package/out/__chunks__/chunk-M7CRSX65.mjs +2 -0
- package/out/__chunks__/{chunk-NLZHVYZR.mjs → chunk-MA5C5FRG.mjs} +2 -2
- package/out/__chunks__/chunk-MGOTSAGH.mjs +2 -0
- package/out/__chunks__/{chunk-57AGUNU6.mjs → chunk-MS44NLMW.mjs} +2 -2
- package/out/__chunks__/{chunk-534QBNPX.mjs → chunk-MUIRAORV.mjs} +2 -2
- package/out/__chunks__/{chunk-D5DHIEIM.mjs → chunk-MXKLHEGP.mjs} +2 -2
- package/out/__chunks__/{chunk-AGUGUYQS.mjs → chunk-NK5Y3RLY.mjs} +2 -2
- package/out/__chunks__/{chunk-YNXPGS77.mjs → chunk-NTOY6GTP.mjs} +2 -2
- package/out/__chunks__/chunk-NZYB675D.mjs +2 -0
- package/out/__chunks__/{chunk-X6MN67NW.mjs → chunk-O7LCTC4K.mjs} +2 -2
- package/out/__chunks__/chunk-O7LCTC4K.mjs.map +7 -0
- package/out/__chunks__/chunk-OIIBPMNU.mjs +2 -0
- package/out/__chunks__/chunk-PGCTCWAW.mjs +2 -0
- package/out/__chunks__/{chunk-WSBN47MX.mjs.map → chunk-PGCTCWAW.mjs.map} +2 -2
- package/out/__chunks__/{chunk-JIF5QHA5.mjs → chunk-PIS56ZD4.mjs} +2 -2
- package/out/__chunks__/chunk-PPMUAFM4.mjs +2 -0
- package/out/__chunks__/{chunk-WJHF6NNO.mjs → chunk-Q3C46OSS.mjs} +2 -2
- package/out/__chunks__/chunk-QI4FCSOB.mjs +2 -0
- package/out/__chunks__/{chunk-44IN6A4I.mjs → chunk-R2EQDN33.mjs} +2 -2
- package/out/__chunks__/{chunk-NNBLC3DP.mjs → chunk-R32N5WCS.mjs} +2 -2
- package/out/__chunks__/{chunk-LYUN4G56.mjs → chunk-R43WJEH6.mjs} +2 -2
- package/out/__chunks__/{chunk-PFMOMLPA.mjs → chunk-RGFZEURF.mjs} +2 -2
- package/out/__chunks__/{chunk-7TUX3TKQ.mjs → chunk-RMARAUR3.mjs} +2 -2
- package/out/__chunks__/chunk-RW55WHHB.mjs +2 -0
- package/out/__chunks__/{chunk-3WNAFMEK.mjs → chunk-SHKZVFEF.mjs} +2 -2
- package/out/__chunks__/chunk-SK4EBR2Z.mjs +2 -0
- package/out/__chunks__/{chunk-ZLE5VUWG.mjs → chunk-SLOQOCEU.mjs} +2 -2
- package/out/__chunks__/chunk-SUBC3H4J.mjs +2 -0
- package/out/__chunks__/{chunk-FKBLKOLI.mjs.map → chunk-SUBC3H4J.mjs.map} +2 -2
- package/out/__chunks__/{chunk-ZIMECN23.mjs → chunk-TA6TNNXH.mjs} +2 -2
- package/out/__chunks__/{chunk-KASFKR36.mjs → chunk-TSWPPFHW.mjs} +2 -2
- package/out/__chunks__/{chunk-6BJS5QNF.mjs → chunk-U2Z42SAP.mjs} +2 -2
- package/out/__chunks__/{chunk-EJV4GLIF.mjs → chunk-UEFAPILB.mjs} +2 -2
- package/out/__chunks__/{chunk-AL5D2VEW.mjs → chunk-VLYPDZLN.mjs} +2 -2
- package/out/__chunks__/{chunk-IFWUP3FX.mjs → chunk-WDMNEF3T.mjs} +2 -2
- package/out/__chunks__/{chunk-6RRVRDXX.mjs → chunk-X5HSYTDN.mjs} +2 -2
- package/out/__chunks__/{chunk-ZLS3BN2I.mjs → chunk-XCKTWIKV.mjs} +2 -2
- package/out/__chunks__/{chunk-N7UPPFCH.mjs → chunk-XGK3JR3Z.mjs} +2 -2
- package/out/__chunks__/{chunk-OD4ANAAQ.mjs → chunk-XHKNB4IP.mjs} +2 -2
- package/out/__chunks__/chunk-XNF5QLFW.mjs +2 -0
- package/out/__chunks__/{chunk-HPC5WEQQ.mjs → chunk-XSS5NOQJ.mjs} +2 -2
- package/out/__chunks__/chunk-YZV64TMH.mjs +2 -0
- package/out/__chunks__/chunk-ZI7JADBP.mjs +2 -0
- package/out/__chunks__/chunk-ZI7JADBP.mjs.map +7 -0
- package/out/__chunks__/{chunk-RRKNYQ6D.mjs → chunk-ZS4EBCWC.mjs} +2 -2
- package/out/__chunks__/{chunk-RRKNYQ6D.mjs.map → chunk-ZS4EBCWC.mjs.map} +2 -2
- package/out/__chunks__/chunk-ZUJ5KE7O.mjs +2 -0
- package/out/__chunks__/{chunk-UQ6DOBYK.mjs → chunk-ZZZCOFQ7.mjs} +2 -2
- package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/account/index.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/getPersistedToken.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/apiCalls/utils/axiosFetcher.mjs +1 -1
- package/out/apiCalls/utils/axiosInstance.cjs.map +2 -2
- package/out/apiCalls/utils/axiosInstance.mjs +1 -1
- package/out/apiCalls/utils/index.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.cjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.cjs.map +2 -2
- 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/getMultiEsdtTransferData/getMultiEsdtTransferData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.cjs +2 -2
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.cjs.map +2 -2
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/getTransactionsNeedGuardianSigning.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/getTransactionsNeedGuardianSigning.cjs.map +2 -2
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/getTransactionsNeedGuardianSigning.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.cjs.map +2 -2
- 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.cjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.cjs.map +2 -2
- 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.cjs +1 -1
- package/out/store/middleware/logoutMiddleware.cjs.map +2 -2
- 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.cjs +3 -3
- package/out/store/store.cjs.map +2 -2
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/fetchAccount.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/getTokenFromData.cjs +2 -2
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTokenFromData.cjs.map +2 -2
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTokenFromData.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.cjs +1 -1
- package/out/utils/validation/isContract.cjs.map +2 -2
- package/out/utils/validation/isContract.mjs +1 -1
- package/out/utils/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +14 -14
- package/out/__chunks__/chunk-4IS7AY5Q.mjs +0 -2
- package/out/__chunks__/chunk-6FXEHNGW.mjs +0 -2
- package/out/__chunks__/chunk-73MKFMKP.mjs +0 -2
- package/out/__chunks__/chunk-76PSW6FH.mjs +0 -2
- package/out/__chunks__/chunk-76PSW6FH.mjs.map +0 -7
- package/out/__chunks__/chunk-BUHXFBUA.mjs +0 -2
- package/out/__chunks__/chunk-DTEI5SBP.mjs +0 -2
- package/out/__chunks__/chunk-ETSUQ2R4.mjs +0 -2
- package/out/__chunks__/chunk-FKBLKOLI.mjs +0 -2
- package/out/__chunks__/chunk-FM6JYAAR.mjs +0 -2
- package/out/__chunks__/chunk-FZ72N7LX.mjs +0 -2
- package/out/__chunks__/chunk-H3PQUL5M.mjs +0 -2
- package/out/__chunks__/chunk-HFEXCIZ2.mjs +0 -2
- package/out/__chunks__/chunk-LSKZWWBZ.mjs +0 -2
- package/out/__chunks__/chunk-O2ZZO4AS.mjs +0 -2
- package/out/__chunks__/chunk-O2ZZO4AS.mjs.map +0 -7
- package/out/__chunks__/chunk-OTHNSSYN.mjs +0 -2
- package/out/__chunks__/chunk-P6PCRGOG.mjs +0 -2
- package/out/__chunks__/chunk-RFBR7WI3.mjs +0 -2
- package/out/__chunks__/chunk-RVCCJBPE.mjs +0 -2
- package/out/__chunks__/chunk-UK5MEKBE.mjs +0 -2
- package/out/__chunks__/chunk-UK5MEKBE.mjs.map +0 -7
- package/out/__chunks__/chunk-V73SALVM.mjs +0 -2
- package/out/__chunks__/chunk-VTF5A3OJ.mjs +0 -2
- package/out/__chunks__/chunk-VVHC6HV6.mjs +0 -2
- package/out/__chunks__/chunk-WSBN47MX.mjs +0 -2
- package/out/__chunks__/chunk-X6MN67NW.mjs.map +0 -7
- package/out/__chunks__/chunk-YARUDMWQ.mjs +0 -2
- /package/out/__chunks__/{chunk-OTHNSSYN.mjs.map → chunk-2STEP3VA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CJYTBE3E.mjs.map → chunk-3HADWDDI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QQAW7UC2.mjs.map → chunk-3L7HZ2SO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OMSCPNRR.mjs.map → chunk-4LYEVUGN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TOGQL2M5.mjs.map → chunk-66FC7DN2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HFEXCIZ2.mjs.map → chunk-6A7TDVVR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ROH2QHUK.mjs.map → chunk-6JRZP7XR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3F3QCMGL.mjs.map → chunk-6SNUC4WD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HCGAZMW2.mjs.map → chunk-77XEEKKC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BDXSVYER.mjs.map → chunk-7ZGMZIYA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HWO7E325.mjs.map → chunk-A4KMW3VA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5DEHHVDS.mjs.map → chunk-AE72PVLM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5JYNGKVQ.mjs.map → chunk-AKS4K5LK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X4CDTS57.mjs.map → chunk-AMSHQJ6K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CIVS2YDU.mjs.map → chunk-ARPLTX4I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BIIJSMXB.mjs.map → chunk-BFU632AR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HIUWEH2W.mjs.map → chunk-BNBD3WVN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OINVR4SF.mjs.map → chunk-BP7QTGW5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ROZAXUMC.mjs.map → chunk-BQX7MJR6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EC3CUSWI.mjs.map → chunk-BWYXCYFI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ETSUQ2R4.mjs.map → chunk-CAHVJ3IF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZHOATTZ2.mjs.map → chunk-CDIHVT44.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DX6OA75E.mjs.map → chunk-CGBCYY3B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JUSK5MVD.mjs.map → chunk-CK4X6HSF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BEPW7QRT.mjs.map → chunk-COTPJZL3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LSKZWWBZ.mjs.map → chunk-D2JYGLAC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JIXJ3S3H.mjs.map → chunk-D54LWE3V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FNYBJAH3.mjs.map → chunk-DNFWIYZH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NDUDQZDL.mjs.map → chunk-EB37CLFR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3YBH7N5W.mjs.map → chunk-EQBJVKBR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QO2DNBMF.mjs.map → chunk-EV4KV3JC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KEUKJKQV.mjs.map → chunk-FIG2TQL2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JUXIROQH.mjs.map → chunk-FLBKETEZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7HGOYM67.mjs.map → chunk-FODKR5LN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BDOJEJNA.mjs.map → chunk-HVS56RA5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FFUT67H3.mjs.map → chunk-HXTDJ2E6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZTQR4O4A.mjs.map → chunk-HZKGE7EY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3L6GBV7L.mjs.map → chunk-HZMRXLHX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WBEMK5QL.mjs.map → chunk-IXDSHQ6O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V73SALVM.mjs.map → chunk-JRC47VFQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VVHC6HV6.mjs.map → chunk-KCUBSEZI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-73MKFMKP.mjs.map → chunk-KMG6WM6K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TSETF6SY.mjs.map → chunk-KTJGX4HU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GQOTAVAR.mjs.map → chunk-L5CHO4VF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HBQQS6GA.mjs.map → chunk-LGAWIVRO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TVXFF2PG.mjs.map → chunk-LMJDCKJN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FQNOEYHK.mjs.map → chunk-LOCNDNZE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WXCST3O7.mjs.map → chunk-LYZ5P6TZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IOTYH724.mjs.map → chunk-LZLJ6HJT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OIWRUY4C.mjs.map → chunk-M2DFHKKK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VTF5A3OJ.mjs.map → chunk-M7CRSX65.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NLZHVYZR.mjs.map → chunk-MA5C5FRG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H3PQUL5M.mjs.map → chunk-MGOTSAGH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-57AGUNU6.mjs.map → chunk-MS44NLMW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-534QBNPX.mjs.map → chunk-MUIRAORV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D5DHIEIM.mjs.map → chunk-MXKLHEGP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AGUGUYQS.mjs.map → chunk-NK5Y3RLY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YNXPGS77.mjs.map → chunk-NTOY6GTP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6FXEHNGW.mjs.map → chunk-NZYB675D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FZ72N7LX.mjs.map → chunk-OIIBPMNU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JIF5QHA5.mjs.map → chunk-PIS56ZD4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DTEI5SBP.mjs.map → chunk-PPMUAFM4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WJHF6NNO.mjs.map → chunk-Q3C46OSS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RFBR7WI3.mjs.map → chunk-QI4FCSOB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-44IN6A4I.mjs.map → chunk-R2EQDN33.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NNBLC3DP.mjs.map → chunk-R32N5WCS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LYUN4G56.mjs.map → chunk-R43WJEH6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PFMOMLPA.mjs.map → chunk-RGFZEURF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7TUX3TKQ.mjs.map → chunk-RMARAUR3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P6PCRGOG.mjs.map → chunk-RW55WHHB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3WNAFMEK.mjs.map → chunk-SHKZVFEF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YARUDMWQ.mjs.map → chunk-SK4EBR2Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZLE5VUWG.mjs.map → chunk-SLOQOCEU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZIMECN23.mjs.map → chunk-TA6TNNXH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KASFKR36.mjs.map → chunk-TSWPPFHW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6BJS5QNF.mjs.map → chunk-U2Z42SAP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EJV4GLIF.mjs.map → chunk-UEFAPILB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AL5D2VEW.mjs.map → chunk-VLYPDZLN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IFWUP3FX.mjs.map → chunk-WDMNEF3T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6RRVRDXX.mjs.map → chunk-X5HSYTDN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZLS3BN2I.mjs.map → chunk-XCKTWIKV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N7UPPFCH.mjs.map → chunk-XGK3JR3Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OD4ANAAQ.mjs.map → chunk-XHKNB4IP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FM6JYAAR.mjs.map → chunk-XNF5QLFW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HPC5WEQQ.mjs.map → chunk-XSS5NOQJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BUHXFBUA.mjs.map → chunk-YZV64TMH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RVCCJBPE.mjs.map → chunk-ZUJ5KE7O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UQ6DOBYK.mjs.map → chunk-ZZZCOFQ7.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as c}from"./chunk-ZI7JADBP.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-TA6TNNXH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-M2DFHKKK.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-TSWPPFHW.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-ZI7JADBP.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-U2Z42SAP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-U2Z42SAP.mjs";import{d as C,e as I}from"./chunk-TA6TNNXH.mjs";import{q as p}from"./chunk-ZI7JADBP.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UEFAPILB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-EB37CLFR.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-DNFWIYZH.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-VLYPDZLN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as A}from"./chunk-SHKZVFEF.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as f}from"./chunk-XCKTWIKV.mjs";import{h as u}from"./chunk-CAA4VJRH.mjs";import{b as S}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-R2EQDN33.mjs";import{a as g}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-ZUJ5KE7O.mjs";import{s as m}from"./chunk-ZI7JADBP.mjs";import{b as T}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{S({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!I(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(e=>({...e,status:e.status??"pending"})),o=g(n),s=y({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:o??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return s;let i=A(a);return f({toastId:s,totalDuration:i}),s};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=T(m());return await Promise.all(a.map(async s=>{let i=await w.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}),e=i.data.txHash;return{...s.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=h(),{apiAddress:n,apiTimeout:o}=T(m());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let s=this.buildBatchId(t),e={transactions:a.map(p=>p.map(c=>c.toPlainObject())),id:s},{data:l}=await w.post(`${n}/batch`,e,{timeout:Number(o)}),B=l.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...l,transactions:B}}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WDMNEF3T.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as a}from"./chunk-ZI7JADBP.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-X5HSYTDN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as et}from"./chunk-FZ72N7LX.mjs";import{a as mt}from"./chunk-6UZHM5LW.mjs";import{a as b}from"./chunk-OMSCPNRR.mjs";import{a as pt}from"./chunk-X4CDTS57.mjs";import{a as w}from"./chunk-TVXFF2PG.mjs";import{a as Z,b as tt,g as st,l as ot}from"./chunk-CAA4VJRH.mjs";import{a as gt}from"./chunk-KEUKJKQV.mjs";import{b as S}from"./chunk-FFUT67H3.mjs";import{a as dt}from"./chunk-BUHXFBUA.mjs";import{a as It}from"./chunk-4ODPAHHA.mjs";import{a as ht}from"./chunk-MDVI45IV.mjs";import{a as ft}from"./chunk-QO2DNBMF.mjs";import{a as f}from"./chunk-VVHC6HV6.mjs";import{a as X}from"./chunk-H3PQUL5M.mjs";import{a as ut}from"./chunk-ZHOATTZ2.mjs";import{a as L}from"./chunk-3F3QCMGL.mjs";import{a as C,f as lt}from"./chunk-ZIMECN23.mjs";import{b as Tt}from"./chunk-O2ZZO4AS.mjs";import{d as rt}from"./chunk-44IN6A4I.mjs";import{k as it,l as nt,n as at}from"./chunk-65L5EBBL.mjs";import{a as A}from"./chunk-HORSXVIV.mjs";import{a as vt}from"./chunk-RVCCJBPE.mjs";import{a as Q}from"./chunk-3YBH7N5W.mjs";import{a as E}from"./chunk-QTKK6OSJ.mjs";import{a as J}from"./chunk-6ACLOUQ3.mjs";import{a as y}from"./chunk-6FXEHNGW.mjs";import{a as yt}from"./chunk-NJN53MJV.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as V,b as q,q as u,s as Y}from"./chunk-76PSW6FH.mjs";import{c as H,f as $}from"./chunk-UERJ6AKK.mjs";import{b as g}from"./chunk-VNLGNNIL.mjs";import{b as v}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-NTEMINYA.mjs";import{b as Et}from"./chunk-76URRONH.mjs";import{a as ct}from"./chunk-OIWRUY4C.mjs";import{a as I}from"./chunk-PLUWBWJ2.mjs";import W from"lodash.isequal";import Lt from"lodash.isequal";var Ft="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",x=class e extends ut{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.closeUI=async()=>{this.data.pendingTransactions.length>0?(this.unsubscribeFunctions.forEach(s=>s.forEach(o=>o())),this.unsubscribeFunctions.clear(),await this.uiElement?.closeWithAnimation()):super.closeUI()};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){p.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let o=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!Lt(a.transactionToasts,i.transactionToasts)||!Lt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ft,[o]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=p.getInstance();await this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:o,toasts:i,network:n}=this.store.getState(),{pendingTransactionToasts:a}=await b({toastList:i,transactionsSessions:s,account:o});this.data.pendingTransactions=a,this.data.historicTransactions=await et.getTransactionsHistory({transactionsSessions:s,address:o.address,explorerAddress:n.network.explorerAddress,egldLabel:n.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){rt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};import R from"bignumber.js";var N=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=g(t),{isExpired:o}=E(s?.nativeAuthToken);o?h().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=g(t),o=$(t);return!!(s?.nativeAuthToken&&o)};this.addPlannedLogout=()=>{let t=h(),s=H(this.store.getState()),o=t.getType()===I.webview;if(!s||o)return;this.addLogoutWarning();let i=g(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=E(i?.nativeAuthToken),c=new R(String(n)),r=`${s}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let d=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},d.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},d.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=v(this.store.getState()),s=g(this.store.getState()),{secondsUntilExpires:o}=E(s?.nativeAuthToken),i=new R(String(o)),n=i.times(1e3);if(!o||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=mt(n.toNumber()),l=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:s}){let o=await y({address:e,baseURL:s});if(!o)throw new Error("Account not found");Tt({address:e,providerType:t.getType()});let i={...o,username:A(o.username),nonce:L(o)};C(i),await S(e),w(),o.shard!=null&&await pt({shard:Number(o.shard),apiAddress:s})}async function kt(e){let{network:{apiAddress:t}}=f();await e.login();let s=await e.getAddress();if(!s)throw new Error("Address not found");return await B({address:s,provider:e,apiAddress:t}),{address:s}}async function Dt({provider:e,nativeAuthConfig:t,token:s}){let{network:{apiAddress:o}}=f(),i=Q(t),n=s;n||(n=await i.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:n});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let l=J(r?.accessToken)?r.accessToken:i.getToken({address:a,token:n,signature:c});q({loginToken:n,signature:c,nativeAuthToken:l});let d=await dt({loginToken:n,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:d,provider:e,apiAddress:o}),{address:d,signature:c}}async function bt(e,t){let s=v(Y());if(s)return await Dt({provider:e,nativeAuthConfig:s,token:t?.token});let{address:o}=await kt(e);return await S(o),w(),{address:o}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${tt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${Z}-${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"},Bt=e=>{for(let[t,s]of Object.entries(Rt))if(e.includes(t))return s;return"Error when signing"};function _(e,t="error"){let s=e?.message,o=Bt(s),n=o!=="Error when signing"?"warning":t,a=Object.keys(U).includes(n)?U[n]:U.error,{toastId:c,iconClassName:r,title:m}=a;return M({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:o,title:m}),o}async function Ct({provider:e,transactions:t,options:s={}}){await St();let{isGuarded:o,activeGuardianAddress:i,nonce:n}=vt(),a=e.getType()===I.ledger,c=It({latestNonce:n,transactions:t}),r=i&&o&&!s.skipGuardian?c?.map(l=>(l.version=G.withTxOptions().valueOf(),l.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),l.guardian=K.newFromBech32(i),l)):c,m=await e.signTransactions(r)??[];return lt(n+m.length),m}var O=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await bt(this.provider,t);return V(this.provider.getType()),wt(this),N.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await gt({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ct({provider:this.provider,transactions:t,options:s})}catch(o){let i=_(o);throw new Error(i)}}async signMessage(t,s){try{return await ft({provider:this.provider,message:t,options:s})}catch(o){let i=_(o,"warning");throw new Error(i)}}async verifyMessage(t){return await ht(t)}cancelLogin(){this.provider.cancelLogin?.()}};var At=null;function wt(e){At=e}function h(){return At||new O(Et)}var Ut=async()=>{try{let e=X(),{network:t}=f();try{let s=await y({address:e,baseURL:t.apiAddress});if(s!=null){let o={...s,username:A(s.username),nonce:L(s)};return C(o),o}}catch(s){console.error("Failed getting account ",s)}}catch(e){console.error("Failed getting address ",e)}return null};async function St(){let e=h();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var F={},T={},_t=(e,t)=>{u().setState(({toasts:s})=>{let o=s.customToasts.length>0?Math.max(...s.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${o+1}`,n=s.customToasts.findIndex(r=>r.toastId===i),a={...e,toastId:i};if(n!==-1){s.customToasts[n]=a;return}s.customToasts.push({...a,toastId:i})},!1,"addCustomToast")},P=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==e)},!1,"removeCustomToast")},xt=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},zo=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},Nt=({toastId:e,totalDuration:t})=>{let s="";return u().setState(({toasts:o})=>{let i=o.transactionToasts.length>0?Math.max(...o.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;s=e??`transaction-toast-${i+1}`,o.transactionToasts.push({startTime:j(),endTime:yt(t),toastId:s})},!1,"addTransactionToast"),s},k=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==e)},!1,"removeTransactionToast"),delete T[e],delete F[e]},M=e=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,o=e.toastId||`custom-toast-${s+1}`;return e.onClose&&(T[o]=e.onClose),e.instantiateToastElement?(F[o]=e.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===o),a={...e,instantiateToastElement:null,toastId:o};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),o):(_t(e,o),o)};var Mt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Mt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{k(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let o=setTimeout(()=>{P(t);let i=T[t];i?.()},s);this.timeoutIntervals.set(t,o)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Mt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var p=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=x.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:o},{toasts:i,transactions:n})=>{(!W(i.transactionToasts,s.transactionToasts)||!W(n,o))&&await this.updateTransactionToastsList(),W(i.customToasts,s.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),o=s[t];if(!o)return!1;let{status:i}=o,n=at(i),a=nt(i),c=it(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,s){let o=Nt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),o}createCustomToast(t){let s=M(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:o}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:n}=await b({toastList:t,transactionsSessions:s,account:o});this.transactionToasts=[...i,...n];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let i="message"in s?{...s}:{...s,instantiateToastElement:F[s.toastId]};this.customToasts.push(i),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ct.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&k(t)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.handleCloseToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.handleCloseToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(o=>o.toastId===t)){this.lifetimeManager.stop(t);let o=T[t];o?.(),P(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),xt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{x as a,F as b,T as c,_t as d,P as e,xt as f,zo as g,Nt as h,k as i,M as j,D as k,p as l,N as m,B as n,bt as o,_ as p,Ct as q,O as r,wt as s,h as t,St as u};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as et}from"./chunk-OIIBPMNU.mjs";import{a as mt}from"./chunk-6UZHM5LW.mjs";import{a as b}from"./chunk-4LYEVUGN.mjs";import{a as pt}from"./chunk-AMSHQJ6K.mjs";import{a as w}from"./chunk-LMJDCKJN.mjs";import{a as Z,b as tt,g as st,l as ot}from"./chunk-CAA4VJRH.mjs";import{a as gt}from"./chunk-FIG2TQL2.mjs";import{b as S}from"./chunk-HXTDJ2E6.mjs";import{a as dt}from"./chunk-YZV64TMH.mjs";import{a as It}from"./chunk-4ODPAHHA.mjs";import{a as ht}from"./chunk-MDVI45IV.mjs";import{a as ft}from"./chunk-EV4KV3JC.mjs";import{a as f}from"./chunk-KCUBSEZI.mjs";import{a as X}from"./chunk-MGOTSAGH.mjs";import{a as ut}from"./chunk-CDIHVT44.mjs";import{a as L}from"./chunk-6SNUC4WD.mjs";import{a as C,f as lt}from"./chunk-TA6TNNXH.mjs";import{b as Tt}from"./chunk-CJLUSPT2.mjs";import{d as rt}from"./chunk-R2EQDN33.mjs";import{k as it,l as nt,n as at}from"./chunk-65L5EBBL.mjs";import{a as A}from"./chunk-HORSXVIV.mjs";import{a as vt}from"./chunk-ZUJ5KE7O.mjs";import{a as Q}from"./chunk-EQBJVKBR.mjs";import{a as E}from"./chunk-QTKK6OSJ.mjs";import{a as J}from"./chunk-6ACLOUQ3.mjs";import{a as y}from"./chunk-NZYB675D.mjs";import{a as yt}from"./chunk-NJN53MJV.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as V,b as q,q as u,s as Y}from"./chunk-ZI7JADBP.mjs";import{c as H,f as $}from"./chunk-UERJ6AKK.mjs";import{b as g}from"./chunk-VNLGNNIL.mjs";import{b as v}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-NTEMINYA.mjs";import{b as Et}from"./chunk-76URRONH.mjs";import{a as ct}from"./chunk-M2DFHKKK.mjs";import{a as I}from"./chunk-PLUWBWJ2.mjs";import W from"lodash.isequal";import Lt from"lodash.isequal";var Ft="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",x=class e extends ut{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.closeUI=async()=>{this.data.pendingTransactions.length>0?(this.unsubscribeFunctions.forEach(s=>s.forEach(o=>o())),this.unsubscribeFunctions.clear(),await this.uiElement?.closeWithAnimation()):super.closeUI()};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){p.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let o=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!Lt(a.transactionToasts,i.transactionToasts)||!Lt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ft,[o]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=p.getInstance();await this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:o,toasts:i,network:n}=this.store.getState(),{pendingTransactionToasts:a}=await b({toastList:i,transactionsSessions:s,account:o});this.data.pendingTransactions=a,this.data.historicTransactions=await et.getTransactionsHistory({transactionsSessions:s,address:o.address,explorerAddress:n.network.explorerAddress,egldLabel:n.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){rt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};import R from"bignumber.js";var N=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=g(t),{isExpired:o}=E(s?.nativeAuthToken);o?h().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=g(t),o=$(t);return!!(s?.nativeAuthToken&&o)};this.addPlannedLogout=()=>{let t=h(),s=H(this.store.getState()),o=t.getType()===I.webview;if(!s||o)return;this.addLogoutWarning();let i=g(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=E(i?.nativeAuthToken),c=new R(String(n)),r=`${s}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let d=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},d.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},d.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=v(this.store.getState()),s=g(this.store.getState()),{secondsUntilExpires:o}=E(s?.nativeAuthToken),i=new R(String(o)),n=i.times(1e3);if(!o||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=mt(n.toNumber()),l=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:s}){let o=await y({address:e,baseURL:s});if(!o)throw new Error("Account not found");Tt({address:e,providerType:t.getType()});let i={...o,username:A(o.username),nonce:L(o)};C(i),await S(e),w(),o.shard!=null&&await pt({shard:Number(o.shard),apiAddress:s})}async function kt(e){let{network:{apiAddress:t}}=f();await e.login();let s=await e.getAddress();if(!s)throw new Error("Address not found");return await B({address:s,provider:e,apiAddress:t}),{address:s}}async function Dt({provider:e,nativeAuthConfig:t,token:s}){let{network:{apiAddress:o}}=f(),i=Q(t),n=s;n||(n=await i.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:n});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let l=J(r?.accessToken)?r.accessToken:i.getToken({address:a,token:n,signature:c});q({loginToken:n,signature:c,nativeAuthToken:l});let d=await dt({loginToken:n,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:d,provider:e,apiAddress:o}),{address:d,signature:c}}async function bt(e,t){let s=v(Y());if(s)return await Dt({provider:e,nativeAuthConfig:s,token:t?.token});let{address:o}=await kt(e);return await S(o),w(),{address:o}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${tt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${Z}-${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"},Bt=e=>{for(let[t,s]of Object.entries(Rt))if(e.includes(t))return s;return"Error when signing"};function _(e,t="error"){let s=e?.message,o=Bt(s),n=o!=="Error when signing"?"warning":t,a=Object.keys(U).includes(n)?U[n]:U.error,{toastId:c,iconClassName:r,title:m}=a;return M({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:o,title:m}),o}async function Ct({provider:e,transactions:t,options:s={}}){await St();let{isGuarded:o,activeGuardianAddress:i,nonce:n}=vt(),a=e.getType()===I.ledger,c=It({latestNonce:n,transactions:t}),r=i&&o&&!s.skipGuardian?c?.map(l=>(l.version=G.withTxOptions().valueOf(),l.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),l.guardian=K.newFromBech32(i),l)):c,m=await e.signTransactions(r)??[];return lt(n+m.length),m}var O=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await bt(this.provider,t);return V(this.provider.getType()),wt(this),N.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await gt({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ct({provider:this.provider,transactions:t,options:s})}catch(o){let i=_(o);throw new Error(i)}}async signMessage(t,s){try{return await ft({provider:this.provider,message:t,options:s})}catch(o){let i=_(o,"warning");throw new Error(i)}}async verifyMessage(t){return await ht(t)}cancelLogin(){this.provider.cancelLogin?.()}};var At=null;function wt(e){At=e}function h(){return At||new O(Et)}var Ut=async()=>{try{let e=X(),{network:t}=f();try{let s=await y({address:e,baseURL:t.apiAddress});if(s!=null){let o={...s,username:A(s.username),nonce:L(s)};return C(o),o}}catch(s){console.error("Failed getting account ",s)}}catch(e){console.error("Failed getting address ",e)}return null};async function St(){let e=h();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var F={},T={},_t=(e,t)=>{u().setState(({toasts:s})=>{let o=s.customToasts.length>0?Math.max(...s.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${o+1}`,n=s.customToasts.findIndex(r=>r.toastId===i),a={...e,toastId:i};if(n!==-1){s.customToasts[n]=a;return}s.customToasts.push({...a,toastId:i})},!1,"addCustomToast")},P=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==e)},!1,"removeCustomToast")},xt=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},zo=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},Nt=({toastId:e,totalDuration:t})=>{let s="";return u().setState(({toasts:o})=>{let i=o.transactionToasts.length>0?Math.max(...o.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;s=e??`transaction-toast-${i+1}`,o.transactionToasts.push({startTime:j(),endTime:yt(t),toastId:s})},!1,"addTransactionToast"),s},k=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==e)},!1,"removeTransactionToast"),delete T[e],delete F[e]},M=e=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,o=e.toastId||`custom-toast-${s+1}`;return e.onClose&&(T[o]=e.onClose),e.instantiateToastElement?(F[o]=e.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===o),a={...e,instantiateToastElement:null,toastId:o};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),o):(_t(e,o),o)};var Mt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Mt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{k(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let o=setTimeout(()=>{P(t);let i=T[t];i?.()},s);this.timeoutIntervals.set(t,o)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Mt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var p=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=x.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:o},{toasts:i,transactions:n})=>{(!W(i.transactionToasts,s.transactionToasts)||!W(n,o))&&await this.updateTransactionToastsList(),W(i.customToasts,s.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),o=s[t];if(!o)return!1;let{status:i}=o,n=at(i),a=nt(i),c=it(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,s){let o=Nt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),o}createCustomToast(t){let s=M(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:o}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:n}=await b({toastList:t,transactionsSessions:s,account:o});this.transactionToasts=[...i,...n];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let i="message"in s?{...s}:{...s,instantiateToastElement:F[s.toastId]};this.customToasts.push(i),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ct.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&k(t)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.handleCloseToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.handleCloseToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(o=>o.toastId===t)){this.lifetimeManager.stop(t);let o=T[t];o?.(),P(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),xt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{x as a,F as b,T as c,_t as d,P as e,xt as f,zo as g,Nt as h,k as i,M as j,D as k,p as l,N as m,B as n,bt as o,_ as p,Ct as q,O as r,wt as s,h as t,St as u};
|
|
2
|
+
//# sourceMappingURL=chunk-XCKTWIKV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-EQBJVKBR.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XGK3JR3Z.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-BNBD3WVN.mjs";function e(t){let{allTransactions:n,parsedTransactionsByDataField:r}=a({transactions:t});return{parsedTransactionsByDataField:r,allTransactions:n}}export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XHKNB4IP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-3HADWDDI.mjs";import{a as e}from"./chunk-MGOTSAGH.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-XSS5NOQJ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-A4KMW3VA.mjs";import{c as n}from"./chunk-ZI7JADBP.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-YZV64TMH.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-RW55WHHB.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as T}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as l}from"./chunk-NTEMINYA.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=c,e.loginInfo=m,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=a(e),n=p(e),{address:i,publicKey:M}=s(e);if(i&&M!==new l(i).toHex()&&A(e),!t)return;if(n==null){w(H());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var z=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:O(e)})));return t.subscribe(z),t},r,D=e=>{r=e},o=()=>(r||D(W(()=>new v)),r),pe=(e=k)=>{let t=W(e);return D(t),t},le=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{me as a,fe as b,Se as c,ue as d,de as e,Le as f,xe as g,E as h,b as i,A as j,H as k,w as l,C as m,z as n,W as o,D as p,o as q,pe as r,le as s};
|
|
2
|
+
//# sourceMappingURL=chunk-ZI7JADBP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/store/store.ts", "../../src/store/middleware/logoutMiddleware.ts", "../../src/store/middleware/applyMiddlewares.ts", "../../src/store/actions/loginInfo/loginInfoActions.ts"],
|
|
4
|
+
"sourcesContent": ["import { createJSONStorage, devtools, persist } from 'zustand/middleware';\nimport { immer } from 'zustand/middleware/immer';\nimport { createStore } from 'zustand/vanilla';\nimport { applyMiddlewares } from './middleware';\nimport {\n networkSlice,\n accountSlice,\n loginInfoSlice,\n configSlice,\n toastSlice,\n cacheSlice,\n uiSlice\n} from './slices';\nimport { transactionsSlice } from './slices/transactions';\nimport {\n InMemoryStorage,\n defaultStorageCallback,\n StorageCallback\n} from './storage';\nimport { StoreType } from './store.types';\n\nexport type MutatorsIn = [\n ['zustand/devtools', never],\n ['zustand/persist', unknown],\n ['zustand/immer', never]\n];\n\nexport type MutatorsOut = [\n ['zustand/devtools', never],\n ['zustand/persist', StoreType],\n ['zustand/immer', never]\n];\n\nexport const createDAppStore = (getStorageCallback: StorageCallback) => {\n const store = createStore<StoreType, MutatorsOut>(\n devtools(\n persist(\n immer((...args) => ({\n network: networkSlice(...args),\n account: accountSlice(...args),\n loginInfo: loginInfoSlice(...args),\n config: configSlice(...args),\n transactions: transactionsSlice(...args),\n toasts: toastSlice(...args),\n cache: cacheSlice(...args),\n ui: uiSlice(...args)\n })),\n {\n name: 'sdk-dapp-store',\n storage: createJSONStorage(getStorageCallback)\n }\n )\n )\n );\n store.subscribe(applyMiddlewares);\n return store;\n};\n\nexport type StoreApi = ReturnType<typeof createDAppStore>;\n\nlet store: StoreApi;\n\nexport const setDAppStore = (_store: StoreApi) => {\n store = _store;\n};\n\nexport const getStore = () => {\n if (!store) {\n setDAppStore(createDAppStore(() => new InMemoryStorage()));\n }\n return store;\n};\n\n/**\n * Initialize store with the preferred storage by passing a callback.\n * Default storage is localStorage.\n * You can pass your own storage.\n * Call this function before using store, ideally before app bootstrapping.\n * @param getStorageCallback\n * @default () => localStorage\n * @returns persistent store instance\n * @example\n * initStore(() => window.localStorage);\n * initStore(() => window.sessionStorage);\n * initStore(() => new InMemoryStorage());\n * */\nexport const initStore = (getStorageCallback = defaultStorageCallback) => {\n const dappStore = createDAppStore(getStorageCallback);\n setDAppStore(dappStore);\n return dappStore;\n};\n\nexport const getState = () => getStore().getState();\n", "import { WritableDraft } from 'immer';\nimport { Address } from 'lib/sdkCore';\nimport {\n addLoginExpiresAt,\n removeLoginExpiresAt\n} from 'store/actions/loginInfo/loginInfoActions';\nimport {\n accountInfoSelector,\n isLoggedInSelector,\n loginExpiresAtSelector\n} from 'store/selectors';\nimport { initialState as initialAccountState } from 'store/slices/account/accountSlice';\nimport { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice';\nimport { initialState as initialToastState } from 'store/slices/toast/toastSlice';\nimport { initialState as initialTransactionsState } from 'store/slices/transactions/transactionsSlice';\nimport { getStore } from 'store/store';\nimport { StoreType } from '../store.types';\n\nexport const resetStore = (store: WritableDraft<StoreType>) => {\n store.account = initialAccountState;\n store.loginInfo = initialLoginInfoState;\n store.transactions = initialTransactionsState;\n store.toasts = initialToastState;\n};\n\nexport function getNewLoginExpiresTimestamp() {\n return new Date().setHours(new Date().getHours() + 24);\n}\n\nexport function setLoginExpiresAt(expiresAt: number | null) {\n if (expiresAt == null) {\n removeLoginExpiresAt();\n return;\n }\n addLoginExpiresAt(expiresAt);\n}\n\nexport const logoutMiddleware = (state: StoreType) => {\n const isLoggedIn = isLoggedInSelector(state);\n const loginTimestamp = loginExpiresAtSelector(state);\n const { address, publicKey } = accountInfoSelector(state);\n\n if (address && publicKey !== new Address(address).toHex()) {\n resetStore(state);\n }\n\n if (!isLoggedIn) {\n return;\n }\n\n if (loginTimestamp == null) {\n setLoginExpiresAt(getNewLoginExpiresTimestamp());\n return;\n }\n\n const now = Date.now();\n const isExpired = loginTimestamp - now < 0;\n\n if (isExpired) {\n // logout\n setLoginExpiresAt(null);\n getStore().setState(resetStore);\n }\n};\n", "import { StoreType } from '../store.types';\nimport { logoutMiddleware } from './logoutMiddleware';\n\nexport const applyMiddlewares = (state: StoreType, _prevState: StoreType) => {\n logoutMiddleware(state);\n};\n", "import { ProviderType } from 'providers/types/providerFactory.types';\nimport {\n LedgerLoginType,\n WalletConnectLoginType\n} from 'store/slices/loginInfo/loginInfo.types';\nimport { getStore } from 'store/store';\nimport { TokenLoginType } from 'types/login.types';\n\nexport const setProviderType = <T extends ProviderType = ProviderType>(\n providerType: T\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.providerType = providerType;\n },\n false,\n 'setProviderType'\n );\n\nexport const setTokenLogin = (tokenLogin: TokenLoginType) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.tokenLogin = tokenLogin;\n },\n false,\n 'setTokenLogin'\n );\n\nexport const setLoginToken = (loginToken: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state.tokenLogin != null) {\n state.tokenLogin.loginToken = loginToken;\n return;\n }\n state.tokenLogin = {\n loginToken\n };\n },\n false,\n 'setLoginToken'\n );\n\nexport const setTokenLoginSignature = (signature: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state?.tokenLogin != null) {\n state.tokenLogin.signature = signature;\n }\n },\n false,\n 'setTokenLoginSignature'\n );\n\nexport const setWalletConnectLogin = (\n walletConnectLogin: WalletConnectLoginType | null\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.walletConnectLogin = walletConnectLogin;\n },\n false,\n 'setWalletConnectLogin'\n );\n\nexport const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.ledgerLogin = ledgerLogin;\n },\n false,\n 'setLedgerLogin'\n );\n\nexport const setIsWalletConnectV2Initialized = (isInitialized: boolean) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.isWalletConnectV2Initialized = isInitialized;\n },\n false,\n 'setIsWalletConnectV2Initialized'\n );\n\nexport const removeLoginExpiresAt = () =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = null;\n },\n false,\n 'removeLoginExpiresAt'\n );\n\nexport const addLoginExpiresAt = (expiresAt: number) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = expiresAt;\n },\n false,\n 'addLoginExpiresAt'\n );\n"],
|
|
5
|
+
"mappings": "wjBAAA,OAAS,qBAAAA,EAAmB,YAAAC,EAAU,WAAAC,MAAe,qBACrD,OAAS,SAAAC,MAAa,2BACtB,OAAS,eAAAC,MAAmB,kBCgBrB,IAAMC,EAAcC,GAAoC,CAC7DA,EAAM,QAAUC,EAChBD,EAAM,UAAYC,EAClBD,EAAM,aAAeC,EACrBD,EAAM,OAASC,CACjB,EAEO,SAASC,GAA8B,CAC5C,OAAO,IAAI,KAAK,EAAE,SAAS,IAAI,KAAK,EAAE,SAAS,EAAI,EAAE,CACvD,CAEO,SAASC,EAAkBC,EAA0B,CAC1D,GAAIA,GAAa,KAAM,CACrBC,EAAqB,EACrB,MACF,CACAC,EAAkBF,CAAS,CAC7B,CAEO,IAAMG,EAAoBC,GAAqB,CACpD,IAAMC,EAAaC,EAAmBF,CAAK,EACrCG,EAAiBC,EAAuBJ,CAAK,EAC7C,CAAE,QAAAK,EAAS,UAAAC,CAAU,EAAIC,EAAoBP,CAAK,EAMxD,GAJIK,GAAWC,IAAc,IAAIE,EAAQH,CAAO,EAAE,MAAM,GACtDd,EAAWS,CAAK,EAGd,CAACC,EACH,OAGF,GAAIE,GAAkB,KAAM,CAC1BR,EAAkBD,EAA4B,CAAC,EAC/C,MACF,CAEA,IAAMe,EAAM,KAAK,IAAI,EACHN,EAAiBM,EAAM,IAIvCd,EAAkB,IAAI,EACtBe,EAAS,EAAE,SAASnB,CAAU,EAElC,EC5DO,IAAMoB,EAAmB,CAACC,EAAkBC,IAA0B,CAC3EC,EAAiBF,CAAK,CACxB,EF4BO,IAAMG,EAAmBC,GAAwC,CACtE,IAAMC,EAAQC,EACZC,EACEC,EACEC,EAAM,IAAIC,KAAU,CAClB,QAASC,EAAa,GAAGD,CAAI,EAC7B,QAASE,EAAa,GAAGF,CAAI,EAC7B,UAAWG,EAAe,GAAGH,CAAI,EACjC,OAAQI,EAAY,GAAGJ,CAAI,EAC3B,aAAcK,EAAkB,GAAGL,CAAI,EACvC,OAAQM,EAAW,GAAGN,CAAI,EAC1B,MAAOO,EAAW,GAAGP,CAAI,EACzB,GAAIQ,EAAQ,GAAGR,CAAI,CACrB,EAAE,EACF,CACE,KAAM,iBACN,QAASS,EAAkBf,CAAkB,CAC/C,CACF,CACF,CACF,EACA,OAAAC,EAAM,UAAUe,CAAgB,EACzBf,CACT,EAIIA,EAESgB,EAAgBC,GAAqB,CAChDjB,EAAQiB,CACV,EAEaC,EAAW,KACjBlB,GACHgB,EAAalB,EAAgB,IAAM,IAAIqB,CAAiB,CAAC,EAEpDnB,GAgBIoB,GAAY,CAACrB,EAAqBsB,IAA2B,CACxE,IAAMC,EAAYxB,EAAgBC,CAAkB,EACpD,OAAAiB,EAAaM,CAAS,EACfA,CACT,EAEaC,GAAW,IAAML,EAAS,EAAE,SAAS,EGpF3C,IAAMM,GACXC,GAEAC,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,aAAeF,CACvB,EACA,GACA,iBACF,EAEWG,GAAiBC,GAC5BH,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,WAAaE,CACrB,EACA,GACA,eACF,EAEWC,GAAiBC,GAC5BL,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxB,GAAIA,EAAM,YAAc,KAAM,CAC5BA,EAAM,WAAW,WAAaI,EAC9B,MACF,CACAJ,EAAM,WAAa,CACjB,WAAAI,CACF,CACF,EACA,GACA,eACF,EAEWC,GAA0BC,GACrCP,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACpBA,GAAO,YAAc,OACvBA,EAAM,WAAW,UAAYM,EAEjC,EACA,GACA,wBACF,EAEWC,GACXC,GAEAT,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,mBAAqBQ,CAC7B,EACA,GACA,uBACF,EAEWC,GAAkBC,GAC7BX,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,YAAcU,CACtB,EACA,GACA,gBACF,EAEWC,GAAmCC,GAC9Cb,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,6BAA+BY,CACvC,EACA,GACA,iCACF,EAEWC,EAAuB,IAClCd,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,eAAiB,IACzB,EACA,GACA,sBACF,EAEWc,EAAqBC,GAChChB,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,eAAiBe,CACzB,EACA,GACA,mBACF",
|
|
6
|
+
"names": ["createJSONStorage", "devtools", "persist", "immer", "createStore", "resetStore", "store", "initialState", "getNewLoginExpiresTimestamp", "setLoginExpiresAt", "expiresAt", "removeLoginExpiresAt", "addLoginExpiresAt", "logoutMiddleware", "state", "isLoggedIn", "isLoggedInSelector", "loginTimestamp", "loginExpiresAtSelector", "address", "publicKey", "accountInfoSelector", "Address", "now", "getStore", "applyMiddlewares", "state", "_prevState", "logoutMiddleware", "createDAppStore", "getStorageCallback", "store", "createStore", "devtools", "persist", "immer", "args", "networkSlice", "accountSlice", "loginInfoSlice", "configSlice", "transactionsSlice", "toastSlice", "cacheSlice", "uiSlice", "createJSONStorage", "applyMiddlewares", "setDAppStore", "_store", "getStore", "InMemoryStorage", "initStore", "defaultStorageCallback", "dappStore", "getState", "setProviderType", "providerType", "getStore", "state", "setTokenLogin", "tokenLogin", "setLoginToken", "loginToken", "setTokenLoginSignature", "signature", "setWalletConnectLogin", "walletConnectLogin", "setLedgerLogin", "ledgerLogin", "setIsWalletConnectV2Initialized", "isInitialized", "removeLoginExpiresAt", "addLoginExpiresAt", "expiresAt"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-XVX7N3JK.mjs";import{a as m}from"./chunk-I3MK6KZJ.mjs";import{Address as l}from"@multiversx/sdk-core";import c from"bignumber.js";var s={tokenId:"",amount:""},g=e=>e.split("@").map((n,t)=>[2,3].includes(t)?n:f(n));function
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-XVX7N3JK.mjs";import{a as m}from"./chunk-I3MK6KZJ.mjs";import{Address as l}from"@multiversx/sdk-core";import c from"bignumber.js";var s={tokenId:"",amount:""},g=e=>e.split("@").map((n,t)=>[2,3].includes(t)?n:f(n));function D(e){if(!e)return s;let d=e.startsWith("ESDTTransfer"),u=e.startsWith("ESDTNFTTransfer")&&e.includes("@"),a=e.startsWith("ESDTNFTBurn")&&e.includes("@");try{if(d){let[,n,t]=e.split("@"),o=Buffer.from(n,"hex").toString("ascii");if(!o)return s;let r=new c("0x"+t.replace("0x","")).toString(10);return{tokenId:o,amount:r}}let i=g(e);if(u){let[,n,t,o,r]=i;if([n,t,o,r].every(T=>!!T)&&m(new l(r).toBech32()))return{tokenId:`${n}-${t}`,amount:new c(o,16).toString(10),collection:n,nonce:t,receiver:new l(r).toBech32()}}if(a){let[,n,t,o]=i;if([n,t,o].every(r=>!!r))return{tokenId:`${n}-${t}`,amount:new c(o,16).toString(10),collection:n,nonce:t}}}catch{return s}return s}export{g as a,D as b};
|
|
2
|
+
//# sourceMappingURL=chunk-ZS4EBCWC.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/transactions/getInterpretedTransaction/helpers/getTokenFromData.ts"],
|
|
4
|
-
"sourcesContent": ["import { Address } from '@multiversx/sdk-core';\nimport BigNumber from 'bignumber.js';\nimport { TransactionTypesEnum } from 'types/enums.types';\nimport { decodePart } from 'utils/decoders/decodePart';\nimport { addressIsValid } from 'utils/validation/addressIsValid';\n\nconst noData = {\n tokenId: '',\n amount: ''\n};\n\nexport const decodeData = (data: string) => {\n const nonceIndex = 2;\n const amountIndex = 3;\n const parts = data.split('@');\n const decodedParts = parts.map((part, i) =>\n [nonceIndex, amountIndex].includes(i) ? part : decodePart(part)\n );\n return decodedParts;\n};\n\nexport function getTokenFromData(data?: string): {\n tokenId: string;\n amount: string;\n collection?: string;\n nonce?: string;\n receiver?: string;\n} {\n if (!data) {\n return noData;\n }\n\n const isTokenTransfer = data.startsWith(TransactionTypesEnum.ESDTTransfer);\n const isNftTransfer =\n data.startsWith(TransactionTypesEnum.ESDTNFTTransfer) && data.includes('@');\n const isNftBurn =\n data.startsWith(TransactionTypesEnum.ESDTNFTBurn) && data.includes('@');\n\n try {\n if (isTokenTransfer) {\n const [, encodedToken, encodedAmount] = data.split('@');\n const tokenId = Buffer.from(encodedToken, 'hex').toString('ascii');\n\n if (!tokenId) {\n return noData;\n }\n\n const amount = new BigNumber(\n '0x' + encodedAmount.replace('0x', '')\n ).toString(10);\n\n return {\n tokenId,\n amount\n };\n }\n\n const decodedData = decodeData(data);\n\n if (isNftTransfer) {\n const [, /*ESDTNFTTransfer*/ collection, nonce, quantity, receiver] =\n decodedData;\n\n if (\n [collection, nonce, quantity, receiver].every((el) => Boolean(el)) &&\n addressIsValid(new Address(receiver).
|
|
5
|
-
"mappings": "kFAAA,OAAS,WAAAA,MAAe,uBACxB,OAAOC,MAAe,eAKtB,IAAMC,EAAS,CACb,QAAS,GACT,OAAQ,EACV,EAEaC,EAAcC,GAGXA,EAAK,MAAM,GAAG,EACD,IAAI,CAACC,EAAMC,IACpC,CAAC,EAAY,CAAW,EAAE,SAASA,CAAC,EAAID,EAAOE,EAAWF,CAAI,CAChE,EAIK,SAASG,EAAiBJ,EAM/B,CACA,GAAI,CAACA,EACH,OAAOF,EAGT,IAAMO,EAAkBL,EAAK,yBAA4C,EACnEM,EACJN,EAAK,4BAA+C,GAAKA,EAAK,SAAS,GAAG,EACtEO,EACJP,EAAK,wBAA2C,GAAKA,EAAK,SAAS,GAAG,EAExE,GAAI,CACF,GAAIK,EAAiB,CACnB,GAAM,CAAC,CAAEG,EAAcC,CAAa,EAAIT,EAAK,MAAM,GAAG,EAChDU,EAAU,OAAO,KAAKF,EAAc,KAAK,EAAE,SAAS,OAAO,EAEjE,GAAI,CAACE,EACH,OAAOZ,EAGT,IAAMa,EAAS,IAAIC,EACjB,KAAOH,EAAc,QAAQ,KAAM,EAAE,CACvC,EAAE,SAAS,EAAE,EAEb,MAAO,CACL,QAAAC,EACA,OAAAC,CACF,CACF,CAEA,IAAME,EAAcd,EAAWC,CAAI,EAEnC,GAAIM,EAAe,CACjB,GAAM,CAAC,CAAsBQ,EAAYC,EAAOC,EAAUC,CAAQ,EAChEJ,EAEF,GACE,CAACC,EAAYC,EAAOC,EAAUC,CAAQ,EAAE,MAAOC,GAAO,EAAQA,CAAG,GACjEC,EAAe,IAAIC,EAAQH,CAAQ,EAAE,
|
|
4
|
+
"sourcesContent": ["import { Address } from '@multiversx/sdk-core';\nimport BigNumber from 'bignumber.js';\nimport { TransactionTypesEnum } from 'types/enums.types';\nimport { decodePart } from 'utils/decoders/decodePart';\nimport { addressIsValid } from 'utils/validation/addressIsValid';\n\nconst noData = {\n tokenId: '',\n amount: ''\n};\n\nexport const decodeData = (data: string) => {\n const nonceIndex = 2;\n const amountIndex = 3;\n const parts = data.split('@');\n const decodedParts = parts.map((part, i) =>\n [nonceIndex, amountIndex].includes(i) ? part : decodePart(part)\n );\n return decodedParts;\n};\n\nexport function getTokenFromData(data?: string): {\n tokenId: string;\n amount: string;\n collection?: string;\n nonce?: string;\n receiver?: string;\n} {\n if (!data) {\n return noData;\n }\n\n const isTokenTransfer = data.startsWith(TransactionTypesEnum.ESDTTransfer);\n const isNftTransfer =\n data.startsWith(TransactionTypesEnum.ESDTNFTTransfer) && data.includes('@');\n const isNftBurn =\n data.startsWith(TransactionTypesEnum.ESDTNFTBurn) && data.includes('@');\n\n try {\n if (isTokenTransfer) {\n const [, encodedToken, encodedAmount] = data.split('@');\n const tokenId = Buffer.from(encodedToken, 'hex').toString('ascii');\n\n if (!tokenId) {\n return noData;\n }\n\n const amount = new BigNumber(\n '0x' + encodedAmount.replace('0x', '')\n ).toString(10);\n\n return {\n tokenId,\n amount\n };\n }\n\n const decodedData = decodeData(data);\n\n if (isNftTransfer) {\n const [, /*ESDTNFTTransfer*/ collection, nonce, quantity, receiver] =\n decodedData;\n\n if (\n [collection, nonce, quantity, receiver].every((el) => Boolean(el)) &&\n addressIsValid(new Address(receiver).toBech32())\n ) {\n return {\n tokenId: `${collection}-${nonce}`,\n amount: new BigNumber(quantity, 16).toString(10),\n collection,\n nonce,\n receiver: new Address(receiver).toBech32()\n };\n }\n }\n\n if (isNftBurn) {\n const [, /*ESDTNFTBurn*/ collection, nonce, quantity] = decodedData;\n\n if ([collection, nonce, quantity].every((el) => Boolean(el))) {\n return {\n tokenId: `${collection}-${nonce}`,\n amount: new BigNumber(quantity, 16).toString(10),\n collection,\n nonce\n };\n }\n }\n } catch {\n return noData;\n }\n\n return noData;\n}\n"],
|
|
5
|
+
"mappings": "kFAAA,OAAS,WAAAA,MAAe,uBACxB,OAAOC,MAAe,eAKtB,IAAMC,EAAS,CACb,QAAS,GACT,OAAQ,EACV,EAEaC,EAAcC,GAGXA,EAAK,MAAM,GAAG,EACD,IAAI,CAACC,EAAMC,IACpC,CAAC,EAAY,CAAW,EAAE,SAASA,CAAC,EAAID,EAAOE,EAAWF,CAAI,CAChE,EAIK,SAASG,EAAiBJ,EAM/B,CACA,GAAI,CAACA,EACH,OAAOF,EAGT,IAAMO,EAAkBL,EAAK,yBAA4C,EACnEM,EACJN,EAAK,4BAA+C,GAAKA,EAAK,SAAS,GAAG,EACtEO,EACJP,EAAK,wBAA2C,GAAKA,EAAK,SAAS,GAAG,EAExE,GAAI,CACF,GAAIK,EAAiB,CACnB,GAAM,CAAC,CAAEG,EAAcC,CAAa,EAAIT,EAAK,MAAM,GAAG,EAChDU,EAAU,OAAO,KAAKF,EAAc,KAAK,EAAE,SAAS,OAAO,EAEjE,GAAI,CAACE,EACH,OAAOZ,EAGT,IAAMa,EAAS,IAAIC,EACjB,KAAOH,EAAc,QAAQ,KAAM,EAAE,CACvC,EAAE,SAAS,EAAE,EAEb,MAAO,CACL,QAAAC,EACA,OAAAC,CACF,CACF,CAEA,IAAME,EAAcd,EAAWC,CAAI,EAEnC,GAAIM,EAAe,CACjB,GAAM,CAAC,CAAsBQ,EAAYC,EAAOC,EAAUC,CAAQ,EAChEJ,EAEF,GACE,CAACC,EAAYC,EAAOC,EAAUC,CAAQ,EAAE,MAAOC,GAAO,EAAQA,CAAG,GACjEC,EAAe,IAAIC,EAAQH,CAAQ,EAAE,SAAS,CAAC,EAE/C,MAAO,CACL,QAAS,GAAGH,CAAU,IAAIC,CAAK,GAC/B,OAAQ,IAAIH,EAAUI,EAAU,EAAE,EAAE,SAAS,EAAE,EAC/C,WAAAF,EACA,MAAAC,EACA,SAAU,IAAIK,EAAQH,CAAQ,EAAE,SAAS,CAC3C,CAEJ,CAEA,GAAIV,EAAW,CACb,GAAM,CAAC,CAAkBO,EAAYC,EAAOC,CAAQ,EAAIH,EAExD,GAAI,CAACC,EAAYC,EAAOC,CAAQ,EAAE,MAAOE,GAAO,EAAQA,CAAG,EACzD,MAAO,CACL,QAAS,GAAGJ,CAAU,IAAIC,CAAK,GAC/B,OAAQ,IAAIH,EAAUI,EAAU,EAAE,EAAE,SAAS,EAAE,EAC/C,WAAAF,EACA,MAAAC,CACF,CAEJ,CACF,MAAQ,CACN,OAAOjB,CACT,CAEA,OAAOA,CACT",
|
|
6
6
|
"names": ["Address", "BigNumber", "noData", "decodeData", "data", "part", "i", "decodePart", "getTokenFromData", "isTokenTransfer", "isNftTransfer", "isNftBurn", "encodedToken", "encodedAmount", "tokenId", "amount", "BigNumber", "decodedData", "collection", "nonce", "quantity", "receiver", "el", "addressIsValid", "Address"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-6JRZP7XR.mjs";import{a as S}from"./chunk-HVS56RA5.mjs";import{a as o}from"./chunk-FMQYLMTU.mjs";import{a as y}from"./chunk-MFUQ5NBC.mjs";import{b as i,c as f}from"./chunk-R2EQDN33.mjs";import{l}from"./chunk-65L5EBBL.mjs";var u={};async function d({serverTransaction:e,sessionId:t,isSequential:c}){let{hash:a,status:r,results:m,invalidTransaction:n,hasStatusChanged:p}=e;try{if(u[a]>30){i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"});return}if(n&&!c||r==="sent"){u[a]=u[a]?u[a]+1:1;return}if(c&&!r){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s});return}if(p){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s})}l(r)&&await S({sessionId:t,hash:a,results:m})}catch(T){console.error(T),i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"})}}async function R({sessionId:e,transactionBatch:t,isSequential:c}){try{if(t==null)return;let a=y(t),r=await h(a);for(let n of r)await d({serverTransaction:n,sessionId:e,isSequential:c});if(r.every(n=>n.status!=="pending")){if(r.every(s=>s.status==="success"))return i({sessionId:e,status:"success"});if(r.some(s=>s.status==="fail"))return i({sessionId:e,status:"fail"});if(r.every(s=>s.invalidTransaction))return i({sessionId:e,status:"invalid"})}}catch(a){console.error(a)}}export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZZZCOFQ7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../__chunks__/chunk-
|
|
1
|
+
import{a,b}from"../../__chunks__/chunk-SLOQOCEU.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";export{a as accountFetcher,b as getAccountFromApi};
|
|
2
2
|
//# sourceMappingURL=getAccountFromApi.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-D2JYGLAC.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../__chunks__/chunk-CDQ2BNUD.mjs";import"../../__chunks__/chunk-LHEH7L4L.mjs";import"../../__chunks__/chunk-MXKLHEGP.mjs";import"../../__chunks__/chunk-EJV4VNJG.mjs";import"../../__chunks__/chunk-RGFZEURF.mjs";import"../../__chunks__/chunk-FI444OX3.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-PLUWBWJ2.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getScamAddressData};
|
|
2
2
|
//# sourceMappingURL=getScamAddressData.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../__chunks__/chunk-INRKVOET.mjs";import{a,b}from"../../__chunks__/chunk-
|
|
1
|
+
import"../../__chunks__/chunk-INRKVOET.mjs";import{a,b}from"../../__chunks__/chunk-SLOQOCEU.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";export{a as accountFetcher,b as getAccountFromApi};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-FODKR5LN.mjs";import"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getCleanApiAddress};
|
|
2
2
|
//# sourceMappingURL=getCleanApiAddress.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-R43WJEH6.mjs";import"../../__chunks__/chunk-FODKR5LN.mjs";import"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getGasStationMetadataFromApi};
|
|
2
2
|
//# sourceMappingURL=getGasStationMetadata.mjs.map
|
package/out/apiCalls/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../__chunks__/chunk-YV7ZJBAY.mjs";import"../__chunks__/chunk-DXRSXWLQ.mjs";import"../__chunks__/chunk-K5MJ4FMD.mjs";import{a as F}from"../__chunks__/chunk-
|
|
1
|
+
import"../__chunks__/chunk-YV7ZJBAY.mjs";import"../__chunks__/chunk-DXRSXWLQ.mjs";import"../__chunks__/chunk-K5MJ4FMD.mjs";import{a as F}from"../__chunks__/chunk-PIS56ZD4.mjs";import"../__chunks__/chunk-INRKVOET.mjs";import"../__chunks__/chunk-6ET5BDZH.mjs";import{a as G}from"../__chunks__/chunk-D2JYGLAC.mjs";import"../__chunks__/chunk-ZFXAT6MD.mjs";import{a as H}from"../__chunks__/chunk-Q2Q4XN4M.mjs";import{a as D}from"../__chunks__/chunk-YK7T6MBD.mjs";import{a as E}from"../__chunks__/chunk-KMJMQEXI.mjs";import{a as B,b as C}from"../__chunks__/chunk-SLOQOCEU.mjs";import{a as A}from"../__chunks__/chunk-3GGBXXXJ.mjs";import{a as z}from"../__chunks__/chunk-O7LCTC4K.mjs";import"../__chunks__/chunk-ZI7JADBP.mjs";import"../__chunks__/chunk-T4FRQ4JG.mjs";import"../__chunks__/chunk-UERJ6AKK.mjs";import"../__chunks__/chunk-KPK72MOE.mjs";import"../__chunks__/chunk-SAAOQW7P.mjs";import"../__chunks__/chunk-VNLGNNIL.mjs";import"../__chunks__/chunk-6JM4DPOH.mjs";import"../__chunks__/chunk-UTWIKUIK.mjs";import"../__chunks__/chunk-ZODTYAYF.mjs";import"../__chunks__/chunk-NLRDRI7Q.mjs";import"../__chunks__/chunk-DKX6JUT6.mjs";import"../__chunks__/chunk-RW55WHHB.mjs";import"../__chunks__/chunk-KRWR77QE.mjs";import"../__chunks__/chunk-B7YCKWDU.mjs";import"../__chunks__/chunk-HDJOER66.mjs";import"../__chunks__/chunk-A7FTKX2A.mjs";import"../__chunks__/chunk-XKU5QBXG.mjs";import"../__chunks__/chunk-WZGG2YKQ.mjs";import"../__chunks__/chunk-JMC7CMTU.mjs";import"../__chunks__/chunk-S2B2ZKIJ.mjs";import"../__chunks__/chunk-T2YPFNVM.mjs";import"../__chunks__/chunk-M7BM6QPB.mjs";import"../__chunks__/chunk-5N4F5T5L.mjs";import"../__chunks__/chunk-CYCS3K6Q.mjs";import"../__chunks__/chunk-YMPZDHKF.mjs";import"../__chunks__/chunk-VKEESSBI.mjs";import"../__chunks__/chunk-2DNGCNYM.mjs";import"../__chunks__/chunk-SQVKVA7X.mjs";import"../__chunks__/chunk-I24YBVHK.mjs";import"../__chunks__/chunk-NB7A4C7L.mjs";import"../__chunks__/chunk-PJWJZHIS.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y}from"../__chunks__/chunk-KD2IQ32V.mjs";import"../__chunks__/chunk-NTEMINYA.mjs";import"../__chunks__/chunk-3FXHIV6O.mjs";import"../__chunks__/chunk-ULUZWP2P.mjs";import"../__chunks__/chunk-MGFIOCA4.mjs";import"../__chunks__/chunk-GGBMHKR4.mjs";import"../__chunks__/chunk-GLXG5BES.mjs";import"../__chunks__/chunk-GTRD4HFY.mjs";export{a as ACCOUNTS_ENDPOINT,b as ADDRESS_ENDPOINT,c as BLOCKS_ENDPOINT,d as CODE_ENDPOINT,e as COLLECTIONS_ENDPOINT,f as CONFIG_ENDPOINT,g as CONTRACTS_ENDPOINT,h as ECONOMICS_ENDPOINT,i as IDENTITIES_ENDPOINT,j as KEYS_ENDPOINT,k as LOCKED_ACCOUNTS_ENDPOINT,l as LOGS_ENDPOINT,m as MINIBLOCKS_ENDPOINT,n as NETWORK_CONFIG_ENDPOINT,o as NFTS_ENDPOINT,p as NODES_ENDPOINT,q as PROVIDERS_ENDPOINT,r as ROLES_ENDPOINT,s as SC_RESULTS_ENDPOINT,t as STAKE_ENDPOINT,u as TOKENS_ENDPOINT,w as TRANSACTIONS_BATCH,v as TRANSACTIONS_COUNT_ENDPOINT,x as TRANSACTIONS_ENDPOINT,y as TRANSFERS_ENDPOINT,B as accountFetcher,G as axiosFetcher,z as axiosInstance,C as getAccountFromApi,A as getCleanApiAddress,E as getNetworkConfigFromApi,D as getServerConfiguration,F as getTokenDetails,H as getWebsocketUrl};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-LGAWIVRO.mjs";import"../../__chunks__/chunk-C4TBDJVT.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";export{a as getPersistedToken};
|
|
2
2
|
//# sourceMappingURL=getPersistedToken.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-COTPJZL3.mjs";import"../../__chunks__/chunk-LGAWIVRO.mjs";import"../../__chunks__/chunk-C4TBDJVT.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getPersistedTokenDetails};
|
|
2
2
|
//# sourceMappingURL=getPersistedTokenDetails.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-PIS56ZD4.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getTokenDetails};
|
|
2
2
|
//# sourceMappingURL=getTokenDetails.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../__chunks__/chunk-K5MJ4FMD.mjs";import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import"../../__chunks__/chunk-K5MJ4FMD.mjs";import{a}from"../../__chunks__/chunk-PIS56ZD4.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";import"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getTokenDetails};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-77XEEKKC.mjs";import"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getServerTransactionsByHashes};
|
|
2
2
|
//# sourceMappingURL=getServerTransactionsByHashes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as o}from"../../__chunks__/chunk-
|
|
1
|
+
import{s as o}from"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import{b as t}from"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{x as r}from"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";import m from"axios";var T=e=>{let{apiAddress:i}=t(o());return m.get(`${i}/${r}/${e}`,{timeout:1e4})};export{T as getTransactionByHash};
|
|
2
2
|
//# sourceMappingURL=getTransactionByHash.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-6JRZP7XR.mjs";import"../../__chunks__/chunk-77XEEKKC.mjs";import"../../__chunks__/chunk-ZI7JADBP.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-RW55WHHB.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GTRD4HFY.mjs";export{a as getTransactionsByHashes};
|
|
2
2
|
//# sourceMappingURL=getTransactionsByHashes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-D2JYGLAC.mjs";import"../../__chunks__/chunk-O7LCTC4K.mjs";export{a as axiosFetcher};
|
|
2
2
|
//# sourceMappingURL=axiosFetcher.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/apiCalls/utils/axiosInstance.ts"],
|
|
4
|
-
"sourcesContent": ["import { buildAxiosFetch } from '@lifeomic/axios-fetch';\nimport axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\n\n// Needs to be used beacause an async call made after cross-window user interaction makes the dapp unresponsive\n\nconst fetch = buildAxiosFetch(axios);\n\nconst getFormattedAxiosResponse = async <T>(response: Response, config?: T) => {\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n // Clone the response to be able to read it twice (for status and data)\n const clonedResponse = response.clone();\n\n // Parse the JSON body asynchronously\n const jsonPromise = clonedResponse.json();\n\n // Return the standardized response object\n const [responseData] = await Promise.all([jsonPromise]);\n return {\n data: responseData,\n status: response.status,\n statusText: response.statusText,\n headers: response.headers,\n config\n };\n};\n\nasync function customPost<T = any, R = AxiosResponse<T, any>, D = any>(\n url: string,\n data?: D,\n config?: AxiosRequestConfig<D> | undefined\n): Promise<R> {\n try {\n const response = await fetch(url, {\n method: 'POST',\n body: data ? JSON.stringify(data) : undefined,\n headers: {\n 'Content-Type': 'application/json',\n ...(config?.headers || {})\n },\n ...config\n } as RequestInit);\n\n return getFormattedAxiosResponse(response, config) as unknown as Promise<R>;\n } catch (error) {\n console.error('Fetch Error:', error);\n throw error;\n }\n}\n\nasync function customGet<T = any, R = AxiosResponse<T, any>, D = any>(\n url: string,\n config?: AxiosRequestConfig<D> | undefined\n): Promise<R> {\n try {\n const response = await fetch(url, config as RequestInit);\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n return getFormattedAxiosResponse(response, config) as unknown as Promise<R>;\n } catch (error) {\n console.error('Fetch Error:', error);\n throw error;\n }\n}\n\nasync function customPatch<T = any, R = AxiosResponse<T, any>, D = any>(\n url: string,\n data?: D,\n config?: AxiosRequestConfig<D> | undefined\n): Promise<R> {\n try {\n const response = await fetch(url, {\n method: 'PATCH',\n body: data ? JSON.stringify(data) : undefined,\n headers: config?.headers || {},\n ...config\n } as RequestInit);\n\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n return getFormattedAxiosResponse(response, config) as unknown as Promise<R>;\n } catch (error) {\n console.error('Fetch Error:', error);\n throw error;\n }\n}\n\nconst axiosInstance = axios.create();\naxiosInstance.get = customGet;\naxiosInstance.post = customPost;\naxiosInstance.patch = customPatch;\n\nexport { axiosInstance };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAgC;AAChC,mBAAyD;
|
|
4
|
+
"sourcesContent": ["import { buildAxiosFetch } from '@lifeomic/axios-fetch';\nimport axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\n\ntype RequestInit = {\n method?: string;\n headers?: Record<string, string>;\n body?: string;\n [key: string]: any;\n};\n\n// Needs to be used beacause an async call made after cross-window user interaction makes the dapp unresponsive\n\nconst fetch = buildAxiosFetch(axios);\n\nconst getFormattedAxiosResponse = async <T>(response: Response, config?: T) => {\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n // Clone the response to be able to read it twice (for status and data)\n const clonedResponse = response.clone();\n\n // Parse the JSON body asynchronously\n const jsonPromise = clonedResponse.json();\n\n // Return the standardized response object\n const [responseData] = await Promise.all([jsonPromise]);\n return {\n data: responseData,\n status: response.status,\n statusText: response.statusText,\n headers: response.headers,\n config\n };\n};\n\nasync function customPost<T = any, R = AxiosResponse<T, any>, D = any>(\n url: string,\n data?: D,\n config?: AxiosRequestConfig<D> | undefined\n): Promise<R> {\n try {\n const response = await fetch(url, {\n method: 'POST',\n body: data ? JSON.stringify(data) : undefined,\n headers: {\n 'Content-Type': 'application/json',\n ...(config?.headers || {})\n },\n ...config\n } as RequestInit);\n\n return getFormattedAxiosResponse(response, config) as unknown as Promise<R>;\n } catch (error) {\n console.error('Fetch Error:', error);\n throw error;\n }\n}\n\nasync function customGet<T = any, R = AxiosResponse<T, any>, D = any>(\n url: string,\n config?: AxiosRequestConfig<D> | undefined\n): Promise<R> {\n try {\n const response = await fetch(url, config as RequestInit);\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n return getFormattedAxiosResponse(response, config) as unknown as Promise<R>;\n } catch (error) {\n console.error('Fetch Error:', error);\n throw error;\n }\n}\n\nasync function customPatch<T = any, R = AxiosResponse<T, any>, D = any>(\n url: string,\n data?: D,\n config?: AxiosRequestConfig<D> | undefined\n): Promise<R> {\n try {\n const response = await fetch(url, {\n method: 'PATCH',\n body: data ? JSON.stringify(data) : undefined,\n headers: config?.headers || {},\n ...config\n } as RequestInit);\n\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n return getFormattedAxiosResponse(response, config) as unknown as Promise<R>;\n } catch (error) {\n console.error('Fetch Error:', error);\n throw error;\n }\n}\n\nconst axiosInstance = axios.create();\naxiosInstance.get = customGet;\naxiosInstance.post = customPost;\naxiosInstance.patch = customPatch;\n\nexport { axiosInstance };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAgC;AAChC,mBAAyD;AAWzD,MAAM,YAAQ,oCAAgB,aAAAA,OAAK;AAEnC,MAAM,4BAA4B,OAAU,UAAoB,WAAe;AAC7E,MAAI,CAAC,SAAS,IAAI;AAChB,UAAM,IAAI,MAAM,uBAAuB,SAAS,MAAM,EAAE;AAAA,EAC1D;AAGA,QAAM,iBAAiB,SAAS,MAAM;AAGtC,QAAM,cAAc,eAAe,KAAK;AAGxC,QAAM,CAAC,YAAY,IAAI,MAAM,QAAQ,IAAI,CAAC,WAAW,CAAC;AACtD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,SAAS;AAAA,IACjB,YAAY,SAAS;AAAA,IACrB,SAAS,SAAS;AAAA,IAClB;AAAA,EACF;AACF;AAEA,eAAe,WACb,KACA,MACA,QACY;AACZ,MAAI;AACF,UAAM,WAAW,MAAM,MAAM,KAAK;AAAA,MAChC,QAAQ;AAAA,MACR,MAAM,OAAO,KAAK,UAAU,IAAI,IAAI;AAAA,MACpC,SAAS;AAAA,QACP,gBAAgB;AAAA,QAChB,GAAI,QAAQ,WAAW,CAAC;AAAA,MAC1B;AAAA,MACA,GAAG;AAAA,IACL,CAAgB;AAEhB,WAAO,0BAA0B,UAAU,MAAM;AAAA,EACnD,SAAS,OAAO;AACd,YAAQ,MAAM,gBAAgB,KAAK;AACnC,UAAM;AAAA,EACR;AACF;AAEA,eAAe,UACb,KACA,QACY;AACZ,MAAI;AACF,UAAM,WAAW,MAAM,MAAM,KAAK,MAAqB;AACvD,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI,MAAM,uBAAuB,SAAS,MAAM,EAAE;AAAA,IAC1D;AAEA,WAAO,0BAA0B,UAAU,MAAM;AAAA,EACnD,SAAS,OAAO;AACd,YAAQ,MAAM,gBAAgB,KAAK;AACnC,UAAM;AAAA,EACR;AACF;AAEA,eAAe,YACb,KACA,MACA,QACY;AACZ,MAAI;AACF,UAAM,WAAW,MAAM,MAAM,KAAK;AAAA,MAChC,QAAQ;AAAA,MACR,MAAM,OAAO,KAAK,UAAU,IAAI,IAAI;AAAA,MACpC,SAAS,QAAQ,WAAW,CAAC;AAAA,MAC7B,GAAG;AAAA,IACL,CAAgB;AAEhB,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI,MAAM,uBAAuB,SAAS,MAAM,EAAE;AAAA,IAC1D;AAEA,WAAO,0BAA0B,UAAU,MAAM;AAAA,EACnD,SAAS,OAAO;AACd,YAAQ,MAAM,gBAAgB,KAAK;AACnC,UAAM;AAAA,EACR;AACF;AAEA,MAAM,gBAAgB,aAAAA,QAAM,OAAO;AACnC,cAAc,MAAM;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;",
|
|
6
6
|
"names": ["axios"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-O7LCTC4K.mjs";export{a as axiosInstance};
|
|
2
2
|
//# sourceMappingURL=axiosInstance.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../__chunks__/chunk-6ET5BDZH.mjs";import{a as c}from"../../__chunks__/chunk-
|
|
1
|
+
import"../../__chunks__/chunk-6ET5BDZH.mjs";import{a as c}from"../../__chunks__/chunk-D2JYGLAC.mjs";import{a as b}from"../../__chunks__/chunk-3GGBXXXJ.mjs";import{a}from"../../__chunks__/chunk-O7LCTC4K.mjs";export{c as axiosFetcher,a as axiosInstance,b as getCleanApiAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../__chunks__/chunk-
|
|
1
|
+
import{a,b}from"../__chunks__/chunk-MXKLHEGP.mjs";import"../__chunks__/chunk-GTRD4HFY.mjs";export{b as isBrowserWithPopupConfirmation,a as isSafari};
|
|
2
2
|
//# sourceMappingURL=browser.constants.mjs.map
|