@multiversx/sdk-dapp 5.5.0 → 5.5.1

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.
Files changed (424) hide show
  1. package/README.md +49 -6
  2. package/out/__chunks__/{chunk-7EZGGGIQ.mjs → chunk-2DUOXMZP.mjs} +2 -2
  3. package/out/__chunks__/{chunk-P3VXVK33.mjs → chunk-2LIUW5CF.mjs} +2 -2
  4. package/out/__chunks__/{chunk-CTIBYRMH.mjs → chunk-2SYDJSIO.mjs} +2 -2
  5. package/out/__chunks__/chunk-32Z4H2Q4.mjs +2 -0
  6. package/out/__chunks__/{chunk-V7TKRGVU.mjs → chunk-3DZPVOPO.mjs} +2 -2
  7. package/out/__chunks__/chunk-3JRG3AWF.mjs +2 -0
  8. package/out/__chunks__/chunk-3JRG3AWF.mjs.map +7 -0
  9. package/out/__chunks__/{chunk-OOPGEGEC.mjs → chunk-3TM6K4Z4.mjs} +2 -2
  10. package/out/__chunks__/{chunk-MOJWACYA.mjs → chunk-43SX7DUF.mjs} +2 -2
  11. package/out/__chunks__/{chunk-OP2IEVBM.mjs → chunk-44AUEOAU.mjs} +2 -2
  12. package/out/__chunks__/{chunk-MPJUP362.mjs → chunk-4CGAWZR6.mjs} +2 -2
  13. package/out/__chunks__/{chunk-JA27GJYB.mjs → chunk-573LAOYN.mjs} +2 -2
  14. package/out/__chunks__/{chunk-EZMDYBQN.mjs → chunk-5PENJRCS.mjs} +2 -2
  15. package/out/__chunks__/{chunk-HCYLJV62.mjs → chunk-6CMARMS2.mjs} +2 -2
  16. package/out/__chunks__/{chunk-FVEGUUPB.mjs → chunk-6DAQAOWP.mjs} +2 -2
  17. package/out/__chunks__/{chunk-V5RYJVEZ.mjs → chunk-6TJZZHFV.mjs} +2 -2
  18. package/out/__chunks__/chunk-6ZVWYKKI.mjs +2 -0
  19. package/out/__chunks__/{chunk-O3RDPZCC.mjs → chunk-764JPTJ7.mjs} +2 -2
  20. package/out/__chunks__/chunk-7DNJ6NZI.mjs +2 -0
  21. package/out/__chunks__/chunk-7DNJ6NZI.mjs.map +7 -0
  22. package/out/__chunks__/chunk-7MGK7ZUE.mjs +2 -0
  23. package/out/__chunks__/{chunk-Y6OAUXIU.mjs → chunk-A4KOSUVU.mjs} +2 -2
  24. package/out/__chunks__/{chunk-3U35OFEK.mjs → chunk-AIKIPJUG.mjs} +2 -2
  25. package/out/__chunks__/{chunk-NODAYKNL.mjs → chunk-AOF7QPPF.mjs} +2 -2
  26. package/out/__chunks__/{chunk-XT3FTPPC.mjs → chunk-AVEWWANG.mjs} +2 -2
  27. package/out/__chunks__/{chunk-VYVJQXGS.mjs → chunk-AXZ3DHTB.mjs} +2 -2
  28. package/out/__chunks__/{chunk-ASXSNGBB.mjs → chunk-B77BJX6Z.mjs} +2 -2
  29. package/out/__chunks__/{chunk-2FVSB4I6.mjs → chunk-BB7POIGL.mjs} +2 -2
  30. package/out/__chunks__/{chunk-JI5573A3.mjs → chunk-BPOXONMJ.mjs} +2 -2
  31. package/out/__chunks__/{chunk-J4XVM6TB.mjs → chunk-C65TZQBZ.mjs} +2 -2
  32. package/out/__chunks__/{chunk-L2GTIQ4M.mjs → chunk-CE4N3GKT.mjs} +2 -2
  33. package/out/__chunks__/{chunk-RTGDS56O.mjs → chunk-COPAYHAQ.mjs} +2 -2
  34. package/out/__chunks__/{chunk-S5NXWNSY.mjs → chunk-CT5LMMAW.mjs} +2 -2
  35. package/out/__chunks__/chunk-CZGN3YPT.mjs +2 -0
  36. package/out/__chunks__/{chunk-LHLDTVQX.mjs → chunk-DCF6BLSL.mjs} +2 -2
  37. package/out/__chunks__/chunk-DJUPAQRK.mjs +2 -0
  38. package/out/__chunks__/chunk-EET35YZW.mjs +2 -0
  39. package/out/__chunks__/{chunk-BZ6YK6M7.mjs → chunk-EKBFVSFP.mjs} +2 -2
  40. package/out/__chunks__/{chunk-CCDNY2AY.mjs → chunk-GBYZHNPO.mjs} +2 -2
  41. package/out/__chunks__/chunk-GQFB3L2J.mjs +2 -0
  42. package/out/__chunks__/{chunk-UXCL6NKM.mjs → chunk-GWZUTQLT.mjs} +2 -2
  43. package/out/__chunks__/{chunk-ZPRRRKH2.mjs → chunk-HXFVUYGK.mjs} +2 -2
  44. package/out/__chunks__/{chunk-ZHKCVM4W.mjs → chunk-IEUUVTQ5.mjs} +2 -2
  45. package/out/__chunks__/{chunk-BPPANN5H.mjs → chunk-JSYDF4GF.mjs} +2 -2
  46. package/out/__chunks__/{chunk-I2YHVWIX.mjs → chunk-JZQKOOZH.mjs} +1 -1
  47. package/out/__chunks__/{chunk-I2YHVWIX.mjs.map → chunk-JZQKOOZH.mjs.map} +1 -1
  48. package/out/__chunks__/{chunk-HJ4B3QID.mjs → chunk-K4FRH3YU.mjs} +2 -2
  49. package/out/__chunks__/{chunk-JT4AIBHR.mjs → chunk-LABBTN37.mjs} +2 -2
  50. package/out/__chunks__/{chunk-NCUUK7SW.mjs → chunk-LSAYT6GA.mjs} +2 -2
  51. package/out/__chunks__/chunk-LXI42ZLN.mjs +2 -0
  52. package/out/__chunks__/{chunk-HFY3MGS6.mjs.map → chunk-LXI42ZLN.mjs.map} +2 -2
  53. package/out/__chunks__/{chunk-XHZWVRMA.mjs → chunk-LY5VXESF.mjs} +2 -2
  54. package/out/__chunks__/{chunk-OVROSPMG.mjs → chunk-LZKKBLOO.mjs} +2 -2
  55. package/out/__chunks__/chunk-LZQXEMRC.mjs +2 -0
  56. package/out/__chunks__/{chunk-F4JEWIED.mjs → chunk-M3G5E4TL.mjs} +2 -2
  57. package/out/__chunks__/{chunk-XJV7SQ3A.mjs → chunk-M5COEJ24.mjs} +2 -2
  58. package/out/__chunks__/{chunk-I3LSEZWV.mjs → chunk-MNKQNWZS.mjs} +2 -2
  59. package/out/__chunks__/{chunk-ZQQN3ZGD.mjs → chunk-N3J6ROD5.mjs} +2 -2
  60. package/out/__chunks__/chunk-NJUTBWG5.mjs +2 -0
  61. package/out/__chunks__/chunk-NTCDPOM4.mjs +2 -0
  62. package/out/__chunks__/{chunk-PPCVJ6HZ.mjs → chunk-NZGZ2C45.mjs} +2 -2
  63. package/out/__chunks__/{chunk-BU2ZPMEQ.mjs → chunk-OLXCFQVN.mjs} +2 -2
  64. package/out/__chunks__/chunk-ON2ITKZA.mjs +2 -0
  65. package/out/__chunks__/{chunk-J6EXAKY6.mjs → chunk-OXJJPBYT.mjs} +2 -2
  66. package/out/__chunks__/{chunk-QHN6NRIA.mjs → chunk-P3WDIKX5.mjs} +2 -2
  67. package/out/__chunks__/chunk-P3WDIKX5.mjs.map +7 -0
  68. package/out/__chunks__/{chunk-HKGUI327.mjs → chunk-P3Z2DQ5Y.mjs} +2 -2
  69. package/out/__chunks__/{chunk-JXU7WWWE.mjs → chunk-QIXUIO74.mjs} +2 -2
  70. package/out/__chunks__/chunk-QLDZFO7M.mjs +2 -0
  71. package/out/__chunks__/{chunk-EIFX46HX.mjs.map → chunk-QLDZFO7M.mjs.map} +1 -1
  72. package/out/__chunks__/{chunk-WPZIGJNP.mjs → chunk-RVTPQ3R5.mjs} +2 -2
  73. package/out/__chunks__/{chunk-MI2K6RMJ.mjs → chunk-S3EO22CE.mjs} +2 -2
  74. package/out/__chunks__/{chunk-UYWQOHGW.mjs → chunk-S5DCQEU2.mjs} +2 -2
  75. package/out/__chunks__/{chunk-NHB5C2VT.mjs → chunk-T3SGVYSV.mjs} +2 -2
  76. package/out/__chunks__/{chunk-DYCP3KSI.mjs → chunk-TDRQ3OLY.mjs} +2 -2
  77. package/out/__chunks__/{chunk-JLLPGNLM.mjs → chunk-TZCZXHWQ.mjs} +2 -2
  78. package/out/__chunks__/{chunk-EUUJCC5E.mjs → chunk-U3GPFT4V.mjs} +2 -2
  79. package/out/__chunks__/{chunk-7NRHPYRQ.mjs → chunk-URNYMHJN.mjs} +2 -2
  80. package/out/__chunks__/{chunk-TZQ37JJD.mjs → chunk-USAIPG7X.mjs} +2 -2
  81. package/out/__chunks__/{chunk-RYEM55ZT.mjs → chunk-UTSW2MIB.mjs} +2 -2
  82. package/out/__chunks__/chunk-UXWVVWTD.mjs +2 -0
  83. package/out/__chunks__/{chunk-EQ52O73C.mjs.map → chunk-UXWVVWTD.mjs.map} +3 -3
  84. package/out/__chunks__/{chunk-IAHAAQ4N.mjs → chunk-V3VSL4SQ.mjs} +2 -2
  85. package/out/__chunks__/{chunk-5W3EWQIR.mjs → chunk-W25UUI6O.mjs} +2 -2
  86. package/out/__chunks__/{chunk-A7F53AUI.mjs → chunk-W4GIORRC.mjs} +2 -2
  87. package/out/__chunks__/chunk-WGXHIBDE.mjs +2 -0
  88. package/out/__chunks__/chunk-WOMDF37F.mjs +2 -0
  89. package/out/__chunks__/{chunk-HVWFXP4G.mjs → chunk-WRQ5IRXO.mjs} +2 -2
  90. package/out/__chunks__/{chunk-742ROBVD.mjs → chunk-WUKB2V3K.mjs} +2 -2
  91. package/out/__chunks__/{chunk-ACY76UCX.mjs → chunk-XGALUTQ5.mjs} +2 -2
  92. package/out/__chunks__/{chunk-72UXA2XD.mjs → chunk-XVRM5XQM.mjs} +2 -2
  93. package/out/__chunks__/chunk-XVZUH5QS.mjs +2 -0
  94. package/out/__chunks__/chunk-XZ3C4DZL.mjs +2 -0
  95. package/out/__chunks__/chunk-XZ3C4DZL.mjs.map +7 -0
  96. package/out/__chunks__/{chunk-TAXGAEX2.mjs → chunk-YNJSOBXM.mjs} +2 -2
  97. package/out/__chunks__/chunk-YP65EQFP.mjs +2 -0
  98. package/out/__chunks__/{chunk-CFWLPHKF.mjs.map → chunk-YP65EQFP.mjs.map} +2 -2
  99. package/out/__chunks__/{chunk-LBMKLRI7.mjs → chunk-YXWMQGAB.mjs} +2 -2
  100. package/out/__chunks__/{chunk-OJVDJHBR.mjs → chunk-Z7TITNCM.mjs} +2 -2
  101. package/out/__chunks__/{chunk-HY5BQMSU.mjs → chunk-ZKFUF6BU.mjs} +2 -2
  102. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  103. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  104. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  105. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  106. package/out/apiCalls/economics/getEconomics.mjs +1 -1
  107. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  108. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  109. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  110. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  111. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  112. package/out/constants/browser.constants.mjs +1 -1
  113. package/out/constants/storage.constants.mjs +1 -1
  114. package/out/constants/window.constants.cjs +1 -1
  115. package/out/constants/window.constants.cjs.map +1 -1
  116. package/out/constants/window.constants.mjs +1 -1
  117. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  118. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  119. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  120. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  121. package/out/lib/sdkDappUi.mjs +1 -1
  122. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  123. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  124. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  125. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  126. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  127. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  128. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  129. package/out/managers/ToastManager/index.mjs +1 -1
  130. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  131. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  132. package/out/managers/TransactionManager/index.mjs +1 -1
  133. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  134. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  135. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  136. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  137. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  138. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  139. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  140. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  141. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  142. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  143. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  144. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  145. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  146. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  147. package/out/methods/account/getAccount.mjs +1 -1
  148. package/out/methods/account/getAccountInfo.mjs +1 -1
  149. package/out/methods/account/getAddress.mjs +1 -1
  150. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  151. package/out/methods/account/getLatestNonce.mjs +1 -1
  152. package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
  153. package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
  154. package/out/methods/initApp/initApp.mjs +1 -1
  155. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  156. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  157. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  158. package/out/methods/network/getEgldLabel.mjs +1 -1
  159. package/out/methods/network/getExplorerAddress.mjs +1 -1
  160. package/out/methods/network/getNetworkConfig.mjs +1 -1
  161. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  162. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
  163. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
  164. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
  165. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
  166. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
  167. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  168. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  169. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  170. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  171. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  172. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  173. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  174. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  175. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  176. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  177. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  178. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  179. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  180. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  181. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  182. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
  183. package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
  184. package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
  185. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  186. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  187. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  188. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  189. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.cjs +1 -1
  190. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.cjs.map +2 -2
  191. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.d.ts +1 -0
  192. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  193. package/out/providers/DappProvider/index.mjs +1 -1
  194. package/out/providers/ProviderFactory.mjs +1 -1
  195. package/out/providers/helpers/accountProvider.mjs +1 -1
  196. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  197. package/out/providers/helpers/restoreProvider.mjs +1 -1
  198. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.cjs +1 -1
  199. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.cjs.map +2 -2
  200. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.d.ts +2 -1
  201. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  202. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.cjs +1 -1
  203. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.cjs.map +3 -3
  204. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.d.ts +2 -1
  205. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  206. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  207. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.cjs +1 -1
  208. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.cjs.map +3 -3
  209. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.d.ts +2 -1
  210. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  211. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  212. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.cjs +1 -1
  213. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.cjs.map +3 -3
  214. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.d.ts +2 -1
  215. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  216. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  217. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.cjs +1 -1
  218. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.cjs.map +2 -2
  219. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.d.ts +2 -1
  220. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  221. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
  222. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
  223. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  224. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
  225. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
  226. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
  227. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
  228. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  229. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  230. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  231. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.cjs +1 -1
  232. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.cjs.map +3 -3
  233. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.d.ts +2 -1
  234. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  235. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  236. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  237. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  238. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.cjs +1 -1
  239. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.cjs.map +3 -3
  240. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.d.ts +2 -1
  241. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  242. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  243. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  244. package/out/providers/strategies/helpers/index.mjs +1 -1
  245. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  246. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  247. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  248. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  249. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs +1 -1
  250. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs.map +3 -3
  251. package/out/providers/strategies/helpers/signTransactions/signTransactions.d.ts +3 -1
  252. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  253. package/out/react/account/useGetAccount.mjs +1 -1
  254. package/out/react/account/useGetAccountInfo.mjs +1 -1
  255. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  256. package/out/react/account/useGetLatestNonce.mjs +1 -1
  257. package/out/react/index.mjs +1 -1
  258. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  259. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  260. package/out/react/store/getReactStore.mjs +1 -1
  261. package/out/react/store/useSelector.mjs +1 -1
  262. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  263. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  264. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  265. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  266. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  267. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  268. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  269. package/out/services/nativeAuth/index.mjs +1 -1
  270. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  271. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  272. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  273. package/out/store/actions/account/accountActions.mjs +1 -1
  274. package/out/store/actions/account/index.mjs +1 -1
  275. package/out/store/actions/cache/cacheActions.mjs +1 -1
  276. package/out/store/actions/cache/index.mjs +1 -1
  277. package/out/store/actions/config/configActions.cjs +1 -1
  278. package/out/store/actions/config/configActions.cjs.map +3 -3
  279. package/out/store/actions/config/configActions.d.ts +1 -0
  280. package/out/store/actions/config/configActions.mjs +1 -1
  281. package/out/store/actions/config/index.mjs +1 -1
  282. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  283. package/out/store/actions/network/index.mjs +1 -1
  284. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  285. package/out/store/actions/network/networkActions.mjs +1 -1
  286. package/out/store/actions/sharedActions/index.mjs +1 -1
  287. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  288. package/out/store/actions/toasts/index.mjs +1 -1
  289. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  290. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  291. package/out/store/actions/ui/index.mjs +1 -1
  292. package/out/store/actions/ui/uiActions.mjs +1 -1
  293. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  294. package/out/store/middleware/index.mjs +1 -1
  295. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  296. package/out/store/storage/index.mjs +1 -1
  297. package/out/store/storage/storageCallback.mjs +1 -1
  298. package/out/store/store.mjs +1 -1
  299. package/out/utils/ComponentFactory.mjs +1 -1
  300. package/out/utils/account/fetchAccount.mjs +1 -1
  301. package/out/utils/account/refreshAccount.mjs +1 -1
  302. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  303. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  304. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.cjs.map +1 -1
  305. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.d.ts +2 -2
  306. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.mjs +1 -1
  307. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
  308. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
  309. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  310. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  311. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  312. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  313. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  314. package/out/utils/visual/switchTheme.mjs +1 -1
  315. package/out/utils/window/getIsInIframe.mjs +1 -1
  316. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  317. package/package.json +1 -1
  318. package/out/__chunks__/chunk-5XSOS5YN.mjs +0 -2
  319. package/out/__chunks__/chunk-635MBRGW.mjs +0 -2
  320. package/out/__chunks__/chunk-66O7QA3I.mjs +0 -2
  321. package/out/__chunks__/chunk-6AERD2V5.mjs +0 -2
  322. package/out/__chunks__/chunk-ASW2NQ6C.mjs +0 -2
  323. package/out/__chunks__/chunk-BVZPCM6G.mjs +0 -2
  324. package/out/__chunks__/chunk-CFWLPHKF.mjs +0 -2
  325. package/out/__chunks__/chunk-EIFX46HX.mjs +0 -2
  326. package/out/__chunks__/chunk-EQ52O73C.mjs +0 -2
  327. package/out/__chunks__/chunk-F2YWL325.mjs +0 -2
  328. package/out/__chunks__/chunk-FSL7QGMG.mjs +0 -2
  329. package/out/__chunks__/chunk-HFY3MGS6.mjs +0 -2
  330. package/out/__chunks__/chunk-HIGA7ZDP.mjs +0 -2
  331. package/out/__chunks__/chunk-HY34GQIC.mjs +0 -2
  332. package/out/__chunks__/chunk-HY34GQIC.mjs.map +0 -7
  333. package/out/__chunks__/chunk-IZPXIZ7K.mjs +0 -2
  334. package/out/__chunks__/chunk-OEFGQHO5.mjs +0 -2
  335. package/out/__chunks__/chunk-OEFGQHO5.mjs.map +0 -7
  336. package/out/__chunks__/chunk-OT634PF6.mjs +0 -2
  337. package/out/__chunks__/chunk-QHN6NRIA.mjs.map +0 -7
  338. package/out/__chunks__/chunk-RTLK66UR.mjs +0 -2
  339. package/out/__chunks__/chunk-WPOSW4KM.mjs +0 -2
  340. package/out/__chunks__/chunk-WXYAGYYV.mjs +0 -2
  341. package/out/__chunks__/chunk-WXYAGYYV.mjs.map +0 -7
  342. package/out/__chunks__/chunk-ZIZJCYTT.mjs +0 -2
  343. /package/out/__chunks__/{chunk-7EZGGGIQ.mjs.map → chunk-2DUOXMZP.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-P3VXVK33.mjs.map → chunk-2LIUW5CF.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-CTIBYRMH.mjs.map → chunk-2SYDJSIO.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-5XSOS5YN.mjs.map → chunk-32Z4H2Q4.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-V7TKRGVU.mjs.map → chunk-3DZPVOPO.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-OOPGEGEC.mjs.map → chunk-3TM6K4Z4.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-MOJWACYA.mjs.map → chunk-43SX7DUF.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-OP2IEVBM.mjs.map → chunk-44AUEOAU.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-MPJUP362.mjs.map → chunk-4CGAWZR6.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-JA27GJYB.mjs.map → chunk-573LAOYN.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-EZMDYBQN.mjs.map → chunk-5PENJRCS.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-HCYLJV62.mjs.map → chunk-6CMARMS2.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-FVEGUUPB.mjs.map → chunk-6DAQAOWP.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-V5RYJVEZ.mjs.map → chunk-6TJZZHFV.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-ZIZJCYTT.mjs.map → chunk-6ZVWYKKI.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-O3RDPZCC.mjs.map → chunk-764JPTJ7.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-RTLK66UR.mjs.map → chunk-7MGK7ZUE.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-Y6OAUXIU.mjs.map → chunk-A4KOSUVU.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-3U35OFEK.mjs.map → chunk-AIKIPJUG.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-NODAYKNL.mjs.map → chunk-AOF7QPPF.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-XT3FTPPC.mjs.map → chunk-AVEWWANG.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-VYVJQXGS.mjs.map → chunk-AXZ3DHTB.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-ASXSNGBB.mjs.map → chunk-B77BJX6Z.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-2FVSB4I6.mjs.map → chunk-BB7POIGL.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-JI5573A3.mjs.map → chunk-BPOXONMJ.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-J4XVM6TB.mjs.map → chunk-C65TZQBZ.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-L2GTIQ4M.mjs.map → chunk-CE4N3GKT.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-RTGDS56O.mjs.map → chunk-COPAYHAQ.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-S5NXWNSY.mjs.map → chunk-CT5LMMAW.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-66O7QA3I.mjs.map → chunk-CZGN3YPT.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-LHLDTVQX.mjs.map → chunk-DCF6BLSL.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-F2YWL325.mjs.map → chunk-DJUPAQRK.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-ASW2NQ6C.mjs.map → chunk-EET35YZW.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-BZ6YK6M7.mjs.map → chunk-EKBFVSFP.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-CCDNY2AY.mjs.map → chunk-GBYZHNPO.mjs.map} +0 -0
  378. /package/out/__chunks__/{chunk-IZPXIZ7K.mjs.map → chunk-GQFB3L2J.mjs.map} +0 -0
  379. /package/out/__chunks__/{chunk-UXCL6NKM.mjs.map → chunk-GWZUTQLT.mjs.map} +0 -0
  380. /package/out/__chunks__/{chunk-ZPRRRKH2.mjs.map → chunk-HXFVUYGK.mjs.map} +0 -0
  381. /package/out/__chunks__/{chunk-ZHKCVM4W.mjs.map → chunk-IEUUVTQ5.mjs.map} +0 -0
  382. /package/out/__chunks__/{chunk-BPPANN5H.mjs.map → chunk-JSYDF4GF.mjs.map} +0 -0
  383. /package/out/__chunks__/{chunk-HJ4B3QID.mjs.map → chunk-K4FRH3YU.mjs.map} +0 -0
  384. /package/out/__chunks__/{chunk-JT4AIBHR.mjs.map → chunk-LABBTN37.mjs.map} +0 -0
  385. /package/out/__chunks__/{chunk-NCUUK7SW.mjs.map → chunk-LSAYT6GA.mjs.map} +0 -0
  386. /package/out/__chunks__/{chunk-XHZWVRMA.mjs.map → chunk-LY5VXESF.mjs.map} +0 -0
  387. /package/out/__chunks__/{chunk-OVROSPMG.mjs.map → chunk-LZKKBLOO.mjs.map} +0 -0
  388. /package/out/__chunks__/{chunk-OT634PF6.mjs.map → chunk-LZQXEMRC.mjs.map} +0 -0
  389. /package/out/__chunks__/{chunk-F4JEWIED.mjs.map → chunk-M3G5E4TL.mjs.map} +0 -0
  390. /package/out/__chunks__/{chunk-XJV7SQ3A.mjs.map → chunk-M5COEJ24.mjs.map} +0 -0
  391. /package/out/__chunks__/{chunk-I3LSEZWV.mjs.map → chunk-MNKQNWZS.mjs.map} +0 -0
  392. /package/out/__chunks__/{chunk-ZQQN3ZGD.mjs.map → chunk-N3J6ROD5.mjs.map} +0 -0
  393. /package/out/__chunks__/{chunk-6AERD2V5.mjs.map → chunk-NJUTBWG5.mjs.map} +0 -0
  394. /package/out/__chunks__/{chunk-635MBRGW.mjs.map → chunk-NTCDPOM4.mjs.map} +0 -0
  395. /package/out/__chunks__/{chunk-PPCVJ6HZ.mjs.map → chunk-NZGZ2C45.mjs.map} +0 -0
  396. /package/out/__chunks__/{chunk-BU2ZPMEQ.mjs.map → chunk-OLXCFQVN.mjs.map} +0 -0
  397. /package/out/__chunks__/{chunk-WPOSW4KM.mjs.map → chunk-ON2ITKZA.mjs.map} +0 -0
  398. /package/out/__chunks__/{chunk-J6EXAKY6.mjs.map → chunk-OXJJPBYT.mjs.map} +0 -0
  399. /package/out/__chunks__/{chunk-HKGUI327.mjs.map → chunk-P3Z2DQ5Y.mjs.map} +0 -0
  400. /package/out/__chunks__/{chunk-JXU7WWWE.mjs.map → chunk-QIXUIO74.mjs.map} +0 -0
  401. /package/out/__chunks__/{chunk-WPZIGJNP.mjs.map → chunk-RVTPQ3R5.mjs.map} +0 -0
  402. /package/out/__chunks__/{chunk-MI2K6RMJ.mjs.map → chunk-S3EO22CE.mjs.map} +0 -0
  403. /package/out/__chunks__/{chunk-UYWQOHGW.mjs.map → chunk-S5DCQEU2.mjs.map} +0 -0
  404. /package/out/__chunks__/{chunk-NHB5C2VT.mjs.map → chunk-T3SGVYSV.mjs.map} +0 -0
  405. /package/out/__chunks__/{chunk-DYCP3KSI.mjs.map → chunk-TDRQ3OLY.mjs.map} +0 -0
  406. /package/out/__chunks__/{chunk-JLLPGNLM.mjs.map → chunk-TZCZXHWQ.mjs.map} +0 -0
  407. /package/out/__chunks__/{chunk-EUUJCC5E.mjs.map → chunk-U3GPFT4V.mjs.map} +0 -0
  408. /package/out/__chunks__/{chunk-7NRHPYRQ.mjs.map → chunk-URNYMHJN.mjs.map} +0 -0
  409. /package/out/__chunks__/{chunk-TZQ37JJD.mjs.map → chunk-USAIPG7X.mjs.map} +0 -0
  410. /package/out/__chunks__/{chunk-RYEM55ZT.mjs.map → chunk-UTSW2MIB.mjs.map} +0 -0
  411. /package/out/__chunks__/{chunk-IAHAAQ4N.mjs.map → chunk-V3VSL4SQ.mjs.map} +0 -0
  412. /package/out/__chunks__/{chunk-5W3EWQIR.mjs.map → chunk-W25UUI6O.mjs.map} +0 -0
  413. /package/out/__chunks__/{chunk-A7F53AUI.mjs.map → chunk-W4GIORRC.mjs.map} +0 -0
  414. /package/out/__chunks__/{chunk-BVZPCM6G.mjs.map → chunk-WGXHIBDE.mjs.map} +0 -0
  415. /package/out/__chunks__/{chunk-FSL7QGMG.mjs.map → chunk-WOMDF37F.mjs.map} +0 -0
  416. /package/out/__chunks__/{chunk-HVWFXP4G.mjs.map → chunk-WRQ5IRXO.mjs.map} +0 -0
  417. /package/out/__chunks__/{chunk-742ROBVD.mjs.map → chunk-WUKB2V3K.mjs.map} +0 -0
  418. /package/out/__chunks__/{chunk-ACY76UCX.mjs.map → chunk-XGALUTQ5.mjs.map} +0 -0
  419. /package/out/__chunks__/{chunk-72UXA2XD.mjs.map → chunk-XVRM5XQM.mjs.map} +0 -0
  420. /package/out/__chunks__/{chunk-HIGA7ZDP.mjs.map → chunk-XVZUH5QS.mjs.map} +0 -0
  421. /package/out/__chunks__/{chunk-TAXGAEX2.mjs.map → chunk-YNJSOBXM.mjs.map} +0 -0
  422. /package/out/__chunks__/{chunk-LBMKLRI7.mjs.map → chunk-YXWMQGAB.mjs.map} +0 -0
  423. /package/out/__chunks__/{chunk-OJVDJHBR.mjs.map → chunk-Z7TITNCM.mjs.map} +0 -0
  424. /package/out/__chunks__/{chunk-HY5BQMSU.mjs.map → chunk-ZKFUF6BU.mjs.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.ts", "../../src/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.ts", "../../src/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.ts", "../../src/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.ts", "../../src/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.ts", "../../src/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.ts", "../../src/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.ts", "../../src/providers/ProviderFactory.ts", "../../src/providers/strategies/helpers/signMessage/signMessage.ts"],
4
+ "sourcesContent": ["import { providerLabels } from 'constants/providerFactory.constants';\nimport { Message } from 'lib/sdkCore';\nimport { getLedgerErrorCodes } from './getLedgerErrorCodes';\nimport { signMessage } from '../../helpers/signMessage/signMessage';\n\nexport async function signLedgerMessage({\n message,\n handleSignMessage\n}: {\n message: Message;\n handleSignMessage: (msg: Message) => Promise<Message>;\n}): Promise<Message> {\n try {\n const signedMessage = await signMessage({\n message,\n handleSignMessage: handleSignMessage,\n providerType: providerLabels.ledger\n });\n return signedMessage;\n } catch (error) {\n const { errorMessage } = getLedgerErrorCodes(error);\n throw errorMessage ? { message: errorMessage } : error;\n }\n}\n", "import { HWProvider } from '@multiversx/sdk-hw-provider';\n\nimport { CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION } from 'constants/transactions.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport { LedgerConnectStateManager } from 'managers/internal/LedgerConnectStateManager/LedgerConnectStateManager';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { SignTransactionsOptionsType } from 'providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { createCustomToast } from 'store/actions/toasts/toastsActions';\nimport { IconNamesEnum } from 'types/enums.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { authenticateLedgerAccount } from './helpers/authenticateLedgerAccount';\nimport { getLedgerProvider } from './helpers/getLedgerProvider';\nimport { initializeLedgerProvider } from './helpers/initializeLedgerProvider';\nimport { signLedgerMessage } from './helpers/signLedgerMessage';\nimport { LedgerConfigType } from './types/ledgerProvider.types';\nimport {\n BaseProviderStrategy,\n LoginOptionsTypes\n} from '../BaseProviderStrategy/BaseProviderStrategy';\nimport { signTransactions } from '../helpers/signTransactions/signTransactions';\n\ntype LedgerProviderStrategyOptionsType = {\n anchor?: HTMLElement;\n shouldInitProvider?: boolean;\n};\n\ntype LedgerProviderStrategyType = LedgerProviderStrategyOptionsType & {\n address?: string;\n};\n\nexport class LedgerProviderStrategy extends BaseProviderStrategy {\n private provider: HWProvider | null = null;\n private config: LedgerConfigType | null = null;\n private readonly options?: LedgerProviderStrategyOptionsType;\n\n constructor({\n address,\n anchor,\n shouldInitProvider\n }: LedgerProviderStrategyType) {\n super(address);\n this.options = { anchor, shouldInitProvider };\n this._login = this.ledgerLogin.bind(this);\n }\n\n async init(): Promise<boolean> {\n try {\n this.initializeAddress();\n await this.initializeProvider();\n } catch {\n return false;\n }\n\n return true;\n }\n\n logout(): Promise<boolean> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.ledger;\n }\n\n getAddress(): Promise<string | undefined> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.getAddress();\n }\n\n setAccount(account: IDAppProviderAccount): void {\n return this.provider?.setAccount(account);\n }\n\n isInitialized(): boolean {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.isInitialized();\n }\n\n private async initializeProvider() {\n await this.initLegderConnectManager(this.options?.anchor);\n const ledgerConnectManager = LedgerConnectStateManager.getInstance();\n\n const { ledgerProvider, ledgerConfig } = await new Promise<\n Awaited<ReturnType<typeof getLedgerProvider>>\n >((resolve, reject) =>\n initializeLedgerProvider({\n manager: ledgerConnectManager,\n resolve,\n reject,\n shouldInitProvider: this.options?.shouldInitProvider\n })\n );\n\n this.config = ledgerConfig;\n this.provider = ledgerProvider;\n }\n\n private readonly ledgerLogin = async (\n options?: LoginOptionsTypes & { addressIndex?: number }\n ): Promise<{ address: string; signature: string }> => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n if (!options || typeof options.addressIndex !== 'number') {\n throw new Error('Missing addressIndex for Ledger login');\n }\n const { address, signature } = await this.provider.login({\n addressIndex: options.addressIndex\n });\n return {\n address,\n signature: signature ?? ''\n };\n };\n\n public override loginOperation = async (options?: LoginOptionsTypes) => {\n if (!this.provider || !this.config) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return await authenticateLedgerAccount({\n options,\n config: this.config,\n provider: this.provider,\n login: this.ledgerLogin.bind(this)\n });\n };\n\n private readonly initLegderConnectManager = async (anchor?: HTMLElement) => {\n const shouldInitiateLogin = !getIsLoggedIn();\n\n if (!shouldInitiateLogin) {\n return;\n }\n\n const ledgerConnectManager = LedgerConnectStateManager.getInstance();\n await ledgerConnectManager.init(anchor);\n };\n\n signTransactions = async (\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n await this.rebuildProvider();\n\n const signedTransactions = await signTransactions({\n transactions,\n handleSign: this.provider.signTransactions.bind(this.provider),\n options\n });\n\n return signedTransactions;\n };\n\n signMessage = async (message: Message): Promise<Message> => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n await this.rebuildProvider();\n\n const signedMessage = await signLedgerMessage({\n message,\n handleSignMessage: this.provider.signMessage.bind(this.provider)\n });\n\n return signedMessage;\n };\n\n /**\n * Makes sure the device is accessible and if not, tries to initialize a new provider\n */\n private readonly rebuildProvider = async () => {\n try {\n await this.provider?.getAddress(); // can communicate with device\n } catch (_err) {\n try {\n const { ledgerProvider } = await getLedgerProvider({\n shouldInitProvider: true\n });\n this.provider = ledgerProvider;\n } catch (error) {\n createCustomToast({\n toastId: 'ledger-provider-rebuild-error',\n duration: CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n icon: IconNamesEnum.close,\n iconClassName: 'warning',\n message: 'Unlock your device & open the MultiversX App',\n title: 'Ledger unavailable'\n });\n throw error;\n }\n }\n };\n}\n", "import { DappProvider } from 'providers/DappProvider';\nimport {\n getAccountProvider,\n setAccountProvider\n} from 'providers/helpers/accountProvider';\nimport { LedgerProviderStrategy } from 'providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { isLoggedInSelector } from 'store/selectors/accountSelectors';\nimport { loginInfoSelector } from 'store/selectors/loginInfoSelectors';\nimport { isSidePanelOpenSelector } from 'store/selectors/uiSelectors';\nimport { getState, getStore } from 'store/store';\nimport { IconNamesEnum } from 'types/enums.types';\nimport { ToastManager } from '../../ToastManager';\n\nconst LEDGER_IDLE_STATE_CHECK_INTERVAL = 30_000;\nconst LEDGER_IDLE_STATE_RECONNECT_INTERVAL = 5_000;\nconst RECONNECT_SUCCESS_DURATION = 3000;\n\nexport class LedgerIdleStateManager {\n private static instance: LedgerIdleStateManager;\n private store = getStore();\n private connectionCheckInterval: ReturnType<typeof setInterval> | null = null;\n private recreateProviderInterval: ReturnType<typeof setInterval> | null =\n null;\n\n public static getInstance(): LedgerIdleStateManager {\n if (!LedgerIdleStateManager.instance) {\n LedgerIdleStateManager.instance = new LedgerIdleStateManager();\n }\n return LedgerIdleStateManager.instance;\n }\n\n private constructor() {}\n\n public init = async () => {\n this.startCheckConnectionLoop();\n };\n\n private readonly shouldCheckConnection = (): boolean => {\n const state = this.store.getState();\n const { providerType } = loginInfoSelector(state);\n const isLoggedIn = isLoggedInSelector(state);\n return Boolean(providerType === ProviderTypeEnum.ledger && isLoggedIn);\n };\n\n private readonly startCheckConnectionLoop = () => {\n if (this.connectionCheckInterval) {\n return;\n }\n\n this.connectionCheckInterval = setInterval(async () => {\n const isSigningProcess = isSidePanelOpenSelector(getState());\n\n if (!this.shouldCheckConnection() || isSigningProcess) {\n return;\n }\n\n try {\n const ledgerProvider = getAccountProvider().getProvider();\n await ledgerProvider.getAddress();\n } catch (_error) {\n ToastManager.getInstance().createCustomToast({\n toastId: 'ledger-provider-idle-warning',\n icon: IconNamesEnum.close,\n iconClassName: 'warning',\n message: 'Unlock your device to continue signing transactions',\n title: 'Ledger disconnected'\n });\n this.reset();\n if (this.recreateProviderInterval) {\n return;\n }\n this.recreateProviderInterval = setInterval(\n this.reconnectProvider,\n LEDGER_IDLE_STATE_RECONNECT_INTERVAL\n );\n }\n }, LEDGER_IDLE_STATE_CHECK_INTERVAL);\n };\n\n private readonly reconnectProvider = async () => {\n if (!this.shouldCheckConnection()) {\n return;\n }\n\n try {\n const createdProvider = new LedgerProviderStrategy({\n shouldInitProvider: true\n });\n\n await createdProvider.init();\n\n const dappProvider = new DappProvider(createdProvider);\n createdProvider.getType = () => ProviderTypeEnum.ledger;\n setAccountProvider(dappProvider);\n\n this.reset();\n clearInterval(this.recreateProviderInterval ?? 0);\n this.recreateProviderInterval = null;\n\n ToastManager.getInstance().createCustomToast({\n toastId: 'ledger-provider-idle-warning',\n duration: RECONNECT_SUCCESS_DURATION,\n icon: IconNamesEnum.check,\n iconClassName: 'success',\n message: 'Your device is ready to sign transactions',\n title: 'Ledger reconnected'\n });\n this.startCheckConnectionLoop();\n } catch (_err) {\n console.log('Unable to reconnect to Ledger');\n }\n };\n\n public reset = () => {\n clearInterval(this.connectionCheckInterval ?? 0);\n this.connectionCheckInterval = null;\n };\n}\n", "import { providerLabels } from 'constants/providerFactory.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider';\nimport { SignTransactionsOptionsType } from 'providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { networkSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';\nimport { signMessage } from '../helpers/signMessage/signMessage';\n\ntype CrossWindowProviderProps = {\n address?: string;\n walletAddress?: string;\n};\n\nexport class CrossWindowProviderStrategy extends BaseProviderStrategy {\n private readonly provider: CrossWindowProvider;\n private readonly walletAddress?: string;\n\n constructor(config?: CrossWindowProviderProps) {\n super(config?.address);\n this.walletAddress = config?.walletAddress;\n this.provider = CrossWindowProvider.getInstance();\n this._login = this.provider.login.bind(this.provider);\n }\n\n async init(): Promise<boolean> {\n this.initializeAddress();\n return this.initializeProvider();\n }\n\n private async initializeProvider() {\n const network = networkSelector(getState());\n\n const isProviderInitialized = await this.provider.init();\n\n this.provider.setWalletUrl(this.walletAddress ?? network.walletAddress);\n\n if (this.address) {\n this.provider.setAddress(this.address);\n }\n\n return isProviderInitialized;\n }\n\n logout(): Promise<boolean> {\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.crossWindow;\n }\n\n getAddress(): Promise<string | undefined> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.getAddress();\n }\n\n setAccount(account: IDAppProviderAccount): void {\n return this.provider.setAccount(account);\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n cancelAction = async () => {\n this.provider.cancelAction();\n };\n\n signTransactions = async (\n transactions: Transaction[],\n _options?: SignTransactionsOptionsType\n ) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const { onClose, manager } = await this.initSignState();\n\n try {\n const signedTransactions: Transaction[] =\n (await this.provider.signTransactions(transactions)) ?? [];\n\n return signedTransactions;\n } catch (error) {\n await onClose({ shouldCancelAction: true });\n\n throw error;\n } finally {\n manager?.closeUI();\n }\n };\n\n signMessage = async (message: Message) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const signedMessage = await signMessage({\n message,\n handleSignMessage: this.provider.signMessage.bind(this.provider),\n cancelAction: this.cancelAction,\n providerType: providerLabels.crossWindow\n });\n\n return signedMessage;\n };\n}\n", "import { ExtensionProvider } from '@multiversx/sdk-extension-provider/out/extensionProvider';\nimport { providerLabels } from 'constants/providerFactory.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport { SignTransactionsOptionsType } from 'providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';\nimport { signMessage } from '../helpers/signMessage/signMessage';\n\nexport class ExtensionProviderStrategy extends BaseProviderStrategy {\n private readonly provider: ExtensionProvider;\n\n constructor(address?: string) {\n super(address);\n this.provider = ExtensionProvider.getInstance();\n this._login = this.provider.login.bind(this.provider);\n }\n\n async init(): Promise<boolean> {\n this.initializeAddress();\n return this.initializeProvider();\n }\n\n private async initializeProvider() {\n const initialized = await this.provider.init();\n\n if (this.address) {\n this.setAccount({ address: this.address });\n }\n\n return initialized;\n }\n\n getAddress(): Promise<string | undefined> {\n return this.provider.getAddress();\n }\n\n setAccount(account: IDAppProviderAccount): void {\n return this.provider.setAccount(account);\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n logout(): Promise<boolean> {\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.extension;\n }\n\n cancelAction = async () => {\n this.provider.cancelAction();\n };\n\n signTransactions = async (\n transactions: Transaction[],\n _options?: SignTransactionsOptionsType\n ) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const { manager, onClose } = await this.initSignState();\n\n try {\n const signedTransactions: Transaction[] =\n (await this.provider.signTransactions(transactions)) ?? [];\n\n return signedTransactions;\n } catch (error) {\n await onClose({ shouldCancelAction: false });\n throw error;\n } finally {\n manager?.closeUI();\n }\n };\n\n signMessage = async (message: Message) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const signedMessage = await signMessage({\n message,\n handleSignMessage: this.provider.signMessage.bind(this.provider),\n cancelAction: this.cancelAction,\n providerType: providerLabels.extension\n });\n\n return signedMessage;\n };\n}\n", "import { providerLabels } from 'constants/providerFactory.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport { IframeProvider } from 'lib/sdkWebWalletIframeProvider';\nimport { SignTransactionsOptionsType } from 'providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { networkSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { IframeProviderType } from './types';\nimport { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';\nimport { signMessage } from '../helpers/signMessage/signMessage';\nimport { signTransactions } from '../helpers/signTransactions/signTransactions';\n\nexport class IframeProviderStrategy extends BaseProviderStrategy {\n private readonly provider: IframeProvider;\n private walletUrl: string;\n\n constructor({ address, walletUrl }: IframeProviderType = {}) {\n super(address);\n this.walletUrl = walletUrl ?? '';\n this.provider = IframeProvider.getInstance();\n this._login = this.provider.login.bind(this.provider);\n }\n\n init(): Promise<boolean> {\n this.initializeAddress();\n this.initializeWalletUrl();\n return this.initializeProvider();\n }\n\n private initializeWalletUrl() {\n if (this.walletUrl) {\n return;\n }\n\n const network = networkSelector(getState());\n\n if (!network.iframeWalletAddress) {\n throw new Error('Invalid walletUrl');\n }\n\n this.walletUrl = network.iframeWalletAddress;\n }\n\n private async initializeProvider() {\n await this.provider.init();\n\n if (this.address) {\n this.setAccount({ address: this.address });\n }\n\n this.provider.setWalletUrl(this.walletUrl);\n\n return true;\n }\n\n logout(): Promise<boolean> {\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.metamask;\n }\n\n getAddress(): Promise<string | undefined> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.getAddress();\n }\n\n setAccount(account: IDAppProviderAccount): void {\n this.provider.setAccount(account);\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n cancelAction = async () => {\n this.provider.cancelAction();\n };\n\n signTransactions = async (\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const { manager, onClose } = await this.initSignState();\n\n try {\n const signedTransactions = await signTransactions({\n transactions,\n handleSign: this.provider.signTransactions.bind(this.provider),\n options\n });\n\n return signedTransactions;\n } catch (error) {\n await onClose({ shouldCancelAction: true });\n throw error;\n } finally {\n manager?.closeUI();\n }\n };\n\n signMessage = async (message: Message) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const signedMessage = await signMessage({\n message,\n handleSignMessage: this.provider.signMessage.bind(this.provider),\n cancelAction: this.cancelAction,\n providerType: providerLabels[ProviderTypeEnum.metamask]\n });\n\n return signedMessage;\n };\n}\n", "import {\n SessionEventTypes,\n SessionTypes,\n OptionalOperation\n} from '@multiversx/sdk-wallet-connect-provider/out';\nimport { providerLabels } from 'constants/providerFactory.constants';\nimport { fallbackWalletConnectConfigurations } from 'constants/walletConnect.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport { WalletConnectStateManager } from 'managers/internal/WalletConnectStateManager/WalletConnectStateManager';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { SignTransactionsOptionsType } from 'providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { logoutAction } from 'store/actions/sharedActions/sharedActions';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { chainIdSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport {\n WalletConnectOptionalMethodsEnum,\n WalletConnectV2Provider\n} from 'utils/walletconnect/__sdkWalletconnectProvider';\nimport { WalletConnectV2Error, WalletConnectConfig } from './types';\nimport { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';\nimport { signMessage } from '../helpers/signMessage/signMessage';\nimport { guardTransactions } from '../helpers/signTransactions/helpers/guardTransactions/guardTransactions';\n\nconst dappMethods: string[] = [\n WalletConnectOptionalMethodsEnum.CANCEL_ACTION,\n WalletConnectOptionalMethodsEnum.SIGN_LOGIN_TOKEN\n];\n\ntype WalletConnectProviderStrategyConfigType = WalletConnectConfig & {\n anchor?: HTMLElement;\n};\n\nexport class WalletConnectProviderStrategy extends BaseProviderStrategy {\n private provider: WalletConnectV2Provider | null = null;\n private readonly config: WalletConnectProviderStrategyConfigType;\n private methods: string[] = [];\n private _approval: (() => Promise<SessionTypes.Struct>) | null = null;\n protected cancelActionAbortController: AbortController | null = null;\n\n constructor(config: WalletConnectProviderStrategyConfigType) {\n super();\n this.config = config;\n }\n\n async init(): Promise<boolean> {\n try {\n if (this.provider?.isInitialized()) {\n return true;\n }\n\n await this.initializeProvider();\n } catch {\n return false;\n }\n\n return true;\n }\n\n logout(): Promise<boolean> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.walletConnect;\n }\n\n getAddress(): Promise<string | undefined> {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return Promise.resolve(this.provider.getAddress());\n }\n\n setAccount(account: IDAppProviderAccount): void {\n return this.provider?.setAccount(account);\n }\n\n isInitialized(): boolean {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return this.provider.isInitialized();\n }\n\n private async initializeProvider() {\n await this.initWalletConnectManager();\n\n if (!this.config) {\n throw new Error(WalletConnectV2Error.invalidConfig);\n }\n\n const { walletConnectProvider, dappMethods: dAppMethods } =\n await this.createWalletConnectProvider(this.config);\n\n this.provider = walletConnectProvider;\n this.methods = dAppMethods;\n\n const { uri = '', approval } = await this.provider.connect({\n methods: this.methods\n });\n\n const walletConnectDeepLink =\n this.config.walletConnectDeepLink ??\n fallbackWalletConnectConfigurations.walletConnectDeepLink;\n\n this._approval = approval;\n const walletConnectManager = WalletConnectStateManager.getInstance();\n walletConnectManager.updateData({\n wcURI: uri,\n walletConnectDeepLink: `${walletConnectDeepLink}?wallet-connect=${encodeURIComponent(uri)}`\n });\n }\n\n private async initWalletConnectManager() {\n const shouldInitiateLogin = !getIsLoggedIn();\n\n if (!shouldInitiateLogin) {\n return;\n }\n\n const walletConnectManager = WalletConnectStateManager.getInstance();\n await walletConnectManager.init(this.config?.anchor);\n }\n\n private async createWalletConnectProvider(config: WalletConnectConfig) {\n const isLoggedIn = getIsLoggedIn();\n const chainId = chainIdSelector(getState());\n const nativeAuthConfig = nativeAuthConfigSelector(getState());\n\n if (nativeAuthConfig) {\n dappMethods.push(WalletConnectOptionalMethodsEnum.SIGN_NATIVE_AUTH_TOKEN);\n }\n\n if (!config?.walletConnectV2ProjectId) {\n throw new Error(WalletConnectV2Error.invalidConfig);\n }\n\n const handleOnLogin = () => {};\n\n const handleOnLogout = () => {\n logoutAction();\n };\n\n const handleOnEvent = (_event: SessionEventTypes['event']) => {};\n\n const providerHandlers = {\n onClientLogin: handleOnLogin,\n onClientLogout: handleOnLogout,\n onClientEvent: handleOnEvent\n };\n\n try {\n const {\n walletConnectV2ProjectId,\n walletConnectV2Options = {},\n walletConnectV2RelayAddress = ''\n } = config;\n const walletConnectProvider = new WalletConnectV2Provider(\n providerHandlers,\n chainId,\n walletConnectV2RelayAddress,\n walletConnectV2ProjectId,\n walletConnectV2Options\n );\n\n await walletConnectProvider.init();\n\n return { walletConnectProvider, dappMethods };\n } catch (err) {\n console.error(WalletConnectV2Error.connectError, err);\n\n if (isLoggedIn) {\n await this.logout();\n }\n\n throw err;\n }\n }\n\n async login(options?: { token?: string }): Promise<{\n address: string;\n signature: string;\n }> {\n if (!this.provider) {\n throw new Error(\n 'Provider is not initialized. Call createProvider first.'\n );\n }\n\n const reconnect = async (): Promise<{\n address: string;\n signature: string;\n }> => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n await this.provider.init();\n const walletConnectManager = WalletConnectStateManager.getInstance();\n\n const { uri = '', approval: wcApproval } = await this.provider.connect({\n methods: this.methods\n });\n\n const walletConnectDeepLink =\n this.config.walletConnectDeepLink ??\n fallbackWalletConnectConfigurations.walletConnectDeepLink;\n\n walletConnectManager.updateData({\n wcURI: uri,\n walletConnectDeepLink: `${walletConnectDeepLink}?wallet-connect=${encodeURIComponent(uri)}`\n });\n\n const providerInfo = await this.provider.login({\n approval: wcApproval,\n token: options?.token\n });\n\n const { address = '', signature = '' } = providerInfo ?? {};\n\n walletConnectManager.handleClose({ isLoginFinished: Boolean(address) });\n return { address, signature };\n } catch {\n return await reconnect();\n }\n };\n\n if (!this._approval) {\n throw new Error('Approval or login is not initialized');\n }\n\n try {\n const providerData = await this.provider.login({\n approval: this._approval.bind(this),\n token: options?.token\n });\n\n const { address = '', signature = '' } = providerData ?? {};\n\n const walletConnectManager = WalletConnectStateManager.getInstance();\n walletConnectManager.handleClose({ isLoginFinished: Boolean(address) });\n return { address, signature };\n } catch (error) {\n console.error(WalletConnectV2Error.userRejected, error);\n return await reconnect();\n }\n }\n\n signTransactions = async (\n transactions: Transaction[],\n _options?: SignTransactionsOptionsType\n ) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const { manager, onClose } = await this.initSignState();\n\n this.cancelActionAbortController = new AbortController();\n const signal = this.cancelActionAbortController.signal;\n\n try {\n const abortPromise = new Promise<never>((_, reject) => {\n signal.addEventListener('abort', () => {\n reject(new Error('cancelled by user'));\n });\n });\n\n const signedTransactions: Transaction[] = await Promise.race([\n this.provider.signTransactions(transactions),\n abortPromise\n ]);\n\n const optionallyGuardedTransactions =\n await guardTransactions(signedTransactions);\n\n return optionallyGuardedTransactions;\n } catch (error) {\n await onClose({ shouldCancelAction: true });\n throw error;\n } finally {\n manager?.closeUI();\n }\n };\n\n cancelAction = async () => {\n this.sendCustomRequest({\n method: WalletConnectOptionalMethodsEnum.CANCEL_ACTION,\n action: OptionalOperation.CANCEL_ACTION\n });\n\n this.cancelActionAbortController?.abort();\n };\n\n signMessage = async (message: Message) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n this.cancelActionAbortController = new AbortController();\n const signal = this.cancelActionAbortController.signal;\n\n const abortPromise = new Promise<never>((_, reject) => {\n signal.addEventListener('abort', () => {\n reject(new Error('cancelled by user'));\n });\n });\n\n const signedMessage = await Promise.race([\n signMessage({\n message,\n handleSignMessage: this.provider.signMessage.bind(this.provider),\n cancelAction: this.cancelAction,\n providerType: providerLabels.extension\n }),\n abortPromise\n ]);\n\n return signedMessage;\n };\n\n private async sendCustomRequest({\n action,\n method\n }: {\n action: OptionalOperation;\n method: WalletConnectOptionalMethodsEnum;\n }) {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n await this.provider.sendCustomRequest?.({\n request: {\n method,\n params: { action }\n }\n });\n } catch (error) {\n console.error(WalletConnectV2Error.actionError, error);\n }\n }\n}\n", "import { PROVIDER_SEARCH_PARAM } from 'constants/providerFactory.constants';\nimport { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider';\nimport { LedgerIdleStateManager } from 'managers/internal/LedgerIdleStateManager/LedgerIdleStateManager';\nimport { getAddress } from 'methods/account/getAddress';\nimport { CrossWindowProviderStrategy } from 'providers/strategies/CrossWindowProviderStrategy';\nimport { ExtensionProviderStrategy } from 'providers/strategies/ExtensionProviderStrategy';\nimport { IframeProviderStrategy } from 'providers/strategies/IframeProviderStrategy';\nimport { LedgerProviderStrategy } from 'providers/strategies/LedgerProviderStrategy';\nimport {\n WalletConnectProviderStrategy,\n WalletConnectV2Error\n} from 'providers/strategies/WalletConnectProviderStrategy';\nimport { setProviderType } from 'store/actions/loginInfo/loginInfoActions';\nimport { walletConnectConfigSelector } from 'store/selectors/configSelectors';\nimport { networkSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { DappProvider } from './DappProvider/DappProvider';\nimport {\n getAccountProvider,\n setAccountProvider\n} from './helpers/accountProvider';\nimport { clearInitiatedLogins } from './helpers/clearInitiatedLogins';\nimport { WebviewProviderStrategy } from './strategies/WebviewProviderStrategy';\nimport {\n ICustomProvider,\n IProvider,\n IProviderFactory,\n ProviderTypeEnum\n} from './types/providerFactory.types';\n\nexport class ProviderFactory {\n private static _customProviders: ICustomProvider[] = [];\n\n public static set customProviders(providers: ICustomProvider[]) {\n this._customProviders = providers;\n }\n\n public static get customProviders() {\n return this._customProviders;\n }\n\n public static async create({\n type,\n anchor\n }: IProviderFactory): Promise<DappProvider> {\n let createdProvider: IProvider | null = null;\n\n switch (type) {\n case ProviderTypeEnum.extension: {\n createdProvider = new ExtensionProviderStrategy();\n\n break;\n }\n\n case ProviderTypeEnum.crossWindow: {\n createdProvider = new CrossWindowProviderStrategy();\n\n break;\n }\n\n case ProviderTypeEnum.ledger: {\n createdProvider = new LedgerProviderStrategy({ anchor });\n\n const ledgerIdleStateManager = LedgerIdleStateManager.getInstance();\n await ledgerIdleStateManager.init();\n\n break;\n }\n\n case ProviderTypeEnum.metamask: {\n createdProvider = new IframeProviderStrategy();\n\n break;\n }\n\n case ProviderTypeEnum.passkey: {\n const network = networkSelector(getState());\n\n createdProvider = new CrossWindowProviderStrategy({\n walletAddress: `${network.walletAddress}?${PROVIDER_SEARCH_PARAM}=${ProviderTypeEnum.passkey}`\n });\n\n break;\n }\n\n case ProviderTypeEnum.walletConnect: {\n const walletConnectConfig = walletConnectConfigSelector(getState());\n\n if (!walletConnectConfig?.walletConnectV2ProjectId) {\n throw new Error(WalletConnectV2Error.invalidConfig);\n }\n\n createdProvider = new WalletConnectProviderStrategy({\n anchor,\n ...walletConnectConfig\n });\n\n break;\n }\n case ProviderTypeEnum.webview: {\n createdProvider = new WebviewProviderStrategy();\n break;\n }\n\n default: {\n const address = getAddress();\n\n for (const customProvider of this._customProviders) {\n if (customProvider.type === type) {\n createdProvider = await customProvider.constructor({\n address,\n anchor\n });\n }\n }\n break;\n }\n }\n\n if (!createdProvider) {\n throw new Error('Unable to create provider');\n }\n\n await createdProvider.init();\n\n const dappProvider = new DappProvider(createdProvider);\n setAccountProvider(dappProvider);\n\n const shouldClearInitiatedLogins =\n 'provider' in createdProvider &&\n createdProvider.provider instanceof CrossWindowProvider;\n\n // Clear initiated logins and skip the login method if it's crossWindow or metamask\n clearInitiatedLogins(\n shouldClearInitiatedLogins\n ? { skipLoginMethod: ProviderTypeEnum.crossWindow }\n : null\n );\n\n return dappProvider;\n }\n\n public static async destroy() {\n const provider = getAccountProvider();\n provider.cancelLogin();\n setAccountProvider(null);\n setProviderType(ProviderTypeEnum.none);\n }\n}\n", "import { providerLabels } from 'constants/providerFactory.constants';\nimport { Message } from 'lib/sdkCore';\nimport { PendingTransactionsEventsEnum } from 'managers/internal/PendingTransactionsStateManager/types/pendingTransactions.types';\nimport { ProviderFactory } from 'providers/ProviderFactory';\nimport {\n ProviderType,\n ProviderTypeEnum,\n ICustomProvider\n} from 'providers/types/providerFactory.types';\nimport { setIsSidePanelOpen } from 'store/actions/ui/uiActions';\nimport { providerSettingsSelector } from 'store/selectors/configSelectors';\nimport { getState } from 'store/store';\nimport { SigningWarningsEnum } from 'types/enums.types';\nimport { getPendingTransactionsHandlers } from '../getPendingTransactionsHandlers';\n\ntype SignMessageWithModalPropsType<T> = {\n message: Message;\n handleSignMessage: (message: Message) => Promise<Message>;\n cancelAction?: () => Promise<T> | undefined;\n providerType: string;\n};\n\nconst isProviderType = (\n allProviders: ICustomProvider[],\n type: string\n): type is ProviderType =>\n allProviders.some((provider) => provider.type === type);\n\nexport async function signMessage<T>({\n message,\n handleSignMessage,\n cancelAction,\n providerType\n}: SignMessageWithModalPropsType<T>): Promise<Message> {\n const providerConfig = providerSettingsSelector(getState());\n\n if (providerConfig?.isSigningUiEnabled === false) {\n // Mark signing as in progress so idle state manager doesn't interfere\n setIsSidePanelOpen(true);\n\n try {\n const signedMessage = await handleSignMessage(message);\n return signedMessage;\n } finally {\n setIsSidePanelOpen(false);\n }\n }\n\n const signedMsg = await new Promise<Awaited<Message>>(\n async (resolve, reject) => {\n const { manager, onClose } = await getPendingTransactionsHandlers({\n cancelAction\n });\n\n const allProviders = Object.values(ProviderFactory.customProviders);\n const allCustomProviderLabels = allProviders.reduce(\n (acc, provider) => {\n acc[provider.type] = provider.name;\n return acc;\n },\n {} as Record<ProviderType, string>\n );\n\n const allProviderLabels = {\n ...providerLabels,\n ...allCustomProviderLabels\n };\n\n const handleClose = async () => {\n await onClose({ shouldCancelAction: true });\n reject({ message: SigningWarningsEnum.cancelled });\n };\n\n manager.subscribeToEventBus(\n PendingTransactionsEventsEnum.CLOSE,\n handleClose\n );\n\n const providerKey = isProviderType(allProviders, providerType)\n ? providerType\n : ProviderTypeEnum.none;\n\n manager.updateData({\n name: allProviderLabels[providerKey],\n type: providerKey\n });\n\n try {\n const signedMessage = await handleSignMessage(message);\n resolve(signedMessage);\n } catch (err) {\n await onClose({ shouldCancelAction: true });\n reject(err);\n } finally {\n manager.closeUI();\n }\n }\n );\n return signedMsg;\n}\n"],
5
+ "mappings": "42CAKA,eAAsBA,GAAkB,CACtC,QAAAC,EACA,kBAAAC,CACF,EAGqB,CACnB,GAAI,CAMF,OALsB,MAAMC,EAAY,CACtC,QAAAF,EACA,kBAAmBC,EACnB,aAAcE,EAAe,MAC/B,CAAC,CAEH,OAASC,EAAO,CACd,GAAM,CAAE,aAAAC,CAAa,EAAIC,GAAoBF,CAAK,EAClD,MAAMC,EAAe,CAAE,QAASA,CAAa,EAAID,CACnD,CACF,CCYO,IAAMG,EAAN,cAAqCC,CAAqB,CAK/D,YAAY,CACV,QAAAC,EACA,OAAAC,EACA,mBAAAC,CACF,EAA+B,CAC7B,MAAMF,CAAO,EATf,KAAQ,SAA8B,KACtC,KAAQ,OAAkC,KA2E1C,KAA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iB,CACrBC,EACAC,IAEAD,EAAa,KAAME,GAAaA,EAAS,OAASD,CAAI,EAExD,eAAsBE,EAAe,CACnC,QAAAC,EACA,kBAAAC,EACA,aAAAC,EACA,aAAAC,CACF,EAAuD,CAGrD,GAFuBC,GAAyBC,EAAS,CAAC,GAEtC,qBAAuB,GAAO,CAEhDC,EAAmB,EAAI,EAEvB,GAAI,CAEF,OADsB,MAAML,EAAkBD,CAAO,CAEvD,QAAE,CACAM,EAAmB,EAAK,CAC1B,CACF,CAoDA,OAlDkB,MAAM,IAAI,QAC1B,MAAOC,EAASC,IAAW,CACzB,GAAM,CAAE,QAAAC,EAAS,QAAAC,CAAQ,EAAI,MAAMC,GAA+B,CAChE,aAAAT,CACF,CAAC,EAEKN,EAAe,OAAO,OAAOgB,EAAgB,eAAe,EAC5DC,EAA0BjB,EAAa,OAC3C,CAACkB,EAAKhB,KACJgB,EAAIhB,EAAS,IAAI,EAAIA,EAAS,KACvBgB,GAET,CAAC,CACH,EAEMC,EAAoB,CACxB,GAAGC,EACH,GAAGH,CACL,EAEMI,EAAc,SAAY,CAC9B,MAAMP,EAAQ,CAAE,mBAAoB,EAAK,CAAC,EAC1CF,EAAO,CAAE,0BAAuC,CAAC,CACnD,EAEAC,EAAQ,iDAENQ,CACF,EAEA,IAAMC,EAAcvB,GAAeC,EAAcO,CAAY,EACzDA,EACAgB,EAAiB,KAErBV,EAAQ,WAAW,CACjB,KAAMM,EAAkBG,CAAW,EACnC,KAAMA,CACR,CAAC,EAED,GAAI,CACF,IAAME,EAAgB,MAAMnB,EAAkBD,CAAO,EACrDO,EAAQa,CAAa,CACvB,OAASC,EAAK,CACZ,MAAMX,EAAQ,CAAE,mBAAoB,EAAK,CAAC,EAC1CF,EAAOa,CAAG,CACZ,QAAE,CACAZ,EAAQ,QAAQ,CAClB,CACF,CACF,CAEF",
6
+ "names": ["signLedgerMessage", "message", "handleSignMessage", "signMessage", "providerLabels", "error", "errorMessage", "getLedgerErrorCodes", "LedgerProviderStrategy", "BaseProviderStrategy", "address", "anchor", "shouldInitProvider", "options", "signature", "authenticateLedgerAccount", "getIsLoggedIn", "LedgerConnectStateManager", "transactions", "signTransactions", "message", "signLedgerMessage", "ledgerProvider", "getLedgerProvider", "error", "createCustomToast", "ProviderTypeEnum", "account", "ledgerConnectManager", "ledgerConfig", "resolve", "reject", "initializeLedgerProvider", "LEDGER_IDLE_STATE_CHECK_INTERVAL", "LEDGER_IDLE_STATE_RECONNECT_INTERVAL", "RECONNECT_SUCCESS_DURATION", "LedgerIdleStateManager", "_LedgerIdleStateManager", "getStore", "state", "providerType", "loginInfoSelector", "isLoggedIn", "isLoggedInSelector", "ProviderTypeEnum", "isSigningProcess", "isSidePanelOpenSelector", "getState", "getAccountProvider", "ToastManager", "createdProvider", "LedgerProviderStrategy", "dappProvider", "DappProvider", "setAccountProvider", "CrossWindowProviderStrategy", "BaseProviderStrategy", "config", "transactions", "_options", "onClose", "manager", "error", "message", "signMessage", "providerLabels", "CrossWindowProvider", "network", "networkSelector", "getState", "isProviderInitialized", "ProviderTypeEnum", "account", "ExtensionProvider", "ExtensionProviderStrategy", "BaseProviderStrategy", "address", "transactions", "_options", "manager", "onClose", "error", "message", "signMessage", "providerLabels", "ExtensionProvider", "initialized", "account", "ProviderTypeEnum", "IframeProviderStrategy", "BaseProviderStrategy", "address", "walletUrl", "transactions", "options", "manager", "onClose", "signTransactions", "error", "message", "signMessage", "providerLabels", "ProviderTypeEnum", "IframeProvider", "network", "networkSelector", "getState", "account", "OptionalOperation", "dappMethods", "WalletConnectOptionalMethodsEnum", "WalletConnectProviderStrategy", "BaseProviderStrategy", "config", "transactions", "_options", "manager", "onClose", "signal", "abortPromise", "_", "reject", "signedTransactions", "guardTransactions", "error", "OptionalOperation", "message", "signMessage", "providerLabels", "ProviderTypeEnum", "account", "walletConnectProvider", "dAppMethods", "uri", "approval", "walletConnectDeepLink", "fallbackWalletConnectConfigurations", "WalletConnectStateManager", "getIsLoggedIn", "isLoggedIn", "chainId", "chainIdSelector", "getState", "nativeAuthConfigSelector", "providerHandlers", "logoutAction", "_event", "walletConnectV2ProjectId", "walletConnectV2Options", "walletConnectV2RelayAddress", "WalletConnectV2Provider", "err", "options", "reconnect", "walletConnectManager", "wcApproval", "providerInfo", "address", "signature", "providerData", "action", "method", "ProviderFactory", "providers", "type", "anchor", "createdProvider", "ProviderTypeEnum", "ExtensionProviderStrategy", "CrossWindowProviderStrategy", "LedgerProviderStrategy", "LedgerIdleStateManager", "IframeProviderStrategy", "network", "networkSelector", "getState", "PROVIDER_SEARCH_PARAM", "walletConnectConfig", "walletConnectConfigSelector", "WalletConnectProviderStrategy", "WebviewProviderStrategy", "address", "getAddress", "customProvider", "dappProvider", "DappProvider", "setAccountProvider", "shouldClearInitiatedLogins", "CrossWindowProvider", "clearInitiatedLogins", "getAccountProvider", "setProviderType", "isProviderType", "allProviders", "type", "provider", "signMessage", "message", "handleSignMessage", "cancelAction", "providerType", "providerSettingsSelector", "getState", "setIsSidePanelOpen", "resolve", "reject", "manager", "onClose", "getPendingTransactionsHandlers", "ProviderFactory", "allCustomProviderLabels", "acc", "allProviderLabels", "providerLabels", "handleClose", "providerKey", "ProviderTypeEnum", "signedMessage", "err"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-HIGA7ZDP.mjs";import{f as e,g as s}from"./chunk-DA76AK4I.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
- //# sourceMappingURL=chunk-TAXGAEX2.mjs.map
1
+ import{a as o}from"./chunk-XVZUH5QS.mjs";import{f as e,g as s}from"./chunk-DA76AK4I.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
+ //# sourceMappingURL=chunk-YNJSOBXM.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as Z}from"./chunk-EKBFVSFP.mjs";import{a as Q}from"./chunk-6UZHM5LW.mjs";import{c as W}from"./chunk-MNKQNWZS.mjs";import{a as rt}from"./chunk-P3Z2DQ5Y.mjs";import{a as tt}from"./chunk-DJUPAQRK.mjs";import{a as et}from"./chunk-IEUUVTQ5.mjs";import{a as nt}from"./chunk-AIKIPJUG.mjs";import{a as ot}from"./chunk-ABBDCZHP.mjs";import{a as mt}from"./chunk-4ODPAHHA.mjs";import{a as at}from"./chunk-QIXUIO74.mjs";import{a as st}from"./chunk-NTCDPOM4.mjs";import{a as ut}from"./chunk-YNJSOBXM.mjs";import{a as M}from"./chunk-COPAYHAQ.mjs";import{a as ct}from"./chunk-AVEWWANG.mjs";import{b as A}from"./chunk-YXWMQGAB.mjs";import{c as O}from"./chunk-CT5LMMAW.mjs";import{a as d}from"./chunk-32Z4H2Q4.mjs";import{a as J}from"./chunk-XVZUH5QS.mjs";import{a as w}from"./chunk-6TJZZHFV.mjs";import{a as P,f as X}from"./chunk-2SYDJSIO.mjs";import{b as it}from"./chunk-DCF6BLSL.mjs";import{b as k}from"./chunk-LABBTN37.mjs";import{b as S}from"./chunk-V5ZSFCKJ.mjs";import{a as Y}from"./chunk-NJUTBWG5.mjs";import{a as _}from"./chunk-CE4N3GKT.mjs";import{a as y}from"./chunk-BSA3IGL6.mjs";import{a as j}from"./chunk-NWRCQLFI.mjs";import{a as b}from"./chunk-WOMDF37F.mjs";import{a as L}from"./chunk-HORSXVIV.mjs";import{b as G}from"./chunk-NGM3AVCY.mjs";import{a as K,b as q,q as v,s as l}from"./chunk-XGALUTQ5.mjs";import{c as V,d as $,f as H}from"./chunk-FK6DWWZF.mjs";import{b as f}from"./chunk-VNLGNNIL.mjs";import{b as B}from"./chunk-2AJ5KJ2V.mjs";import{a as h}from"./chunk-LJX4MW7B.mjs";import{b as D,c as F,f as z}from"./chunk-DA76AK4I.mjs";import U from"bignumber.js";var Lt=async()=>{try{let o=J(),{network:e}=d();try{let t=await b({address:o,baseURL:e.apiAddress});if(t!=null){let n={...t,username:L(t.username),nonce:w(t)};return P(n),n}}catch(t){console.error("Failed getting account ",t)}}catch(o){console.error("Failed getting address ",o)}return null};async function I(){let o=T();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await Lt():void 0}catch(e){console.error("Failed initializing provider ",e)}}async function gt({sessionId:o,transactionBatch:e,isSequential:t}){try{if(e==null)return;let n=tt(),r=ot(e),i=await Z(r);for(let g of i)await et({serverTransaction:g,sessionId:o,isSequential:t});if(!i.every(g=>g.status!=="pending"))return;n&&await I();let{transactions:c}=l(),s=c?.[o];if(s.transactions.every(g=>g.status==="success"))return k({sessionId:o,status:"success"});if(s.transactions.some(g=>g.status==="fail"))return k({sessionId:o,status:"fail"});if(s.transactions.every(g=>g.status==="not executed"))return k({sessionId:o,status:"invalid"})}catch(n){console.error(n)}}async function pt(){let o=G(l()),e=Object.entries(o);e.length!==0&&await Promise.all(e.map(([t,{transactions:n}])=>gt({sessionId:t,transactionBatch:n})))}async function x(){let o=v(),e=nt(),t=null,n=$(o.getState())?.timestamp??null,r=async()=>{try{await pt()}catch(a){console.error("[trackTransactions] Error checking transaction status:",a)}},i=()=>{t||(t=setInterval(r,e))},p=()=>{t&&(clearInterval(t),t=null)},c=()=>{p();let a=o.subscribe(({account:{websocketEvent:m}})=>{m?.message&&m.timestamp!=null&&n!==m.timestamp&&(n=m.timestamp,r())});O.set("websocketEventReceived",a)};r();let s=()=>{p()},u=o.subscribe(({account:{address:a},config:{websocketStatus:m}},g)=>{if(g.config.websocketStatus!==m)switch(m){case"completed":c();break;case"pending":i();break;default:a?i():s();break}});return O.set("websocketStatusChanged",u),{stopTransactionsTracking:s}}async function N({address:o,provider:e,apiAddress:t}){let n=await b({address:o,baseURL:t});if(!n)throw new Error("Account not found");it({address:o,providerType:e.getType()});let r={...n,username:L(n.username),nonce:w(n)};P(r),await A(o),x(),n.shard!=null&&await rt({shard:Number(n.shard),apiAddress:t})}async function lt({provider:o,nativeAuthConfig:e,token:t}){let{network:{apiAddress:n}}=d(),r=_(e),i=t;i||(i=await r.initialize({noCache:!0}));let p=await o.login({token:i}),{address:c,signature:s,...u}=p;if(!c)return console.warn("Login cancelled."),null;if(!s)return console.error("Failed to sign login token"),null;let a=j(u?.accessToken),m=await at({loginData:p,nativeAuthConfig:e,loginToken:i}),g=a?u.accessToken:r.getToken({address:c,token:m,signature:s});q({loginToken:i,signature:s,nativeAuthToken:g});let C=await st({loginToken:i,extraInfoData:{multisig:u?.multisig,impersonate:u?.impersonate},address:c});return await N({address:C,provider:o,apiAddress:n}),{address:C,signature:s}}async function dt(o){let{network:{apiAddress:e}}=d();await o.login();let t=await o.getAddress();if(!t)throw new Error("Address not found");return await N({address:t,provider:o,apiAddress:e}),{address:t}}async function ft(o,e){let t=S(l());if(t)return await lt({provider:o,nativeAuthConfig:t,token:e?.token});let{address:n}=await dt(o);return await A(n),x(),{address:n,signature:""}}async function Tt({provider:o,transactions:e,options:t={}}){await I();let{isGuarded:n,activeGuardianAddress:r,nonce:i}=Y(),p=o.getType()===h.ledger,c=mt({latestNonce:i,transactions:e}),s=r&&n&&!t.skipGuardian?c?.map(a=>(a.version=D.withTxOptions().valueOf(),a.options=F.withOptions({guarded:!0,...p?{hashSign:!0}:{}}).valueOf(),a.guardian=z.newFromBech32(r),a)):c,u=await o.signTransactions(s,t)??[];return X(i+u.length),u}var E=class{constructor(e){this._isLoggingOut=!1;this.provider=e}init(){return this.provider.init()}async login(e){let t=await ft(this.provider,e);return K(this.provider.getType()),ht(this),R.getInstance().init(),t}isInitialized(){return this.provider.isInitialized()}async logout(e={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let t=await ct({provider:this.provider,options:e});return this._isLoggingOut=!1,t}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(e,t){try{return await Tt({provider:this.provider,transactions:e,options:t})}catch(n){let r=M(n);throw new Error(r)}}async signMessage(e,t){try{return await ut({provider:this.provider,message:e,options:t})}catch(n){let r=M(n,"warning");throw new Error(r)}}cancelLogin(){this.provider.cancelLogin?.()}};var vt=null;function ht(o){vt=o}function T(){return vt||new E(B)}var R=class o{constructor(){this.store=v();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let e=this.store.getState(),t=f(e),{isExpired:n}=y(t?.nativeAuthToken);n?T().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 e=this.store.getState(),t=f(e),n=H(e);return!!(t?.nativeAuthToken&&n)};this.addPlannedLogout=()=>{let e=T(),t=V(this.store.getState()),n=e.getType()===h.webview;if(!t||n)return;this.addLogoutWarning();let r=f(this.store.getState()),{secondsUntilExpires:i,expiresAt:p}=y(r?.nativeAuthToken),c=new U(String(i)),s=`${t}_${p}`,u=this.plannedLogoutKey===s;if(!(i&&c.isGreaterThan(0))||u)return;this.plannedLogoutKey=s,clearTimeout(this.plannedLogoutTimeoutRef??0);let m=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},m.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{e.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},m.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let e=S(this.store.getState()),t=f(this.store.getState()),{secondsUntilExpires:n}=y(t?.nativeAuthToken),r=new U(String(n)),i=r.times(1e3);if(!n||r.isLessThanOrEqualTo(0)||!e?.tokenExpirationToastWarningSeconds)return;let c=new U(e?.tokenExpirationToastWarningSeconds??0).times(1e3),s=r.times(1e3).minus(c),u=Q(i.toNumber()),a=s.isLessThanOrEqualTo(0)?0:s.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${u}!`}),this.warningLogoutTimeoutRef=null},a)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};export{R as a,gt as b,pt as c,x as d,N as e,lt as f,dt as g,ft as h,Tt as i,E as j,ht as k,T as l,I as m};
2
+ //# sourceMappingURL=chunk-YP65EQFP.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/managers/LogoutManager/LogoutManager.ts", "../../src/utils/account/refreshAccount.ts", "../../src/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.ts", "../../src/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.ts", "../../src/methods/trackTransactions/trackTransactions.ts", "../../src/providers/DappProvider/helpers/login/helpers/accountLogin.ts", "../../src/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.ts", "../../src/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.ts", "../../src/providers/DappProvider/helpers/login/login.ts", "../../src/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.ts", "../../src/providers/DappProvider/DappProvider.ts", "../../src/providers/helpers/accountProvider.ts"],
4
- "sourcesContent": ["import BigNumber from 'bignumber.js';\nimport { ToastManager } from 'managers/ToastManager';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { getTokenExpiration } from 'services/nativeAuth/methods/getTokenExpiration';\nimport {\n addressSelector,\n isLoggedInSelector\n} from 'store/selectors/accountSelectors';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { tokenLoginSelector } from 'store/selectors/loginInfoSelectors';\nimport { getStore } from 'store/store';\nimport { IconNamesEnum } from 'types/enums.types';\nimport { getHumanReadableTokenExpirationTime } from './helpers/getHumanReadableTokenExpirationTime';\n\nexport class LogoutManager {\n private static instance: LogoutManager;\n private store = getStore();\n private warningLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private actualLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutKey: string | null = null;\n\n public static getInstance(): LogoutManager {\n if (!LogoutManager.instance) {\n LogoutManager.instance = new LogoutManager();\n }\n return LogoutManager.instance;\n }\n\n private constructor() {}\n\n public init = async () => {\n if (!this.shouldStart()) {\n return;\n }\n\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n\n const { isExpired: isNativeAuthTokenExpired } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n if (isNativeAuthTokenExpired) {\n const provider = getAccountProvider();\n provider.logout();\n } else {\n this.addPlannedLogout();\n }\n };\n\n public stop = () => {\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n clearTimeout(this.actualLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = null;\n this.plannedLogoutTimeoutRef = null;\n this.actualLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n };\n\n private readonly shouldStart = (): boolean => {\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n const isLoggedIn = isLoggedInSelector(state);\n return Boolean(tokenLogin?.nativeAuthToken && isLoggedIn);\n };\n\n private addPlannedLogout = () => {\n const provider = getAccountProvider();\n const address = addressSelector(this.store.getState());\n const isWebviewLogin = provider.getType() === ProviderTypeEnum.webview;\n\n // prevent unexpected logout if webview login\n if (!address || isWebviewLogin) {\n return;\n }\n\n this.addLogoutWarning();\n\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires, expiresAt } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n // Handle the actual logout functionality.\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const plannedLogoutKey = `${address}_${expiresAt}`;\n const plannedLogoutSet = this.plannedLogoutKey === plannedLogoutKey;\n\n const isValidInterval =\n secondsUntilExpires && secondsUntilExpiresBN.isGreaterThan(0);\n\n if (!isValidInterval || plannedLogoutSet) {\n return;\n }\n\n this.plannedLogoutKey = plannedLogoutKey;\n\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n this.actualLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-logout',\n iconClassName: 'warning',\n title: 'Logging out',\n icon: IconNamesEnum.close,\n message: 'Your session has expired!'\n });\n this.actualLogoutTimeoutRef = null;\n }, millisecondsUntilLogout.toNumber() - 3000);\n\n this.plannedLogoutTimeoutRef = setTimeout(() => {\n provider.logout();\n this.plannedLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n }, millisecondsUntilLogout.toNumber());\n };\n\n private readonly addLogoutWarning = () => {\n if (this.warningLogoutTimeoutRef) {\n return;\n }\n\n const nativeAuthConfig = nativeAuthConfigSelector(this.store.getState());\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n if (\n !secondsUntilExpires ||\n secondsUntilExpiresBN.isLessThanOrEqualTo(0) ||\n !nativeAuthConfig?.tokenExpirationToastWarningSeconds\n ) {\n return;\n }\n\n const logoutWarningOffsetSeconds = new BigNumber(\n nativeAuthConfig?.tokenExpirationToastWarningSeconds ?? 0\n );\n\n const logoutWarningOffsetMilliseconds =\n logoutWarningOffsetSeconds.times(1000);\n\n const millisecondsUntilLogoutWarning = secondsUntilExpiresBN\n .times(1000)\n .minus(logoutWarningOffsetMilliseconds);\n\n const readableMinutesUntilLogout = getHumanReadableTokenExpirationTime(\n millisecondsUntilLogout.toNumber()\n );\n\n const timeoutUntilLogoutWarning =\n millisecondsUntilLogoutWarning.isLessThanOrEqualTo(0)\n ? 0\n : millisecondsUntilLogoutWarning.toNumber();\n\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-expired',\n iconClassName: 'warning',\n title: 'Session Expiration Warning',\n icon: IconNamesEnum.hourglass,\n message: `Your session will expire in ${readableMinutesUntilLogout}!`\n });\n this.warningLogoutTimeoutRef = null;\n }, timeoutUntilLogoutWarning);\n };\n}\n", "import { getAddress } from 'methods/account/getAddress';\nimport { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { setAccount } from 'store/actions/account/accountActions';\nimport { fetchAccount } from './fetchAccount';\nimport { trimUsernameDomain } from './trimUsernameDomain';\n\nconst setNewAccount = async () => {\n try {\n const address = getAddress();\n const { network } = getNetworkConfig();\n\n try {\n const account = await fetchAccount({\n address,\n baseURL: network.apiAddress\n });\n\n if (account != null) {\n const accountData = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(accountData);\n\n return accountData;\n }\n } catch (e) {\n console.error('Failed getting account ', e);\n }\n } catch (e) {\n console.error('Failed getting address ', e);\n }\n\n return null;\n};\n\nexport async function refreshAccount() {\n const provider = getAccountProvider();\n\n if (provider == null) {\n throw 'Provider not initialized';\n }\n\n try {\n if (!provider.init) {\n throw 'Current provider does not have init() function';\n }\n\n const initialized = await provider.init();\n\n if (!initialized) {\n return;\n }\n\n const account = await setNewAccount();\n\n return account;\n } catch (e) {\n console.error('Failed initializing provider ', e);\n }\n\n return undefined;\n}\n", "import { getTransactionsByHashes } from 'apiCalls/transactions/getTransactionsByHashes';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { updateSessionStatus } from 'store/actions/transactions/transactionsActions';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { SignedTransactionType } from 'types/transactions.types';\n\nimport { refreshAccount } from 'utils/account/refreshAccount';\nimport { getPendingTransactions } from '../getPendingTransactions';\nimport { runTransactionStatusUpdate } from './helpers/runTransactionStatusUpdate';\n\nexport interface TransactionStatusTrackerPropsType {\n sessionId: string;\n transactionBatch: SignedTransactionType[];\n isSequential?: boolean;\n}\n\nexport async function checkBatch({\n sessionId,\n transactionBatch: transactions,\n isSequential\n}: TransactionStatusTrackerPropsType) {\n try {\n if (transactions == null) {\n return;\n }\n\n const isLoggedIn = getIsLoggedIn();\n\n const pendingTransactions = getPendingTransactions(transactions);\n\n const serverTransactions =\n await getTransactionsByHashes(pendingTransactions);\n\n for (const serverTransaction of serverTransactions) {\n await runTransactionStatusUpdate({\n serverTransaction,\n sessionId,\n isSequential\n });\n }\n\n const hasCompleted = serverTransactions.every(\n (tx) => tx.status !== TransactionServerStatusesEnum.pending\n );\n\n if (!hasCompleted) {\n return;\n }\n\n if (isLoggedIn) {\n await refreshAccount();\n }\n\n // Call the onSuccess or onFail callback only if the transactions are sent normally (not using batch transactions mechanism).\n // The batch transactions mechanism will call the callbacks separately.\n\n const { transactions: sessions } = getState();\n const session = sessions?.[sessionId];\n\n const isSuccessful = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.success\n );\n\n if (isSuccessful) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.success\n });\n }\n\n const isFailed = session.transactions.some(\n (tx) => tx.status === TransactionServerStatusesEnum.fail\n );\n\n if (isFailed) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n }\n\n const isInvalid = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.notExecuted\n );\n\n if (isInvalid) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.invalid\n });\n }\n } catch (error) {\n console.error(error);\n }\n}\n", "import { pendingTransactionsSessionsSelector } from 'store/selectors/transactionsSelector';\nimport { getState } from 'store/store';\nimport { checkBatch } from './helpers/checkBatch';\n\nexport async function checkTransactionStatus() {\n const pendingSessions = pendingTransactionsSessionsSelector(getState());\n\n const entries = Object.entries(pendingSessions);\n if (entries.length === 0) {\n return;\n }\n\n await Promise.all(\n entries.map(([sessionId, { transactions }]) =>\n checkBatch({\n sessionId,\n transactionBatch: transactions\n })\n )\n );\n}\n", "import { subscriptions } from 'constants/storage.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { websocketEventSelector } from 'store/selectors/accountSelectors';\nimport { getStore } from 'store/store';\nimport { SubscriptionsEnum } from 'types/subscriptions.type';\nimport { checkTransactionStatus } from './helpers/checkTransactionStatus';\nimport { getPollingInterval } from './helpers/getPollingInterval';\n\n/**\n * Tracks transactions using websocket or polling\n * @returns stopTransactionsTracking function\n */\nexport async function trackTransactions(): Promise<{\n stopTransactionsTracking: () => void;\n}> {\n const store = getStore();\n const pollingInterval = getPollingInterval();\n let pollingIntervalRef: ReturnType<typeof setTimeout> | null = null;\n let timestamp = websocketEventSelector(store.getState())?.timestamp ?? null;\n\n const recheckStatus = async (): Promise<void> => {\n try {\n await checkTransactionStatus();\n } catch (error) {\n console.error(\n '[trackTransactions] Error checking transaction status:',\n error\n );\n }\n };\n\n const startPolling = (): void => {\n // Prevent multiple polling intervals\n if (pollingIntervalRef) {\n return;\n }\n pollingIntervalRef = setInterval(recheckStatus, pollingInterval);\n };\n\n const stopPolling = (): void => {\n if (pollingIntervalRef) {\n clearInterval(pollingIntervalRef);\n pollingIntervalRef = null;\n }\n };\n\n const setupWebSocketTracking = (): void => {\n stopPolling();\n const unsubscribeWebsocketEvent = store.subscribe(\n ({ account: { websocketEvent } }) => {\n if (\n websocketEvent?.message &&\n websocketEvent.timestamp != null &&\n timestamp !== websocketEvent.timestamp\n ) {\n timestamp = websocketEvent.timestamp;\n recheckStatus();\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketEventReceived,\n unsubscribeWebsocketEvent\n );\n };\n\n // Initial execution\n recheckStatus();\n\n const stopTransactionsTracking = (): void => {\n stopPolling();\n };\n\n const unsubscribeWebsocketStatus = store.subscribe(\n ({ account: { address }, config: { websocketStatus } }, prevState) => {\n const hasStatusChange =\n prevState.config.websocketStatus !== websocketStatus;\n\n if (!hasStatusChange) {\n return;\n }\n\n switch (websocketStatus) {\n case WebsocketConnectionStatusEnum.COMPLETED:\n setupWebSocketTracking();\n break;\n case WebsocketConnectionStatusEnum.PENDING:\n startPolling();\n break;\n default:\n address ? startPolling() : stopTransactionsTracking();\n break;\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketStatusChanged,\n unsubscribeWebsocketStatus\n );\n return { stopTransactionsTracking };\n}\n", "import { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { setGasStationMetadata } from 'methods/initApp/gasStationMetadata/setGasStationMetadata';\nimport { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { setAccount } from 'store/actions/account';\nimport { loginAction } from 'store/actions/sharedActions/sharedActions';\nimport { AccountType } from 'types/account.types';\nimport { fetchAccount } from 'utils/account/fetchAccount';\nimport { trimUsernameDomain } from 'utils/account/trimUsernameDomain';\n\ninterface IAccountLoginProps {\n address: string;\n provider: IProvider;\n apiAddress: string;\n}\n\nexport async function accountLogin({\n address,\n provider,\n apiAddress\n}: IAccountLoginProps) {\n const account = await fetchAccount({\n address,\n baseURL: apiAddress\n });\n\n if (!account) {\n throw new Error('Account not found');\n }\n\n loginAction({\n address,\n providerType: provider.getType()\n });\n\n const newAccount: AccountType = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(newAccount);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n if (account.shard != null) {\n await setGasStationMetadata({\n shard: Number(account.shard),\n apiAddress\n });\n }\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuth } from 'services/nativeAuth';\nimport { decodeNativeAuthToken } from 'services/nativeAuth/helpers/decodeNativeAuthToken';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions';\nimport { accountLogin } from './accountLogin';\nimport { extractAddressFromToken } from './extractAddressFromToken';\nimport { getMultisigLoginToken } from './getMultisigLoginToken';\n\nexport async function loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token\n}: {\n provider: IProvider;\n nativeAuthConfig: NativeAuthConfigType;\n token?: string;\n}) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n const nativeAuthClient = nativeAuth(nativeAuthConfig);\n let loginToken = token;\n\n if (!loginToken) {\n loginToken = await nativeAuthClient.initialize({\n noCache: true\n });\n }\n\n const loginData = await provider.login({\n token: loginToken\n });\n\n const { address, signature, ...loginResult } = loginData;\n\n if (!address) {\n console.warn('Login cancelled.');\n return null;\n }\n\n if (!signature) {\n console.error('Failed to sign login token');\n return null;\n }\n\n // nativeAuthToken received from hub login\n const decodedToken = decodeNativeAuthToken(loginResult?.accessToken);\n\n const usedLoginToken = await getMultisigLoginToken({\n loginData,\n nativeAuthConfig,\n loginToken\n });\n\n const nativeAuthToken = decodedToken\n ? loginResult.accessToken\n : nativeAuthClient.getToken({\n address,\n token: usedLoginToken,\n signature\n });\n\n setTokenLogin({\n loginToken,\n signature,\n nativeAuthToken\n });\n\n const extractedAddress = await extractAddressFromToken({\n loginToken,\n extraInfoData: {\n multisig: loginResult?.multisig,\n impersonate: loginResult?.impersonate\n },\n address\n });\n\n await accountLogin({\n address: extractedAddress,\n provider,\n apiAddress\n });\n\n return {\n address: extractedAddress,\n signature\n };\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { accountLogin } from './accountLogin';\n\nexport async function loginWithoutNativeToken(provider: IProvider) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n await provider.login();\n\n const address = await provider.getAddress();\n\n if (!address) {\n throw new Error('Address not found');\n }\n\n await accountLogin({ address, provider, apiAddress });\n\n return {\n address\n };\n}\n", "import { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { getState } from 'store/store';\nimport { loginWithNativeToken } from './helpers/loginWithNativeToken';\nimport { loginWithoutNativeToken } from './helpers/loginWithoutNativeToken';\n\nexport async function login(\n provider: IProvider,\n options?: { token?: string }\n): Promise<{\n address: string;\n signature: string;\n} | null> {\n const nativeAuthConfig = nativeAuthConfigSelector(getState());\n\n if (nativeAuthConfig) {\n const data = await loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token: options?.token\n });\n return data;\n }\n\n const { address } = await loginWithoutNativeToken(provider);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n return { address, signature: '' };\n}\n", "import {\n Address,\n Transaction,\n TransactionOptions,\n TransactionVersion\n} from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport {\n IProvider,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\nimport { setAccountNonce } from 'store/actions/account/accountActions';\nimport { refreshAccount } from 'utils/account/refreshAccount';\nimport { computeNonces } from '../computeNonces/computeNonces';\n\nexport type SignTransactionsOptionsType = {\n skipGuardian?: boolean;\n};\n\ntype SignTransactionsType = {\n provider: IProvider;\n transactions: Transaction[];\n options?: SignTransactionsOptionsType;\n};\n\nexport async function signTransactionsWithProvider({\n provider,\n transactions,\n options = {}\n}: SignTransactionsType): Promise<Transaction[]> {\n await refreshAccount();\n const { isGuarded, activeGuardianAddress, nonce } = getAccount();\n const isLedger = provider.getType() === ProviderTypeEnum.ledger;\n\n const transactionsWithComputedNonce = computeNonces({\n latestNonce: nonce,\n transactions\n });\n\n const transactionsToSign =\n activeGuardianAddress && isGuarded && !options.skipGuardian\n ? transactionsWithComputedNonce?.map((transaction) => {\n transaction.version = TransactionVersion.withTxOptions().valueOf();\n transaction.options = TransactionOptions.withOptions({\n guarded: true,\n ...(isLedger ? { hashSign: true } : {})\n }).valueOf();\n\n transaction.guardian = Address.newFromBech32(activeGuardianAddress);\n\n return transaction;\n })\n : transactionsWithComputedNonce;\n\n const signedTransactions: Transaction[] =\n (await provider.signTransactions(transactionsToSign)) ?? [];\n\n setAccountNonce(nonce + signedTransactions.length);\n\n return signedTransactions;\n}\n", "import { Message, Transaction } from 'lib/sdkCore';\nimport { LogoutManager } from 'managers/LogoutManager/LogoutManager';\nimport { setAccountProvider } from 'providers/helpers/accountProvider';\nimport { setProviderType } from 'store/actions/loginInfo/loginInfoActions';\nimport { IProvider } from '../types/providerFactory.types';\nimport { login } from './helpers/login/login';\nimport { logout } from './helpers/logout/logout';\nimport { handleSignError } from './helpers/signErrors/handleSignError';\nimport { signMessageWithProvider } from './helpers/signMessage/signMessageWithProvider';\nimport {\n signTransactionsWithProvider,\n SignTransactionsOptionsType\n} from './helpers/signTransactions/signTransactionsWithProvider';\n\nexport class DappProvider {\n private provider: IProvider;\n private _isLoggingOut = false;\n\n constructor(provider: IProvider) {\n this.provider = provider;\n }\n\n init(): Promise<boolean> {\n return this.provider.init();\n }\n\n async login(options?: { token?: string }) {\n const data = await login(this.provider, options);\n setProviderType(this.provider.getType());\n setAccountProvider(this);\n LogoutManager.getInstance().init();\n return data;\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n async logout(\n options = {\n shouldBroadcastLogoutAcrossTabs: true\n }\n ): Promise<boolean> {\n if (this._isLoggingOut) {\n console.warn('Logout already in progress');\n return false;\n }\n\n this._isLoggingOut = true;\n\n const isLoggedOut = await logout({ provider: this.provider, options });\n\n this._isLoggingOut = false;\n\n return isLoggedOut;\n }\n\n getType() {\n return this.provider.getType();\n }\n\n /**\n * @returns The original provider instance.\n */\n getProvider() {\n return this.provider;\n }\n\n async signTransactions(\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ): Promise<Transaction[]> {\n try {\n const signedTransactions = await signTransactionsWithProvider({\n provider: this.provider,\n transactions,\n options\n });\n return signedTransactions;\n } catch (error) {\n const errorMessage = handleSignError(error);\n throw new Error(errorMessage);\n }\n }\n\n async signMessage(\n message: Message,\n options?: {\n hasConsentPopup?: boolean;\n }\n ): Promise<Message | null> {\n try {\n const signedMessage = await signMessageWithProvider({\n provider: this.provider,\n message,\n options\n });\n return signedMessage;\n } catch (error) {\n const errorMessage = handleSignError(error, 'warning');\n throw new Error(errorMessage);\n }\n }\n\n cancelLogin(): void {\n this.provider.cancelLogin?.();\n }\n}\n", "import { IProvider } from 'providers/types/providerFactory.types';\nimport { DappProvider } from '../DappProvider';\nimport { emptyProvider } from './emptyProvider';\n\nexport type ProvidersType = IProvider;\n\nlet accountProvider: DappProvider | null = null;\n\nexport function setAccountProvider<TProvider extends DappProvider | null>(\n provider: TProvider\n) {\n accountProvider = provider;\n}\n\nexport function getAccountProvider(): DappProvider {\n return accountProvider || new DappProvider(emptyProvider);\n}\n"],
5
- "mappings": "ugDAAA,OAAOA,MAAe,eCQtB,IAAMC,GAAgB,SAAY,CAChC,GAAI,CACF,IAAMC,EAAUC,EAAW,EACrB,CAAE,QAAAC,CAAQ,EAAIC,EAAiB,EAErC,GAAI,CACF,IAAMC,EAAU,MAAMC,EAAa,CACjC,QAAAL,EACA,QAASE,EAAQ,UACnB,CAAC,EAED,GAAIE,GAAW,KAAM,CACnB,IAAME,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AAC,EACjErB,EAAaC,EAAmB,KAAK,MAAM,SAAS,CAAC,EAErD,CAAE,oBAAAW,CAAoB,EAAIT,EAC9BH,GAAY,eACd,EAEMc,EAAwB,IAAIC,EAAU,OAAOH,CAAmB,CAAC,EACjEM,EAA0BJ,EAAsB,MAAM,GAAI,EAEhE,GACE,CAACF,GACDE,EAAsB,oBAAoB,CAAC,GAC3C,CAACM,GAAkB,mCAEnB,OAOF,IAAME,EAJ6B,IAAIP,EACrCK,GAAkB,oCAAsC,CAC1D,EAG6B,MAAM,GAAI,EAEjCG,EAAiCT,EACpC,MAAM,GAAI,EACV,MAAMQ,CAA+B,EAElCE,EAA6BC,EACjCP,EAAwB,SAAS,CACnC,EAEMQ,EACJH,EAA+B,oBAAoB,CAAC,EAChD,EACAA,EAA+B,SAAS,EAE9C,aAAa,KAAK,yBAA2B,CAAC,EAE9C,KAAK,wBAA0B,WAAW,IAAM,CAC9CJ,EAAa,YAAY,EAAE,kBAAkB,CAC3C,QAAS,sBACT,cAAe,UACf,MAAO,6BACP,iBACA,QAAS,+BAA+BK,CAA0B,GACpE,CAAC,EACD,KAAK,wBAA0B,IACjC,EAAGE,CAAyB,CAC9B,CApJuB,CAPvB,OAAc,aAA6B,CACzC,OAAK7B,EAAc,WACjBA,EAAc,SAAW,IAAIA,GAExBA,EAAc,QACvB,CAuJF",
4
+ "sourcesContent": ["import BigNumber from 'bignumber.js';\nimport { ToastManager } from 'managers/ToastManager';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { getTokenExpiration } from 'services/nativeAuth/methods/getTokenExpiration';\nimport {\n addressSelector,\n isLoggedInSelector\n} from 'store/selectors/accountSelectors';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { tokenLoginSelector } from 'store/selectors/loginInfoSelectors';\nimport { getStore } from 'store/store';\nimport { IconNamesEnum } from 'types/enums.types';\nimport { getHumanReadableTokenExpirationTime } from './helpers/getHumanReadableTokenExpirationTime';\n\nexport class LogoutManager {\n private static instance: LogoutManager;\n private store = getStore();\n private warningLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private actualLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutKey: string | null = null;\n\n public static getInstance(): LogoutManager {\n if (!LogoutManager.instance) {\n LogoutManager.instance = new LogoutManager();\n }\n return LogoutManager.instance;\n }\n\n private constructor() {}\n\n public init = async () => {\n if (!this.shouldStart()) {\n return;\n }\n\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n\n const { isExpired: isNativeAuthTokenExpired } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n if (isNativeAuthTokenExpired) {\n const provider = getAccountProvider();\n provider.logout();\n } else {\n this.addPlannedLogout();\n }\n };\n\n public stop = () => {\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n clearTimeout(this.actualLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = null;\n this.plannedLogoutTimeoutRef = null;\n this.actualLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n };\n\n private readonly shouldStart = (): boolean => {\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n const isLoggedIn = isLoggedInSelector(state);\n return Boolean(tokenLogin?.nativeAuthToken && isLoggedIn);\n };\n\n private addPlannedLogout = () => {\n const provider = getAccountProvider();\n const address = addressSelector(this.store.getState());\n const isWebviewLogin = provider.getType() === ProviderTypeEnum.webview;\n\n // prevent unexpected logout if webview login\n if (!address || isWebviewLogin) {\n return;\n }\n\n this.addLogoutWarning();\n\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires, expiresAt } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n // Handle the actual logout functionality.\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const plannedLogoutKey = `${address}_${expiresAt}`;\n const plannedLogoutSet = this.plannedLogoutKey === plannedLogoutKey;\n\n const isValidInterval =\n secondsUntilExpires && secondsUntilExpiresBN.isGreaterThan(0);\n\n if (!isValidInterval || plannedLogoutSet) {\n return;\n }\n\n this.plannedLogoutKey = plannedLogoutKey;\n\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n this.actualLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-logout',\n iconClassName: 'warning',\n title: 'Logging out',\n icon: IconNamesEnum.close,\n message: 'Your session has expired!'\n });\n this.actualLogoutTimeoutRef = null;\n }, millisecondsUntilLogout.toNumber() - 3000);\n\n this.plannedLogoutTimeoutRef = setTimeout(() => {\n provider.logout();\n this.plannedLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n }, millisecondsUntilLogout.toNumber());\n };\n\n private readonly addLogoutWarning = () => {\n if (this.warningLogoutTimeoutRef) {\n return;\n }\n\n const nativeAuthConfig = nativeAuthConfigSelector(this.store.getState());\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n if (\n !secondsUntilExpires ||\n secondsUntilExpiresBN.isLessThanOrEqualTo(0) ||\n !nativeAuthConfig?.tokenExpirationToastWarningSeconds\n ) {\n return;\n }\n\n const logoutWarningOffsetSeconds = new BigNumber(\n nativeAuthConfig?.tokenExpirationToastWarningSeconds ?? 0\n );\n\n const logoutWarningOffsetMilliseconds =\n logoutWarningOffsetSeconds.times(1000);\n\n const millisecondsUntilLogoutWarning = secondsUntilExpiresBN\n .times(1000)\n .minus(logoutWarningOffsetMilliseconds);\n\n const readableMinutesUntilLogout = getHumanReadableTokenExpirationTime(\n millisecondsUntilLogout.toNumber()\n );\n\n const timeoutUntilLogoutWarning =\n millisecondsUntilLogoutWarning.isLessThanOrEqualTo(0)\n ? 0\n : millisecondsUntilLogoutWarning.toNumber();\n\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-expired',\n iconClassName: 'warning',\n title: 'Session Expiration Warning',\n icon: IconNamesEnum.hourglass,\n message: `Your session will expire in ${readableMinutesUntilLogout}!`\n });\n this.warningLogoutTimeoutRef = null;\n }, timeoutUntilLogoutWarning);\n };\n}\n", "import { getAddress } from 'methods/account/getAddress';\nimport { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { setAccount } from 'store/actions/account/accountActions';\nimport { fetchAccount } from './fetchAccount';\nimport { trimUsernameDomain } from './trimUsernameDomain';\n\nconst setNewAccount = async () => {\n try {\n const address = getAddress();\n const { network } = getNetworkConfig();\n\n try {\n const account = await fetchAccount({\n address,\n baseURL: network.apiAddress\n });\n\n if (account != null) {\n const accountData = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(accountData);\n\n return accountData;\n }\n } catch (e) {\n console.error('Failed getting account ', e);\n }\n } catch (e) {\n console.error('Failed getting address ', e);\n }\n\n return null;\n};\n\nexport async function refreshAccount() {\n const provider = getAccountProvider();\n\n if (provider == null) {\n throw 'Provider not initialized';\n }\n\n try {\n if (!provider.init) {\n throw 'Current provider does not have init() function';\n }\n\n const initialized = await provider.init();\n\n if (!initialized) {\n return;\n }\n\n const account = await setNewAccount();\n\n return account;\n } catch (e) {\n console.error('Failed initializing provider ', e);\n }\n\n return undefined;\n}\n", "import { getTransactionsByHashes } from 'apiCalls/transactions/getTransactionsByHashes';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { updateSessionStatus } from 'store/actions/transactions/transactionsActions';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { SignedTransactionType } from 'types/transactions.types';\n\nimport { refreshAccount } from 'utils/account/refreshAccount';\nimport { getPendingTransactions } from '../getPendingTransactions';\nimport { runTransactionStatusUpdate } from './helpers/runTransactionStatusUpdate';\n\nexport interface TransactionStatusTrackerPropsType {\n sessionId: string;\n transactionBatch: SignedTransactionType[];\n isSequential?: boolean;\n}\n\nexport async function checkBatch({\n sessionId,\n transactionBatch: transactions,\n isSequential\n}: TransactionStatusTrackerPropsType) {\n try {\n if (transactions == null) {\n return;\n }\n\n const isLoggedIn = getIsLoggedIn();\n\n const pendingTransactions = getPendingTransactions(transactions);\n\n const serverTransactions =\n await getTransactionsByHashes(pendingTransactions);\n\n for (const serverTransaction of serverTransactions) {\n await runTransactionStatusUpdate({\n serverTransaction,\n sessionId,\n isSequential\n });\n }\n\n const hasCompleted = serverTransactions.every(\n (tx) => tx.status !== TransactionServerStatusesEnum.pending\n );\n\n if (!hasCompleted) {\n return;\n }\n\n if (isLoggedIn) {\n await refreshAccount();\n }\n\n // Call the onSuccess or onFail callback only if the transactions are sent normally (not using batch transactions mechanism).\n // The batch transactions mechanism will call the callbacks separately.\n\n const { transactions: sessions } = getState();\n const session = sessions?.[sessionId];\n\n const isSuccessful = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.success\n );\n\n if (isSuccessful) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.success\n });\n }\n\n const isFailed = session.transactions.some(\n (tx) => tx.status === TransactionServerStatusesEnum.fail\n );\n\n if (isFailed) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n }\n\n const isInvalid = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.notExecuted\n );\n\n if (isInvalid) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.invalid\n });\n }\n } catch (error) {\n console.error(error);\n }\n}\n", "import { pendingTransactionsSessionsSelector } from 'store/selectors/transactionsSelector';\nimport { getState } from 'store/store';\nimport { checkBatch } from './helpers/checkBatch';\n\nexport async function checkTransactionStatus() {\n const pendingSessions = pendingTransactionsSessionsSelector(getState());\n\n const entries = Object.entries(pendingSessions);\n if (entries.length === 0) {\n return;\n }\n\n await Promise.all(\n entries.map(([sessionId, { transactions }]) =>\n checkBatch({\n sessionId,\n transactionBatch: transactions\n })\n )\n );\n}\n", "import { subscriptions } from 'constants/storage.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { websocketEventSelector } from 'store/selectors/accountSelectors';\nimport { getStore } from 'store/store';\nimport { SubscriptionsEnum } from 'types/subscriptions.type';\nimport { checkTransactionStatus } from './helpers/checkTransactionStatus';\nimport { getPollingInterval } from './helpers/getPollingInterval';\n\n/**\n * Tracks transactions using websocket or polling\n * @returns stopTransactionsTracking function\n */\nexport async function trackTransactions(): Promise<{\n stopTransactionsTracking: () => void;\n}> {\n const store = getStore();\n const pollingInterval = getPollingInterval();\n let pollingIntervalRef: ReturnType<typeof setTimeout> | null = null;\n let timestamp = websocketEventSelector(store.getState())?.timestamp ?? null;\n\n const recheckStatus = async (): Promise<void> => {\n try {\n await checkTransactionStatus();\n } catch (error) {\n console.error(\n '[trackTransactions] Error checking transaction status:',\n error\n );\n }\n };\n\n const startPolling = (): void => {\n // Prevent multiple polling intervals\n if (pollingIntervalRef) {\n return;\n }\n pollingIntervalRef = setInterval(recheckStatus, pollingInterval);\n };\n\n const stopPolling = (): void => {\n if (pollingIntervalRef) {\n clearInterval(pollingIntervalRef);\n pollingIntervalRef = null;\n }\n };\n\n const setupWebSocketTracking = (): void => {\n stopPolling();\n const unsubscribeWebsocketEvent = store.subscribe(\n ({ account: { websocketEvent } }) => {\n if (\n websocketEvent?.message &&\n websocketEvent.timestamp != null &&\n timestamp !== websocketEvent.timestamp\n ) {\n timestamp = websocketEvent.timestamp;\n recheckStatus();\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketEventReceived,\n unsubscribeWebsocketEvent\n );\n };\n\n // Initial execution\n recheckStatus();\n\n const stopTransactionsTracking = (): void => {\n stopPolling();\n };\n\n const unsubscribeWebsocketStatus = store.subscribe(\n ({ account: { address }, config: { websocketStatus } }, prevState) => {\n const hasStatusChange =\n prevState.config.websocketStatus !== websocketStatus;\n\n if (!hasStatusChange) {\n return;\n }\n\n switch (websocketStatus) {\n case WebsocketConnectionStatusEnum.COMPLETED:\n setupWebSocketTracking();\n break;\n case WebsocketConnectionStatusEnum.PENDING:\n startPolling();\n break;\n default:\n address ? startPolling() : stopTransactionsTracking();\n break;\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketStatusChanged,\n unsubscribeWebsocketStatus\n );\n return { stopTransactionsTracking };\n}\n", "import { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { setGasStationMetadata } from 'methods/initApp/gasStationMetadata/setGasStationMetadata';\nimport { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { setAccount } from 'store/actions/account';\nimport { loginAction } from 'store/actions/sharedActions/sharedActions';\nimport { AccountType } from 'types/account.types';\nimport { fetchAccount } from 'utils/account/fetchAccount';\nimport { trimUsernameDomain } from 'utils/account/trimUsernameDomain';\n\ninterface IAccountLoginProps {\n address: string;\n provider: IProvider;\n apiAddress: string;\n}\n\nexport async function accountLogin({\n address,\n provider,\n apiAddress\n}: IAccountLoginProps) {\n const account = await fetchAccount({\n address,\n baseURL: apiAddress\n });\n\n if (!account) {\n throw new Error('Account not found');\n }\n\n loginAction({\n address,\n providerType: provider.getType()\n });\n\n const newAccount: AccountType = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(newAccount);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n if (account.shard != null) {\n await setGasStationMetadata({\n shard: Number(account.shard),\n apiAddress\n });\n }\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuth } from 'services/nativeAuth';\nimport { decodeNativeAuthToken } from 'services/nativeAuth/helpers/decodeNativeAuthToken';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions';\nimport { accountLogin } from './accountLogin';\nimport { extractAddressFromToken } from './extractAddressFromToken';\nimport { getMultisigLoginToken } from './getMultisigLoginToken';\n\nexport async function loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token\n}: {\n provider: IProvider;\n nativeAuthConfig: NativeAuthConfigType;\n token?: string;\n}) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n const nativeAuthClient = nativeAuth(nativeAuthConfig);\n let loginToken = token;\n\n if (!loginToken) {\n loginToken = await nativeAuthClient.initialize({\n noCache: true\n });\n }\n\n const loginData = await provider.login({\n token: loginToken\n });\n\n const { address, signature, ...loginResult } = loginData;\n\n if (!address) {\n console.warn('Login cancelled.');\n return null;\n }\n\n if (!signature) {\n console.error('Failed to sign login token');\n return null;\n }\n\n // nativeAuthToken received from hub login\n const decodedToken = decodeNativeAuthToken(loginResult?.accessToken);\n\n const usedLoginToken = await getMultisigLoginToken({\n loginData,\n nativeAuthConfig,\n loginToken\n });\n\n const nativeAuthToken = decodedToken\n ? loginResult.accessToken\n : nativeAuthClient.getToken({\n address,\n token: usedLoginToken,\n signature\n });\n\n setTokenLogin({\n loginToken,\n signature,\n nativeAuthToken\n });\n\n const extractedAddress = await extractAddressFromToken({\n loginToken,\n extraInfoData: {\n multisig: loginResult?.multisig,\n impersonate: loginResult?.impersonate\n },\n address\n });\n\n await accountLogin({\n address: extractedAddress,\n provider,\n apiAddress\n });\n\n return {\n address: extractedAddress,\n signature\n };\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { accountLogin } from './accountLogin';\n\nexport async function loginWithoutNativeToken(provider: IProvider) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n await provider.login();\n\n const address = await provider.getAddress();\n\n if (!address) {\n throw new Error('Address not found');\n }\n\n await accountLogin({ address, provider, apiAddress });\n\n return {\n address\n };\n}\n", "import { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { getState } from 'store/store';\nimport { loginWithNativeToken } from './helpers/loginWithNativeToken';\nimport { loginWithoutNativeToken } from './helpers/loginWithoutNativeToken';\n\nexport async function login(\n provider: IProvider,\n options?: { token?: string }\n): Promise<{\n address: string;\n signature: string;\n} | null> {\n const nativeAuthConfig = nativeAuthConfigSelector(getState());\n\n if (nativeAuthConfig) {\n const data = await loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token: options?.token\n });\n return data;\n }\n\n const { address } = await loginWithoutNativeToken(provider);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n return { address, signature: '' };\n}\n", "import {\n Address,\n Transaction,\n TransactionOptions,\n TransactionVersion\n} from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport {\n IProvider,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\nimport { setAccountNonce } from 'store/actions/account/accountActions';\nimport { refreshAccount } from 'utils/account/refreshAccount';\nimport { computeNonces } from '../computeNonces/computeNonces';\n\nexport type SignTransactionsOptionsType = {\n skipGuardian?: boolean;\n callback?: (signedTransactions: Transaction[]) => Promise<Transaction[]>;\n};\n\ntype SignTransactionsType = {\n provider: IProvider;\n transactions: Transaction[];\n options?: SignTransactionsOptionsType;\n};\n\nexport async function signTransactionsWithProvider({\n provider,\n transactions,\n options = {}\n}: SignTransactionsType): Promise<Transaction[]> {\n await refreshAccount();\n const { isGuarded, activeGuardianAddress, nonce } = getAccount();\n const isLedger = provider.getType() === ProviderTypeEnum.ledger;\n\n const transactionsWithComputedNonce = computeNonces({\n latestNonce: nonce,\n transactions\n });\n\n const transactionsToSign =\n activeGuardianAddress && isGuarded && !options.skipGuardian\n ? transactionsWithComputedNonce?.map((transaction) => {\n transaction.version = TransactionVersion.withTxOptions().valueOf();\n transaction.options = TransactionOptions.withOptions({\n guarded: true,\n ...(isLedger ? { hashSign: true } : {})\n }).valueOf();\n\n transaction.guardian = Address.newFromBech32(activeGuardianAddress);\n\n return transaction;\n })\n : transactionsWithComputedNonce;\n\n const signedTransactions: Transaction[] =\n (await provider.signTransactions(transactionsToSign, options)) ?? [];\n\n setAccountNonce(nonce + signedTransactions.length);\n\n return signedTransactions;\n}\n", "import { Message, Transaction } from 'lib/sdkCore';\nimport { LogoutManager } from 'managers/LogoutManager/LogoutManager';\nimport { setAccountProvider } from 'providers/helpers/accountProvider';\nimport { setProviderType } from 'store/actions/loginInfo/loginInfoActions';\nimport { IProvider } from '../types/providerFactory.types';\nimport { login } from './helpers/login/login';\nimport { logout } from './helpers/logout/logout';\nimport { handleSignError } from './helpers/signErrors/handleSignError';\nimport { signMessageWithProvider } from './helpers/signMessage/signMessageWithProvider';\nimport {\n signTransactionsWithProvider,\n SignTransactionsOptionsType\n} from './helpers/signTransactions/signTransactionsWithProvider';\n\nexport class DappProvider {\n private provider: IProvider;\n private _isLoggingOut = false;\n\n constructor(provider: IProvider) {\n this.provider = provider;\n }\n\n init(): Promise<boolean> {\n return this.provider.init();\n }\n\n async login(options?: { token?: string }) {\n const data = await login(this.provider, options);\n setProviderType(this.provider.getType());\n setAccountProvider(this);\n LogoutManager.getInstance().init();\n return data;\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n async logout(\n options = {\n shouldBroadcastLogoutAcrossTabs: true\n }\n ): Promise<boolean> {\n if (this._isLoggingOut) {\n console.warn('Logout already in progress');\n return false;\n }\n\n this._isLoggingOut = true;\n\n const isLoggedOut = await logout({ provider: this.provider, options });\n\n this._isLoggingOut = false;\n\n return isLoggedOut;\n }\n\n getType() {\n return this.provider.getType();\n }\n\n /**\n * @returns The original provider instance.\n */\n getProvider() {\n return this.provider;\n }\n\n async signTransactions(\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ): Promise<Transaction[]> {\n try {\n const signedTransactions = await signTransactionsWithProvider({\n provider: this.provider,\n transactions,\n options\n });\n return signedTransactions;\n } catch (error) {\n const errorMessage = handleSignError(error);\n throw new Error(errorMessage);\n }\n }\n\n async signMessage(\n message: Message,\n options?: {\n hasConsentPopup?: boolean;\n }\n ): Promise<Message | null> {\n try {\n const signedMessage = await signMessageWithProvider({\n provider: this.provider,\n message,\n options\n });\n return signedMessage;\n } catch (error) {\n const errorMessage = handleSignError(error, 'warning');\n throw new Error(errorMessage);\n }\n }\n\n cancelLogin(): void {\n this.provider.cancelLogin?.();\n }\n}\n", "import { IProvider } from 'providers/types/providerFactory.types';\nimport { DappProvider } from '../DappProvider';\nimport { emptyProvider } from './emptyProvider';\n\nexport type ProvidersType = IProvider;\n\nlet accountProvider: DappProvider | null = null;\n\nexport function setAccountProvider<TProvider extends DappProvider | null>(\n provider: TProvider\n) {\n accountProvider = provider;\n}\n\nexport function getAccountProvider(): DappProvider {\n return accountProvider || new DappProvider(emptyProvider);\n}\n"],
5
+ "mappings": "ugDAAA,OAAOA,MAAe,eCQtB,IAAMC,GAAgB,SAAY,CAChC,GAAI,CACF,IAAMC,EAAUC,EAAW,EACrB,CAAE,QAAAC,CAAQ,EAAIC,EAAiB,EAErC,GAAI,CACF,IAAMC,EAAU,MAAMC,EAAa,CACjC,QAAAL,EACA,QAASE,EAAQ,UACnB,CAAC,EAED,GAAIE,GAAW,KAAM,CACnB,IAAME,EAAc,CAClB,GAAGF,EACH,SAAUG,EAAmBH,EAAQ,QAAQ,EAC7C,MAAOI,EAAeJ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W,CAAoB,EAAIT,EAC9BH,GAAY,eACd,EAEMc,EAAwB,IAAIC,EAAU,OAAOH,CAAmB,CAAC,EACjEM,EAA0BJ,EAAsB,MAAM,GAAI,EAEhE,GACE,CAACF,GACDE,EAAsB,oBAAoB,CAAC,GAC3C,CAACM,GAAkB,mCAEnB,OAOF,IAAME,EAJ6B,IAAIP,EACrCK,GAAkB,oCAAsC,CAC1D,EAG6B,MAAM,GAAI,EAEjCG,EAAiCT,EACpC,MAAM,GAAI,EACV,MAAMQ,CAA+B,EAElCE,EAA6BC,EACjCP,EAAwB,SAAS,CACnC,EAEMQ,EACJH,EAA+B,oBAAoB,CAAC,EAChD,EACAA,EAA+B,SAAS,EAE9C,aAAa,KAAK,yBAA2B,CAAC,EAE9C,KAAK,wBAA0B,WAAW,IAAM,CAC9CJ,EAAa,YAAY,EAAE,kBAAkB,CAC3C,QAAS,sBACT,cAAe,UACf,MAAO,6BACP,iBACA,QAAS,+BAA+BK,CAA0B,GACpE,CAAC,EACD,KAAK,wBAA0B,IACjC,EAAGE,CAAyB,CAC9B,CApJuB,CAPvB,OAAc,aAA6B,CACzC,OAAK7B,EAAc,WACjBA,EAAc,SAAW,IAAIA,GAExBA,EAAc,QACvB,CAuJF",
6
6
  "names": ["BigNumber", "setNewAccount", "address", "getAddress", "network", "getNetworkConfig", "account", "fetchAccount", "accountData", "trimUsernameDomain", "getLatestNonce", "setAccount", "e", "refreshAccount", "provider", "getAccountProvider", "checkBatch", "sessionId", "transactions", "isSequential", "isLoggedIn", "getIsLoggedIn", "pendingTransactions", "getPendingTransactions", "serverTransactions", "getTransactionsByHashes", "serverTransaction", "runTransactionStatusUpdate", "tx", "refreshAccount", "sessions", "getState", "session", "updateSessionStatus", "error", "checkTransactionStatus", "pendingSessions", "pendingTransactionsSessionsSelector", "getState", "entries", "sessionId", "transactions", "checkBatch", "trackTransactions", "store", "getStore", "pollingInterval", "getPollingInterval", "pollingIntervalRef", "timestamp", "websocketEventSelector", "recheckStatus", "checkTransactionStatus", "error", "startPolling", "stopPolling", "setupWebSocketTracking", "unsubscribeWebsocketEvent", "websocketEvent", "subscriptions", "stopTransactionsTracking", "unsubscribeWebsocketStatus", "address", "websocketStatus", "prevState", "accountLogin", "address", "provider", "apiAddress", "account", "fetchAccount", "loginAction", "newAccount", "trimUsernameDomain", "getLatestNonce", "setAccount", "registerWebsocketListener", "trackTransactions", "setGasStationMetadata", "loginWithNativeToken", "provider", "nativeAuthConfig", "token", "apiAddress", "getNetworkConfig", "nativeAuthClient", "nativeAuth", "loginToken", "loginData", "address", "signature", "loginResult", "decodedToken", "decodeNativeAuthToken", "usedLoginToken", "getMultisigLoginToken", "nativeAuthToken", "setTokenLogin", "extractedAddress", "extractAddressFromToken", "accountLogin", "loginWithoutNativeToken", "provider", "apiAddress", "getNetworkConfig", "address", "accountLogin", "login", "provider", "options", "nativeAuthConfig", "nativeAuthConfigSelector", "getState", "loginWithNativeToken", "address", "loginWithoutNativeToken", "registerWebsocketListener", "trackTransactions", "signTransactionsWithProvider", "provider", "transactions", "options", "refreshAccount", "isGuarded", "activeGuardianAddress", "nonce", "getAccount", "isLedger", "ProviderTypeEnum", "transactionsWithComputedNonce", "computeNonces", "transactionsToSign", "transaction", "TransactionVersion", "TransactionOptions", "Address", "signedTransactions", "setAccountNonce", "DappProvider", "provider", "options", "data", "login", "setProviderType", "setAccountProvider", "LogoutManager", "isLoggedOut", "logout", "transactions", "signTransactionsWithProvider", "error", "errorMessage", "handleSignError", "message", "signMessageWithProvider", "accountProvider", "setAccountProvider", "provider", "getAccountProvider", "DappProvider", "emptyProvider", "LogoutManager", "_LogoutManager", "getStore", "state", "tokenLogin", "tokenLoginSelector", "isNativeAuthTokenExpired", "getTokenExpiration", "getAccountProvider", "isLoggedIn", "isLoggedInSelector", "provider", "address", "addressSelector", "isWebviewLogin", "ProviderTypeEnum", "secondsUntilExpires", "expiresAt", "secondsUntilExpiresBN", "BigNumber", "plannedLogoutKey", "plannedLogoutSet", "millisecondsUntilLogout", "ToastManager", "nativeAuthConfig", "nativeAuthConfigSelector", "logoutWarningOffsetMilliseconds", "millisecondsUntilLogoutWarning", "readableMinutesUntilLogout", "getHumanReadableTokenExpirationTime", "timeoutUntilLogoutWarning"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-HCYLJV62.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
- //# sourceMappingURL=chunk-LBMKLRI7.mjs.map
1
+ import{a as e}from"./chunk-6CMARMS2.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
+ //# sourceMappingURL=chunk-YXWMQGAB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-Y6OAUXIU.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
- //# sourceMappingURL=chunk-OJVDJHBR.mjs.map
1
+ import{a as i}from"./chunk-A4KOSUVU.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
+ //# sourceMappingURL=chunk-Z7TITNCM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-MI2K6RMJ.mjs";import{a as p}from"./chunk-HVWFXP4G.mjs";import{a as m}from"./chunk-BPPANN5H.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-BVZPCM6G.mjs";import{b as a}from"./chunk-CTIBYRMH.mjs";import{f as i}from"./chunk-ACY76UCX.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
- //# sourceMappingURL=chunk-HY5BQMSU.mjs.map
1
+ import{a as s}from"./chunk-S3EO22CE.mjs";import{a as p}from"./chunk-WRQ5IRXO.mjs";import{a as m}from"./chunk-JSYDF4GF.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-WGXHIBDE.mjs";import{b as a}from"./chunk-2SYDJSIO.mjs";import{f as i}from"./chunk-XGALUTQ5.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
+ //# sourceMappingURL=chunk-ZKFUF6BU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../__chunks__/chunk-OJVDJHBR.mjs";import"../../__chunks__/chunk-Y6OAUXIU.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as accountFetcher,b as getAccountFromApi};
1
+ import{a,b}from"../../__chunks__/chunk-Z7TITNCM.mjs";import"../../__chunks__/chunk-A4KOSUVU.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as accountFetcher,b as getAccountFromApi};
2
2
  //# sourceMappingURL=getAccountFromApi.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-UYWQOHGW.mjs";import"../../__chunks__/chunk-Y6OAUXIU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as getScamAddressData};
1
+ import{a}from"../../__chunks__/chunk-S5DCQEU2.mjs";import"../../__chunks__/chunk-A4KOSUVU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as getScamAddressData};
2
2
  //# sourceMappingURL=getScamAddressData.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-Y6OAUXIU.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as getCleanApiAddress};
1
+ import{a}from"../../__chunks__/chunk-A4KOSUVU.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as getCleanApiAddress};
2
2
  //# sourceMappingURL=getCleanApiAddress.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-NODAYKNL.mjs";import"../../__chunks__/chunk-Y6OAUXIU.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as getGasStationMetadataFromApi};
1
+ import{a}from"../../__chunks__/chunk-AOF7QPPF.mjs";import"../../__chunks__/chunk-A4KOSUVU.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as getGasStationMetadataFromApi};
2
2
  //# sourceMappingURL=getGasStationMetadata.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-V7TKRGVU.mjs";import"../../__chunks__/chunk-Y6OAUXIU.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as getEconomics};
1
+ import{a}from"../../__chunks__/chunk-3DZPVOPO.mjs";import"../../__chunks__/chunk-A4KOSUVU.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as getEconomics};
2
2
  //# sourceMappingURL=getEconomics.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-7EZGGGIQ.mjs";import"../../__chunks__/chunk-NYZ726DG.mjs";import"../../__chunks__/chunk-SNPF3BD2.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as getPersistedTokenDetails};
1
+ import{a}from"../../__chunks__/chunk-2DUOXMZP.mjs";import"../../__chunks__/chunk-NYZ726DG.mjs";import"../../__chunks__/chunk-SNPF3BD2.mjs";import"../../__chunks__/chunk-N56SMVGU.mjs";import"../../__chunks__/chunk-PKDR5ERF.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-3FXHIV6O.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-NWJYEKI2.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as getPersistedTokenDetails};
2
2
  //# sourceMappingURL=getPersistedTokenDetails.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"../../__chunks__/chunk-N56SMVGU.mjs";import{b as m}from"../../__chunks__/chunk-7VHTZYM2.mjs";import{a as r}from"../../__chunks__/chunk-3FXHIV6O.mjs";import{s as i}from"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{o as s,u as a}from"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";async function b({tokenId:o}){let t=m(i()),{isNft:k}=r(o),n=o,p=k?s:a;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await c.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as getTokenDetails};
1
+ import{a as c}from"../../__chunks__/chunk-N56SMVGU.mjs";import{b as m}from"../../__chunks__/chunk-7VHTZYM2.mjs";import{a as r}from"../../__chunks__/chunk-3FXHIV6O.mjs";import{s as i}from"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{o as s,u as a}from"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";async function b({tokenId:o}){let t=m(i()),{isNft:k}=r(o),n=o,p=k?s:a;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await c.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as getTokenDetails};
2
2
  //# sourceMappingURL=getTokenDetails.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-WPZIGJNP.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as getServerTransactionsByHashes};
1
+ import{a}from"../../__chunks__/chunk-RVTPQ3R5.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as getServerTransactionsByHashes};
2
2
  //# sourceMappingURL=getServerTransactionsByHashes.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"../../__chunks__/chunk-7VHTZYM2.mjs";import{s as r}from"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{y as t}from"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";import m from"axios";var T=e=>{let{apiAddress:i}=o(r());return m.get(`${i}/${t}/${e}`,{timeout:1e4})};export{T as getTransactionByHash};
1
+ import{b as o}from"../../__chunks__/chunk-7VHTZYM2.mjs";import{s as r}from"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{y as t}from"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";import m from"axios";var T=e=>{let{apiAddress:i}=o(r());return m.get(`${i}/${t}/${e}`,{timeout:1e4})};export{T as getTransactionByHash};
2
2
  //# sourceMappingURL=getTransactionByHash.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../__chunks__/chunk-BZ6YK6M7.mjs";import"../../__chunks__/chunk-WPZIGJNP.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-ACY76UCX.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-66O7QA3I.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-EIFX46HX.mjs";export{a as getTransactionsByHashes};
1
+ import{a}from"../../__chunks__/chunk-EKBFVSFP.mjs";import"../../__chunks__/chunk-RVTPQ3R5.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-XGALUTQ5.mjs";import"../../__chunks__/chunk-FK6DWWZF.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-RIPIZH54.mjs";import"../../__chunks__/chunk-APCGI2A5.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-ONT6BGYB.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-CZGN3YPT.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import"../../__chunks__/chunk-2JKCBTYK.mjs";import"../../__chunks__/chunk-DA76AK4I.mjs";import"../../__chunks__/chunk-QLDZFO7M.mjs";export{a as getTransactionsByHashes};
2
2
  //# sourceMappingURL=getTransactionsByHashes.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"../__chunks__/chunk-EIFX46HX.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{n as isBrowserWithPopupConfirmation,t as isSafari};
1
+ import{a as o}from"../__chunks__/chunk-QLDZFO7M.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{n as isBrowserWithPopupConfirmation,t as isSafari};
2
2
  //# sourceMappingURL=browser.constants.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d}from"../__chunks__/chunk-S5NXWNSY.mjs";import"../__chunks__/chunk-EIFX46HX.mjs";export{d as REHYDRATE_STORE_TIMEOUT,a as persistConfig,b as storage,c as subscriptions};
1
+ import{a,b,c,d}from"../__chunks__/chunk-CT5LMMAW.mjs";import"../__chunks__/chunk-QLDZFO7M.mjs";export{d as REHYDRATE_STORE_TIMEOUT,a as persistConfig,b as storage,c as subscriptions};
2
2
  //# sourceMappingURL=storage.constants.mjs.map
@@ -1,2 +1,2 @@
1
- "use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var p=(n,o)=>{for(var e in o)i(n,e,{get:o[e],enumerable:!0})},r=(n,o,e,w)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of t(o))!f.call(n,d)&&d!==e&&i(n,d,{get:()=>o[d],enumerable:!(w=s(o,d))||w.enumerable});return n};var W=n=>r(i({},"__esModule",{value:!0}),n);var x={};p(x,{safeWindow:()=>a,version:()=>c});module.exports=W(x);const a=typeof window<"u"?window:{},c="5.5.0";0&&(module.exports={safeWindow,version});
1
+ "use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var p=(n,o)=>{for(var e in o)i(n,e,{get:o[e],enumerable:!0})},r=(n,o,e,w)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of t(o))!f.call(n,d)&&d!==e&&i(n,d,{get:()=>o[d],enumerable:!(w=s(o,d))||w.enumerable});return n};var W=n=>r(i({},"__esModule",{value:!0}),n);var x={};p(x,{safeWindow:()=>a,version:()=>c});module.exports=W(x);const a=typeof window<"u"?window:{},c="5.5.1";0&&(module.exports={safeWindow,version});
2
2
  //# sourceMappingURL=window.constants.cjs.map