@multiversx/sdk-dapp 5.3.0 → 5.3.2

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 (715) hide show
  1. package/README.md +2 -0
  2. package/out/__chunks__/chunk-2JKCBTYK.mjs +2 -0
  3. package/out/__chunks__/{chunk-KD2IQ32V.mjs.map → chunk-2JKCBTYK.mjs.map} +3 -3
  4. package/out/__chunks__/chunk-2KGBHCEN.mjs +2 -0
  5. package/out/__chunks__/chunk-2KGBHCEN.mjs.map +7 -0
  6. package/out/__chunks__/chunk-2RTOYKHB.mjs +2 -0
  7. package/out/__chunks__/{chunk-F33ERG33.mjs → chunk-3CG4C7T4.mjs} +2 -2
  8. package/out/__chunks__/{chunk-IE3A2COQ.mjs → chunk-3IYTFWEN.mjs} +2 -2
  9. package/out/__chunks__/chunk-3S3EXLLM.mjs +2 -0
  10. package/out/__chunks__/chunk-4GCIE2BM.mjs +2 -0
  11. package/out/__chunks__/chunk-4MCQ27VQ.mjs +2 -0
  12. package/out/__chunks__/chunk-4MCQ27VQ.mjs.map +7 -0
  13. package/out/__chunks__/{chunk-W6M5WJ3V.mjs → chunk-4QDHKULK.mjs} +2 -2
  14. package/out/__chunks__/{chunk-RUE5QYSG.mjs → chunk-55U3WK3C.mjs} +2 -2
  15. package/out/__chunks__/chunk-573JTRNC.mjs +2 -0
  16. package/out/__chunks__/{chunk-YPV63DYG.mjs → chunk-5AGKFSA6.mjs} +2 -2
  17. package/out/__chunks__/chunk-5AGKFSA6.mjs.map +7 -0
  18. package/out/__chunks__/chunk-5HEWN34K.mjs +2 -0
  19. package/out/__chunks__/chunk-5HEWN34K.mjs.map +7 -0
  20. package/out/__chunks__/{chunk-MBNRIXNQ.mjs → chunk-5KYXNO4J.mjs} +2 -2
  21. package/out/__chunks__/{chunk-MH3RDOC5.mjs → chunk-5W7PFHTT.mjs} +2 -2
  22. package/out/__chunks__/{chunk-MH3RDOC5.mjs.map → chunk-5W7PFHTT.mjs.map} +1 -1
  23. package/out/__chunks__/chunk-6BOC75BF.mjs +2 -0
  24. package/out/__chunks__/{chunk-AQNUGUG3.mjs → chunk-6CLCXSHA.mjs} +2 -2
  25. package/out/__chunks__/chunk-6CQMLD25.mjs +1 -0
  26. package/out/__chunks__/{chunk-OEXP5D2Q.mjs → chunk-6EKK7AJE.mjs} +2 -2
  27. package/out/__chunks__/{chunk-5KCP7UJT.mjs → chunk-6F4OKEUQ.mjs} +2 -2
  28. package/out/__chunks__/{chunk-UERJ6AKK.mjs → chunk-7MBSWJUD.mjs} +2 -2
  29. package/out/__chunks__/chunk-7PE652LB.mjs +2 -0
  30. package/out/__chunks__/chunk-7PE652LB.mjs.map +7 -0
  31. package/out/__chunks__/{chunk-ZGMF4QYV.mjs → chunk-7WJMUTGI.mjs} +2 -2
  32. package/out/__chunks__/chunk-AFLCI6IF.mjs +2 -0
  33. package/out/__chunks__/chunk-AGJVEK6I.mjs +2 -0
  34. package/out/__chunks__/{chunk-QDX2JCQH.mjs → chunk-ATLICLWT.mjs} +2 -2
  35. package/out/__chunks__/{chunk-WXC5EE2F.mjs → chunk-AZA2GNTR.mjs} +2 -2
  36. package/out/__chunks__/chunk-AZA2GNTR.mjs.map +7 -0
  37. package/out/__chunks__/{chunk-6UIF2KFV.mjs → chunk-BCSNXRMR.mjs} +1 -1
  38. package/out/__chunks__/{chunk-6UIF2KFV.mjs.map → chunk-BCSNXRMR.mjs.map} +1 -1
  39. package/out/__chunks__/{chunk-MODSKR2X.mjs → chunk-BUJNOQZJ.mjs} +2 -2
  40. package/out/__chunks__/chunk-C4SERLP4.mjs +1 -0
  41. package/out/__chunks__/{chunk-6MNQSWGO.mjs → chunk-C72ZHRFA.mjs} +2 -2
  42. package/out/__chunks__/{chunk-6MNQSWGO.mjs.map → chunk-C72ZHRFA.mjs.map} +2 -2
  43. package/out/__chunks__/chunk-CUDPQDXY.mjs +1 -0
  44. package/out/__chunks__/{chunk-C2FLFZOO.mjs → chunk-CVXQYCEE.mjs} +2 -2
  45. package/out/__chunks__/{chunk-ONSO75O2.mjs → chunk-CXAX5TAG.mjs} +2 -2
  46. package/out/__chunks__/chunk-CZ2S4XSL.mjs +2 -0
  47. package/out/__chunks__/{chunk-KQV57RV3.mjs → chunk-D3VRMBRS.mjs} +2 -2
  48. package/out/__chunks__/{chunk-G5MRPRWI.mjs → chunk-DW6RO5LJ.mjs} +2 -2
  49. package/out/__chunks__/{chunk-XG6DEDBU.mjs → chunk-E77ZH5JT.mjs} +2 -2
  50. package/out/__chunks__/{chunk-OFVUWY2K.mjs → chunk-EKWN4V73.mjs} +2 -2
  51. package/out/__chunks__/chunk-EPL2CHU6.mjs +2 -0
  52. package/out/__chunks__/{chunk-WWYX7L4I.mjs → chunk-FF45FPD3.mjs} +2 -2
  53. package/out/__chunks__/{chunk-STBF3KTB.mjs → chunk-FNHO66WN.mjs} +2 -2
  54. package/out/__chunks__/chunk-FRUJEORM.mjs +2 -0
  55. package/out/__chunks__/{chunk-5OMQOYP7.mjs → chunk-G5N56FHJ.mjs} +2 -2
  56. package/out/__chunks__/chunk-GBEJIZDR.mjs +1 -0
  57. package/out/__chunks__/chunk-GEB2W7CV.mjs +1 -0
  58. package/out/__chunks__/chunk-H73D4VUZ.mjs +2 -0
  59. package/out/__chunks__/{chunk-AAQCK4UU.mjs → chunk-HBPQEY3L.mjs} +2 -2
  60. package/out/__chunks__/{chunk-2XGXXRSH.mjs → chunk-HFX5WAAI.mjs} +2 -2
  61. package/out/__chunks__/chunk-HKDRMMI5.mjs +2 -0
  62. package/out/__chunks__/{chunk-MCXQTDAK.mjs → chunk-HUXPA4C2.mjs} +2 -2
  63. package/out/__chunks__/chunk-HYH55J3D.mjs +2 -0
  64. package/out/__chunks__/{chunk-WBF6D374.mjs → chunk-I424CDNL.mjs} +2 -2
  65. package/out/__chunks__/{chunk-WZGG2YKQ.mjs → chunk-IVHD32VC.mjs} +2 -2
  66. package/out/__chunks__/{chunk-YK7T6MBD.mjs → chunk-IWP36NOU.mjs} +2 -2
  67. package/out/__chunks__/{chunk-4POCTP6S.mjs → chunk-IYM4ZX72.mjs} +2 -2
  68. package/out/__chunks__/{chunk-MQJQMAW3.mjs → chunk-J5TLE6SA.mjs} +2 -2
  69. package/out/__chunks__/{chunk-ITZJPUDG.mjs → chunk-JDP24JPD.mjs} +2 -2
  70. package/out/__chunks__/{chunk-5JQ3V6QZ.mjs → chunk-JPSW3MCK.mjs} +2 -2
  71. package/out/__chunks__/{chunk-B6VRKK6A.mjs → chunk-JZ22ZC2D.mjs} +2 -2
  72. package/out/__chunks__/{chunk-AWQZ56BT.mjs → chunk-K4JJZCL3.mjs} +2 -2
  73. package/out/__chunks__/chunk-K5K2FVFB.mjs +2 -0
  74. package/out/__chunks__/{chunk-OA5BWGGO.mjs → chunk-KDTDQL52.mjs} +1 -1
  75. package/out/__chunks__/{chunk-OA5BWGGO.mjs.map → chunk-KDTDQL52.mjs.map} +1 -1
  76. package/out/__chunks__/{chunk-CUQBPPWE.mjs → chunk-KIMRQMXB.mjs} +2 -2
  77. package/out/__chunks__/{chunk-PGAJUAPG.mjs → chunk-KLI6N26E.mjs} +2 -2
  78. package/out/__chunks__/{chunk-PGAJUAPG.mjs.map → chunk-KLI6N26E.mjs.map} +1 -1
  79. package/out/__chunks__/chunk-L3EOHIBG.mjs +2 -0
  80. package/out/__chunks__/chunk-L3EOHIBG.mjs.map +7 -0
  81. package/out/__chunks__/chunk-LBPTOWPX.mjs +2 -0
  82. package/out/__chunks__/chunk-LBPTOWPX.mjs.map +7 -0
  83. package/out/__chunks__/chunk-LG6Q3PRI.mjs +2 -0
  84. package/out/__chunks__/chunk-LG6Q3PRI.mjs.map +7 -0
  85. package/out/__chunks__/{chunk-KMJMQEXI.mjs → chunk-LGGG3HW7.mjs} +2 -2
  86. package/out/__chunks__/{chunk-OILJUNFX.mjs → chunk-LKOWOTL2.mjs} +2 -2
  87. package/out/__chunks__/{chunk-YLD26I5H.mjs → chunk-LYSI4URP.mjs} +2 -2
  88. package/out/__chunks__/chunk-M7B26JXO.mjs +2 -0
  89. package/out/__chunks__/chunk-M7B26JXO.mjs.map +7 -0
  90. package/out/__chunks__/{chunk-2JTLNZM3.mjs → chunk-MLDUGECH.mjs} +2 -2
  91. package/out/__chunks__/{chunk-7ZIJXDPY.mjs → chunk-MS7BFY27.mjs} +2 -2
  92. package/out/__chunks__/{chunk-SKBL5PDX.mjs → chunk-N4KX33RW.mjs} +2 -2
  93. package/out/__chunks__/chunk-N56SMVGU.mjs +2 -0
  94. package/out/__chunks__/chunk-N56SMVGU.mjs.map +7 -0
  95. package/out/__chunks__/{chunk-U24DHQDI.mjs → chunk-N5VJJRWV.mjs} +2 -2
  96. package/out/__chunks__/{chunk-BT2J2GH4.mjs → chunk-NAYC2B72.mjs} +2 -2
  97. package/out/__chunks__/{chunk-H24QGHAH.mjs → chunk-NAYDJEWI.mjs} +2 -2
  98. package/out/__chunks__/{chunk-PBXNAY2B.mjs → chunk-NVBWPLR7.mjs} +2 -2
  99. package/out/__chunks__/{chunk-JBZR35CW.mjs → chunk-O65OBG5D.mjs} +2 -2
  100. package/out/__chunks__/{chunk-SR7TVATV.mjs → chunk-O6ALDFLM.mjs} +2 -2
  101. package/out/__chunks__/{chunk-3S57OP4Z.mjs → chunk-OAPLU7UX.mjs} +2 -2
  102. package/out/__chunks__/chunk-ODHXJQOF.mjs +2 -0
  103. package/out/__chunks__/{chunk-PQVNWTWJ.mjs → chunk-OIRXFS5Q.mjs} +2 -2
  104. package/out/__chunks__/chunk-OIRXFS5Q.mjs.map +7 -0
  105. package/out/__chunks__/{chunk-BENZKRAG.mjs → chunk-OSG4UY2Z.mjs} +2 -2
  106. package/out/__chunks__/chunk-P2MHA65O.mjs +2 -0
  107. package/out/__chunks__/chunk-PKLBZG2R.mjs +2 -0
  108. package/out/__chunks__/chunk-PW34EFS7.mjs +2 -0
  109. package/out/__chunks__/chunk-PW34EFS7.mjs.map +7 -0
  110. package/out/__chunks__/{chunk-IS3TZ43F.mjs → chunk-QJJEW7MB.mjs} +2 -2
  111. package/out/__chunks__/{chunk-DBIIY2TX.mjs → chunk-QNELH2S2.mjs} +2 -2
  112. package/out/__chunks__/{chunk-7MOSAB64.mjs → chunk-QO62QJ5H.mjs} +2 -2
  113. package/out/__chunks__/{chunk-3KFEBW7N.mjs → chunk-RV6SJMD7.mjs} +2 -2
  114. package/out/__chunks__/{chunk-GNHD56P3.mjs → chunk-SALLGAGD.mjs} +2 -2
  115. package/out/__chunks__/chunk-SAN5F2PW.mjs +2 -0
  116. package/out/__chunks__/chunk-SNPF3BD2.mjs +2 -0
  117. package/out/__chunks__/chunk-SNPF3BD2.mjs.map +7 -0
  118. package/out/__chunks__/{chunk-QHXZ354C.mjs → chunk-TFARIEZF.mjs} +2 -2
  119. package/out/__chunks__/{chunk-W4QMH63P.mjs → chunk-TMRKN7VL.mjs} +2 -2
  120. package/out/__chunks__/chunk-TOZ7EGCZ.mjs +2 -0
  121. package/out/__chunks__/chunk-TOZ7EGCZ.mjs.map +7 -0
  122. package/out/__chunks__/chunk-TQ7T6ULY.mjs +2 -0
  123. package/out/__chunks__/chunk-TQ7T6ULY.mjs.map +7 -0
  124. package/out/__chunks__/{chunk-BJOEWWLZ.mjs → chunk-TR2KNDCH.mjs} +2 -2
  125. package/out/__chunks__/chunk-TVXZBSUY.mjs +2 -0
  126. package/out/__chunks__/chunk-U6RAWQXO.mjs +1 -0
  127. package/out/__chunks__/{chunk-22ELCCFJ.mjs → chunk-UCFMVEOZ.mjs} +2 -2
  128. package/out/__chunks__/chunk-UPABDY55.mjs +2 -0
  129. package/out/__chunks__/chunk-UPABDY55.mjs.map +7 -0
  130. package/out/__chunks__/chunk-URTM5OGN.mjs +2 -0
  131. package/out/__chunks__/{chunk-7EWMP5BY.mjs.map → chunk-URTM5OGN.mjs.map} +1 -1
  132. package/out/__chunks__/{chunk-QXC4D3AC.mjs → chunk-UT4BWFQH.mjs} +2 -2
  133. package/out/__chunks__/{chunk-TZTP57OK.mjs → chunk-UY22M7WB.mjs} +2 -2
  134. package/out/__chunks__/{chunk-J62UCITY.mjs → chunk-VGGJESXR.mjs} +2 -2
  135. package/out/__chunks__/chunk-VIQAOU2F.mjs +2 -0
  136. package/out/__chunks__/chunk-VIQAOU2F.mjs.map +7 -0
  137. package/out/__chunks__/chunk-VTEOS2MM.mjs +2 -0
  138. package/out/__chunks__/{chunk-J76GINM5.mjs → chunk-WEZV6U4A.mjs} +2 -2
  139. package/out/__chunks__/{chunk-MRIKSX32.mjs → chunk-WYVAFCPU.mjs} +2 -2
  140. package/out/__chunks__/chunk-XLLBREX7.mjs +2 -0
  141. package/out/__chunks__/{chunk-EGO5R7IZ.mjs → chunk-XNSSZDSU.mjs} +2 -2
  142. package/out/__chunks__/chunk-XSUHHPZ2.mjs +2 -0
  143. package/out/__chunks__/{chunk-P6HDK262.mjs → chunk-XTATC65P.mjs} +2 -2
  144. package/out/__chunks__/{chunk-VGO3VD5N.mjs → chunk-XV3H7VOE.mjs} +2 -2
  145. package/out/__chunks__/{chunk-TKTDGTN7.mjs → chunk-XXSANEEO.mjs} +2 -2
  146. package/out/__chunks__/{chunk-UCI2LZF5.mjs → chunk-YGMILCHH.mjs} +2 -2
  147. package/out/__chunks__/chunk-YGMILCHH.mjs.map +7 -0
  148. package/out/__chunks__/{chunk-FRDR4A7Z.mjs → chunk-YYH2GKPL.mjs} +1 -1
  149. package/out/__chunks__/{chunk-FRDR4A7Z.mjs.map → chunk-YYH2GKPL.mjs.map} +1 -1
  150. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  151. package/out/apiCalls/account/getScamAddressData.cjs +1 -1
  152. package/out/apiCalls/account/getScamAddressData.cjs.map +3 -3
  153. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  154. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  155. package/out/apiCalls/configuration/getGasStationMetadata.cjs +1 -1
  156. package/out/apiCalls/configuration/getGasStationMetadata.cjs.map +3 -3
  157. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  158. package/out/apiCalls/configuration/getNetworkConfigFromApi.mjs +1 -1
  159. package/out/apiCalls/configuration/getServerConfiguration.mjs +1 -1
  160. package/out/apiCalls/economics/getEconomics.mjs +1 -1
  161. package/out/apiCalls/endpoints.cjs +1 -1
  162. package/out/apiCalls/endpoints.cjs.map +3 -3
  163. package/out/apiCalls/endpoints.d.ts +1 -0
  164. package/out/apiCalls/endpoints.mjs +1 -1
  165. package/out/apiCalls/tokens/getPersistedToken.mjs +1 -1
  166. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  167. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  168. package/out/apiCalls/tokens/getTokenDetails.mjs.map +4 -4
  169. package/out/apiCalls/tokens/tokenDataStorage.cjs +1 -1
  170. package/out/apiCalls/tokens/tokenDataStorage.cjs.map +3 -3
  171. package/out/apiCalls/tokens/tokenDataStorage.d.ts +1 -3
  172. package/out/apiCalls/tokens/tokenDataStorage.mjs +1 -1
  173. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  174. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  175. package/out/apiCalls/transactions/getTransactions.mjs +1 -1
  176. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  177. package/out/apiCalls/utils/axiosFetcher.mjs +1 -1
  178. package/out/apiCalls/utils/axiosFetcher.mjs.map +4 -4
  179. package/out/apiCalls/utils/axiosInstance.cjs +1 -1
  180. package/out/apiCalls/utils/axiosInstance.cjs.map +3 -3
  181. package/out/apiCalls/utils/axiosInstance.mjs +1 -1
  182. package/out/constants/browser.constants.mjs +1 -1
  183. package/out/constants/index.mjs +1 -1
  184. package/out/constants/storage.constants.mjs +1 -1
  185. package/out/constants/window.constants.cjs +1 -1
  186. package/out/constants/window.constants.cjs.map +1 -1
  187. package/out/constants/window.constants.mjs +1 -1
  188. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  189. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  190. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  191. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  192. package/out/index.cjs +1 -1
  193. package/out/index.cjs.map +2 -2
  194. package/out/index.d.ts +0 -1
  195. package/out/index.mjs +1 -1
  196. package/out/lib/sdkDappUi.mjs +1 -1
  197. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  198. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  199. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  200. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  201. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  202. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  203. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  204. package/out/managers/ToastManager/helpers/createTransactionToast.mjs +1 -1
  205. package/out/managers/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
  206. package/out/managers/ToastManager/index.mjs +1 -1
  207. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  208. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  209. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  210. package/out/managers/TransactionManager/helpers/getTransactionsStatus.mjs +1 -1
  211. package/out/managers/TransactionManager/index.mjs +1 -1
  212. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  213. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  214. package/out/managers/index.mjs +1 -1
  215. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  216. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  217. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  218. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  219. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  220. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  221. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  222. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  223. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  224. package/out/managers/internal/UIBaseManager/UIBaseManager.cjs +1 -1
  225. package/out/managers/internal/UIBaseManager/UIBaseManager.cjs.map +3 -3
  226. package/out/managers/internal/UIBaseManager/UIBaseManager.d.ts +3 -0
  227. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  228. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  229. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  230. package/out/managers/internal/index.mjs +1 -1
  231. package/out/methods/account/getAccount.mjs +1 -1
  232. package/out/methods/account/getAccountInfo.mjs +1 -1
  233. package/out/methods/account/getAccountInfo.mjs.map +4 -4
  234. package/out/methods/account/getAddress.mjs +1 -1
  235. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  236. package/out/methods/account/getLatestNonce.mjs +1 -1
  237. package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.cjs.map +1 -1
  238. package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.mjs +1 -1
  239. package/out/methods/initApp/helpers/waitForStoreRehydration.cjs +2 -0
  240. package/out/methods/initApp/helpers/waitForStoreRehydration.cjs.map +7 -0
  241. package/out/methods/initApp/helpers/waitForStoreRehydration.d.ts +6 -0
  242. package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +2 -0
  243. package/out/methods/initApp/initApp.cjs +1 -1
  244. package/out/methods/initApp/initApp.cjs.map +3 -3
  245. package/out/methods/initApp/initApp.d.ts +5 -0
  246. package/out/methods/initApp/initApp.mjs +1 -1
  247. package/out/methods/initApp/initApp.mjs.map +3 -3
  248. package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs +1 -1
  249. package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs.map +3 -3
  250. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  251. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  252. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  253. package/out/methods/network/getEgldLabel.mjs +1 -1
  254. package/out/methods/network/getExplorerAddress.mjs +1 -1
  255. package/out/methods/network/getNetworkConfig.mjs +1 -1
  256. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  257. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
  258. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
  259. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
  260. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
  261. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
  262. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  263. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  264. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  265. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  266. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  267. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  268. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  269. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  270. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  271. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  272. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  273. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.cjs +1 -1
  274. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.cjs.map +2 -2
  275. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  276. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  277. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  278. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  279. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
  280. package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
  281. package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
  282. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  283. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  284. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  285. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  286. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  287. package/out/providers/DappProvider/index.mjs +1 -1
  288. package/out/providers/ProviderFactory.mjs +1 -1
  289. package/out/providers/helpers/accountProvider.mjs +1 -1
  290. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  291. package/out/providers/helpers/restoreProvider.mjs +1 -1
  292. package/out/providers/index.mjs +1 -1
  293. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  294. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  295. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  296. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  297. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  298. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  299. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  300. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  301. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.cjs +2 -0
  302. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.cjs.map +7 -0
  303. package/out/providers/strategies/LedgerProviderStrategy/helpers/{authenticateLedgerAccount.d.ts → authenticateLedgerAccount/authenticateLedgerAccount.d.ts} +1 -3
  304. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +2 -0
  305. package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.cjs → authenticateLedgerAccount/helpers/getAuthTokenText.cjs} +1 -1
  306. package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.cjs.map → authenticateLedgerAccount/helpers/getAuthTokenText.cjs.map} +1 -1
  307. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getAuthTokenText.mjs +2 -0
  308. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getLedgerVersionOptions.cjs +2 -0
  309. package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerVersionOptions.cjs.map → authenticateLedgerAccount/helpers/getLedgerVersionOptions.cjs.map} +1 -1
  310. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getLedgerVersionOptions.mjs +2 -0
  311. package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.cjs.map → authenticateLedgerAccount/helpers/secondsToTimeString.cjs.map} +1 -1
  312. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/secondsToTimeString.mjs +2 -0
  313. package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/index.cjs.map +1 -1
  314. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +2 -0
  315. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.cjs +2 -0
  316. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.cjs.map +7 -0
  317. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +2 -0
  318. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.types.cjs.map +7 -0
  319. package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.d.ts +2 -2
  320. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.cjs +2 -0
  321. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.cjs.map +7 -0
  322. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.d.ts +19 -0
  323. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +2 -0
  324. package/out/{apiCalls/configuration → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount}/index.cjs +1 -1
  325. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.cjs.map +7 -0
  326. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.d.ts +2 -0
  327. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +2 -0
  328. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.cjs +2 -0
  329. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.cjs.map +7 -0
  330. package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerProvider.d.ts → getLedgerProvider/getLedgerProvider.d.ts} +2 -4
  331. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +2 -0
  332. package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.cjs → getLedgerProvider/helpers/getLedgerConfiguration.cjs} +1 -1
  333. package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.cjs.map → getLedgerProvider/helpers/getLedgerConfiguration.cjs.map} +1 -1
  334. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/getLedgerConfiguration.mjs +2 -0
  335. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.cjs +2 -0
  336. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.cjs.map +7 -0
  337. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.d.ts +12 -0
  338. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.mjs +2 -0
  339. package/out/{apiCalls/account → providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider}/index.cjs +1 -1
  340. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.cjs.map +7 -0
  341. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.d.ts +1 -0
  342. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +2 -0
  343. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.cjs +1 -1
  344. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.cjs.map +2 -2
  345. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.d.ts +3 -4
  346. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  347. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.cjs +1 -1
  348. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.cjs.map +2 -2
  349. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.d.ts +1 -1
  350. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  351. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  352. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  353. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  354. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  355. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  356. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  357. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  358. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  359. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  360. package/out/providers/strategies/helpers/index.mjs +1 -1
  361. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  362. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  363. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs +1 -1
  364. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs.map +3 -3
  365. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  366. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
  367. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.cjs +1 -1
  368. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.cjs.map +3 -3
  369. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  370. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  371. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  372. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs +1 -1
  373. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs.map +3 -3
  374. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  375. package/out/providers/strategies/helpers/signTransactions/tests/mocks.d.ts +16 -0
  376. package/out/providers/strategies/index.mjs +1 -1
  377. package/out/react/account/useGetAccount.mjs +1 -1
  378. package/out/react/account/useGetAccountInfo.mjs +1 -1
  379. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  380. package/out/react/account/useGetLatestNonce.mjs +1 -1
  381. package/out/react/index.mjs +1 -1
  382. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  383. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  384. package/out/react/store/getReactStore.mjs +1 -1
  385. package/out/react/store/useSelector.mjs +1 -1
  386. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  387. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  388. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  389. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  390. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  391. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  392. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  393. package/out/services/index.mjs +1 -1
  394. package/out/services/nativeAuth/helpers/getLatestBlockHash.mjs +1 -1
  395. package/out/services/nativeAuth/helpers/index.mjs +1 -1
  396. package/out/services/nativeAuth/index.mjs +1 -1
  397. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  398. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  399. package/out/services/nativeAuth/methods/index.mjs +1 -1
  400. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  401. package/out/store/actions/account/accountActions.mjs +1 -1
  402. package/out/store/actions/account/index.mjs +1 -1
  403. package/out/store/actions/cache/cacheActions.mjs +1 -1
  404. package/out/store/actions/cache/index.mjs +1 -1
  405. package/out/store/actions/config/configActions.mjs +1 -1
  406. package/out/store/actions/config/index.mjs +1 -1
  407. package/out/store/actions/index.mjs +1 -1
  408. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  409. package/out/store/actions/network/index.mjs +1 -1
  410. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  411. package/out/store/actions/network/networkActions.mjs +1 -1
  412. package/out/store/actions/sharedActions/index.mjs +1 -1
  413. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  414. package/out/store/actions/toasts/index.mjs +1 -1
  415. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  416. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  417. package/out/store/actions/ui/index.mjs +1 -1
  418. package/out/store/actions/ui/uiActions.mjs +1 -1
  419. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  420. package/out/store/middleware/index.mjs +1 -1
  421. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  422. package/out/store/selectors/accountSelectors.mjs +1 -1
  423. package/out/store/selectors/index.mjs +1 -1
  424. package/out/store/slices/account/accountSlice.mjs +1 -1
  425. package/out/store/slices/account/emptyAccount.mjs +1 -1
  426. package/out/store/slices/account/index.mjs +1 -1
  427. package/out/store/slices/index.mjs +1 -1
  428. package/out/store/storage/index.mjs +1 -1
  429. package/out/store/storage/storageCallback.mjs +1 -1
  430. package/out/store/store.mjs +1 -1
  431. package/out/types/index.mjs +1 -1
  432. package/out/utils/ComponentFactory.mjs +1 -1
  433. package/out/utils/account/fetchAccount.mjs +1 -1
  434. package/out/utils/account/index.mjs +1 -1
  435. package/out/utils/account/refreshAccount.mjs +1 -1
  436. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  437. package/out/utils/dateTime/index.mjs +1 -1
  438. package/out/utils/index.cjs +1 -1
  439. package/out/utils/index.cjs.map +2 -2
  440. package/out/utils/index.d.ts +0 -1
  441. package/out/utils/index.mjs +1 -1
  442. package/out/utils/transactions/explorerUrlBuilder.mjs +1 -1
  443. package/out/utils/transactions/getActiveTransactionsStatus.cjs.map +2 -2
  444. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  445. package/out/utils/transactions/getActiveTransactionsStatus.mjs.map +4 -4
  446. package/out/utils/transactions/getDecodedDataField/index.mjs +1 -1
  447. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  448. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
  449. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
  450. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTransactionActionNftText.mjs +1 -1
  451. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
  452. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
  453. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  454. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  455. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  456. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  457. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  458. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  459. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  460. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  461. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  462. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAction.mjs +1 -1
  463. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
  464. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  465. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  466. package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
  467. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  468. package/out/utils/transactions/index.cjs +1 -1
  469. package/out/utils/transactions/index.cjs.map +2 -2
  470. package/out/utils/transactions/index.d.ts +0 -1
  471. package/out/utils/transactions/index.mjs +1 -1
  472. package/out/utils/validation/index.mjs +1 -1
  473. package/out/utils/validation/isContract.mjs +1 -1
  474. package/out/utils/visual/switchTheme.mjs +1 -1
  475. package/out/utils/window/getIsInIframe.mjs +1 -1
  476. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  477. package/out/utils/window/index.mjs +1 -1
  478. package/package.json +4 -3
  479. package/out/__chunks__/chunk-33MSDZAP.mjs +0 -2
  480. package/out/__chunks__/chunk-4BOXOL6P.mjs +0 -2
  481. package/out/__chunks__/chunk-4BOXOL6P.mjs.map +0 -7
  482. package/out/__chunks__/chunk-4YLN3MHG.mjs +0 -2
  483. package/out/__chunks__/chunk-4YLN3MHG.mjs.map +0 -7
  484. package/out/__chunks__/chunk-6ET5BDZH.mjs +0 -1
  485. package/out/__chunks__/chunk-6SC2DWV6.mjs +0 -2
  486. package/out/__chunks__/chunk-6WUHHOG2.mjs +0 -2
  487. package/out/__chunks__/chunk-7EWMP5BY.mjs +0 -2
  488. package/out/__chunks__/chunk-ABNK74B7.mjs +0 -2
  489. package/out/__chunks__/chunk-ABNK74B7.mjs.map +0 -7
  490. package/out/__chunks__/chunk-AGO2Z4FM.mjs +0 -2
  491. package/out/__chunks__/chunk-AGO2Z4FM.mjs.map +0 -7
  492. package/out/__chunks__/chunk-AVXL7ZQK.mjs +0 -2
  493. package/out/__chunks__/chunk-B2RHOOA6.mjs +0 -2
  494. package/out/__chunks__/chunk-BSFYNH6O.mjs +0 -2
  495. package/out/__chunks__/chunk-C4TBDJVT.mjs +0 -2
  496. package/out/__chunks__/chunk-C4TBDJVT.mjs.map +0 -7
  497. package/out/__chunks__/chunk-CJTGYQ5L.mjs +0 -2
  498. package/out/__chunks__/chunk-D2ULWBRR.mjs +0 -2
  499. package/out/__chunks__/chunk-DBNPRNJV.mjs +0 -2
  500. package/out/__chunks__/chunk-DM3C2PPR.mjs +0 -2
  501. package/out/__chunks__/chunk-DXRSXWLQ.mjs +0 -1
  502. package/out/__chunks__/chunk-EG5H4QZV.mjs +0 -2
  503. package/out/__chunks__/chunk-EG5H4QZV.mjs.map +0 -7
  504. package/out/__chunks__/chunk-GMQMFRLW.mjs +0 -2
  505. package/out/__chunks__/chunk-GMQMFRLW.mjs.map +0 -7
  506. package/out/__chunks__/chunk-INRKVOET.mjs +0 -1
  507. package/out/__chunks__/chunk-J7LJM36W.mjs +0 -2
  508. package/out/__chunks__/chunk-J7LJM36W.mjs.map +0 -7
  509. package/out/__chunks__/chunk-JKR5DRPM.mjs +0 -1
  510. package/out/__chunks__/chunk-JMC7CMTU.mjs +0 -2
  511. package/out/__chunks__/chunk-K5MJ4FMD.mjs +0 -1
  512. package/out/__chunks__/chunk-KD2IQ32V.mjs +0 -2
  513. package/out/__chunks__/chunk-LS425JKB.mjs +0 -2
  514. package/out/__chunks__/chunk-LS425JKB.mjs.map +0 -7
  515. package/out/__chunks__/chunk-NZFUM3VC.mjs +0 -2
  516. package/out/__chunks__/chunk-O5MS2L3D.mjs +0 -2
  517. package/out/__chunks__/chunk-OCTCR7WH.mjs +0 -2
  518. package/out/__chunks__/chunk-OCTCR7WH.mjs.map +0 -7
  519. package/out/__chunks__/chunk-PDMEOQYV.mjs +0 -2
  520. package/out/__chunks__/chunk-PNSB4HHK.mjs +0 -2
  521. package/out/__chunks__/chunk-PQVNWTWJ.mjs.map +0 -7
  522. package/out/__chunks__/chunk-PSJELFEY.mjs +0 -2
  523. package/out/__chunks__/chunk-PSJELFEY.mjs.map +0 -7
  524. package/out/__chunks__/chunk-QA23TRYO.mjs +0 -2
  525. package/out/__chunks__/chunk-RSAYFMIM.mjs +0 -2
  526. package/out/__chunks__/chunk-S2PZQQCM.mjs +0 -2
  527. package/out/__chunks__/chunk-S2PZQQCM.mjs.map +0 -7
  528. package/out/__chunks__/chunk-SHNAULDW.mjs +0 -2
  529. package/out/__chunks__/chunk-SVR3TUOY.mjs +0 -1
  530. package/out/__chunks__/chunk-TFZ46GCB.mjs +0 -1
  531. package/out/__chunks__/chunk-UCI2LZF5.mjs.map +0 -7
  532. package/out/__chunks__/chunk-UFDELD3B.mjs +0 -2
  533. package/out/__chunks__/chunk-UFDELD3B.mjs.map +0 -7
  534. package/out/__chunks__/chunk-VJGOUAZ2.mjs +0 -2
  535. package/out/__chunks__/chunk-VJGOUAZ2.mjs.map +0 -7
  536. package/out/__chunks__/chunk-WC6DHH2B.mjs +0 -2
  537. package/out/__chunks__/chunk-WG5ONYK4.mjs +0 -2
  538. package/out/__chunks__/chunk-WHEXX3BD.mjs +0 -1
  539. package/out/__chunks__/chunk-WXC5EE2F.mjs.map +0 -7
  540. package/out/__chunks__/chunk-YFPMAZOS.mjs +0 -1
  541. package/out/__chunks__/chunk-YPV63DYG.mjs.map +0 -7
  542. package/out/__chunks__/chunk-YV7ZJBAY.mjs +0 -1
  543. package/out/__chunks__/chunk-YV7ZJBAY.mjs.map +0 -7
  544. package/out/__chunks__/chunk-ZFXAT6MD.mjs +0 -1
  545. package/out/__chunks__/chunk-ZFXAT6MD.mjs.map +0 -7
  546. package/out/__chunks__/chunk-ZNYD34VT.mjs +0 -2
  547. package/out/__chunks__/chunk-ZZ6Z3QEX.mjs +0 -2
  548. package/out/apiCalls/account/index.cjs.map +0 -7
  549. package/out/apiCalls/account/index.d.ts +0 -1
  550. package/out/apiCalls/account/index.mjs +0 -2
  551. package/out/apiCalls/configuration/index.cjs.map +0 -7
  552. package/out/apiCalls/configuration/index.d.ts +0 -2
  553. package/out/apiCalls/configuration/index.mjs +0 -2
  554. package/out/apiCalls/index.cjs +0 -2
  555. package/out/apiCalls/index.cjs.map +0 -7
  556. package/out/apiCalls/index.d.ts +0 -6
  557. package/out/apiCalls/index.mjs +0 -2
  558. package/out/apiCalls/tokens/index.cjs +0 -2
  559. package/out/apiCalls/tokens/index.cjs.map +0 -7
  560. package/out/apiCalls/tokens/index.d.ts +0 -1
  561. package/out/apiCalls/tokens/index.mjs +0 -2
  562. package/out/apiCalls/tokens/index.mjs.map +0 -7
  563. package/out/apiCalls/utils/index.cjs +0 -2
  564. package/out/apiCalls/utils/index.cjs.map +0 -7
  565. package/out/apiCalls/utils/index.d.ts +0 -3
  566. package/out/apiCalls/utils/index.mjs +0 -2
  567. package/out/apiCalls/utils/index.mjs.map +0 -7
  568. package/out/apiCalls/websocket/index.cjs +0 -2
  569. package/out/apiCalls/websocket/index.cjs.map +0 -7
  570. package/out/apiCalls/websocket/index.d.ts +0 -1
  571. package/out/apiCalls/websocket/index.mjs +0 -2
  572. package/out/apiCalls/websocket/index.mjs.map +0 -7
  573. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.cjs +0 -2
  574. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.cjs.map +0 -7
  575. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +0 -2
  576. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +0 -2
  577. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +0 -2
  578. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.cjs +0 -2
  579. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.cjs.map +0 -7
  580. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +0 -2
  581. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.cjs +0 -2
  582. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +0 -2
  583. package/out/providers/strategies/LedgerProviderStrategy/helpers/secondsToTimeString.mjs +0 -2
  584. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +0 -2
  585. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs.map +0 -7
  586. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.cjs +0 -2
  587. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.cjs.map +0 -7
  588. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +0 -2
  589. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.types.cjs.map +0 -7
  590. package/out/utils/visual/index.cjs +0 -2
  591. package/out/utils/visual/index.cjs.map +0 -7
  592. package/out/utils/visual/index.d.ts +0 -1
  593. package/out/utils/visual/index.mjs +0 -2
  594. package/out/utils/visual/index.mjs.map +0 -7
  595. /package/out/__chunks__/{chunk-DM3C2PPR.mjs.map → chunk-2RTOYKHB.mjs.map} +0 -0
  596. /package/out/__chunks__/{chunk-F33ERG33.mjs.map → chunk-3CG4C7T4.mjs.map} +0 -0
  597. /package/out/__chunks__/{chunk-IE3A2COQ.mjs.map → chunk-3IYTFWEN.mjs.map} +0 -0
  598. /package/out/__chunks__/{chunk-DBNPRNJV.mjs.map → chunk-3S3EXLLM.mjs.map} +0 -0
  599. /package/out/__chunks__/{chunk-6SC2DWV6.mjs.map → chunk-4GCIE2BM.mjs.map} +0 -0
  600. /package/out/__chunks__/{chunk-W6M5WJ3V.mjs.map → chunk-4QDHKULK.mjs.map} +0 -0
  601. /package/out/__chunks__/{chunk-RUE5QYSG.mjs.map → chunk-55U3WK3C.mjs.map} +0 -0
  602. /package/out/__chunks__/{chunk-6WUHHOG2.mjs.map → chunk-573JTRNC.mjs.map} +0 -0
  603. /package/out/__chunks__/{chunk-MBNRIXNQ.mjs.map → chunk-5KYXNO4J.mjs.map} +0 -0
  604. /package/out/__chunks__/{chunk-WC6DHH2B.mjs.map → chunk-6BOC75BF.mjs.map} +0 -0
  605. /package/out/__chunks__/{chunk-AQNUGUG3.mjs.map → chunk-6CLCXSHA.mjs.map} +0 -0
  606. /package/out/__chunks__/{chunk-6ET5BDZH.mjs.map → chunk-6CQMLD25.mjs.map} +0 -0
  607. /package/out/__chunks__/{chunk-OEXP5D2Q.mjs.map → chunk-6EKK7AJE.mjs.map} +0 -0
  608. /package/out/__chunks__/{chunk-5KCP7UJT.mjs.map → chunk-6F4OKEUQ.mjs.map} +0 -0
  609. /package/out/__chunks__/{chunk-UERJ6AKK.mjs.map → chunk-7MBSWJUD.mjs.map} +0 -0
  610. /package/out/__chunks__/{chunk-ZGMF4QYV.mjs.map → chunk-7WJMUTGI.mjs.map} +0 -0
  611. /package/out/__chunks__/{chunk-O5MS2L3D.mjs.map → chunk-AFLCI6IF.mjs.map} +0 -0
  612. /package/out/__chunks__/{chunk-B2RHOOA6.mjs.map → chunk-AGJVEK6I.mjs.map} +0 -0
  613. /package/out/__chunks__/{chunk-QDX2JCQH.mjs.map → chunk-ATLICLWT.mjs.map} +0 -0
  614. /package/out/__chunks__/{chunk-MODSKR2X.mjs.map → chunk-BUJNOQZJ.mjs.map} +0 -0
  615. /package/out/__chunks__/{chunk-DXRSXWLQ.mjs.map → chunk-C4SERLP4.mjs.map} +0 -0
  616. /package/out/__chunks__/{chunk-INRKVOET.mjs.map → chunk-CUDPQDXY.mjs.map} +0 -0
  617. /package/out/__chunks__/{chunk-C2FLFZOO.mjs.map → chunk-CVXQYCEE.mjs.map} +0 -0
  618. /package/out/__chunks__/{chunk-ONSO75O2.mjs.map → chunk-CXAX5TAG.mjs.map} +0 -0
  619. /package/out/__chunks__/{chunk-PNSB4HHK.mjs.map → chunk-CZ2S4XSL.mjs.map} +0 -0
  620. /package/out/__chunks__/{chunk-KQV57RV3.mjs.map → chunk-D3VRMBRS.mjs.map} +0 -0
  621. /package/out/__chunks__/{chunk-G5MRPRWI.mjs.map → chunk-DW6RO5LJ.mjs.map} +0 -0
  622. /package/out/__chunks__/{chunk-XG6DEDBU.mjs.map → chunk-E77ZH5JT.mjs.map} +0 -0
  623. /package/out/__chunks__/{chunk-OFVUWY2K.mjs.map → chunk-EKWN4V73.mjs.map} +0 -0
  624. /package/out/__chunks__/{chunk-33MSDZAP.mjs.map → chunk-EPL2CHU6.mjs.map} +0 -0
  625. /package/out/__chunks__/{chunk-WWYX7L4I.mjs.map → chunk-FF45FPD3.mjs.map} +0 -0
  626. /package/out/__chunks__/{chunk-STBF3KTB.mjs.map → chunk-FNHO66WN.mjs.map} +0 -0
  627. /package/out/__chunks__/{chunk-SHNAULDW.mjs.map → chunk-FRUJEORM.mjs.map} +0 -0
  628. /package/out/__chunks__/{chunk-5OMQOYP7.mjs.map → chunk-G5N56FHJ.mjs.map} +0 -0
  629. /package/out/__chunks__/{chunk-JKR5DRPM.mjs.map → chunk-GBEJIZDR.mjs.map} +0 -0
  630. /package/out/__chunks__/{chunk-K5MJ4FMD.mjs.map → chunk-GEB2W7CV.mjs.map} +0 -0
  631. /package/out/__chunks__/{chunk-RSAYFMIM.mjs.map → chunk-H73D4VUZ.mjs.map} +0 -0
  632. /package/out/__chunks__/{chunk-AAQCK4UU.mjs.map → chunk-HBPQEY3L.mjs.map} +0 -0
  633. /package/out/__chunks__/{chunk-2XGXXRSH.mjs.map → chunk-HFX5WAAI.mjs.map} +0 -0
  634. /package/out/__chunks__/{chunk-QA23TRYO.mjs.map → chunk-HKDRMMI5.mjs.map} +0 -0
  635. /package/out/__chunks__/{chunk-MCXQTDAK.mjs.map → chunk-HUXPA4C2.mjs.map} +0 -0
  636. /package/out/__chunks__/{chunk-AVXL7ZQK.mjs.map → chunk-HYH55J3D.mjs.map} +0 -0
  637. /package/out/__chunks__/{chunk-WBF6D374.mjs.map → chunk-I424CDNL.mjs.map} +0 -0
  638. /package/out/__chunks__/{chunk-WZGG2YKQ.mjs.map → chunk-IVHD32VC.mjs.map} +0 -0
  639. /package/out/__chunks__/{chunk-YK7T6MBD.mjs.map → chunk-IWP36NOU.mjs.map} +0 -0
  640. /package/out/__chunks__/{chunk-4POCTP6S.mjs.map → chunk-IYM4ZX72.mjs.map} +0 -0
  641. /package/out/__chunks__/{chunk-MQJQMAW3.mjs.map → chunk-J5TLE6SA.mjs.map} +0 -0
  642. /package/out/__chunks__/{chunk-ITZJPUDG.mjs.map → chunk-JDP24JPD.mjs.map} +0 -0
  643. /package/out/__chunks__/{chunk-5JQ3V6QZ.mjs.map → chunk-JPSW3MCK.mjs.map} +0 -0
  644. /package/out/__chunks__/{chunk-B6VRKK6A.mjs.map → chunk-JZ22ZC2D.mjs.map} +0 -0
  645. /package/out/__chunks__/{chunk-AWQZ56BT.mjs.map → chunk-K4JJZCL3.mjs.map} +0 -0
  646. /package/out/__chunks__/{chunk-CJTGYQ5L.mjs.map → chunk-K5K2FVFB.mjs.map} +0 -0
  647. /package/out/__chunks__/{chunk-CUQBPPWE.mjs.map → chunk-KIMRQMXB.mjs.map} +0 -0
  648. /package/out/__chunks__/{chunk-KMJMQEXI.mjs.map → chunk-LGGG3HW7.mjs.map} +0 -0
  649. /package/out/__chunks__/{chunk-OILJUNFX.mjs.map → chunk-LKOWOTL2.mjs.map} +0 -0
  650. /package/out/__chunks__/{chunk-YLD26I5H.mjs.map → chunk-LYSI4URP.mjs.map} +0 -0
  651. /package/out/__chunks__/{chunk-2JTLNZM3.mjs.map → chunk-MLDUGECH.mjs.map} +0 -0
  652. /package/out/__chunks__/{chunk-7ZIJXDPY.mjs.map → chunk-MS7BFY27.mjs.map} +0 -0
  653. /package/out/__chunks__/{chunk-SKBL5PDX.mjs.map → chunk-N4KX33RW.mjs.map} +0 -0
  654. /package/out/__chunks__/{chunk-U24DHQDI.mjs.map → chunk-N5VJJRWV.mjs.map} +0 -0
  655. /package/out/__chunks__/{chunk-BT2J2GH4.mjs.map → chunk-NAYC2B72.mjs.map} +0 -0
  656. /package/out/__chunks__/{chunk-H24QGHAH.mjs.map → chunk-NAYDJEWI.mjs.map} +0 -0
  657. /package/out/__chunks__/{chunk-PBXNAY2B.mjs.map → chunk-NVBWPLR7.mjs.map} +0 -0
  658. /package/out/__chunks__/{chunk-JBZR35CW.mjs.map → chunk-O65OBG5D.mjs.map} +0 -0
  659. /package/out/__chunks__/{chunk-SR7TVATV.mjs.map → chunk-O6ALDFLM.mjs.map} +0 -0
  660. /package/out/__chunks__/{chunk-3S57OP4Z.mjs.map → chunk-OAPLU7UX.mjs.map} +0 -0
  661. /package/out/__chunks__/{chunk-NZFUM3VC.mjs.map → chunk-ODHXJQOF.mjs.map} +0 -0
  662. /package/out/__chunks__/{chunk-BENZKRAG.mjs.map → chunk-OSG4UY2Z.mjs.map} +0 -0
  663. /package/out/__chunks__/{chunk-ZZ6Z3QEX.mjs.map → chunk-P2MHA65O.mjs.map} +0 -0
  664. /package/out/__chunks__/{chunk-D2ULWBRR.mjs.map → chunk-PKLBZG2R.mjs.map} +0 -0
  665. /package/out/__chunks__/{chunk-IS3TZ43F.mjs.map → chunk-QJJEW7MB.mjs.map} +0 -0
  666. /package/out/__chunks__/{chunk-DBIIY2TX.mjs.map → chunk-QNELH2S2.mjs.map} +0 -0
  667. /package/out/__chunks__/{chunk-7MOSAB64.mjs.map → chunk-QO62QJ5H.mjs.map} +0 -0
  668. /package/out/__chunks__/{chunk-3KFEBW7N.mjs.map → chunk-RV6SJMD7.mjs.map} +0 -0
  669. /package/out/__chunks__/{chunk-GNHD56P3.mjs.map → chunk-SALLGAGD.mjs.map} +0 -0
  670. /package/out/__chunks__/{chunk-BSFYNH6O.mjs.map → chunk-SAN5F2PW.mjs.map} +0 -0
  671. /package/out/__chunks__/{chunk-QHXZ354C.mjs.map → chunk-TFARIEZF.mjs.map} +0 -0
  672. /package/out/__chunks__/{chunk-W4QMH63P.mjs.map → chunk-TMRKN7VL.mjs.map} +0 -0
  673. /package/out/__chunks__/{chunk-BJOEWWLZ.mjs.map → chunk-TR2KNDCH.mjs.map} +0 -0
  674. /package/out/__chunks__/{chunk-JMC7CMTU.mjs.map → chunk-TVXZBSUY.mjs.map} +0 -0
  675. /package/out/__chunks__/{chunk-SVR3TUOY.mjs.map → chunk-U6RAWQXO.mjs.map} +0 -0
  676. /package/out/__chunks__/{chunk-22ELCCFJ.mjs.map → chunk-UCFMVEOZ.mjs.map} +0 -0
  677. /package/out/__chunks__/{chunk-QXC4D3AC.mjs.map → chunk-UT4BWFQH.mjs.map} +0 -0
  678. /package/out/__chunks__/{chunk-TZTP57OK.mjs.map → chunk-UY22M7WB.mjs.map} +0 -0
  679. /package/out/__chunks__/{chunk-J62UCITY.mjs.map → chunk-VGGJESXR.mjs.map} +0 -0
  680. /package/out/__chunks__/{chunk-ZNYD34VT.mjs.map → chunk-VTEOS2MM.mjs.map} +0 -0
  681. /package/out/__chunks__/{chunk-J76GINM5.mjs.map → chunk-WEZV6U4A.mjs.map} +0 -0
  682. /package/out/__chunks__/{chunk-MRIKSX32.mjs.map → chunk-WYVAFCPU.mjs.map} +0 -0
  683. /package/out/__chunks__/{chunk-WG5ONYK4.mjs.map → chunk-XLLBREX7.mjs.map} +0 -0
  684. /package/out/__chunks__/{chunk-EGO5R7IZ.mjs.map → chunk-XNSSZDSU.mjs.map} +0 -0
  685. /package/out/__chunks__/{chunk-PDMEOQYV.mjs.map → chunk-XSUHHPZ2.mjs.map} +0 -0
  686. /package/out/__chunks__/{chunk-P6HDK262.mjs.map → chunk-XTATC65P.mjs.map} +0 -0
  687. /package/out/__chunks__/{chunk-VGO3VD5N.mjs.map → chunk-XV3H7VOE.mjs.map} +0 -0
  688. /package/out/__chunks__/{chunk-TKTDGTN7.mjs.map → chunk-XXSANEEO.mjs.map} +0 -0
  689. /package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.cjs +0 -0
  690. /package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.d.ts +0 -0
  691. /package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.mjs.map +0 -0
  692. /package/out/{__chunks__/chunk-TFZ46GCB.mjs.map → methods/initApp/helpers/waitForStoreRehydration.mjs.map} +0 -0
  693. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{authenticateLedgerAccount.mjs.map → authenticateLedgerAccount/authenticateLedgerAccount.mjs.map} +0 -0
  694. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.d.ts → authenticateLedgerAccount/helpers/getAuthTokenText.d.ts} +0 -0
  695. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.mjs.map → authenticateLedgerAccount/helpers/getAuthTokenText.mjs.map} +0 -0
  696. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerVersionOptions.d.ts → authenticateLedgerAccount/helpers/getLedgerVersionOptions.d.ts} +0 -0
  697. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerVersionOptions.mjs.map → authenticateLedgerAccount/helpers/getLedgerVersionOptions.mjs.map} +0 -0
  698. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.cjs → authenticateLedgerAccount/helpers/secondsToTimeString.cjs} +0 -0
  699. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.d.ts → authenticateLedgerAccount/helpers/secondsToTimeString.d.ts} +0 -0
  700. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.mjs.map → authenticateLedgerAccount/helpers/secondsToTimeString.mjs.map} +0 -0
  701. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/index.cjs +0 -0
  702. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/index.d.ts +0 -0
  703. /package/out/{apiCalls/account → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList}/index.mjs.map +0 -0
  704. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.d.ts +0 -0
  705. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.mjs.map +0 -0
  706. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.cjs +0 -0
  707. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.mjs +0 -0
  708. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.mjs.map +0 -0
  709. /package/out/{__chunks__/chunk-WHEXX3BD.mjs.map → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs.map} +0 -0
  710. /package/out/{apiCalls/configuration → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount}/index.mjs.map +0 -0
  711. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerProvider.mjs.map → getLedgerProvider/getLedgerProvider.mjs.map} +0 -0
  712. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.d.ts → getLedgerProvider/helpers/getLedgerConfiguration.d.ts} +0 -0
  713. /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.mjs.map → getLedgerProvider/helpers/getLedgerConfiguration.mjs.map} +0 -0
  714. /package/out/{__chunks__/chunk-YFPMAZOS.mjs.map → providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.mjs.map} +0 -0
  715. /package/out/{apiCalls → providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider}/index.mjs.map +0 -0
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # MultiversX SDK for Front-End DApps
2
2
 
