@multiversx/sdk-dapp 5.0.0-alpha.5 → 5.0.0-alpha.6
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-INU7LP3O.mjs → chunk-2ENRJCCA.mjs} +2 -2
- package/out/__chunks__/chunk-2I4BJK55.mjs +2 -0
- package/out/__chunks__/chunk-2I4BJK55.mjs.map +7 -0
- package/out/__chunks__/chunk-2S52O7LI.mjs +2 -0
- package/out/__chunks__/{chunk-QF6MS77T.mjs.map → chunk-2S52O7LI.mjs.map} +2 -2
- package/out/__chunks__/{chunk-6RUKE4FM.mjs → chunk-3W2X3GZO.mjs} +2 -2
- package/out/__chunks__/{chunk-2FTDMH6Y.mjs → chunk-3XSKVLJW.mjs} +2 -2
- package/out/__chunks__/{chunk-7VRG4RQO.mjs → chunk-4BRZWHKY.mjs} +2 -2
- package/out/__chunks__/chunk-4HVG3HGD.mjs +2 -0
- package/out/__chunks__/{chunk-PHFBCDTP.mjs → chunk-4KOEDU3Y.mjs} +2 -2
- package/out/__chunks__/chunk-4NY6ZQCB.mjs +2 -0
- package/out/__chunks__/chunk-4NY6ZQCB.mjs.map +7 -0
- package/out/__chunks__/chunk-4X65PD55.mjs +2 -0
- package/out/__chunks__/{chunk-OCQ5EFO2.mjs.map → chunk-4X65PD55.mjs.map} +1 -1
- package/out/__chunks__/chunk-4XJLALSE.mjs +2 -0
- package/out/__chunks__/chunk-4XJLALSE.mjs.map +7 -0
- package/out/__chunks__/chunk-53X5OIR3.mjs +2 -0
- package/out/__chunks__/chunk-5TS4PZ6V.mjs +2 -0
- package/out/__chunks__/chunk-5WQFV4QY.mjs +2 -0
- package/out/__chunks__/chunk-5WQFV4QY.mjs.map +7 -0
- package/out/__chunks__/chunk-6VL4U3SD.mjs +2 -0
- package/out/__chunks__/{chunk-VDGMN7HP.mjs → chunk-6XUO2J7G.mjs} +2 -2
- package/out/__chunks__/chunk-73EXR25L.mjs +2 -0
- package/out/__chunks__/{chunk-GHDPXQZ5.mjs.map → chunk-73EXR25L.mjs.map} +3 -3
- package/out/__chunks__/chunk-7EQBNFTV.mjs +2 -0
- package/out/__chunks__/{chunk-O2ZW3AB7.mjs → chunk-7HJHGIBJ.mjs} +2 -2
- package/out/__chunks__/{chunk-D7HA7LH7.mjs → chunk-7YA5JPZ3.mjs} +2 -2
- package/out/__chunks__/{chunk-HO2VZQDC.mjs → chunk-A2S6BDWO.mjs} +2 -2
- package/out/__chunks__/chunk-AIO3CDMH.mjs +2 -0
- package/out/__chunks__/chunk-AIO3CDMH.mjs.map +7 -0
- package/out/__chunks__/{chunk-TR5U2CII.mjs → chunk-AW4W44IZ.mjs} +2 -2
- package/out/__chunks__/{chunk-3NG7LKF4.mjs → chunk-BSWV5MEC.mjs} +2 -2
- package/out/__chunks__/chunk-BZWDNUS4.mjs +2 -0
- package/out/__chunks__/{chunk-MCZUQPRA.mjs → chunk-CTMAC553.mjs} +2 -2
- package/out/__chunks__/{chunk-LGILKY4G.mjs → chunk-CU47DEVW.mjs} +2 -2
- package/out/__chunks__/chunk-CWZPGMEQ.mjs +2 -0
- package/out/__chunks__/chunk-CWZPGMEQ.mjs.map +7 -0
- package/out/__chunks__/{chunk-V4YY4ZE7.mjs → chunk-CYFAX2FA.mjs} +2 -2
- package/out/__chunks__/{chunk-QE5C4A4D.mjs → chunk-CZYIK4AV.mjs} +2 -2
- package/out/__chunks__/chunk-DT6YLEPL.mjs +2 -0
- package/out/__chunks__/{chunk-2JBJKAGB.mjs → chunk-EA6FWJCX.mjs} +2 -2
- package/out/__chunks__/{chunk-EJ2HUG54.mjs → chunk-EGEUR6LK.mjs} +2 -2
- package/out/__chunks__/chunk-EJKW2LHT.mjs +2 -0
- package/out/__chunks__/chunk-EJKW2LHT.mjs.map +7 -0
- package/out/__chunks__/{chunk-QOVOHGYN.mjs → chunk-EUM7J3UT.mjs} +2 -2
- package/out/__chunks__/{chunk-Q725VOSH.mjs → chunk-EVNL24SI.mjs} +2 -2
- package/out/__chunks__/{chunk-XGUWU5IO.mjs → chunk-F33ED5VY.mjs} +2 -2
- package/out/__chunks__/{chunk-G34E3TZH.mjs → chunk-F3ZH2WXR.mjs} +2 -2
- package/out/__chunks__/{chunk-L2DBVSAK.mjs → chunk-FKB6EYMV.mjs} +2 -2
- package/out/__chunks__/{chunk-2UEEEYRT.mjs → chunk-G3WS2SYA.mjs} +2 -2
- package/out/__chunks__/{chunk-EGPVJE45.mjs → chunk-GVA5Y5KR.mjs} +2 -2
- package/out/__chunks__/chunk-I3DNTUGR.mjs +2 -0
- package/out/__chunks__/{chunk-WCS37FJM.mjs → chunk-IAAVRI6B.mjs} +2 -2
- package/out/__chunks__/chunk-IEPJBJYE.mjs +2 -0
- package/out/__chunks__/chunk-IOFZWNJ4.mjs +2 -0
- package/out/__chunks__/{chunk-SF7XXVIO.mjs → chunk-ISPRIGOE.mjs} +2 -2
- package/out/__chunks__/{chunk-TDPJL2GR.mjs → chunk-JGWNKE3I.mjs} +2 -2
- package/out/__chunks__/chunk-JHSDQ4NG.mjs +2 -0
- package/out/__chunks__/chunk-KDE4OU7S.mjs +2 -0
- package/out/__chunks__/{chunk-DP7J3L4E.mjs → chunk-KMFCWHOG.mjs} +2 -2
- package/out/__chunks__/{chunk-R46LJPYC.mjs → chunk-KSNODP2B.mjs} +2 -2
- package/out/__chunks__/chunk-L73MXRIY.mjs +2 -0
- package/out/__chunks__/{chunk-E6LAZEWZ.mjs → chunk-L7J5JJEB.mjs} +2 -2
- package/out/__chunks__/{chunk-XO5D3FNU.mjs → chunk-MNXYY4GE.mjs} +2 -2
- package/out/__chunks__/chunk-NO7YH2FT.mjs +2 -0
- package/out/__chunks__/{chunk-NIYYV54M.mjs → chunk-NREOHZVN.mjs} +2 -2
- package/out/__chunks__/{chunk-WXXLQ6H7.mjs → chunk-OIL7VMRM.mjs} +2 -2
- package/out/__chunks__/chunk-OPM4DDXX.mjs +2 -0
- package/out/__chunks__/chunk-OPM4DDXX.mjs.map +7 -0
- package/out/__chunks__/{chunk-QATZVKKG.mjs → chunk-P3NFZKKS.mjs} +2 -2
- package/out/__chunks__/{chunk-2YTMWXHT.mjs → chunk-PEURG4PE.mjs} +2 -2
- package/out/__chunks__/{chunk-53A5OCQC.mjs → chunk-PYJMQN53.mjs} +2 -2
- package/out/__chunks__/chunk-QA26HI3B.mjs +2 -0
- package/out/__chunks__/chunk-QA26HI3B.mjs.map +7 -0
- package/out/__chunks__/chunk-QDIXBYIO.mjs +2 -0
- package/out/__chunks__/{chunk-U2TDLWBA.mjs.map → chunk-QDIXBYIO.mjs.map} +1 -1
- package/out/__chunks__/chunk-QQU6SRAV.mjs +2 -0
- package/out/__chunks__/{chunk-66Z36IEX.mjs → chunk-QSAHAGTQ.mjs} +2 -2
- package/out/__chunks__/chunk-R53MCZI6.mjs +2 -0
- package/out/__chunks__/chunk-R53MCZI6.mjs.map +7 -0
- package/out/__chunks__/{chunk-LEVXXCB6.mjs → chunk-R6GCICL7.mjs} +2 -2
- package/out/__chunks__/chunk-RTH5DJEI.mjs +2 -0
- package/out/__chunks__/chunk-RVHEUIC3.mjs +2 -0
- package/out/__chunks__/{chunk-T6YNIMPO.mjs.map → chunk-RVHEUIC3.mjs.map} +2 -2
- package/out/__chunks__/{chunk-5F57CS73.mjs → chunk-S37QJIXF.mjs} +2 -2
- package/out/__chunks__/{chunk-II6G5P3V.mjs → chunk-S55MULGJ.mjs} +2 -2
- package/out/__chunks__/{chunk-LTUGEJO2.mjs → chunk-SJ4UJRDS.mjs} +2 -2
- package/out/__chunks__/{chunk-SYI5Q5RY.mjs → chunk-TKYDPA56.mjs} +2 -2
- package/out/__chunks__/{chunk-YMME53G7.mjs → chunk-TTNVCEUD.mjs} +2 -2
- package/out/__chunks__/chunk-U277O55E.mjs +2 -0
- package/out/__chunks__/chunk-U277O55E.mjs.map +7 -0
- package/out/__chunks__/chunk-UFOL2NTX.mjs +2 -0
- package/out/__chunks__/chunk-UFOL2NTX.mjs.map +7 -0
- package/out/__chunks__/chunk-VZI2XGAI.mjs +2 -0
- package/out/__chunks__/{chunk-VZYCT6ZP.mjs → chunk-W7TRO6AR.mjs} +2 -2
- package/out/__chunks__/chunk-WFAPPSOI.mjs +1 -0
- package/out/__chunks__/chunk-XCKQMM73.mjs +2 -0
- package/out/__chunks__/chunk-XCKQMM73.mjs.map +7 -0
- package/out/__chunks__/chunk-XCLDLXPX.mjs +2 -0
- package/out/__chunks__/{chunk-HQJG7CFV.mjs → chunk-XPEAEEAP.mjs} +2 -2
- package/out/__chunks__/{chunk-HQO3R2IG.mjs → chunk-YVDP2G6F.mjs} +2 -2
- package/out/__chunks__/{chunk-ASXWZ65B.mjs → chunk-YZ5ZS3VO.mjs} +2 -2
- package/out/__chunks__/chunk-Z2PS6O33.mjs +2 -0
- package/out/__chunks__/chunk-Z2PS6O33.mjs.map +7 -0
- package/out/__chunks__/{chunk-Q6PSRPB2.mjs → chunk-Z5CDCI3Y.mjs} +2 -2
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.d.ts +10 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.js +41 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.js.map +1 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +2 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs.map +7 -0
- package/out/index.mjs +1 -1
- package/out/lib/sdkCore.d.ts +1 -1
- package/out/lib/sdkCore.js +2 -1
- package/out/lib/sdkCore.js.map +1 -1
- package/out/lib/sdkCore.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/helpers/isCrossShardTransaction.js +5 -4
- package/out/managers/TransactionManager/helpers/isCrossShardTransaction.js.map +1 -1
- package/out/managers/TransactionManager/helpers/isCrossShardTransaction.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/TransactionManager/tests/isCrossShardTransaction.test.js +0 -37
- package/out/managers/TransactionManager/tests/isCrossShardTransaction.test.js.map +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.d.ts +7 -2
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js +11 -2
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js.map +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/LedgerIdleStateManager/LedgerIdleStateManager.js +2 -2
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.js.map +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/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.js +2 -3
- package/out/methods/initApp/initApp.js.map +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +3 -3
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.d.ts +3 -1
- package/out/providers/DappProvider/DappProvider.js +2 -2
- package/out/providers/DappProvider/DappProvider.js.map +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/login.d.ts +3 -1
- package/out/providers/DappProvider/helpers/login/login.js +13 -6
- package/out/providers/DappProvider/helpers/login/login.js.map +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/getVerifier.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/verifyMessage.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.js +17 -15
- package/out/providers/ProviderFactory.js.map +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.d.ts +26 -12
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.js +30 -12
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.js.map +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.d.ts +14 -10
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js +41 -55
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js.map +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.d.ts +14 -9
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.js +36 -42
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.js.map +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.d.ts +18 -11
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.js +59 -55
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.js.map +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/types/iframe.types.d.ts +1 -0
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.d.ts +22 -11
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.js +57 -43
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.js.map +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.d.ts +28 -17
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js +150 -169
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js.map +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.d.ts +14 -9
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js +36 -40
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js.map +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.js +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.js.map +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.js +14 -2
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getPpuOptions.js +21 -24
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getPpuOptions.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getPpuOptions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/tests/getCommonData.test.js +6 -6
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/tests/getCommonData.test.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.js +8 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.js.map +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/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.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/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.mjs +1 -1
- package/package.json +1 -1
- package/out/__chunks__/chunk-2CNSQULM.mjs +0 -2
- package/out/__chunks__/chunk-2CNSQULM.mjs.map +0 -7
- package/out/__chunks__/chunk-2HY7DU3P.mjs +0 -2
- package/out/__chunks__/chunk-2NQZJCCF.mjs +0 -2
- package/out/__chunks__/chunk-43CV6VGD.mjs +0 -2
- package/out/__chunks__/chunk-43CV6VGD.mjs.map +0 -7
- package/out/__chunks__/chunk-4LFIRWUJ.mjs +0 -2
- package/out/__chunks__/chunk-4LFIRWUJ.mjs.map +0 -7
- package/out/__chunks__/chunk-4WXQHTVV.mjs +0 -2
- package/out/__chunks__/chunk-4YIFSKYR.mjs +0 -2
- package/out/__chunks__/chunk-5IV2AU53.mjs +0 -2
- package/out/__chunks__/chunk-5XBGERHC.mjs +0 -2
- package/out/__chunks__/chunk-6G4HQO6W.mjs +0 -2
- package/out/__chunks__/chunk-7EEGO5S4.mjs +0 -2
- package/out/__chunks__/chunk-B5IOGCMT.mjs +0 -2
- package/out/__chunks__/chunk-B5IOGCMT.mjs.map +0 -7
- package/out/__chunks__/chunk-BIVUIC53.mjs +0 -2
- package/out/__chunks__/chunk-BIVUIC53.mjs.map +0 -7
- package/out/__chunks__/chunk-BMAAIEFF.mjs +0 -2
- package/out/__chunks__/chunk-D2PIXNOV.mjs +0 -2
- package/out/__chunks__/chunk-D2PIXNOV.mjs.map +0 -7
- package/out/__chunks__/chunk-DCKHP6C2.mjs +0 -2
- package/out/__chunks__/chunk-DCKHP6C2.mjs.map +0 -7
- package/out/__chunks__/chunk-FTFAEXVE.mjs +0 -2
- package/out/__chunks__/chunk-GHDPXQZ5.mjs +0 -2
- package/out/__chunks__/chunk-GZTIVASC.mjs +0 -2
- package/out/__chunks__/chunk-HORNVUEE.mjs +0 -2
- package/out/__chunks__/chunk-HORNVUEE.mjs.map +0 -7
- package/out/__chunks__/chunk-I4Q4TPMA.mjs +0 -2
- package/out/__chunks__/chunk-I4Q4TPMA.mjs.map +0 -7
- package/out/__chunks__/chunk-IXJIAULR.mjs +0 -2
- package/out/__chunks__/chunk-LWWYE4ZP.mjs +0 -2
- package/out/__chunks__/chunk-LWWYE4ZP.mjs.map +0 -7
- package/out/__chunks__/chunk-NERW4V4C.mjs +0 -2
- package/out/__chunks__/chunk-O4TATYJF.mjs +0 -2
- package/out/__chunks__/chunk-O65YGLZ6.mjs +0 -2
- package/out/__chunks__/chunk-O65YGLZ6.mjs.map +0 -7
- package/out/__chunks__/chunk-OCQ5EFO2.mjs +0 -2
- package/out/__chunks__/chunk-PP3YTLDC.mjs +0 -2
- package/out/__chunks__/chunk-PP3YTLDC.mjs.map +0 -7
- package/out/__chunks__/chunk-QF6MS77T.mjs +0 -2
- package/out/__chunks__/chunk-QXWM7T6G.mjs +0 -2
- package/out/__chunks__/chunk-T6YNIMPO.mjs +0 -2
- package/out/__chunks__/chunk-TCGD3BK4.mjs +0 -2
- package/out/__chunks__/chunk-TF4RGU5H.mjs +0 -2
- package/out/__chunks__/chunk-TF4RGU5H.mjs.map +0 -7
- package/out/__chunks__/chunk-U2TDLWBA.mjs +0 -2
- package/out/__chunks__/chunk-WZD36B2K.mjs +0 -2
- package/out/__chunks__/chunk-WZD36B2K.mjs.map +0 -7
- package/out/__chunks__/chunk-XRPJSGL4.mjs +0 -2
- package/out/__chunks__/chunk-XWQ5GB5Q.mjs +0 -2
- package/out/__chunks__/chunk-YWJNYZVU.mjs +0 -2
- package/out/__chunks__/chunk-YWJNYZVU.mjs.map +0 -7
- package/out/managers/TransactionManager/helpers/getShardOfAddress.d.ts +0 -1
- package/out/managers/TransactionManager/helpers/getShardOfAddress.js +0 -38
- package/out/managers/TransactionManager/helpers/getShardOfAddress.js.map +0 -1
- package/out/managers/TransactionManager/helpers/getShardOfAddress.mjs +0 -2
- package/out/managers/TransactionManager/tests/getShardOfAddress.test.d.ts +0 -1
- package/out/managers/TransactionManager/tests/getShardOfAddress.test.js +0 -19
- package/out/managers/TransactionManager/tests/getShardOfAddress.test.js.map +0 -1
- /package/out/__chunks__/{chunk-INU7LP3O.mjs.map → chunk-2ENRJCCA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6RUKE4FM.mjs.map → chunk-3W2X3GZO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2FTDMH6Y.mjs.map → chunk-3XSKVLJW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7VRG4RQO.mjs.map → chunk-4BRZWHKY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5IV2AU53.mjs.map → chunk-4HVG3HGD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PHFBCDTP.mjs.map → chunk-4KOEDU3Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7EEGO5S4.mjs.map → chunk-53X5OIR3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4WXQHTVV.mjs.map → chunk-5TS4PZ6V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BMAAIEFF.mjs.map → chunk-6VL4U3SD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VDGMN7HP.mjs.map → chunk-6XUO2J7G.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2HY7DU3P.mjs.map → chunk-7EQBNFTV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O2ZW3AB7.mjs.map → chunk-7HJHGIBJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D7HA7LH7.mjs.map → chunk-7YA5JPZ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HO2VZQDC.mjs.map → chunk-A2S6BDWO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TR5U2CII.mjs.map → chunk-AW4W44IZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3NG7LKF4.mjs.map → chunk-BSWV5MEC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5XBGERHC.mjs.map → chunk-BZWDNUS4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MCZUQPRA.mjs.map → chunk-CTMAC553.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LGILKY4G.mjs.map → chunk-CU47DEVW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V4YY4ZE7.mjs.map → chunk-CYFAX2FA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QE5C4A4D.mjs.map → chunk-CZYIK4AV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4YIFSKYR.mjs.map → chunk-DT6YLEPL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2JBJKAGB.mjs.map → chunk-EA6FWJCX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EJ2HUG54.mjs.map → chunk-EGEUR6LK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QOVOHGYN.mjs.map → chunk-EUM7J3UT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q725VOSH.mjs.map → chunk-EVNL24SI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XGUWU5IO.mjs.map → chunk-F33ED5VY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G34E3TZH.mjs.map → chunk-F3ZH2WXR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L2DBVSAK.mjs.map → chunk-FKB6EYMV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2UEEEYRT.mjs.map → chunk-G3WS2SYA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EGPVJE45.mjs.map → chunk-GVA5Y5KR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2NQZJCCF.mjs.map → chunk-I3DNTUGR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WCS37FJM.mjs.map → chunk-IAAVRI6B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XWQ5GB5Q.mjs.map → chunk-IEPJBJYE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6G4HQO6W.mjs.map → chunk-IOFZWNJ4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SF7XXVIO.mjs.map → chunk-ISPRIGOE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TDPJL2GR.mjs.map → chunk-JGWNKE3I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IXJIAULR.mjs.map → chunk-JHSDQ4NG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XRPJSGL4.mjs.map → chunk-KDE4OU7S.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DP7J3L4E.mjs.map → chunk-KMFCWHOG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R46LJPYC.mjs.map → chunk-KSNODP2B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TCGD3BK4.mjs.map → chunk-L73MXRIY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E6LAZEWZ.mjs.map → chunk-L7J5JJEB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XO5D3FNU.mjs.map → chunk-MNXYY4GE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FTFAEXVE.mjs.map → chunk-NO7YH2FT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NIYYV54M.mjs.map → chunk-NREOHZVN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WXXLQ6H7.mjs.map → chunk-OIL7VMRM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QATZVKKG.mjs.map → chunk-P3NFZKKS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2YTMWXHT.mjs.map → chunk-PEURG4PE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-53A5OCQC.mjs.map → chunk-PYJMQN53.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NERW4V4C.mjs.map → chunk-QQU6SRAV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-66Z36IEX.mjs.map → chunk-QSAHAGTQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LEVXXCB6.mjs.map → chunk-R6GCICL7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GZTIVASC.mjs.map → chunk-RTH5DJEI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5F57CS73.mjs.map → chunk-S37QJIXF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-II6G5P3V.mjs.map → chunk-S55MULGJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LTUGEJO2.mjs.map → chunk-SJ4UJRDS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SYI5Q5RY.mjs.map → chunk-TKYDPA56.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YMME53G7.mjs.map → chunk-TTNVCEUD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QXWM7T6G.mjs.map → chunk-VZI2XGAI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VZYCT6ZP.mjs.map → chunk-W7TRO6AR.mjs.map} +0 -0
- /package/out/{managers/TransactionManager/helpers/getShardOfAddress.mjs.map → __chunks__/chunk-WFAPPSOI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O4TATYJF.mjs.map → chunk-XCLDLXPX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HQJG7CFV.mjs.map → chunk-XPEAEEAP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HQO3R2IG.mjs.map → chunk-YVDP2G6F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ASXWZ65B.mjs.map → chunk-YZ5ZS3VO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q6PSRPB2.mjs.map → chunk-Z5CDCI3Y.mjs.map} +0 -0
package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.d.ts
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDAppProviderAccount } from '@multiversx/sdk-dapp-utils/out';
|
|
2
|
+
import { Message, Transaction } from '../../../lib/sdkCore';
|
|
3
|
+
import { ProviderTypeEnum } from '../../../providers/types/providerFactory.types';
|
|
2
4
|
import { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';
|
|
3
5
|
type CrossWindowProviderProps = {
|
|
4
6
|
address?: string;
|
|
5
7
|
walletAddress?: string;
|
|
6
8
|
};
|
|
7
9
|
export declare class CrossWindowProviderStrategy extends BaseProviderStrategy {
|
|
8
|
-
private provider;
|
|
10
|
+
private readonly provider;
|
|
9
11
|
private readonly walletAddress?;
|
|
10
|
-
private _signTransactions;
|
|
11
|
-
private _signMessage;
|
|
12
12
|
constructor(config?: CrossWindowProviderProps);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
init(): Promise<boolean>;
|
|
14
|
+
private initializeProvider;
|
|
15
|
+
logout(): Promise<boolean>;
|
|
16
|
+
getType(): ProviderTypeEnum;
|
|
17
|
+
getAddress(): Promise<string | undefined>;
|
|
18
|
+
setAccount(account: IDAppProviderAccount): void;
|
|
19
|
+
isInitialized(): boolean;
|
|
20
|
+
cancelAction: () => Promise<void>;
|
|
21
|
+
signTransactions: (transactions: Transaction[]) => Promise<Transaction[]>;
|
|
22
|
+
signMessage: (message: Message) => Promise<Message>;
|
|
19
23
|
private readonly setPopupConsent;
|
|
20
24
|
}
|
|
21
25
|
export {};
|
|
@@ -4,72 +4,28 @@ exports.CrossWindowProviderStrategy = void 0;
|
|
|
4
4
|
const browser_constants_1 = require("../../../constants/browser.constants");
|
|
5
5
|
const providerFactory_constants_1 = require("../../../constants/providerFactory.constants");
|
|
6
6
|
const sdkWebWalletCrossWindowProvider_1 = require("../../../lib/sdkWebWalletCrossWindowProvider");
|
|
7
|
-
const pendingTransactions_types_1 = require("../../../managers/internal/PendingTransactionsStateManager/types/pendingTransactions.types");
|
|
8
7
|
const providerFactory_types_1 = require("../../../providers/types/providerFactory.types");
|
|
9
8
|
const selectors_1 = require("../../../store/selectors");
|
|
10
9
|
const networkSelectors_1 = require("../../../store/selectors/networkSelectors");
|
|
11
10
|
const store_1 = require("../../../store/store");
|
|
12
11
|
const provider_types_1 = require("../../../types/provider.types");
|
|
13
12
|
const BaseProviderStrategy_1 = require("../BaseProviderStrategy/BaseProviderStrategy");
|
|
14
|
-
const getPendingTransactionsHandlers_1 = require("../helpers/getPendingTransactionsHandlers");
|
|
15
13
|
const signMessage_1 = require("../helpers/signMessage/signMessage");
|
|
16
14
|
const guardTransactions_1 = require("../helpers/signTransactions/helpers/guardTransactions/guardTransactions");
|
|
17
15
|
class CrossWindowProviderStrategy extends BaseProviderStrategy_1.BaseProviderStrategy {
|
|
18
16
|
constructor(config) {
|
|
19
17
|
super(config?.address);
|
|
20
|
-
this.
|
|
21
|
-
|
|
22
|
-
this._signMessage = null;
|
|
23
|
-
this.createProvider = async () => {
|
|
24
|
-
this.initialize();
|
|
25
|
-
const network = (0, networkSelectors_1.networkSelector)((0, store_1.getState)());
|
|
26
|
-
if (!this.provider) {
|
|
27
|
-
this.provider = sdkWebWalletCrossWindowProvider_1.CrossWindowProvider.getInstance();
|
|
28
|
-
this.provider.init();
|
|
29
|
-
}
|
|
30
|
-
// Bind in order to break reference
|
|
31
|
-
this._signTransactions = this.provider.signTransactions.bind(this.provider);
|
|
32
|
-
this._signMessage = this.provider.signMessage.bind(this.provider);
|
|
33
|
-
this._login = this.provider.login.bind(this.provider);
|
|
34
|
-
this.provider.setWalletUrl(this.walletAddress ?? network.walletAddress);
|
|
35
|
-
this.provider.setAddress(this.address);
|
|
36
|
-
this.setPopupConsent();
|
|
37
|
-
return this.buildProvider();
|
|
38
|
-
};
|
|
39
|
-
this.cancelLogin = () => {
|
|
40
|
-
if (this.loginAbortController) {
|
|
41
|
-
this.loginAbortController.abort();
|
|
42
|
-
}
|
|
43
|
-
// is called instead of provider.cancelAction()
|
|
44
|
-
sdkWebWalletCrossWindowProvider_1.CrossWindowProvider.getInstance().onDestroy();
|
|
45
|
-
this.loginAbortController = null;
|
|
46
|
-
};
|
|
47
|
-
this.buildProvider = () => {
|
|
48
|
-
if (!this.provider) {
|
|
49
|
-
throw new Error(provider_types_1.ProviderErrorsEnum.notInitialized);
|
|
50
|
-
}
|
|
51
|
-
const provider = this.provider;
|
|
52
|
-
provider.setAccount({ address: this.address });
|
|
53
|
-
provider.signTransactions = this.signTransactions;
|
|
54
|
-
provider.signMessage = this.signMessage;
|
|
55
|
-
provider.cancelLogin = this.cancelLogin;
|
|
56
|
-
return provider;
|
|
18
|
+
this.cancelAction = async () => {
|
|
19
|
+
this.provider.cancelAction();
|
|
57
20
|
};
|
|
58
21
|
this.signTransactions = async (transactions) => {
|
|
59
|
-
if (!this.provider
|
|
22
|
+
if (!this.provider) {
|
|
60
23
|
throw new Error(provider_types_1.ProviderErrorsEnum.notInitialized);
|
|
61
24
|
}
|
|
62
|
-
const { onClose, manager } = await (
|
|
63
|
-
cancelAction: this.provider.cancelAction.bind(this.provider)
|
|
64
|
-
});
|
|
65
|
-
manager.subscribeToEventBus(pendingTransactions_types_1.PendingTransactionsEventsEnum.CLOSE, onClose);
|
|
66
|
-
manager.updateData({
|
|
67
|
-
name: providerFactory_constants_1.providerLabels.crossWindow,
|
|
68
|
-
type: providerFactory_types_1.ProviderTypeEnum.crossWindow
|
|
69
|
-
});
|
|
25
|
+
const { onClose, manager } = await this.initSignState();
|
|
70
26
|
this.setPopupConsent();
|
|
71
27
|
try {
|
|
72
|
-
const signedTransactions = (await this.
|
|
28
|
+
const signedTransactions = (await this.provider.signTransactions(transactions)) ?? [];
|
|
73
29
|
const optionallyGuardedTransactions = await (0, guardTransactions_1.guardTransactions)(signedTransactions);
|
|
74
30
|
return optionallyGuardedTransactions;
|
|
75
31
|
}
|
|
@@ -82,14 +38,14 @@ class CrossWindowProviderStrategy extends BaseProviderStrategy_1.BaseProviderStr
|
|
|
82
38
|
}
|
|
83
39
|
};
|
|
84
40
|
this.signMessage = async (message) => {
|
|
85
|
-
if (!this.provider
|
|
41
|
+
if (!this.provider) {
|
|
86
42
|
throw new Error(provider_types_1.ProviderErrorsEnum.notInitialized);
|
|
87
43
|
}
|
|
88
44
|
this.setPopupConsent();
|
|
89
45
|
const signedMessage = await (0, signMessage_1.signMessage)({
|
|
90
46
|
message,
|
|
91
|
-
handleSignMessage: this.
|
|
92
|
-
cancelAction: this.
|
|
47
|
+
handleSignMessage: this.provider.signMessage.bind(this.provider),
|
|
48
|
+
cancelAction: this.cancelAction,
|
|
93
49
|
providerType: providerFactory_constants_1.providerLabels.crossWindow
|
|
94
50
|
});
|
|
95
51
|
return signedMessage;
|
|
@@ -105,10 +61,40 @@ class CrossWindowProviderStrategy extends BaseProviderStrategy_1.BaseProviderStr
|
|
|
105
61
|
}
|
|
106
62
|
};
|
|
107
63
|
this.walletAddress = config?.walletAddress;
|
|
64
|
+
this.provider = sdkWebWalletCrossWindowProvider_1.CrossWindowProvider.getInstance();
|
|
65
|
+
this._login = this.provider.login.bind(this.provider);
|
|
66
|
+
}
|
|
67
|
+
async init() {
|
|
68
|
+
this.initializeAddress();
|
|
69
|
+
return this.initializeProvider();
|
|
70
|
+
}
|
|
71
|
+
async initializeProvider() {
|
|
72
|
+
const network = (0, networkSelectors_1.networkSelector)((0, store_1.getState)());
|
|
73
|
+
const isProviderInitialized = await this.provider.init();
|
|
74
|
+
this.provider.setWalletUrl(this.walletAddress ?? network.walletAddress);
|
|
75
|
+
this.setPopupConsent();
|
|
76
|
+
if (this.address) {
|
|
77
|
+
this.provider.setAddress(this.address);
|
|
78
|
+
}
|
|
79
|
+
return isProviderInitialized;
|
|
80
|
+
}
|
|
81
|
+
logout() {
|
|
82
|
+
return this.provider.logout();
|
|
83
|
+
}
|
|
84
|
+
getType() {
|
|
85
|
+
return providerFactory_types_1.ProviderTypeEnum.crossWindow;
|
|
86
|
+
}
|
|
87
|
+
getAddress() {
|
|
88
|
+
if (!this.provider) {
|
|
89
|
+
throw new Error(provider_types_1.ProviderErrorsEnum.notInitialized);
|
|
90
|
+
}
|
|
91
|
+
return this.provider.getAddress();
|
|
92
|
+
}
|
|
93
|
+
setAccount(account) {
|
|
94
|
+
return this.provider.setAccount(account);
|
|
108
95
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
cancelActionReference?.();
|
|
96
|
+
isInitialized() {
|
|
97
|
+
return this.provider.isInitialized();
|
|
112
98
|
}
|
|
113
99
|
}
|
|
114
100
|
exports.CrossWindowProviderStrategy = CrossWindowProviderStrategy;
|
package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossWindowProviderStrategy.js","sourceRoot":"","sources":["../../../../src/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"CrossWindowProviderStrategy.js","sourceRoot":"","sources":["../../../../src/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.ts"],"names":[],"mappings":"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"}
|
package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../../__chunks__/chunk-QA26HI3B.mjs";import"../../../__chunks__/chunk-4XJLALSE.mjs";import"../../../__chunks__/chunk-WFAPPSOI.mjs";import"../../../__chunks__/chunk-OVOW4GUD.mjs";import"../../../__chunks__/chunk-2S52O7LI.mjs";import"../../../__chunks__/chunk-YVDP2G6F.mjs";import"../../../__chunks__/chunk-FKBLKOLI.mjs";import"../../../__chunks__/chunk-SPSO2A53.mjs";import"../../../__chunks__/chunk-FFNSZC37.mjs";import"../../../__chunks__/chunk-S2RZTVIL.mjs";import"../../../__chunks__/chunk-S55MULGJ.mjs";import"../../../__chunks__/chunk-KMFCWHOG.mjs";import"../../../__chunks__/chunk-HK7HCSM3.mjs";import"../../../__chunks__/chunk-QSAHAGTQ.mjs";import"../../../__chunks__/chunk-55SACSMS.mjs";import"../../../__chunks__/chunk-TO3DGAQU.mjs";import"../../../__chunks__/chunk-KDE4OU7S.mjs";import"../../../__chunks__/chunk-BZWDNUS4.mjs";import"../../../__chunks__/chunk-IEPJBJYE.mjs";import"../../../__chunks__/chunk-L7J5JJEB.mjs";import"../../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../../__chunks__/chunk-IEJTMYFW.mjs";import"../../../__chunks__/chunk-UTWIKUIK.mjs";import"../../../__chunks__/chunk-LTF535HP.mjs";import"../../../__chunks__/chunk-KPK72MOE.mjs";import"../../../__chunks__/chunk-SAAOQW7P.mjs";import"../../../__chunks__/chunk-VNLGNNIL.mjs";import"../../../__chunks__/chunk-ZODTYAYF.mjs";import"../../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../../__chunks__/chunk-DKX6JUT6.mjs";import"../../../__chunks__/chunk-DTI4TQ2I.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-TYYA6E7F.mjs";import"../../../__chunks__/chunk-KMFYDHOY.mjs";import"../../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../../__chunks__/chunk-2DNGCNYM.mjs";import"../../../__chunks__/chunk-SQVKVA7X.mjs";import"../../../__chunks__/chunk-T2YPFNVM.mjs";import"../../../__chunks__/chunk-X4XULIVT.mjs";import"../../../__chunks__/chunk-5N4F5T5L.mjs";import"../../../__chunks__/chunk-SUN3MVLZ.mjs";import"../../../__chunks__/chunk-I24YBVHK.mjs";import"../../../__chunks__/chunk-YMPZDHKF.mjs";import"../../../__chunks__/chunk-VKEESSBI.mjs";import"../../../__chunks__/chunk-NB7A4C7L.mjs";import"../../../__chunks__/chunk-K3G3SPRT.mjs";import"../../../__chunks__/chunk-TVELGQIH.mjs";import"../../../__chunks__/chunk-R53MCZI6.mjs";import"../../../__chunks__/chunk-YMME2BFO.mjs";import"../../../__chunks__/chunk-VMFJUT3G.mjs";import"../../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../../__chunks__/chunk-LHEH7L4L.mjs";import"../../../__chunks__/chunk-C4CJOZ4L.mjs";import"../../../__chunks__/chunk-EJV4VNJG.mjs";import"../../../__chunks__/chunk-2X7ENE6Y.mjs";import"../../../__chunks__/chunk-FI444OX3.mjs";import"../../../__chunks__/chunk-PPA7AFVD.mjs";import"../../../__chunks__/chunk-ULUZWP2P.mjs";import"../../../__chunks__/chunk-MGFIOCA4.mjs";import"../../../__chunks__/chunk-GGBMHKR4.mjs";import"../../../__chunks__/chunk-GLXG5BES.mjs";import"../../../__chunks__/chunk-MCOVQEK7.mjs";import"../../../__chunks__/chunk-7QCBLUWB.mjs";export{a as CrossWindowProviderStrategy};
|
|
2
2
|
//# sourceMappingURL=CrossWindowProviderStrategy.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../../__chunks__/chunk-CQZVU4RB.mjs";import"../../../__chunks__/chunk-2GSNHNKW.mjs";import"../../../__chunks__/chunk-FLC6QSZB.mjs";import{a}from"../../../__chunks__/chunk-
|
|
1
|
+
import"../../../__chunks__/chunk-CQZVU4RB.mjs";import"../../../__chunks__/chunk-2GSNHNKW.mjs";import"../../../__chunks__/chunk-FLC6QSZB.mjs";import{a}from"../../../__chunks__/chunk-QA26HI3B.mjs";import"../../../__chunks__/chunk-4XJLALSE.mjs";import"../../../__chunks__/chunk-WFAPPSOI.mjs";import"../../../__chunks__/chunk-OVOW4GUD.mjs";import"../../../__chunks__/chunk-2S52O7LI.mjs";import"../../../__chunks__/chunk-YVDP2G6F.mjs";import"../../../__chunks__/chunk-FKBLKOLI.mjs";import"../../../__chunks__/chunk-SPSO2A53.mjs";import"../../../__chunks__/chunk-FFNSZC37.mjs";import"../../../__chunks__/chunk-S2RZTVIL.mjs";import"../../../__chunks__/chunk-S55MULGJ.mjs";import"../../../__chunks__/chunk-KMFCWHOG.mjs";import"../../../__chunks__/chunk-HK7HCSM3.mjs";import"../../../__chunks__/chunk-QSAHAGTQ.mjs";import"../../../__chunks__/chunk-55SACSMS.mjs";import"../../../__chunks__/chunk-TO3DGAQU.mjs";import"../../../__chunks__/chunk-KDE4OU7S.mjs";import"../../../__chunks__/chunk-BZWDNUS4.mjs";import"../../../__chunks__/chunk-IEPJBJYE.mjs";import"../../../__chunks__/chunk-L7J5JJEB.mjs";import"../../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../../__chunks__/chunk-IEJTMYFW.mjs";import"../../../__chunks__/chunk-UTWIKUIK.mjs";import"../../../__chunks__/chunk-LTF535HP.mjs";import"../../../__chunks__/chunk-KPK72MOE.mjs";import"../../../__chunks__/chunk-SAAOQW7P.mjs";import"../../../__chunks__/chunk-VNLGNNIL.mjs";import"../../../__chunks__/chunk-ZODTYAYF.mjs";import"../../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../../__chunks__/chunk-DKX6JUT6.mjs";import"../../../__chunks__/chunk-DTI4TQ2I.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-TYYA6E7F.mjs";import"../../../__chunks__/chunk-KMFYDHOY.mjs";import"../../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../../__chunks__/chunk-2DNGCNYM.mjs";import"../../../__chunks__/chunk-SQVKVA7X.mjs";import"../../../__chunks__/chunk-T2YPFNVM.mjs";import"../../../__chunks__/chunk-X4XULIVT.mjs";import"../../../__chunks__/chunk-5N4F5T5L.mjs";import"../../../__chunks__/chunk-SUN3MVLZ.mjs";import"../../../__chunks__/chunk-I24YBVHK.mjs";import"../../../__chunks__/chunk-YMPZDHKF.mjs";import"../../../__chunks__/chunk-VKEESSBI.mjs";import"../../../__chunks__/chunk-NB7A4C7L.mjs";import"../../../__chunks__/chunk-K3G3SPRT.mjs";import"../../../__chunks__/chunk-TVELGQIH.mjs";import"../../../__chunks__/chunk-R53MCZI6.mjs";import"../../../__chunks__/chunk-YMME2BFO.mjs";import"../../../__chunks__/chunk-VMFJUT3G.mjs";import"../../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../../__chunks__/chunk-LHEH7L4L.mjs";import"../../../__chunks__/chunk-C4CJOZ4L.mjs";import"../../../__chunks__/chunk-EJV4VNJG.mjs";import"../../../__chunks__/chunk-2X7ENE6Y.mjs";import"../../../__chunks__/chunk-FI444OX3.mjs";import"../../../__chunks__/chunk-PPA7AFVD.mjs";import"../../../__chunks__/chunk-ULUZWP2P.mjs";import"../../../__chunks__/chunk-MGFIOCA4.mjs";import"../../../__chunks__/chunk-GGBMHKR4.mjs";import"../../../__chunks__/chunk-GLXG5BES.mjs";import"../../../__chunks__/chunk-MCOVQEK7.mjs";import"../../../__chunks__/chunk-7QCBLUWB.mjs";export{a as CrossWindowProviderStrategy};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDAppProviderAccount } from '@multiversx/sdk-dapp-utils/out';
|
|
2
|
+
import { Message, Transaction } from '../../../lib/sdkCore';
|
|
3
|
+
import { ProviderTypeEnum } from '../../../providers/types/providerFactory.types';
|
|
2
4
|
import { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';
|
|
3
5
|
export declare class ExtensionProviderStrategy extends BaseProviderStrategy {
|
|
4
|
-
private provider;
|
|
5
|
-
private _signTransactions;
|
|
6
|
-
private _signMessage;
|
|
6
|
+
private readonly provider;
|
|
7
7
|
constructor(address?: string);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
init(): Promise<boolean>;
|
|
9
|
+
private initializeProvider;
|
|
10
|
+
getAddress(): Promise<string | undefined>;
|
|
11
|
+
setAccount(account: IDAppProviderAccount): void;
|
|
12
|
+
isInitialized(): boolean;
|
|
13
|
+
logout(): Promise<boolean>;
|
|
14
|
+
getType(): ProviderTypeEnum;
|
|
15
|
+
cancelAction: () => Promise<void>;
|
|
16
|
+
signTransactions: (transactions: Transaction[]) => Promise<Transaction[]>;
|
|
17
|
+
signMessage: (message: Message) => Promise<Message>;
|
|
13
18
|
}
|
|
@@ -3,58 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExtensionProviderStrategy = void 0;
|
|
4
4
|
const extensionProvider_1 = require("@multiversx/sdk-extension-provider/out/extensionProvider");
|
|
5
5
|
const providerFactory_constants_1 = require("../../../constants/providerFactory.constants");
|
|
6
|
-
const pendingTransactions_types_1 = require("../../../managers/internal/PendingTransactionsStateManager/types/pendingTransactions.types");
|
|
7
6
|
const providerFactory_types_1 = require("../../../providers/types/providerFactory.types");
|
|
8
7
|
const provider_types_1 = require("../../../types/provider.types");
|
|
9
8
|
const BaseProviderStrategy_1 = require("../BaseProviderStrategy/BaseProviderStrategy");
|
|
10
|
-
const getPendingTransactionsHandlers_1 = require("../helpers/getPendingTransactionsHandlers");
|
|
11
9
|
const signMessage_1 = require("../helpers/signMessage/signMessage");
|
|
12
10
|
class ExtensionProviderStrategy extends BaseProviderStrategy_1.BaseProviderStrategy {
|
|
13
11
|
constructor(address) {
|
|
14
12
|
super(address);
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
this._signMessage = null;
|
|
18
|
-
this.createProvider = async () => {
|
|
19
|
-
this.initialize();
|
|
20
|
-
if (!this.provider) {
|
|
21
|
-
this.provider = extensionProvider_1.ExtensionProvider.getInstance();
|
|
22
|
-
await this.provider.init();
|
|
23
|
-
}
|
|
24
|
-
this._signTransactions = this.provider.signTransactions.bind(this.provider);
|
|
25
|
-
this._signMessage = this.provider.signMessage.bind(this.provider);
|
|
26
|
-
this._login = this.provider.login.bind(this.provider);
|
|
27
|
-
return this.buildProvider();
|
|
28
|
-
};
|
|
29
|
-
this.buildProvider = () => {
|
|
30
|
-
if (!this.provider) {
|
|
31
|
-
throw new Error(provider_types_1.ProviderErrorsEnum.notInitialized);
|
|
32
|
-
}
|
|
33
|
-
const provider = this.provider;
|
|
34
|
-
provider.signTransactions = this.signTransactions;
|
|
35
|
-
provider.signMessage = this.signMessage;
|
|
36
|
-
provider.setAccount({ address: this.address });
|
|
37
|
-
provider.cancelLogin = this.cancelLogin;
|
|
38
|
-
return provider;
|
|
13
|
+
this.cancelAction = async () => {
|
|
14
|
+
this.provider.cancelAction();
|
|
39
15
|
};
|
|
40
16
|
this.signTransactions = async (transactions) => {
|
|
41
|
-
if (!this.provider
|
|
17
|
+
if (!this.provider) {
|
|
42
18
|
throw new Error(provider_types_1.ProviderErrorsEnum.notInitialized);
|
|
43
19
|
}
|
|
44
|
-
const { manager, onClose } = await (
|
|
45
|
-
cancelAction: this.provider.cancelAction.bind(this.provider)
|
|
46
|
-
});
|
|
47
|
-
manager.subscribeToEventBus(pendingTransactions_types_1.PendingTransactionsEventsEnum.CLOSE, onClose);
|
|
48
|
-
manager.updateData({
|
|
49
|
-
name: providerFactory_constants_1.providerLabels.extension,
|
|
50
|
-
type: providerFactory_types_1.ProviderTypeEnum.extension
|
|
51
|
-
});
|
|
20
|
+
const { manager, onClose } = await this.initSignState();
|
|
52
21
|
try {
|
|
53
|
-
const signedTransactions = (await this.
|
|
22
|
+
const signedTransactions = (await this.provider.signTransactions(transactions)) ?? [];
|
|
54
23
|
return signedTransactions;
|
|
55
24
|
}
|
|
56
25
|
catch (error) {
|
|
57
|
-
await onClose({ shouldCancelAction: false });
|
|
26
|
+
await onClose({ shouldCancelAction: false });
|
|
58
27
|
throw error;
|
|
59
28
|
}
|
|
60
29
|
finally {
|
|
@@ -62,20 +31,45 @@ class ExtensionProviderStrategy extends BaseProviderStrategy_1.BaseProviderStrat
|
|
|
62
31
|
}
|
|
63
32
|
};
|
|
64
33
|
this.signMessage = async (message) => {
|
|
65
|
-
if (!this.provider
|
|
34
|
+
if (!this.provider) {
|
|
66
35
|
throw new Error(provider_types_1.ProviderErrorsEnum.notInitialized);
|
|
67
36
|
}
|
|
68
37
|
const signedMessage = await (0, signMessage_1.signMessage)({
|
|
69
38
|
message,
|
|
70
|
-
handleSignMessage: this.
|
|
71
|
-
cancelAction: this.
|
|
39
|
+
handleSignMessage: this.provider.signMessage.bind(this.provider),
|
|
40
|
+
cancelAction: this.cancelAction,
|
|
72
41
|
providerType: providerFactory_constants_1.providerLabels.extension
|
|
73
42
|
});
|
|
74
43
|
return signedMessage;
|
|
75
44
|
};
|
|
45
|
+
this.provider = extensionProvider_1.ExtensionProvider.getInstance();
|
|
46
|
+
this._login = this.provider.login.bind(this.provider);
|
|
47
|
+
}
|
|
48
|
+
async init() {
|
|
49
|
+
this.initializeAddress();
|
|
50
|
+
return this.initializeProvider();
|
|
51
|
+
}
|
|
52
|
+
async initializeProvider() {
|
|
53
|
+
const initialized = await this.provider.init();
|
|
54
|
+
if (this.address) {
|
|
55
|
+
this.setAccount({ address: this.address });
|
|
56
|
+
}
|
|
57
|
+
return initialized;
|
|
58
|
+
}
|
|
59
|
+
getAddress() {
|
|
60
|
+
return this.provider.getAddress();
|
|
61
|
+
}
|
|
62
|
+
setAccount(account) {
|
|
63
|
+
return this.provider.setAccount(account);
|
|
64
|
+
}
|
|
65
|
+
isInitialized() {
|
|
66
|
+
return this.provider.isInitialized();
|
|
67
|
+
}
|
|
68
|
+
logout() {
|
|
69
|
+
return this.provider.logout();
|
|
76
70
|
}
|
|
77
|
-
|
|
78
|
-
return
|
|
71
|
+
getType() {
|
|
72
|
+
return providerFactory_types_1.ProviderTypeEnum.extension;
|
|
79
73
|
}
|
|
80
74
|
}
|
|
81
75
|
exports.ExtensionProviderStrategy = ExtensionProviderStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionProviderStrategy.js","sourceRoot":"","sources":["../../../../src/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ExtensionProviderStrategy.js","sourceRoot":"","sources":["../../../../src/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../../__chunks__/chunk-AIO3CDMH.mjs";import"../../../__chunks__/chunk-4XJLALSE.mjs";import"../../../__chunks__/chunk-WFAPPSOI.mjs";import"../../../__chunks__/chunk-OVOW4GUD.mjs";import"../../../__chunks__/chunk-2S52O7LI.mjs";import"../../../__chunks__/chunk-S2RZTVIL.mjs";import"../../../__chunks__/chunk-S55MULGJ.mjs";import"../../../__chunks__/chunk-KMFCWHOG.mjs";import"../../../__chunks__/chunk-HK7HCSM3.mjs";import"../../../__chunks__/chunk-QSAHAGTQ.mjs";import"../../../__chunks__/chunk-55SACSMS.mjs";import"../../../__chunks__/chunk-TO3DGAQU.mjs";import"../../../__chunks__/chunk-KDE4OU7S.mjs";import"../../../__chunks__/chunk-IEPJBJYE.mjs";import"../../../__chunks__/chunk-L7J5JJEB.mjs";import"../../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../../__chunks__/chunk-IEJTMYFW.mjs";import"../../../__chunks__/chunk-UTWIKUIK.mjs";import"../../../__chunks__/chunk-LTF535HP.mjs";import"../../../__chunks__/chunk-KPK72MOE.mjs";import"../../../__chunks__/chunk-SAAOQW7P.mjs";import"../../../__chunks__/chunk-VNLGNNIL.mjs";import"../../../__chunks__/chunk-ZODTYAYF.mjs";import"../../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../../__chunks__/chunk-DKX6JUT6.mjs";import"../../../__chunks__/chunk-DTI4TQ2I.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-TYYA6E7F.mjs";import"../../../__chunks__/chunk-KMFYDHOY.mjs";import"../../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../../__chunks__/chunk-2DNGCNYM.mjs";import"../../../__chunks__/chunk-SQVKVA7X.mjs";import"../../../__chunks__/chunk-T2YPFNVM.mjs";import"../../../__chunks__/chunk-X4XULIVT.mjs";import"../../../__chunks__/chunk-5N4F5T5L.mjs";import"../../../__chunks__/chunk-SUN3MVLZ.mjs";import"../../../__chunks__/chunk-I24YBVHK.mjs";import"../../../__chunks__/chunk-YMPZDHKF.mjs";import"../../../__chunks__/chunk-VKEESSBI.mjs";import"../../../__chunks__/chunk-NB7A4C7L.mjs";import"../../../__chunks__/chunk-K3G3SPRT.mjs";import"../../../__chunks__/chunk-TVELGQIH.mjs";import"../../../__chunks__/chunk-R53MCZI6.mjs";import"../../../__chunks__/chunk-YMME2BFO.mjs";import"../../../__chunks__/chunk-VMFJUT3G.mjs";import"../../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../../__chunks__/chunk-LHEH7L4L.mjs";import"../../../__chunks__/chunk-C4CJOZ4L.mjs";import"../../../__chunks__/chunk-EJV4VNJG.mjs";import"../../../__chunks__/chunk-2X7ENE6Y.mjs";import"../../../__chunks__/chunk-FI444OX3.mjs";import"../../../__chunks__/chunk-PPA7AFVD.mjs";import"../../../__chunks__/chunk-ULUZWP2P.mjs";import"../../../__chunks__/chunk-MGFIOCA4.mjs";import"../../../__chunks__/chunk-GGBMHKR4.mjs";import"../../../__chunks__/chunk-GLXG5BES.mjs";import"../../../__chunks__/chunk-MCOVQEK7.mjs";import"../../../__chunks__/chunk-7QCBLUWB.mjs";export{a as ExtensionProviderStrategy};
|
|
2
2
|
//# sourceMappingURL=ExtensionProviderStrategy.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../../__chunks__/chunk-XNEYOZ7M.mjs";import{a}from"../../../__chunks__/chunk-
|
|
1
|
+
import"../../../__chunks__/chunk-XNEYOZ7M.mjs";import{a}from"../../../__chunks__/chunk-AIO3CDMH.mjs";import"../../../__chunks__/chunk-4XJLALSE.mjs";import"../../../__chunks__/chunk-WFAPPSOI.mjs";import"../../../__chunks__/chunk-OVOW4GUD.mjs";import"../../../__chunks__/chunk-2S52O7LI.mjs";import"../../../__chunks__/chunk-S2RZTVIL.mjs";import"../../../__chunks__/chunk-S55MULGJ.mjs";import"../../../__chunks__/chunk-KMFCWHOG.mjs";import"../../../__chunks__/chunk-HK7HCSM3.mjs";import"../../../__chunks__/chunk-QSAHAGTQ.mjs";import"../../../__chunks__/chunk-55SACSMS.mjs";import"../../../__chunks__/chunk-TO3DGAQU.mjs";import"../../../__chunks__/chunk-KDE4OU7S.mjs";import"../../../__chunks__/chunk-IEPJBJYE.mjs";import"../../../__chunks__/chunk-L7J5JJEB.mjs";import"../../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../../__chunks__/chunk-IEJTMYFW.mjs";import"../../../__chunks__/chunk-UTWIKUIK.mjs";import"../../../__chunks__/chunk-LTF535HP.mjs";import"../../../__chunks__/chunk-KPK72MOE.mjs";import"../../../__chunks__/chunk-SAAOQW7P.mjs";import"../../../__chunks__/chunk-VNLGNNIL.mjs";import"../../../__chunks__/chunk-ZODTYAYF.mjs";import"../../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../../__chunks__/chunk-DKX6JUT6.mjs";import"../../../__chunks__/chunk-DTI4TQ2I.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-TYYA6E7F.mjs";import"../../../__chunks__/chunk-KMFYDHOY.mjs";import"../../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../../__chunks__/chunk-2DNGCNYM.mjs";import"../../../__chunks__/chunk-SQVKVA7X.mjs";import"../../../__chunks__/chunk-T2YPFNVM.mjs";import"../../../__chunks__/chunk-X4XULIVT.mjs";import"../../../__chunks__/chunk-5N4F5T5L.mjs";import"../../../__chunks__/chunk-SUN3MVLZ.mjs";import"../../../__chunks__/chunk-I24YBVHK.mjs";import"../../../__chunks__/chunk-YMPZDHKF.mjs";import"../../../__chunks__/chunk-VKEESSBI.mjs";import"../../../__chunks__/chunk-NB7A4C7L.mjs";import"../../../__chunks__/chunk-K3G3SPRT.mjs";import"../../../__chunks__/chunk-TVELGQIH.mjs";import"../../../__chunks__/chunk-R53MCZI6.mjs";import"../../../__chunks__/chunk-YMME2BFO.mjs";import"../../../__chunks__/chunk-VMFJUT3G.mjs";import"../../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../../__chunks__/chunk-LHEH7L4L.mjs";import"../../../__chunks__/chunk-C4CJOZ4L.mjs";import"../../../__chunks__/chunk-EJV4VNJG.mjs";import"../../../__chunks__/chunk-2X7ENE6Y.mjs";import"../../../__chunks__/chunk-FI444OX3.mjs";import"../../../__chunks__/chunk-PPA7AFVD.mjs";import"../../../__chunks__/chunk-ULUZWP2P.mjs";import"../../../__chunks__/chunk-MGFIOCA4.mjs";import"../../../__chunks__/chunk-GGBMHKR4.mjs";import"../../../__chunks__/chunk-GLXG5BES.mjs";import"../../../__chunks__/chunk-MCOVQEK7.mjs";import"../../../__chunks__/chunk-7QCBLUWB.mjs";export{a as ExtensionProviderStrategy};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDAppProviderAccount } from '@multiversx/sdk-dapp-utils/out';
|
|
2
|
+
import { Message, Transaction } from '../../../lib/sdkCore';
|
|
3
|
+
import { ProviderTypeEnum } from '../../../providers/types/providerFactory.types';
|
|
2
4
|
import { IframeProviderType } from './types';
|
|
3
5
|
import { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';
|
|
4
6
|
export declare class IframeProviderStrategy extends BaseProviderStrategy {
|
|
5
|
-
private provider;
|
|
6
|
-
private type;
|
|
7
|
-
private
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
private readonly provider;
|
|
8
|
+
private readonly type;
|
|
9
|
+
private walletUrl;
|
|
10
|
+
constructor({ type, address, walletUrl }: IframeProviderType);
|
|
11
|
+
init(): Promise<boolean>;
|
|
12
|
+
private initializeWalletUrl;
|
|
13
|
+
private initializeProvider;
|
|
14
|
+
logout(): Promise<boolean>;
|
|
15
|
+
getType(): ProviderTypeEnum;
|
|
16
|
+
getAddress(): Promise<string | undefined>;
|
|
17
|
+
setAccount(account: IDAppProviderAccount): void;
|
|
18
|
+
isInitialized(): boolean;
|
|
19
|
+
cancelAction: () => Promise<void>;
|
|
20
|
+
signTransactions: (transactions: Transaction[]) => Promise<Transaction[]>;
|
|
21
|
+
signMessage: (message: Message) => Promise<Message>;
|
|
15
22
|
}
|