@multiversx/sdk-dapp-liquidity 1.1.0-alpha.4 → 1.1.0-alpha.42

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 (492) hide show
  1. package/README.md +7 -3
  2. package/api/checkAccount.d.ts +9 -0
  3. package/api/checkAccount.js +22 -0
  4. package/api/checkAccount.mjs +21 -0
  5. package/api/getChains.d.ts +3 -1
  6. package/api/getChains.js +10 -4
  7. package/api/getChains.mjs +10 -4
  8. package/api/getTokens.d.ts +3 -1
  9. package/api/getTokens.js +13 -4
  10. package/api/getTokens.mjs +13 -4
  11. package/api/getTokensBalances.d.ts +2 -1
  12. package/api/getTokensBalances.js +9 -4
  13. package/api/getTokensBalances.mjs +9 -4
  14. package/api/getTransactions.d.ts +9 -2
  15. package/api/getTransactions.js +29 -4
  16. package/api/getTransactions.mjs +29 -4
  17. package/api/index.d.ts +2 -0
  18. package/api/index.js +4 -0
  19. package/api/index.mjs +4 -0
  20. package/api/linkAccount.d.ts +10 -0
  21. package/api/linkAccount.js +32 -0
  22. package/api/linkAccount.mjs +31 -0
  23. package/api/tests/getChains.spec.js +10 -3
  24. package/api/tests/getChains.spec.mjs +10 -3
  25. package/api/tests/getTokens.spec.js +16 -5
  26. package/api/tests/getTokens.spec.mjs +16 -5
  27. package/api/tests/getTransactions.spec.js +85 -69
  28. package/api/tests/getTransactions.spec.mjs +85 -69
  29. package/constants/index.d.ts +1 -1
  30. package/constants/index.js +1 -1
  31. package/constants/index.mjs +1 -1
  32. package/dto/Chain.dto.d.ts +4 -1
  33. package/dto/CheckAccount.dto.d.ts +4 -0
  34. package/dto/CheckAccount.dto.js +2 -0
  35. package/dto/CheckAccount.dto.mjs +1 -0
  36. package/dto/Token.dto.d.ts +6 -2
  37. package/dto/Transaction.dto.d.ts +1 -0
  38. package/index.js +46 -16
  39. package/index.mjs +16 -16
  40. package/package.json +10 -6
  41. package/reactjs/components/BridgeForm/BridgeForm.d.ts +6 -2
  42. package/reactjs/components/BridgeForm/BridgeForm.js +236 -99
  43. package/reactjs/components/BridgeForm/BridgeForm.mjs +209 -72
  44. package/reactjs/components/BridgeHistory/BridgeHistory.js +79 -32
  45. package/reactjs/components/BridgeHistory/BridgeHistory.mjs +74 -27
  46. package/reactjs/components/Connect/BridgeAccountDisplay.js +66 -9
  47. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +66 -9
  48. package/reactjs/components/Connect/BridgeConnectButton.js +1 -1
  49. package/reactjs/components/Connect/BridgeConnectButton.mjs +1 -1
  50. package/reactjs/components/Connect/CustomConnectButton.js +2 -6
  51. package/reactjs/components/Connect/CustomConnectButton.mjs +1 -5
  52. package/reactjs/components/Connect/MvxConnectButton.d.ts +2 -4
  53. package/reactjs/components/Connect/MvxConnectButton.js +2 -2
  54. package/reactjs/components/Connect/MvxConnectButton.mjs +2 -2
  55. package/reactjs/components/Connect/SwitchChainButton.js +2 -7
  56. package/reactjs/components/Connect/SwitchChainButton.mjs +1 -6
  57. package/reactjs/components/CopyButton/CopyButton.js +2 -2
  58. package/reactjs/components/CopyButton/CopyButton.mjs +2 -2
  59. package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +5 -5
  60. package/reactjs/components/TokenSelector/TokenSelector.d.ts +2 -1
  61. package/reactjs/components/TokenSelector/TokenSelector.js +17 -9
  62. package/reactjs/components/TokenSelector/TokenSelector.mjs +13 -5
  63. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +2 -1
  64. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +11 -5
  65. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +8 -2
  66. package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts +1 -0
  67. package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +2 -2
  68. package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +2 -2
  69. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +2 -2
  70. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +2 -2
  71. package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.d.ts +1 -0
  72. package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.d.ts +1 -0
  73. package/reactjs/components/TokenSelector/components/SelectContent.d.ts +2 -1
  74. package/reactjs/components/TokenSelector/components/SelectContent.js +12 -9
  75. package/reactjs/components/TokenSelector/components/SelectContent.mjs +4 -1
  76. package/reactjs/components/TokenSelector/components/TokenIcon.js +5 -5
  77. package/reactjs/components/TokenSelector/components/TokenIcon.mjs +2 -2
  78. package/reactjs/components/TokenSelector/components/TokenItem.js +9 -9
  79. package/reactjs/components/TokenSelector/components/TokenItem.mjs +6 -6
  80. package/reactjs/components/TokenSelector/components/TokenList.js +1 -1
  81. package/reactjs/components/TokenSelector/components/TokenList.mjs +1 -1
  82. package/reactjs/components/base/MxCard/MxCard.js +2 -2
  83. package/reactjs/components/base/MxLink/MxLink.js +2 -2
  84. package/reactjs/components/base/MxSearch/MxSearch.js +4 -4
  85. package/reactjs/components/base/MxSlideover/MxSlideover.js +4 -4
  86. package/reactjs/components/base/MxTooltip/MxTooltip.js +9 -9
  87. package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +2 -2
  88. package/reactjs/context/Web3AppProvider.d.ts +5 -1
  89. package/reactjs/context/Web3AppProvider.js +12 -6
  90. package/reactjs/context/Web3AppProvider.mjs +9 -3
  91. package/reactjs/context/useWeb3App.js +2 -2
  92. package/reactjs/hooks/index.js +1 -1
  93. package/reactjs/hooks/index.mjs +1 -1
  94. package/reactjs/hooks/useAccount.d.ts +4 -4
  95. package/reactjs/hooks/useAccount.js +1 -6
  96. package/reactjs/hooks/useAccount.mjs +1 -6
  97. package/reactjs/hooks/useBalances.d.ts +1 -3
  98. package/reactjs/hooks/useBalances.js +16 -1
  99. package/reactjs/hooks/useBalances.mjs +16 -1
  100. package/reactjs/hooks/useBridgeFormik.d.ts +1 -3
  101. package/reactjs/hooks/useBridgeFormik.js +14 -46
  102. package/reactjs/hooks/useBridgeFormik.mjs +9 -41
  103. package/reactjs/hooks/useDebounce.js +3 -3
  104. package/reactjs/hooks/useFetchBridgeData.d.ts +12 -5
  105. package/reactjs/hooks/useFetchBridgeData.js +0 -2
  106. package/reactjs/hooks/useFetchBridgeData.mjs +0 -2
  107. package/reactjs/hooks/useFetchTokens.d.ts +12 -5
  108. package/reactjs/hooks/useFetchTokens.js +8 -12
  109. package/reactjs/hooks/useFetchTokens.mjs +2 -6
  110. package/reactjs/hooks/useFiatData.d.ts +6 -2
  111. package/reactjs/hooks/useFiatData.js +6 -6
  112. package/reactjs/hooks/useFiatData.mjs +1 -1
  113. package/reactjs/hooks/useGenericSignMessage.d.ts +3 -0
  114. package/reactjs/hooks/useGenericSignMessage.js +42 -0
  115. package/reactjs/hooks/useGenericSignMessage.mjs +41 -0
  116. package/reactjs/hooks/useGetChainId.js +3 -3
  117. package/reactjs/hooks/useGetChainId.mjs +1 -1
  118. package/reactjs/hooks/useResolveTokenChain.js +3 -3
  119. package/reactjs/hooks/useResolveTokenChain.mjs +1 -1
  120. package/reactjs/hooks/useSendTransactions.js +2 -2
  121. package/reactjs/hooks/useSignTransaction.d.ts +93 -67
  122. package/reactjs/hooks/useSignTransaction.js +53 -4
  123. package/reactjs/hooks/useSignTransaction.mjs +53 -4
  124. package/reactjs/hooks/validation/useTestHasEnoughFunds.js +3 -3
  125. package/reactjs/hooks/validation/useTestIsConnected.js +2 -2
  126. package/reactjs/index.js +42 -16
  127. package/reactjs/index.mjs +12 -16
  128. package/reactjs/init/init.d.ts +220 -1
  129. package/reactjs/init/init.js +34 -10
  130. package/reactjs/init/init.mjs +31 -7
  131. package/reactjs/init/tests/init.spec.js +5 -6
  132. package/reactjs/init/tests/init.spec.mjs +5 -6
  133. package/reactjs/queries/index.d.ts +0 -1
  134. package/reactjs/queries/index.js +0 -2
  135. package/reactjs/queries/index.mjs +1 -3
  136. package/reactjs/queries/useCheckAccount.query.d.ts +3 -0
  137. package/reactjs/queries/useCheckAccount.query.js +50 -0
  138. package/reactjs/queries/useCheckAccount.query.mjs +49 -0
  139. package/reactjs/queries/useGetAllTokens.query.d.ts +1 -1
  140. package/reactjs/queries/useGetAllTokens.query.js +6 -2
  141. package/reactjs/queries/useGetAllTokens.query.mjs +6 -2
  142. package/reactjs/queries/useGetChains.query.js +6 -2
  143. package/reactjs/queries/useGetChains.query.mjs +6 -2
  144. package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +6 -2
  145. package/reactjs/queries/useGetEvmTokensBalances.query.js +7 -10
  146. package/reactjs/queries/useGetEvmTokensBalances.query.mjs +7 -10
  147. package/reactjs/queries/useGetHistory.query.d.ts +9 -1
  148. package/reactjs/queries/useGetHistory.query.js +27 -5
  149. package/reactjs/queries/useGetHistory.query.mjs +27 -5
  150. package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +6 -2
  151. package/reactjs/queries/useGetMvxTokensBalances.query.js +17 -6
  152. package/reactjs/queries/useGetMvxTokensBalances.query.mjs +15 -4
  153. package/reactjs/queries/useLinkAccount.mutation.d.ts +6 -0
  154. package/{modules/fiat/queries/useGetRate.mutation.js → reactjs/queries/useLinkAccount.mutation.js} +5 -6
  155. package/{modules/fiat/queries/useGetRate.mutation.mjs → reactjs/queries/useLinkAccount.mutation.mjs} +5 -6
  156. package/reactjs/reexports.d.ts +2 -1
  157. package/reactjs/reexports.js +41 -13
  158. package/reactjs/reexports.mjs +11 -13
  159. package/reactjs/utils/getInitialTokens.d.ts +4 -1
  160. package/reactjs/utils/getInitialTokens.js +3 -3
  161. package/reactjs/utils/getInitialTokens.mjs +3 -3
  162. package/style.css +3 -1756
  163. package/types/chainType.d.ts +6 -0
  164. package/types/chainType.js +11 -0
  165. package/types/chainType.mjs +10 -0
  166. package/types/linkAccount.d.ts +6 -0
  167. package/types/linkAccount.js +2 -0
  168. package/types/linkAccount.mjs +1 -0
  169. package/types/providerType.d.ts +1 -1
  170. package/types/providerType.js +1 -1
  171. package/types/providerType.mjs +1 -1
  172. package/types/transaction.d.ts +28 -0
  173. package/types/utxo.d.ts +11 -0
  174. package/types/utxo.js +2 -0
  175. package/types/utxo.mjs +1 -0
  176. package/{useBalances-rRug6Uza.mjs → useBalances-CtcrEcK2.mjs} +99 -14
  177. package/{useBalances-CMixgIRU.js → useBalances-ok4GNkJ5.js} +100 -15
  178. package/add-3BCUvSCt.mjs +0 -19
  179. package/add-DCeZeenO.js +0 -20
  180. package/all-wallets-BmgBKRug.js +0 -11
  181. package/all-wallets-FKmNZ66z.mjs +0 -10
  182. package/app-store-CbYWgqmd.mjs +0 -21
  183. package/app-store-D_5F0mR4.js +0 -22
  184. package/apple-8B_b8kAc.mjs +0 -22
  185. package/apple-BwYB0tMQ.js +0 -23
  186. package/arrow-bottom-3XtFygVb.mjs +0 -12
  187. package/arrow-bottom-B4l4HJCy.js +0 -13
  188. package/arrow-bottom-circle-BnvomGtz.mjs +0 -15
  189. package/arrow-bottom-circle-KobZJ_fK.js +0 -16
  190. package/arrow-left-CjiJwBax.js +0 -13
  191. package/arrow-left-DbIgXHar.mjs +0 -12
  192. package/arrow-right-Bhg8xM3d.mjs +0 -12
  193. package/arrow-right-xU29L0ax.js +0 -13
  194. package/arrow-top-CSBKtLZo.js +0 -13
  195. package/arrow-top-DZqppJV1.mjs +0 -12
  196. package/bank-DJAILbNs.js +0 -19
  197. package/bank-wBrvs4Uk.mjs +0 -18
  198. package/bitcoin-DsA7-exS.mjs +0 -3541
  199. package/bitcoin-ymxJHn-_.js +0 -3541
  200. package/browser-CMwRVF9i.mjs +0 -18
  201. package/browser-DN2v3wtx.js +0 -19
  202. package/card-DCJLvVxE.js +0 -19
  203. package/card-le6hOsaj.mjs +0 -18
  204. package/checkmark-Cp3aAXtY.js +0 -16
  205. package/checkmark-DrMAKEwB.mjs +0 -15
  206. package/checkmark-bold-Ck4iDbtx.mjs +0 -12
  207. package/checkmark-bold-Doo1m0AX.js +0 -13
  208. package/chevron-bottom-D7BdJX-N.mjs +0 -12
  209. package/chevron-bottom-njC8Ngo9.js +0 -13
  210. package/chevron-left-C276To1p.mjs +0 -12
  211. package/chevron-left-DFqStS4C.js +0 -13
  212. package/chevron-right-BEaNKTUI.js +0 -13
  213. package/chevron-right-BLKwojDw.mjs +0 -12
  214. package/chevron-top-B7MGJq4-.mjs +0 -12
  215. package/chevron-top-Cwq1_meI.js +0 -13
  216. package/chrome-store-C5TevyVh.mjs +0 -65
  217. package/chrome-store-CMNN4-HT.js +0 -66
  218. package/clock-DJj9e3f9.js +0 -13
  219. package/clock-DzimdgI_.mjs +0 -12
  220. package/close-B157dUQ4.mjs +0 -12
  221. package/close-BxR6tB8U.js +0 -13
  222. package/coinPlaceholder-BVW1uvlR.js +0 -13
  223. package/coinPlaceholder-HBSLiUFH.mjs +0 -12
  224. package/compass-BYgmipOo.js +0 -13
  225. package/compass-DjjI5p4A.mjs +0 -12
  226. package/copy-as55vt-p.mjs +0 -19
  227. package/copy-ePIIYpzl.js +0 -20
  228. package/cursor-CFB-aeND.mjs +0 -7
  229. package/cursor-WCsVGQ3k.js +0 -8
  230. package/cursor-transparent-BeW4FJeS.js +0 -17
  231. package/cursor-transparent-UnLsX6vO.mjs +0 -16
  232. package/desktop-CZVMMlzv.js +0 -14
  233. package/desktop-CjnJn_bw.mjs +0 -13
  234. package/disconnect-CCFuuni4.js +0 -13
  235. package/disconnect-DULDFd8b.mjs +0 -12
  236. package/discord-BqNqFTBk.mjs +0 -21
  237. package/discord-NuyHZRR6.js +0 -22
  238. package/email-DGaF-62q.mjs +0 -797
  239. package/email-hzM1YeAa.js +0 -793
  240. package/embedded-wallet-ChKT2Kqi.mjs +0 -550
  241. package/embedded-wallet-DqTVtI_b.js +0 -547
  242. package/etherscan-CEsSVAq2.mjs +0 -10
  243. package/etherscan-Ds9nq6I4.js +0 -11
  244. package/exclamation-triangle-CUPVSfox.js +0 -9
  245. package/exclamation-triangle-EcsUlgU6.mjs +0 -8
  246. package/extension-BR4NlDwD.js +0 -13
  247. package/extension-CLHZhCSN.mjs +0 -12
  248. package/external-link-CRYOg_me.mjs +0 -12
  249. package/external-link-CWIkl3WV.js +0 -13
  250. package/facebook-ACv8F_-T.js +0 -31
  251. package/facebook-Cu3fhUsY.mjs +0 -30
  252. package/farcaster-D5ZOGlcT.mjs +0 -16
  253. package/farcaster-DfNCB-wN.js +0 -17
  254. package/filters-CNI5jsrU.js +0 -13
  255. package/filters-CdM5otRV.mjs +0 -12
  256. package/github-BEf292I1.mjs +0 -22
  257. package/github-Do7sWgv8.js +0 -23
  258. package/google-BODDgJTL.mjs +0 -22
  259. package/google-Cj3O62wM.js +0 -23
  260. package/help-circle-Ci498tJe.js +0 -17
  261. package/help-circle-DBELxJch.mjs +0 -16
  262. package/id-Cqn2I8pT.mjs +0 -16
  263. package/id-DFT-uV99.js +0 -17
  264. package/if-defined-D2_GrpzG.mjs +0 -808
  265. package/if-defined-DCNi9_tU.js +0 -808
  266. package/image-BL7nQSxN.mjs +0 -8
  267. package/image-yi8kMU8J.js +0 -9
  268. package/index-B2Hy-NF2.js +0 -97
  269. package/index-BBplfur6.js +0 -258
  270. package/index-BQ73fcgT.mjs +0 -101
  271. package/index-BQwRt9K1.mjs +0 -276
  272. package/index-BUD5aDnu.js +0 -682
  273. package/index-BaXPSDqe.js +0 -273
  274. package/index-BnIkKri-.mjs +0 -82
  275. package/index-Bohb3kl3.mjs +0 -108
  276. package/index-BwuR3kQH.mjs +0 -680
  277. package/index-BxxcuVMn.js +0 -152
  278. package/index-BypiLvRj.mjs +0 -273
  279. package/index-BzKWxdW7.js +0 -178
  280. package/index-C9-3nLnD.js +0 -103
  281. package/index-CLYqnLiQ.mjs +0 -9536
  282. package/index-CNlRmIrd.mjs +0 -55
  283. package/index-CQGOi3YP.js +0 -108
  284. package/index-CQHTMX2w.js +0 -57
  285. package/index-CQjirRvY.js +0 -166
  286. package/index-CWq1hi6D.js +0 -144
  287. package/index-CgEo1493.mjs +0 -101
  288. package/index-Cjb3mozL.mjs +0 -344
  289. package/index-CkXs2_JU.js +0 -814
  290. package/index-CvB1dQL-.mjs +0 -259
  291. package/index-CznIs6Ri.js +0 -344
  292. package/index-D5y2sPuX.mjs +0 -145
  293. package/index-D6oVv_xe.mjs +0 -176
  294. package/index-D77dZTM-.js +0 -101
  295. package/index-D7Crgb92.mjs +0 -166
  296. package/index-D9IfhMQO.js +0 -72
  297. package/index-DAPHrvyl.mjs +0 -566
  298. package/index-DCUKGebw.mjs +0 -812
  299. package/index-DM3a8Cxg.js +0 -331
  300. package/index-DQTDWPkK.js +0 -566
  301. package/index-Dbvu7_7E.js +0 -59
  302. package/index-DjK2gI38.mjs +0 -329
  303. package/index-DjVDwKyw.js +0 -278
  304. package/index-Dl21qlpM.js +0 -84
  305. package/index-Dy1_qaPl.mjs +0 -62
  306. package/index-DzQCeKKr.mjs +0 -95
  307. package/index-GDRRLbhM.mjs +0 -150
  308. package/index-KbSTzPJK.mjs +0 -57
  309. package/index-NJGuA8Hd.js +0 -64
  310. package/index-TtX6sKdt.js +0 -2237
  311. package/index-iL3P2-q2.mjs +0 -70
  312. package/index-j6sdnIsO.js +0 -9510
  313. package/index-jtBCZMfH.mjs +0 -263
  314. package/index-miYE8X37.mjs +0 -2235
  315. package/index-tRphky_g.js +0 -265
  316. package/info-CyIx65VL.mjs +0 -7
  317. package/info-GFfmaB2U.js +0 -8
  318. package/info-circle-BJebXoVk.js +0 -17
  319. package/info-circle-DEoF1MBl.mjs +0 -16
  320. package/lightbulb-BPKMbZZM.js +0 -8
  321. package/lightbulb-Bmy3we8u.mjs +0 -7
  322. package/mail-CQyo-njh.mjs +0 -12
  323. package/mail-RqhzZO28.js +0 -13
  324. package/mobile--nS-soHG.mjs +0 -13
  325. package/mobile-CySJYCCl.js +0 -14
  326. package/modules/fiat/components/FiatForm/FiatForm.d.ts +0 -9
  327. package/modules/fiat/components/FiatForm/FiatForm.js +0 -335
  328. package/modules/fiat/components/FiatForm/FiatForm.mjs +0 -334
  329. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.d.ts +0 -13
  330. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.js +0 -120
  331. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.mjs +0 -119
  332. package/modules/fiat/components/FiatForm/components/AmountInput/index.d.ts +0 -1
  333. package/modules/fiat/components/FiatForm/components/AmountInput/index.js +0 -5
  334. package/modules/fiat/components/FiatForm/components/AmountInput/index.mjs +0 -4
  335. package/modules/fiat/components/FiatForm/components/Payment/PaymentForm.d.ts +0 -6
  336. package/modules/fiat/components/FiatForm/components/Payment/PaymentForm.js +0 -167
  337. package/modules/fiat/components/FiatForm/components/Payment/PaymentForm.mjs +0 -166
  338. package/modules/fiat/components/FiatForm/components/Payment/PaymentFrame.d.ts +0 -7
  339. package/modules/fiat/components/FiatForm/components/Payment/PaymentFrame.js +0 -100
  340. package/modules/fiat/components/FiatForm/components/Payment/PaymentFrame.mjs +0 -99
  341. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.d.ts +0 -7
  342. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.js +0 -74
  343. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.mjs +0 -73
  344. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.d.ts +0 -14
  345. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.js +0 -94
  346. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.mjs +0 -93
  347. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.d.ts +0 -7
  348. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.js +0 -85
  349. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.mjs +0 -84
  350. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.d.ts +0 -7
  351. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.js +0 -94
  352. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.mjs +0 -93
  353. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.d.ts +0 -5
  354. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.js +0 -30
  355. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.mjs +0 -29
  356. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.d.ts +0 -8
  357. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.js +0 -106
  358. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.mjs +0 -105
  359. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.d.ts +0 -7
  360. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.js +0 -33
  361. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.mjs +0 -32
  362. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.d.ts +0 -7
  363. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.js +0 -21
  364. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.mjs +0 -20
  365. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.d.ts +0 -9
  366. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.js +0 -26
  367. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.mjs +0 -25
  368. package/modules/fiat/components/FiatForm/components/TokenSelector/index.d.ts +0 -1
  369. package/modules/fiat/components/FiatForm/components/TokenSelector/index.js +0 -5
  370. package/modules/fiat/components/FiatForm/components/TokenSelector/index.mjs +0 -4
  371. package/modules/fiat/components/FiatForm/index.d.ts +0 -1
  372. package/modules/fiat/components/FiatForm/index.js +0 -5
  373. package/modules/fiat/components/FiatForm/index.mjs +0 -4
  374. package/modules/fiat/components/index.d.ts +0 -1
  375. package/modules/fiat/components/index.js +0 -5
  376. package/modules/fiat/components/index.mjs +0 -4
  377. package/modules/fiat/context/FiatProvider.d.ts +0 -8
  378. package/modules/fiat/context/FiatProvider.js +0 -24
  379. package/modules/fiat/context/FiatProvider.mjs +0 -23
  380. package/modules/fiat/context/queryClient.d.ts +0 -3
  381. package/modules/fiat/context/queryClient.js +0 -12
  382. package/modules/fiat/context/queryClient.mjs +0 -11
  383. package/modules/fiat/context/useFiat.d.ts +0 -1
  384. package/modules/fiat/context/useFiat.js +0 -13
  385. package/modules/fiat/context/useFiat.mjs +0 -12
  386. package/modules/fiat/hooks/index.d.ts +0 -2
  387. package/modules/fiat/hooks/index.js +0 -7
  388. package/modules/fiat/hooks/index.mjs +0 -6
  389. package/modules/fiat/hooks/useFiatData.d.ts +0 -7
  390. package/modules/fiat/hooks/useFiatData.js +0 -78
  391. package/modules/fiat/hooks/useFiatData.mjs +0 -77
  392. package/modules/fiat/hooks/validation/index.d.ts +0 -1
  393. package/modules/fiat/hooks/validation/index.js +0 -5
  394. package/modules/fiat/hooks/validation/index.mjs +0 -4
  395. package/modules/fiat/hooks/validation/useAmountSchema.d.ts +0 -2
  396. package/modules/fiat/hooks/validation/useAmountSchema.js +0 -27
  397. package/modules/fiat/hooks/validation/useAmountSchema.mjs +0 -9
  398. package/modules/fiat/index.d.ts +0 -8
  399. package/modules/fiat/index.js +0 -22
  400. package/modules/fiat/index.mjs +0 -21
  401. package/modules/fiat/init/index.d.ts +0 -2
  402. package/modules/fiat/init/index.js +0 -5
  403. package/modules/fiat/init/index.mjs +0 -4
  404. package/modules/fiat/init/init.d.ts +0 -22
  405. package/modules/fiat/init/init.js +0 -15
  406. package/modules/fiat/init/init.mjs +0 -14
  407. package/modules/fiat/queries/index.d.ts +0 -2
  408. package/modules/fiat/queries/index.js +0 -7
  409. package/modules/fiat/queries/index.mjs +0 -6
  410. package/modules/fiat/queries/useGetRate.mutation.d.ts +0 -6
  411. package/modules/fiat/queries/useGetTokens.query.d.ts +0 -5
  412. package/modules/fiat/queries/useGetTokens.query.js +0 -33
  413. package/modules/fiat/queries/useGetTokens.query.mjs +0 -32
  414. package/more-CwWZDDBg.mjs +0 -15
  415. package/more-bZ0pd89b.js +0 -16
  416. package/network-placeholder-BHCmKrry.mjs +0 -18
  417. package/network-placeholder-aJGrqpCg.js +0 -19
  418. package/nftPlaceholder-CGLCdnta.js +0 -13
  419. package/nftPlaceholder-pidG99wt.mjs +0 -12
  420. package/off-DqIdiRvr.mjs +0 -12
  421. package/off-Dzc0O-PN.js +0 -13
  422. package/onramp-CU3WpHjP.mjs +0 -1593
  423. package/onramp-DpdybYx8.js +0 -1587
  424. package/play-store-C5Gl454J.mjs +0 -36
  425. package/play-store-CMtGhNVv.js +0 -37
  426. package/plus-BYok4L2w.js +0 -18
  427. package/plus-DcQZoixB.mjs +0 -17
  428. package/qr-code-D8jk7hh0.mjs +0 -10
  429. package/qr-code-wHRs9uHL.js +0 -11
  430. package/react-BT74Hcah.js +0 -6078
  431. package/react-C6QSQYzA.js +0 -254
  432. package/react-CrzHxs1H.mjs +0 -25357
  433. package/react-DmVF9JBF.mjs +0 -6078
  434. package/react-Dz0FNS2o.js +0 -25357
  435. package/react-ICzqG8J6.mjs +0 -254
  436. package/reactjs/queries/useGetTokens.query.d.ts +0 -3
  437. package/reactjs/queries/useGetTokens.query.js +0 -34
  438. package/reactjs/queries/useGetTokens.query.mjs +0 -33
  439. package/receive-Cf90xf32.mjs +0 -216
  440. package/receive-_Qf98a76.js +0 -216
  441. package/recycle-horizontal-DGj7Ya8u.js +0 -14
  442. package/recycle-horizontal-jbMIQBSA.mjs +0 -13
  443. package/refresh-C3z4X6Ra.mjs +0 -12
  444. package/refresh-D20w1bR5.js +0 -13
  445. package/reown-logo-BtryrZ0M.js +0 -17
  446. package/reown-logo-MOOHjLJG.mjs +0 -16
  447. package/search-C8qQ2OF_.js +0 -13
  448. package/search-CiVHywyX.mjs +0 -12
  449. package/send-C8kIbx5x.js +0 -1191
  450. package/send-CJ5uA96d.mjs +0 -19
  451. package/send-CSVxya54.js +0 -20
  452. package/send-CW2bf2qU.mjs +0 -1193
  453. package/socials-Bs3xjhwd.js +0 -723
  454. package/socials-CTeVPgpO.mjs +0 -725
  455. package/swapHorizontal-B1XnljWk.mjs +0 -12
  456. package/swapHorizontal-DoBOwYma.js +0 -13
  457. package/swapHorizontalBold-ChRdyrAc.js +0 -13
  458. package/swapHorizontalBold-ZOXPzU3l.mjs +0 -12
  459. package/swapHorizontalMedium-7Vh6jM1i.mjs +0 -20
  460. package/swapHorizontalMedium-KEiACy_f.js +0 -21
  461. package/swapHorizontalRoundedBold-BBvIWuGE.js +0 -13
  462. package/swapHorizontalRoundedBold-BGQ_C_tG.mjs +0 -12
  463. package/swapVertical-DdtnITSU.js +0 -13
  464. package/swapVertical-DyamFXFs.mjs +0 -12
  465. package/swaps-D-RYqPMm.js +0 -1906
  466. package/swaps-DkOwtcRc.mjs +0 -1908
  467. package/telegram-BtkXg1RW.js +0 -21
  468. package/telegram-f99qesxc.mjs +0 -20
  469. package/three-dots-BeUcfBGZ.js +0 -10
  470. package/three-dots-DKR049e7.mjs +0 -9
  471. package/transactions-BPLEtw2I.mjs +0 -37
  472. package/transactions-CuvH3fXr.js +0 -37
  473. package/twitch-9WJ7_BtK.mjs +0 -22
  474. package/twitch-SzeD1x5u.js +0 -23
  475. package/twitterIcon-BZ0-__04.js +0 -11
  476. package/twitterIcon-DOu4wRVw.mjs +0 -10
  477. package/verify-BBbz--_D.js +0 -13
  478. package/verify-CZlhDs-b.mjs +0 -12
  479. package/verify-filled-3kQkfAKY.mjs +0 -12
  480. package/verify-filled-D6lQnTMX.js +0 -13
  481. package/w3m-modal-B8pbabeE.js +0 -1208
  482. package/w3m-modal-D6o_n4pP.mjs +0 -1208
  483. package/wallet-CBn7xnZU.mjs +0 -12
  484. package/wallet-DSfjOp5r.js +0 -13
  485. package/wallet-placeholder-BhTS6W-G.js +0 -19
  486. package/wallet-placeholder-LgcirFmF.mjs +0 -18
  487. package/walletconnect-5VFb1-rC.js +0 -39
  488. package/walletconnect-Boo6bRXF.mjs +0 -38
  489. package/warning-circle-CDQm5SB6.mjs +0 -16
  490. package/warning-circle-CHLQICdy.js +0 -17
  491. package/x-B6ycL_Yp.js +0 -17
  492. package/x-DxSIKaVH.mjs +0 -16
