@multiversx/sdk-dapp-liquidity 2.0.0 → 2.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/all-networks--dfVLHLJ.js +2 -0
  2. package/all-networks-Czd8zS1n.mjs +4 -0
  3. package/api/checkAccount.js +1 -21
  4. package/api/checkAccount.mjs +13 -13
  5. package/api/confirmRate.js +1 -29
  6. package/api/confirmRate.mjs +17 -22
  7. package/api/getChains.js +1 -17
  8. package/api/getChains.mjs +10 -10
  9. package/api/getRate.js +1 -27
  10. package/api/getRate.mjs +17 -20
  11. package/api/getTokens.js +1 -22
  12. package/api/getTokens.mjs +14 -15
  13. package/api/getTokensBalances.js +1 -21
  14. package/api/getTokensBalances.mjs +13 -13
  15. package/api/getTransactions.js +1 -38
  16. package/api/getTransactions.mjs +25 -31
  17. package/api/index.js +1 -18
  18. package/api/index.mjs +16 -16
  19. package/api/sendTransactions.js +1 -32
  20. package/api/sendTransactions.mjs +19 -19
  21. package/api/tests/confirmRate.spec.js +1 -130
  22. package/api/tests/confirmRate.spec.mjs +44 -58
  23. package/api/tests/getChains.spec.js +1 -43
  24. package/api/tests/getChains.spec.mjs +15 -18
  25. package/api/tests/getRate.spec.js +1 -87
  26. package/api/tests/getRate.spec.mjs +35 -49
  27. package/api/tests/getTokens.spec.js +1 -68
  28. package/api/tests/getTokens.spec.mjs +23 -29
  29. package/api/tests/getTransactions.spec.js +1 -94
  30. package/api/tests/getTransactions.spec.mjs +35 -51
  31. package/api/tests/sendTransactions.spec.js +1 -96
  32. package/api/tests/sendTransactions.spec.mjs +44 -52
  33. package/constants/index.js +1 -4
  34. package/constants/index.mjs +2 -2
  35. package/default-D0Jk5ROI.mjs +4 -0
  36. package/default-DbU6vPaB.js +2 -0
  37. package/helpers/assertRateConfirmationMatchesIntent.d.ts +8 -0
  38. package/helpers/assertRateConfirmationMatchesIntent.js +2 -0
  39. package/helpers/assertRateConfirmationMatchesIntent.mjs +20 -0
  40. package/helpers/base64Utils.js +1 -31
  41. package/helpers/base64Utils.mjs +14 -24
  42. package/helpers/decodeLoginToken.js +1 -27
  43. package/helpers/decodeLoginToken.mjs +13 -18
  44. package/helpers/decodeToken.js +1 -39
  45. package/helpers/decodeToken.mjs +20 -31
  46. package/helpers/getApiURL.js +1 -7
  47. package/helpers/getApiURL.mjs +3 -5
  48. package/helpers/getBridgeURL.js +1 -7
  49. package/helpers/getBridgeURL.mjs +3 -5
  50. package/helpers/getDisplayName.js +1 -11
  51. package/helpers/getDisplayName.mjs +3 -8
  52. package/helpers/getMvxApiURL.js +1 -7
  53. package/helpers/getMvxApiURL.mjs +3 -5
  54. package/helpers/getMvxChainId.js +1 -7
  55. package/helpers/getMvxChainId.mjs +3 -5
  56. package/helpers/getMvxExplorerAddress.js +1 -7
  57. package/helpers/getMvxExplorerAddress.mjs +3 -5
  58. package/helpers/index.d.ts +2 -0
  59. package/helpers/index.js +1 -22
  60. package/helpers/index.mjs +24 -20
  61. package/helpers/safeImageUrl.d.ts +1 -0
  62. package/helpers/safeImageUrl.js +2 -0
  63. package/helpers/safeImageUrl.mjs +13 -0
  64. package/helpers/serializeTransaction.js +1 -8
  65. package/helpers/serializeTransaction.mjs +3 -5
  66. package/helpers/tests/assertRateConfirmationMatchesIntent.spec.d.ts +1 -0
  67. package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +2 -0
  68. package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +52 -0
  69. package/helpers/tests/base64Utils.spec.js +1 -29
  70. package/helpers/tests/base64Utils.spec.mjs +11 -24
  71. package/helpers/tests/decodeLoginToken.spec.js +1 -34
  72. package/helpers/tests/decodeLoginToken.spec.mjs +13 -24
  73. package/helpers/tests/decodeToken.spec.js +1 -27
  74. package/helpers/tests/decodeToken.spec.mjs +7 -12
  75. package/helpers/tests/safeImageUrl.spec.d.ts +1 -0
  76. package/helpers/tests/safeImageUrl.spec.js +2 -0
  77. package/helpers/tests/safeImageUrl.spec.mjs +32 -0
  78. package/helpers/tests/serializeTransaction.spec.d.ts +1 -0
  79. package/helpers/tests/serializeTransaction.spec.js +2 -0
  80. package/helpers/tests/serializeTransaction.spec.mjs +24 -0
  81. package/index.js +1 -228
  82. package/index.mjs +196 -192
  83. package/package.json +14 -9
  84. package/react.esm-B0AMOHxa.js +73 -0
  85. package/react.esm-BxvJJ86Q.mjs +9949 -0
  86. package/reactjs/adapters/SuiAdapter.d.ts +14 -0
  87. package/reactjs/adapters/SuiAdapter.js +1 -349
  88. package/reactjs/adapters/SuiAdapter.mjs +171 -199
  89. package/reactjs/components/AccountAddress/AccountAddress.js +1 -31
  90. package/reactjs/components/AccountAddress/AccountAddress.mjs +16 -16
  91. package/reactjs/components/AccountAddress/index.js +1 -4
  92. package/reactjs/components/AccountAddress/index.mjs +2 -2
  93. package/reactjs/components/AmountCard/AmountCard.js +1 -33
  94. package/reactjs/components/AmountCard/AmountCard.mjs +19 -21
  95. package/reactjs/components/AmountCard/index.js +1 -4
  96. package/reactjs/components/AmountCard/index.mjs +2 -2
  97. package/reactjs/components/AmountInput/AmountInput.js +1 -71
  98. package/reactjs/components/AmountInput/AmountInput.mjs +42 -46
  99. package/reactjs/components/AmountInput/index.js +1 -4
  100. package/reactjs/components/AmountInput/index.mjs +2 -2
  101. package/reactjs/components/BridgeForm/BridgeForm.d.ts +9 -0
  102. package/reactjs/components/BridgeForm/BridgeForm.js +1 -89
  103. package/reactjs/components/BridgeForm/BridgeForm.mjs +72 -79
  104. package/reactjs/components/BridgeForm/Deposit.js +1 -673
  105. package/reactjs/components/BridgeForm/Deposit.mjs +381 -503
  106. package/reactjs/components/BridgeForm/Transfer.js +1 -559
  107. package/reactjs/components/BridgeForm/Transfer.mjs +316 -427
  108. package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -78
  109. package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +47 -70
  110. package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -58
  111. package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +36 -47
  112. package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -266
  113. package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +163 -231
  114. package/reactjs/components/BridgeForm/index.js +1 -4
  115. package/reactjs/components/BridgeForm/index.mjs +2 -2
  116. package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -76
  117. package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +35 -65
  118. package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -367
  119. package/reactjs/components/BridgeHistory/BridgeHistory.mjs +177 -193
  120. package/reactjs/components/BridgeHistory/index.js +1 -4
  121. package/reactjs/components/BridgeHistory/index.mjs +2 -2
  122. package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -150
  123. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +99 -115
  124. package/reactjs/components/Connect/BridgeConnectButton.js +1 -34
  125. package/reactjs/components/Connect/BridgeConnectButton.mjs +20 -19
  126. package/reactjs/components/Connect/ChainSelectConnect.js +1 -144
  127. package/reactjs/components/Connect/ChainSelectConnect.mjs +70 -83
  128. package/reactjs/components/Connect/CustomConnectButton.js +1 -40
  129. package/reactjs/components/Connect/CustomConnectButton.mjs +24 -30
  130. package/reactjs/components/Connect/MvxAccountDisplay.js +1 -97
  131. package/reactjs/components/Connect/MvxAccountDisplay.mjs +47 -50
  132. package/reactjs/components/Connect/MvxConnectButton.js +1 -43
  133. package/reactjs/components/Connect/MvxConnectButton.mjs +35 -40
  134. package/reactjs/components/Connect/SwitchChainButton.js +1 -29
  135. package/reactjs/components/Connect/SwitchChainButton.mjs +15 -18
  136. package/reactjs/components/Connect/index.js +1 -16
  137. package/reactjs/components/Connect/index.mjs +14 -14
  138. package/reactjs/components/CopyButton/CopyButton.js +1 -46
  139. package/reactjs/components/CopyButton/CopyButton.mjs +33 -36
  140. package/reactjs/components/CopyButton/index.js +1 -4
  141. package/reactjs/components/CopyButton/index.mjs +2 -2
  142. package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -38
  143. package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -32
  144. package/reactjs/components/CopyButton/utils/index.js +1 -4
  145. package/reactjs/components/CopyButton/utils/index.mjs +2 -2
  146. package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -90
  147. package/reactjs/components/DisplayAmount/DisplayAmount.mjs +68 -75
  148. package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -39
  149. package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +26 -33
  150. package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -61
  151. package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +38 -46
  152. package/reactjs/components/DisplayAmount/index.js +1 -4
  153. package/reactjs/components/DisplayAmount/index.mjs +2 -2
  154. package/reactjs/components/DisplayAmount/utils/index.js +1 -4
  155. package/reactjs/components/DisplayAmount/utils/index.mjs +2 -2
  156. package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -21
  157. package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +9 -13
  158. package/reactjs/components/Error/Error.js +1 -66
  159. package/reactjs/components/Error/Error.mjs +29 -29
  160. package/reactjs/components/Error/index.js +1 -4
  161. package/reactjs/components/Error/index.mjs +2 -2
  162. package/reactjs/components/SmallLoader/SmallLoader.js +1 -21
  163. package/reactjs/components/SmallLoader/SmallLoader.mjs +13 -18
  164. package/reactjs/components/SmallLoader/index.js +1 -4
  165. package/reactjs/components/SmallLoader/index.mjs +2 -2
  166. package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -30
  167. package/reactjs/components/ToggleDirection/ToggleDirection.mjs +22 -28
  168. package/reactjs/components/TokenSelector/TokenSelector.js +1 -172
  169. package/reactjs/components/TokenSelector/TokenSelector.mjs +98 -118
  170. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -94
  171. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +48 -57
  172. package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -51
  173. package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +45 -44
  174. package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -18
  175. package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +9 -14
  176. package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -6
  177. package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +2 -4
  178. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -39
  179. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +22 -18
  180. package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -40
  181. package/reactjs/components/TokenSelector/components/SelectContainer.mjs +36 -38
  182. package/reactjs/components/TokenSelector/components/SelectContent.js +1 -136
  183. package/reactjs/components/TokenSelector/components/SelectContent.mjs +79 -103
  184. package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -28
  185. package/reactjs/components/TokenSelector/components/SelectedOption.mjs +22 -24
  186. package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -81
  187. package/reactjs/components/TokenSelector/components/TokenIcon.mjs +52 -57
  188. package/reactjs/components/TokenSelector/components/TokenItem.js +1 -80
  189. package/reactjs/components/TokenSelector/components/TokenItem.mjs +41 -54
  190. package/reactjs/components/TokenSelector/components/TokenList.js +1 -23
  191. package/reactjs/components/TokenSelector/components/TokenList.mjs +19 -21
  192. package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -25
  193. package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +14 -15
  194. package/reactjs/components/TokenSelector/index.js +1 -4
  195. package/reactjs/components/TokenSelector/index.mjs +2 -2
  196. package/reactjs/components/TransactionToast/TransactionToast.js +1 -53
  197. package/reactjs/components/TransactionToast/TransactionToast.mjs +27 -28
  198. package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -20
  199. package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +16 -18
  200. package/reactjs/components/TransactionToast/index.js +1 -6
  201. package/reactjs/components/TransactionToast/index.mjs +4 -4
  202. package/reactjs/components/TrimAddress/TrimAddress.js +1 -27
  203. package/reactjs/components/TrimAddress/TrimAddress.mjs +19 -24
  204. package/reactjs/components/TrimAddress/index.js +1 -4
  205. package/reactjs/components/TrimAddress/index.mjs +2 -2
  206. package/reactjs/components/base/MxButton/MxButton.js +1 -71
  207. package/reactjs/components/base/MxButton/MxButton.mjs +46 -46
  208. package/reactjs/components/base/MxButton/index.js +1 -4
  209. package/reactjs/components/base/MxButton/index.mjs +2 -2
  210. package/reactjs/components/base/MxCard/MxCard.js +1 -54
  211. package/reactjs/components/base/MxCard/MxCard.mjs +34 -34
  212. package/reactjs/components/base/MxCard/index.js +1 -4
  213. package/reactjs/components/base/MxCard/index.mjs +2 -2
  214. package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -28
  215. package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +24 -26
  216. package/reactjs/components/base/MxCircleLoader/index.js +1 -4
  217. package/reactjs/components/base/MxCircleLoader/index.mjs +2 -2
  218. package/reactjs/components/base/MxLink/MxLink.js +1 -70
  219. package/reactjs/components/base/MxLink/MxLink.mjs +44 -46
  220. package/reactjs/components/base/MxLink/index.js +1 -4
  221. package/reactjs/components/base/MxLink/index.mjs +2 -2
  222. package/reactjs/components/base/MxSearch/MxSearch.js +1 -69
  223. package/reactjs/components/base/MxSearch/MxSearch.mjs +37 -41
  224. package/reactjs/components/base/MxSearch/index.js +1 -4
  225. package/reactjs/components/base/MxSearch/index.mjs +2 -2
  226. package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -78
  227. package/reactjs/components/base/MxSlideover/MxSlideover.mjs +72 -74
  228. package/reactjs/components/base/MxSlideover/index.js +1 -4
  229. package/reactjs/components/base/MxSlideover/index.mjs +2 -2
  230. package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -163
  231. package/reactjs/components/base/MxTooltip/MxTooltip.mjs +92 -135
  232. package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -33
  233. package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +29 -31
  234. package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -4
  235. package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -2
  236. package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -27
  237. package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +23 -25
  238. package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -4
  239. package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +2 -2
  240. package/reactjs/components/base/MxTooltip/components/index.js +1 -6
  241. package/reactjs/components/base/MxTooltip/components/index.mjs +4 -4
  242. package/reactjs/components/base/MxTooltip/index.js +1 -4
  243. package/reactjs/components/base/MxTooltip/index.mjs +2 -2
  244. package/reactjs/components/base/index.js +1 -14
  245. package/reactjs/components/base/index.mjs +12 -12
  246. package/reactjs/components/index.js +1 -54
  247. package/reactjs/components/index.mjs +52 -52
  248. package/reactjs/constants/chains.js +1 -54
  249. package/reactjs/constants/chains.mjs +33 -52
  250. package/reactjs/constants/index.js +1 -13
  251. package/reactjs/constants/index.mjs +9 -10
  252. package/reactjs/context/Web3AppProvider.js +1 -40
  253. package/reactjs/context/Web3AppProvider.mjs +34 -34
  254. package/reactjs/context/queryClient.js +1 -11
  255. package/reactjs/context/queryClient.mjs +5 -8
  256. package/reactjs/context/useWeb3App.js +1 -12
  257. package/reactjs/context/useWeb3App.mjs +7 -8
  258. package/reactjs/helpers/index.js +1 -6
  259. package/reactjs/helpers/index.mjs +4 -4
  260. package/reactjs/helpers/resolveBridgeApiChainId.js +1 -40
  261. package/reactjs/helpers/resolveBridgeApiChainId.mjs +21 -34
  262. package/reactjs/hooks/index.js +1 -35
  263. package/reactjs/hooks/index.mjs +33 -33
  264. package/reactjs/hooks/tests/useGenericSignMessage.spec.d.ts +1 -0
  265. package/reactjs/hooks/tests/useGenericSignMessage.spec.js +2 -0
  266. package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +52 -0
  267. package/reactjs/hooks/tests/useSignTransaction.spec.d.ts +1 -0
  268. package/reactjs/hooks/tests/useSignTransaction.spec.js +2 -0
  269. package/reactjs/hooks/tests/useSignTransaction.spec.mjs +156 -0
  270. package/reactjs/hooks/useAccount.js +1 -13
  271. package/reactjs/hooks/useAccount.mjs +7 -8
  272. package/reactjs/hooks/useBalances.js +1 -53
  273. package/reactjs/hooks/useBalances.mjs +28 -40
  274. package/reactjs/hooks/useBridgeApiChainId.js +1 -13
  275. package/reactjs/hooks/useBridgeApiChainId.mjs +9 -9
  276. package/reactjs/hooks/useBridgeFormik.js +1 -162
  277. package/reactjs/hooks/useBridgeFormik.mjs +110 -150
  278. package/reactjs/hooks/useDebounce.js +1 -13
  279. package/reactjs/hooks/useDebounce.mjs +8 -10
  280. package/reactjs/hooks/useFetchBridgeData.js +1 -45
  281. package/reactjs/hooks/useFetchBridgeData.mjs +37 -38
  282. package/reactjs/hooks/useFetchTokens.js +1 -113
  283. package/reactjs/hooks/useFetchTokens.mjs +80 -106
  284. package/reactjs/hooks/useGenericSignMessage.js +1 -55
  285. package/reactjs/hooks/useGenericSignMessage.mjs +47 -47
  286. package/reactjs/hooks/useGetChainId.js +1 -11
  287. package/reactjs/hooks/useGetChainId.mjs +7 -8
  288. package/reactjs/hooks/useResolveTokenChain.js +1 -20
  289. package/reactjs/hooks/useResolveTokenChain.mjs +11 -14
  290. package/reactjs/hooks/useSendTransactions.js +1 -25
  291. package/reactjs/hooks/useSendTransactions.mjs +19 -23
  292. package/reactjs/hooks/useSignTransaction.js +1 -86
  293. package/reactjs/hooks/useSignTransaction.mjs +59 -59
  294. package/reactjs/hooks/useSuiConnect.js +1 -86
  295. package/reactjs/hooks/useSuiConnect.mjs +52 -70
  296. package/reactjs/hooks/validation/index.js +1 -10
  297. package/reactjs/hooks/validation/index.mjs +8 -8
  298. package/reactjs/hooks/validation/useAmountSchema.js +1 -32
  299. package/reactjs/hooks/validation/useAmountSchema.mjs +8 -11
  300. package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -26
  301. package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -6
  302. package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -37
  303. package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -29
  304. package/reactjs/hooks/validation/useTestIsConnected.js +1 -27
  305. package/reactjs/hooks/validation/useTestIsConnected.mjs +13 -19
  306. package/reactjs/index.js +1 -190
  307. package/reactjs/index.mjs +154 -154
  308. package/reactjs/init/index.js +1 -5
  309. package/reactjs/init/index.mjs +3 -3
  310. package/reactjs/init/init.d.ts +1 -0
  311. package/reactjs/init/init.js +1 -139
  312. package/reactjs/init/init.mjs +59 -72
  313. package/reactjs/queries/index.js +1 -17
  314. package/reactjs/queries/index.mjs +15 -15
  315. package/reactjs/queries/useCheckAccount.query.js +1 -39
  316. package/reactjs/queries/useCheckAccount.query.mjs +29 -33
  317. package/reactjs/queries/useGetAllTokens.query.js +1 -35
  318. package/reactjs/queries/useGetAllTokens.query.mjs +26 -30
  319. package/reactjs/queries/useGetChains.query.js +1 -34
  320. package/reactjs/queries/useGetChains.query.mjs +26 -28
  321. package/reactjs/queries/useGetHistory.query.d.ts +1 -1
  322. package/reactjs/queries/useGetHistory.query.js +1 -68
  323. package/reactjs/queries/useGetHistory.query.mjs +55 -58
  324. package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +1 -1
  325. package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -71
  326. package/reactjs/queries/useGetMvxTokensBalances.query.mjs +40 -53
  327. package/reactjs/queries/useGetNonMvxTokensBalances.query.d.ts +1 -1
  328. package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -81
  329. package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +51 -59
  330. package/reactjs/queries/useGetRate.mutation.js +1 -18
  331. package/reactjs/queries/useGetRate.mutation.mjs +12 -15
  332. package/reactjs/reexports.js +1 -48
  333. package/reactjs/reexports.mjs +13 -13
  334. package/reactjs/utils/delay.js +1 -6
  335. package/reactjs/utils/delay.mjs +3 -3
  336. package/reactjs/utils/formatAmount.js +1 -23
  337. package/reactjs/utils/formatAmount.mjs +16 -17
  338. package/reactjs/utils/getCleanStringAmount.js +1 -11
  339. package/reactjs/utils/getCleanStringAmount.mjs +6 -8
  340. package/reactjs/utils/getCompletePathname.js +1 -5
  341. package/reactjs/utils/getCompletePathname.mjs +3 -3
  342. package/reactjs/utils/getInitialTokens.js +1 -12
  343. package/reactjs/utils/getInitialTokens.mjs +6 -7
  344. package/reactjs/utils/hasEnoughFunds.js +1 -19
  345. package/reactjs/utils/hasEnoughFunds.mjs +11 -14
  346. package/reactjs/utils/index.js +1 -26
  347. package/reactjs/utils/index.mjs +24 -24
  348. package/reactjs/utils/isStringFloat.js +1 -21
  349. package/reactjs/utils/isStringFloat.mjs +11 -18
  350. package/reactjs/utils/mxClsx.js +1 -8
  351. package/reactjs/utils/mxClsx.mjs +4 -6
  352. package/reactjs/utils/pipe.js +1 -25
  353. package/reactjs/utils/pipe.mjs +13 -17
  354. package/reactjs/utils/removeCommas.js +1 -6
  355. package/reactjs/utils/removeCommas.mjs +2 -4
  356. package/reactjs/utils/roundAmount.js +1 -40
  357. package/reactjs/utils/roundAmount.mjs +16 -36
  358. package/reactjs/utils/testNumber.js +1 -4
  359. package/reactjs/utils/testNumber.mjs +2 -2
  360. package/store/inMemoryStore.js +1 -39
  361. package/store/inMemoryStore.mjs +17 -21
  362. package/style.css +1 -2274
  363. package/types/chainType.js +1 -11
  364. package/types/chainType.mjs +2 -9
  365. package/types/errors.d.ts +3 -0
  366. package/types/errors.js +2 -0
  367. package/types/errors.mjs +8 -0
  368. package/types/providerType.js +1 -9
  369. package/types/providerType.mjs +2 -7
  370. package/types/transaction.d.ts +2 -0
  371. package/all-networks-EJIVYZ_i.mjs +0 -4
  372. package/all-networks-NYACMyeN.js +0 -4
  373. package/default-BYtXv70Z.mjs +0 -4
  374. package/default-H3AbmzFV.js +0 -4
  375. package/reactjs/hooks/useSignTransaction.d.ts +0 -511
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ "use strict";const i="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_800_5975)'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='%23627EEA'/%3e%3cg%20clip-path='url(%23clip1_800_5975)'%3e%3cpath%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016Z'%20fill='%23627EEA'/%3e%3cpath%20d='M8.24902%202V6.435L11.9975%208.11L8.24902%202Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%202L4.5%208.11L8.249%206.435V2Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.9841V13.9976L12%208.80811L8.24902%2010.9841Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%2013.9976V10.9836L4.5%208.80811L8.249%2013.9976Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.2865L11.9975%208.11004L8.24902%206.43604V10.2865Z'%20fill='white'%20fill-opacity='0.2'/%3e%3cpath%20d='M4.5%208.11004L8.249%2010.2865V6.43604L4.5%208.11004Z'%20fill='white'%20fill-opacity='0.602'/%3e%3c/g%3e%3c/g%3e%3crect%20x='8'%20y='8'%20width='16'%20height='16'%20rx='4'%20fill='%23F0B90B'/%3e%3cpath%20d='M12.703%2015.9785L11.3515%2017.3252L10%2015.9785L11.3515%2014.6319L12.703%2015.9785ZM16%2012.6933L18.3168%2015.0166L19.6683%2013.67L17.3515%2011.3466L16%2010L14.6485%2011.3466L12.3168%2013.67L13.6683%2015.0166L16%2012.6933ZM20.6485%2014.6319L19.297%2015.9785L20.6485%2017.3252C21.1763%2016.7993%2021.4722%2016.5044%2022%2015.9785L20.6485%2014.6319ZM16%2019.2489L13.6832%2016.9404L12.3168%2018.2871L14.6337%2020.5956L15.9852%2021.9422L17.3366%2020.5956L19.6683%2018.2871L18.3168%2016.9404L16%2019.2489ZM16%2017.3252L17.3515%2015.9785L16%2014.6319L14.6485%2015.9785L16%2017.3252Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_800_5975'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_800_5975'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";exports.AllNetworks=i;
@@ -0,0 +1,4 @@
1
+ const i = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_800_5975)'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='%23627EEA'/%3e%3cg%20clip-path='url(%23clip1_800_5975)'%3e%3cpath%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016Z'%20fill='%23627EEA'/%3e%3cpath%20d='M8.24902%202V6.435L11.9975%208.11L8.24902%202Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%202L4.5%208.11L8.249%206.435V2Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.9841V13.9976L12%208.80811L8.24902%2010.9841Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%2013.9976V10.9836L4.5%208.80811L8.249%2013.9976Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.2865L11.9975%208.11004L8.24902%206.43604V10.2865Z'%20fill='white'%20fill-opacity='0.2'/%3e%3cpath%20d='M4.5%208.11004L8.249%2010.2865V6.43604L4.5%208.11004Z'%20fill='white'%20fill-opacity='0.602'/%3e%3c/g%3e%3c/g%3e%3crect%20x='8'%20y='8'%20width='16'%20height='16'%20rx='4'%20fill='%23F0B90B'/%3e%3cpath%20d='M12.703%2015.9785L11.3515%2017.3252L10%2015.9785L11.3515%2014.6319L12.703%2015.9785ZM16%2012.6933L18.3168%2015.0166L19.6683%2013.67L17.3515%2011.3466L16%2010L14.6485%2011.3466L12.3168%2013.67L13.6683%2015.0166L16%2012.6933ZM20.6485%2014.6319L19.297%2015.9785L20.6485%2017.3252C21.1763%2016.7993%2021.4722%2016.5044%2022%2015.9785L20.6485%2014.6319ZM16%2019.2489L13.6832%2016.9404L12.3168%2018.2871L14.6337%2020.5956L15.9852%2021.9422L17.3366%2020.5956L19.6683%2018.2871L18.3168%2016.9404L16%2019.2489ZM16%2017.3252L17.3515%2015.9785L16%2014.6319L14.6485%2015.9785L16%2017.3252Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_800_5975'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_800_5975'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
2
+ export {
3
+ i as A
4
+ };
@@ -1,22 +1,2 @@
1
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;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("axios");async function a({url:e,walletAddress:c,chainId:t,nativeAuthToken:n}){const o={baseURL:e,headers:{Authorization:`Bearer ${n}`}};return await r.get(`/user/checkAccount?walletAddress=${c}&chainId=${t}`,o)}exports.checkAccount=a;
@@ -1,21 +1,21 @@
1
- import axios from "axios";
2
- async function checkAccount({
3
- url,
4
- walletAddress,
5
- chainId,
6
- nativeAuthToken
1
+ import a from "axios";
2
+ async function i({
3
+ url: c,
4
+ walletAddress: e,
5
+ chainId: t,
6
+ nativeAuthToken: o
7
7
  }) {
8
- const config = {
9
- baseURL: url,
8
+ const r = {
9
+ baseURL: c,
10
10
  headers: {
11
- Authorization: `Bearer ${nativeAuthToken}`
11
+ Authorization: `Bearer ${o}`
12
12
  }
13
13
  };
14
- return await axios.get(
15
- `/user/checkAccount?walletAddress=${walletAddress}&chainId=${chainId}`,
16
- config
14
+ return await a.get(
15
+ `/user/checkAccount?walletAddress=${e}&chainId=${t}`,
16
+ r
17
17
  );
18
18
  }
19
19
  export {
20
- checkAccount
20
+ i as checkAccount
21
21
  };
@@ -1,30 +1,2 @@
1
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 confirmRate({
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
- if (config.headers.set) {
23
- config.headers.set({
24
- ...config.headers,
25
- origin: (decodedToken == null ? void 0 : decodedToken.origin) ?? ""
26
- });
27
- }
28
- return await axios.post(`/rate/confirm`, body, config);
29
- }
30
- exports.confirmRate = confirmRate;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),n=require("../helpers/decodeToken.js");async function c({url:t,nativeAuthToken:r,body:s}){var o;const e={baseURL:t,headers:{Authorization:`Bearer ${r}`}};r||(o=e.headers)==null||delete o.Authorization;const i=await n.decodeToken(r);return e.headers.set&&e.headers.set({...e.headers,origin:(i==null?void 0:i.origin)??""}),await a.post("/rate/confirm",s,e)}exports.confirmRate=c;
@@ -1,29 +1,24 @@
1
- import axios from "axios";
2
- import { decodeToken } from "../helpers/decodeToken.mjs";
3
- async function confirmRate({
4
- url,
5
- nativeAuthToken,
6
- body
1
+ import s from "axios";
2
+ import { decodeToken as n } from "../helpers/decodeToken.mjs";
3
+ async function m({
4
+ url: a,
5
+ nativeAuthToken: e,
6
+ body: t
7
7
  }) {
8
- var _a;
9
- const config = {
10
- baseURL: url,
8
+ var o;
9
+ const r = {
10
+ baseURL: a,
11
11
  headers: {
12
- Authorization: `Bearer ${nativeAuthToken}`
12
+ Authorization: `Bearer ${e}`
13
13
  }
14
14
  };
15
- if (!nativeAuthToken) {
16
- (_a = config.headers) == null ? true : delete _a.Authorization;
17
- }
18
- const decodedToken = await decodeToken(nativeAuthToken);
19
- if (config.headers.set) {
20
- config.headers.set({
21
- ...config.headers,
22
- origin: (decodedToken == null ? void 0 : decodedToken.origin) ?? ""
23
- });
24
- }
25
- return await axios.post(`/rate/confirm`, body, config);
15
+ e || (o = r.headers) == null || delete o.Authorization;
16
+ const i = await n(e);
17
+ return r.headers.set && r.headers.set({
18
+ ...r.headers,
19
+ origin: (i == null ? void 0 : i.origin) ?? ""
20
+ }), await s.post("/rate/confirm", t, r);
26
21
  }
27
22
  export {
28
- confirmRate
23
+ m as confirmRate
29
24
  };
package/api/getChains.js CHANGED
@@ -1,18 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const axios = require("axios");
5
- async function getChains({
6
- url,
7
- nativeAuthToken,
8
- bridgeOnly
9
- }) {
10
- const config = {
11
- baseURL: url,
12
- headers: {
13
- Authorization: `Bearer ${nativeAuthToken}`
14
- }
15
- };
16
- return axios.get(`/chains?isBridge=${bridgeOnly}`, config);
17
- }
18
- exports.getChains = getChains;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("axios");async function s({url:e,nativeAuthToken:n,bridgeOnly:i}){const t={baseURL:e,headers:{Authorization:`Bearer ${n}`}};return r.get(`/chains?isBridge=${i}`,t)}exports.getChains=s;
package/api/getChains.mjs CHANGED
@@ -1,17 +1,17 @@
1
- import axios from "axios";
2
- async function getChains({
3
- url,
4
- nativeAuthToken,
5
- bridgeOnly
1
+ import o from "axios";
2
+ async function a({
3
+ url: e,
4
+ nativeAuthToken: i,
5
+ bridgeOnly: r
6
6
  }) {
7
- const config = {
8
- baseURL: url,
7
+ const n = {
8
+ baseURL: e,
9
9
  headers: {
10
- Authorization: `Bearer ${nativeAuthToken}`
10
+ Authorization: `Bearer ${i}`
11
11
  }
12
12
  };
13
- return axios.get(`/chains?isBridge=${bridgeOnly}`, config);
13
+ return o.get(`/chains?isBridge=${r}`, n);
14
14
  }
15
15
  export {
16
- getChains
16
+ a as getChains
17
17
  };
package/api/getRate.js CHANGED
@@ -1,28 +1,2 @@
1
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 getRate({
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(`/rate`, body, config);
27
- }
28
- exports.getRate = getRate;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios"),n=require("../helpers/decodeToken.js");async function c({url:i,nativeAuthToken:r,body:a}){var o;const e={baseURL:i,headers:{Authorization:`Bearer ${r}`}};r||(o=e.headers)==null||delete o.Authorization;const t=await n.decodeToken(r);return e.headers={...e.headers,origin:t==null?void 0:t.origin},await s.post("/rate",a,e)}exports.getRate=c;
package/api/getRate.mjs CHANGED
@@ -1,27 +1,24 @@
1
- import axios from "axios";
2
- import { decodeToken } from "../helpers/decodeToken.mjs";
3
- async function getRate({
4
- url,
5
- nativeAuthToken,
6
- body
1
+ import s from "axios";
2
+ import { decodeToken as n } from "../helpers/decodeToken.mjs";
3
+ async function d({
4
+ url: i,
5
+ nativeAuthToken: e,
6
+ body: t
7
7
  }) {
8
- var _a;
9
- const config = {
10
- baseURL: url,
8
+ var a;
9
+ const r = {
10
+ baseURL: i,
11
11
  headers: {
12
- Authorization: `Bearer ${nativeAuthToken}`
12
+ Authorization: `Bearer ${e}`
13
13
  }
14
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(`/rate`, body, config);
15
+ e || (a = r.headers) == null || delete a.Authorization;
16
+ const o = await n(e);
17
+ return r.headers = {
18
+ ...r.headers,
19
+ origin: o == null ? void 0 : o.origin
20
+ }, await s.post("/rate", t, r);
24
21
  }
25
22
  export {
26
- getRate
23
+ d as getRate
27
24
  };
package/api/getTokens.js CHANGED
@@ -1,23 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const axios = require("axios");
5
- async function getTokens({
6
- url,
7
- chainId,
8
- nativeAuthToken,
9
- bridgeOnly
10
- }) {
11
- const config = {
12
- baseURL: url,
13
- headers: {
14
- Authorization: `Bearer ${nativeAuthToken}`
15
- }
16
- };
17
- const endpoint = chainId ? `/tokens/${chainId}` : "/tokens";
18
- return await axios.get(
19
- `${endpoint}?isBridge=${bridgeOnly}`,
20
- config
21
- );
22
- }
23
- exports.getTokens = getTokens;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios");async function a({url:t,chainId:e,nativeAuthToken:n,bridgeOnly:o}){const s={baseURL:t,headers:{Authorization:`Bearer ${n}`}},r=e?`/tokens/${e}`:"/tokens";return await i.get(`${r}?isBridge=${o}`,s)}exports.getTokens=a;
package/api/getTokens.mjs CHANGED
@@ -1,22 +1,21 @@
1
- import axios from "axios";
2
- async function getTokens({
3
- url,
4
- chainId,
5
- nativeAuthToken,
6
- bridgeOnly
1
+ import i from "axios";
2
+ async function c({
3
+ url: o,
4
+ chainId: e,
5
+ nativeAuthToken: t,
6
+ bridgeOnly: n
7
7
  }) {
8
- const config = {
9
- baseURL: url,
8
+ const r = {
9
+ baseURL: o,
10
10
  headers: {
11
- Authorization: `Bearer ${nativeAuthToken}`
11
+ Authorization: `Bearer ${t}`
12
12
  }
13
- };
14
- const endpoint = chainId ? `/tokens/${chainId}` : "/tokens";
15
- return await axios.get(
16
- `${endpoint}?isBridge=${bridgeOnly}`,
17
- config
13
+ }, s = e ? `/tokens/${e}` : "/tokens";
14
+ return await i.get(
15
+ `${s}?isBridge=${n}`,
16
+ r
18
17
  );
19
18
  }
20
19
  export {
21
- getTokens
20
+ c as getTokens
22
21
  };
@@ -1,22 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const axios = require("axios");
5
- async function getTokensBalances({
6
- url,
7
- userAddress,
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
- `/tokens/balances/${userAddress}/${chainId}`,
19
- config
20
- );
21
- }
22
- exports.getTokensBalances = getTokensBalances;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios");async function r({url:e,userAddress:n,chainId:t,nativeAuthToken:a}){const o={baseURL:e,headers:{Authorization:`Bearer ${a}`}};return await s.get(`/tokens/balances/${n}/${t}`,o)}exports.getTokensBalances=r;
@@ -1,21 +1,21 @@
1
- import axios from "axios";
2
- async function getTokensBalances({
3
- url,
4
- userAddress,
5
- chainId,
6
- nativeAuthToken
1
+ import r from "axios";
2
+ async function i({
3
+ url: e,
4
+ userAddress: a,
5
+ chainId: n,
6
+ nativeAuthToken: o
7
7
  }) {
8
- const config = {
9
- baseURL: url,
8
+ const t = {
9
+ baseURL: e,
10
10
  headers: {
11
- Authorization: `Bearer ${nativeAuthToken}`
11
+ Authorization: `Bearer ${o}`
12
12
  }
13
13
  };
14
- return await axios.get(
15
- `/tokens/balances/${userAddress}/${chainId}`,
16
- config
14
+ return await r.get(
15
+ `/tokens/balances/${a}/${n}`,
16
+ t
17
17
  );
18
18
  }
19
19
  export {
20
- getTokensBalances
20
+ i as getTokensBalances
21
21
  };
@@ -1,39 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const axios = require("axios");
5
- async function getTransactions({
6
- url,
7
- address,
8
- sender,
9
- provider,
10
- status,
11
- tokenIn,
12
- tokenOut,
13
- nativeAuthToken
14
- }) {
15
- const queryParams = new URLSearchParams({
16
- receiver: address || "",
17
- sender: sender || "",
18
- provider: provider || "",
19
- status: status || "",
20
- tokenIn: tokenIn || "",
21
- tokenOut: tokenOut || ""
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);
38
- }
39
- exports.getTransactions = getTransactions;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("axios");async function m({url:t,address:n,sender:r,provider:s,status:o,tokenIn:a,tokenOut:i,nativeAuthToken:c}){const e=new URLSearchParams({receiver:n||"",sender:r||"",provider:s||"",status:o||"",tokenIn:a||"",tokenOut:i||""}),u=Object.entries(Object.fromEntries(e.entries()));for(const[f,y]of u)y===""&&e.delete(f);const g=`/transactions?${e.toString()}`,d={baseURL:t,headers:{Authorization:`Bearer ${c}`}};return await b.get(g,d)}exports.getTransactions=m;
@@ -1,38 +1,32 @@
1
- import axios from "axios";
2
- async function getTransactions({
3
- url,
4
- address,
5
- sender,
6
- provider,
7
- status,
8
- tokenIn,
9
- tokenOut,
10
- nativeAuthToken
1
+ import p from "axios";
2
+ async function S({
3
+ url: t,
4
+ address: r,
5
+ sender: n,
6
+ provider: o,
7
+ status: s,
8
+ tokenIn: a,
9
+ tokenOut: i,
10
+ nativeAuthToken: c
11
11
  }) {
12
- const queryParams = new URLSearchParams({
13
- receiver: address || "",
14
- sender: sender || "",
15
- provider: provider || "",
16
- status: status || "",
17
- tokenIn: tokenIn || "",
18
- tokenOut: tokenOut || ""
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,
12
+ const e = new URLSearchParams({
13
+ receiver: r || "",
14
+ sender: n || "",
15
+ provider: o || "",
16
+ status: s || "",
17
+ tokenIn: a || "",
18
+ tokenOut: i || ""
19
+ }), u = Object.entries(Object.fromEntries(e.entries()));
20
+ for (const [g, d] of u)
21
+ d === "" && e.delete(g);
22
+ const f = `/transactions?${e.toString()}`, m = {
23
+ baseURL: t,
30
24
  headers: {
31
- Authorization: `Bearer ${nativeAuthToken}`
25
+ Authorization: `Bearer ${c}`
32
26
  }
33
27
  };
34
- return await axios.get(endpointWithParams, config);
28
+ return await p.get(f, m);
35
29
  }
36
30
  export {
37
- getTransactions
31
+ S as getTransactions
38
32
  };
package/api/index.js CHANGED
@@ -1,19 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const api_confirmRate = require("./confirmRate.js");
5
- const api_getChains = require("./getChains.js");
6
- const api_getRate = require("./getRate.js");
7
- const api_getTokens = require("./getTokens.js");
8
- const api_getTokensBalances = require("./getTokensBalances.js");
9
- const api_getTransactions = require("./getTransactions.js");
10
- const api_sendTransactions = require("./sendTransactions.js");
11
- const api_checkAccount = require("./checkAccount.js");
12
- exports.confirmRate = api_confirmRate.confirmRate;
13
- exports.getChains = api_getChains.getChains;
14
- exports.getRate = api_getRate.getRate;
15
- exports.getTokens = api_getTokens.getTokens;
16
- exports.getTokensBalances = api_getTokensBalances.getTokensBalances;
17
- exports.getTransactions = api_getTransactions.getTransactions;
18
- exports.sendTransactions = api_sendTransactions.sendTransactions;
19
- exports.checkAccount = api_checkAccount.checkAccount;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./confirmRate.js"),n=require("./getChains.js"),t=require("./getRate.js"),s=require("./getTokens.js"),a=require("./getTokensBalances.js"),c=require("./getTransactions.js"),i=require("./sendTransactions.js"),o=require("./checkAccount.js");exports.confirmRate=e.confirmRate;exports.getChains=n.getChains;exports.getRate=t.getRate;exports.getTokens=s.getTokens;exports.getTokensBalances=a.getTokensBalances;exports.getTransactions=c.getTransactions;exports.sendTransactions=i.sendTransactions;exports.checkAccount=o.checkAccount;
package/api/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
- import { confirmRate } from "./confirmRate.mjs";
2
- import { getChains } from "./getChains.mjs";
3
- import { getRate } from "./getRate.mjs";
4
- import { getTokens } from "./getTokens.mjs";
5
- import { getTokensBalances } from "./getTokensBalances.mjs";
6
- import { getTransactions } from "./getTransactions.mjs";
7
- import { sendTransactions } from "./sendTransactions.mjs";
8
- import { checkAccount } from "./checkAccount.mjs";
1
+ import { confirmRate as r } from "./confirmRate.mjs";
2
+ import { getChains as n } from "./getChains.mjs";
3
+ import { getRate as f } from "./getRate.mjs";
4
+ import { getTokens as s } from "./getTokens.mjs";
5
+ import { getTokensBalances as p } from "./getTokensBalances.mjs";
6
+ import { getTransactions as g } from "./getTransactions.mjs";
7
+ import { sendTransactions as T } from "./sendTransactions.mjs";
8
+ import { checkAccount as h } from "./checkAccount.mjs";
9
9
  export {
10
- checkAccount,
11
- confirmRate,
12
- getChains,
13
- getRate,
14
- getTokens,
15
- getTokensBalances,
16
- getTransactions,
17
- sendTransactions
10
+ h as checkAccount,
11
+ r as confirmRate,
12
+ n as getChains,
13
+ f as getRate,
14
+ s as getTokens,
15
+ p as getTokensBalances,
16
+ g as getTransactions,
17
+ T as sendTransactions
18
18
  };
@@ -1,33 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const axios = require("axios");
5
- const helpers_serializeTransaction = require("../helpers/serializeTransaction.js");
6
- const sendTransactions = async ({
7
- transactions,
8
- provider,
9
- url,
10
- token,
11
- axiosConfig
12
- }) => {
13
- const config = {
14
- baseURL: url,
15
- headers: {
16
- "Content-Type": "application/json",
17
- Accept: "application/json",
18
- Authorization: `Bearer ${token}`
19
- },
20
- ...axiosConfig
21
- };
22
- return axios.post(
23
- `/transactions`,
24
- {
25
- transactions: transactions.map(
26
- (transaction) => JSON.parse(helpers_serializeTransaction.serializeTransaction(transaction))
27
- ),
28
- provider
29
- },
30
- config
31
- );
32
- };
33
- exports.sendTransactions = sendTransactions;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios"),c=require("../helpers/serializeTransaction.js"),p=async({transactions:n,provider:e,url:s,token:a,axiosConfig:t})=>{const o={baseURL:s,headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},...t};return i.post("/transactions",{transactions:n.map(r=>JSON.parse(c.serializeTransaction(r))),provider:e},o)};exports.sendTransactions=p;
@@ -1,32 +1,32 @@
1
- import axios from "axios";
2
- import { serializeTransaction } from "../helpers/serializeTransaction.mjs";
3
- const sendTransactions = async ({
4
- transactions,
5
- provider,
6
- url,
7
- token,
8
- axiosConfig
1
+ import e from "axios";
2
+ import { serializeTransaction as c } from "../helpers/serializeTransaction.mjs";
3
+ const f = async ({
4
+ transactions: a,
5
+ provider: n,
6
+ url: o,
7
+ token: t,
8
+ axiosConfig: s
9
9
  }) => {
10
- const config = {
11
- baseURL: url,
10
+ const r = {
11
+ baseURL: o,
12
12
  headers: {
13
13
  "Content-Type": "application/json",
14
14
  Accept: "application/json",
15
- Authorization: `Bearer ${token}`
15
+ Authorization: `Bearer ${t}`
16
16
  },
17
- ...axiosConfig
17
+ ...s
18
18
  };
19
- return axios.post(
20
- `/transactions`,
19
+ return e.post(
20
+ "/transactions",
21
21
  {
22
- transactions: transactions.map(
23
- (transaction) => JSON.parse(serializeTransaction(transaction))
22
+ transactions: a.map(
23
+ (i) => JSON.parse(c(i))
24
24
  ),
25
- provider
25
+ provider: n
26
26
  },
27
- config
27
+ r
28
28
  );
29
29
  };
30
30
  export {
31
- sendTransactions
31
+ f as sendTransactions
32
32
  };