3
3
  [![Unit tests](https://github.com/multiversx/mx-sdk-dapp/actions/workflows/pre-merge-unit-tests.yml/badge.svg)](https://github.com/multiversx/mx-sdk-dapp/actions/workflows/pre-merge-unit-tests.yml)
4
+ [![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/multiversx/mx-sdk-dapp/main/coverage-total.json&logo=github&logoColor=white)](https://raw.githubusercontent.com/multiversx/mx-sdk-dapp/main/coverage-total.json)
4
5
  [![Integration tests](https://github.com/multiversx/mx-sdk-dapp/actions/workflows/run-template-dapps-integration.yml/badge.svg)](https://github.com/multiversx/mx-sdk-dapp/actions/workflows/run-template-dapps-integration.yml)
5
6
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/multiversx/mx-sdk-dapp)
6
7
 
8
+
7
9
  MultiversX Front-End SDK for JavaScript and TypeScript (written in TypeScript).
8
10
 
9
11
  ## Introduction
@@ -0,0 +1,2 @@
1
+ var o="accounts",t="address",N="blocks",s="code",O="collections",c="dapp/config",T="contracts",n="economics",e="identities",E="keys",I="locked-accounts",r="logs",D="miniblocks",p="network/config",S="nfts",_="nodes",x="providers",P="roles",C="sc-results",A="stake",a="tokens",i="transactions/ppu",R="transactions/count",d="batch",l="transactions",L="transfers";export{o as a,t as b,N as c,s as d,O as e,c as f,T as g,n as h,e as i,E as j,I as k,r as l,D as m,p as n,S as o,_ as p,x as q,P as r,C as s,A as t,a as u,i as v,R as w,d as x,l as y,L as z};
2
+ //# sourceMappingURL=chunk-2JKCBTYK.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/apiCalls/endpoints.ts"],
4
- "sourcesContent": ["export const ACCOUNTS_ENDPOINT = 'accounts';\nexport const ADDRESS_ENDPOINT = 'address';\nexport const BLOCKS_ENDPOINT = 'blocks';\nexport const CODE_ENDPOINT = 'code';\nexport const COLLECTIONS_ENDPOINT = 'collections';\nexport const CONFIG_ENDPOINT = 'dapp/config';\nexport const CONTRACTS_ENDPOINT = 'contracts';\nexport const ECONOMICS_ENDPOINT = 'economics';\nexport const IDENTITIES_ENDPOINT = 'identities';\nexport const KEYS_ENDPOINT = 'keys';\nexport const LOCKED_ACCOUNTS_ENDPOINT = 'locked-accounts';\nexport const LOGS_ENDPOINT = 'logs';\nexport const MINIBLOCKS_ENDPOINT = 'miniblocks';\nexport const NETWORK_CONFIG_ENDPOINT = 'network/config';\nexport const NFTS_ENDPOINT = 'nfts';\nexport const NODES_ENDPOINT = 'nodes';\nexport const PROVIDERS_ENDPOINT = 'providers';\nexport const ROLES_ENDPOINT = 'roles';\nexport const SC_RESULTS_ENDPOINT = 'sc-results';\nexport const STAKE_ENDPOINT = 'stake';\nexport const TOKENS_ENDPOINT = 'tokens';\nexport const TRANSACTIONS_COUNT_ENDPOINT = 'transactions/count';\nexport const TRANSACTIONS_BATCH = 'batch';\nexport const TRANSACTIONS_ENDPOINT = 'transactions';\nexport const TRANSFERS_ENDPOINT = 'transfers';\n"],
5
- "mappings": "AAAO,IAAMA,EAAoB,WACpBC,EAAmB,UACnBC,EAAkB,SAClBC,EAAgB,OAChBC,EAAuB,cACvBC,EAAkB,cAClBC,EAAqB,YACrBC,EAAqB,YACrBC,EAAsB,aACtBC,EAAgB,OAChBC,EAA2B,kBAC3BC,EAAgB,OAChBC,EAAsB,aACtBC,EAA0B,iBAC1BC,EAAgB,OAChBC,EAAiB,QACjBC,EAAqB,YACrBC,EAAiB,QACjBC,EAAsB,aACtBC,EAAiB,QACjBC,EAAkB,SAClBC,EAA8B,qBAC9BC,EAAqB,QACrBC,EAAwB,eACxBC,EAAqB",
6
- "names": ["ACCOUNTS_ENDPOINT", "ADDRESS_ENDPOINT", "BLOCKS_ENDPOINT", "CODE_ENDPOINT", "COLLECTIONS_ENDPOINT", "CONFIG_ENDPOINT", "CONTRACTS_ENDPOINT", "ECONOMICS_ENDPOINT", "IDENTITIES_ENDPOINT", "KEYS_ENDPOINT", "LOCKED_ACCOUNTS_ENDPOINT", "LOGS_ENDPOINT", "MINIBLOCKS_ENDPOINT", "NETWORK_CONFIG_ENDPOINT", "NFTS_ENDPOINT", "NODES_ENDPOINT", "PROVIDERS_ENDPOINT", "ROLES_ENDPOINT", "SC_RESULTS_ENDPOINT", "STAKE_ENDPOINT", "TOKENS_ENDPOINT", "TRANSACTIONS_COUNT_ENDPOINT", "TRANSACTIONS_BATCH", "TRANSACTIONS_ENDPOINT", "TRANSFERS_ENDPOINT"]
4
+ "sourcesContent": ["export const ACCOUNTS_ENDPOINT = 'accounts';\nexport const ADDRESS_ENDPOINT = 'address';\nexport const BLOCKS_ENDPOINT = 'blocks';\nexport const CODE_ENDPOINT = 'code';\nexport const COLLECTIONS_ENDPOINT = 'collections';\nexport const CONFIG_ENDPOINT = 'dapp/config';\nexport const CONTRACTS_ENDPOINT = 'contracts';\nexport const ECONOMICS_ENDPOINT = 'economics';\nexport const IDENTITIES_ENDPOINT = 'identities';\nexport const KEYS_ENDPOINT = 'keys';\nexport const LOCKED_ACCOUNTS_ENDPOINT = 'locked-accounts';\nexport const LOGS_ENDPOINT = 'logs';\nexport const MINIBLOCKS_ENDPOINT = 'miniblocks';\nexport const NETWORK_CONFIG_ENDPOINT = 'network/config';\nexport const NFTS_ENDPOINT = 'nfts';\nexport const NODES_ENDPOINT = 'nodes';\nexport const PROVIDERS_ENDPOINT = 'providers';\nexport const ROLES_ENDPOINT = 'roles';\nexport const SC_RESULTS_ENDPOINT = 'sc-results';\nexport const STAKE_ENDPOINT = 'stake';\nexport const TOKENS_ENDPOINT = 'tokens';\nexport const GAS_STATION_ENDPOINT = 'transactions/ppu';\nexport const TRANSACTIONS_COUNT_ENDPOINT = 'transactions/count';\nexport const TRANSACTIONS_BATCH = 'batch';\nexport const TRANSACTIONS_ENDPOINT = 'transactions';\nexport const TRANSFERS_ENDPOINT = 'transfers';\n"],
5
+ "mappings": "AAAO,IAAMA,EAAoB,WACpBC,EAAmB,UACnBC,EAAkB,SAClBC,EAAgB,OAChBC,EAAuB,cACvBC,EAAkB,cAClBC,EAAqB,YACrBC,EAAqB,YACrBC,EAAsB,aACtBC,EAAgB,OAChBC,EAA2B,kBAC3BC,EAAgB,OAChBC,EAAsB,aACtBC,EAA0B,iBAC1BC,EAAgB,OAChBC,EAAiB,QACjBC,EAAqB,YACrBC,EAAiB,QACjBC,EAAsB,aACtBC,EAAiB,QACjBC,EAAkB,SAClBC,EAAuB,mBACvBC,EAA8B,qBAC9BC,EAAqB,QACrBC,EAAwB,eACxBC,EAAqB",
6
+ "names": ["ACCOUNTS_ENDPOINT", "ADDRESS_ENDPOINT", "BLOCKS_ENDPOINT", "CODE_ENDPOINT", "COLLECTIONS_ENDPOINT", "CONFIG_ENDPOINT", "CONTRACTS_ENDPOINT", "ECONOMICS_ENDPOINT", "IDENTITIES_ENDPOINT", "KEYS_ENDPOINT", "LOCKED_ACCOUNTS_ENDPOINT", "LOGS_ENDPOINT", "MINIBLOCKS_ENDPOINT", "NETWORK_CONFIG_ENDPOINT", "NFTS_ENDPOINT", "NODES_ENDPOINT", "PROVIDERS_ENDPOINT", "ROLES_ENDPOINT", "SC_RESULTS_ENDPOINT", "STAKE_ENDPOINT", "TOKENS_ENDPOINT", "GAS_STATION_ENDPOINT", "TRANSACTIONS_COUNT_ENDPOINT", "TRANSACTIONS_BATCH", "TRANSACTIONS_ENDPOINT", "TRANSFERS_ENDPOINT"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-AGJVEK6I.mjs";import{d as o}from"./chunk-NAYDJEWI.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
2
+ //# sourceMappingURL=chunk-2KGBHCEN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/methods/initApp/helpers/waitForStoreRehydration.ts"],
4
+ "sourcesContent": ["import { defaultStorageCallback, StorageCallback } from 'store/storage';\nimport { StoreApi } from 'store/store';\nimport { REHYDRATE_STORE_TIMEOUT } from '../../../constants';\n\nconst REHYDRATE_TIMEOUT_SECONDS = REHYDRATE_STORE_TIMEOUT / 1000;\n\nexport async function waitForStoreRehydration({\n store,\n getStorageCallback\n}: {\n store: StoreApi;\n getStorageCallback: StorageCallback;\n}): Promise<void> {\n // Wait for store rehydration when using async storage (like React Native AsyncStorage)\n // This ensures the store is fully populated before restoreProvider() executes\n if (getStorageCallback !== defaultStorageCallback) {\n try {\n await new Promise<void>((resolve, reject) => {\n if (store.persist.hasHydrated()) {\n resolve();\n }\n\n store.persist.onFinishHydration(() => {\n resolve();\n });\n\n setTimeout(() => {\n reject();\n }, REHYDRATE_STORE_TIMEOUT);\n });\n } catch (error: any) {\n console.warn(\n `Store rehydration timed out after ${REHYDRATE_TIMEOUT_SECONDS} seconds. Continuing initialization...`,\n error?.message\n );\n }\n }\n}\n"],
5
+ "mappings": "kFAIA,IAAMA,EAA4BC,EAA0B,IAE5D,eAAsBC,EAAwB,CAC5C,MAAAC,EACA,mBAAAC,CACF,EAGkB,CAGhB,GAAIA,IAAuBC,EACzB,GAAI,CACF,MAAM,IAAI,QAAc,CAACC,EAASC,IAAW,CACvCJ,EAAM,QAAQ,YAAY,GAC5BG,EAAQ,EAGVH,EAAM,QAAQ,kBAAkB,IAAM,CACpCG,EAAQ,CACV,CAAC,EAED,WAAW,IAAM,CACfC,EAAO,CACT,EAAGN,CAAuB,CAC5B,CAAC,CACH,OAASO,EAAY,CACnB,QAAQ,KACN,qCAAqCR,CAAyB,yCAC9DQ,GAAO,OACT,CACF,CAEJ",
6
+ "names": ["REHYDRATE_TIMEOUT_SECONDS", "REHYDRATE_STORE_TIMEOUT", "waitForStoreRehydration", "store", "getStorageCallback", "defaultStorageCallback", "resolve", "reject", "error"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-XNSSZDSU.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";function d(t=e()){return r(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-2RTOYKHB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-STBF3KTB.mjs";import{a as u}from"./chunk-PNSB4HHK.mjs";import{a as l}from"./chunk-GNHD56P3.mjs";import{s as f}from"./chunk-EGO5R7IZ.mjs";import{c as T}from"./chunk-UERJ6AKK.mjs";import{f as h,g as d}from"./chunk-7VHTZYM2.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??f(),o=[],i=[];if(r.forEach(s=>{let e=u(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=l({transaction:s,address:T(t),explorerAddress:d(t),egldLabel:h(t)});e.status!=="pending"&&S({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
2
- //# sourceMappingURL=chunk-F33ERG33.mjs.map
1
+ import{a as S}from"./chunk-FNHO66WN.mjs";import{a as u}from"./chunk-CZ2S4XSL.mjs";import{s as f}from"./chunk-XNSSZDSU.mjs";import{c as T}from"./chunk-7MBSWJUD.mjs";import{f as h,g as d}from"./chunk-7VHTZYM2.mjs";import{a as l}from"./chunk-SALLGAGD.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??f(),o=[],i=[];if(r.forEach(s=>{let e=u(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=l({transaction:s,address:T(t),explorerAddress:d(t),egldLabel:h(t)});e.status!=="pending"&&S({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
2
+ //# sourceMappingURL=chunk-3CG4C7T4.mjs.map
@@ -1,2 +1,2 @@
1
- import{f as l}from"./chunk-PJWJZHIS.mjs";import{a as m}from"./chunk-DBIIY2TX.mjs";function g({token:t,noValue:n,showLastNonZeroDecimal:i}){let o=!n&&t.value&&t.type!=="NonFungibleESDT",r=t.decimals!=null,e="";t.type==="NonFungibleESDT"&&(e="NFT"),t.type==="SemiFungibleESDT"&&(e="SFT"),t.type==="MetaESDT"&&(e="Meta-ESDT");let a="";o&&r&&(a=r?l({input:t.value,decimals:t.decimals,digits:2,showLastNonZeroDecimal:i}):Number(t.value).toLocaleString("en"));let T=m.nftDetails(String(t.identifier)),c=t.ticker===t.collection?t.identifier??t.ticker:t.ticker;return{badgeText:e,tokenFormattedAmount:o?a:null,tokenExplorerLink:T,tokenLinkText:c,token:t,noValue:n,showLastNonZeroDecimal:i}}export{g as a};
2
- //# sourceMappingURL=chunk-IE3A2COQ.mjs.map
1
+ import{f as l}from"./chunk-PJWJZHIS.mjs";import{a as m}from"./chunk-QNELH2S2.mjs";function g({token:t,noValue:n,showLastNonZeroDecimal:i}){let o=!n&&t.value&&t.type!=="NonFungibleESDT",r=t.decimals!=null,e="";t.type==="NonFungibleESDT"&&(e="NFT"),t.type==="SemiFungibleESDT"&&(e="SFT"),t.type==="MetaESDT"&&(e="Meta-ESDT");let a="";o&&r&&(a=r?l({input:t.value,decimals:t.decimals,digits:2,showLastNonZeroDecimal:i}):Number(t.value).toLocaleString("en"));let T=m.nftDetails(String(t.identifier)),c=t.ticker===t.collection?t.identifier??t.ticker:t.ticker;return{badgeText:e,tokenFormattedAmount:o?a:null,tokenExplorerLink:T,tokenLinkText:c,token:t,noValue:n,showLastNonZeroDecimal:i}}export{g as a};
2
+ //# sourceMappingURL=chunk-3IYTFWEN.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-XNSSZDSU.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";function g(r=t()){return e(r).egldLabel}export{g as a};
2
+ //# sourceMappingURL=chunk-3S3EXLLM.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-XNSSZDSU.mjs";import{a as t}from"./chunk-7MBSWJUD.mjs";function n(r=o()){return t(r)}export{n as a};
2
+ //# sourceMappingURL=chunk-4GCIE2BM.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-4QDHKULK.mjs";import{d as l,e as m}from"./chunk-LYSI4URP.mjs";import{q as a}from"./chunk-XNSSZDSU.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as S}from"socket.io-client";var w=3e3,A=3,g=500,E=500,f="batchUpdated",p="connect",N="connect_error",I="disconnect";async function M(i){let{apiAddress:b,websocketUrl:k}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let c=null,s=null,o=e=>{t.status=e,u(e)},d=e=>{c&&clearTimeout(c),c=setTimeout(()=>{l(e)},E)},C=e=>{s&&clearTimeout(s),s=setTimeout(()=>{m(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(I),e.close(),console.log("Websocket disconnected.")),o("not_initialized"),t.instance=null,c&&clearTimeout(c),s&&clearTimeout(s)},y=async()=>{o("pending");let e="";try{e=k??await T(b)}catch(n){throw console.error("Failed to get websocket url:",n),o("not_initialized"),n}if(!e){o("not_initialized");return}t.instance=S(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:A,reconnectionDelay:g,timeout:w,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),o("completed")}),t.instance.on(N,n=>{console.warn("Websocket connect error: ",n.message)}),t.instance.on(I,n=>{console.warn("Websocket disconnected: ",n),o("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await y(),{closeConnection:W}}export{M as a};
2
+ //# sourceMappingURL=chunk-4MCQ27VQ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/methods/initApp/websocket/initializeWebsocketConnection.ts"],
4
+ "sourcesContent": ["import { io } from 'socket.io-client';\nimport { getWebsocketUrl } from 'apiCalls/websocket/getWebsocketUrl';\nimport {\n WebsocketConnectionStatusEnum,\n websocketConnection\n} from 'constants/websocket.constants';\nimport {\n setWebsocketBatchEvent,\n setWebsocketEvent\n} from 'store/actions/account/accountActions';\nimport { setWebsocketStatus } from 'store/actions/config/configActions';\nimport { networkSelector } from 'store/selectors';\nimport { getStore } from 'store/store';\nimport { BatchTransactionsWSResponseType } from 'types/websocket.types';\n\nconst TIMEOUT = 3_000;\nconst RECONNECTION_ATTEMPTS = 3;\nconst RETRY_INTERVAL = 500;\nconst MESSAGE_DELAY = 500;\nconst BATCH_UPDATED_EVENT = 'batchUpdated';\nconst CONNECT = 'connect';\nconst CONNECT_ERROR = 'connect_error';\nconst DISCONNECT = 'disconnect';\n\ntype TimeoutType = ReturnType<typeof setTimeout> | null;\n\nexport async function initializeWebsocketConnection(address: string) {\n const { apiAddress, websocketUrl: customWebsocketUrl } = networkSelector(\n getStore().getState()\n );\n\n if (!address) {\n throw new Error('Websocket could not be initialized: address missing');\n }\n\n let messageTimeout: TimeoutType = null;\n let batchTimeout: TimeoutType = null;\n\n // Update socket status in store for status subscription\n const updateSocketStatus = (status: WebsocketConnectionStatusEnum) => {\n websocketConnection.status = status;\n setWebsocketStatus(status);\n };\n\n const handleMessageReceived = (message: string) => {\n if (messageTimeout) {\n clearTimeout(messageTimeout);\n }\n messageTimeout = setTimeout(() => {\n setWebsocketEvent(message);\n }, MESSAGE_DELAY);\n };\n\n const handleBatchUpdate = (data: BatchTransactionsWSResponseType) => {\n if (batchTimeout) {\n clearTimeout(batchTimeout);\n }\n batchTimeout = setTimeout(() => {\n setWebsocketBatchEvent(data);\n }, MESSAGE_DELAY);\n };\n\n const closeConnection = () => {\n const instance = websocketConnection.instance;\n if (instance) {\n instance.off(CONNECT_ERROR);\n instance.off(CONNECT);\n instance.off(BATCH_UPDATED_EVENT);\n instance.off(DISCONNECT);\n instance.close();\n console.log('Websocket disconnected.');\n }\n\n updateSocketStatus(WebsocketConnectionStatusEnum.NOT_INITIALIZED);\n websocketConnection.instance = null;\n\n if (messageTimeout) {\n clearTimeout(messageTimeout);\n }\n\n if (batchTimeout) {\n clearTimeout(batchTimeout);\n }\n };\n\n const initializeConnection = async () => {\n updateSocketStatus(WebsocketConnectionStatusEnum.PENDING);\n\n let websocketUrl = '';\n try {\n websocketUrl = customWebsocketUrl ?? (await getWebsocketUrl(apiAddress));\n } catch (error) {\n console.error('Failed to get websocket url:', error);\n updateSocketStatus(WebsocketConnectionStatusEnum.NOT_INITIALIZED);\n throw error;\n }\n\n if (!websocketUrl) {\n updateSocketStatus(WebsocketConnectionStatusEnum.NOT_INITIALIZED);\n return;\n }\n\n websocketConnection.instance = io(websocketUrl, {\n forceNew: true,\n reconnection: true,\n reconnectionAttempts: RECONNECTION_ATTEMPTS,\n reconnectionDelay: RETRY_INTERVAL,\n timeout: TIMEOUT,\n query: { address }\n });\n\n websocketConnection.instance.onAny(handleMessageReceived);\n\n websocketConnection.instance.on(BATCH_UPDATED_EVENT, handleBatchUpdate);\n\n websocketConnection.instance.on(CONNECT, () => {\n console.log('Websocket connected.');\n updateSocketStatus(WebsocketConnectionStatusEnum.COMPLETED);\n });\n\n websocketConnection.instance.on(CONNECT_ERROR, (error) => {\n console.warn('Websocket connect error: ', error.message);\n });\n\n websocketConnection.instance.on(DISCONNECT, (reason) => {\n console.warn('Websocket disconnected: ', reason);\n updateSocketStatus(WebsocketConnectionStatusEnum.PENDING);\n });\n };\n\n if (\n websocketConnection.status ===\n WebsocketConnectionStatusEnum.NOT_INITIALIZED &&\n !websocketConnection.instance?.active\n ) {\n await initializeConnection();\n }\n\n return {\n closeConnection\n };\n}\n"],
5
+ "mappings": "6PAAA,OAAS,MAAAA,MAAU,mBAenB,IAAMC,EAAU,IACVC,EAAwB,EACxBC,EAAiB,IACjBC,EAAgB,IAChBC,EAAsB,eACtBC,EAAU,UACVC,EAAgB,gBAChBC,EAAa,aAInB,eAAsBC,EAA8BC,EAAiB,CACnE,GAAM,CAAE,WAAAC,EAAY,aAAcC,CAAmB,EAAIC,EACvDC,EAAS,EAAE,SAAS,CACtB,EAEA,GAAI,CAACJ,EACH,MAAM,IAAI,MAAM,qDAAqD,EAGvE,IAAIK,EAA8B,KAC9BC,EAA4B,KAG1BC,EAAsBC,GAA0C,CACpEC,EAAoB,OAASD,EAC7BE,EAAmBF,CAAM,CAC3B,EAEMG,EAAyBC,GAAoB,CAC7CP,GACF,aAAaA,CAAc,EAE7BA,EAAiB,WAAW,IAAM,CAChCQ,EAAkBD,CAAO,CAC3B,EAAGlB,CAAa,CAClB,EAEMoB,EAAqBC,GAA0C,CAC/DT,GACF,aAAaA,CAAY,EAE3BA,EAAe,WAAW,IAAM,CAC9BU,EAAuBD,CAAI,CAC7B,EAAGrB,CAAa,CAClB,EAEMuB,EAAkB,IAAM,CAC5B,IAAMC,EAAWT,EAAoB,SACjCS,IACFA,EAAS,IAAIrB,CAAa,EAC1BqB,EAAS,IAAItB,CAAO,EACpBsB,EAAS,IAAIvB,CAAmB,EAChCuB,EAAS,IAAIpB,CAAU,EACvBoB,EAAS,MAAM,EACf,QAAQ,IAAI,yBAAyB,GAGvCX,mBAAgE,EAChEE,EAAoB,SAAW,KAE3BJ,GACF,aAAaA,CAAc,EAGzBC,GACF,aAAaA,CAAY,CAE7B,EAEMa,EAAuB,SAAY,CACvCZ,WAAwD,EAExD,IAAIa,EAAe,GACnB,GAAI,CACFA,EAAelB,GAAuB,MAAMmB,EAAgBpB,CAAU,CACxE,OAASqB,EAAO,CACd,cAAQ,MAAM,+BAAgCA,CAAK,EACnDf,mBAAgE,EAC1De,CACR,CAEA,GAAI,CAACF,EAAc,CACjBb,mBAAgE,EAChE,MACF,CAEAE,EAAoB,SAAWc,EAAGH,EAAc,CAC9C,SAAU,GACV,aAAc,GACd,qBAAsB5B,EACtB,kBAAmBC,EACnB,QAASF,EACT,MAAO,CAAE,QAAAS,CAAQ,CACnB,CAAC,EAEDS,EAAoB,SAAS,MAAME,CAAqB,EAExDF,EAAoB,SAAS,GAAGd,EAAqBmB,CAAiB,EAEtEL,EAAoB,SAAS,GAAGb,EAAS,IAAM,CAC7C,QAAQ,IAAI,sBAAsB,EAClCW,aAA0D,CAC5D,CAAC,EAEDE,EAAoB,SAAS,GAAGZ,EAAgByB,GAAU,CACxD,QAAQ,KAAK,4BAA6BA,EAAM,OAAO,CACzD,CAAC,EAEDb,EAAoB,SAAS,GAAGX,EAAa0B,GAAW,CACtD,QAAQ,KAAK,2BAA4BA,CAAM,EAC/CjB,WAAwD,CAC1D,CAAC,CACH,EAEA,OACEE,EAAoB,4BAEpB,CAACA,EAAoB,UAAU,QAE/B,MAAMU,EAAqB,EAGtB,CACL,gBAAAF,CACF,CACF",
6
+ "names": ["io", "TIMEOUT", "RECONNECTION_ATTEMPTS", "RETRY_INTERVAL", "MESSAGE_DELAY", "BATCH_UPDATED_EVENT", "CONNECT", "CONNECT_ERROR", "DISCONNECT", "initializeWebsocketConnection", "address", "apiAddress", "customWebsocketUrl", "networkSelector", "getStore", "messageTimeout", "batchTimeout", "updateSocketStatus", "status", "websocketConnection", "setWebsocketStatus", "handleMessageReceived", "message", "setWebsocketEvent", "handleBatchUpdate", "data", "setWebsocketBatchEvent", "closeConnection", "instance", "initializeConnection", "websocketUrl", "getWebsocketUrl", "error", "io", "reason"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-4TBVQD27.mjs";import{q as o}from"./chunk-EGO5R7IZ.mjs";var C=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,{type:"setNativeAuthConfig",payload:{value:t}}),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,{type:"setWebsocketStatus",payload:{value:t}}),f=t=>o().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,l=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:l,walletConnectV2RelayAddress:a}},!1,{type:"setWalletConnectConfig",payload:{value:t}});export{C as a,c as b,f as c};
2
- //# sourceMappingURL=chunk-W6M5WJ3V.mjs.map
1
+ import{a as n}from"./chunk-4TBVQD27.mjs";import{q as o}from"./chunk-XNSSZDSU.mjs";var C=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,{type:"setNativeAuthConfig",payload:{value:t}}),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,{type:"setWebsocketStatus",payload:{value:t}}),f=t=>o().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,l=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:l,walletConnectV2RelayAddress:a}},!1,{type:"setWalletConnectConfig",payload:{value:t}});export{C as a,c as b,f as c};
2
+ //# sourceMappingURL=chunk-4QDHKULK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-N55JEIM6.mjs";import{b as n,c as o}from"./chunk-JBZR35CW.mjs";import{s}from"./chunk-EGO5R7IZ.mjs";function T({sessionId:t,transaction:e}){o({sessionId:t,transaction:e});let i=s().transactions?.[t].transactions,a=r(i);return a&&n({sessionId:t,status:a}),a}export{T as a};
2
- //# sourceMappingURL=chunk-RUE5QYSG.mjs.map
1
+ import{a as r}from"./chunk-N55JEIM6.mjs";import{b as n,c as o}from"./chunk-O65OBG5D.mjs";import{s}from"./chunk-XNSSZDSU.mjs";function T({sessionId:t,transaction:e}){o({sessionId:t,transaction:e});let i=s().transactions?.[t].transactions,a=r(i);return a&&n({sessionId:t,status:a}),a}export{T as a};
2
+ //# sourceMappingURL=chunk-55U3WK3C.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-7JDTQFLQ.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-XNSSZDSU.mjs";import{a as n}from"./chunk-7MBSWJUD.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
+ //# sourceMappingURL=chunk-573JTRNC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as U}from"./chunk-DM3C2PPR.mjs";import{a as _}from"./chunk-4SS6EY66.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-RBZC4PEU.mjs";import{a as B}from"./chunk-3XTYIGW5.mjs";import{a as $}from"./chunk-PQVNWTWJ.mjs";import{a as R}from"./chunk-5KCP7UJT.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as w}from"./chunk-MBNRIXNQ.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{z as x}from"./chunk-6MNQSWGO.mjs";import{a as O}from"./chunk-YJCTRUJT.mjs";import{a as F,c as A,f}from"./chunk-PJWJZHIS.mjs";import{a as C}from"./chunk-KD2IQ32V.mjs";import{c as G}from"./chunk-FTJF3Q3P.mjs";import{k as L}from"./chunk-LHEH7L4L.mjs";import{a as h}from"./chunk-7EWMP5BY.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:o,network:n,gasPriceData:T,price:S,address:m,username:q,shard:H,signedIndexes:e,parsedTransactionsByDataField:K}){let c=u[s],W=c?.transaction?.sender.toString(),p=c?.transaction,i=p?.toPlainObject(),D=null,y=null,t=await $({egldLabel:o,sender:W,apiAddress:n.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await w({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Y};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(n.decimals):X,digits:Number(n.digits),showLastNonZeroDecimal:!1,addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:Q),ut=M({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===L?o:a)??o,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:p,price:S}),nt=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:n.gasStationMetadata}),{gasPriceOption:N}=T,et=x().getType(),it=v(et),k=u.length,rt=e.length>0?e[e.length-1]+1:0,P=G(i?.data??""),b=V(t?.transactionTokenInfo),at=_({data:P,identifier:a,highlight:b}),st=U(),mt=O({to:`/${C}/${m}`,explorerAddress:st}),ct=k===1||t?.needsSigning&&!e.includes(s),pt=f({input:N.toString(),decimals:A,addCommas:!0,digits:F}),dt=new St(i.gasLimit).toFormat({decimalSeparator:".",groupSeparator:",",groupSize:3});return{commonData:{receiver:i.receiver.toString(),data:P,decodedData:at,gasPrice:pt,gasLimit:dt,explorerLink:mt,gasPriceOption:N,gasPriceOptions:nt,egldLabel:o,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:k,currentIndex:s,currentIndexToSign:rt,highlight:b,scCall:z(t?.transactionTokenInfo),needsSigning:ct,isEditable:t?.needsSigning,providerName:it,address:m,username:q,origin:h.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{qt as a};
2
- //# sourceMappingURL=chunk-YPV63DYG.mjs.map
1
+ import{a as U}from"./chunk-2RTOYKHB.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-RBZC4PEU.mjs";import{a as B}from"./chunk-3XTYIGW5.mjs";import{a as $}from"./chunk-OIRXFS5Q.mjs";import{a as _}from"./chunk-4SS6EY66.mjs";import{a as R}from"./chunk-6F4OKEUQ.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as w}from"./chunk-5KYXNO4J.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{z as x}from"./chunk-C72ZHRFA.mjs";import{a as O}from"./chunk-YJCTRUJT.mjs";import{a as C,c as F,f}from"./chunk-PJWJZHIS.mjs";import{a as L}from"./chunk-2JKCBTYK.mjs";import{c as G}from"./chunk-FTJF3Q3P.mjs";import{k as h}from"./chunk-LHEH7L4L.mjs";import{a as A}from"./chunk-URTM5OGN.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:o,network:n,gasPriceData:T,price:S,address:m,username:q,shard:H,signedIndexes:e,parsedTransactionsByDataField:K}){let c=u[s],W=c?.transaction?.sender.toString(),p=c?.transaction,i=p?.toPlainObject(),D=null,y=null,t=await $({egldLabel:o,sender:W,apiAddress:n.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await w({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Y};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(n.decimals):X,digits:Number(n.digits),showLastNonZeroDecimal:!1,addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:Q),ut=M({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===h?o:a)??o,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:p,price:S}),nt=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:n.gasStationMetadata}),{gasPriceOption:N}=T,et=x().getType(),it=v(et),k=u.length,rt=e.length>0?e[e.length-1]+1:0,P=G(i?.data??""),b=V(t?.transactionTokenInfo),at=_({data:P,identifier:a,highlight:b}),st=U(),mt=O({to:`/${L}/${m}`,explorerAddress:st}),ct=k===1||t?.needsSigning&&!e.includes(s),pt=f({input:N.toString(),decimals:F,addCommas:!0,digits:C}),dt=new St(i.gasLimit).toFormat({decimalSeparator:".",groupSeparator:",",groupSize:3});return{commonData:{receiver:i.receiver.toString(),data:P,decodedData:at,gasPrice:pt,gasLimit:dt,explorerLink:mt,gasPriceOption:N,gasPriceOptions:nt,egldLabel:o,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:k,currentIndex:s,currentIndexToSign:rt,highlight:b,scCall:z(t?.transactionTokenInfo),needsSigning:ct,isEditable:t?.needsSigning,providerName:it,address:m,username:q,origin:A.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{qt as a};
2
+ //# sourceMappingURL=chunk-5AGKFSA6.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.ts"],
4
+ "sourcesContent": ["import { BigNumber } from 'bignumber.js';\nimport { ACCOUNTS_ENDPOINT } from 'apiCalls/endpoints';\nimport { getPersistedTokenDetails } from 'apiCalls/tokens/getPersistedTokenDetails';\nimport { MULTI_TRANSFER_EGLD_TOKEN } from 'constants/mvx.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { DECIMALS, DIGITS, formatAmount } from 'lib/sdkDappUtils';\nimport {\n FungibleTransactionType,\n ISignTransactionsPanelCommonData\n} from 'managers/internal/SignTransactionsStateManager/types';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { NetworkType } from 'types/network.types';\nimport { NftEnumType } from 'types/tokens.types';\nimport {\n MultiSignTransactionType,\n TransactionDataTokenType\n} from 'types/transactions.types';\nimport { decodeBase64 } from 'utils/decoders/base64Utils';\nimport { capitalize } from 'utils/operations/capitalize';\nimport { getUsdValue } from 'utils/operations/getUsdValue';\nimport { getExplorerLink } from 'utils/transactions/getExplorerLink';\nimport { getFeeData } from '../getFeeData';\nimport { getAllDecodedFormats } from './helpers/decodeDataField';\nimport { getExtractTransactionsInfo } from './helpers/getExtractTransactionsInfo';\nimport { getGasPriceOptions } from './helpers/getGasPriceOptions';\nimport { getHighlight } from './helpers/getHighlight';\nimport { getScCall } from './helpers/getScCall';\nimport { getTokenType } from './helpers/getTokenType';\n\nexport type GetCommonDataPropsType = {\n allTransactions: MultiSignTransactionType[];\n currentScreenIndex: number;\n price?: number;\n network: NetworkType;\n signedIndexes: number[];\n egldLabel: string;\n address: string;\n shard?: number;\n username?: string;\n parsedTransactionsByDataField: Record<string, TransactionDataTokenType>;\n gasPriceData: {\n initialGasPrice: number;\n gasPriceOption: number;\n };\n};\n\nexport async function getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData,\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n}: GetCommonDataPropsType) {\n const currentTransaction = allTransactions[currentScreenIndex];\n const sender = currentTransaction?.transaction?.sender.toString();\n const transaction = currentTransaction?.transaction;\n const plainTransaction = transaction?.toPlainObject();\n\n let tokenTransaction: {\n identifier?: string;\n amount: string;\n usdValue: string;\n } | null = null;\n\n let fungibleTransaction:\n | (FungibleTransactionType & {\n type: NftEnumType.NonFungibleESDT | NftEnumType.SemiFungibleESDT;\n })\n | null = null;\n\n const extractTransactionsInfo = getExtractTransactionsInfo({\n egldLabel,\n sender,\n apiAddress: network.apiAddress,\n address,\n parsedTransactionsByDataField\n });\n\n const txInfo = await extractTransactionsInfo(currentTransaction);\n\n const isEgld = !txInfo?.transactionTokenInfo?.tokenId;\n const { tokenId, nonce, amount = '' } = txInfo?.transactionTokenInfo ?? {};\n\n const isNftOrSft = tokenId && nonce && nonce.length > 0;\n const tokenIdForTokenDetails = isNftOrSft ? `${tokenId}-${nonce}` : tokenId;\n\n const tokenDetails = await getPersistedTokenDetails({\n tokenId: tokenIdForTokenDetails\n });\n\n const { esdtPrice, tokenDecimals, type, identifier, tokenImageUrl } =\n tokenDetails;\n\n const isNft =\n type === NftEnumType.SemiFungibleESDT ||\n type === NftEnumType.NonFungibleESDT;\n\n if (isNft) {\n fungibleTransaction = {\n type,\n identifier,\n amount,\n imageURL: tokenImageUrl\n };\n } else {\n const getFormattedAmount = ({ addCommas }: { addCommas: boolean }) =>\n formatAmount({\n input: isEgld ? transaction.value.toString() : amount,\n decimals: isEgld ? Number(network.decimals) : tokenDecimals,\n digits: Number(network.digits),\n showLastNonZeroDecimal: false,\n addCommas\n });\n\n const formattedAmount = getFormattedAmount({ addCommas: true });\n const rawAmount = getFormattedAmount({ addCommas: false });\n const tokenPrice = Number(isEgld ? price : esdtPrice);\n const usdValue = getUsdValue({\n amount: rawAmount,\n usd: tokenPrice,\n addEqualSign: true\n });\n\n const esdtIdentifier =\n identifier === MULTI_TRANSFER_EGLD_TOKEN ? egldLabel : identifier;\n tokenTransaction = {\n identifier: esdtIdentifier ?? egldLabel,\n amount: formattedAmount,\n usdValue\n };\n }\n\n const { feeLimitFormatted, feeInFiatLimit } = getFeeData({\n transaction,\n price\n });\n\n const gasPriceOptions = getGasPriceOptions({\n shard,\n initialGasPrice: gasPriceData.initialGasPrice,\n transaction: plainTransaction,\n gasStationMetadata: network.gasStationMetadata\n });\n\n const { gasPriceOption } = gasPriceData;\n const provider = getAccountProvider();\n const providerType = provider.getType();\n const providerName = capitalize(providerType as string);\n const transactionsCount = allTransactions.length;\n\n const currentIndexToSign =\n signedIndexes.length > 0 ? signedIndexes[signedIndexes.length - 1] + 1 : 0;\n\n const data = decodeBase64(plainTransaction?.data ?? '');\n const highlight = getHighlight(txInfo?.transactionTokenInfo);\n const decodedData = getAllDecodedFormats({ data, identifier, highlight });\n const explorerAddress = getExplorerAddress();\n const explorerLink = getExplorerLink({\n to: `/${ACCOUNTS_ENDPOINT}/${address}`,\n explorerAddress\n });\n\n const needsSigning =\n transactionsCount === 1 ||\n (txInfo?.needsSigning && !signedIndexes.includes(currentScreenIndex));\n\n const formattedGasPrice = formatAmount({\n input: gasPriceOption.toString(),\n decimals: DECIMALS,\n addCommas: true,\n digits: DIGITS\n });\n\n const formattedGasLimit = new BigNumber(plainTransaction.gasLimit).toFormat({\n decimalSeparator: '.',\n groupSeparator: ',',\n groupSize: 3\n });\n\n const commonData: ISignTransactionsPanelCommonData = {\n receiver: plainTransaction.receiver.toString(),\n data,\n decodedData,\n gasPrice: formattedGasPrice,\n gasLimit: formattedGasLimit,\n explorerLink,\n gasPriceOption,\n gasPriceOptions,\n egldLabel,\n tokenType: getTokenType(type),\n feeLimit: feeLimitFormatted,\n feeInFiatLimit,\n transactionsCount,\n currentIndex: currentScreenIndex,\n currentIndexToSign,\n highlight,\n scCall: getScCall(txInfo?.transactionTokenInfo),\n needsSigning,\n isEditable: txInfo?.needsSigning,\n providerName,\n address,\n username,\n origin: safeWindow.location?.origin\n };\n\n return { commonData, tokenTransaction, fungibleTransaction };\n}\n"],
5
+ "mappings": "2uBAAA,OAAS,aAAAA,OAAiB,eA+C1B,eAAsBC,GAAc,CAClC,gBAAAC,EACA,mBAAAC,EACA,UAAAC,EACA,QAAAC,EACA,aAAAC,EACA,MAAAC,EACA,QAAAC,EACA,SAAAC,EACA,MAAAC,EACA,cAAAC,EACA,8BAAAC,CACF,EAA2B,CACzB,IAAMC,EAAqBX,EAAgBC,CAAkB,EACvDW,EAASD,GAAoB,aAAa,OAAO,SAAS,EAC1DE,EAAcF,GAAoB,YAClCG,EAAmBD,GAAa,cAAc,EAEhDE,EAIO,KAEPC,EAIO,KAULC,EAAS,MARiBC,EAA2B,CACzD,UAAAhB,EACA,OAAAU,EACA,WAAYT,EAAQ,WACpB,QAAAG,EACA,8BAAAI,CACF,CAAC,EAE4CC,CAAkB,EAEzDQ,EAAS,CAACF,GAAQ,sBAAsB,QACxC,CAAE,QAAAG,EAAS,MAAAC,EAAO,OAAAC,EAAS,EAAG,EAAIL,GAAQ,sBAAwB,CAAC,EAGnEM,EADaH,GAAWC,GAASA,EAAM,OAAS,EACV,GAAGD,CAAO,IAAIC,CAAK,GAAKD,EAE9DI,EAAe,MAAMC,EAAyB,CAClD,QAASF,CACX,CAAC,EAEK,CAAE,UAAAG,EAAW,cAAAC,EAAe,KAAAC,EAAM,WAAAC,EAAY,cAAAC,CAAc,EAChEN,EAMF,GAHEI,wBACAA,sBAGAZ,EAAsB,CACpB,KAAAY,EACA,WAAAC,EACA,OAAAP,EACA,SAAUQ,CACZ,MACK,CACL,IAAMC,EAAqB,CAAC,CAAE,UAAAC,EAAU,IACtCC,EAAa,CACX,MAAOd,EAASN,EAAY,MAAM,SAAS,EAAIS,EAC/C,SAAUH,EAAS,OAAOhB,EAAQ,QAAQ,EAAIwB,EAC9C,OAAQ,OAAOxB,EAAQ,MAAM,EAC7B,uBAAwB,GACxB,UAAA6B,EACF,CAAC,EAEGE,GAAkBH,EAAmB,CAAE,UAAW,EAAK,CAAC,EACxDI,GAAYJ,EAAmB,CAAE,UAAW,EAAM,CAAC,EACnDK,GAAa,OAAOjB,EAASd,EAAQqB,CAAS,EAC9CW,GAAWC,EAAY,CAC3B,OAAQH,GACR,IAAKC,GACL,aAAc,EAChB,CAAC,EAIDrB,EAAmB,CACjB,YAFAc,IAAeU,EAA4BrC,EAAY2B,IAEzB3B,EAC9B,OAAQgC,GACR,SAAAG,EACF,CACF,CAEA,GAAM,CAAE,kBAAAG,GAAmB,eAAAC,EAAe,EAAIC,EAAW,CACvD,YAAA7B,EACA,MAAAR,CACF,CAAC,EAEKsC,GAAkBC,EAAmB,CACzC,MAAApC,EACA,gBAAiBJ,EAAa,gBAC9B,YAAaU,EACb,mBAAoBX,EAAQ,kBAC9B,CAAC,EAEK,CAAE,eAAA0C,CAAe,EAAIzC,EAErB0C,GADWC,EAAmB,EACN,QAAQ,EAChCC,GAAeC,EAAWH,EAAsB,EAChDI,EAAoBlD,EAAgB,OAEpCmD,GACJ1C,EAAc,OAAS,EAAIA,EAAcA,EAAc,OAAS,CAAC,EAAI,EAAI,EAErE2C,EAAOC,EAAavC,GAAkB,MAAQ,EAAE,EAChDwC,EAAYC,EAAatC,GAAQ,oBAAoB,EACrDuC,GAAcC,EAAqB,CAAE,KAAAL,EAAM,WAAAvB,EAAY,UAAAyB,CAAU,CAAC,EAClEI,GAAkBC,EAAmB,EACrCC,GAAeC,EAAgB,CACnC,GAAI,IAAIC,CAAiB,IAAIxD,CAAO,GACpC,gBAAAoD,EACF,CAAC,EAEKK,GACJb,IAAsB,GACrBjC,GAAQ,cAAgB,CAACR,EAAc,SAASR,CAAkB,EAE/D+D,GAAoB/B,EAAa,CACrC,MAAOY,EAAe,SAAS,EAC/B,SAAUoB,EACV,UAAW,GACX,OAAQC,CACV,CAAC,EAEKC,GAAoB,IAAIC,GAAUtD,EAAiB,QAAQ,EAAE,SAAS,CAC1E,iBAAkB,IAClB,eAAgB,IAChB,UAAW,CACb,CAAC,EA4BD,MAAO,CAAE,WA1B4C,CACnD,SAAUA,EAAiB,SAAS,SAAS,EAC7C,KAAAsC,EACA,YAAAI,GACA,SAAUQ,GACV,SAAUG,GACV,aAAAP,GACA,eAAAf,EACA,gBAAAF,GACA,UAAAzC,EACA,UAAWmE,EAAazC,CAAI,EAC5B,SAAUY,GACV,eAAAC,GACA,kBAAAS,EACA,aAAcjD,EACd,mBAAAkD,GACA,UAAAG,EACA,OAAQgB,EAAUrD,GAAQ,oBAAoB,EAC9C,aAAA8C,GACA,WAAY9C,GAAQ,aACpB,aAAA+B,GACA,QAAA1C,EACA,SAAAC,EACA,OAAQgE,EAAW,UAAU,MAC/B,EAEqB,iBAAAxD,EAAkB,oBAAAC,CAAoB,CAC7D",
6
+ "names": ["BigNumber", "getCommonData", "allTransactions", "currentScreenIndex", "egldLabel", "network", "gasPriceData", "price", "address", "username", "shard", "signedIndexes", "parsedTransactionsByDataField", "currentTransaction", "sender", "transaction", "plainTransaction", "tokenTransaction", "fungibleTransaction", "txInfo", "getExtractTransactionsInfo", "isEgld", "tokenId", "nonce", "amount", "tokenIdForTokenDetails", "tokenDetails", "getPersistedTokenDetails", "esdtPrice", "tokenDecimals", "type", "identifier", "tokenImageUrl", "getFormattedAmount", "addCommas", "formatAmount", "formattedAmount", "rawAmount", "tokenPrice", "usdValue", "getUsdValue", "MULTI_TRANSFER_EGLD_TOKEN", "feeLimitFormatted", "feeInFiatLimit", "getFeeData", "gasPriceOptions", "getGasPriceOptions", "gasPriceOption", "providerType", "getAccountProvider", "providerName", "capitalize", "transactionsCount", "currentIndexToSign", "data", "decodeBase64", "highlight", "getHighlight", "decodedData", "getAllDecodedFormats", "explorerAddress", "getExplorerAddress", "explorerLink", "getExplorerLink", "ACCOUNTS_ENDPOINT", "needsSigning", "formattedGasPrice", "DECIMALS", "DIGITS", "formattedGasLimit", "BigNumber", "getTokenType", "getScCall", "safeWindow"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{HWProvider as d}from"@multiversx/sdk-hw-provider";async function s({provider:i,ledgerProvider:r,ledgerLogin:e,shouldInitProvider:t}){let n=e?.index!=null;if(i instanceof d&&i.isInitialized())return n&&await i.setAddressIndex(e.index),i;if(t&&!await r.init())throw new Error("Failed to initialize Ledger Provider");return n&&await r.setAddressIndex(e.index),r}export{s as a};
2
+ //# sourceMappingURL=chunk-5HEWN34K.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.ts"],
4
+ "sourcesContent": ["import { HWProvider } from '@multiversx/sdk-hw-provider';\nimport { DappProvider } from 'providers/DappProvider/DappProvider';\n\ntype InitHwProviderParams = {\n provider: DappProvider | HWProvider;\n ledgerProvider: HWProvider;\n ledgerLogin?: { index?: number | null } | null;\n shouldInitProvider: boolean;\n};\n\nexport async function initHwProvider({\n provider,\n ledgerProvider,\n ledgerLogin,\n shouldInitProvider\n}: InitHwProviderParams): Promise<HWProvider> {\n const hasAddressIndex = ledgerLogin?.index != null;\n\n if (provider instanceof HWProvider && provider.isInitialized()) {\n if (hasAddressIndex) {\n await provider.setAddressIndex(ledgerLogin!.index as number);\n }\n return provider;\n }\n\n if (shouldInitProvider) {\n const isInitialized = await ledgerProvider.init();\n if (!isInitialized) {\n throw new Error('Failed to initialize Ledger Provider');\n }\n }\n\n if (hasAddressIndex) {\n await ledgerProvider.setAddressIndex(ledgerLogin!.index as number);\n }\n\n return ledgerProvider;\n}\n"],
5
+ "mappings": "AAAA,OAAS,cAAAA,MAAkB,8BAU3B,eAAsBC,EAAe,CACnC,SAAAC,EACA,eAAAC,EACA,YAAAC,EACA,mBAAAC,CACF,EAA8C,CAC5C,IAAMC,EAAkBF,GAAa,OAAS,KAE9C,GAAIF,aAAoBF,GAAcE,EAAS,cAAc,EAC3D,OAAII,GACF,MAAMJ,EAAS,gBAAgBE,EAAa,KAAe,EAEtDF,EAGT,GAAIG,GAEE,CADkB,MAAMF,EAAe,KAAK,EAE9C,MAAM,IAAI,MAAM,sCAAsC,EAI1D,OAAIG,GACF,MAAMH,EAAe,gBAAgBC,EAAa,KAAe,EAG5DD,CACT",
6
+ "names": ["HWProvider", "initHwProvider", "provider", "ledgerProvider", "ledgerLogin", "shouldInitProvider", "hasAddressIndex"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-WG5ONYK4.mjs";import{s as m}from"./chunk-EGO5R7IZ.mjs";import{b as a}from"./chunk-7VHTZYM2.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-MBNRIXNQ.mjs.map
1
+ import{a as g}from"./chunk-XLLBREX7.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";import{s as m}from"./chunk-XNSSZDSU.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{o as s,u as o}from"./chunk-2JKCBTYK.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-5KYXNO4J.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-PMATTOPD.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-MH3RDOC5.mjs.map
1
+ import{a as d}from"./chunk-KDTDQL52.mjs";import{b as s}from"./chunk-BCSNXRMR.mjs";import{a as i}from"./chunk-PMATTOPD.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-5W7PFHTT.mjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.ts"],
3
+ "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getAuthTokenText.ts"],
4
4
  "sourcesContent": ["import { decodeLoginToken } from 'services/nativeAuth/helpers/decodeLoginToken';\nimport getLedgerVersionOptions from './getLedgerVersionOptions';\nimport { secondsToTimeString } from './secondsToTimeString';\n\nexport const getAuthTokenText = ({\n loginToken,\n version\n}: {\n loginToken?: string;\n version?: string;\n}) => {\n if (!loginToken || !version) {\n return null;\n }\n\n const { ledgerWithUsernames } = getLedgerVersionOptions(version);\n const nativeAuthInfo = decodeLoginToken(loginToken);\n if (nativeAuthInfo == null) {\n return null;\n }\n\n const confirmAddressText = 'Confirm Ledger Address';\n const authText = 'Authorise Authentication Token';\n\n if (ledgerWithUsernames) {\n const time = secondsToTimeString(nativeAuthInfo.ttl);\n\n return {\n data: `${nativeAuthInfo.origin} for ${time}.`,\n confirmAddressText,\n authText\n };\n }\n\n return {\n data: loginToken,\n confirmAddressText,\n authText\n };\n};\n"],
5
5
  "mappings": "2HAIO,IAAMA,EAAmB,CAAC,CAC/B,WAAAC,EACA,QAAAC,CACF,IAGM,CACJ,GAAI,CAACD,GAAc,CAACC,EAClB,OAAO,KAGT,GAAM,CAAE,oBAAAC,CAAoB,EAAIC,EAAwBF,CAAO,EACzDG,EAAiBC,EAAiBL,CAAU,EAClD,GAAII,GAAkB,KACpB,OAAO,KAGT,IAAME,EAAqB,yBACrBC,EAAW,iCAEjB,GAAIL,EAAqB,CACvB,IAAMM,EAAOC,EAAoBL,EAAe,GAAG,EAEnD,MAAO,CACL,KAAM,GAAGA,EAAe,MAAM,QAAQI,CAAI,IAC1C,mBAAAF,EACA,SAAAC,CACF,CACF,CAEA,MAAO,CACL,KAAMP,EACN,mBAAAM,EACA,SAAAC,CACF,CACF",
6
6
  "names": ["getAuthTokenText", "loginToken", "version", "ledgerWithUsernames", "getLedgerVersionOptions_default", "nativeAuthInfo", "decodeLoginToken", "confirmAddressText", "authText", "time", "secondsToTimeString"]
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{a as e}from"./chunk-55U3WK3C.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-O65OBG5D.mjs";import{s as n}from"./chunk-XNSSZDSU.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
2
+ //# sourceMappingURL=chunk-6BOC75BF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-MBNRIXNQ.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{l as a};
2
- //# sourceMappingURL=chunk-AQNUGUG3.mjs.map
1
+ import{a as u}from"./chunk-5KYXNO4J.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{l as a};
2
+ //# sourceMappingURL=chunk-6CLCXSHA.mjs.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-6CQMLD25.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-G5MRPRWI.mjs";import{a as o}from"./chunk-PMATTOPD.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
- //# sourceMappingURL=chunk-OEXP5D2Q.mjs.map
1
+ import{a as r}from"./chunk-DW6RO5LJ.mjs";import{a as o}from"./chunk-PMATTOPD.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
2
+ //# sourceMappingURL=chunk-6EKK7AJE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-MODSKR2X.mjs";import{a as m}from"./chunk-K4ITACAF.mjs";import{f as r}from"./chunk-PJWJZHIS.mjs";import{a as o,b as a}from"./chunk-LHEH7L4L.mjs";var d=({transaction:e,price:i})=>{let t=n({from:e.sender.toBech32(),to:e.receiver.toBech32(),gasPerDataByte:String(1500),gasPriceModifier:String(.01),gasLimit:e.gasLimit.valueOf().toString(),gasPrice:e.gasPrice.valueOf().toString(),data:e.data.toString(),chainId:e.chainID.valueOf().toString()}),c=r({input:t,showLastNonZeroDecimal:!0}),g=i?m({feeLimit:t,egldPriceInUsd:i,hideEqualSign:!0}):null;return{feeLimitFormatted:c,feeInFiatLimit:g,feeLimit:t}};export{d as a};
2
- //# sourceMappingURL=chunk-5KCP7UJT.mjs.map
1
+ import{a as n}from"./chunk-BUJNOQZJ.mjs";import{a as m}from"./chunk-K4ITACAF.mjs";import{f as r}from"./chunk-PJWJZHIS.mjs";import{a as o,b as a}from"./chunk-LHEH7L4L.mjs";var d=({transaction:e,price:i})=>{let t=n({from:e.sender.toBech32(),to:e.receiver.toBech32(),gasPerDataByte:String(1500),gasPriceModifier:String(.01),gasLimit:e.gasLimit.valueOf().toString(),gasPrice:e.gasPrice.valueOf().toString(),data:e.data.toString(),chainId:e.chainID.valueOf().toString()}),c=r({input:t,showLastNonZeroDecimal:!0}),g=i?m({feeLimit:t,egldPriceInUsd:i,hideEqualSign:!0}):null;return{feeLimitFormatted:c,feeInFiatLimit:g,feeLimit:t}};export{d as a};
2
+ //# sourceMappingURL=chunk-6F4OKEUQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-JMC7CMTU.mjs";var s=({account:e})=>e,c=({account:e})=>e.address&&e.address in e.accounts?e.accounts[e.address]:n,S=e=>{let{accounts:o,...t}=s(e),r=c(e);return{...t,address:r.address,account:r}},p=({account:{address:e}})=>e,a=({account:{websocketEvent:e}})=>e,u=e=>c(e)?.nonce||0,l=e=>{let o=p(e),t=c(e);return!!(o&&t?.address===o)},y=({account:{ledgerAccount:e}})=>e;export{c as a,S as b,p as c,a as d,u as e,l as f,y as g};
2
- //# sourceMappingURL=chunk-UERJ6AKK.mjs.map
1
+ import{a as n}from"./chunk-TVXZBSUY.mjs";var s=({account:e})=>e,c=({account:e})=>e.address&&e.address in e.accounts?e.accounts[e.address]:n,S=e=>{let{accounts:o,...t}=s(e),r=c(e);return{...t,address:r.address,account:r}},p=({account:{address:e}})=>e,a=({account:{websocketEvent:e}})=>e,u=e=>c(e)?.nonce||0,l=e=>{let o=p(e),t=c(e);return!!(o&&t?.address===o)},y=({account:{ledgerAccount:e}})=>e;export{c as a,S as b,p as c,a as d,u as e,l as f,y as g};
2
+ //# sourceMappingURL=chunk-7MBSWJUD.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-5HEWN34K.mjs";import{a as l}from"./chunk-YYH2GKPL.mjs";import{z as c}from"./chunk-C72ZHRFA.mjs";import{a as g}from"./chunk-AFLCI6IF.mjs";import{s as e}from"./chunk-XNSSZDSU.mjs";import{g as n}from"./chunk-7MBSWJUD.mjs";import{e as d}from"./chunk-VNLGNNIL.mjs";import{HWProvider as P}from"@multiversx/sdk-hw-provider";async function S(s){let m=g(),t=s?.shouldInitProvider||!m,f=d(e()),o=n(e()),p=c(),i=new P;try{if(!t&&o){let u={version:o.version,dataEnabled:o.hasContractDataEnabled};return{ledgerProvider:i,ledgerConfig:u}}let r=await a({provider:p,ledgerProvider:i,ledgerLogin:f,shouldInitProvider:t}),v=await l(r);return{ledgerProvider:r,ledgerConfig:v}}catch(r){throw console.error("Could not initialize ledger app",r),r}}export{S as a};
2
+ //# sourceMappingURL=chunk-7PE652LB.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.ts"],
4
+ "sourcesContent": ["import { HWProvider } from '@multiversx/sdk-hw-provider';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { ledgerAccountSelector } from 'store/selectors/accountSelectors';\nimport { ledgerLoginSelector } from 'store/selectors/loginInfoSelectors';\nimport { getState } from 'store/store';\nimport { getLedgerConfiguration } from './helpers/getLedgerConfiguration';\nimport { initHwProvider } from './helpers/initHwProvider';\nimport { LedgerConfigType } from '../../types/ledgerProvider.types';\n\nexport async function getLedgerProvider(props?: {\n shouldInitProvider?: boolean; // provider will be initialized if not logged in\n}) {\n const isLoggedIn = getIsLoggedIn();\n const shouldInitProvider = props?.shouldInitProvider || !isLoggedIn;\n const ledgerLogin = ledgerLoginSelector(getState());\n const ledgerAccount = ledgerAccountSelector(getState());\n const provider = getAccountProvider();\n\n const ledgerProvider = new HWProvider();\n\n try {\n if (!shouldInitProvider && ledgerAccount) {\n const ledgerConfig: LedgerConfigType = {\n version: ledgerAccount.version,\n dataEnabled: ledgerAccount.hasContractDataEnabled\n };\n return {\n ledgerProvider,\n ledgerConfig\n };\n }\n\n const initializedLedgerProvider = await initHwProvider({\n provider,\n ledgerProvider,\n ledgerLogin,\n shouldInitProvider\n });\n\n const ledgerConfig = await getLedgerConfiguration(\n initializedLedgerProvider\n );\n return { ledgerProvider: initializedLedgerProvider, ledgerConfig };\n } catch (err) {\n console.error('Could not initialize ledger app', err);\n\n throw err;\n }\n}\n"],
5
+ "mappings": "0RAAA,OAAS,cAAAA,MAAkB,8BAU3B,eAAsBC,EAAkBC,EAErC,CACD,IAAMC,EAAaC,EAAc,EAC3BC,EAAqBH,GAAO,oBAAsB,CAACC,EACnDG,EAAcC,EAAoBC,EAAS,CAAC,EAC5CC,EAAgBC,EAAsBF,EAAS,CAAC,EAChDG,EAAWC,EAAmB,EAE9BC,EAAiB,IAAIC,EAE3B,GAAI,CACF,GAAI,CAACT,GAAsBI,EAAe,CACxC,IAAMM,EAAiC,CACrC,QAASN,EAAc,QACvB,YAAaA,EAAc,sBAC7B,EACA,MAAO,CACL,eAAAI,EACA,aAAAE,CACF,CACF,CAEA,IAAMC,EAA4B,MAAMC,EAAe,CACrD,SAAAN,EACA,eAAAE,EACA,YAAAP,EACA,mBAAAD,CACF,CAAC,EAEKU,EAAe,MAAMG,EACzBF,CACF,EACA,MAAO,CAAE,eAAgBA,EAA2B,aAAAD,CAAa,CACnE,OAASI,EAAK,CACZ,cAAQ,MAAM,kCAAmCA,CAAG,EAE9CA,CACR,CACF",
6
+ "names": ["HWProvider", "getLedgerProvider", "props", "isLoggedIn", "getIsLoggedIn", "shouldInitProvider", "ledgerLogin", "ledgerLoginSelector", "getState", "ledgerAccount", "ledgerAccountSelector", "provider", "getAccountProvider", "ledgerProvider", "HWProvider", "ledgerConfig", "initializedLedgerProvider", "initHwProvider", "getLedgerConfiguration", "err"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-EG5H4QZV.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),this.resetData())}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},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-ZGMF4QYV.mjs.map
1
+ import{a as i}from"./chunk-UPABDY55.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),this.resetData())}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},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-7WJMUTGI.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-XNSSZDSU.mjs";import{f as t}from"./chunk-7MBSWJUD.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-AFLCI6IF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-URTM5OGN.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-AGJVEK6I.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-SKBL5PDX.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
- //# sourceMappingURL=chunk-QDX2JCQH.mjs.map
1
+ import{a as t}from"./chunk-N4KX33RW.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
+ //# sourceMappingURL=chunk-ATLICLWT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-4YLN3MHG.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-O5MS2L3D.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
- //# sourceMappingURL=chunk-WXC5EE2F.mjs.map
1
+ import{a}from"./chunk-YUFPUG5O.mjs";import{a as l}from"./chunk-7PE652LB.mjs";import{a as c}from"./chunk-AFLCI6IF.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
+ //# sourceMappingURL=chunk-AZA2GNTR.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.ts"],
4
+ "sourcesContent": ["import { LedgerConnectStateManager } from 'managers/internal/LedgerConnectStateManager/LedgerConnectStateManager';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { getLedgerErrorCodes } from './getLedgerErrorCodes';\nimport { getLedgerProvider } from './getLedgerProvider/getLedgerProvider';\n\ntype InitializeLedgerProviderType = {\n manager: LedgerConnectStateManager | null;\n resolve: (value: Awaited<ReturnType<typeof getLedgerProvider>>) => void;\n reject: (reason?: string) => void;\n shouldInitProvider?: boolean;\n};\n\nconst failInitializeErrorText = 'Check if the MultiversX App is open on Ledger';\n\nexport async function initializeLedgerProvider({\n manager,\n resolve,\n reject,\n shouldInitProvider\n}: InitializeLedgerProviderType) {\n const shouldInitiateLogin = !getIsLoggedIn();\n\n // Calls itself to handle retry logic if the user needs to reconnect to the Ledger provider.\n const handleRetry = () =>\n initializeLedgerProvider({ manager, resolve, reject, shouldInitProvider });\n\n const handleCancel = () => reject('Device unavailable');\n\n try {\n manager?.updateAccountScreen({\n isLoading: true\n });\n\n if (manager && shouldInitiateLogin) {\n manager.subscribeToProviderInit({ handleRetry, handleCancel });\n }\n\n const data = await getLedgerProvider({ shouldInitProvider });\n\n if (manager && shouldInitiateLogin) {\n manager.unsubscribeFromProviderInit({ handleRetry, handleCancel });\n }\n\n resolve(data);\n } catch (err) {\n if (!shouldInitiateLogin) {\n throw err;\n }\n\n const { errorMessage, defaultErrorMessage } = getLedgerErrorCodes(err);\n manager?.updateConnectScreen({\n error: errorMessage ?? defaultErrorMessage ?? failInitializeErrorText\n });\n\n if (manager) {\n manager.subscribeToProviderInit({ handleRetry, handleCancel });\n }\n }\n}\n"],
5
+ "mappings": "sHAYA,IAAMA,EAA0B,gDAEhC,eAAsBC,EAAyB,CAC7C,QAAAC,EACA,QAAAC,EACA,OAAAC,EACA,mBAAAC,CACF,EAAiC,CAC/B,IAAMC,EAAsB,CAACC,EAAc,EAGrCC,EAAc,IAClBP,EAAyB,CAAE,QAAAC,EAAS,QAAAC,EAAS,OAAAC,EAAQ,mBAAAC,CAAmB,CAAC,EAErEI,EAAe,IAAML,EAAO,oBAAoB,EAEtD,GAAI,CACFF,GAAS,oBAAoB,CAC3B,UAAW,EACb,CAAC,EAEGA,GAAWI,GACbJ,EAAQ,wBAAwB,CAAE,YAAAM,EAAa,aAAAC,CAAa,CAAC,EAG/D,IAAMC,EAAO,MAAMC,EAAkB,CAAE,mBAAAN,CAAmB,CAAC,EAEvDH,GAAWI,GACbJ,EAAQ,4BAA4B,CAAE,YAAAM,EAAa,aAAAC,CAAa,CAAC,EAGnEN,EAAQO,CAAI,CACd,OAASE,EAAK,CACZ,GAAI,CAACN,EACH,MAAMM,EAGR,GAAM,CAAE,aAAAC,EAAc,oBAAAC,CAAoB,EAAIC,EAAoBH,CAAG,EACrEV,GAAS,oBAAoB,CAC3B,MAAOW,GAAgBC,GAAuBd,CAChD,CAAC,EAEGE,GACFA,EAAQ,wBAAwB,CAAE,YAAAM,EAAa,aAAAC,CAAa,CAAC,CAEjE,CACF",
6
+ "names": ["failInitializeErrorText", "initializeLedgerProvider", "manager", "resolve", "reject", "shouldInitProvider", "shouldInitiateLogin", "getIsLoggedIn", "handleRetry", "handleCancel", "data", "getLedgerProvider", "err", "errorMessage", "defaultErrorMessage", "getLedgerErrorCodes"]
7
+ }
@@ -1,2 +1,2 @@
1
1
  import{a as _,b as E,c as O,d as M,e as f,f as g}from"./chunk-FI444OX3.mjs";function N(o,e){let n,i,I=/(\.0+)+$/,s=o.replace(I,"").split("."),r=e.replace(I,"").split("."),d=Math.min(s.length,r.length);for(n=0;n<d;n++)if(i=parseInt(s[n],10)-parseInt(r[n],10),i)return i;return s.length-r.length}function S(o){let e=[_,E,O,M,f,g,o].sort((c,l)=>N(c,l)),n=e.indexOf(_),i=e.indexOf(E),I=e.indexOf(O),s=e.indexOf(M),r=e.indexOf(f),d=e.indexOf(g),t=e.indexOf(o);return{ledgerWithMultiAccount:t>=n,ledgerWithHashSign:t>=i,ledgerWithSignAuthToken:t>=I,ledgerWithWhitelistedTokens:t>=s,ledgerWithGuardians:t>=r,ledgerWithUsernames:t>=d}}var x=S;export{S as a,x as b};
