@multiversx/sdk-dapp-liquidity 0.2.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.
- package/README.md +186 -0
- package/all-networks-EJIVYZ_i.mjs +4 -0
- package/all-networks-NYACMyeN.js +4 -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 +6 -0
- package/api/getChains.js +12 -0
- package/api/getChains.mjs +11 -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 +7 -0
- package/api/getTokens.js +14 -0
- package/api/getTokens.mjs +13 -0
- package/api/getTokensBalances.d.ts +8 -0
- package/api/getTokensBalances.js +17 -0
- package/api/getTokensBalances.mjs +16 -0
- package/api/getTransactions.d.ts +7 -0
- package/api/getTransactions.js +14 -0
- package/api/getTransactions.mjs +13 -0
- package/api/index.d.ts +7 -0
- package/api/index.js +17 -0
- package/api/index.mjs +16 -0
- package/api/sendTransactions.d.ts +11 -0
- package/api/sendTransactions.js +29 -0
- package/api/sendTransactions.mjs +28 -0
- package/api/tests/confirmRate.spec.d.ts +1 -0
- package/api/tests/confirmRate.spec.js +124 -0
- package/api/tests/confirmRate.spec.mjs +122 -0
- package/api/tests/getChains.spec.d.ts +1 -0
- package/api/tests/getChains.spec.js +37 -0
- package/api/tests/getChains.spec.mjs +35 -0
- package/api/tests/getRate.spec.d.ts +1 -0
- package/api/tests/getRate.spec.js +83 -0
- package/api/tests/getRate.spec.mjs +81 -0
- package/api/tests/getTokens.spec.d.ts +1 -0
- package/api/tests/getTokens.spec.js +60 -0
- package/api/tests/getTokens.spec.mjs +58 -0
- package/api/tests/getTransactions.spec.d.ts +1 -0
- package/api/tests/getTransactions.spec.js +89 -0
- package/api/tests/getTransactions.spec.mjs +87 -0
- package/api/tests/sendTransactions.spec.d.ts +1 -0
- package/api/tests/sendTransactions.spec.js +83 -0
- package/api/tests/sendTransactions.spec.mjs +81 -0
- package/bignumber-B8vjg9qn.js +1334 -0
- package/bignumber-CKZkoo0g.mjs +1334 -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 +16 -0
- package/dto/Chain.dto.js +2 -0
- package/dto/Chain.dto.mjs +1 -0
- package/dto/ConfirmRate.dto.d.ts +11 -0
- package/dto/ConfirmRate.dto.js +2 -0
- package/dto/ConfirmRate.dto.mjs +1 -0
- package/dto/Token.dto.d.ts +14 -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 +14 -0
- package/dto/Transaction.dto.js +2 -0
- package/dto/Transaction.dto.mjs +1 -0
- package/dto/index.d.ts +5 -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/helpers/base64Utils.mjs +31 -0
- package/helpers/decodeLoginToken.d.ts +9 -0
- package/helpers/decodeLoginToken.js +28 -0
- package/helpers/decodeLoginToken.mjs +27 -0
- package/helpers/decodeToken.d.ts +11 -0
- package/helpers/decodeToken.js +40 -0
- package/helpers/decodeToken.mjs +39 -0
- 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.d.ts +9 -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-B9WqxUXM.mjs +91 -0
- package/index-BXwpbIDQ.mjs +107 -0
- package/index-CnudU77V.js +329 -0
- package/index-DSnomXRI.mjs +68025 -0
- package/index-DZHiA1sX.js +107 -0
- package/index-cvy2-uZ_.js +67946 -0
- package/index.d.ts +6 -0
- package/index.js +189 -0
- package/index.mjs +185 -0
- package/package.json +107 -0
- package/react-B9sQBOh0.mjs +3040 -0
- package/react-BaXyw3AO.js +3040 -0
- package/react-CNXJSTCv.js +38 -0
- package/react-CSQpf1zk.mjs +38 -0
- 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.d.ts +1 -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 +33 -0
- package/reactjs/components/AmountCard/AmountCard.mjs +32 -0
- package/reactjs/components/AmountCard/index.d.ts +1 -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 +61 -0
- package/reactjs/components/AmountInput/AmountInput.mjs +60 -0
- package/reactjs/components/AmountInput/index.d.ts +1 -0
- package/reactjs/components/AmountInput/index.js +5 -0
- package/reactjs/components/AmountInput/index.mjs +4 -0
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +16 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +680 -0
- package/reactjs/components/BridgeForm/BridgeForm.mjs +679 -0
- package/reactjs/components/BridgeForm/index.d.ts +1 -0
- package/reactjs/components/BridgeForm/index.js +5 -0
- package/reactjs/components/BridgeForm/index.mjs +4 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.d.ts +4 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.js +233 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +232 -0
- package/reactjs/components/BridgeHistory/index.d.ts +1 -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 +85 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +84 -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 +42 -0
- package/reactjs/components/Connect/CustomConnectButton.mjs +41 -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 +11 -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 +33 -0
- package/reactjs/components/Connect/SwitchChainButton.mjs +32 -0
- package/reactjs/components/Connect/index.d.ts +6 -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.d.ts +1 -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 +38 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +37 -0
- package/reactjs/components/CopyButton/utils/index.d.ts +1 -0
- 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.d.ts +0 -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.d.ts +0 -0
- package/reactjs/components/DisplayAmount/components/index.js +2 -0
- package/reactjs/components/DisplayAmount/components/index.mjs +1 -0
- package/reactjs/components/DisplayAmount/index.d.ts +1 -0
- package/reactjs/components/DisplayAmount/index.js +5 -0
- package/reactjs/components/DisplayAmount/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/utils/index.d.ts +1 -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/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.d.ts +1 -0
- package/reactjs/components/SmallLoader/index.js +5 -0
- package/reactjs/components/SmallLoader/index.mjs +4 -0
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +16 -0
- package/reactjs/components/TokenSelector/TokenSelector.js +158 -0
- package/reactjs/components/TokenSelector/TokenSelector.mjs +157 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +8 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +86 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +85 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts +11 -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 +10 -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 +10 -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 +10 -0
- package/reactjs/components/TokenSelector/components/SelectContent.js +93 -0
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +92 -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.d.ts +1 -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.d.ts +2 -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.d.ts +1 -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.d.ts +1 -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.d.ts +1 -0
- package/reactjs/components/base/MxCard/index.js +5 -0
- package/reactjs/components/base/MxCard/index.mjs +4 -0
- package/reactjs/components/base/MxLink/MxLink.d.ts +10 -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.d.ts +1 -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.d.ts +1 -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.d.ts +1 -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 +163 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +162 -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.d.ts +1 -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.d.ts +1 -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.d.ts +2 -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.d.ts +1 -0
- package/reactjs/components/base/MxTooltip/index.js +5 -0
- package/reactjs/components/base/MxTooltip/index.mjs +4 -0
- package/reactjs/components/base/index.d.ts +6 -0
- package/reactjs/components/base/index.js +15 -0
- package/reactjs/components/base/index.mjs +14 -0
- package/reactjs/components/index.d.ts +13 -0
- package/reactjs/components/index.js +51 -0
- package/reactjs/components/index.mjs +50 -0
- package/reactjs/constants/chains.d.ts +35 -0
- package/reactjs/constants/chains.js +38 -0
- package/reactjs/constants/chains.mjs +37 -0
- package/reactjs/constants/index.d.ts +3 -0
- package/reactjs/constants/index.js +12 -0
- package/reactjs/constants/index.mjs +11 -0
- package/reactjs/context/Web3AppProvider.d.ts +12 -0
- package/reactjs/context/Web3AppProvider.js +29 -0
- package/reactjs/context/Web3AppProvider.mjs +28 -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.d.ts +11 -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 +18 -0
- package/reactjs/hooks/useAccount.mjs +17 -0
- package/reactjs/hooks/useBalances.d.ts +10 -0
- package/reactjs/hooks/useBalances.js +7 -0
- package/reactjs/hooks/useBalances.mjs +6 -0
- package/reactjs/hooks/useBridgeFormik.d.ts +98 -0
- package/reactjs/hooks/useBridgeFormik.js +182 -0
- package/reactjs/hooks/useBridgeFormik.mjs +181 -0
- package/reactjs/hooks/useDebounce.d.ts +1 -0
- package/reactjs/hooks/useDebounce.js +14 -0
- package/reactjs/hooks/useDebounce.mjs +13 -0
- package/reactjs/hooks/useFetchBridgeData.d.ts +45 -0
- package/reactjs/hooks/useFetchBridgeData.js +44 -0
- package/reactjs/hooks/useFetchBridgeData.mjs +43 -0
- package/reactjs/hooks/useFetchTokens.d.ts +42 -0
- package/reactjs/hooks/useFetchTokens.js +105 -0
- package/reactjs/hooks/useFetchTokens.mjs +104 -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 +19 -0
- package/reactjs/hooks/useSendTransactions.mjs +18 -0
- package/reactjs/hooks/useSignTransaction.d.ts +69 -0
- package/reactjs/hooks/useSignTransaction.js +17 -0
- package/reactjs/hooks/useSignTransaction.mjs +16 -0
- package/reactjs/hooks/validation/index.d.ts +4 -0
- 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/reactjs/index.d.ts +10 -0
- package/reactjs/index.js +153 -0
- package/reactjs/index.mjs +149 -0
- package/reactjs/init/index.d.ts +1 -0
- package/reactjs/init/index.js +5 -0
- package/reactjs/init/index.mjs +4 -0
- package/reactjs/init/init.d.ts +48 -0
- package/reactjs/init/init.js +53 -0
- package/reactjs/init/init.mjs +35 -0
- package/reactjs/init/tests/init.spec.d.ts +1 -0
- package/reactjs/init/tests/init.spec.js +108 -0
- package/reactjs/init/tests/init.spec.mjs +106 -0
- package/reactjs/queries/index.d.ts +7 -0
- package/reactjs/queries/index.js +20 -0
- package/reactjs/queries/index.mjs +19 -0
- package/reactjs/queries/useGetAllTokens.query.d.ts +3 -0
- package/reactjs/queries/useGetAllTokens.query.js +31 -0
- package/reactjs/queries/useGetAllTokens.query.mjs +30 -0
- package/reactjs/queries/useGetChains.query.d.ts +3 -0
- package/reactjs/queries/useGetChains.query.js +31 -0
- package/reactjs/queries/useGetChains.query.mjs +30 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +22 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.js +78 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.mjs +77 -0
- package/reactjs/queries/useGetHistory.query.d.ts +4 -0
- package/reactjs/queries/useGetHistory.query.js +47 -0
- package/reactjs/queries/useGetHistory.query.mjs +46 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +23 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.js +60 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +59 -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/useGetTokens.query.d.ts +3 -0
- package/reactjs/queries/useGetTokens.query.js +34 -0
- package/reactjs/queries/useGetTokens.query.mjs +33 -0
- package/reactjs/reexports.d.ts +6 -0
- package/reactjs/reexports.js +21 -0
- package/reactjs/reexports.mjs +17 -0
- package/reactjs/utils/delay.d.ts +1 -0
- package/reactjs/utils/delay.js +7 -0
- package/reactjs/utils/delay.mjs +6 -0
- 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 +8 -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.d.ts +12 -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 +21 -0
- package/reactjs/utils/mxClsx.mjs +20 -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/reactjs/utils/roundAmount.mjs +40 -0
- 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/types/batchTransactions.d.ts +6 -0
- package/types/batchTransactions.js +2 -0
- package/types/batchTransactions.mjs +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.js +2 -0
- package/types/index.mjs +1 -0
- package/types/rate.d.ts +11 -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 +14 -0
- package/types/transaction.js +2 -0
- package/types/transaction.mjs +1 -0
- package/useBalances-Bxtc4GNK.js +199 -0
- package/useBalances-DA3zEruz.mjs +199 -0
- package/w3m-modal-DCcF1qEB.js +356 -0
- package/w3m-modal-DK3G5GJp.mjs +356 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require$$0 = require("react");
|
|
5
|
+
const api_sendTransactions = require("../../api/sendTransactions.js");
|
|
6
|
+
const useSendTransactions = () => {
|
|
7
|
+
return require$$0.useCallback(
|
|
8
|
+
async ({ transactions, url, token, axiosConfig }) => {
|
|
9
|
+
return await api_sendTransactions.sendTransactions({
|
|
10
|
+
transactions,
|
|
11
|
+
url,
|
|
12
|
+
token,
|
|
13
|
+
axiosConfig
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
[]
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
exports.useSendTransactions = useSendTransactions;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { sendTransactions } from "../../api/sendTransactions.mjs";
|
|
3
|
+
const useSendTransactions = () => {
|
|
4
|
+
return useCallback(
|
|
5
|
+
async ({ transactions, url, token, axiosConfig }) => {
|
|
6
|
+
return await sendTransactions({
|
|
7
|
+
transactions,
|
|
8
|
+
url,
|
|
9
|
+
token,
|
|
10
|
+
axiosConfig
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
[]
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
useSendTransactions
|
|
18
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const useSignTransaction: () => {
|
|
2
|
+
error: null;
|
|
3
|
+
status: "idle";
|
|
4
|
+
reset: () => void;
|
|
5
|
+
context: unknown;
|
|
6
|
+
variables: undefined;
|
|
7
|
+
isError: false;
|
|
8
|
+
isIdle: true;
|
|
9
|
+
isPending: false;
|
|
10
|
+
isSuccess: false;
|
|
11
|
+
failureCount: number;
|
|
12
|
+
failureReason: import('@wagmi/core').SendTransactionErrorType | null;
|
|
13
|
+
isPaused: boolean;
|
|
14
|
+
submittedAt: number;
|
|
15
|
+
sendTransaction: import('wagmi/query').SendTransactionMutate<import('wagmi').Config, unknown>;
|
|
16
|
+
hash: `0x${string}` | undefined;
|
|
17
|
+
signTransaction: import('wagmi/query').SendTransactionMutateAsync<import('wagmi').Config, unknown>;
|
|
18
|
+
} | {
|
|
19
|
+
error: null;
|
|
20
|
+
status: "pending";
|
|
21
|
+
reset: () => void;
|
|
22
|
+
context: unknown;
|
|
23
|
+
variables: import('wagmi/query').SendTransactionVariables<import('wagmi').Config, number>;
|
|
24
|
+
isError: false;
|
|
25
|
+
isIdle: false;
|
|
26
|
+
isPending: true;
|
|
27
|
+
isSuccess: false;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: import('@wagmi/core').SendTransactionErrorType | null;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
sendTransaction: import('wagmi/query').SendTransactionMutate<import('wagmi').Config, unknown>;
|
|
33
|
+
hash: `0x${string}` | undefined;
|
|
34
|
+
signTransaction: import('wagmi/query').SendTransactionMutateAsync<import('wagmi').Config, unknown>;
|
|
35
|
+
} | {
|
|
36
|
+
error: import('@wagmi/core').SendTransactionErrorType;
|
|
37
|
+
status: "error";
|
|
38
|
+
reset: () => void;
|
|
39
|
+
context: unknown;
|
|
40
|
+
variables: import('wagmi/query').SendTransactionVariables<import('wagmi').Config, number>;
|
|
41
|
+
isError: true;
|
|
42
|
+
isIdle: false;
|
|
43
|
+
isPending: false;
|
|
44
|
+
isSuccess: false;
|
|
45
|
+
failureCount: number;
|
|
46
|
+
failureReason: import('@wagmi/core').SendTransactionErrorType | null;
|
|
47
|
+
isPaused: boolean;
|
|
48
|
+
submittedAt: number;
|
|
49
|
+
sendTransaction: import('wagmi/query').SendTransactionMutate<import('wagmi').Config, unknown>;
|
|
50
|
+
hash: `0x${string}` | undefined;
|
|
51
|
+
signTransaction: import('wagmi/query').SendTransactionMutateAsync<import('wagmi').Config, unknown>;
|
|
52
|
+
} | {
|
|
53
|
+
error: null;
|
|
54
|
+
status: "success";
|
|
55
|
+
reset: () => void;
|
|
56
|
+
context: unknown;
|
|
57
|
+
variables: import('wagmi/query').SendTransactionVariables<import('wagmi').Config, number>;
|
|
58
|
+
isError: false;
|
|
59
|
+
isIdle: false;
|
|
60
|
+
isPending: false;
|
|
61
|
+
isSuccess: true;
|
|
62
|
+
failureCount: number;
|
|
63
|
+
failureReason: import('@wagmi/core').SendTransactionErrorType | null;
|
|
64
|
+
isPaused: boolean;
|
|
65
|
+
submittedAt: number;
|
|
66
|
+
sendTransaction: import('wagmi/query').SendTransactionMutate<import('wagmi').Config, unknown>;
|
|
67
|
+
hash: `0x${string}` | undefined;
|
|
68
|
+
signTransaction: import('wagmi/query').SendTransactionMutateAsync<import('wagmi').Config, unknown>;
|
|
69
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const wagmi = require("wagmi");
|
|
5
|
+
const useSignTransaction = () => {
|
|
6
|
+
const {
|
|
7
|
+
data: hash,
|
|
8
|
+
sendTransactionAsync: signTransaction,
|
|
9
|
+
...rest
|
|
10
|
+
} = wagmi.useSendTransaction();
|
|
11
|
+
return {
|
|
12
|
+
hash,
|
|
13
|
+
signTransaction,
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
exports.useSignTransaction = useSignTransaction;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useSendTransaction } from "wagmi";
|
|
2
|
+
const useSignTransaction = () => {
|
|
3
|
+
const {
|
|
4
|
+
data: hash,
|
|
5
|
+
sendTransactionAsync: signTransaction,
|
|
6
|
+
...rest
|
|
7
|
+
} = useSendTransaction();
|
|
8
|
+
return {
|
|
9
|
+
hash,
|
|
10
|
+
signTransaction,
|
|
11
|
+
...rest
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
useSignTransaction
|
|
16
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const reactjs_hooks_validation_useAmountSchema = require("./useAmountSchema.js");
|
|
5
|
+
const reactjs_hooks_validation_useSecondAmountSchema = require("./useSecondAmountSchema.js");
|
|
6
|
+
const reactjs_hooks_validation_useTestHasEnoughFunds = require("./useTestHasEnoughFunds.js");
|
|
7
|
+
const reactjs_hooks_validation_useTestIsConnected = require("./useTestIsConnected.js");
|
|
8
|
+
exports.useAmountSchema = reactjs_hooks_validation_useAmountSchema.useAmountSchema;
|
|
9
|
+
exports.useSecondAmountSchema = reactjs_hooks_validation_useSecondAmountSchema.useSecondAmountSchema;
|
|
10
|
+
exports.useTestHasEnoughFunds = reactjs_hooks_validation_useTestHasEnoughFunds.useTestHasEnoughFunds;
|
|
11
|
+
exports.useTestIsConnected = reactjs_hooks_validation_useTestIsConnected.useTestIsConnected;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useAmountSchema } from "./useAmountSchema.mjs";
|
|
2
|
+
import { useSecondAmountSchema } from "./useSecondAmountSchema.mjs";
|
|
3
|
+
import { useTestHasEnoughFunds } from "./useTestHasEnoughFunds.mjs";
|
|
4
|
+
import { useTestIsConnected } from "./useTestIsConnected.mjs";
|
|
5
|
+
export {
|
|
6
|
+
useAmountSchema,
|
|
7
|
+
useSecondAmountSchema,
|
|
8
|
+
useTestHasEnoughFunds,
|
|
9
|
+
useTestIsConnected
|
|
10
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const yup = require("yup");
|
|
5
|
+
const reactjs_hooks_validation_useTestHasEnoughFunds = require("./useTestHasEnoughFunds.js");
|
|
6
|
+
const reactjs_hooks_validation_useTestIsConnected = require("./useTestIsConnected.js");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const yup__namespace = /* @__PURE__ */ _interopNamespaceDefault(yup);
|
|
24
|
+
const useAmountSchema = () => {
|
|
25
|
+
const testHasEnoughFunds = reactjs_hooks_validation_useTestHasEnoughFunds.useTestHasEnoughFunds();
|
|
26
|
+
const testIsConnected = reactjs_hooks_validation_useTestIsConnected.useTestIsConnected();
|
|
27
|
+
const testStartDot = (value) => !(value == null ? void 0 : value.startsWith("."));
|
|
28
|
+
const testEndDot = (value) => !(value == null ? void 0 : value.endsWith("."));
|
|
29
|
+
return yup__namespace.string().required("Amount is a required field").test("account", testIsConnected).test("startDot", "Amount must not start with dot", testStartDot).test("endDot", "Amount must not end with dot", testEndDot).test("funds", testHasEnoughFunds);
|
|
30
|
+
};
|
|
31
|
+
exports.useAmountSchema = useAmountSchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as yup from "yup";
|
|
2
|
+
import { useTestHasEnoughFunds } from "./useTestHasEnoughFunds.mjs";
|
|
3
|
+
import { useTestIsConnected } from "./useTestIsConnected.mjs";
|
|
4
|
+
const useAmountSchema = () => {
|
|
5
|
+
const testHasEnoughFunds = useTestHasEnoughFunds();
|
|
6
|
+
const testIsConnected = useTestIsConnected();
|
|
7
|
+
const testStartDot = (value) => !(value == null ? void 0 : value.startsWith("."));
|
|
8
|
+
const testEndDot = (value) => !(value == null ? void 0 : value.endsWith("."));
|
|
9
|
+
return yup.string().required("Amount is a required field").test("account", testIsConnected).test("startDot", "Amount must not start with dot", testStartDot).test("endDot", "Amount must not end with dot", testEndDot).test("funds", testHasEnoughFunds);
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
useAmountSchema
|
|
13
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const yup = require("yup");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const yup__namespace = /* @__PURE__ */ _interopNamespaceDefault(yup);
|
|
22
|
+
const useSecondAmountSchema = () => {
|
|
23
|
+
const testStartDot = (value) => !(value == null ? void 0 : value.startsWith("."));
|
|
24
|
+
const testEndDot = (value) => !(value == null ? void 0 : value.endsWith("."));
|
|
25
|
+
return yup__namespace.string().required("Amount is a required field").test("startDot", "Amount must not start with dot", testStartDot).test("endDot", "Amount must not end with dot", testEndDot);
|
|
26
|
+
};
|
|
27
|
+
exports.useSecondAmountSchema = useSecondAmountSchema;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as yup from "yup";
|
|
2
|
+
const useSecondAmountSchema = () => {
|
|
3
|
+
const testStartDot = (value) => !(value == null ? void 0 : value.startsWith("."));
|
|
4
|
+
const testEndDot = (value) => !(value == null ? void 0 : value.endsWith("."));
|
|
5
|
+
return yup.string().required("Amount is a required field").test("startDot", "Amount must not start with dot", testStartDot).test("endDot", "Amount must not end with dot", testEndDot);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
useSecondAmountSchema
|
|
9
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require$$0 = require("react");
|
|
5
|
+
const reactjs_utils_hasEnoughFunds = require("../../utils/hasEnoughFunds.js");
|
|
6
|
+
const reactjs_utils_testNumber = require("../../utils/testNumber.js");
|
|
7
|
+
const useTestHasEnoughFunds = () => {
|
|
8
|
+
const shouldThrow = require$$0.useCallback(
|
|
9
|
+
(value, context) => {
|
|
10
|
+
if (!reactjs_utils_testNumber.testNumber(value)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const asset = context.parent.firstToken;
|
|
14
|
+
const balance = (asset == null ? void 0 : asset.balance) ?? "0";
|
|
15
|
+
const decimals = asset == null ? void 0 : asset.decimals;
|
|
16
|
+
const hasFunds = reactjs_utils_hasEnoughFunds.hasEnoughFunds({
|
|
17
|
+
balance: balance ?? "0",
|
|
18
|
+
amount: value ?? "0",
|
|
19
|
+
decimals
|
|
20
|
+
});
|
|
21
|
+
return !hasFunds;
|
|
22
|
+
},
|
|
23
|
+
[]
|
|
24
|
+
);
|
|
25
|
+
return require$$0.useCallback(
|
|
26
|
+
(value, context) => {
|
|
27
|
+
if (!shouldThrow(value, context)) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return context.createError({
|
|
31
|
+
message: "Not enough funds",
|
|
32
|
+
path: context.path
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
[shouldThrow]
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
exports.useTestHasEnoughFunds = useTestHasEnoughFunds;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { hasEnoughFunds } from "../../utils/hasEnoughFunds.mjs";
|
|
3
|
+
import { testNumber } from "../../utils/testNumber.mjs";
|
|
4
|
+
const useTestHasEnoughFunds = () => {
|
|
5
|
+
const shouldThrow = useCallback(
|
|
6
|
+
(value, context) => {
|
|
7
|
+
if (!testNumber(value)) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
const asset = context.parent.firstToken;
|
|
11
|
+
const balance = (asset == null ? void 0 : asset.balance) ?? "0";
|
|
12
|
+
const decimals = asset == null ? void 0 : asset.decimals;
|
|
13
|
+
const hasFunds = hasEnoughFunds({
|
|
14
|
+
balance: balance ?? "0",
|
|
15
|
+
amount: value ?? "0",
|
|
16
|
+
decimals
|
|
17
|
+
});
|
|
18
|
+
return !hasFunds;
|
|
19
|
+
},
|
|
20
|
+
[]
|
|
21
|
+
);
|
|
22
|
+
return useCallback(
|
|
23
|
+
(value, context) => {
|
|
24
|
+
if (!shouldThrow(value, context)) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return context.createError({
|
|
28
|
+
message: "Not enough funds",
|
|
29
|
+
path: context.path
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
[shouldThrow]
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
useTestHasEnoughFunds
|
|
37
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require$$0 = require("react");
|
|
5
|
+
const reactjs_hooks_useAccount = require("../useAccount.js");
|
|
6
|
+
const useTestIsConnected = () => {
|
|
7
|
+
const { address } = reactjs_hooks_useAccount.useAccount();
|
|
8
|
+
return require$$0.useCallback(
|
|
9
|
+
(_value, context) => {
|
|
10
|
+
if (Boolean(address)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return context.createError({
|
|
14
|
+
message: "Please connect your wallet",
|
|
15
|
+
path: context.path
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
[address]
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
exports.useTestIsConnected = useTestIsConnected;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { useAccount } from "../useAccount.mjs";
|
|
3
|
+
const useTestIsConnected = () => {
|
|
4
|
+
const { address } = useAccount();
|
|
5
|
+
return useCallback(
|
|
6
|
+
(_value, context) => {
|
|
7
|
+
if (Boolean(address)) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
return context.createError({
|
|
11
|
+
message: "Please connect your wallet",
|
|
12
|
+
path: context.path
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
[address]
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
useTestIsConnected
|
|
20
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './constants';
|
|
3
|
+
export * from './context/Web3AppProvider';
|
|
4
|
+
export * from './context/useWeb3App';
|
|
5
|
+
export * from './context/queryClient';
|
|
6
|
+
export * from './hooks';
|
|
7
|
+
export * from './init';
|
|
8
|
+
export * from './queries';
|
|
9
|
+
export * from './utils';
|
|
10
|
+
export * from './reexports';
|
package/reactjs/index.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const reactjs_components_AccountAddress_AccountAddress = require("./components/AccountAddress/AccountAddress.js");
|
|
5
|
+
const reactjs_components_AmountCard_AmountCard = require("./components/AmountCard/AmountCard.js");
|
|
6
|
+
const reactjs_components_AmountInput_AmountInput = require("./components/AmountInput/AmountInput.js");
|
|
7
|
+
const reactjs_components_base_MxButton_MxButton = require("./components/base/MxButton/MxButton.js");
|
|
8
|
+
const reactjs_components_base_MxCard_MxCard = require("./components/base/MxCard/MxCard.js");
|
|
9
|
+
const reactjs_components_base_MxLink_MxLink = require("./components/base/MxLink/MxLink.js");
|
|
10
|
+
const reactjs_components_base_MxSearch_MxSearch = require("./components/base/MxSearch/MxSearch.js");
|
|
11
|
+
const reactjs_components_base_MxSlideover_MxSlideover = require("./components/base/MxSlideover/MxSlideover.js");
|
|
12
|
+
const reactjs_components_base_MxTooltip_MxTooltip = require("./components/base/MxTooltip/MxTooltip.js");
|
|
13
|
+
const reactjs_components_BridgeForm_BridgeForm = require("./components/BridgeForm/BridgeForm.js");
|
|
14
|
+
const reactjs_components_BridgeHistory_BridgeHistory = require("./components/BridgeHistory/BridgeHistory.js");
|
|
15
|
+
const reactjs_components_Connect_BridgeConnectButton = require("./components/Connect/BridgeConnectButton.js");
|
|
16
|
+
const reactjs_components_Connect_CustomConnectButton = require("./components/Connect/CustomConnectButton.js");
|
|
17
|
+
const reactjs_components_Connect_MvxConnectButton = require("./components/Connect/MvxConnectButton.js");
|
|
18
|
+
const reactjs_components_Connect_SwitchChainButton = require("./components/Connect/SwitchChainButton.js");
|
|
19
|
+
const reactjs_components_Connect_BridgeAccountDisplay = require("./components/Connect/BridgeAccountDisplay.js");
|
|
20
|
+
const reactjs_components_Connect_MvxAccountDisplay = require("./components/Connect/MvxAccountDisplay.js");
|
|
21
|
+
const reactjs_components_CopyButton_CopyButton = require("./components/CopyButton/CopyButton.js");
|
|
22
|
+
const reactjs_components_DisplayAmount_DisplayAmount = require("./components/DisplayAmount/DisplayAmount.js");
|
|
23
|
+
const reactjs_components_SmallLoader_SmallLoader = require("./components/SmallLoader/SmallLoader.js");
|
|
24
|
+
const reactjs_components_TokenSelector_TokenSelector = require("./components/TokenSelector/TokenSelector.js");
|
|
25
|
+
const reactjs_components_TransactionToast_TransactionToastContainer = require("./components/TransactionToast/TransactionToastContainer.js");
|
|
26
|
+
const reactjs_components_TransactionToast_TransactionToast = require("./components/TransactionToast/TransactionToast.js");
|
|
27
|
+
const reactjs_components_TrimAddress_TrimAddress = require("./components/TrimAddress/TrimAddress.js");
|
|
28
|
+
const reactjs_constants_index = require("./constants/index.js");
|
|
29
|
+
const reactjs_context_Web3AppProvider = require("./context/Web3AppProvider.js");
|
|
30
|
+
const reactjs_context_useWeb3App = require("./context/useWeb3App.js");
|
|
31
|
+
const reactjs_context_queryClient = require("./context/queryClient.js");
|
|
32
|
+
const reactjs_hooks_validation_useAmountSchema = require("./hooks/validation/useAmountSchema.js");
|
|
33
|
+
const reactjs_hooks_validation_useSecondAmountSchema = require("./hooks/validation/useSecondAmountSchema.js");
|
|
34
|
+
const reactjs_hooks_validation_useTestHasEnoughFunds = require("./hooks/validation/useTestHasEnoughFunds.js");
|
|
35
|
+
const reactjs_hooks_validation_useTestIsConnected = require("./hooks/validation/useTestIsConnected.js");
|
|
36
|
+
const reactjs_hooks_useAccount = require("./hooks/useAccount.js");
|
|
37
|
+
const reactjs_hooks_useBalances = require("../useBalances-Bxtc4GNK.js");
|
|
38
|
+
const reactjs_hooks_useBridgeFormik = require("./hooks/useBridgeFormik.js");
|
|
39
|
+
const reactjs_hooks_useDebounce = require("./hooks/useDebounce.js");
|
|
40
|
+
const reactjs_hooks_useFetchBridgeData = require("./hooks/useFetchBridgeData.js");
|
|
41
|
+
const reactjs_hooks_useFetchTokens = require("./hooks/useFetchTokens.js");
|
|
42
|
+
const reactjs_hooks_useGetChainId = require("./hooks/useGetChainId.js");
|
|
43
|
+
const reactjs_hooks_useResolveTokenChain = require("./hooks/useResolveTokenChain.js");
|
|
44
|
+
const reactjs_hooks_useSendTransactions = require("./hooks/useSendTransactions.js");
|
|
45
|
+
const reactjs_hooks_useSignTransaction = require("./hooks/useSignTransaction.js");
|
|
46
|
+
const reactjs_init_init = require("./init/init.js");
|
|
47
|
+
const reactjs_queries_useGetAllTokens_query = require("./queries/useGetAllTokens.query.js");
|
|
48
|
+
const reactjs_queries_useGetChains_query = require("./queries/useGetChains.query.js");
|
|
49
|
+
const reactjs_queries_useGetEvmTokensBalances_query = require("./queries/useGetEvmTokensBalances.query.js");
|
|
50
|
+
const reactjs_queries_useGetHistory_query = require("./queries/useGetHistory.query.js");
|
|
51
|
+
const reactjs_queries_useGetMvxTokensBalances_query = require("./queries/useGetMvxTokensBalances.query.js");
|
|
52
|
+
const reactjs_queries_useGetRate_mutation = require("./queries/useGetRate.mutation.js");
|
|
53
|
+
const reactjs_queries_useGetTokens_query = require("./queries/useGetTokens.query.js");
|
|
54
|
+
const reactjs_utils_delay = require("./utils/delay.js");
|
|
55
|
+
const reactjs_utils_formatAmount = require("./utils/formatAmount.js");
|
|
56
|
+
const reactjs_utils_getCleanStringAmount = require("./utils/getCleanStringAmount.js");
|
|
57
|
+
const reactjs_utils_getCompletePathname = require("./utils/getCompletePathname.js");
|
|
58
|
+
const reactjs_utils_getInitialTokens = require("./utils/getInitialTokens.js");
|
|
59
|
+
const reactjs_utils_hasEnoughFunds = require("./utils/hasEnoughFunds.js");
|
|
60
|
+
const reactjs_utils_isStringFloat = require("./utils/isStringFloat.js");
|
|
61
|
+
const reactjs_utils_mxClsx = require("./utils/mxClsx.js");
|
|
62
|
+
const reactjs_utils_pipe = require("./utils/pipe.js");
|
|
63
|
+
const reactjs_utils_removeCommas = require("./utils/removeCommas.js");
|
|
64
|
+
const reactjs_utils_roundAmount = require("./utils/roundAmount.js");
|
|
65
|
+
const reactjs_utils_testNumber = require("./utils/testNumber.js");
|
|
66
|
+
const react$1 = require("../react-BaXyw3AO.js");
|
|
67
|
+
const wagmi = require("wagmi");
|
|
68
|
+
const reactjs_constants_chains = require("./constants/chains.js");
|
|
69
|
+
const index = require("../index-DZHiA1sX.js");
|
|
70
|
+
const react = require("../react-CNXJSTCv.js");
|
|
71
|
+
exports.AccountAddress = reactjs_components_AccountAddress_AccountAddress.AccountAddress;
|
|
72
|
+
exports.AmountCard = reactjs_components_AmountCard_AmountCard.AmountCard;
|
|
73
|
+
exports.AmountInput = reactjs_components_AmountInput_AmountInput.AmountInput;
|
|
74
|
+
exports.MxButton = reactjs_components_base_MxButton_MxButton.MxButton;
|
|
75
|
+
exports.MxCard = reactjs_components_base_MxCard_MxCard.MxCard;
|
|
76
|
+
exports.MxLink = reactjs_components_base_MxLink_MxLink.MxLink;
|
|
77
|
+
exports.MxSearch = reactjs_components_base_MxSearch_MxSearch.MxSearch;
|
|
78
|
+
exports.MxSlideover = reactjs_components_base_MxSlideover_MxSlideover.MxSlideover;
|
|
79
|
+
exports.MxTooltip = reactjs_components_base_MxTooltip_MxTooltip.MxTooltip;
|
|
80
|
+
exports.BridgeForm = reactjs_components_BridgeForm_BridgeForm.BridgeForm;
|
|
81
|
+
exports.BridgeHistory = reactjs_components_BridgeHistory_BridgeHistory.BridgeHistory;
|
|
82
|
+
exports.BridgeConnectButton = reactjs_components_Connect_BridgeConnectButton.BridgeConnectButton;
|
|
83
|
+
exports.CustomConnectButton = reactjs_components_Connect_CustomConnectButton.CustomConnectButton;
|
|
84
|
+
exports.MvxConnectButton = reactjs_components_Connect_MvxConnectButton.MvxConnectButton;
|
|
85
|
+
exports.SwitchChainButton = reactjs_components_Connect_SwitchChainButton.SwitchChainButton;
|
|
86
|
+
exports.BridgeAccountDisplay = reactjs_components_Connect_BridgeAccountDisplay.BridgeAccountDisplay;
|
|
87
|
+
exports.MvxAccountDisplay = reactjs_components_Connect_MvxAccountDisplay.MvxAccountDisplay;
|
|
88
|
+
exports.CopyButton = reactjs_components_CopyButton_CopyButton.CopyButton;
|
|
89
|
+
exports.DisplayAmount = reactjs_components_DisplayAmount_DisplayAmount.DisplayAmount;
|
|
90
|
+
exports.SmallLoader = reactjs_components_SmallLoader_SmallLoader.SmallLoader;
|
|
91
|
+
exports.TokenSelector = reactjs_components_TokenSelector_TokenSelector.TokenSelector;
|
|
92
|
+
exports.TransactionToastContainer = reactjs_components_TransactionToast_TransactionToastContainer.TransactionToastContainer;
|
|
93
|
+
exports.TransactionToast = reactjs_components_TransactionToast_TransactionToast.TransactionToast;
|
|
94
|
+
exports.TrimAddress = reactjs_components_TrimAddress_TrimAddress.TrimAddress;
|
|
95
|
+
exports.safeDocument = reactjs_constants_index.safeDocument;
|
|
96
|
+
exports.safeWindow = reactjs_constants_index.safeWindow;
|
|
97
|
+
exports.Web3AppContext = reactjs_context_Web3AppProvider.Web3AppContext;
|
|
98
|
+
exports.Web3AppProvider = reactjs_context_Web3AppProvider.Web3AppProvider;
|
|
99
|
+
exports.useWeb3App = reactjs_context_useWeb3App.useWeb3App;
|
|
100
|
+
exports.getQueryClient = reactjs_context_queryClient.getQueryClient;
|
|
101
|
+
exports.useAmountSchema = reactjs_hooks_validation_useAmountSchema.useAmountSchema;
|
|
102
|
+
exports.useSecondAmountSchema = reactjs_hooks_validation_useSecondAmountSchema.useSecondAmountSchema;
|
|
103
|
+
exports.useTestHasEnoughFunds = reactjs_hooks_validation_useTestHasEnoughFunds.useTestHasEnoughFunds;
|
|
104
|
+
exports.useTestIsConnected = reactjs_hooks_validation_useTestIsConnected.useTestIsConnected;
|
|
105
|
+
exports.useAccount = reactjs_hooks_useAccount.useAccount;
|
|
106
|
+
exports.useBalances = reactjs_hooks_useBalances.useBalances;
|
|
107
|
+
exports.BridgeFormikValuesEnum = reactjs_hooks_useBridgeFormik.BridgeFormikValuesEnum;
|
|
108
|
+
exports.useBridgeFormik = reactjs_hooks_useBridgeFormik.useBridgeFormik;
|
|
109
|
+
exports.useDebounce = reactjs_hooks_useDebounce.useDebounce;
|
|
110
|
+
exports.useFetchBridgeData = reactjs_hooks_useFetchBridgeData.useFetchBridgeData;
|
|
111
|
+
exports.useFetchTokens = reactjs_hooks_useFetchTokens.useFetchTokens;
|
|
112
|
+
exports.useGetChainId = reactjs_hooks_useGetChainId.useGetChainId;
|
|
113
|
+
exports.useResolveTokenChain = reactjs_hooks_useResolveTokenChain.useResolveTokenChain;
|
|
114
|
+
exports.useSendTransactions = reactjs_hooks_useSendTransactions.useSendTransactions;
|
|
115
|
+
exports.useSignTransaction = reactjs_hooks_useSignTransaction.useSignTransaction;
|
|
116
|
+
exports.init = reactjs_init_init.init;
|
|
117
|
+
exports.useGetAllTokensQuery = reactjs_queries_useGetAllTokens_query.useGetAllTokensQuery;
|
|
118
|
+
exports.useGetChainsQuery = reactjs_queries_useGetChains_query.useGetChainsQuery;
|
|
119
|
+
exports.invalidateEvmTokensBalances = reactjs_queries_useGetEvmTokensBalances_query.invalidateEvmTokensBalances;
|
|
120
|
+
exports.useGetEvmTokensBalancesQuery = reactjs_queries_useGetEvmTokensBalances_query.useGetEvmTokensBalancesQuery;
|
|
121
|
+
exports.invalidateHistoryQuery = reactjs_queries_useGetHistory_query.invalidateHistoryQuery;
|
|
122
|
+
exports.useGetHistoryQuery = reactjs_queries_useGetHistory_query.useGetHistoryQuery;
|
|
123
|
+
exports.invalidateMvxTokensBalancesQuery = reactjs_queries_useGetMvxTokensBalances_query.invalidateMvxTokensBalancesQuery;
|
|
124
|
+
exports.useGetMvxTokensBalancesQuery = reactjs_queries_useGetMvxTokensBalances_query.useGetMvxTokensBalancesQuery;
|
|
125
|
+
exports.useGetRateMutation = reactjs_queries_useGetRate_mutation.useGetRateMutation;
|
|
126
|
+
exports.useGetTokensQuery = reactjs_queries_useGetTokens_query.useGetTokensQuery;
|
|
127
|
+
exports.delay = reactjs_utils_delay.delay;
|
|
128
|
+
exports.formatAmount = reactjs_utils_formatAmount.formatAmount;
|
|
129
|
+
exports.getCleanStringAmount = reactjs_utils_getCleanStringAmount.getCleanStringAmount;
|
|
130
|
+
exports.getCompletePathname = reactjs_utils_getCompletePathname.getCompletePathname;
|
|
131
|
+
exports.getInitialTokens = reactjs_utils_getInitialTokens.getInitialTokens;
|
|
132
|
+
exports.hasEnoughFunds = reactjs_utils_hasEnoughFunds.hasEnoughFunds;
|
|
133
|
+
exports.isStringFloat = reactjs_utils_isStringFloat.isStringFloat;
|
|
134
|
+
exports.mxClsx = reactjs_utils_mxClsx.mxClsx;
|
|
135
|
+
exports.pipe = reactjs_utils_pipe.pipe;
|
|
136
|
+
exports.removeCommas = reactjs_utils_removeCommas.removeCommas;
|
|
137
|
+
exports.roundAmount = reactjs_utils_roundAmount.roundAmount;
|
|
138
|
+
exports.testNumber = reactjs_utils_testNumber.testNumber;
|
|
139
|
+
exports.useAppKitNetwork = react$1.useAppKitNetwork;
|
|
140
|
+
Object.defineProperty(exports, "useWaitForTransactionReceipt", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: () => wagmi.useWaitForTransactionReceipt
|
|
143
|
+
});
|
|
144
|
+
exports.chainIdentifier = reactjs_constants_chains.chainIdentifier;
|
|
145
|
+
exports.useAppKit = index.useAppKit;
|
|
146
|
+
exports.useAppKitEvents = index.useAppKitEvents;
|
|
147
|
+
exports.useAppKitProvider = index.useAppKitProvider;
|
|
148
|
+
exports.useAppKitState = index.useAppKitState;
|
|
149
|
+
exports.useAppKitTheme = index.useAppKitTheme;
|
|
150
|
+
exports.useWalletInfo = index.useWalletInfo;
|
|
151
|
+
exports.useAppKitAccount = react.useAppKitAccount;
|
|
152
|
+
exports.useAppKitNetworkCore = react.useAppKitNetworkCore;
|
|
153
|
+
exports.useDisconnect = react.useDisconnect;
|