@multiversx/sdk-dapp 5.0.0-alpha.10 → 5.0.0-alpha.12

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 (567) hide show
  1. package/README.md +33 -14
  2. package/out/__chunks__/{chunk-XLHFU7XR.mjs → chunk-2CXFNHMW.mjs} +2 -2
  3. package/out/__chunks__/chunk-3L2CZT3K.mjs +2 -0
  4. package/out/__chunks__/{chunk-YEXBSKXL.mjs → chunk-3LBQYLDY.mjs} +2 -2
  5. package/out/__chunks__/{chunk-B2RDSGON.mjs → chunk-3OKWBJFM.mjs} +2 -2
  6. package/out/__chunks__/{chunk-IEJARRBP.mjs → chunk-3U6H4VPO.mjs} +2 -2
  7. package/out/__chunks__/chunk-3VI66CBG.mjs +2 -0
  8. package/out/__chunks__/chunk-3ZEUVYQF.mjs +2 -0
  9. package/out/__chunks__/chunk-3ZEUVYQF.mjs.map +7 -0
  10. package/out/__chunks__/{chunk-7ECP7Y7M.mjs → chunk-5KMPEHOK.mjs} +2 -2
  11. package/out/__chunks__/{chunk-J3YO25EK.mjs → chunk-5Y7B5HHE.mjs} +2 -2
  12. package/out/__chunks__/chunk-5ZQDBRII.mjs +2 -0
  13. package/out/__chunks__/{chunk-INBKWOKQ.mjs → chunk-6BCIJI43.mjs} +2 -2
  14. package/out/__chunks__/{chunk-QKHHW26T.mjs → chunk-6MFBHFCH.mjs} +2 -2
  15. package/out/__chunks__/chunk-6UZHM5LW.mjs +2 -0
  16. package/out/__chunks__/chunk-6UZHM5LW.mjs.map +7 -0
  17. package/out/__chunks__/chunk-7K23CDCE.mjs +2 -0
  18. package/out/__chunks__/{chunk-5W4JJSFM.mjs → chunk-7RLPFF24.mjs} +2 -2
  19. package/out/__chunks__/chunk-7ZFOLOLG.mjs +2 -0
  20. package/out/__chunks__/{chunk-RHFDU5Y4.mjs → chunk-ABHYXD3U.mjs} +2 -2
  21. package/out/__chunks__/{chunk-LM5SF2NG.mjs → chunk-AGRHW2AI.mjs} +2 -2
  22. package/out/__chunks__/chunk-AKQGMP4F.mjs +2 -0
  23. package/out/__chunks__/{chunk-FUYWIC54.mjs → chunk-ALFFCAUL.mjs} +2 -2
  24. package/out/__chunks__/{chunk-IWB45745.mjs → chunk-BAZ6PY3Q.mjs} +2 -2
  25. package/out/__chunks__/{chunk-FMUDQBZE.mjs → chunk-BETSOJFK.mjs} +2 -2
  26. package/out/__chunks__/chunk-BIRGGRKG.mjs +2 -0
  27. package/out/__chunks__/{chunk-KRBUXJ6B.mjs.map → chunk-BIRGGRKG.mjs.map} +1 -1
  28. package/out/__chunks__/{chunk-QATM2UUN.mjs → chunk-BO7PXEGF.mjs} +2 -2
  29. package/out/__chunks__/chunk-CAA4VJRH.mjs +2 -0
  30. package/out/__chunks__/{chunk-QD3CFFVT.mjs.map → chunk-CAA4VJRH.mjs.map} +3 -3
  31. package/out/__chunks__/chunk-CZ2S4JFJ.mjs +2 -0
  32. package/out/__chunks__/chunk-EFI72HRK.mjs +2 -0
  33. package/out/__chunks__/chunk-ELXMMX5P.mjs +2 -0
  34. package/out/__chunks__/{chunk-ZEIGMAXW.mjs → chunk-ENELZMUN.mjs} +2 -2
  35. package/out/__chunks__/{chunk-QAVA2C6Y.mjs → chunk-EQEYL6AE.mjs} +2 -2
  36. package/out/__chunks__/chunk-FHXQ6S6U.mjs +2 -0
  37. package/out/__chunks__/{chunk-A5EXECZV.mjs → chunk-FIVH6RKU.mjs} +2 -2
  38. package/out/__chunks__/chunk-FMQYLMTU.mjs +2 -0
  39. package/out/__chunks__/chunk-FMQYLMTU.mjs.map +7 -0
  40. package/out/__chunks__/{chunk-BVYTCDU6.mjs → chunk-GD2ZQIV4.mjs} +2 -2
  41. package/out/__chunks__/{chunk-ZU4LTEAC.mjs → chunk-GDGOPAMC.mjs} +2 -2
  42. package/out/__chunks__/chunk-GNOORHJ4.mjs +2 -0
  43. package/out/__chunks__/chunk-GNOORHJ4.mjs.map +7 -0
  44. package/out/__chunks__/{chunk-ZK5BKLTG.mjs → chunk-HBIIVJA5.mjs} +2 -2
  45. package/out/__chunks__/{chunk-HQSB4ISG.mjs → chunk-HIUWEH2W.mjs} +2 -2
  46. package/out/__chunks__/{chunk-EDSX3LFL.mjs → chunk-JBHDOEYV.mjs} +2 -2
  47. package/out/__chunks__/chunk-JHWFB3CV.mjs +2 -0
  48. package/out/__chunks__/chunk-JHWFB3CV.mjs.map +7 -0
  49. package/out/__chunks__/{chunk-VCGAO6HH.mjs → chunk-JLBB5YDB.mjs} +2 -2
  50. package/out/__chunks__/chunk-JR23TXKP.mjs +2 -0
  51. package/out/__chunks__/chunk-JR23TXKP.mjs.map +7 -0
  52. package/out/__chunks__/chunk-K66JLLVW.mjs +2 -0
  53. package/out/__chunks__/{chunk-45WVS4H5.mjs.map → chunk-K66JLLVW.mjs.map} +2 -2
  54. package/out/__chunks__/{chunk-QM67ZEC5.mjs → chunk-K6SCL5VH.mjs} +2 -2
  55. package/out/__chunks__/chunk-KEGXCGMM.mjs +2 -0
  56. package/out/__chunks__/{chunk-SYQ7SILM.mjs → chunk-L2IEDKML.mjs} +2 -2
  57. package/out/__chunks__/chunk-LFLDZBSM.mjs +2 -0
  58. package/out/__chunks__/{chunk-EOX35D4L.mjs → chunk-LIPGE2RA.mjs} +2 -2
  59. package/out/__chunks__/{chunk-2ONA7QPD.mjs → chunk-LJ5JGAYL.mjs} +2 -2
  60. package/out/__chunks__/chunk-LJ6QBENT.mjs +2 -0
  61. package/out/__chunks__/chunk-LJ6QBENT.mjs.map +7 -0
  62. package/out/__chunks__/{chunk-CCDTUFFG.mjs → chunk-LOP4GEJR.mjs} +2 -2
  63. package/out/__chunks__/chunk-LPSWJPIF.mjs +2 -0
  64. package/out/__chunks__/chunk-LPSWJPIF.mjs.map +7 -0
  65. package/out/__chunks__/{chunk-YPCJBYUY.mjs → chunk-LUDF7ZUR.mjs} +2 -2
  66. package/out/__chunks__/{chunk-NBDECUQ3.mjs → chunk-MPJPXMH6.mjs} +2 -2
  67. package/out/__chunks__/{chunk-TMP3REGQ.mjs → chunk-N4HH72RP.mjs} +2 -2
  68. package/out/__chunks__/{chunk-TEPQ5G4B.mjs → chunk-NS6Y27VZ.mjs} +2 -2
  69. package/out/__chunks__/chunk-O4S5EU7O.mjs +2 -0
  70. package/out/__chunks__/{chunk-PRULMJH7.mjs → chunk-OB6ULJEV.mjs} +2 -2
  71. package/out/__chunks__/{chunk-ZMEIT65B.mjs → chunk-OD4ANAAQ.mjs} +2 -2
  72. package/out/__chunks__/{chunk-JSUJOYYB.mjs → chunk-OJCIOVNO.mjs} +2 -2
  73. package/out/__chunks__/{chunk-NHXPNROG.mjs → chunk-OJV6XRG5.mjs} +1 -1
  74. package/out/__chunks__/{chunk-NHXPNROG.mjs.map → chunk-OJV6XRG5.mjs.map} +1 -1
  75. package/out/__chunks__/{chunk-MQ5V5AJU.mjs → chunk-OSAKWW5K.mjs} +2 -2
  76. package/out/__chunks__/{chunk-QP2EL7IE.mjs → chunk-OWAJLFLR.mjs} +2 -2
  77. package/out/__chunks__/{chunk-4OEPT2V4.mjs → chunk-P3BXXGQA.mjs} +2 -2
  78. package/out/__chunks__/{chunk-7LUZJPO5.mjs → chunk-P6YSSNVX.mjs} +2 -2
  79. package/out/__chunks__/chunk-PCKOMQPW.mjs +2 -0
  80. package/out/__chunks__/{chunk-5AR7YU5K.mjs → chunk-PJDJEPY2.mjs} +2 -2
  81. package/out/__chunks__/{chunk-K3WBBSXJ.mjs → chunk-PXMPUIUL.mjs} +2 -2
  82. package/out/__chunks__/{chunk-CEDRWVRS.mjs → chunk-QATXGQVV.mjs} +2 -2
  83. package/out/__chunks__/{chunk-445MWKMT.mjs → chunk-QK4ZSYK2.mjs} +2 -2
  84. package/out/__chunks__/{chunk-DOUNJCQ4.mjs → chunk-QNZHDBC6.mjs} +2 -2
  85. package/out/__chunks__/{chunk-DOUNJCQ4.mjs.map → chunk-QNZHDBC6.mjs.map} +2 -2
  86. package/out/__chunks__/{chunk-XHIIMAIQ.mjs → chunk-QSDBTVWI.mjs} +2 -2
  87. package/out/__chunks__/{chunk-2FD2AMKA.mjs → chunk-QZ4CDIVO.mjs} +2 -2
  88. package/out/__chunks__/chunk-QZTCVQOW.mjs +2 -0
  89. package/out/__chunks__/chunk-QZTCVQOW.mjs.map +7 -0
  90. package/out/__chunks__/{chunk-I7ODJJY3.mjs → chunk-REI3WYXH.mjs} +2 -2
  91. package/out/__chunks__/{chunk-ZHGCNNB5.mjs → chunk-RM4VHHXR.mjs} +2 -2
  92. package/out/__chunks__/{chunk-XW2GCCBZ.mjs → chunk-RRKNYQ6D.mjs} +2 -2
  93. package/out/__chunks__/{chunk-SH5S4RA4.mjs → chunk-S3YBBGUM.mjs} +2 -2
  94. package/out/__chunks__/{chunk-JQEKTKZR.mjs → chunk-SO272J6E.mjs} +2 -2
  95. package/out/__chunks__/{chunk-66JBXP4O.mjs → chunk-T2ROT5W4.mjs} +2 -2
  96. package/out/__chunks__/{chunk-RI7FD4HM.mjs → chunk-TSUMQ3HX.mjs} +2 -2
  97. package/out/__chunks__/{chunk-RI7FD4HM.mjs.map → chunk-TSUMQ3HX.mjs.map} +1 -1
  98. package/out/__chunks__/chunk-TUZQU7RJ.mjs +2 -0
  99. package/out/__chunks__/chunk-TUZQU7RJ.mjs.map +7 -0
  100. package/out/__chunks__/chunk-TYS33KHK.mjs +2 -0
  101. package/out/__chunks__/{chunk-LOEJYVD2.mjs → chunk-U5RJWYZ7.mjs} +2 -2
  102. package/out/__chunks__/chunk-UAW7SD6P.mjs +2 -0
  103. package/out/__chunks__/chunk-UFI4T62Y.mjs +2 -0
  104. package/out/__chunks__/chunk-UUN37EQT.mjs +2 -0
  105. package/out/__chunks__/{chunk-S5FDHOXH.mjs → chunk-V3IKJKPE.mjs} +2 -2
  106. package/out/__chunks__/{chunk-ZHIYA3M7.mjs → chunk-VFMUFBPH.mjs} +2 -2
  107. package/out/__chunks__/chunk-VVN3GJHO.mjs +2 -0
  108. package/out/__chunks__/{chunk-IJB6XDNR.mjs → chunk-VXH564B3.mjs} +2 -2
  109. package/out/__chunks__/{chunk-7WTWD4TL.mjs → chunk-WBDC2GLI.mjs} +2 -2
  110. package/out/__chunks__/chunk-WBO5SBMK.mjs +2 -0
  111. package/out/__chunks__/chunk-WBO5SBMK.mjs.map +7 -0
  112. package/out/__chunks__/{chunk-KPDCSGZD.mjs → chunk-WEFIYM62.mjs} +2 -2
  113. package/out/__chunks__/chunk-WHEXX3BD.mjs +1 -0
  114. package/out/__chunks__/{chunk-TR6FQZGE.mjs → chunk-XGKAQORR.mjs} +2 -2
  115. package/out/__chunks__/chunk-YJCCKVIF.mjs +2 -0
  116. package/out/__chunks__/{chunk-72PZKSKF.mjs → chunk-YKGDBIKG.mjs} +2 -2
  117. package/out/__chunks__/{chunk-YQ3LRPGM.mjs → chunk-YQX4YY3Y.mjs} +2 -2
  118. package/out/__chunks__/chunk-YUITECZ5.mjs +1 -0
  119. package/out/__chunks__/chunk-YUITECZ5.mjs.map +7 -0
  120. package/out/__chunks__/{chunk-IOE5AG2R.mjs → chunk-YYQJVGEO.mjs} +2 -2
  121. package/out/__chunks__/chunk-ZD477RWI.mjs +2 -0
  122. package/out/__chunks__/chunk-ZD477RWI.mjs.map +7 -0
  123. package/out/__chunks__/{chunk-YN5ARP6C.mjs → chunk-ZKOPXJGO.mjs} +2 -2
  124. package/out/__chunks__/chunk-ZSQBHCKL.mjs +2 -0
  125. package/out/__chunks__/chunk-ZSQBHCKL.mjs.map +7 -0
  126. package/out/__chunks__/{chunk-SJYCKFH4.mjs → chunk-ZXIBFH6X.mjs} +2 -2
  127. package/out/__mocks__/accountConfig.mjs +1 -1
  128. package/out/__mocks__/data/index.mjs +1 -1
  129. package/out/__mocks__/index.mjs +1 -1
  130. package/out/__mocks__/server.mjs +1 -1
  131. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  132. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  133. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  134. package/out/apiCalls/index.mjs +1 -1
  135. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  136. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  137. package/out/apiCalls/tokens/index.mjs +1 -1
  138. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  139. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  140. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  141. package/out/constants/browser.constants.mjs +1 -1
  142. package/out/constants/index.mjs +1 -1
  143. package/out/constants/providerFactory.constants.mjs +1 -1
  144. package/out/constants/storage.constants.mjs +1 -1
  145. package/out/constants/transactions.constants.d.ts +1 -0
  146. package/out/constants/transactions.constants.js +2 -1
  147. package/out/constants/transactions.constants.js.map +1 -1
  148. package/out/constants/transactions.constants.mjs +1 -1
  149. package/out/constants/window.constants.mjs +1 -1
  150. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  151. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  152. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  153. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  154. package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +1 -1
  155. package/out/index.mjs +1 -1
  156. package/out/managers/LogoutManager/LogoutManager.d.ts +15 -0
  157. package/out/managers/LogoutManager/LogoutManager.js +137 -0
  158. package/out/managers/LogoutManager/LogoutManager.js.map +1 -0
  159. package/out/managers/LogoutManager/LogoutManager.mjs +2 -0
  160. package/out/managers/LogoutManager/LogoutManager.mjs.map +7 -0
  161. package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.d.ts +1 -0
  162. package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.js +33 -0
  163. package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.js.map +1 -0
  164. package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.mjs +2 -0
  165. package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.mjs.map +7 -0
  166. package/out/managers/LogoutManager/helpers/tests/getHumanReadableTokenExpirationTime.test.d.ts +1 -0
  167. package/out/managers/LogoutManager/helpers/tests/getHumanReadableTokenExpirationTime.test.js +48 -0
  168. package/out/managers/LogoutManager/helpers/tests/getHumanReadableTokenExpirationTime.test.js.map +1 -0
  169. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  170. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  171. package/out/managers/TransactionManager/TransactionManager.d.ts +14 -0
  172. package/out/managers/TransactionManager/TransactionManager.js +16 -0
  173. package/out/managers/TransactionManager/TransactionManager.js.map +1 -1
  174. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  175. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  176. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  177. package/out/managers/TransactionManager/helpers/getTransactionsStatus.mjs +1 -1
  178. package/out/managers/TransactionManager/helpers/sessionCallbacks.d.ts +7 -0
  179. package/out/managers/TransactionManager/helpers/sessionCallbacks.js +14 -0
  180. package/out/managers/TransactionManager/helpers/sessionCallbacks.js.map +1 -0
  181. package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs +2 -0
  182. package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs.map +7 -0
  183. package/out/managers/TransactionManager/index.mjs +1 -1
  184. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  185. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  186. package/out/managers/index.mjs +1 -1
  187. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  188. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  189. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.d.ts +0 -1
  190. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.js +7 -14
  191. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.js.map +1 -1
  192. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  193. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  194. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  195. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  196. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  197. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  198. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  199. package/out/managers/internal/ToastManager/ToastManager.d.ts +3 -1
  200. package/out/managers/internal/ToastManager/ToastManager.js +9 -2
  201. package/out/managers/internal/ToastManager/ToastManager.js.map +1 -1
  202. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  203. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  204. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  205. package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
  206. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
  207. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  208. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.js +2 -1
  209. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.js.map +1 -1
  210. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  211. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  212. package/out/managers/internal/index.mjs +1 -1
  213. package/out/methods/account/getAccount.mjs +1 -1
  214. package/out/methods/account/getAccountInfo.mjs +1 -1
  215. package/out/methods/account/getAddress.mjs +1 -1
  216. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  217. package/out/methods/account/getLatestNonce.mjs +1 -1
  218. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  219. package/out/methods/initApp/initApp.js +14 -3
  220. package/out/methods/initApp/initApp.js.map +1 -1
  221. package/out/methods/initApp/initApp.mjs +1 -1
  222. package/out/methods/initApp/initApp.mjs.map +3 -3
  223. package/out/methods/initApp/initApp.types.d.ts +34 -3
  224. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  225. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  226. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  227. package/out/methods/network/getEgldLabel.mjs +1 -1
  228. package/out/methods/network/getExplorerAddress.mjs +1 -1
  229. package/out/methods/network/getNetworkConfig.mjs +1 -1
  230. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.js +27 -10
  231. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.js.map +1 -1
  232. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  233. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  234. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  235. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.d.ts +1 -1
  236. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js +7 -2
  237. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js.map +1 -1
  238. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  239. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.d.ts +7 -0
  240. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js +24 -0
  241. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js.map +1 -0
  242. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs +2 -0
  243. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs.map +7 -0
  244. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  245. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  246. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  247. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  248. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  249. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  250. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  251. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  252. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  253. package/out/providers/DappProvider/DappProvider.js +2 -0
  254. package/out/providers/DappProvider/DappProvider.js.map +1 -1
  255. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  256. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  257. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  258. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  259. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  260. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  261. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  262. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  263. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  264. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  265. package/out/providers/DappProvider/index.mjs +1 -1
  266. package/out/providers/ProviderFactory.mjs +1 -1
  267. package/out/providers/helpers/accountProvider.mjs +1 -1
  268. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  269. package/out/providers/helpers/clearInitiatedLogins.mjs +1 -1
  270. package/out/providers/helpers/emptyProvider.mjs +1 -1
  271. package/out/providers/helpers/restoreProvider.mjs +1 -1
  272. package/out/providers/index.mjs +1 -1
  273. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  274. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  275. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  276. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  277. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  278. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  279. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  280. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  281. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  282. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  283. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  284. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  285. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  286. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  287. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  288. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  289. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  290. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  291. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  292. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js +13 -2
  293. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js.map +1 -1
  294. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  295. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  296. package/out/providers/strategies/WalletConnectProviderStrategy/types/index.mjs +1 -1
  297. package/out/providers/strategies/WalletConnectProviderStrategy/types/walletConnect.types.d.ts +1 -0
  298. package/out/providers/strategies/WalletConnectProviderStrategy/types/walletConnect.types.mjs +1 -1
  299. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js +9 -1
  300. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js.map +1 -1
  301. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  302. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  303. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  304. package/out/providers/strategies/helpers/index.mjs +1 -1
  305. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  306. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  307. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  308. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
  309. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  310. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  311. package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/getMultiEsdtTransferData.mjs +1 -1
  312. package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.mjs +1 -1
  313. package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.mjs +1 -1
  314. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  315. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  316. package/out/providers/strategies/index.mjs +1 -1
  317. package/out/providers/types/providerFactory.types.d.ts +1 -1
  318. package/out/providers/types/providerFactory.types.mjs +1 -1
  319. package/out/react/account/useGetAccount.mjs +1 -1
  320. package/out/react/account/useGetAccountInfo.mjs +1 -1
  321. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  322. package/out/react/account/useGetLatestNonce.mjs +1 -1
  323. package/out/react/index.mjs +1 -1
  324. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  325. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  326. package/out/react/store/getReactStore.mjs +1 -1
  327. package/out/react/store/useSelector.mjs +1 -1
  328. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  329. package/out/react/transactions/{useGetFailedTransactionsSessions copy.js → useGetFailedTransactionsSessions.js} +1 -1
  330. package/out/react/transactions/useGetFailedTransactionsSessions.js.map +1 -0
  331. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +2 -0
  332. package/out/react/transactions/{useGetFailedTransactionsSessions copy.mjs.map → useGetFailedTransactionsSessions.mjs.map} +1 -1
  333. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  334. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  335. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  336. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  337. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  338. package/out/services/index.mjs +1 -1
  339. package/out/services/nativeAuth/helpers/index.mjs +1 -1
  340. package/out/services/nativeAuth/index.mjs +1 -1
  341. package/out/services/nativeAuth/nativeAuth.js +6 -8
  342. package/out/services/nativeAuth/nativeAuth.js.map +1 -1
  343. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  344. package/out/store/actions/account/accountActions.mjs +1 -1
  345. package/out/store/actions/account/index.mjs +1 -1
  346. package/out/store/actions/cache/cacheActions.mjs +1 -1
  347. package/out/store/actions/cache/index.mjs +1 -1
  348. package/out/store/actions/config/configActions.mjs +1 -1
  349. package/out/store/actions/config/index.mjs +1 -1
  350. package/out/store/actions/index.mjs +1 -1
  351. package/out/store/actions/loginInfo/loginInfoActions.js.map +1 -1
  352. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  353. package/out/store/actions/network/index.mjs +1 -1
  354. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  355. package/out/store/actions/network/networkActions.mjs +1 -1
  356. package/out/store/actions/sharedActions/index.mjs +1 -1
  357. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  358. package/out/store/actions/toasts/index.mjs +1 -1
  359. package/out/store/actions/toasts/toastsActions.d.ts +1 -1
  360. package/out/store/actions/toasts/toastsActions.js +3 -1
  361. package/out/store/actions/toasts/toastsActions.js.map +1 -1
  362. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  363. package/out/store/actions/transactions/transactionsActions.d.ts +2 -2
  364. package/out/store/actions/transactions/transactionsActions.js +13 -5
  365. package/out/store/actions/transactions/transactionsActions.js.map +1 -1
  366. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  367. package/out/store/actions/ui/index.mjs +1 -1
  368. package/out/store/actions/ui/uiActions.mjs +1 -1
  369. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  370. package/out/store/middleware/index.mjs +1 -1
  371. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  372. package/out/store/selectors/index.mjs +1 -1
  373. package/out/store/slices/index.mjs +1 -1
  374. package/out/store/storage/index.mjs +1 -1
  375. package/out/store/storage/storageCallback.mjs +1 -1
  376. package/out/store/store.mjs +1 -1
  377. package/out/types/index.d.ts +1 -0
  378. package/out/types/index.js +1 -0
  379. package/out/types/index.js.map +1 -1
  380. package/out/types/index.mjs +1 -1
  381. package/out/types/theme.types.d.ts +4 -0
  382. package/out/types/theme.types.js +9 -0
  383. package/out/types/theme.types.js.map +1 -0
  384. package/out/types/theme.types.mjs +2 -0
  385. package/out/types/theme.types.mjs.map +7 -0
  386. package/out/utils/account/index.mjs +1 -1
  387. package/out/utils/account/refreshAccount.mjs +1 -1
  388. package/out/utils/createUIElement.mjs +1 -1
  389. package/out/utils/decoders/index.mjs +1 -1
  390. package/out/utils/index.d.ts +1 -0
  391. package/out/utils/index.js +1 -0
  392. package/out/utils/index.js.map +1 -1
  393. package/out/utils/index.mjs +1 -1
  394. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  395. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  396. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
  397. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
  398. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromDataField.mjs +1 -1
  399. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromOperations.mjs +1 -1
  400. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
  401. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
  402. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  403. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  404. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  405. package/out/utils/transactions/getInterpretedTransaction/helpers/getTokenFromData.mjs +1 -1
  406. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  407. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  408. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  409. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  410. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  411. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  412. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAction.mjs +1 -1
  413. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
  414. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  415. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  416. package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
  417. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  418. package/out/utils/transactions/index.mjs +1 -1
  419. package/out/utils/validation/index.mjs +1 -1
  420. package/out/utils/validation/isContract.mjs +1 -1
  421. package/out/utils/visual/index.d.ts +1 -0
  422. package/out/utils/visual/index.js +18 -0
  423. package/out/utils/visual/index.js.map +1 -0
  424. package/out/utils/visual/index.mjs +2 -0
  425. package/out/utils/visual/index.mjs.map +7 -0
  426. package/out/utils/visual/switchTheme.d.ts +2 -0
  427. package/out/utils/visual/switchTheme.js +12 -0
  428. package/out/utils/visual/switchTheme.js.map +1 -0
  429. package/out/utils/visual/switchTheme.mjs +2 -0
  430. package/out/utils/visual/switchTheme.mjs.map +7 -0
  431. package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.mjs +1 -1
  432. package/out/utils/window/getIsInIframe.mjs +1 -1
  433. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  434. package/out/utils/window/index.mjs +1 -1
  435. package/package.json +3 -3
  436. package/out/__chunks__/chunk-26XVDGTO.mjs +0 -2
  437. package/out/__chunks__/chunk-26XVDGTO.mjs.map +0 -7
  438. package/out/__chunks__/chunk-35XMV5ZL.mjs +0 -2
  439. package/out/__chunks__/chunk-45WVS4H5.mjs +0 -2
  440. package/out/__chunks__/chunk-6DNPTAY5.mjs +0 -2
  441. package/out/__chunks__/chunk-6F2QKI7Q.mjs +0 -2
  442. package/out/__chunks__/chunk-6WF4B5EG.mjs +0 -2
  443. package/out/__chunks__/chunk-76NGDJLC.mjs +0 -2
  444. package/out/__chunks__/chunk-ASWTHX52.mjs +0 -2
  445. package/out/__chunks__/chunk-BTRCRGTK.mjs +0 -2
  446. package/out/__chunks__/chunk-C5TNEYN6.mjs +0 -2
  447. package/out/__chunks__/chunk-C6E6XICI.mjs +0 -2
  448. package/out/__chunks__/chunk-CNUQX7FI.mjs +0 -2
  449. package/out/__chunks__/chunk-CNWR7SER.mjs +0 -2
  450. package/out/__chunks__/chunk-CNWR7SER.mjs.map +0 -7
  451. package/out/__chunks__/chunk-CO3V5DOG.mjs +0 -1
  452. package/out/__chunks__/chunk-D7NHU6UF.mjs +0 -2
  453. package/out/__chunks__/chunk-D7NHU6UF.mjs.map +0 -7
  454. package/out/__chunks__/chunk-DEMKQ3CQ.mjs +0 -2
  455. package/out/__chunks__/chunk-DEMKQ3CQ.mjs.map +0 -7
  456. package/out/__chunks__/chunk-DFNESXSW.mjs +0 -2
  457. package/out/__chunks__/chunk-FPHLXGAT.mjs +0 -2
  458. package/out/__chunks__/chunk-FPHLXGAT.mjs.map +0 -7
  459. package/out/__chunks__/chunk-HEKAFHIA.mjs +0 -2
  460. package/out/__chunks__/chunk-HEKAFHIA.mjs.map +0 -7
  461. package/out/__chunks__/chunk-JKSF2U3C.mjs +0 -2
  462. package/out/__chunks__/chunk-JQU6F2FL.mjs +0 -2
  463. package/out/__chunks__/chunk-JZWEJ7SP.mjs +0 -2
  464. package/out/__chunks__/chunk-KRBUXJ6B.mjs +0 -2
  465. package/out/__chunks__/chunk-N5FYAXCA.mjs +0 -2
  466. package/out/__chunks__/chunk-OUNMWRYD.mjs +0 -2
  467. package/out/__chunks__/chunk-P2C5G6H6.mjs +0 -2
  468. package/out/__chunks__/chunk-P2C5G6H6.mjs.map +0 -7
  469. package/out/__chunks__/chunk-P5RR3CVM.mjs +0 -2
  470. package/out/__chunks__/chunk-QD3CFFVT.mjs +0 -2
  471. package/out/__chunks__/chunk-UZWRIJVB.mjs +0 -2
  472. package/out/__chunks__/chunk-VSUCRJYB.mjs +0 -2
  473. package/out/__chunks__/chunk-X7NCYKWT.mjs +0 -2
  474. package/out/__chunks__/chunk-X7NCYKWT.mjs.map +0 -7
  475. package/out/__chunks__/chunk-XFZOOFY5.mjs +0 -2
  476. package/out/__chunks__/chunk-XFZOOFY5.mjs.map +0 -7
  477. package/out/__chunks__/chunk-XOJHIJKX.mjs +0 -2
  478. package/out/__chunks__/chunk-XOJHIJKX.mjs.map +0 -7
  479. package/out/__chunks__/chunk-Z6R3RDWW.mjs +0 -2
  480. package/out/react/transactions/useGetFailedTransactionsSessions copy.js.map +0 -1
  481. package/out/react/transactions/useGetFailedTransactionsSessions copy.mjs +0 -2
  482. /package/out/__chunks__/{chunk-XLHFU7XR.mjs.map → chunk-2CXFNHMW.mjs.map} +0 -0
  483. /package/out/__chunks__/{chunk-DFNESXSW.mjs.map → chunk-3L2CZT3K.mjs.map} +0 -0
  484. /package/out/__chunks__/{chunk-YEXBSKXL.mjs.map → chunk-3LBQYLDY.mjs.map} +0 -0
  485. /package/out/__chunks__/{chunk-B2RDSGON.mjs.map → chunk-3OKWBJFM.mjs.map} +0 -0
  486. /package/out/__chunks__/{chunk-IEJARRBP.mjs.map → chunk-3U6H4VPO.mjs.map} +0 -0
  487. /package/out/__chunks__/{chunk-N5FYAXCA.mjs.map → chunk-3VI66CBG.mjs.map} +0 -0
  488. /package/out/__chunks__/{chunk-7ECP7Y7M.mjs.map → chunk-5KMPEHOK.mjs.map} +0 -0
  489. /package/out/__chunks__/{chunk-J3YO25EK.mjs.map → chunk-5Y7B5HHE.mjs.map} +0 -0
  490. /package/out/__chunks__/{chunk-JKSF2U3C.mjs.map → chunk-5ZQDBRII.mjs.map} +0 -0
  491. /package/out/__chunks__/{chunk-INBKWOKQ.mjs.map → chunk-6BCIJI43.mjs.map} +0 -0
  492. /package/out/__chunks__/{chunk-QKHHW26T.mjs.map → chunk-6MFBHFCH.mjs.map} +0 -0
  493. /package/out/__chunks__/{chunk-6DNPTAY5.mjs.map → chunk-7K23CDCE.mjs.map} +0 -0
  494. /package/out/__chunks__/{chunk-5W4JJSFM.mjs.map → chunk-7RLPFF24.mjs.map} +0 -0
  495. /package/out/__chunks__/{chunk-CNUQX7FI.mjs.map → chunk-7ZFOLOLG.mjs.map} +0 -0
  496. /package/out/__chunks__/{chunk-RHFDU5Y4.mjs.map → chunk-ABHYXD3U.mjs.map} +0 -0
  497. /package/out/__chunks__/{chunk-LM5SF2NG.mjs.map → chunk-AGRHW2AI.mjs.map} +0 -0
  498. /package/out/__chunks__/{chunk-6WF4B5EG.mjs.map → chunk-AKQGMP4F.mjs.map} +0 -0
  499. /package/out/__chunks__/{chunk-FUYWIC54.mjs.map → chunk-ALFFCAUL.mjs.map} +0 -0
  500. /package/out/__chunks__/{chunk-IWB45745.mjs.map → chunk-BAZ6PY3Q.mjs.map} +0 -0
  501. /package/out/__chunks__/{chunk-FMUDQBZE.mjs.map → chunk-BETSOJFK.mjs.map} +0 -0
  502. /package/out/__chunks__/{chunk-QATM2UUN.mjs.map → chunk-BO7PXEGF.mjs.map} +0 -0
  503. /package/out/__chunks__/{chunk-C5TNEYN6.mjs.map → chunk-CZ2S4JFJ.mjs.map} +0 -0
  504. /package/out/__chunks__/{chunk-35XMV5ZL.mjs.map → chunk-EFI72HRK.mjs.map} +0 -0
  505. /package/out/__chunks__/{chunk-OUNMWRYD.mjs.map → chunk-ELXMMX5P.mjs.map} +0 -0
  506. /package/out/__chunks__/{chunk-ZEIGMAXW.mjs.map → chunk-ENELZMUN.mjs.map} +0 -0
  507. /package/out/__chunks__/{chunk-QAVA2C6Y.mjs.map → chunk-EQEYL6AE.mjs.map} +0 -0
  508. /package/out/__chunks__/{chunk-JZWEJ7SP.mjs.map → chunk-FHXQ6S6U.mjs.map} +0 -0
  509. /package/out/__chunks__/{chunk-A5EXECZV.mjs.map → chunk-FIVH6RKU.mjs.map} +0 -0
  510. /package/out/__chunks__/{chunk-BVYTCDU6.mjs.map → chunk-GD2ZQIV4.mjs.map} +0 -0
  511. /package/out/__chunks__/{chunk-ZU4LTEAC.mjs.map → chunk-GDGOPAMC.mjs.map} +0 -0
  512. /package/out/__chunks__/{chunk-ZK5BKLTG.mjs.map → chunk-HBIIVJA5.mjs.map} +0 -0
  513. /package/out/__chunks__/{chunk-HQSB4ISG.mjs.map → chunk-HIUWEH2W.mjs.map} +0 -0
  514. /package/out/__chunks__/{chunk-EDSX3LFL.mjs.map → chunk-JBHDOEYV.mjs.map} +0 -0
  515. /package/out/__chunks__/{chunk-VCGAO6HH.mjs.map → chunk-JLBB5YDB.mjs.map} +0 -0
  516. /package/out/__chunks__/{chunk-QM67ZEC5.mjs.map → chunk-K6SCL5VH.mjs.map} +0 -0
  517. /package/out/__chunks__/{chunk-P5RR3CVM.mjs.map → chunk-KEGXCGMM.mjs.map} +0 -0
  518. /package/out/__chunks__/{chunk-SYQ7SILM.mjs.map → chunk-L2IEDKML.mjs.map} +0 -0
  519. /package/out/__chunks__/{chunk-C6E6XICI.mjs.map → chunk-LFLDZBSM.mjs.map} +0 -0
  520. /package/out/__chunks__/{chunk-EOX35D4L.mjs.map → chunk-LIPGE2RA.mjs.map} +0 -0
  521. /package/out/__chunks__/{chunk-2ONA7QPD.mjs.map → chunk-LJ5JGAYL.mjs.map} +0 -0
  522. /package/out/__chunks__/{chunk-CCDTUFFG.mjs.map → chunk-LOP4GEJR.mjs.map} +0 -0
  523. /package/out/__chunks__/{chunk-YPCJBYUY.mjs.map → chunk-LUDF7ZUR.mjs.map} +0 -0
  524. /package/out/__chunks__/{chunk-NBDECUQ3.mjs.map → chunk-MPJPXMH6.mjs.map} +0 -0
  525. /package/out/__chunks__/{chunk-TMP3REGQ.mjs.map → chunk-N4HH72RP.mjs.map} +0 -0
  526. /package/out/__chunks__/{chunk-TEPQ5G4B.mjs.map → chunk-NS6Y27VZ.mjs.map} +0 -0
  527. /package/out/__chunks__/{chunk-UZWRIJVB.mjs.map → chunk-O4S5EU7O.mjs.map} +0 -0
  528. /package/out/__chunks__/{chunk-PRULMJH7.mjs.map → chunk-OB6ULJEV.mjs.map} +0 -0
  529. /package/out/__chunks__/{chunk-ZMEIT65B.mjs.map → chunk-OD4ANAAQ.mjs.map} +0 -0
  530. /package/out/__chunks__/{chunk-JSUJOYYB.mjs.map → chunk-OJCIOVNO.mjs.map} +0 -0
  531. /package/out/__chunks__/{chunk-MQ5V5AJU.mjs.map → chunk-OSAKWW5K.mjs.map} +0 -0
  532. /package/out/__chunks__/{chunk-QP2EL7IE.mjs.map → chunk-OWAJLFLR.mjs.map} +0 -0
  533. /package/out/__chunks__/{chunk-4OEPT2V4.mjs.map → chunk-P3BXXGQA.mjs.map} +0 -0
  534. /package/out/__chunks__/{chunk-7LUZJPO5.mjs.map → chunk-P6YSSNVX.mjs.map} +0 -0
  535. /package/out/__chunks__/{chunk-Z6R3RDWW.mjs.map → chunk-PCKOMQPW.mjs.map} +0 -0
  536. /package/out/__chunks__/{chunk-5AR7YU5K.mjs.map → chunk-PJDJEPY2.mjs.map} +0 -0
  537. /package/out/__chunks__/{chunk-K3WBBSXJ.mjs.map → chunk-PXMPUIUL.mjs.map} +0 -0
  538. /package/out/__chunks__/{chunk-CEDRWVRS.mjs.map → chunk-QATXGQVV.mjs.map} +0 -0
  539. /package/out/__chunks__/{chunk-445MWKMT.mjs.map → chunk-QK4ZSYK2.mjs.map} +0 -0
  540. /package/out/__chunks__/{chunk-XHIIMAIQ.mjs.map → chunk-QSDBTVWI.mjs.map} +0 -0
  541. /package/out/__chunks__/{chunk-2FD2AMKA.mjs.map → chunk-QZ4CDIVO.mjs.map} +0 -0
  542. /package/out/__chunks__/{chunk-I7ODJJY3.mjs.map → chunk-REI3WYXH.mjs.map} +0 -0
  543. /package/out/__chunks__/{chunk-ZHGCNNB5.mjs.map → chunk-RM4VHHXR.mjs.map} +0 -0
  544. /package/out/__chunks__/{chunk-XW2GCCBZ.mjs.map → chunk-RRKNYQ6D.mjs.map} +0 -0
  545. /package/out/__chunks__/{chunk-SH5S4RA4.mjs.map → chunk-S3YBBGUM.mjs.map} +0 -0
  546. /package/out/__chunks__/{chunk-JQEKTKZR.mjs.map → chunk-SO272J6E.mjs.map} +0 -0
  547. /package/out/__chunks__/{chunk-66JBXP4O.mjs.map → chunk-T2ROT5W4.mjs.map} +0 -0
  548. /package/out/__chunks__/{chunk-BTRCRGTK.mjs.map → chunk-TYS33KHK.mjs.map} +0 -0
  549. /package/out/__chunks__/{chunk-LOEJYVD2.mjs.map → chunk-U5RJWYZ7.mjs.map} +0 -0
  550. /package/out/__chunks__/{chunk-ASWTHX52.mjs.map → chunk-UAW7SD6P.mjs.map} +0 -0
  551. /package/out/__chunks__/{chunk-VSUCRJYB.mjs.map → chunk-UFI4T62Y.mjs.map} +0 -0
  552. /package/out/__chunks__/{chunk-76NGDJLC.mjs.map → chunk-UUN37EQT.mjs.map} +0 -0
  553. /package/out/__chunks__/{chunk-S5FDHOXH.mjs.map → chunk-V3IKJKPE.mjs.map} +0 -0
  554. /package/out/__chunks__/{chunk-ZHIYA3M7.mjs.map → chunk-VFMUFBPH.mjs.map} +0 -0
  555. /package/out/__chunks__/{chunk-JQU6F2FL.mjs.map → chunk-VVN3GJHO.mjs.map} +0 -0
  556. /package/out/__chunks__/{chunk-IJB6XDNR.mjs.map → chunk-VXH564B3.mjs.map} +0 -0
  557. /package/out/__chunks__/{chunk-7WTWD4TL.mjs.map → chunk-WBDC2GLI.mjs.map} +0 -0
  558. /package/out/__chunks__/{chunk-KPDCSGZD.mjs.map → chunk-WEFIYM62.mjs.map} +0 -0
  559. /package/out/__chunks__/{chunk-CO3V5DOG.mjs.map → chunk-WHEXX3BD.mjs.map} +0 -0
  560. /package/out/__chunks__/{chunk-TR6FQZGE.mjs.map → chunk-XGKAQORR.mjs.map} +0 -0
  561. /package/out/__chunks__/{chunk-6F2QKI7Q.mjs.map → chunk-YJCCKVIF.mjs.map} +0 -0
  562. /package/out/__chunks__/{chunk-72PZKSKF.mjs.map → chunk-YKGDBIKG.mjs.map} +0 -0
  563. /package/out/__chunks__/{chunk-YQ3LRPGM.mjs.map → chunk-YQX4YY3Y.mjs.map} +0 -0
  564. /package/out/__chunks__/{chunk-IOE5AG2R.mjs.map → chunk-YYQJVGEO.mjs.map} +0 -0
  565. /package/out/__chunks__/{chunk-YN5ARP6C.mjs.map → chunk-ZKOPXJGO.mjs.map} +0 -0
  566. /package/out/__chunks__/{chunk-SJYCKFH4.mjs.map → chunk-ZXIBFH6X.mjs.map} +0 -0
  567. /package/out/react/transactions/{useGetFailedTransactionsSessions copy.d.ts → useGetFailedTransactionsSessions.d.ts} +0 -0