2
- //# sourceMappingURL=chunk-6UIF2KFV.mjs.map
2
+ //# sourceMappingURL=chunk-BCSNXRMR.mjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.ts"],
3
+ "sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getLedgerVersionOptions.ts"],
4
4
  "sourcesContent": ["import {\n LEDGER_HASH_SIGN_MINIMUM_VERSION,\n LEDGER_MULTI_ACCOUNT_MINIMUM_VERSION,\n LEDGER_SIGN_AUTH_TOKEN_MINIMUM_VERSION,\n LEDGER_WITH_WHITELISTED_TOKENS_MINIMUM_VERSION,\n LEDGER_WITH_GUARDIANS_MINIMUM_VERSION,\n LEDGER_WITH_USERNAMES_MINIMUM_VERSION\n} from 'constants/index';\n\nfunction compareVersions(a: string, b: string) {\n let i, diff;\n const regExStrip0 = /(\\.0+)+$/;\n const segmentsA = a.replace(regExStrip0, '').split('.');\n const segmentsB = b.replace(regExStrip0, '').split('.');\n const l = Math.min(segmentsA.length, segmentsB.length);\n\n for (i = 0; i < l; i++) {\n diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10);\n if (diff) {\n return diff;\n }\n }\n return segmentsA.length - segmentsB.length;\n}\n\nexport function getLedgerVersionOptions(version: string) {\n const sortedVersions = [\n LEDGER_MULTI_ACCOUNT_MINIMUM_VERSION,\n LEDGER_HASH_SIGN_MINIMUM_VERSION,\n LEDGER_SIGN_AUTH_TOKEN_MINIMUM_VERSION,\n LEDGER_WITH_WHITELISTED_TOKENS_MINIMUM_VERSION,\n LEDGER_WITH_GUARDIANS_MINIMUM_VERSION,\n LEDGER_WITH_USERNAMES_MINIMUM_VERSION,\n version\n ].sort((a, b) => compareVersions(a, b));\n\n const indexOfMultiAccount = sortedVersions.indexOf(\n LEDGER_MULTI_ACCOUNT_MINIMUM_VERSION\n );\n const indexOfHashSign = sortedVersions.indexOf(\n LEDGER_HASH_SIGN_MINIMUM_VERSION\n );\n const indexOfSignAuthToken = sortedVersions.indexOf(\n LEDGER_SIGN_AUTH_TOKEN_MINIMUM_VERSION\n );\n const indexOfWhitelistedTokens = sortedVersions.indexOf(\n LEDGER_WITH_WHITELISTED_TOKENS_MINIMUM_VERSION\n );\n const indexOfGuardians = sortedVersions.indexOf(\n LEDGER_WITH_GUARDIANS_MINIMUM_VERSION\n );\n const indexOfUsernames = sortedVersions.indexOf(\n LEDGER_WITH_USERNAMES_MINIMUM_VERSION\n );\n const indexOfVersion = sortedVersions.indexOf(version);\n\n return {\n ledgerWithMultiAccount: indexOfVersion >= indexOfMultiAccount,\n ledgerWithHashSign: indexOfVersion >= indexOfHashSign,\n ledgerWithSignAuthToken: indexOfVersion >= indexOfSignAuthToken,\n ledgerWithWhitelistedTokens: indexOfVersion >= indexOfWhitelistedTokens,\n ledgerWithGuardians: indexOfVersion >= indexOfGuardians,\n ledgerWithUsernames: indexOfVersion >= indexOfUsernames\n };\n}\n\nexport default getLedgerVersionOptions;\n"],