package/README.md CHANGED
@@ -161,12 +161,11 @@ const App = () => {
161
161
 
162
162
  return (
163
163
  // Wrap your app with Web3AppProvider to enable multi-chain connections
164
- <Web3AppProvider appKit={provider.appKit} config={provider.config} options={provider.options}>
164
+ <Web3AppProvider appKit={provider.appKit} config={provider.config} options={provider.options} nativeAuthToken={nativeAuthToken}>
165
165
  <BridgeForm
166
166
  mvxChainId={"44"}
167
167
  mvxAddress={mvxAccount?.address}
168
168
  username={mvxAccount?.username}
169
- nativeAuthToken={nativeAuthToken}
170
169
  callbackRoute={"/deposit"}
171
170
  showHistory={showHistory}
172
171
  onSuccessfullySentTransaction={(txHashes) => {
@@ -183,4 +182,9 @@ const App = () => {
183
182
  </Web3AppProvider>
184
183
  )
185
184
  }
186
- ```
185
+ ```
186
+
187
+ ## Disclaimer
188
+
189
+ 1. This package is in active development and is subject to change. We recommend to check the latest version and update your code accordingly.
190
+ 2. This package is not fully supported on the Next.js framework. We are working on a solution to make it compatible with Next.js.
@@ -0,0 +1,9 @@
1
+ import { CheckAccountDto } from '../dto/CheckAccount.dto';
2
+ import { AxiosResponse } from 'axios';
3
+
4
+ export declare function checkAccount({ url, walletAddress, chainId, nativeAuthToken }: {
5
+ url: string;
6
+ walletAddress: string;
7
+ chainId: string;
8
+ nativeAuthToken: string;
9
+ }): Promise<AxiosResponse<CheckAccountDto>>;
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const axios = require("axios");
5
+ async function checkAccount({
6
+ url,
7
+ walletAddress,
8
+ chainId,
9
+ nativeAuthToken
10
+ }) {
11
+ const config = {
12
+ baseURL: url,
13
+ headers: {
14
+ Authorization: `Bearer ${nativeAuthToken}`
15
+ }
16
+ };
17
+ return await axios.get(
18
+ `/user/checkAccount?walletAddress=${walletAddress}&chainId=${chainId}`,
19
+ config
20
+ );
21
+ }
22
+ exports.checkAccount = checkAccount;
@@ -0,0 +1,21 @@
1
+ import axios from "axios";
2
+ async function checkAccount({
3
+ url,
4
+ walletAddress,
5
+ chainId,
6
+ nativeAuthToken
7
+ }) {
8
+ const config = {
9
+ baseURL: url,
10
+ headers: {
11
+ Authorization: `Bearer ${nativeAuthToken}`
12
+ }
13
+ };
14
+ return await axios.get(
15
+ `/user/checkAccount?walletAddress=${walletAddress}&chainId=${chainId}`,
16
+ config
17
+ );
18
+ }
19
+ export {
20
+ checkAccount
21
+ };
@@ -1,6 +1,8 @@
1
1
  import { ChainDTO } from '../dto/Chain.dto';
2
2
  import { AxiosResponse } from 'axios';
3
3
 
4
- export declare function getChains({ url }: {
4
+ export declare function getChains({ url, nativeAuthToken, bridgeOnly }: {
5
5
  url: string;
6
+ nativeAuthToken: string;
7
+ bridgeOnly: boolean;
6
8
  }): Promise<AxiosResponse<ChainDTO[]>>;
package/api/getChains.js CHANGED
@@ -3,10 +3,16 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const axios = require("axios");
5
5
  async function getChains({
6
- url
6
+ url,
7
+ nativeAuthToken,
8
+ bridgeOnly
7
9
  }) {
8
- return await axios.get("/chains", {
9
- baseURL: url
10
- });
10
+ const config = {
11
+ baseURL: url,
12
+ headers: {
13
+ Authorization: `Bearer ${nativeAuthToken}`
14
+ }
15
+ };
16
+ return await axios.get(`/chains?isBridge=${bridgeOnly}`, config);
11
17
  }
12
18
  exports.getChains = getChains;
package/api/getChains.mjs CHANGED
@@ -1,10 +1,16 @@
1
1
  import axios from "axios";
2
2
  async function getChains({
3
- url
3
+ url,
4
+ nativeAuthToken,
5
+ bridgeOnly
4
6
  }) {
5
- return await axios.get("/chains", {
6
- baseURL: url
7
- });
7
+ const config = {
8
+ baseURL: url,
9
+ headers: {
10
+ Authorization: `Bearer ${nativeAuthToken}`
11
+ }
12
+ };
13
+ return await axios.get(`/chains?isBridge=${bridgeOnly}`, config);
8
14
  }
9
15
  export {
10
16
  getChains
@@ -1,7 +1,9 @@
1
1
  import { TokenType } from '../types/token';
2
2
  import { AxiosResponse } from 'axios';
3
3
 
4
- export declare function getTokens({ url, chainId }: {
4
+ export declare function getTokens({ url, chainId, nativeAuthToken, bridgeOnly }: {
5
5
  url: string;
6
6
  chainId?: number;
7
+ nativeAuthToken: string;
8
+ bridgeOnly: boolean;
7
9
  }): Promise<AxiosResponse<TokenType[]>>;
package/api/getTokens.js CHANGED
@@ -4,11 +4,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const axios = require("axios");
5
5
  async function getTokens({
6
6
  url,
7
- chainId
7
+ chainId,
8
+ nativeAuthToken,
9
+ bridgeOnly
8
10
  }) {
11
+ const config = {
12
+ baseURL: url,
13
+ headers: {
14
+ Authorization: `Bearer ${nativeAuthToken}`
15
+ }
16
+ };
9
17
  const endpoint = chainId ? `/tokens/${chainId}` : "/tokens";
10
- return await axios.get(endpoint, {
11
- baseURL: url
12
- });
18
+ return await axios.get(
19
+ `${endpoint}?isBridge=${bridgeOnly}`,
20
+ config
21
+ );
13
22
  }
14
23
  exports.getTokens = getTokens;
package/api/getTokens.mjs CHANGED
@@ -1,12 +1,21 @@
1
1
  import axios from "axios";
2
2
  async function getTokens({
3
3
  url,
4
- chainId
4
+ chainId,
5
+ nativeAuthToken,
6
+ bridgeOnly
5
7
  }) {
8
+ const config = {
9
+ baseURL: url,
10
+ headers: {
11
+ Authorization: `Bearer ${nativeAuthToken}`
12
+ }
13
+ };
6
14
  const endpoint = chainId ? `/tokens/${chainId}` : "/tokens";
7
- return await axios.get(endpoint, {
8
- baseURL: url
9
- });
15
+ return await axios.get(
16
+ `${endpoint}?isBridge=${bridgeOnly}`,
17
+ config
18
+ );
10
19
  }
11
20
  export {
12
21
  getTokens
@@ -1,8 +1,9 @@
1
1
  import { TokenBalanceDTO } from '../dto/TokenBalance.dto';
2
2
  import { AxiosResponse } from 'axios';
3
3
 
4
- export declare function getTokensBalances({ url, userAddress, chainId }: {
4
+ export declare function getTokensBalances({ url, userAddress, chainId, nativeAuthToken }: {
5
5
  url: string;
6
6
  userAddress: string;
7
7
  chainId: string;
8
+ nativeAuthToken: string;
8
9
  }): Promise<AxiosResponse<TokenBalanceDTO[]>>;
@@ -5,13 +5,18 @@ const axios = require("axios");
5
5
  async function getTokensBalances({
6
6
  url,
7
7
  userAddress,
8
- chainId
8
+ chainId,
9
+ nativeAuthToken
9
10
  }) {
11
+ const config = {
12
+ baseURL: url,
13
+ headers: {
14
+ Authorization: `Bearer ${nativeAuthToken}`
15
+ }
16
+ };
10
17
  return await axios.get(
11
18
  `/tokens/balances/${userAddress}/${chainId}`,
12
- {
13
- baseURL: url
14
- }
19
+ config
15
20
  );
16
21
  }
17
22
  exports.getTokensBalances = getTokensBalances;
@@ -2,13 +2,18 @@ import axios from "axios";
2
2
  async function getTokensBalances({
3
3
  url,
4
4
  userAddress,
5
- chainId
5
+ chainId,
6
+ nativeAuthToken
6
7
  }) {
8
+ const config = {
9
+ baseURL: url,
10
+ headers: {
11
+ Authorization: `Bearer ${nativeAuthToken}`
12
+ }
13
+ };
7
14
  return await axios.get(
8
15
  `/tokens/balances/${userAddress}/${chainId}`,
9
- {
10
- baseURL: url
11
- }
16
+ config
12
17
  );
13
18
  }
14
19
  export {
@@ -1,7 +1,14 @@
1
+ import { ProviderType } from 'types/providerType';
1
2
  import { TransactionDTO } from 'dto/Transaction.dto';
2
3
  import { AxiosResponse } from 'axios';
3
4
 
4
- export declare function getTransactions({ url, userWalletAddress }: {
5
+ export declare function getTransactions({ url, address, sender, provider, status, tokenIn, tokenOut, nativeAuthToken }: {
5
6
  url: string;
6
- userWalletAddress: string;
7
+ address: string;
8
+ sender?: string;
9
+ provider?: ProviderType;
10
+ status?: string;
11
+ tokenIn?: string;
12
+ tokenOut?: string;
13
+ nativeAuthToken: string;
7
14
  }): Promise<AxiosResponse<TransactionDTO[]>>;
@@ -4,11 +4,36 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const axios = require("axios");
5
5
  async function getTransactions({
6
6
  url,
7
- userWalletAddress
7
+ address,
8
+ sender,
9
+ provider,
10
+ status,
11
+ tokenIn,
12
+ tokenOut,
13
+ nativeAuthToken
8
14
  }) {
9
- const endpoint = userWalletAddress ? `/transactions/${userWalletAddress}` : "/transactions";
10
- return await axios.get(endpoint, {
11
- baseURL: url
15
+ const queryParams = new URLSearchParams({
16
+ receiver: address || "",
17
+ sender: sender || "",
18
+ provider: provider || "",
19
+ status: status || "",
20
+ tokenIn: tokenIn || "",
21
+ tokenOut: tokenOut || ""
12
22
  });
23
+ const params = Object.entries(Object.fromEntries(queryParams.entries()));
24
+ for (const [key, value] of params) {
25
+ if (value === "") {
26
+ queryParams.delete(key);
27
+ }
28
+ }
29
+ const queryString = queryParams.toString();
30
+ const endpointWithParams = `/transactions?${queryString}`;
31
+ const config = {
32
+ baseURL: url,
33
+ headers: {
34
+ Authorization: `Bearer ${nativeAuthToken}`
35
+ }
36
+ };
37
+ return await axios.get(endpointWithParams, config);
13
38
  }
14
39
  exports.getTransactions = getTransactions;
@@ -1,12 +1,37 @@
1
1
  import axios from "axios";
2
2
  async function getTransactions({
3
3
  url,
4
- userWalletAddress
4
+ address,
5
+ sender,
6
+ provider,
7
+ status,
8
+ tokenIn,
9
+ tokenOut,
10
+ nativeAuthToken
5
11
  }) {
6
- const endpoint = userWalletAddress ? `/transactions/${userWalletAddress}` : "/transactions";
7
- return await axios.get(endpoint, {
8
- baseURL: url
12
+ const queryParams = new URLSearchParams({
13
+ receiver: address || "",
14
+ sender: sender || "",
15
+ provider: provider || "",
16
+ status: status || "",
17
+ tokenIn: tokenIn || "",
18
+ tokenOut: tokenOut || ""
9
19
  });
20
+ const params = Object.entries(Object.fromEntries(queryParams.entries()));
21
+ for (const [key, value] of params) {
22
+ if (value === "") {
23
+ queryParams.delete(key);
24
+ }
25
+ }
26
+ const queryString = queryParams.toString();
27
+ const endpointWithParams = `/transactions?${queryString}`;
28
+ const config = {
29
+ baseURL: url,
30
+ headers: {
31
+ Authorization: `Bearer ${nativeAuthToken}`
32
+ }
33
+ };
34
+ return await axios.get(endpointWithParams, config);
10
35
  }
11
36
  export {
12
37
  getTransactions
package/api/index.d.ts CHANGED
@@ -5,3 +5,5 @@ export * from './getTokens';
5
5
  export * from './getTokensBalances';
6
6
  export * from './getTransactions';
7
7
  export * from './sendTransactions';
8
+ export * from './checkAccount';
9
+ export * from './linkAccount';
package/api/index.js CHANGED
@@ -8,6 +8,8 @@ const api_getTokens = require("./getTokens.js");
8
8
  const api_getTokensBalances = require("./getTokensBalances.js");
9
9
  const api_getTransactions = require("./getTransactions.js");
10
10
  const api_sendTransactions = require("./sendTransactions.js");
11
+ const api_checkAccount = require("./checkAccount.js");
12
+ const api_linkAccount = require("./linkAccount.js");
11
13
  exports.confirmRate = api_confirmRate.confirmRate;
12
14
  exports.getChains = api_getChains.getChains;
13
15
  exports.getRate = api_getRate.getRate;
@@ -15,3 +17,5 @@ exports.getTokens = api_getTokens.getTokens;
15
17
  exports.getTokensBalances = api_getTokensBalances.getTokensBalances;
16
18
  exports.getTransactions = api_getTransactions.getTransactions;
17
19
  exports.sendTransactions = api_sendTransactions.sendTransactions;
20
+ exports.checkAccount = api_checkAccount.checkAccount;
21
+ exports.linkAccount = api_linkAccount.linkAccount;
package/api/index.mjs CHANGED
@@ -5,12 +5,16 @@ import { getTokens } from "./getTokens.mjs";
5
5
  import { getTokensBalances } from "./getTokensBalances.mjs";
6
6
  import { getTransactions } from "./getTransactions.mjs";
7
7
  import { sendTransactions } from "./sendTransactions.mjs";
8
+ import { checkAccount } from "./checkAccount.mjs";
9
+ import { linkAccount } from "./linkAccount.mjs";
8
10
  export {
11
+ checkAccount,
9
12
  confirmRate,
10
13
  getChains,
11
14
  getRate,
12
15
  getTokens,
13
16
  getTokensBalances,
14
17
  getTransactions,
18
+ linkAccount,
15
19
  sendTransactions
16
20
  };
@@ -0,0 +1,10 @@
1
+ import { LinkAccountRequestBody } from '../types/linkAccount';
2
+ import { AxiosResponse } from 'axios';
3
+
4
+ interface LinkAccountProps {
5
+ url: string;
6
+ nativeAuthToken: string;
7
+ body: LinkAccountRequestBody;
8
+ }
9
+ export declare function linkAccount({ url, nativeAuthToken, body }: LinkAccountProps): Promise<AxiosResponse>;
10
+ export {};
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const axios = require("axios");
5
+ const helpers_decodeToken = require("../helpers/decodeToken.js");
6
+ async function linkAccount({
7
+ url,
8
+ nativeAuthToken,
9
+ body
10
+ }) {
11
+ var _a;
12
+ const config = {
13
+ baseURL: url,
14
+ headers: {
15
+ Authorization: `Bearer ${nativeAuthToken}`
16
+ }
17
+ };
18
+ if (!nativeAuthToken) {
19
+ (_a = config.headers) == null ? true : delete _a.Authorization;
20
+ }
21
+ const decodedToken = await helpers_decodeToken.decodeToken(nativeAuthToken);
22
+ config.headers = {
23
+ ...config.headers,
24
+ origin: decodedToken == null ? void 0 : decodedToken.origin
25
+ };
26
+ return await axios.post(
27
+ `/user/linkAccount`,
28
+ body,
29
+ config
30
+ );
31
+ }
32
+ exports.linkAccount = linkAccount;
@@ -0,0 +1,31 @@
1
+ import axios from "axios";
2
+ import { decodeToken } from "../helpers/decodeToken.mjs";
3
+ async function linkAccount({
4
+ url,
5
+ nativeAuthToken,
6
+ body
7
+ }) {
8
+ var _a;
9
+ const config = {
10
+ baseURL: url,
11
+ headers: {
12
+ Authorization: `Bearer ${nativeAuthToken}`
13
+ }
14
+ };
15
+ if (!nativeAuthToken) {
16
+ (_a = config.headers) == null ? true : delete _a.Authorization;
17
+ }
18
+ const decodedToken = await decodeToken(nativeAuthToken);
19
+ config.headers = {
20
+ ...config.headers,
21
+ origin: decodedToken == null ? void 0 : decodedToken.origin
22
+ };
23
+ return await axios.post(
24
+ `/user/linkAccount`,
25
+ body,
26
+ config
27
+ );
28
+ }
29
+ export {
30
+ linkAccount
31
+ };
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  const axios = require("axios");
4
+ const types_chainType = require("../../types/chainType.js");
4
5
  const api_getChains = require("../getChains.js");
5
6
  jest.mock("axios");
6
7
  const mockedAxios = axios;
@@ -13,7 +14,7 @@ describe("getChains", () => {
13
14
  chainName: "msx",
14
15
  pngUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.png",
15
16
  svgUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.svg",
16
- chainType: "type1",
17
+ chainType: types_chainType.ChainType.evm,
17
18
  rpc: "rpc1",
18
19
  blockExplorerUrls: ["explorer1"],
19
20
  nativeCurrency: {
@@ -26,12 +27,18 @@ describe("getChains", () => {
26
27
  }
27
28
  ];
28
29
  mockedAxios.get.mockResolvedValue({ data: response });
29
- const result = await api_getChains.getChains({ url });
30
+ const result = await api_getChains.getChains({
31
+ url,
32
+ nativeAuthToken: "ZKssadass",
33
+ bridgeOnly: false
34
+ });
30
35
  expect(mockedAxios.get).toHaveBeenCalledWith("/chains", { baseURL: url });
31
36
  expect(result.data).toEqual(response);
32
37
  });
33
38
  it("handles error when fetching chains", async () => {
34
39
  mockedAxios.get.mockRejectedValue(new Error("Network Error"));
35
- await expect(api_getChains.getChains({ url })).rejects.toThrow("Network Error");
40
+ await expect(
41
+ api_getChains.getChains({ url, nativeAuthToken: "ZKssadass", bridgeOnly: false })
42
+ ).rejects.toThrow("Network Error");
36
43
  });
37
44
  });
@@ -1,4 +1,5 @@
1
1
  import axios from "axios";
2
+ import { ChainType } from "../../types/chainType.mjs";
2
3
  import { getChains } from "../getChains.mjs";
3
4
  jest.mock("axios");
4
5
  const mockedAxios = axios;
@@ -11,7 +12,7 @@ describe("getChains", () => {
11
12
  chainName: "msx",
12
13
  pngUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.png",
13
14
  svgUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.svg",
14
- chainType: "type1",
15
+ chainType: ChainType.evm,
15
16
  rpc: "rpc1",
16
17
  blockExplorerUrls: ["explorer1"],
17
18
  nativeCurrency: {
@@ -24,12 +25,18 @@ describe("getChains", () => {
24
25
  }
25
26
  ];
26
27
  mockedAxios.get.mockResolvedValue({ data: response });
27
- const result = await getChains({ url });
28
+ const result = await getChains({
29
+ url,
30
+ nativeAuthToken: "ZKssadass",
31
+ bridgeOnly: false
32
+ });
28
33
  expect(mockedAxios.get).toHaveBeenCalledWith("/chains", { baseURL: url });
29
34
  expect(result.data).toEqual(response);
30
35
  });
31
36
  it("handles error when fetching chains", async () => {
32
37
  mockedAxios.get.mockRejectedValue(new Error("Network Error"));
33
- await expect(getChains({ url })).rejects.toThrow("Network Error");
38
+ await expect(
39
+ getChains({ url, nativeAuthToken: "ZKssadass", bridgeOnly: false })
40
+ ).rejects.toThrow("Network Error");
34
41
  });
35
42
  });
@@ -9,7 +9,7 @@ describe("getTokens", () => {
9
9
  it("fetches tokens successfully without chainId", async () => {
10
10
  const response = [
11
11
  {
12
- chainId: 1,
12
+ chainId: "1",
13
13
  address: "0x123",
14
14
  name: "Token One",
15
15
  symbol: "T1",
@@ -24,7 +24,11 @@ describe("getTokens", () => {
24
24
  }
25
25
  ];
26
26
  mockedAxios.get.mockResolvedValue({ data: response });
27
- const result = await api_getTokens.getTokens({ url });
27
+ const result = await api_getTokens.getTokens({
28
+ url,
29
+ nativeAuthToken: "",
30
+ bridgeOnly: false
31
+ });
28
32
  expect(mockedAxios.get).toHaveBeenCalledWith("/tokens", { baseURL: url });
29
33
  expect(result.data).toEqual(response);
30
34
  });
@@ -32,7 +36,7 @@ describe("getTokens", () => {
32
36
  const chainId = 1;
33
37
  const response = [
34
38
  {
35
- chainId: 1,
39
+ chainId: "1",
36
40
  address: "0x123",
37
41
  name: "Token One",
38
42
  symbol: "T1",
@@ -47,7 +51,12 @@ describe("getTokens", () => {
47
51
  }
48
52
  ];
49
53
  mockedAxios.get.mockResolvedValue({ data: response });
50
- const result = await api_getTokens.getTokens({ url, chainId });
54
+ const result = await api_getTokens.getTokens({
55
+ url,
56
+ chainId,
57
+ nativeAuthToken: "",
58
+ bridgeOnly: false
59
+ });
51
60
  expect(mockedAxios.get).toHaveBeenCalledWith(`/tokens/${chainId}`, {
52
61
  baseURL: url
53
62
  });
@@ -55,6 +64,8 @@ describe("getTokens", () => {
55
64
  });
56
65
  it("handles error when fetching tokens", async () => {
57
66
  mockedAxios.get.mockRejectedValue(new Error("Network Error"));
58
- await expect(api_getTokens.getTokens({ url })).rejects.toThrow("Network Error");
67
+ await expect(
68
+ api_getTokens.getTokens({ url, nativeAuthToken: "", bridgeOnly: false })
69
+ ).rejects.toThrow("Network Error");
59
70
  });
60
71
  });
@@ -7,7 +7,7 @@ describe("getTokens", () => {
7
7
  it("fetches tokens successfully without chainId", async () => {
8
8
  const response = [
9
9
  {
10
- chainId: 1,
10
+ chainId: "1",
11
11
  address: "0x123",
12
12
  name: "Token One",
13
13
  symbol: "T1",
@@ -22,7 +22,11 @@ describe("getTokens", () => {
22
22
  }
23
23
  ];
24
24
  mockedAxios.get.mockResolvedValue({ data: response });
25
- const result = await getTokens({ url });
25
+ const result = await getTokens({
26
+ url,
27
+ nativeAuthToken: "",
28
+ bridgeOnly: false
29
+ });
26
30
  expect(mockedAxios.get).toHaveBeenCalledWith("/tokens", { baseURL: url });
27
31
  expect(result.data).toEqual(response);
28
32
  });
@@ -30,7 +34,7 @@ describe("getTokens", () => {
30
34
  const chainId = 1;
31
35
  const response = [
32
36
  {
33
- chainId: 1,
37
+ chainId: "1",
34
38
  address: "0x123",
35
39
  name: "Token One",
36
40
  symbol: "T1",
@@ -45,7 +49,12 @@ describe("getTokens", () => {
45
49
  }
46
50
  ];
47
51
  mockedAxios.get.mockResolvedValue({ data: response });
48
- const result = await getTokens({ url, chainId });
52
+ const result = await getTokens({
53
+ url,
54
+ chainId,
55
+ nativeAuthToken: "",
56
+ bridgeOnly: false
57
+ });
49
58
  expect(mockedAxios.get).toHaveBeenCalledWith(`/tokens/${chainId}`, {
50
59
  baseURL: url
51
60
  });
@@ -53,6 +62,8 @@ describe("getTokens", () => {
53
62
  });
54
63
  it("handles error when fetching tokens", async () => {
55
64
  mockedAxios.get.mockRejectedValue(new Error("Network Error"));
56
- await expect(getTokens({ url })).rejects.toThrow("Network Error");
65
+ await expect(
66
+ getTokens({ url, nativeAuthToken: "", bridgeOnly: false })
67
+ ).rejects.toThrow("Network Error");
57
68
  });
58
69
  });