@multiversx/sdk-dapp-liquidity 1.1.2-alpha.1 → 1.1.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all-networks-EJIVYZ_i.mjs +4 -0
- package/all-networks-NYACMyeN.js +4 -0
- package/api/checkAccount.d.ts +9 -0
- package/api/checkAccount.js +22 -0
- package/api/checkAccount.mjs +21 -0
- package/api/confirmRate.d.ts +11 -0
- package/api/confirmRate.js +30 -0
- package/api/confirmRate.mjs +29 -0
- package/api/getChains.d.ts +8 -0
- package/api/getChains.js +18 -0
- package/api/getChains.mjs +17 -0
- package/api/getRate.d.ts +10 -0
- package/api/getRate.js +28 -0
- package/api/getRate.mjs +27 -0
- package/api/getTokens.d.ts +9 -0
- package/api/getTokens.js +23 -0
- package/api/getTokens.mjs +22 -0
- package/api/getTokensBalances.d.ts +9 -0
- package/api/getTokensBalances.js +22 -0
- package/api/getTokensBalances.mjs +21 -0
- package/api/getTransactions.d.ts +14 -0
- package/api/getTransactions.js +39 -0
- package/api/getTransactions.mjs +38 -0
- package/api/index.js +21 -0
- package/api/index.mjs +20 -0
- package/api/linkAccount.d.ts +10 -0
- package/api/linkAccount.js +32 -0
- package/api/linkAccount.mjs +31 -0
- package/api/sendTransactions.d.ts +13 -0
- package/api/sendTransactions.js +33 -0
- package/api/sendTransactions.mjs +32 -0
- package/api/tests/confirmRate.spec.d.ts +1 -0
- package/api/tests/confirmRate.spec.js +131 -0
- package/api/tests/confirmRate.spec.mjs +129 -0
- package/api/tests/getChains.spec.d.ts +1 -0
- package/api/tests/getChains.spec.js +44 -0
- package/api/tests/getChains.spec.mjs +42 -0
- package/api/tests/getRate.spec.d.ts +1 -0
- package/api/tests/getRate.spec.js +88 -0
- package/api/tests/getRate.spec.mjs +86 -0
- package/api/tests/getTokens.spec.d.ts +1 -0
- package/api/tests/getTokens.spec.js +69 -0
- package/api/tests/getTokens.spec.mjs +67 -0
- package/api/tests/getTransactions.spec.d.ts +1 -0
- package/api/tests/getTransactions.spec.js +95 -0
- package/api/tests/getTransactions.spec.mjs +93 -0
- package/api/tests/sendTransactions.spec.d.ts +1 -0
- package/api/tests/sendTransactions.spec.js +97 -0
- package/api/tests/sendTransactions.spec.mjs +95 -0
- package/constants/index.d.ts +1 -0
- package/constants/index.js +5 -0
- package/constants/index.mjs +4 -0
- package/default-BYtXv70Z.mjs +4 -0
- package/default-H3AbmzFV.js +4 -0
- package/dto/Chain.dto.d.ts +19 -0
- package/dto/Chain.dto.js +2 -0
- package/dto/Chain.dto.mjs +1 -0
- package/dto/CheckAccount.dto.d.ts +4 -0
- package/dto/CheckAccount.dto.js +2 -0
- package/dto/CheckAccount.dto.mjs +1 -0
- package/dto/ConfirmRate.dto.d.ts +12 -0
- package/dto/ConfirmRate.dto.js +2 -0
- package/dto/ConfirmRate.dto.mjs +1 -0
- package/dto/Token.dto.d.ts +20 -0
- package/dto/Token.dto.js +2 -0
- package/dto/Token.dto.mjs +1 -0
- package/dto/TokenBalance.dto.d.ts +4 -0
- package/dto/TokenBalance.dto.js +2 -0
- package/dto/TokenBalance.dto.mjs +1 -0
- package/dto/Transaction.dto.d.ts +18 -0
- package/dto/Transaction.dto.js +2 -0
- package/dto/Transaction.dto.mjs +1 -0
- package/dto/index.js +2 -0
- package/dto/index.mjs +1 -0
- package/helpers/base64Utils.d.ts +3 -0
- package/helpers/base64Utils.js +32 -0
- package/{src/helpers/base64Utils.ts → helpers/base64Utils.mjs} +11 -16
- package/helpers/decodeLoginToken.d.ts +9 -0
- package/helpers/decodeLoginToken.js +28 -0
- package/{src/helpers/decodeLoginToken.ts → helpers/decodeLoginToken.mjs} +6 -18
- package/helpers/decodeToken.d.ts +11 -0
- package/helpers/decodeToken.js +40 -0
- package/{src/helpers/decodeToken.ts → helpers/decodeToken.mjs} +10 -14
- package/helpers/getApiURL.d.ts +1 -0
- package/helpers/getApiURL.js +8 -0
- package/helpers/getApiURL.mjs +7 -0
- package/helpers/getBridgeURL.d.ts +1 -0
- package/helpers/getBridgeURL.js +8 -0
- package/helpers/getBridgeURL.mjs +7 -0
- package/helpers/getMvxApiURL.d.ts +1 -0
- package/helpers/getMvxApiURL.js +8 -0
- package/helpers/getMvxApiURL.mjs +7 -0
- package/helpers/getMvxChainId.d.ts +1 -0
- package/helpers/getMvxChainId.js +8 -0
- package/helpers/getMvxChainId.mjs +7 -0
- package/helpers/getMvxExplorerAddress.d.ts +1 -0
- package/helpers/getMvxExplorerAddress.js +8 -0
- package/helpers/getMvxExplorerAddress.mjs +7 -0
- package/helpers/index.js +23 -0
- package/helpers/index.mjs +22 -0
- package/helpers/serializeTransaction.d.ts +3 -0
- package/helpers/serializeTransaction.js +9 -0
- package/helpers/serializeTransaction.mjs +8 -0
- package/helpers/tests/base64Utils.spec.d.ts +1 -0
- package/helpers/tests/base64Utils.spec.js +30 -0
- package/helpers/tests/base64Utils.spec.mjs +28 -0
- package/helpers/tests/decodeLoginToken.spec.d.ts +1 -0
- package/helpers/tests/decodeLoginToken.spec.js +35 -0
- package/helpers/tests/decodeLoginToken.spec.mjs +33 -0
- package/helpers/tests/decodeToken.spec.d.ts +1 -0
- package/helpers/tests/decodeToken.spec.js +28 -0
- package/helpers/tests/decodeToken.spec.mjs +26 -0
- package/index.js +223 -0
- package/index.mjs +189 -0
- package/package.json +1 -1
- package/reactjs/components/AccountAddress/AccountAddress.d.ts +6 -0
- package/reactjs/components/AccountAddress/AccountAddress.js +25 -0
- package/reactjs/components/AccountAddress/AccountAddress.mjs +24 -0
- package/reactjs/components/AccountAddress/index.js +5 -0
- package/reactjs/components/AccountAddress/index.mjs +4 -0
- package/reactjs/components/AmountCard/AmountCard.d.ts +6 -0
- package/reactjs/components/AmountCard/AmountCard.js +34 -0
- package/reactjs/components/AmountCard/AmountCard.mjs +33 -0
- package/reactjs/components/AmountCard/index.js +5 -0
- package/reactjs/components/AmountCard/index.mjs +4 -0
- package/reactjs/components/AmountInput/AmountInput.d.ts +13 -0
- package/reactjs/components/AmountInput/AmountInput.js +72 -0
- package/reactjs/components/AmountInput/AmountInput.mjs +71 -0
- package/reactjs/components/AmountInput/index.js +5 -0
- package/reactjs/components/AmountInput/index.mjs +4 -0
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +23 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +90 -0
- package/reactjs/components/BridgeForm/BridgeForm.mjs +89 -0
- package/reactjs/components/BridgeForm/Deposit.d.ts +23 -0
- package/reactjs/components/BridgeForm/Deposit.js +644 -0
- package/reactjs/components/BridgeForm/Deposit.mjs +643 -0
- package/reactjs/components/BridgeForm/Transfer.d.ts +23 -0
- package/reactjs/components/BridgeForm/Transfer.js +561 -0
- package/reactjs/components/BridgeForm/Transfer.mjs +560 -0
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.d.ts +22 -0
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +79 -0
- package/{src/reactjs/components/BridgeForm/hooks/useBridgeAmounts.ts → reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs} +24 -45
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.d.ts +26 -0
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +59 -0
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +58 -0
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.d.ts +87 -0
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +245 -0
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +244 -0
- package/reactjs/components/BridgeForm/index.js +5 -0
- package/reactjs/components/BridgeForm/index.mjs +4 -0
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.d.ts +16 -0
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +59 -0
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +58 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.d.ts +4 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.js +340 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +339 -0
- package/reactjs/components/BridgeHistory/index.js +5 -0
- package/reactjs/components/BridgeHistory/index.mjs +4 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.d.ts +6 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.js +139 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +138 -0
- package/reactjs/components/Connect/BridgeConnectButton.d.ts +7 -0
- package/reactjs/components/Connect/BridgeConnectButton.js +26 -0
- package/reactjs/components/Connect/BridgeConnectButton.mjs +25 -0
- package/reactjs/components/Connect/CustomConnectButton.d.ts +7 -0
- package/reactjs/components/Connect/CustomConnectButton.js +39 -0
- package/reactjs/components/Connect/CustomConnectButton.mjs +38 -0
- package/reactjs/components/Connect/MvxAccountDisplay.d.ts +9 -0
- package/reactjs/components/Connect/MvxAccountDisplay.js +75 -0
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +74 -0
- package/reactjs/components/Connect/MvxConnectButton.d.ts +9 -0
- package/reactjs/components/Connect/MvxConnectButton.js +43 -0
- package/reactjs/components/Connect/MvxConnectButton.mjs +42 -0
- package/reactjs/components/Connect/SwitchChainButton.d.ts +7 -0
- package/reactjs/components/Connect/SwitchChainButton.js +29 -0
- package/reactjs/components/Connect/SwitchChainButton.mjs +28 -0
- package/reactjs/components/Connect/index.js +15 -0
- package/reactjs/components/Connect/index.mjs +14 -0
- package/reactjs/components/CopyButton/CopyButton.d.ts +6 -0
- package/reactjs/components/CopyButton/CopyButton.js +42 -0
- package/reactjs/components/CopyButton/CopyButton.mjs +41 -0
- package/reactjs/components/CopyButton/index.js +5 -0
- package/reactjs/components/CopyButton/index.mjs +4 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.d.ts +1 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +39 -0
- package/{src/reactjs/components/CopyButton/utils/copyToClipboard.ts → reactjs/components/CopyButton/utils/copyToClipboard.mjs} +11 -16
- package/reactjs/components/CopyButton/utils/index.js +5 -0
- package/reactjs/components/CopyButton/utils/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.d.ts +21 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.js +91 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +90 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.d.ts +7 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +40 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +39 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.js +2 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.mjs +1 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.d.ts +14 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +62 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +61 -0
- package/reactjs/components/DisplayAmount/components/index.js +2 -0
- package/reactjs/components/DisplayAmount/components/index.mjs +1 -0
- package/reactjs/components/DisplayAmount/index.js +5 -0
- package/reactjs/components/DisplayAmount/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/utils/index.js +5 -0
- package/reactjs/components/DisplayAmount/utils/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.d.ts +1 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +22 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +21 -0
- package/reactjs/components/Error/Error.d.ts +6 -0
- package/reactjs/components/Error/Error.js +67 -0
- package/reactjs/components/Error/Error.mjs +66 -0
- package/reactjs/components/Error/index.d.ts +1 -0
- package/reactjs/components/Error/index.js +5 -0
- package/reactjs/components/Error/index.mjs +4 -0
- package/reactjs/components/SmallLoader/SmallLoader.d.ts +4 -0
- package/reactjs/components/SmallLoader/SmallLoader.js +22 -0
- package/reactjs/components/SmallLoader/SmallLoader.mjs +21 -0
- package/reactjs/components/SmallLoader/index.js +5 -0
- package/reactjs/components/SmallLoader/index.mjs +4 -0
- package/reactjs/components/ToggleDirection/ToggleDirection.d.ts +3 -0
- package/reactjs/components/ToggleDirection/ToggleDirection.js +23 -0
- package/reactjs/components/ToggleDirection/ToggleDirection.mjs +22 -0
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +17 -0
- package/reactjs/components/TokenSelector/TokenSelector.js +167 -0
- package/reactjs/components/TokenSelector/TokenSelector.mjs +166 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +9 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +94 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +93 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts +12 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +45 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +44 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.d.ts +6 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +19 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +18 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.d.ts +3 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +7 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +6 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.d.ts +4 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +33 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +32 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.d.ts +11 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.js +2 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.mjs +1 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.d.ts +11 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.js +2 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.mjs +1 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.js +41 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +40 -0
- package/reactjs/components/TokenSelector/components/SelectContent.d.ts +11 -0
- package/reactjs/components/TokenSelector/components/SelectContent.js +128 -0
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +127 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.d.ts +5 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.js +29 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +28 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.d.ts +8 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.js +82 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +81 -0
- package/reactjs/components/TokenSelector/components/TokenItem.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/TokenItem.js +69 -0
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +68 -0
- package/reactjs/components/TokenSelector/components/TokenList.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/TokenList.js +21 -0
- package/reactjs/components/TokenSelector/components/TokenList.mjs +20 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.d.ts +9 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +26 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +25 -0
- package/reactjs/components/TokenSelector/index.js +5 -0
- package/reactjs/components/TokenSelector/index.mjs +4 -0
- package/reactjs/components/TransactionToast/TransactionToast.d.ts +9 -0
- package/reactjs/components/TransactionToast/TransactionToast.js +54 -0
- package/reactjs/components/TransactionToast/TransactionToast.mjs +53 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.d.ts +3 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +21 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +20 -0
- package/reactjs/components/TransactionToast/index.js +7 -0
- package/reactjs/components/TransactionToast/index.mjs +6 -0
- package/reactjs/components/TrimAddress/TrimAddress.d.ts +8 -0
- package/reactjs/components/TrimAddress/TrimAddress.js +26 -0
- package/reactjs/components/TrimAddress/TrimAddress.mjs +25 -0
- package/reactjs/components/TrimAddress/index.js +5 -0
- package/reactjs/components/TrimAddress/index.mjs +4 -0
- package/reactjs/components/base/MxButton/MxButton.d.ts +13 -0
- package/reactjs/components/base/MxButton/MxButton.js +72 -0
- package/reactjs/components/base/MxButton/MxButton.mjs +71 -0
- package/reactjs/components/base/MxButton/index.js +5 -0
- package/reactjs/components/base/MxButton/index.mjs +4 -0
- package/reactjs/components/base/MxCard/MxCard.d.ts +10 -0
- package/reactjs/components/base/MxCard/MxCard.js +55 -0
- package/reactjs/components/base/MxCard/MxCard.mjs +54 -0
- package/reactjs/components/base/MxCard/index.js +5 -0
- package/reactjs/components/base/MxCard/index.mjs +4 -0
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.d.ts +4 -0
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +29 -0
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +28 -0
- package/reactjs/components/base/MxCircleLoader/index.d.ts +1 -0
- package/reactjs/components/base/MxCircleLoader/index.js +5 -0
- package/reactjs/components/base/MxCircleLoader/index.mjs +4 -0
- package/reactjs/components/base/MxLink/MxLink.d.ts +14 -0
- package/reactjs/components/base/MxLink/MxLink.js +71 -0
- package/reactjs/components/base/MxLink/MxLink.mjs +70 -0
- package/reactjs/components/base/MxLink/index.js +5 -0
- package/reactjs/components/base/MxLink/index.mjs +4 -0
- package/reactjs/components/base/MxSearch/MxSearch.d.ts +10 -0
- package/reactjs/components/base/MxSearch/MxSearch.js +70 -0
- package/reactjs/components/base/MxSearch/MxSearch.mjs +69 -0
- package/reactjs/components/base/MxSearch/index.js +5 -0
- package/reactjs/components/base/MxSearch/index.mjs +4 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.d.ts +10 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.js +79 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +78 -0
- package/reactjs/components/base/MxSlideover/index.js +5 -0
- package/reactjs/components/base/MxSlideover/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.d.ts +23 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.js +164 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +163 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.d.ts +11 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +34 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +33 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +5 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.d.ts +13 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +28 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +27 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +5 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/components/index.js +7 -0
- package/reactjs/components/base/MxTooltip/components/index.mjs +6 -0
- package/reactjs/components/base/MxTooltip/index.js +5 -0
- package/reactjs/components/base/MxTooltip/index.mjs +4 -0
- package/reactjs/components/base/index.js +15 -0
- package/reactjs/components/base/index.mjs +14 -0
- package/reactjs/components/index.js +53 -0
- package/reactjs/components/index.mjs +52 -0
- package/reactjs/constants/chains.d.ts +36 -0
- package/reactjs/constants/chains.js +40 -0
- package/reactjs/constants/chains.mjs +39 -0
- package/reactjs/constants/index.d.ts +3 -0
- package/reactjs/constants/index.js +13 -0
- package/reactjs/constants/index.mjs +12 -0
- package/reactjs/context/Web3AppProvider.d.ts +23 -0
- package/reactjs/context/Web3AppProvider.js +41 -0
- package/reactjs/context/Web3AppProvider.mjs +40 -0
- package/reactjs/context/queryClient.d.ts +3 -0
- package/reactjs/context/queryClient.js +12 -0
- package/reactjs/context/queryClient.mjs +11 -0
- package/reactjs/context/useWeb3App.d.ts +1 -0
- package/reactjs/context/useWeb3App.js +13 -0
- package/reactjs/context/useWeb3App.mjs +12 -0
- package/reactjs/hooks/index.js +32 -0
- package/reactjs/hooks/index.mjs +31 -0
- package/reactjs/hooks/useAccount.d.ts +77 -0
- package/reactjs/hooks/useAccount.js +14 -0
- package/reactjs/hooks/useAccount.mjs +13 -0
- package/reactjs/hooks/useBalances.d.ts +11 -0
- package/reactjs/hooks/useBalances.js +54 -0
- package/{src/reactjs/hooks/useBalances.ts → reactjs/hooks/useBalances.mjs} +15 -25
- package/reactjs/hooks/useBridgeFormik.d.ts +103 -0
- package/reactjs/hooks/useBridgeFormik.js +162 -0
- package/reactjs/hooks/useBridgeFormik.mjs +161 -0
- package/reactjs/hooks/useDebounce.d.ts +1 -0
- package/reactjs/hooks/useDebounce.js +14 -0
- package/{src/reactjs/hooks/useDebounce.ts → reactjs/hooks/useDebounce.mjs} +5 -6
- package/reactjs/hooks/useFetchBridgeData.d.ts +58 -0
- package/reactjs/hooks/useFetchBridgeData.js +46 -0
- package/{src/reactjs/hooks/useFetchBridgeData.ts → reactjs/hooks/useFetchBridgeData.mjs} +6 -10
- package/reactjs/hooks/useFetchTokens.d.ts +55 -0
- package/reactjs/hooks/useFetchTokens.js +114 -0
- package/{src/reactjs/hooks/useFetchTokens.ts → reactjs/hooks/useFetchTokens.mjs} +26 -55
- package/reactjs/hooks/useGenericSignMessage.d.ts +3 -0
- package/reactjs/hooks/useGenericSignMessage.js +42 -0
- package/reactjs/hooks/useGenericSignMessage.mjs +41 -0
- package/reactjs/hooks/useGetChainId.d.ts +1 -0
- package/reactjs/hooks/useGetChainId.js +12 -0
- package/reactjs/hooks/useGetChainId.mjs +11 -0
- package/reactjs/hooks/useResolveTokenChain.d.ts +9 -0
- package/reactjs/hooks/useResolveTokenChain.js +21 -0
- package/reactjs/hooks/useResolveTokenChain.mjs +20 -0
- package/reactjs/hooks/useSendTransactions.d.ts +3 -0
- package/reactjs/hooks/useSendTransactions.js +26 -0
- package/{src/reactjs/hooks/useSendTransactions.ts → reactjs/hooks/useSendTransactions.mjs} +7 -8
- package/reactjs/hooks/useSignTransaction.d.ts +96 -0
- package/reactjs/hooks/useSignTransaction.js +59 -0
- package/{src/reactjs/hooks/useSignTransaction.ts → reactjs/hooks/useSignTransaction.mjs} +13 -46
- package/reactjs/hooks/validation/index.js +11 -0
- package/reactjs/hooks/validation/index.mjs +10 -0
- package/reactjs/hooks/validation/useAmountSchema.d.ts +2 -0
- package/reactjs/hooks/validation/useAmountSchema.js +31 -0
- package/reactjs/hooks/validation/useAmountSchema.mjs +13 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.d.ts +2 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.js +27 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +9 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.d.ts +3 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +38 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +37 -0
- package/reactjs/hooks/validation/useTestIsConnected.d.ts +3 -0
- package/reactjs/hooks/validation/useTestIsConnected.js +21 -0
- package/reactjs/hooks/validation/useTestIsConnected.mjs +20 -0
- package/{src/reactjs/index.ts → reactjs/index.d.ts} +1 -1
- package/reactjs/index.js +183 -0
- package/reactjs/index.mjs +149 -0
- package/reactjs/init/index.js +5 -0
- package/reactjs/init/index.mjs +4 -0
- package/reactjs/init/init.d.ts +49 -0
- package/reactjs/init/init.js +77 -0
- package/reactjs/init/init.mjs +59 -0
- package/reactjs/queries/index.js +18 -0
- package/reactjs/queries/index.mjs +17 -0
- package/reactjs/queries/useCheckAccount.query.d.ts +3 -0
- package/reactjs/queries/useCheckAccount.query.js +50 -0
- package/reactjs/queries/useCheckAccount.query.mjs +49 -0
- package/reactjs/queries/useGetAllTokens.query.d.ts +6 -0
- package/reactjs/queries/useGetAllTokens.query.js +36 -0
- package/reactjs/queries/useGetAllTokens.query.mjs +35 -0
- package/reactjs/queries/useGetChains.query.d.ts +3 -0
- package/reactjs/queries/useGetChains.query.js +35 -0
- package/reactjs/queries/useGetChains.query.mjs +34 -0
- package/reactjs/queries/useGetHistory.query.d.ts +12 -0
- package/reactjs/queries/useGetHistory.query.js +69 -0
- package/{src/reactjs/queries/useGetHistory.query.ts → reactjs/queries/useGetHistory.query.mjs} +18 -28
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +29 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.js +72 -0
- package/{src/reactjs/queries/useGetMvxTokensBalances.query.ts → reactjs/queries/useGetMvxTokensBalances.query.mjs} +24 -33
- package/reactjs/queries/useGetNonMvxTokensBalances.query.d.ts +28 -0
- package/reactjs/queries/useGetNonMvxTokensBalances.query.js +81 -0
- package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +80 -0
- package/reactjs/queries/useGetRate.mutation.d.ts +6 -0
- package/reactjs/queries/useGetRate.mutation.js +19 -0
- package/reactjs/queries/useGetRate.mutation.mjs +18 -0
- package/reactjs/queries/useLinkAccount.mutation.d.ts +6 -0
- package/reactjs/queries/useLinkAccount.mutation.js +19 -0
- package/reactjs/queries/useLinkAccount.mutation.mjs +18 -0
- package/reactjs/reexports.d.ts +6 -0
- package/reactjs/reexports.js +49 -0
- package/reactjs/reexports.mjs +15 -0
- package/reactjs/utils/delay.d.ts +1 -0
- package/reactjs/utils/delay.js +7 -0
- package/{src/reactjs/utils/delay.ts → reactjs/utils/delay.mjs} +4 -1
- package/reactjs/utils/formatAmount.d.ts +7 -0
- package/reactjs/utils/formatAmount.js +24 -0
- package/reactjs/utils/formatAmount.mjs +23 -0
- package/reactjs/utils/getCleanStringAmount.d.ts +4 -0
- package/reactjs/utils/getCleanStringAmount.js +12 -0
- package/reactjs/utils/getCleanStringAmount.mjs +11 -0
- package/reactjs/utils/getCompletePathname.d.ts +1 -0
- package/reactjs/utils/getCompletePathname.js +6 -0
- package/reactjs/utils/getCompletePathname.mjs +5 -0
- package/reactjs/utils/getInitialTokens.d.ts +11 -0
- package/reactjs/utils/getInitialTokens.js +13 -0
- package/reactjs/utils/getInitialTokens.mjs +12 -0
- package/reactjs/utils/hasEnoughFunds.d.ts +5 -0
- package/reactjs/utils/hasEnoughFunds.js +20 -0
- package/reactjs/utils/hasEnoughFunds.mjs +19 -0
- package/reactjs/utils/index.js +27 -0
- package/reactjs/utils/index.mjs +26 -0
- package/reactjs/utils/isStringFloat.d.ts +1 -0
- package/reactjs/utils/isStringFloat.js +22 -0
- package/reactjs/utils/isStringFloat.mjs +21 -0
- package/reactjs/utils/mxClsx.d.ts +3 -0
- package/reactjs/utils/mxClsx.js +9 -0
- package/reactjs/utils/mxClsx.mjs +8 -0
- package/reactjs/utils/pipe.d.ts +7 -0
- package/reactjs/utils/pipe.js +26 -0
- package/reactjs/utils/pipe.mjs +25 -0
- package/reactjs/utils/removeCommas.d.ts +1 -0
- package/reactjs/utils/removeCommas.js +7 -0
- package/reactjs/utils/removeCommas.mjs +6 -0
- package/reactjs/utils/roundAmount.d.ts +1 -0
- package/reactjs/utils/roundAmount.js +41 -0
- package/{src/reactjs/utils/roundAmount.ts → reactjs/utils/roundAmount.mjs} +13 -30
- package/reactjs/utils/testNumber.d.ts +1 -0
- package/reactjs/utils/testNumber.js +5 -0
- package/reactjs/utils/testNumber.mjs +4 -0
- package/store/inMemoryStore.d.ts +12 -0
- package/store/inMemoryStore.js +40 -0
- package/store/inMemoryStore.mjs +39 -0
- package/style.css +2226 -0
- package/{src/types/batchTransactions.ts → types/batchTransactions.d.ts} +2 -2
- package/types/batchTransactions.js +2 -0
- package/types/batchTransactions.mjs +1 -0
- package/types/chainType.d.ts +6 -0
- package/types/chainType.js +11 -0
- package/types/chainType.mjs +10 -0
- package/types/index.js +2 -0
- package/types/index.mjs +1 -0
- package/types/linkAccount.d.ts +6 -0
- package/types/linkAccount.js +2 -0
- package/types/linkAccount.mjs +1 -0
- package/types/providerType.d.ts +5 -0
- package/types/providerType.js +10 -0
- package/types/providerType.mjs +9 -0
- package/types/rate.d.ts +16 -0
- package/types/rate.js +2 -0
- package/types/rate.mjs +1 -0
- package/types/token.d.ts +12 -0
- package/types/token.js +2 -0
- package/types/token.mjs +1 -0
- package/types/transaction.d.ts +30 -0
- package/types/transaction.js +2 -0
- package/types/transaction.mjs +1 -0
- package/types/utxo.d.ts +11 -0
- package/types/utxo.js +2 -0
- package/types/utxo.mjs +1 -0
- package/.eslintrc +0 -77
- package/.github/workflows/publish.yaml +0 -63
- package/.prettierignore +0 -4
- package/.prettierrc +0 -8
- package/CHANGELOG.md +0 -26
- package/jest.config.ts +0 -43
- package/postcss.config.js +0 -8
- package/src/api/checkAccount.ts +0 -26
- package/src/api/confirmRate.ts +0 -38
- package/src/api/getChains.ts +0 -21
- package/src/api/getRate.ts +0 -34
- package/src/api/getTokens.ts +0 -28
- package/src/api/getTokensBalances.ts +0 -26
- package/src/api/getTransactions.ts +0 -52
- package/src/api/linkAccount.ts +0 -39
- package/src/api/sendTransactions.ts +0 -42
- package/src/api/tests/confirmRate.spec.ts +0 -146
- package/src/api/tests/getChains.spec.ts +0 -52
- package/src/api/tests/getRate.spec.ts +0 -102
- package/src/api/tests/getTokens.spec.ts +0 -78
- package/src/api/tests/getTransactions.spec.ts +0 -116
- package/src/api/tests/sendTransactions.spec.ts +0 -106
- package/src/constants/index.ts +0 -1
- package/src/dto/Chain.dto.ts +0 -19
- package/src/dto/CheckAccount.dto.ts +0 -4
- package/src/dto/ConfirmRate.dto.ts +0 -12
- package/src/dto/Token.dto.ts +0 -20
- package/src/dto/TokenBalance.dto.ts +0 -4
- package/src/dto/Transaction.dto.ts +0 -18
- package/src/global.d.ts +0 -2
- package/src/helpers/getApiURL.ts +0 -5
- package/src/helpers/getBridgeURL.ts +0 -5
- package/src/helpers/getMvxApiURL.ts +0 -5
- package/src/helpers/getMvxChainId.ts +0 -5
- package/src/helpers/getMvxExplorerAddress.ts +0 -5
- package/src/helpers/serializeTransaction.ts +0 -7
- package/src/helpers/tests/base64Utils.spec.ts +0 -33
- package/src/helpers/tests/decodeLoginToken.spec.ts +0 -41
- package/src/helpers/tests/decodeToken.spec.ts +0 -32
- package/src/reactjs/assets/all-networks.svg +0 -24
- package/src/reactjs/assets/arrow-up-right.svg +0 -3
- package/src/reactjs/assets/base.svg +0 -4
- package/src/reactjs/assets/bsc.svg +0 -4
- package/src/reactjs/assets/default.svg +0 -4
- package/src/reactjs/assets/ethereum.svg +0 -17
- package/src/reactjs/assets/hug.svg +0 -7
- package/src/reactjs/assets/msx.svg +0 -11
- package/src/reactjs/assets/polygon.svg +0 -12
- package/src/reactjs/components/AccountAddress/AccountAddress.tsx +0 -33
- package/src/reactjs/components/AmountCard/AmountCard.tsx +0 -24
- package/src/reactjs/components/AmountInput/AmountInput.tsx +0 -84
- package/src/reactjs/components/BridgeForm/BridgeForm.tsx +0 -110
- package/src/reactjs/components/BridgeForm/Deposit.tsx +0 -732
- package/src/reactjs/components/BridgeForm/Transfer.tsx +0 -626
- package/src/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.ts +0 -93
- package/src/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.ts +0 -341
- package/src/reactjs/components/BridgeForm/utils/bridgeFormHelpers.ts +0 -91
- package/src/reactjs/components/BridgeHistory/BridgeHistory.tsx +0 -363
- package/src/reactjs/components/Connect/BridgeAccountDisplay.tsx +0 -134
- package/src/reactjs/components/Connect/BridgeConnectButton.tsx +0 -39
- package/src/reactjs/components/Connect/CustomConnectButton.tsx +0 -44
- package/src/reactjs/components/Connect/MvxAccountDisplay.tsx +0 -83
- package/src/reactjs/components/Connect/MvxConnectButton.tsx +0 -45
- package/src/reactjs/components/Connect/SwitchChainButton.tsx +0 -34
- package/src/reactjs/components/CopyButton/CopyButton.tsx +0 -51
- package/src/reactjs/components/DisplayAmount/DisplayAmount.tsx +0 -139
- package/src/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.tsx +0 -51
- package/src/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.tsx +0 -76
- package/src/reactjs/components/DisplayAmount/utils/truncateAmount.ts +0 -22
- package/src/reactjs/components/Error/Error.tsx +0 -54
- package/src/reactjs/components/Error/index.ts +0 -1
- package/src/reactjs/components/SmallLoader/SmallLoader.tsx +0 -23
- package/src/reactjs/components/ToggleDirection/ToggleDirection.tsx +0 -25
- package/src/reactjs/components/TokenSelector/TokenSelector.tsx +0 -196
- package/src/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.tsx +0 -105
- package/src/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.tsx +0 -62
- package/src/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.tsx +0 -27
- package/src/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.tsx +0 -3
- package/src/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.tsx +0 -33
- package/src/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.ts +0 -11
- package/src/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.ts +0 -11
- package/src/reactjs/components/TokenSelector/components/SelectContainer.tsx +0 -43
- package/src/reactjs/components/TokenSelector/components/SelectContent.tsx +0 -155
- package/src/reactjs/components/TokenSelector/components/SelectedOption.tsx +0 -29
- package/src/reactjs/components/TokenSelector/components/TokenIcon.tsx +0 -103
- package/src/reactjs/components/TokenSelector/components/TokenItem.tsx +0 -76
- package/src/reactjs/components/TokenSelector/components/TokenList.tsx +0 -25
- package/src/reactjs/components/TokenSelector/components/TokenSymbol.tsx +0 -31
- package/src/reactjs/components/TransactionToast/TransactionToast.tsx +0 -55
- package/src/reactjs/components/TransactionToast/TransactionToastContainer.tsx +0 -16
- package/src/reactjs/components/TrimAddress/TrimAddress.tsx +0 -27
- package/src/reactjs/components/base/MxButton/MxButton.tsx +0 -127
- package/src/reactjs/components/base/MxCard/MxCard.tsx +0 -71
- package/src/reactjs/components/base/MxCircleLoader/MxCircleLoader.tsx +0 -25
- package/src/reactjs/components/base/MxCircleLoader/index.ts +0 -1
- package/src/reactjs/components/base/MxLink/MxLink.tsx +0 -111
- package/src/reactjs/components/base/MxSearch/MxSearch.tsx +0 -72
- package/src/reactjs/components/base/MxSlideover/MxSlideover.tsx +0 -87
- package/src/reactjs/components/base/MxTooltip/MxTooltip.tsx +0 -194
- package/src/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.tsx +0 -48
- package/src/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.tsx +0 -35
- package/src/reactjs/constants/chains.ts +0 -50
- package/src/reactjs/constants/index.ts +0 -7
- package/src/reactjs/context/Web3AppProvider.tsx +0 -68
- package/src/reactjs/context/queryClient.ts +0 -11
- package/src/reactjs/context/useWeb3App.ts +0 -12
- package/src/reactjs/hooks/useAccount.ts +0 -12
- package/src/reactjs/hooks/useBridgeFormik.ts +0 -198
- package/src/reactjs/hooks/useGenericSignMessage.ts +0 -47
- package/src/reactjs/hooks/useGetChainId.ts +0 -10
- package/src/reactjs/hooks/useResolveTokenChain.ts +0 -23
- package/src/reactjs/hooks/validation/useAmountSchema.ts +0 -19
- package/src/reactjs/hooks/validation/useSecondAmountSchema.ts +0 -12
- package/src/reactjs/hooks/validation/useTestHasEnoughFunds.ts +0 -43
- package/src/reactjs/hooks/validation/useTestIsConnected.ts +0 -21
- package/src/reactjs/index.css +0 -122
- package/src/reactjs/init/init.ts +0 -120
- package/src/reactjs/queries/useCheckAccount.query.ts +0 -40
- package/src/reactjs/queries/useGetAllTokens.query.ts +0 -38
- package/src/reactjs/queries/useGetChains.query.ts +0 -35
- package/src/reactjs/queries/useGetNonMvxTokensBalances.query.ts +0 -80
- package/src/reactjs/queries/useGetRate.mutation.ts +0 -22
- package/src/reactjs/queries/useLinkAccount.mutation.ts +0 -22
- package/src/reactjs/reexports.ts +0 -32
- package/src/reactjs/utils/formatAmount.ts +0 -29
- package/src/reactjs/utils/getCleanStringAmount.ts +0 -14
- package/src/reactjs/utils/getCompletePathname.ts +0 -4
- package/src/reactjs/utils/getInitialTokens.ts +0 -19
- package/src/reactjs/utils/hasEnoughFunds.ts +0 -24
- package/src/reactjs/utils/isStringFloat.ts +0 -28
- package/src/reactjs/utils/mxClsx.ts +0 -6
- package/src/reactjs/utils/pipe.ts +0 -26
- package/src/reactjs/utils/removeCommas.ts +0 -3
- package/src/reactjs/utils/testNumber.ts +0 -2
- package/src/store/inMemoryStore.ts +0 -44
- package/src/types/chainType.ts +0 -6
- package/src/types/linkAccount.ts +0 -6
- package/src/types/providerType.ts +0 -5
- package/src/types/rate.ts +0 -17
- package/src/types/token.ts +0 -13
- package/src/types/transaction.ts +0 -36
- package/src/types/utxo.ts +0 -11
- package/src/vite-env.d.ts +0 -1
- package/tailwind.config.js +0 -82
- package/test-config/setupJest.ts +0 -5
- package/test-config/setupTests.ts +0 -41
- package/tsconfig.json +0 -33
- package/vite.config.mts +0 -75
- /package/{src/api/index.ts → api/index.d.ts} +0 -0
- /package/{src/dto/index.ts → dto/index.d.ts} +0 -0
- /package/{src/helpers/index.ts → helpers/index.d.ts} +0 -0
- /package/{src/index.ts → index.d.ts} +0 -0
- /package/{src/reactjs/components/AccountAddress/index.ts → reactjs/components/AccountAddress/index.d.ts} +0 -0
- /package/{src/reactjs/components/AmountCard/index.ts → reactjs/components/AmountCard/index.d.ts} +0 -0
- /package/{src/reactjs/components/AmountInput/index.ts → reactjs/components/AmountInput/index.d.ts} +0 -0
- /package/{src/reactjs/components/BridgeForm/index.ts → reactjs/components/BridgeForm/index.d.ts} +0 -0
- /package/{src/reactjs/components/BridgeHistory/index.ts → reactjs/components/BridgeHistory/index.d.ts} +0 -0
- /package/{src/reactjs/components/Connect/index.ts → reactjs/components/Connect/index.d.ts} +0 -0
- /package/{src/reactjs/components/CopyButton/index.ts → reactjs/components/CopyButton/index.d.ts} +0 -0
- /package/{src/reactjs/components/CopyButton/utils/index.ts → reactjs/components/CopyButton/utils/index.d.ts} +0 -0
- /package/{src/reactjs/components/DisplayAmount/components/AnimateNumber/index.ts → reactjs/components/DisplayAmount/components/AnimateNumber/index.d.ts} +0 -0
- /package/{src/reactjs/components/DisplayAmount/components/index.ts → reactjs/components/DisplayAmount/components/index.d.ts} +0 -0
- /package/{src/reactjs/components/DisplayAmount/index.ts → reactjs/components/DisplayAmount/index.d.ts} +0 -0
- /package/{src/reactjs/components/DisplayAmount/utils/index.ts → reactjs/components/DisplayAmount/utils/index.d.ts} +0 -0
- /package/{src/reactjs/components/SmallLoader/index.ts → reactjs/components/SmallLoader/index.d.ts} +0 -0
- /package/{src/reactjs/components/TokenSelector/index.ts → reactjs/components/TokenSelector/index.d.ts} +0 -0
- /package/{src/reactjs/components/TransactionToast/index.ts → reactjs/components/TransactionToast/index.d.ts} +0 -0
- /package/{src/reactjs/components/TrimAddress/index.ts → reactjs/components/TrimAddress/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxButton/index.ts → reactjs/components/base/MxButton/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxCard/index.ts → reactjs/components/base/MxCard/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxLink/index.ts → reactjs/components/base/MxLink/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxSearch/index.ts → reactjs/components/base/MxSearch/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxSlideover/index.ts → reactjs/components/base/MxSlideover/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxTooltip/components/TooltipContainer/index.ts → reactjs/components/base/MxTooltip/components/TooltipContainer/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxTooltip/components/TooltipContent/index.ts → reactjs/components/base/MxTooltip/components/TooltipContent/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxTooltip/components/index.ts → reactjs/components/base/MxTooltip/components/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/MxTooltip/index.ts → reactjs/components/base/MxTooltip/index.d.ts} +0 -0
- /package/{src/reactjs/components/base/index.ts → reactjs/components/base/index.d.ts} +0 -0
- /package/{src/reactjs/components/index.ts → reactjs/components/index.d.ts} +0 -0
- /package/{src/reactjs/hooks/index.ts → reactjs/hooks/index.d.ts} +0 -0
- /package/{src/reactjs/hooks/validation/index.ts → reactjs/hooks/validation/index.d.ts} +0 -0
- /package/{src/reactjs/init/index.ts → reactjs/init/index.d.ts} +0 -0
- /package/{src/reactjs/queries/index.ts → reactjs/queries/index.d.ts} +0 -0
- /package/{src/reactjs/utils/index.ts → reactjs/utils/index.d.ts} +0 -0
- /package/{src/types/index.ts → types/index.d.ts} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const AllNetworks = "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
|
+
AllNetworks as A
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
const AllNetworks = "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";
|
|
4
|
+
exports.AllNetworks = AllNetworks;
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ServerTransaction } from '../types/transaction';
|
|
2
|
+
import { ConfirmRateDto } from '../dto/ConfirmRate.dto';
|
|
3
|
+
import { AxiosResponse } from 'axios';
|
|
4
|
+
|
|
5
|
+
type ConfirmRateProps = {
|
|
6
|
+
url: string;
|
|
7
|
+
nativeAuthToken: string;
|
|
8
|
+
body: ConfirmRateDto;
|
|
9
|
+
};
|
|
10
|
+
export declare function confirmRate({ url, nativeAuthToken, body }: ConfirmRateProps): Promise<AxiosResponse<ServerTransaction[]>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
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;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { decodeToken } from "../helpers/decodeToken.mjs";
|
|
3
|
+
async function confirmRate({
|
|
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
|
+
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);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
confirmRate
|
|
29
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChainDTO } from '../dto/Chain.dto';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
|
|
4
|
+
export declare function getChains({ url, nativeAuthToken, bridgeOnly }: {
|
|
5
|
+
url: string;
|
|
6
|
+
nativeAuthToken: string;
|
|
7
|
+
bridgeOnly: boolean;
|
|
8
|
+
}): Promise<AxiosResponse<ChainDTO[]>>;
|
package/api/getChains.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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 await axios.get(`/chains?isBridge=${bridgeOnly}`, config);
|
|
17
|
+
}
|
|
18
|
+
exports.getChains = getChains;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
async function getChains({
|
|
3
|
+
url,
|
|
4
|
+
nativeAuthToken,
|
|
5
|
+
bridgeOnly
|
|
6
|
+
}) {
|
|
7
|
+
const config = {
|
|
8
|
+
baseURL: url,
|
|
9
|
+
headers: {
|
|
10
|
+
Authorization: `Bearer ${nativeAuthToken}`
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
return await axios.get(`/chains?isBridge=${bridgeOnly}`, config);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
getChains
|
|
17
|
+
};
|
package/api/getRate.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RateRequestBody, RateRequestResponse } from 'types/rate';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
|
|
4
|
+
interface RateProps {
|
|
5
|
+
url: string;
|
|
6
|
+
nativeAuthToken: string;
|
|
7
|
+
body: RateRequestBody;
|
|
8
|
+
}
|
|
9
|
+
export declare function getRate({ url, nativeAuthToken, body }: RateProps): Promise<AxiosResponse<RateRequestResponse>>;
|
|
10
|
+
export {};
|
package/api/getRate.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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;
|
package/api/getRate.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { decodeToken } from "../helpers/decodeToken.mjs";
|
|
3
|
+
async function getRate({
|
|
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(`/rate`, body, config);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
getRate
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenType } from '../types/token';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
|
|
4
|
+
export declare function getTokens({ url, chainId, nativeAuthToken, bridgeOnly }: {
|
|
5
|
+
url: string;
|
|
6
|
+
chainId?: number;
|
|
7
|
+
nativeAuthToken: string;
|
|
8
|
+
bridgeOnly: boolean;
|
|
9
|
+
}): Promise<AxiosResponse<TokenType[]>>;
|
package/api/getTokens.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
async function getTokens({
|
|
3
|
+
url,
|
|
4
|
+
chainId,
|
|
5
|
+
nativeAuthToken,
|
|
6
|
+
bridgeOnly
|
|
7
|
+
}) {
|
|
8
|
+
const config = {
|
|
9
|
+
baseURL: url,
|
|
10
|
+
headers: {
|
|
11
|
+
Authorization: `Bearer ${nativeAuthToken}`
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const endpoint = chainId ? `/tokens/${chainId}` : "/tokens";
|
|
15
|
+
return await axios.get(
|
|
16
|
+
`${endpoint}?isBridge=${bridgeOnly}`,
|
|
17
|
+
config
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
getTokens
|
|
22
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenBalanceDTO } from '../dto/TokenBalance.dto';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
|
|
4
|
+
export declare function getTokensBalances({ url, userAddress, chainId, nativeAuthToken }: {
|
|
5
|
+
url: string;
|
|
6
|
+
userAddress: string;
|
|
7
|
+
chainId: string;
|
|
8
|
+
nativeAuthToken: string;
|
|
9
|
+
}): Promise<AxiosResponse<TokenBalanceDTO[]>>;
|
|
@@ -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 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;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
async function getTokensBalances({
|
|
3
|
+
url,
|
|
4
|
+
userAddress,
|
|
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
|
+
`/tokens/balances/${userAddress}/${chainId}`,
|
|
16
|
+
config
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
getTokensBalances
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ProviderType } from 'types/providerType';
|
|
2
|
+
import { TransactionDTO } from 'dto/Transaction.dto';
|
|
3
|
+
import { AxiosResponse } from 'axios';
|
|
4
|
+
|
|
5
|
+
export declare function getTransactions({ url, address, sender, provider, status, tokenIn, tokenOut, nativeAuthToken }: {
|
|
6
|
+
url: string;
|
|
7
|
+
address: string;
|
|
8
|
+
sender?: string;
|
|
9
|
+
provider?: ProviderType;
|
|
10
|
+
status?: string;
|
|
11
|
+
tokenIn?: string;
|
|
12
|
+
tokenOut?: string;
|
|
13
|
+
nativeAuthToken: string;
|
|
14
|
+
}): Promise<AxiosResponse<TransactionDTO[]>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
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;
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
|
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,
|
|
30
|
+
headers: {
|
|
31
|
+
Authorization: `Bearer ${nativeAuthToken}`
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return await axios.get(endpointWithParams, config);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
getTransactions
|
|
38
|
+
};
|
package/api/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
const api_linkAccount = require("./linkAccount.js");
|
|
13
|
+
exports.confirmRate = api_confirmRate.confirmRate;
|
|
14
|
+
exports.getChains = api_getChains.getChains;
|
|
15
|
+
exports.getRate = api_getRate.getRate;
|
|
16
|
+
exports.getTokens = api_getTokens.getTokens;
|
|
17
|
+
exports.getTokensBalances = api_getTokensBalances.getTokensBalances;
|
|
18
|
+
exports.getTransactions = api_getTransactions.getTransactions;
|
|
19
|
+
exports.sendTransactions = api_sendTransactions.sendTransactions;
|
|
20
|
+
exports.checkAccount = api_checkAccount.checkAccount;
|
|
21
|
+
exports.linkAccount = api_linkAccount.linkAccount;
|
package/api/index.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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";
|
|
9
|
+
import { linkAccount } from "./linkAccount.mjs";
|
|
10
|
+
export {
|
|
11
|
+
checkAccount,
|
|
12
|
+
confirmRate,
|
|
13
|
+
getChains,
|
|
14
|
+
getRate,
|
|
15
|
+
getTokens,
|
|
16
|
+
getTokensBalances,
|
|
17
|
+
getTransactions,
|
|
18
|
+
linkAccount,
|
|
19
|
+
sendTransactions
|
|
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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ServerTransaction } from '../types/transaction';
|
|
2
|
+
import { ProviderType } from '../types/providerType';
|
|
3
|
+
import { BatchTransactions } from '../types/batchTransactions';
|
|
4
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
5
|
+
|
|
6
|
+
export type SendTransactionsType = {
|
|
7
|
+
transactions: ServerTransaction[];
|
|
8
|
+
provider: ProviderType;
|
|
9
|
+
url: string;
|
|
10
|
+
token: string;
|
|
11
|
+
axiosConfig?: AxiosRequestConfig;
|
|
12
|
+
};
|
|
13
|
+
export declare const sendTransactions: ({ transactions, provider, url, token, axiosConfig }: SendTransactionsType) => Promise<AxiosResponse<BatchTransactions>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
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;
|