5
5
  "mappings": "4EASA,SAASA,EAAgBC,EAAWC,EAAW,CAC7C,IAAIC,EAAGC,EACDC,EAAc,WACdC,EAAYL,EAAE,QAAQI,EAAa,EAAE,EAAE,MAAM,GAAG,EAChDE,EAAYL,EAAE,QAAQG,EAAa,EAAE,EAAE,MAAM,GAAG,EAChDG,EAAI,KAAK,IAAIF,EAAU,OAAQC,EAAU,MAAM,EAErD,IAAKJ,EAAI,EAAGA,EAAIK,EAAGL,IAEjB,GADAC,EAAO,SAASE,EAAUH,CAAC,EAAG,EAAE,EAAI,SAASI,EAAUJ,CAAC,EAAG,EAAE,EACzDC,EACF,OAAOA,EAGX,OAAOE,EAAU,OAASC,EAAU,MACtC,CAEO,SAASE,EAAwBC,EAAiB,CACvD,IAAMC,EAAiB,CACrBC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAP,CACF,EAAE,KAAK,CAACT,EAAGC,IAAMF,EAAgBC,EAAGC,CAAC,CAAC,EAEhCgB,EAAsBP,EAAe,QACzCC,CACF,EACMO,EAAkBR,EAAe,QACrCE,CACF,EACMO,EAAuBT,EAAe,QAC1CG,CACF,EACMO,EAA2BV,EAAe,QAC9CI,CACF,EACMO,EAAmBX,EAAe,QACtCK,CACF,EACMO,EAAmBZ,EAAe,QACtCM,CACF,EACMO,EAAiBb,EAAe,QAAQD,CAAO,EAErD,MAAO,CACL,uBAAwBc,GAAkBN,EAC1C,mBAAoBM,GAAkBL,EACtC,wBAAyBK,GAAkBJ,EAC3C,4BAA6BI,GAAkBH,EAC/C,oBAAqBG,GAAkBF,EACvC,oBAAqBE,GAAkBD,CACzC,CACF,CAEA,IAAOE,EAAQhB",