package/README.md CHANGED
@@ -104,7 +104,14 @@ const config: InitAppType = {
104
104
  // network: { // optional
105
105
  // walletAddress: 'https://devnet-wallet.multiversx.com' // or other props you want to override
106
106
  // },
107
- successfulToastLifetime: 5000
107
+ // transactionTracking: { // optional
108
+ // successfulToastLifetime: 5000,
109
+ // onSuccess: async (sessionId) => {
110
+ // console.log('Transaction session successful', sessionId);
111
+ // },
112
+ // onFail: async (sessionId) => {
113
+ // console.log('Transaction session failed', sessionId);
114
+ // }
108
115
  }
109
116
  // customProviders: [myCustomProvider] // optional
110
117
  };
@@ -141,6 +148,30 @@ export const ConnectButton = () => {
141
148
  };
142
149
 
143
150
  ```
151
+ Once the user has logged in, if `nativeAuth` is configured in the `initApp` method, an automatic logout will be performed upon native auth expiration. Before the actual logout is performed, the `LogoutManager` will show a warning toast to the user. This toast can be customized by passing a `tokenExpirationToastWarningSeconds` to the `nativeAuth` config.
152
+
153
+ ```typescript
154
+ // in initAoo config
155
+ const config: InitAppType = {
156
+ // ...
157
+ nativeAuth: {
158
+ expirySeconds: 30, // test auto logout after 30 seconds
159
+ tokenExpirationToastWarningSeconds: 10 // show warning toast 10 seconds before auto logout
160
+ },
161
+ }
162
+ ```
163
+
164
+ You have the option to stop this behavior by calling `LogoutManager.getInstance().stop()` after the user has logged in.
165
+
166
+ ```typescript
167
+ import { LogoutManager } from '@multiversx/sdk-dapp/out/managers/LogoutManager/LogoutManager';
168
+
169
+ loginHandler: () => {
170
+ navigate('/dashboard');
171
+ // optional, to stop the automatic logout upon native auth expiration
172
+ LogoutManager.getInstance().stop();
173
+ },
174
+ ```
144
175
 
145
176
  If you want to perform some actions as soon as the user has logged in, you will need to call `ProviderFactory.create` inside a handler accepting arguments.
146
177
 
@@ -414,20 +445,8 @@ An existing provider is initialized on app load (this is take care of by `initAp
414
445
  If you need to create a custom signing provider, make sure to extend the `IProvider` interface and implement all required methods (see example [here](https://github.com/multiversx/mx-template-dapp/tree/main/src/provider)). Next step would be to include it in the `customProviders` array in the `initApp` method or add it to the [window object](https://github.com/multiversx/mx-template-dapp/tree/main/src/initConfig). Last step is to login using the custom provider.
415
446
 
416
447
  ```typescript
417
- import { ProviderTypeEnum } from '@multiversx/sdk-dapp/out/providers/types/providerFactory.types';
418
-
419
- const ADDITIONAL_PROVIDERS = {
420
- myCustomProvider: 'myCustomProvider'
421
- } as const;
422
-
423
- // do this if you want to reference it later in your code
424
- const ExtendedProviders = {
425
- ...ProviderTypeEnum,
426
- ...ADDITIONAL_PROVIDERS
427
- } as const;
428
-
429
448
  const provider = await ProviderFactory.create({
430
- type: ExtendedProviders.myCustomProvider // or add a simple string here
449
+ type: 'custom-provider'
431
450
  });
432
451
  await provider?.login();
433
452
  ```
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-YQ3LRPGM.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
- //# sourceMappingURL=chunk-XLHFU7XR.mjs.map
1
+ import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-YQX4YY3Y.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
+ //# sourceMappingURL=chunk-2CXFNHMW.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-PXMPUIUL.mjs";import{c as n}from"./chunk-QNZHDBC6.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
2
+ //# sourceMappingURL=chunk-3L2CZT3K.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-NHXPNROG.mjs";var o=s=>`Unable to perform ${s}, Provider not initialized`,e=class{init(){return Promise.resolve(!1)}login(n){throw new Error(o(`login with options: ${n}`))}logout(n){throw new Error(o(`logout with options: ${n}`))}getAccount(){throw new Error(o("unable to get account"))}setAccount(n){throw new Error(o(`unable to set account with: ${n}`))}isInitialized(){return!1}isConnected(){return!1}sendTransaction(n,r){throw new Error(o(`sendTransaction with transactions: ${n} options: ${r}`))}signTransaction(n,r){throw new Error(o(`signTransaction with transactions: ${JSON.stringify(n)} options: ${r}`))}signTransactions(n){throw new Error(o(`signTransactions with transactions: ${JSON.stringify(n)}`))}signMessage(n,r){throw new Error(o(`signMessage with ${n} and options ${r}`))}sendCustomMessage({method:n,params:r}){throw new Error(o(`sendCustomMessage with method: ${n} params: ${r}`))}sendCustomRequest(n){throw new Error(o(`sendSessionEvent with options: ${n}`))}async getAddress(){throw new Error(o("getAddress"))}getType(){return t.none}},c=new e;export{e as a,c as b};
2
- //# sourceMappingURL=chunk-YEXBSKXL.mjs.map
1
+ import{a as t}from"./chunk-OJV6XRG5.mjs";var o=s=>`Unable to perform ${s}, Provider not initialized`,e=class{init(){return Promise.resolve(!1)}login(n){throw new Error(o(`login with options: ${n}`))}logout(n){throw new Error(o(`logout with options: ${n}`))}getAccount(){throw new Error(o("unable to get account"))}setAccount(n){throw new Error(o(`unable to set account with: ${n}`))}isInitialized(){return!1}isConnected(){return!1}sendTransaction(n,r){throw new Error(o(`sendTransaction with transactions: ${n} options: ${r}`))}signTransaction(n,r){throw new Error(o(`signTransaction with transactions: ${JSON.stringify(n)} options: ${r}`))}signTransactions(n){throw new Error(o(`signTransactions with transactions: ${JSON.stringify(n)}`))}signMessage(n,r){throw new Error(o(`signMessage with ${n} and options ${r}`))}sendCustomMessage({method:n,params:r}){throw new Error(o(`sendCustomMessage with method: ${n} params: ${r}`))}sendCustomRequest(n){throw new Error(o(`sendSessionEvent with options: ${n}`))}async getAddress(){throw new Error(o("getAddress"))}getType(){return t.none}},c=new e;export{e as a,c as b};
2
+ //# sourceMappingURL=chunk-3LBQYLDY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-OA5BWGGO.mjs";import{b as s}from"./chunk-6UIF2KFV.mjs";import{a as i}from"./chunk-WE7YOBO7.mjs";var a=({loginToken:t,version:r})=>{if(!t||!r)return null;let{ledgerWithUsernames:u}=s(r),e=i(t);if(e==null)return null;let n="Confirm Ledger Address",o="Authorise Authentication Token";if(u){let m=d(e.ttl);return{data:`${e.origin} for ${m}.`,confirmAddressText:n,authText:o}}return{data:t,confirmAddressText:n,authText:o}};export{a};
2
- //# sourceMappingURL=chunk-B2RDSGON.mjs.map
1
+ import{b as s}from"./chunk-6UIF2KFV.mjs";import{a as d}from"./chunk-OA5BWGGO.mjs";import{a as i}from"./chunk-WE7YOBO7.mjs";var a=({loginToken:t,version:r})=>{if(!t||!r)return null;let{ledgerWithUsernames:u}=s(r),e=i(t);if(e==null)return null;let n="Confirm Ledger Address",o="Authorise Authentication Token";if(u){let m=d(e.ttl);return{data:`${e.origin} for ${m}.`,confirmAddressText:n,authText:o}}return{data:t,confirmAddressText:n,authText:o}};export{a};
2
+ //# sourceMappingURL=chunk-3OKWBJFM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-M3YL36ZL.mjs";import{a as o}from"./chunk-FFNSZC37.mjs";import{a as i}from"./chunk-NHXPNROG.mjs";var p=t=>(Object.values(i).forEach(r=>{if(r!==t?.skipLoginMethod)switch(r){case i.crossWindow:{let e=o.getInstance();e.isInitialized()&&e.dispose();break}case i.metamask:case i.passkey:{let e=s.getInstance();e.isInitialized()&&e.dispose();break}default:break}}),null);export{p as a};
2
- //# sourceMappingURL=chunk-IEJARRBP.mjs.map
1
+ import{a as s}from"./chunk-M3YL36ZL.mjs";import{a as o}from"./chunk-FFNSZC37.mjs";import{a as i}from"./chunk-OJV6XRG5.mjs";var p=t=>(Object.values(i).forEach(r=>{if(r!==t?.skipLoginMethod)switch(r){case i.crossWindow:{let e=o.getInstance();e.isInitialized()&&e.dispose();break}case i.metamask:case i.passkey:{let e=s.getInstance();e.isInitialized()&&e.dispose();break}default:break}}),null);export{p as a};
2
+ //# sourceMappingURL=chunk-3U6H4VPO.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-2CXFNHMW.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-3VI66CBG.mjs.map
@@ -0,0 +1,2 @@
1
+ var i={},o=({onSuccess:s,onFail:e})=>{s!=null&&(i.onSuccess=s),e!=null&&(i.onFail=e)};export{i as a,o as b};
2
+ //# sourceMappingURL=chunk-3ZEUVYQF.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/TransactionManager/helpers/sessionCallbacks.ts"],
4
+ "sourcesContent": ["export const sessionCallbacksMap: SessionCallbacksType = {};\n\ntype SessionCallbacksType = {\n onSuccess?: (sessionId: string) => Promise<void>;\n onFail?: (sessionId: string) => Promise<void>;\n};\n\nexport const registerSessionCallbacks = ({\n onSuccess,\n onFail\n}: SessionCallbacksType) => {\n if (onSuccess != null) {\n sessionCallbacksMap.onSuccess = onSuccess;\n }\n if (onFail != null) {\n sessionCallbacksMap.onFail = onFail;\n }\n};\n"],
5
+ "mappings": "AAAO,IAAMA,EAA4C,CAAC,EAO7CC,EAA2B,CAAC,CACvC,UAAAC,EACA,OAAAC,CACF,IAA4B,CACtBD,GAAa,OACfF,EAAoB,UAAYE,GAE9BC,GAAU,OACZH,EAAoB,OAASG,EAEjC",
6
+ "names": ["sessionCallbacksMap", "registerSessionCallbacks", "onSuccess", "onFail"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-VSUCRJYB.mjs";import{a as k}from"./chunk-P5RR3CVM.mjs";import{s as f}from"./chunk-DOUNJCQ4.mjs";import{d as b}from"./chunk-QJSB5NX4.mjs";import{c as n}from"./chunk-7WTWD4TL.mjs";import{b as i}from"./chunk-GGBMHKR4.mjs";async function N(){let o=f(),I=g(),s=null,t=null,l=b(o.getState())?.timestamp,c=()=>{k()},u=()=>{s??=setInterval(c,I)},m=()=>{s&&(clearInterval(s),s=null)},p=()=>{m();let a=o.subscribe(({account:{websocketEvent:e}})=>{e?.message&&l!==e.timestamp&&(l=e.timestamp,c())});n.set("websocketEventReceived",a)},S=()=>{i.status!=="not_initialized"||t||(t=setInterval(()=>{i.status==="completed"&&(clearInterval(t),t=null,p())},1e3))};c();let r=()=>{m(),t&&(clearInterval(t),t=null)},v=o.subscribe(({account:{address:a},config:{websocketStatus:e}},T)=>{if(T.config.websocketStatus!==e)switch(e){case"completed":p();break;case"pending":u(),S();break;default:a?u():r();break}});return n.set("websocketStatusChanged",v),n.set("websocketEventReceived",r),{stopTransactionsTracking:r}}export{N as a};
2
- //# sourceMappingURL=chunk-7ECP7Y7M.mjs.map
1
+ import{a as g}from"./chunk-UFI4T62Y.mjs";import{a as k}from"./chunk-KEGXCGMM.mjs";import{s as f}from"./chunk-QNZHDBC6.mjs";import{d as b}from"./chunk-QJSB5NX4.mjs";import{c as n}from"./chunk-WBDC2GLI.mjs";import{b as i}from"./chunk-GGBMHKR4.mjs";async function N(){let o=f(),I=g(),s=null,t=null,l=b(o.getState())?.timestamp,c=()=>{k()},u=()=>{s??=setInterval(c,I)},m=()=>{s&&(clearInterval(s),s=null)},p=()=>{m();let a=o.subscribe(({account:{websocketEvent:e}})=>{e?.message&&l!==e.timestamp&&(l=e.timestamp,c())});n.set("websocketEventReceived",a)},S=()=>{i.status!=="not_initialized"||t||(t=setInterval(()=>{i.status==="completed"&&(clearInterval(t),t=null,p())},1e3))};c();let r=()=>{m(),t&&(clearInterval(t),t=null)},v=o.subscribe(({account:{address:a},config:{websocketStatus:e}},T)=>{if(T.config.websocketStatus!==e)switch(e){case"completed":p();break;case"pending":u(),S();break;default:a?u():r();break}});return n.set("websocketStatusChanged",v),n.set("websocketEventReceived",r),{stopTransactionsTracking:r}}export{N as a};
2
+ //# sourceMappingURL=chunk-5KMPEHOK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-72PZKSKF.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
- //# sourceMappingURL=chunk-J3YO25EK.mjs.map
1
+ import{a as e}from"./chunk-YKGDBIKG.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
+ //# sourceMappingURL=chunk-5Y7B5HHE.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as o}from"./chunk-QNZHDBC6.mjs";import{a as t}from"./chunk-SAAOQW7P.mjs";function f(r=o()){return t(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-5ZQDBRII.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-KRBUXJ6B.mjs";var E=async({name:t,anchor:o})=>{if(await m(e),!e.document)return{};let n=e.document.createElement(t);return(o||e.document.body).appendChild(n),await customElements.whenDefined(t),n};export{E as a};
2
- //# sourceMappingURL=chunk-INBKWOKQ.mjs.map
1
+ import{a as m}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-BIRGGRKG.mjs";var E=async({name:t,anchor:o})=>{if(await m(e),!e.document)return{};let n=e.document.createElement(t);return(o||e.document.body).appendChild(n),await customElements.whenDefined(t),n};export{E as a};
2
+ //# sourceMappingURL=chunk-6BCIJI43.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{d as C,e as I}from"./chunk-QP2EL7IE.mjs";import{b}from"./chunk-ZHIYA3M7.mjs";import{s as p}from"./chunk-DOUNJCQ4.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
- //# sourceMappingURL=chunk-QKHHW26T.mjs.map
1
+ import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-VFMUFBPH.mjs";import{d as C,e as I}from"./chunk-OWAJLFLR.mjs";import{s as p}from"./chunk-QNZHDBC6.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
+ //# sourceMappingURL=chunk-6MFBHFCH.mjs.map
@@ -0,0 +1,2 @@
1
+ import e from"bignumber.js";var a=t=>{let i=new e(t).dividedBy(1e3).integerValue(e.ROUND_FLOOR),n=new e(i).dividedBy(60).integerValue(e.ROUND_FLOOR),r=new e(n).dividedBy(60).integerValue(e.ROUND_FLOOR),o=r.modulo(60).isGreaterThan(1),u=n.modulo(60).isGreaterThan(1),s=n.modulo(60).isLessThan(1);return o?`${r} hours`:u?`${n} minutes`:s?"less than 1 minute":`${n} minute`};export{a};
2
+ //# sourceMappingURL=chunk-6UZHM5LW.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.ts"],
4
+ "sourcesContent": ["import BigNumber from 'bignumber.js';\n\nexport const getHumanReadableTokenExpirationTime = (milliseconds: number) => {\n const seconds = new BigNumber(milliseconds)\n .dividedBy(1000)\n .integerValue(BigNumber.ROUND_FLOOR);\n\n const minutes = new BigNumber(seconds)\n .dividedBy(60)\n .integerValue(BigNumber.ROUND_FLOOR);\n\n const hours = new BigNumber(minutes)\n .dividedBy(60)\n .integerValue(BigNumber.ROUND_FLOOR);\n\n const overOneHour = hours.modulo(60).isGreaterThan(1);\n const overOneMinute = minutes.modulo(60).isGreaterThan(1);\n const underOneMinute = minutes.modulo(60).isLessThan(1);\n\n if (overOneHour) {\n return `${hours} hours`;\n }\n\n if (overOneMinute) {\n return `${minutes} minutes`;\n }\n\n if (underOneMinute) {\n return 'less than 1 minute';\n }\n\n return `${minutes} minute`;\n};\n"],
5
+ "mappings": "AAAA,OAAOA,MAAe,eAEf,IAAMC,EAAuCC,GAAyB,CAC3E,IAAMC,EAAU,IAAIH,EAAUE,CAAY,EACvC,UAAU,GAAI,EACd,aAAaF,EAAU,WAAW,EAE/BI,EAAU,IAAIJ,EAAUG,CAAO,EAClC,UAAU,EAAE,EACZ,aAAaH,EAAU,WAAW,EAE/BK,EAAQ,IAAIL,EAAUI,CAAO,EAChC,UAAU,EAAE,EACZ,aAAaJ,EAAU,WAAW,EAE/BM,EAAcD,EAAM,OAAO,EAAE,EAAE,cAAc,CAAC,EAC9CE,EAAgBH,EAAQ,OAAO,EAAE,EAAE,cAAc,CAAC,EAClDI,EAAiBJ,EAAQ,OAAO,EAAE,EAAE,WAAW,CAAC,EAEtD,OAAIE,EACK,GAAGD,CAAK,SAGbE,EACK,GAAGH,CAAO,WAGfI,EACK,qBAGF,GAAGJ,CAAO,SACnB",
6
+ "names": ["BigNumber", "getHumanReadableTokenExpirationTime", "milliseconds", "seconds", "minutes", "hours", "overOneHour", "overOneMinute", "underOneMinute"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{u as t}from"./chunk-QNZHDBC6.mjs";import{c as r}from"./chunk-QJSB5NX4.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-7K23CDCE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as x}from"./chunk-TMP3REGQ.mjs";import{a as k}from"./chunk-JQU6F2FL.mjs";import{a as B}from"./chunk-OUNMWRYD.mjs";import{a as b}from"./chunk-UZWRIJVB.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-ZU4LTEAC.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-VCGAO6HH.mjs";import{a as R}from"./chunk-ZMEIT65B.mjs";import{u as A}from"./chunk-DOUNJCQ4.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=k(),g=v(A()),h=B(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=x.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
- //# sourceMappingURL=chunk-5W4JJSFM.mjs.map
1
+ import{a as B}from"./chunk-VVN3GJHO.mjs";import{a as b}from"./chunk-O4S5EU7O.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-OD4ANAAQ.mjs";import{a as D}from"./chunk-GDGOPAMC.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-JLBB5YDB.mjs";import{a as O}from"./chunk-N4HH72RP.mjs";import{a as x}from"./chunk-ELXMMX5P.mjs";import{u as A}from"./chunk-QNZHDBC6.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=B(),g=v(A()),h=x(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=O.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
+ //# sourceMappingURL=chunk-7RLPFF24.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as e}from"./chunk-QNZHDBC6.mjs";import{f as t}from"./chunk-QJSB5NX4.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-7ZFOLOLG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-RYIJWGFA.mjs";import{a as i}from"./chunk-ASWTHX52.mjs";import{a}from"./chunk-HWJQUOPL.mjs";var u=t=>{let r=i(t),{failed:e,invalid:s,pending:c}=a(t),o="";e?o="faTimes":s?o="faBan":c&&(o="faHourglass");let f=(e||s)&&r.length>0?r.join(","):"",T=`${n(t.status)} ${f}`;return{icon:o,tooltip:T}};export{u as a};
2
- //# sourceMappingURL=chunk-RHFDU5Y4.mjs.map
1
+ import{a as n}from"./chunk-RYIJWGFA.mjs";import{a as i}from"./chunk-UAW7SD6P.mjs";import{a}from"./chunk-HWJQUOPL.mjs";var u=t=>{let r=i(t),{failed:e,invalid:s,pending:c}=a(t),o="";e?o="faTimes":s?o="faBan":c&&(o="faHourglass");let f=(e||s)&&r.length>0?r.join(","):"",T=`${n(t.status)} ${f}`;return{icon:o,tooltip:T}};export{u as a};
2
+ //# sourceMappingURL=chunk-ABHYXD3U.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-INBKWOKQ.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
- //# sourceMappingURL=chunk-LM5SF2NG.mjs.map
1
+ import{a as s}from"./chunk-6BCIJI43.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
+ //# sourceMappingURL=chunk-AGRHW2AI.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-UUN37EQT.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-AKQGMP4F.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-DOUNJCQ4.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
- //# sourceMappingURL=chunk-FUYWIC54.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-QNZHDBC6.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
+ //# sourceMappingURL=chunk-ALFFCAUL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-DOUNJCQ4.mjs";import{e as a}from"./chunk-QJSB5NX4.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t||n.nonce,c)}export{x as a};
2
- //# sourceMappingURL=chunk-IWB45745.mjs.map
1
+ import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-QNZHDBC6.mjs";import{e as a}from"./chunk-QJSB5NX4.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t||n.nonce,c)}export{x as a};
2
+ //# sourceMappingURL=chunk-BAZ6PY3Q.mjs.map
@@ -1,6 +1,6 @@
1
- import{h}from"./chunk-OEPTRJEB.mjs";import{a as g}from"./chunk-HH5SA7BX.mjs";import{a as m,b as D}from"./chunk-WRLZ5ICK.mjs";import{a as f}from"./chunk-I3MK6KZJ.mjs";import{Address as V}from"@multiversx/sdk-core";import y from"bignumber.js";var x=e=>{let r=[];return e&&!m(e)&&r.push(`Invalid Hex characters on argument @${e}`),e&&!D(e)&&r.push(`Odd number of Hex characters on argument @${e}`),r},a=(e,r,n)=>{switch(r){case"text":try{return Buffer.from(e,"hex").toString("utf8")}catch{return e}case"decimal":return e!==""?new y(e,16).toString(10):"";case"smart":try{let t=V.newFromHex(e).toString();if(f(t))return t}catch{}try{let t=Buffer.from(e,"hex").toString("utf8");if(g(t))return t;{if(n&&[...n.esdts,...n.nfts].some(s=>t.includes(s)))return t;let i=new y(e,16);return i.isFinite()?i.toString(10):e}}catch{return e}case"raw":default:return e}},P=({parts:e,decodedParts:r,identifier:n})=>{let t=[...r];if(e[0]==="ESDTNFTTransfer"&&e[2]&&(t[2]=a(e[2],"decimal")),n==="ESDTNFTTransfer"&&e[1]){let i=Buffer.from(String(e[1]),"base64");t[1]=a(i.toString("hex"),"decimal")}return t},E=({parts:e,decodeMethod:r,identifier:n,decodedData:t})=>{let i=e.map((s,d)=>{if(e.length>=2&&(d===0&&s.length<64||d===1&&!e[0]))return/[^a-z0-9]/gi.test(s)?a(s,r):s;let c=x(s);return c?.length&&(t.validationWarnings=Array.from(new Set([...t.validationWarnings,...c]))),a(s,r)});return r==="smart"?P({parts:e,decodedParts:i,identifier:n}):i},T=({parts:e,decodeMethod:r,identifier:n,initialDecodedParts:t})=>r==="smart"?P({parts:e,decodedParts:t,identifier:n}):t,p=({data:e,identifier:r,decodeMethod:n,delimiter:t})=>{let i=e.split("@"),o=i.map(d=>a(d,n));return T({parts:i,initialDecodedParts:o,identifier:r,decodeMethod:n}).join(t)},H=({data:e,identifier:r,decodeMethod:n,highlight:t})=>{let i={displayValue:"",validationWarnings:[],highlight:t},o=e.includes("@"),s=e.includes(`
1
+ import{h}from"./chunk-OEPTRJEB.mjs";import{a as D}from"./chunk-HH5SA7BX.mjs";import{a as f,b as m}from"./chunk-WRLZ5ICK.mjs";import{a as g}from"./chunk-I3MK6KZJ.mjs";import{Address as V}from"@multiversx/sdk-core";import y from"bignumber.js";var x=e=>{let r=[];return e&&!f(e)&&r.push(`Invalid Hex characters on argument @${e}`),e&&!m(e)&&r.push(`Odd number of Hex characters on argument @${e}`),r},a=(e,r,n)=>{switch(r){case"text":try{return Buffer.from(e,"hex").toString("utf8")}catch{return e}case"decimal":return e!==""?new y(e,16).toString(10):"";case"smart":try{let t=V.newFromHex(e).toString();if(g(t))return t}catch{}try{let t=Buffer.from(e,"hex").toString("utf8");if(D(t))return t;{if(n&&[...n.esdts,...n.nfts].some(s=>t.includes(s)))return t;let i=new y(e,16);return i.isFinite()?i.toString(10):e}}catch{return e}case"raw":default:return e}},P=({parts:e,decodedParts:r,identifier:n})=>{let t=[...r];if(e[0]==="ESDTNFTTransfer"&&e[2]&&(t[2]=a(e[2],"decimal")),n==="ESDTNFTTransfer"&&e[1]){let i=Buffer.from(String(e[1]),"base64");t[1]=a(i.toString("hex"),"decimal")}return t},E=({parts:e,decodeMethod:r,identifier:n,decodedData:t})=>{let i=e.map((s,d)=>{if(e.length>=2&&(d===0&&s.length<64||d===1&&!e[0]))return/[^a-z0-9]/gi.test(s)?a(s,r):s;let c=x(s);return c?.length&&(t.validationWarnings=Array.from(new Set([...t.validationWarnings,...c]))),a(s,r)});return r==="smart"?P({parts:e,decodedParts:i,identifier:n}):i},T=({parts:e,decodeMethod:r,identifier:n,initialDecodedParts:t})=>r==="smart"?P({parts:e,decodedParts:t,identifier:n}):t,p=({data:e,identifier:r,decodeMethod:n,delimiter:t})=>{let i=e.split("@"),o=i.map(d=>a(d,n));return T({parts:i,initialDecodedParts:o,identifier:r,decodeMethod:n}).join(t)},H=({data:e,identifier:r,decodeMethod:n,highlight:t})=>{let i={displayValue:"",validationWarnings:[],highlight:t},o=e.includes("@"),s=e.includes(`
2
2
  `);if(!o&&!s)return{...i,displayValue:a(e,n),highlight:t&&a(t,n)};if(o){let d=e.split("@"),c=E({parts:d,decodeMethod:n,identifier:r,decodedData:i}),l=t?p({data:t,identifier:r,decodeMethod:n,delimiter:"@"}):null;return{...i,displayValue:c.join("@"),highlight:l}}if(s){let d=e.split(`
3
3
  `),c=d.map(u=>n==="raw"?u:a(Buffer.from(u,"base64").toString("hex"),n)),l=T({parts:d,initialDecodedParts:c,identifier:r,decodeMethod:n}),S=t?p({data:t,identifier:r,decodeMethod:n,delimiter:`
4
4
  `}):null;return{...i,displayValue:l.join(`
5
5
  `),highlight:S}}return i},k=({data:e,highlight:r,identifier:n})=>{let t={};return Object.values(h).forEach(i=>{let o=H({data:e,identifier:n,decodeMethod:i,highlight:r});t[i]=o}),t};export{k as a};
6
- //# sourceMappingURL=chunk-FMUDQBZE.mjs.map
6
+ //# sourceMappingURL=chunk-BETSOJFK.mjs.map
@@ -0,0 +1,2 @@
1
+ var o=typeof window<"u"?window:{},n="5.0.0-alpha.12";export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-BIRGGRKG.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/window.constants.ts"],
4
- "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.0-alpha.10'; // will be replaced at build time\n"],
4
+ "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.0-alpha.12'; // will be replaced at build time\n"],
5
5
  "mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
6
6
  "names": ["safeWindow", "version"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-JKSF2U3C.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-J4CPYFK6.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
- //# sourceMappingURL=chunk-QATM2UUN.mjs.map
1
+ import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-5ZQDBRII.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-J4CPYFK6.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
+ //# sourceMappingURL=chunk-BO7PXEGF.mjs.map
@@ -0,0 +1,2 @@
1
+ var _="cancel-transaction-toast",T="error-signing-toast",A=6e3,S=5,t=9e4,R=6e5,o=1e4,E="-",N=75,O=25,I=100,n=5e3;export{_ as a,T as b,A as c,S as d,t as e,R as f,o as g,E as h,N as i,O as j,I as k,n as l};
2
+ //# sourceMappingURL=chunk-CAA4VJRH.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/transactions.constants.ts"],
4
- "sourcesContent": ["export const CANCEL_TRANSACTION_TOAST_ID = 'cancel-transaction-toast';\nexport const ERROR_SIGNING_TOAST_ID = 'error-signing-toast';\nexport const AVERAGE_TX_DURATION_MS = 6000;\nexport const CROSS_SHARD_ROUNDS = 5;\nexport const TRANSACTIONS_STATUS_POLLING_INTERVAL_MS = 90 * 1000; // 90sec\nexport const TRANSACTIONS_STATUS_DROP_INTERVAL_MS = 10 * 60 * 1000; // 10min\nexport const CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION = 10000;\nexport const BATCH_TRANSACTIONS_ID_SEPARATOR = '-';\nexport const SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 75;\nexport const CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 25;\nexport const PROGRESS_INTERVAL_DURATION_MS = 100;\n"],
5
- "mappings": "AAAO,IAAMA,EAA8B,2BAC9BC,EAAyB,sBACzBC,EAAyB,IACzBC,EAAqB,EACrBC,EAA0C,IAC1CC,EAAuC,IACvCC,EAA4C,IAC5CC,EAAkC,IAClCC,EAA8C,GAC9CC,EAA+C,GAC/CC,EAAgC",
6
- "names": ["CANCEL_TRANSACTION_TOAST_ID", "ERROR_SIGNING_TOAST_ID", "AVERAGE_TX_DURATION_MS", "CROSS_SHARD_ROUNDS", "TRANSACTIONS_STATUS_POLLING_INTERVAL_MS", "TRANSACTIONS_STATUS_DROP_INTERVAL_MS", "CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION", "BATCH_TRANSACTIONS_ID_SEPARATOR", "SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "PROGRESS_INTERVAL_DURATION_MS"]
4
+ "sourcesContent": ["export const CANCEL_TRANSACTION_TOAST_ID = 'cancel-transaction-toast';\nexport const ERROR_SIGNING_TOAST_ID = 'error-signing-toast';\nexport const AVERAGE_TX_DURATION_MS = 6000;\nexport const CROSS_SHARD_ROUNDS = 5;\nexport const TRANSACTIONS_STATUS_POLLING_INTERVAL_MS = 90 * 1000; // 90sec\nexport const TRANSACTIONS_STATUS_DROP_INTERVAL_MS = 10 * 60 * 1000; // 10min\nexport const CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION = 10000;\nexport const BATCH_TRANSACTIONS_ID_SEPARATOR = '-';\nexport const SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 75;\nexport const CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 25;\nexport const PROGRESS_INTERVAL_DURATION_MS = 100;\nexport const DEFAULT_TOAST_LIEFTIME = 5000;\n"],
5
+ "mappings": "AAAO,IAAMA,EAA8B,2BAC9BC,EAAyB,sBACzBC,EAAyB,IACzBC,EAAqB,EACrBC,EAA0C,IAC1CC,EAAuC,IACvCC,EAA4C,IAC5CC,EAAkC,IAClCC,EAA8C,GAC9CC,EAA+C,GAC/CC,EAAgC,IAChCC,EAAyB",
6
+ "names": ["CANCEL_TRANSACTION_TOAST_ID", "ERROR_SIGNING_TOAST_ID", "AVERAGE_TX_DURATION_MS", "CROSS_SHARD_ROUNDS", "TRANSACTIONS_STATUS_POLLING_INTERVAL_MS", "TRANSACTIONS_STATUS_DROP_INTERVAL_MS", "CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION", "BATCH_TRANSACTIONS_ID_SEPARATOR", "SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "PROGRESS_INTERVAL_DURATION_MS", "DEFAULT_TOAST_LIEFTIME"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-YJCCKVIF.mjs";import{a as f}from"./chunk-ELXMMX5P.mjs";import{j as m,k as d,l as p,n as u}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-YQX4YY3Y.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=l(),F=f();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await T({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=u(s),E=p(s),L=d(s),i=A||E||L,v=m(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
2
+ //# sourceMappingURL=chunk-CZ2S4JFJ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as n}from"./chunk-QNZHDBC6.mjs";import{b as t}from"./chunk-UTWIKUIK.mjs";var c=a=>t(`transaction-${a}`)(n().getState())??null;export{c as a};
2
+ //# sourceMappingURL=chunk-EFI72HRK.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as t}from"./chunk-QNZHDBC6.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";function g(r=t()){return e(r).egldLabel}export{g as a};
2
+ //# sourceMappingURL=chunk-ELXMMX5P.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-J3YO25EK.mjs";import{b as r}from"./chunk-IOE5AG2R.mjs";import{u as i}from"./chunk-DOUNJCQ4.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
- //# sourceMappingURL=chunk-ZEIGMAXW.mjs.map
1
+ import{a as n}from"./chunk-5Y7B5HHE.mjs";import{b as r}from"./chunk-YYQJVGEO.mjs";import{u as i}from"./chunk-QNZHDBC6.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
+ //# sourceMappingURL=chunk-ENELZMUN.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as p}from"./chunk-RHFDU5Y4.mjs";import{b as m}from"./chunk-XW2GCCBZ.mjs";import{a as k}from"./chunk-B72JAXSF.mjs";import{a as g}from"./chunk-6GREKTLP.mjs";import{a as f}from"./chunk-ZJ2WPN2K.mjs";import{a as d}from"./chunk-HS34AFHY.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a}from"./chunk-B3IKUIRK.mjs";import{a as r}from"./chunk-BRJNX4JF.mjs";import{a as t}from"./chunk-DBIIY2TX.mjs";import{a as s}from"./chunk-BSWV5MEC.mjs";function z({transaction:e,address:h,explorerAddress:o}){let y=e.tokenIdentifier??m(e.data).tokenId,n=d(e),u=f(e),l={timeAgo:c(e.timestamp*1e3,!0),tooltip:a({value:e.timestamp,noSeconds:!1,utc:!0})},v=k({address:h,transaction:e,receiver:n}),I={actionDescription:e.action?.description,name:T(e)},S=g(e),D=r({explorerAddress:o,to:t.accountDetails(e.sender)}),L=r({explorerAddress:o,to:t.accountDetails(n)}),A=r({explorerAddress:o,to:t.senderShard(e.senderShard)}),H=r({explorerAddress:o,to:t.receiverShard(e.receiverShard)}),i=e.originalTxHash||e.txHash,x=r({explorerAddress:o,to:t.transactionDetails(i)});return{...e,txHash:i,tokenIdentifier:y,receiver:n,receiverAssets:u,transactionDetails:{age:l,direction:v,method:I,iconInfo:p(e),transactionTokens:S,isContract:s(e.sender)},links:{senderLink:D,receiverLink:L,senderShardLink:A,receiverShardLink:H,transactionLink:x}}}export{z as a};
2
- //# sourceMappingURL=chunk-QAVA2C6Y.mjs.map
1
+ import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a as p}from"./chunk-ABHYXD3U.mjs";import{b as m}from"./chunk-RRKNYQ6D.mjs";import{a as k}from"./chunk-B72JAXSF.mjs";import{a as g}from"./chunk-6GREKTLP.mjs";import{a as f}from"./chunk-ZJ2WPN2K.mjs";import{a as d}from"./chunk-HS34AFHY.mjs";import{a}from"./chunk-B3IKUIRK.mjs";import{a as r}from"./chunk-BRJNX4JF.mjs";import{a as t}from"./chunk-DBIIY2TX.mjs";import{a as s}from"./chunk-BSWV5MEC.mjs";function z({transaction:e,address:h,explorerAddress:o}){let y=e.tokenIdentifier??m(e.data).tokenId,n=d(e),u=f(e),l={timeAgo:c(e.timestamp*1e3,!0),tooltip:a({value:e.timestamp,noSeconds:!1,utc:!0})},v=k({address:h,transaction:e,receiver:n}),I={actionDescription:e.action?.description,name:T(e)},S=g(e),D=r({explorerAddress:o,to:t.accountDetails(e.sender)}),L=r({explorerAddress:o,to:t.accountDetails(n)}),A=r({explorerAddress:o,to:t.senderShard(e.senderShard)}),H=r({explorerAddress:o,to:t.receiverShard(e.receiverShard)}),i=e.originalTxHash||e.txHash,x=r({explorerAddress:o,to:t.transactionDetails(i)});return{...e,txHash:i,tokenIdentifier:y,receiver:n,receiverAssets:u,transactionDetails:{age:l,direction:v,method:I,iconInfo:p(e),transactionTokens:S,isContract:s(e.sender)},links:{senderLink:D,receiverLink:L,senderShardLink:A,receiverShardLink:H,transactionLink:x}}}export{z as a};
2
+ //# sourceMappingURL=chunk-EQEYL6AE.mjs.map
@@ -0,0 +1,2 @@
1
+ import{d as p}from"./chunk-LPSWJPIF.mjs";import{a as f}from"./chunk-7ZFOLOLG.mjs";import{s as n}from"./chunk-LJ6QBENT.mjs";import{u as i}from"./chunk-QNZHDBC6.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-OJV6XRG5.mjs";import{a as m}from"./chunk-T2ROT5W4.mjs";async function y(){let c=m(),s=f(),r=c?e.webview:t(i());if(!r)return;let o=await p.create({type:r});if(!o)throw new Error("Provider not found");!s&&r===e.webview&&await o.login(),n(o)}export{y as a};
2
+ //# sourceMappingURL=chunk-FHXQ6S6U.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-JIJSBQEU.mjs";import{a as n}from"./chunk-3FXHIV6O.mjs";import{c as a,f as o}from"./chunk-J4CPYFK6.mjs";var k=u=>{let i=u.map(e=>{let{isNft:l}=n(e.type);if(l){let{badgeText:t,tokenFormattedAmount:p,tokenLinkText:T}=r({token:e});return`${t!=null?`(${t}) `:""}${p} ${T}`}let m=e.value?o({input:e.value,decimals:e.decimals??a,digits:2,addCommas:!0}):null,d=e.collection?e.identifier:e.token;return`${m} ${e.ticker} (${d})`});return decodeURI(i.join("%0A"))};export{k as a};
2
- //# sourceMappingURL=chunk-A5EXECZV.mjs.map
1
+ import{a as r}from"./chunk-JIJSBQEU.mjs";import{c as a,f as o}from"./chunk-J4CPYFK6.mjs";import{a as n}from"./chunk-3FXHIV6O.mjs";var k=u=>{let i=u.map(e=>{let{isNft:l}=n(e.type);if(l){let{badgeText:t,tokenFormattedAmount:p,tokenLinkText:T}=r({token:e});return`${t!=null?`(${t}) `:""}${p} ${T}`}let m=e.value?o({input:e.value,decimals:e.decimals??a,digits:2,addCommas:!0}):null,d=e.collection?e.identifier:e.token;return`${m} ${e.ticker} (${d})`});return decodeURI(i.join("%0A"))};export{k as a};
2
+ //# sourceMappingURL=chunk-FIVH6RKU.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-3ZEUVYQF.mjs";async function l({sessionId:s,status:a}){let{onSuccess:n,onFail:c}=e;if(!(!n||!c||a==null))switch(a){case"success":await n?.(s);break;case"fail":case"cancelled":case"timedOut":case"invalid":await c?.(s);break}}export{l as a};
2
+ //# sourceMappingURL=chunk-FMQYLMTU.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.ts"],
4
+ "sourcesContent": ["import { sessionCallbacksMap } from 'managers/TransactionManager/helpers/sessionCallbacks';\nimport { TransactionBatchStatusesEnum } from 'types/enums.types';\n\ninterface runSessionCallbacksPropsType {\n sessionId: string;\n status?: TransactionBatchStatusesEnum | null;\n}\n\nexport async function runSessionCallbacks({\n sessionId,\n status\n}: runSessionCallbacksPropsType) {\n const { onSuccess, onFail } = sessionCallbacksMap;\n\n if (!onSuccess || !onFail || status == null) {\n return;\n }\n\n switch (status) {\n case TransactionBatchStatusesEnum.success:\n await onSuccess?.(sessionId);\n break;\n case TransactionBatchStatusesEnum.fail:\n case TransactionBatchStatusesEnum.cancelled:\n case TransactionBatchStatusesEnum.timedOut:\n case TransactionBatchStatusesEnum.invalid:\n await onFail?.(sessionId);\n break;\n }\n}\n"],
5
+ "mappings": "yCAQA,eAAsBA,EAAoB,CACxC,UAAAC,EACA,OAAAC,CACF,EAAiC,CAC/B,GAAM,CAAE,UAAAC,EAAW,OAAAC,CAAO,EAAIC,EAE9B,GAAI,GAACF,GAAa,CAACC,GAAUF,GAAU,MAIvC,OAAQA,EAAQ,CACd,cACE,MAAMC,IAAYF,CAAS,EAC3B,MACF,WACA,gBACA,eACA,cACE,MAAMG,IAASH,CAAS,EACxB,KACJ,CACF",
6
+ "names": ["runSessionCallbacks", "sessionId", "status", "onSuccess", "onFail", "sessionCallbacksMap"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-LOEJYVD2.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
- //# sourceMappingURL=chunk-BVYTCDU6.mjs.map
1
+ import{a as e}from"./chunk-U5RJWYZ7.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
+ //# sourceMappingURL=chunk-GD2ZQIV4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as O}from"./chunk-6F2QKI7Q.mjs";import{a as $}from"./chunk-O3V4TGXK.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-FMUDQBZE.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as _}from"./chunk-AV4HSXYZ.mjs";import{a as w}from"./chunk-YTFYVPZO.mjs";import{a as x}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-ZK5BKLTG.mjs";import{a as G}from"./chunk-RYIJWGFA.mjs";import{p as h}from"./chunk-P2C5G6H6.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-J4CPYFK6.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-KRBUXJ6B.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await v({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=x({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=h().getType(),at=G(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=O(),pt=L({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
2
- //# sourceMappingURL=chunk-ZU4LTEAC.mjs.map
1
+ import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-O3V4TGXK.mjs";import{a as _}from"./chunk-AV4HSXYZ.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-BETSOJFK.mjs";import{a as w}from"./chunk-YTFYVPZO.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-HBIIVJA5.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{t as G}from"./chunk-LJ6QBENT.mjs";import{a as L}from"./chunk-YJCCKVIF.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-J4CPYFK6.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-BIRGGRKG.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await x({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=O({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=G().getType(),at=v(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=L(),pt=h({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
2
+ //# sourceMappingURL=chunk-GDGOPAMC.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-QK4ZSYK2.mjs";import{a as o}from"./chunk-OJV6XRG5.mjs";import{a as e,b as t}from"./chunk-BIRGGRKG.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
2
+ //# sourceMappingURL=chunk-GNOORHJ4.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.ts"],
4
+ "sourcesContent": ["import { WebviewProvider } from '@multiversx/sdk-webview-provider/out/WebviewProvider';\nimport { safeWindow, version } from 'constants/window.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';\n\ntype WebviewProviderProps = {\n address?: string;\n};\n\nexport class WebviewProviderStrategy extends BaseProviderStrategy {\n private readonly provider: WebviewProvider;\n\n constructor(config?: WebviewProviderProps) {\n super(config?.address);\n this.provider = WebviewProvider.getInstance({\n resetStateCallback: () => {\n /* \n Used in Hub to clear storage when logging out via the hub header.\n */\n safeWindow.localStorage?.clear?.();\n safeWindow.sessionStorage?.clear?.();\n }\n });\n\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 logout(): Promise<boolean> {\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.webview;\n }\n\n getAddress(): Promise<string | undefined> {\n throw new Error('Method not implemented.');\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 private async initializeProvider() {\n const isInitialized = await this.provider.init(version);\n\n if (this.address) {\n this.setAccount({ address: this.address });\n }\n\n return isInitialized;\n }\n\n cancelAction = async () => {\n this.provider.cancelAction();\n };\n\n signTransactions = async (transactions: Transaction[]) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n const signedTransactions =\n await this.provider.signTransactions(transactions);\n return signedTransactions || [];\n } catch (error) {\n this.cancelAction();\n throw error;\n }\n };\n\n signMessage = async (message: Message) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n const signedMessage = await this.provider.signMessage(message);\n return signedMessage;\n } catch (error) {\n this.cancelAction();\n throw error;\n }\n };\n}\n"],
5
+ "mappings": "kIAAA,OAAS,mBAAAA,MAAuB,uDAezB,IAAMC,EAAN,cAAsCC,CAAqB,CAGhE,YAAYC,EAA+B,CACzC,MAAMA,GAAQ,OAAO,EAiDvB,kBAAe,SAAY,CACzB,KAAK,SAAS,aAAa,CAC7B,EAEA,sBAAmB,MAAOC,GAAgC,CACxD,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,GAAI,CAGF,OADE,MAAM,KAAK,SAAS,iBAAiBA,CAAY,GACtB,CAAC,CAChC,OAASC,EAAO,CACd,WAAK,aAAa,EACZA,CACR,CACF,EAEA,iBAAc,MAAOC,GAAqB,CACxC,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,GAAI,CAEF,OADsB,MAAM,KAAK,SAAS,YAAYA,CAAO,CAE/D,OAASD,EAAO,CACd,WAAK,aAAa,EACZA,CACR,CACF,EA/EE,KAAK,SAAWE,EAAgB,YAAY,CAC1C,mBAAoB,IAAM,CAIxBC,EAAW,cAAc,QAAQ,EACjCA,EAAW,gBAAgB,QAAQ,CACrC,CACF,CAAC,EAED,KAAK,OAAS,KAAK,SAAS,MAAM,KAAK,KAAK,QAAQ,CACtD,CAEA,MAAM,MAAyB,CAC7B,YAAK,kBAAkB,EAChB,KAAK,mBAAmB,CACjC,CAEA,QAA2B,CACzB,OAAO,KAAK,SAAS,OAAO,CAC9B,CAEA,SAAwB,CACtB,OAAOC,EAAiB,OAC1B,CAEA,YAA0C,CACxC,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CAEA,WAAWC,EAAqC,CAC9C,OAAO,KAAK,SAAS,WAAWA,CAAO,CACzC,CAEA,eAAyB,CACvB,OAAO,KAAK,SAAS,cAAc,CACrC,CAEA,MAAc,oBAAqB,CACjC,IAAMC,EAAgB,MAAM,KAAK,SAAS,KAAKC,CAAO,EAEtD,OAAI,KAAK,SACP,KAAK,WAAW,CAAE,QAAS,KAAK,OAAQ,CAAC,EAGpCD,CACT,CAkCF",
6
+ "names": ["WebviewProvider", "WebviewProviderStrategy", "BaseProviderStrategy", "config", "transactions", "error", "message", "WebviewProvider", "safeWindow", "ProviderTypeEnum", "account", "isInitialized", "version"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-HBQQS6GA.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";import{u as m}from"./chunk-DOUNJCQ4.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-ZK5BKLTG.mjs.map
1
+ import{a as g}from"./chunk-HBQQS6GA.mjs";import{u as m}from"./chunk-QNZHDBC6.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-HBIIVJA5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-7CA6UKPK.mjs";import{b as T}from"./chunk-ZHGCNNB5.mjs";import{c}from"./chunk-TI37DKBT.mjs";function D({transactions:i}){let e=[],o={};return!i||i.length===0?{allTransactions:e,parsedTransactionsByDataField:o}:(i.forEach((n,m)=>{let p=c(n.data.toString()??""),s=u(p);if(s.length>0)s.forEach((t,a)=>{let r=a===s.length-1,l={transaction:n,multiTxData:t.data,transactionIndex:a,needsSigning:r};o[t.data]={tokenId:t.token?t.token:"",amount:t.amount?t.amount:"",type:t.type,nonce:t.nonce?t.nonce:"",multiTxData:t.data,receiver:t.receiver},e.push(l)});else{let t=c(n.data.toString()??""),{tokenId:a,amount:r}=T(t);a&&(o[t]={tokenId:a,amount:r,receiver:n.receiver.toBech32()}),e.push({transaction:n,transactionIndex:m,multiTxData:t,needsSigning:!0})}}),{allTransactions:e,parsedTransactionsByDataField:o})}export{D as a};
2
- //# sourceMappingURL=chunk-HQSB4ISG.mjs.map
1
+ import{a as u}from"./chunk-7CA6UKPK.mjs";import{b as T}from"./chunk-RM4VHHXR.mjs";import{c}from"./chunk-TI37DKBT.mjs";function D({transactions:i}){let e=[],o={};return!i||i.length===0?{allTransactions:e,parsedTransactionsByDataField:o}:(i.forEach((n,m)=>{let p=c(n.data.toString()??""),s=u(p);if(s.length>0)s.forEach((t,a)=>{let r=a===s.length-1,l={transaction:n,multiTxData:t.data,transactionIndex:a,needsSigning:r};o[t.data]={tokenId:t.token?t.token:"",amount:t.amount?t.amount:"",type:t.type,nonce:t.nonce?t.nonce:"",multiTxData:t.data,receiver:t.receiver},e.push(l)});else{let t=c(n.data.toString()??""),{tokenId:a,amount:r}=T(t);a&&(o[t]={tokenId:a,amount:r,receiver:n.receiver.toBech32()}),e.push({transaction:n,transactionIndex:m,multiTxData:t,needsSigning:!0})}}),{allTransactions:e,parsedTransactionsByDataField:o})}export{D as a};
2
+ //# sourceMappingURL=chunk-HIUWEH2W.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-LM5SF2NG.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-EDSX3LFL.mjs.map
1
+ import{a as i}from"./chunk-AGRHW2AI.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-JBHDOEYV.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as u}from"./chunk-L3MWDI6J.mjs";import{s as i}from"./chunk-QNZHDBC6.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
2
+ //# sourceMappingURL=chunk-JHWFB3CV.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/actions/transactions/transactionsActions.ts"],
4
+ "sourcesContent": ["import { getTransactionsSessionStatus } from 'managers/TransactionManager/helpers/getTransactionsStatus';\nimport { getStore } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport {\n TransactionsDisplayInfoType,\n SignedTransactionType\n} from 'types/transactions.types';\n\nexport type CreateTransactionsSessionType = {\n transactions: SignedTransactionType[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n status: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n sessionInformation?: any;\n};\n\nexport const createTransactionsSession = ({\n transactions,\n transactionsDisplayInfo,\n status,\n sessionInformation\n}: CreateTransactionsSessionType) => {\n const sessionId = Date.now().toString();\n getStore().setState(\n ({ transactions: state }) => {\n state[sessionId] = {\n transactions,\n status,\n transactionsDisplayInfo,\n interpretedTransactions: {},\n sessionInformation\n };\n },\n false,\n 'createTransactionsSession'\n );\n return sessionId;\n};\n\nexport const updateSessionStatus = ({\n sessionId,\n status,\n errorMessage\n}: {\n sessionId: string;\n status: TransactionBatchStatusesEnum;\n errorMessage?: string;\n}) => {\n getStore().setState(\n ({ transactions: state }) => {\n state[sessionId].status = status;\n state[sessionId].errorMessage = errorMessage;\n },\n false,\n 'updateTransactionsSession'\n );\n};\n\nexport const updateTransactionStatus = ({\n sessionId,\n transaction: updatedTransaction\n}: {\n sessionId: string;\n transaction: SignedTransactionType;\n}): TransactionBatchStatusesEnum | null => {\n let newStatus: TransactionBatchStatusesEnum | null = null;\n getStore().setState(\n ({ transactions: state }) => {\n const transactions = state[sessionId]?.transactions;\n if (transactions != null) {\n state[sessionId].transactions = transactions.map((transaction) => {\n if (transaction.hash === updatedTransaction.hash) {\n return {\n ...transaction,\n ...(updatedTransaction ?? {})\n };\n }\n return transaction;\n });\n\n const status = getTransactionsSessionStatus([\n ...state[sessionId].transactions // Create a copy of the transactions array to avoid Proxy issues\n ]);\n\n if (status) {\n updateSessionStatus({\n sessionId,\n status\n });\n newStatus = status;\n }\n }\n },\n false,\n 'updateTransactionStatus'\n );\n\n return newStatus;\n};\n\nexport const clearCompletedTransactions = () => {\n getStore().setState(\n ({ transactions: state, toasts: toastsState }) => {\n const sessionIds = Object.keys(state);\n\n const completedSessionIds = sessionIds.filter((sessionId) => {\n const session = state[sessionId];\n if (!session) {\n return false;\n }\n\n const { status } = session;\n\n const isPending =\n status === TransactionServerStatusesEnum.pending ||\n status === TransactionBatchStatusesEnum.signed ||\n status === TransactionBatchStatusesEnum.sent;\n\n return !isPending;\n });\n\n completedSessionIds.forEach((sessionId) => {\n delete state[sessionId];\n });\n\n const filteredTransactionToasts = toastsState.transactionToasts.filter(\n (toast) => !completedSessionIds.includes(toast.toastId)\n );\n\n toastsState.transactionToasts = filteredTransactionToasts;\n },\n false,\n 'clearCompletedTransactions'\n );\n};\n"],
5
+ "mappings": "kFAkBO,IAAMA,EAA4B,CAAC,CACxC,aAAAC,EACA,wBAAAC,EACA,OAAAC,EACA,mBAAAC,CACF,IAAqC,CACnC,IAAMC,EAAY,KAAK,IAAI,EAAE,SAAS,EACtC,OAAAC,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3BA,EAAMF,CAAS,EAAI,CACjB,aAAAJ,EACA,OAAAE,EACA,wBAAAD,EACA,wBAAyB,CAAC,EAC1B,mBAAAE,CACF,CACF,EACA,GACA,2BACF,EACOC,CACT,EAEaG,EAAsB,CAAC,CAClC,UAAAH,EACA,OAAAF,EACA,aAAAM,CACF,IAIM,CACJH,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3BA,EAAMF,CAAS,EAAE,OAASF,EAC1BI,EAAMF,CAAS,EAAE,aAAeI,CAClC,EACA,GACA,2BACF,CACF,EAEaC,EAA0B,CAAC,CACtC,UAAAL,EACA,YAAaM,CACf,IAG2C,CACzC,IAAIC,EAAiD,KACrD,OAAAN,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3B,IAAMN,EAAeM,EAAMF,CAAS,GAAG,aACvC,GAAIJ,GAAgB,KAAM,CACxBM,EAAMF,CAAS,EAAE,aAAeJ,EAAa,IAAKY,GAC5CA,EAAY,OAASF,EAAmB,KACnC,CACL,GAAGE,EACH,GAAIF,GAAsB,CAAC,CAC7B,EAEKE,CACR,EAED,IAAMV,EAASW,EAA6B,CAC1C,GAAGP,EAAMF,CAAS,EAAE,YACtB,CAAC,EAEGF,IACFK,EAAoB,CAClB,UAAAH,EACA,OAAAF,CACF,CAAC,EACDS,EAAYT,EAEhB,CACF,EACA,GACA,yBACF,EAEOS,CACT,EAEaG,EAA6B,IAAM,CAC9CT,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,EAAO,OAAQS,CAAY,IAAM,CAGhD,IAAMC,EAFa,OAAO,KAAKV,CAAK,EAEG,OAAQF,GAAc,CAC3D,IAAMa,EAAUX,EAAMF,CAAS,EAC/B,GAAI,CAACa,EACH,MAAO,GAGT,GAAM,CAAE,OAAAf,CAAO,EAAIe,EAOnB,MAAO,EAJLf,eACAA,cACAA,WAGJ,CAAC,EAEDc,EAAoB,QAASZ,GAAc,CACzC,OAAOE,EAAMF,CAAS,CACxB,CAAC,EAED,IAAMc,EAA4BH,EAAY,kBAAkB,OAC7DI,GAAU,CAACH,EAAoB,SAASG,EAAM,OAAO,CACxD,EAEAJ,EAAY,kBAAoBG,CAClC,EACA,GACA,4BACF,CACF",
6
+ "names": ["createTransactionsSession", "transactions", "transactionsDisplayInfo", "status", "sessionInformation", "sessionId", "getStore", "state", "updateSessionStatus", "errorMessage", "updateTransactionStatus", "updatedTransaction", "newStatus", "transaction", "getTransactionsSessionStatus", "clearCompletedTransactions", "toastsState", "completedSessionIds", "session", "filteredTransactionToasts", "toast"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-FKBLKOLI.mjs";import{a as s}from"./chunk-SPSO2A53.mjs";import{a as t}from"./chunk-C6E6XICI.mjs";import{u as n}from"./chunk-DOUNJCQ4.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var S=async r=>{let{isGuarded:i}=t();if(!a({isGuarded:i,transactions:r}))return r;let d=r[0].getSender().bech32().toString(),{walletAddress:c}=e(n()),o=await s({address:d,walletUrl:c});return o?.setShouldShowConsentPopup(!1),await o?.guardTransactions(r)||[]};export{S as a};
2
- //# sourceMappingURL=chunk-VCGAO6HH.mjs.map
1
+ import{a as s}from"./chunk-SPSO2A53.mjs";import{a}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-LFLDZBSM.mjs";import{u as n}from"./chunk-QNZHDBC6.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var S=async r=>{let{isGuarded:i}=t();if(!a({isGuarded:i,transactions:r}))return r;let d=r[0].getSender().bech32().toString(),{walletAddress:c}=e(n()),o=await s({address:d,walletUrl:c});return o?.setShouldShowConsentPopup(!1),await o?.guardTransactions(r)||[]};export{S as a};
2
+ //# sourceMappingURL=chunk-JLBB5YDB.mjs.map
@@ -0,0 +1,2 @@
1
+ var r=(t=>(t.light="mvx:light-theme",t.dark="mvx:dark-theme",t))(r||{});export{r as a};
2
+ //# sourceMappingURL=chunk-JR23TXKP.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/types/theme.types.ts"],
4
+ "sourcesContent": ["export enum ThemesEnum {\n light = 'mvx:light-theme',\n dark = 'mvx:dark-theme'\n}\n"],
5
+ "mappings": "AAAO,IAAKA,OACVA,EAAA,MAAQ,kBACRA,EAAA,KAAO,iBAFGA,OAAA",
6
+ "names": ["ThemesEnum"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-RIQNG4I7.mjs";import{a as g}from"./chunk-3S57OP4Z.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
2
+ //# sourceMappingURL=chunk-K66JLLVW.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/services/nativeAuth/nativeAuth.ts"],
4
- "sourcesContent": ["import { NativeAuthClient } from '@multiversx/sdk-native-auth-client';\n\nimport {\n getLatestBlockHash,\n LatestBlockHashType\n} from './helpers/getLatestBlockHash';\n\nimport { buildNativeAuthConfig, getTokenExpiration } from './methods';\nimport { NativeAuthConfigType } from './nativeAuth.types';\n\ninterface NativeAuthInitType {\n extraInfo?: { [key: string]: string };\n latestBlockInfo?: LatestBlockHashType;\n noCache?: boolean;\n}\n\nexport const nativeAuth = (config?: NativeAuthConfigType) => {\n const {\n origin,\n apiAddress,\n expirySeconds,\n blockHashShard,\n extraInfo: extraInfoFromConfig,\n gatewayUrl,\n extraRequestHeaders\n } = buildNativeAuthConfig(config);\n\n const nativeAuthClient = new NativeAuthClient({\n origin,\n apiUrl: apiAddress,\n expirySeconds,\n blockHashShard,\n gatewayUrl,\n extraRequestHeaders\n });\n\n const initialize = async (\n initProps?: NativeAuthInitType\n ): Promise<string> => {\n if (!apiAddress || !origin) {\n return '';\n }\n\n const getBlockHash = (): Promise<string> =>\n nativeAuthClient.getCurrentBlockHash();\n\n let latestBlockInfo = initProps?.latestBlockInfo;\n\n if (!latestBlockInfo) {\n latestBlockInfo = await getLatestBlockHash({\n apiAddress,\n blockHashShard,\n getBlockHash,\n noCache: initProps?.noCache\n });\n }\n\n const { hash, timestamp } = latestBlockInfo;\n const encodedExtraInfo = nativeAuthClient.encodeValue(\n JSON.stringify({\n ...(initProps?.extraInfo ?? extraInfoFromConfig),\n ...(timestamp ? { timestamp } : {})\n })\n );\n const encodedOrigin = nativeAuthClient.encodeValue(origin);\n\n return `${encodedOrigin}.${hash}.${expirySeconds}.${encodedExtraInfo}`;\n };\n\n const getToken = ({\n address,\n token,\n signature\n }: {\n address: string;\n token: string;\n signature: string;\n }): string => nativeAuthClient.getToken(address, token, signature);\n\n return {\n initialize,\n getToken,\n getTokenExpiration\n };\n};\n"],
5
- "mappings": "2HAAA,OAAS,oBAAAA,MAAwB,qCAgB1B,IAAMC,EAAcC,GAAkC,CAC3D,GAAM,CACJ,OAAAC,EACA,WAAAC,EACA,cAAAC,EACA,eAAAC,EACA,UAAWC,EACX,WAAAC,EACA,oBAAAC,CACF,EAAIC,EAAsBR,CAAM,EAE1BS,EAAmB,IAAIC,EAAiB,CAC5C,OAAAT,EACA,OAAQC,EACR,cAAAC,EACA,eAAAC,EACA,WAAAE,EACA,oBAAAC,CACF,CAAC,EA6CD,MAAO,CACL,WA5CiB,MACjBI,GACoB,CACpB,GAAI,CAACT,GAAc,CAACD,EAClB,MAAO,GAGT,IAAMW,EAAe,IACnBH,EAAiB,oBAAoB,EAEnCI,EAAkBF,GAAW,gBAE5BE,IACHA,EAAkB,MAAMC,EAAmB,CACzC,WAAAZ,EACA,eAAAE,EACA,aAAAQ,EACA,QAASD,GAAW,OACtB,CAAC,GAGH,GAAM,CAAE,KAAAI,EAAM,UAAAC,CAAU,EAAIH,EACtBI,EAAmBR,EAAiB,YACxC,KAAK,UAAU,CACb,GAAIE,GAAW,WAAaN,EAC5B,GAAIW,EAAY,CAAE,UAAAA,CAAU,EAAI,CAAC,CACnC,CAAC,CACH,EAGA,MAAO,GAFeP,EAAiB,YAAYR,CAAM,CAElC,IAAIc,CAAI,IAAIZ,CAAa,IAAIc,CAAgB,EACtE,EAcE,SAZe,CAAC,CAChB,QAAAC,EACA,MAAAC,EACA,UAAAC,CACF,IAIcX,EAAiB,SAASS,EAASC,EAAOC,CAAS,EAK/D,mBAAAC,CACF,CACF",
4
+ "sourcesContent": ["import { NativeAuthClient } from '@multiversx/sdk-native-auth-client';\n\nimport {\n getLatestBlockHash,\n LatestBlockHashType\n} from './helpers/getLatestBlockHash';\n\nimport { buildNativeAuthConfig, getTokenExpiration } from './methods';\nimport { NativeAuthConfigType } from './nativeAuth.types';\n\ninterface NativeAuthInitType {\n extraInfo?: { [key: string]: string };\n latestBlockInfo?: LatestBlockHashType;\n noCache?: boolean;\n}\n\nexport const nativeAuth = (config?: NativeAuthConfigType) => {\n const {\n origin,\n apiAddress,\n expirySeconds,\n blockHashShard,\n extraInfo: extraInfoFromConfig,\n gatewayUrl,\n extraRequestHeaders\n } = buildNativeAuthConfig(config);\n\n const nativeAuthClient = new NativeAuthClient({\n origin,\n apiUrl: apiAddress,\n expirySeconds,\n blockHashShard,\n gatewayUrl,\n extraRequestHeaders\n });\n\n const initialize = async (\n initProps?: NativeAuthInitType\n ): Promise<string> => {\n if (!apiAddress || !origin) {\n return '';\n }\n\n const getBlockHash = (): Promise<string> =>\n nativeAuthClient.getCurrentBlockHash();\n\n let latestBlockInfo = initProps?.latestBlockInfo;\n\n latestBlockInfo ??= await getLatestBlockHash({\n apiAddress,\n blockHashShard,\n getBlockHash,\n noCache: initProps?.noCache\n });\n\n const { hash, timestamp } = latestBlockInfo;\n const encodedExtraInfo = nativeAuthClient.encodeValue(\n JSON.stringify({\n ...(initProps?.extraInfo ?? extraInfoFromConfig),\n ...(timestamp ? { timestamp } : {})\n })\n );\n const encodedOrigin = nativeAuthClient.encodeValue(origin);\n\n return `${encodedOrigin}.${hash}.${expirySeconds}.${encodedExtraInfo}`;\n };\n\n const getToken = ({\n address,\n token,\n signature\n }: {\n address: string;\n token: string;\n signature: string;\n }): string => nativeAuthClient.getToken(address, token, signature);\n\n return {\n initialize,\n getToken,\n getTokenExpiration\n };\n};\n"],
5
+ "mappings": "2HAAA,OAAS,oBAAAA,MAAwB,qCAgB1B,IAAMC,EAAcC,GAAkC,CAC3D,GAAM,CACJ,OAAAC,EACA,WAAAC,EACA,cAAAC,EACA,eAAAC,EACA,UAAWC,EACX,WAAAC,EACA,oBAAAC,CACF,EAAIC,EAAsBR,CAAM,EAE1BS,EAAmB,IAAIC,EAAiB,CAC5C,OAAAT,EACA,OAAQC,EACR,cAAAC,EACA,eAAAC,EACA,WAAAE,EACA,oBAAAC,CACF,CAAC,EA2CD,MAAO,CACL,WA1CiB,MACjBI,GACoB,CACpB,GAAI,CAACT,GAAc,CAACD,EAClB,MAAO,GAGT,IAAMW,EAAe,IACnBH,EAAiB,oBAAoB,EAEnCI,EAAkBF,GAAW,gBAEjCE,IAAoB,MAAMC,EAAmB,CAC3C,WAAAZ,EACA,eAAAE,EACA,aAAAQ,EACA,QAASD,GAAW,OACtB,CAAC,EAED,GAAM,CAAE,KAAAI,EAAM,UAAAC,CAAU,EAAIH,EACtBI,EAAmBR,EAAiB,YACxC,KAAK,UAAU,CACb,GAAIE,GAAW,WAAaN,EAC5B,GAAIW,EAAY,CAAE,UAAAA,CAAU,EAAI,CAAC,CACnC,CAAC,CACH,EAGA,MAAO,GAFeP,EAAiB,YAAYR,CAAM,CAElC,IAAIc,CAAI,IAAIZ,CAAa,IAAIc,CAAgB,EACtE,EAcE,SAZe,CAAC,CAChB,QAAAC,EACA,MAAAC,EACA,UAAAC,CACF,IAIcX,EAAiB,SAASS,EAASC,EAAOC,CAAS,EAK/D,mBAAAC,CACF,CACF",
6
6
  "names": ["NativeAuthClient", "nativeAuth", "config", "origin", "apiAddress", "expirySeconds", "blockHashShard", "extraInfoFromConfig", "gatewayUrl", "extraRequestHeaders", "buildNativeAuthConfig", "nativeAuthClient", "NativeAuthClient", "initProps", "getBlockHash", "latestBlockInfo", "getLatestBlockHash", "hash", "timestamp", "encodedExtraInfo", "address", "token", "signature", "getTokenExpiration"]
7
7
  }