6
6
  "names": ["compareVersions", "a", "b", "i", "diff", "regExStrip0", "segmentsA", "segmentsB", "l", "getLedgerVersionOptions", "version", "sortedVersions", "LEDGER_MULTI_ACCOUNT_MINIMUM_VERSION", "LEDGER_HASH_SIGN_MINIMUM_VERSION", "LEDGER_SIGN_AUTH_TOKEN_MINIMUM_VERSION", "LEDGER_WITH_WHITELISTED_TOKENS_MINIMUM_VERSION", "LEDGER_WITH_GUARDIANS_MINIMUM_VERSION", "LEDGER_WITH_USERNAMES_MINIMUM_VERSION", "indexOfMultiAccount", "indexOfHashSign", "indexOfSignAuthToken", "indexOfWhitelistedTokens", "indexOfGuardians", "indexOfUsernames", "indexOfVersion", "getLedgerVersionOptions_default"]
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-NI7XCWV5.mjs";import{b as o,d as c,e as g}from"./chunk-PJWJZHIS.mjs";import{a as m,c as t,e as u}from"./chunk-NTEMINYA.mjs";import{c as f,d as I,e as p}from"./chunk-LHEH7L4L.mjs";import _ from"bignumber.js";function M({from:l,to:G,minGasLimit:r=String(5e4),gasLimit:i,gasPrice:e,data:B,gasPerDataByte:L,gasPriceModifier:T,defaultGasPrice:P=String(1e9),chainId:n}){let a=B||"",A=c(i)?i:r,C=d({data:a})?5e4:0,D=new _(A).plus(C).toNumber(),F=g(e)?e:P,S=new m({nonce:BigInt(0),value:BigInt(0),receiver:new t(G),sender:new t(l),gasPrice:BigInt(F),gasLimit:BigInt(D),data:Buffer.from(a.trim()),chainID:n,version:1});try{return new u().computeTransactionFee(S,{gasPerDataByte:BigInt(L),minGasLimit:BigInt(r),gasPriceModifier:parseFloat(T),chainID:n}).toString(10)}catch(s){return console.error(s),o}}export{M as a};
2
- //# sourceMappingURL=chunk-MODSKR2X.mjs.map
1
+ import{a as d}from"./chunk-NI7XCWV5.mjs";import{b as o,d as c,e as g}from"./chunk-PJWJZHIS.mjs";import{a as I,c as t,e as p}from"./chunk-NTEMINYA.mjs";import{c as m,d as u,e as f}from"./chunk-LHEH7L4L.mjs";import _ from"bignumber.js";function M({from:l,to:G,minGasLimit:r=String(5e4),gasLimit:i,gasPrice:e,data:B,gasPerDataByte:L,gasPriceModifier:T,defaultGasPrice:P=String(1e9),chainId:n}){let a=B||"",A=c(i)?i:r,C=d({data:a})?5e4:0,D=new _(A).plus(C).toNumber(),F=g(e)?e:P,S=new I({nonce:BigInt(0),value:BigInt(0),receiver:new t(G),sender:new t(l),gasPrice:BigInt(F),gasLimit:BigInt(D),data:Buffer.from(a.trim()),chainID:n,version:1});try{return new p().computeTransactionFee(S,{gasPerDataByte:BigInt(L),minGasLimit:BigInt(r),gasPriceModifier:parseFloat(T),chainID:n}).toString(10)}catch(s){return console.error(s),o}}export{M as a};
2
+ //# sourceMappingURL=chunk-BUJNOQZJ.mjs.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-C4SERLP4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as St}from"./chunk-PBXNAY2B.mjs";import{a as dt}from"./chunk-CJTGYQ5L.mjs";import{a as vt}from"./chunk-6UZHM5LW.mjs";import{a as w}from"./chunk-WWYX7L4I.mjs";import{a as bt}from"./chunk-O5MS2L3D.mjs";import{a as wt}from"./chunk-PGAJUAPG.mjs";import{a as Ct}from"./chunk-ABBDCZHP.mjs";import{a as It}from"./chunk-OILJUNFX.mjs";import{a as Et}from"./chunk-SHNAULDW.mjs";import{a as At}from"./chunk-ZZ6Z3QEX.mjs";import{a as Mt}from"./chunk-4ODPAHHA.mjs";import{a as xt}from"./chunk-BENZKRAG.mjs";import{b as N}from"./chunk-SR7TVATV.mjs";import{a as Nt}from"./chunk-VGO3VD5N.mjs";import{a as Ot}from"./chunk-MDVI45IV.mjs";import{a as Pt}from"./chunk-AWQZ56BT.mjs";import{a as f}from"./chunk-PDMEOQYV.mjs";import{a as nt}from"./chunk-RSAYFMIM.mjs";import{a as ht}from"./chunk-SKBL5PDX.mjs";import{a as E}from"./chunk-MQJQMAW3.mjs";import{a as A,f as yt}from"./chunk-YLD26I5H.mjs";import{b as L,d as gt}from"./chunk-JBZR35CW.mjs";import{k as pt,l as lt,n as Tt}from"./chunk-E2GGD7D4.mjs";import{b as Lt}from"./chunk-ONSO75O2.mjs";import{a as x}from"./chunk-HORSXVIV.mjs";import{a as Ft}from"./chunk-6SC2DWV6.mjs";import{a as it}from"./chunk-G5MRPRWI.mjs";import{a as C}from"./chunk-XDBKPKTG.mjs";import{a as et}from"./chunk-H5NVCCUR.mjs";import{a as I}from"./chunk-ZNYD34VT.mjs";import{a as st}from"./chunk-YSCND2MX.mjs";import{a as Rt}from"./chunk-NJN53MJV.mjs";import{a as at,b as ct,g as ut,l as mt}from"./chunk-M6MN4RXG.mjs";import{b as rt}from"./chunk-NGM3AVCY.mjs";import{a as tt,b as ot,q as u,s as g}from"./chunk-EGO5R7IZ.mjs";import{c as V,d as Y,f as J}from"./chunk-UERJ6AKK.mjs";import{b as v}from"./chunk-VNLGNNIL.mjs";import{b as S}from"./chunk-6JM4DPOH.mjs";import{b as Q,c as X,f as Z}from"./chunk-NTEMINYA.mjs";import{b as kt}from"./chunk-UCRVRBTA.mjs";import{a as ft}from"./chunk-BJOEWWLZ.mjs";import{c as G}from"./chunk-H24QGHAH.mjs";import{a as b}from"./chunk-LJX4MW7B.mjs";import j from"bignumber.js";import K from"lodash.isequal";var Bt=1e4,P=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Bt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let o=setTimeout(()=>{F(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,o)};this.startWithCustomDuration=(t,o)=>{if(this.stop(t),o<=0)return;let e=setTimeout(()=>{O(t);let i=h[t];i?.()},o);this.timeoutIntervals.set(t,e)};this.stop=t=>{let o=this.timeoutIntervals.get(t);o&&(clearTimeout(o),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??Bt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};import Dt from"lodash.isequal";var Qt="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",M=class s extends ht{constructor(o){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=o||u(),this.data={...this.initialData}}static getInstance(){return s.instance||(s.instance=new s),s.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!Dt(a.transactionToasts,i.transactionToasts)||!Dt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Qt,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let o=d.getInstance();this.closeUI(),await o.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:o}=this.store.getState(),{pendingTransactionToasts:e}=await w();this.data.pendingTransactions=e;let i=Object.keys(o).reduce((n,a)=>(["sent","pending"].includes(String(o[a].status))||(n[a]=o[a]),n),{});this.data.historicTransactions=await dt.getTransactionsHistory({transactionsSessions:i}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){gt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};var k=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||u(),this.notificationsFeedManager=t.notificationsFeedManager||M.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let o=await this.createToastListElement();if(!o)return;this.eventBus=await o.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ft.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var d=class s{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||u(),this.lifetimeManager=t?.lifetimeManager??new P,this.uiCoordinator=t?.uiCoordinator??new k({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:o,transactions:e},{toasts:i,transactions:n})=>{let a=!K(i.transactionToasts,o.transactionToasts),c=!K(n,e);(a||c)&&await this.updateTransactionToastsList(),!K(i.customToasts,o.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return s.instance||(s.instance=new s),s.instance}handleCompletedTransaction(t){let{transactions:o}=this.store.getState(),e=o[t];if(!e)return!1;let{status:i}=e,n=Tt(i),a=lt(i),c=pt(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,o){let e=_t({toastId:t,totalDuration:o});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}async createCustomToast(t){let o=B(t);return await this.updateCustomToastList(),o}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:o}=t,{pendingTransactionToasts:e,completedTransactionToasts:i}=await w({store:t});this.transactionToasts=[...e,...i];for(let n of o.transactionToasts)this.handleCompletedTransaction(n.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let o of t.customToasts){let i="message"in o?{...o}:{...o,instantiateToastElement:R[o.toastId]};this.customToasts.push(i),o.duration&&this.lifetimeManager.startWithCustomDuration(o.toastId,o.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(F(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=h[t];return e?.(),O(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),Ut()}};var D=class s{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),o=v(t),{isExpired:e}=C(o?.nativeAuthToken);e?y().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),o=v(t),e=J(t);return!!(o?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=y(),o=V(this.store.getState()),e=t.getType()===b.webview;if(!o||e)return;this.addLogoutWarning();let i=v(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=C(i?.nativeAuthToken),c=new j(String(n)),r=`${o}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let l=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},l.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},l.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=S(this.store.getState()),o=v(this.store.getState()),{secondsUntilExpires:e}=C(o?.nativeAuthToken),i=new j(String(e)),n=i.times(1e3);if(!e||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new j(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=vt(n.toNumber()),p=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},p)}}static getInstance(){return s.instance||(s.instance=new s),s.instance}};async function Wt({sessionId:s,transactionBatch:t,isSequential:o}){try{if(t==null)return;let e=bt(),i=Ct(t),n=await St(i);for(let T of n)await It({serverTransaction:T,sessionId:s,isSequential:o});if(!n.every(T=>T.status!=="pending"))return;e&&await U();let{transactions:c}=g(),r=c?.[s];if(r.transactions.every(T=>T.status==="success"))return L({sessionId:s,status:"success"});if(r.transactions.some(T=>T.status==="fail"))return L({sessionId:s,status:"fail"});if(r.transactions.every(T=>T.status==="not executed"))return L({sessionId:s,status:"invalid"})}catch(e){console.error(e)}}async function Ht(){let s=rt(g()),t=Object.entries(s);t.length!==0&&await Promise.all(t.map(([o,{transactions:e}])=>Wt({sessionId:o,transactionBatch:e})))}async function _(){let s=u(),t=Et(),o=null,e=Y(s.getState())?.timestamp??null,i=async()=>{try{await Ht()}catch(p){console.error("[trackTransactions] Error checking transaction status:",p)}},n=()=>{o||(o=setInterval(i,t))},a=()=>{o&&(clearInterval(o),o=null)},c=()=>{a();let p=s.subscribe(({account:{websocketEvent:l}})=>{l?.message&&l.timestamp!=null&&e!==l.timestamp&&(e=l.timestamp,i())});G.set("websocketEventReceived",p)};i();let r=()=>{a()},m=s.subscribe(({account:{address:p},config:{websocketStatus:l}},T)=>{if(T.config.websocketStatus!==l)switch(l){case"completed":c();break;case"pending":n();break;default:p?n():r();break}});return G.set("websocketStatusChanged",m),{stopTransactionsTracking:r}}async function W({address:s,provider:t,apiAddress:o}){let e=await I({address:s,baseURL:o});if(!e)throw new Error("Account not found");Lt({address:s,providerType:t.getType()});let i={...e,username:x(e.username),nonce:E(e)};A(i),await N(s),_(),e.shard!=null&&await wt({shard:Number(e.shard),apiAddress:o})}async function $t({provider:s,nativeAuthConfig:t,token:o}){let{network:{apiAddress:e}}=f(),i=it(t),n=o;n||(n=await i.initialize({noCache:!0}));let a=await s.login({token:n}),{address:c,signature:r,...m}=a;if(!c)return console.warn("Login cancelled."),null;if(!r)return console.error("Failed to sign login token"),null;let p=et(m?.accessToken),l=await Nt({loginData:a,nativeAuthConfig:t,loginToken:n}),T=p?m.accessToken:i.getToken({address:c,token:l,signature:r});ot({loginToken:n,signature:r,nativeAuthToken:T});let $=await At({loginToken:n,extraInfoData:{multisig:m?.multisig,impersonate:m?.impersonate},address:c});return await W({address:$,provider:s,apiAddress:e}),{address:$,signature:r}}async function Gt(s){let{network:{apiAddress:t}}=f();await s.login();let o=await s.getAddress();if(!o)throw new Error("Address not found");return await W({address:o,provider:s,apiAddress:t}),{address:o}}async function Kt(s,t){let o=S(g());if(o)return await $t({provider:s,nativeAuthConfig:o,token:t?.token});let{address:e}=await Gt(s);return await N(e),_(),{address:e,signature:""}}var z={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${ct}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${at}-${Date.now()}`}},Zt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},to=s=>{for(let[t,o]of Object.entries(Zt))if(s.includes(t))return o;return"Error when signing"};function q(s,t="error"){let o=s?.message,e=to(o),n=e!=="Error when signing"?"warning":t,a=Object.keys(z).includes(n)?z[n]:z.error,{toastId:c,iconClassName:r,title:m}=a;return B({toastId:c,duration:1e4,icon:"close",iconClassName:r,message:e,title:m}),e}async function jt({provider:s,transactions:t,options:o={}}){await U();let{isGuarded:e,activeGuardianAddress:i,nonce:n}=Ft(),a=s.getType()===b.ledger,c=Mt({latestNonce:n,transactions:t}),r=i&&e&&!o.skipGuardian?c?.map(p=>(p.version=Q.withTxOptions().valueOf(),p.options=Z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),p.guardian=X.newFromBech32(i),p)):c,m=await s.signTransactions(r)??[];return yt(n+m.length),m}var H=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let o=await Kt(this.provider,t);return tt(this.provider.getType()),zt(this),D.getInstance().init(),o}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let o=await xt({provider:this.provider,options:t});return this._isLoggingOut=!1,o}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,o){try{return await jt({provider:this.provider,transactions:t,options:o})}catch(e){let i=q(e);throw new Error(i)}}async signMessage(t,o){try{return await Pt({provider:this.provider,message:t,options:o})}catch(e){let i=q(e,"warning");throw new Error(i)}}async verifyMessage(t){return await Ot(t)}cancelLogin(){this.provider.cancelLogin?.()}};var qt=null;function zt(s){qt=s}function y(){return qt||new H(kt)}var oo=async()=>{try{let s=nt(),{network:t}=f();try{let o=await I({address:s,baseURL:t.apiAddress});if(o!=null){let e={...o,username:x(o.username),nonce:E(o)};return A(e),e}}catch(o){console.error("Failed getting account ",o)}}catch(s){console.error("Failed getting address ",s)}return null};async function U(){let s=y();if(s==null)throw"Provider not initialized";try{if(!s.init)throw"Current provider does not have init() function";return await s.init()?await oo():void 0}catch(t){console.error("Failed initializing provider ",t)}}var R={},h={},so=(s,t)=>{u().setState(({toasts:o})=>{let e=o.customToasts.length>0?Math.max(...o.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${e+1}`,n=o.customToasts.findIndex(r=>r.toastId===i),a={...s,toastId:i};if(n!==-1){o.customToasts[n]=a;return}o.customToasts.push({...a,toastId:i})},!1,{type:"addCustomToast",payload:{value:{customToast:s,currentToastId:t}}})},O=s=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(o=>o.toastId!==s)},!1,{type:"removeCustomToast",payload:{value:s}})},Ut=()=>{u().setState(({toasts:s})=>{s.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},pi=()=>{u().setState(({toasts:s})=>{s.transactionToasts=[]})},_t=({toastId:s,totalDuration:t})=>{let o="";return u().setState(({toasts:e})=>{let i=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;o=s??`transaction-toast-${i+1}`,e.transactionToasts.push({startTime:st(),endTime:Rt(t),toastId:o})},!1,"addTransactionToast"),o},F=s=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(o=>o.toastId!==s)},!1,"removeTransactionToast"),delete h[s],delete R[s]},B=s=>{let{toasts:t}=u().getState(),o=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,e=s.toastId||`custom-toast-${o+1}`;return s.onClose&&(h[e]=s.onClose),s.instantiateToastElement?(R[e]=s.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===e),a={...s,instantiateToastElement:null,toastId:e};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),e):(so(s,e),e)};export{R as a,h as b,so as c,O as d,Ut as e,pi as f,_t as g,F as h,B as i,P as j,M as k,k as l,d as m,D as n,Wt as o,Ht as p,_ as q,W as r,$t as s,Gt as t,Kt as u,q as v,jt as w,H as x,zt as y,y as z,U as A};
2
- //# sourceMappingURL=chunk-6MNQSWGO.mjs.map
1
+ import{a as St}from"./chunk-NVBWPLR7.mjs";import{a as dt}from"./chunk-K5K2FVFB.mjs";import{a as vt}from"./chunk-6UZHM5LW.mjs";import{a as w}from"./chunk-FF45FPD3.mjs";import{a as wt}from"./chunk-KLI6N26E.mjs";import{a as bt}from"./chunk-AFLCI6IF.mjs";import{a as Et}from"./chunk-FRUJEORM.mjs";import{a as Ct}from"./chunk-ABBDCZHP.mjs";import{a as It}from"./chunk-LKOWOTL2.mjs";import{a as Nt}from"./chunk-XV3H7VOE.mjs";import{a as At}from"./chunk-P2MHA65O.mjs";import{a as Mt}from"./chunk-4ODPAHHA.mjs";import{a as Ot}from"./chunk-MDVI45IV.mjs";import{a as Pt}from"./chunk-K4JJZCL3.mjs";import{a as xt}from"./chunk-OSG4UY2Z.mjs";import{b as N}from"./chunk-O6ALDFLM.mjs";import{a as f}from"./chunk-XSUHHPZ2.mjs";import{a as nt}from"./chunk-H73D4VUZ.mjs";import{a as ht}from"./chunk-N4KX33RW.mjs";import{a as E}from"./chunk-J5TLE6SA.mjs";import{a as A,f as yt}from"./chunk-LYSI4URP.mjs";import{k as pt,l as lt,n as Tt}from"./chunk-E2GGD7D4.mjs";import{b as Lt}from"./chunk-CXAX5TAG.mjs";import{b as L,d as gt}from"./chunk-O65OBG5D.mjs";import{a as x}from"./chunk-HORSXVIV.mjs";import{a as Ft}from"./chunk-4GCIE2BM.mjs";import{a as it}from"./chunk-DW6RO5LJ.mjs";import{a as b}from"./chunk-XDBKPKTG.mjs";import{a as Y}from"./chunk-H5NVCCUR.mjs";import{a as I}from"./chunk-VTEOS2MM.mjs";import{a as Rt}from"./chunk-NJN53MJV.mjs";import{a as V}from"./chunk-YSCND2MX.mjs";import{b as rt}from"./chunk-NGM3AVCY.mjs";import{a as at,b as ct,g as ut,l as mt}from"./chunk-M6MN4RXG.mjs";import{a as st,b as et,q as u,s as g}from"./chunk-XNSSZDSU.mjs";import{c as J,d as Q,f as X}from"./chunk-7MBSWJUD.mjs";import{b as v}from"./chunk-VNLGNNIL.mjs";import{b as C}from"./chunk-6JM4DPOH.mjs";import{b as Z,c as tt,f as ot}from"./chunk-NTEMINYA.mjs";import{b as kt}from"./chunk-UCRVRBTA.mjs";import{a as ft}from"./chunk-TR2KNDCH.mjs";import{c as G}from"./chunk-NAYDJEWI.mjs";import{a as S}from"./chunk-LJX4MW7B.mjs";import j from"bignumber.js";import K from"lodash.isequal";var Bt=1e4,P=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Bt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let o=setTimeout(()=>{F(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,o)};this.startWithCustomDuration=(t,o)=>{if(this.stop(t),o<=0)return;let e=setTimeout(()=>{O(t);let i=h[t];i?.()},o);this.timeoutIntervals.set(t,e)};this.stop=t=>{let o=this.timeoutIntervals.get(t);o&&(clearTimeout(o),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??Bt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};import Dt from"lodash.isequal";var Qt="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",M=class s extends ht{constructor(o){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=o||u(),this.data={...this.initialData}}static getInstance(){return s.instance||(s.instance=new s),s.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!Dt(a.transactionToasts,i.transactionToasts)||!Dt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Qt,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let o=d.getInstance();this.closeUI(),await o.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:o}=this.store.getState(),{pendingTransactionToasts:e}=await w();this.data.pendingTransactions=e;let i=Object.keys(o).reduce((n,a)=>(["sent","pending"].includes(String(o[a].status))||(n[a]=o[a]),n),{});this.data.historicTransactions=await dt.getTransactionsHistory({transactionsSessions:i}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){gt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};var k=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||u(),this.notificationsFeedManager=t.notificationsFeedManager||M.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let o=await this.createToastListElement();if(!o)return;this.eventBus=await o.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ft.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var d=class s{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||u(),this.lifetimeManager=t?.lifetimeManager??new P,this.uiCoordinator=t?.uiCoordinator??new k({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:o,transactions:e},{toasts:i,transactions:n})=>{let a=!K(i.transactionToasts,o.transactionToasts),c=!K(n,e);(a||c)&&await this.updateTransactionToastsList(),!K(i.customToasts,o.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return s.instance||(s.instance=new s),s.instance}handleCompletedTransaction(t){let{transactions:o}=this.store.getState(),e=o[t];if(!e)return!1;let{status:i}=e,n=Tt(i),a=lt(i),c=pt(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,o){let e=_t({toastId:t,totalDuration:o});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}async createCustomToast(t){let o=B(t);return await this.updateCustomToastList(),o}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:o}=t,{pendingTransactionToasts:e,completedTransactionToasts:i}=await w({store:t});this.transactionToasts=[...e,...i];for(let n of o.transactionToasts)this.handleCompletedTransaction(n.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let o of t.customToasts){let i="message"in o?{...o}:{...o,instantiateToastElement:R[o.toastId]};this.customToasts.push(i),o.duration&&this.lifetimeManager.startWithCustomDuration(o.toastId,o.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(F(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=h[t];return e?.(),O(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),Ut()}};var D=class s{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),o=v(t),{isExpired:e}=b(o?.nativeAuthToken);e?y().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),o=v(t),e=X(t);return!!(o?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=y(),o=J(this.store.getState()),e=t.getType()===S.webview;if(!o||e)return;this.addLogoutWarning();let i=v(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=b(i?.nativeAuthToken),c=new j(String(n)),r=`${o}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let l=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},l.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},l.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=C(this.store.getState()),o=v(this.store.getState()),{secondsUntilExpires:e}=b(o?.nativeAuthToken),i=new j(String(e)),n=i.times(1e3);if(!e||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new j(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=vt(n.toNumber()),p=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},p)}}static getInstance(){return s.instance||(s.instance=new s),s.instance}};async function Wt({sessionId:s,transactionBatch:t,isSequential:o}){try{if(t==null)return;let e=bt(),i=Ct(t),n=await St(i);for(let T of n)await It({serverTransaction:T,sessionId:s,isSequential:o});if(!n.every(T=>T.status!=="pending"))return;e&&await U();let{transactions:c}=g(),r=c?.[s];if(r.transactions.every(T=>T.status==="success"))return L({sessionId:s,status:"success"});if(r.transactions.some(T=>T.status==="fail"))return L({sessionId:s,status:"fail"});if(r.transactions.every(T=>T.status==="not executed"))return L({sessionId:s,status:"invalid"})}catch(e){console.error(e)}}async function Ht(){let s=rt(g()),t=Object.entries(s);t.length!==0&&await Promise.all(t.map(([o,{transactions:e}])=>Wt({sessionId:o,transactionBatch:e})))}async function _(){let s=u(),t=Et(),o=null,e=Q(s.getState())?.timestamp??null,i=async()=>{try{await Ht()}catch(p){console.error("[trackTransactions] Error checking transaction status:",p)}},n=()=>{o||(o=setInterval(i,t))},a=()=>{o&&(clearInterval(o),o=null)},c=()=>{a();let p=s.subscribe(({account:{websocketEvent:l}})=>{l?.message&&l.timestamp!=null&&e!==l.timestamp&&(e=l.timestamp,i())});G.set("websocketEventReceived",p)};i();let r=()=>{a()},m=s.subscribe(({account:{address:p},config:{websocketStatus:l}},T)=>{if(T.config.websocketStatus!==l)switch(l){case"completed":c();break;case"pending":n();break;default:p?n():r();break}});return G.set("websocketStatusChanged",m),{stopTransactionsTracking:r}}async function W({address:s,provider:t,apiAddress:o}){let e=await I({address:s,baseURL:o});if(!e)throw new Error("Account not found");Lt({address:s,providerType:t.getType()});let i={...e,username:x(e.username),nonce:E(e)};A(i),await N(s),_(),e.shard!=null&&await wt({shard:Number(e.shard),apiAddress:o})}async function $t({provider:s,nativeAuthConfig:t,token:o}){let{network:{apiAddress:e}}=f(),i=it(t),n=o;n||(n=await i.initialize({noCache:!0}));let a=await s.login({token:n}),{address:c,signature:r,...m}=a;if(!c)return console.warn("Login cancelled."),null;if(!r)return console.error("Failed to sign login token"),null;let p=Y(m?.accessToken),l=await Nt({loginData:a,nativeAuthConfig:t,loginToken:n}),T=p?m.accessToken:i.getToken({address:c,token:l,signature:r});et({loginToken:n,signature:r,nativeAuthToken:T});let $=await At({loginToken:n,extraInfoData:{multisig:m?.multisig,impersonate:m?.impersonate},address:c});return await W({address:$,provider:s,apiAddress:e}),{address:$,signature:r}}async function Gt(s){let{network:{apiAddress:t}}=f();await s.login();let o=await s.getAddress();if(!o)throw new Error("Address not found");return await W({address:o,provider:s,apiAddress:t}),{address:o}}async function Kt(s,t){let o=C(g());if(o)return await $t({provider:s,nativeAuthConfig:o,token:t?.token});let{address:e}=await Gt(s);return await N(e),_(),{address:e,signature:""}}var z={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${ct}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${at}-${Date.now()}`}},Zt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},to=s=>{for(let[t,o]of Object.entries(Zt))if(s.includes(t))return o;return"Error when signing"};function q(s,t="error"){let o=s?.message,e=to(o),n=e!=="Error when signing"?"warning":t,a=Object.keys(z).includes(n)?z[n]:z.error,{toastId:c,iconClassName:r,title:m}=a;return B({toastId:c,duration:1e4,icon:"close",iconClassName:r,message:e,title:m}),e}async function jt({provider:s,transactions:t,options:o={}}){await U();let{isGuarded:e,activeGuardianAddress:i,nonce:n}=Ft(),a=s.getType()===S.ledger,c=Mt({latestNonce:n,transactions:t}),r=i&&e&&!o.skipGuardian?c?.map(p=>(p.version=Z.withTxOptions().valueOf(),p.options=ot.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),p.guardian=tt.newFromBech32(i),p)):c,m=await s.signTransactions(r)??[];return yt(n+m.length),m}var H=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let o=await Kt(this.provider,t);return st(this.provider.getType()),zt(this),D.getInstance().init(),o}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let o=await xt({provider:this.provider,options:t});return this._isLoggingOut=!1,o}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,o){try{return await jt({provider:this.provider,transactions:t,options:o})}catch(e){let i=q(e);throw new Error(i)}}async signMessage(t,o){try{return await Pt({provider:this.provider,message:t,options:o})}catch(e){let i=q(e,"warning");throw new Error(i)}}async verifyMessage(t){return await Ot(t)}cancelLogin(){this.provider.cancelLogin?.()}};var qt=null;function zt(s){qt=s}function y(){return qt||new H(kt)}var oo=async()=>{try{let s=nt(),{network:t}=f();try{let o=await I({address:s,baseURL:t.apiAddress});if(o!=null){let e={...o,username:x(o.username),nonce:E(o)};return A(e),e}}catch(o){console.error("Failed getting account ",o)}}catch(s){console.error("Failed getting address ",s)}return null};async function U(){let s=y();if(s==null)throw"Provider not initialized";try{if(!s.init)throw"Current provider does not have init() function";return await s.init()?await oo():void 0}catch(t){console.error("Failed initializing provider ",t)}}var R={},h={},so=(s,t)=>{u().setState(({toasts:o})=>{let e=o.customToasts.length>0?Math.max(...o.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${e+1}`,n=o.customToasts.findIndex(r=>r.toastId===i),a={...s,toastId:i};if(n!==-1){o.customToasts[n]=a;return}o.customToasts.push({...a,toastId:i})},!1,{type:"addCustomToast",payload:{value:{customToast:s,currentToastId:t}}})},O=s=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(o=>o.toastId!==s)},!1,{type:"removeCustomToast",payload:{value:s}})},Ut=()=>{u().setState(({toasts:s})=>{s.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},mi=()=>{u().setState(({toasts:s})=>{s.transactionToasts=[]})},_t=({toastId:s,totalDuration:t})=>{let o="";return u().setState(({toasts:e})=>{let i=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;o=s??`transaction-toast-${i+1}`,e.transactionToasts.push({startTime:V(),endTime:Rt(t),toastId:o})},!1,"addTransactionToast"),o},F=s=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(o=>o.toastId!==s)},!1,"removeTransactionToast"),delete h[s],delete R[s]},B=s=>{let{toasts:t}=u().getState(),o=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,e=s.toastId||`custom-toast-${o+1}`;return s.onClose&&(h[e]=s.onClose),s.instantiateToastElement?(R[e]=s.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===e),a={...s,instantiateToastElement:null,toastId:e};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),e):(so(s,e),e)};export{R as a,h as b,so as c,O as d,Ut as e,mi as f,_t as g,F as h,B as i,P as j,M as k,k as l,d as m,D as n,Wt as o,Ht as p,_ as q,W as r,$t as s,Gt as t,Kt as u,q as v,jt as w,H as x,zt as y,y as z,U as A};
2
+ //# sourceMappingURL=chunk-C72ZHRFA.mjs.map