@multiversx/sdk-dapp-liquidity 2.1.0-alpha.0 → 2.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all-networks--dfVLHLJ.js +2 -0
- package/all-networks-Czd8zS1n.mjs +4 -0
- package/api/checkAccount.js +1 -21
- package/api/checkAccount.mjs +13 -13
- package/api/confirmRate.js +1 -29
- package/api/confirmRate.mjs +17 -22
- package/api/getChains.js +1 -17
- package/api/getChains.mjs +10 -10
- package/api/getRate.js +1 -27
- package/api/getRate.mjs +17 -20
- package/api/getTokens.js +1 -22
- package/api/getTokens.mjs +14 -15
- package/api/getTokensBalances.js +1 -21
- package/api/getTokensBalances.mjs +13 -13
- package/api/getTransactions.js +1 -38
- package/api/getTransactions.mjs +25 -31
- package/api/index.js +1 -18
- package/api/index.mjs +16 -16
- package/api/sendTransactions.js +1 -32
- package/api/sendTransactions.mjs +19 -19
- package/api/tests/confirmRate.spec.js +1 -130
- package/api/tests/confirmRate.spec.mjs +44 -58
- package/api/tests/getChains.spec.js +1 -43
- package/api/tests/getChains.spec.mjs +15 -18
- package/api/tests/getRate.spec.js +1 -87
- package/api/tests/getRate.spec.mjs +35 -49
- package/api/tests/getTokens.spec.js +1 -68
- package/api/tests/getTokens.spec.mjs +23 -29
- package/api/tests/getTransactions.spec.js +1 -94
- package/api/tests/getTransactions.spec.mjs +35 -51
- package/api/tests/sendTransactions.spec.js +1 -96
- package/api/tests/sendTransactions.spec.mjs +44 -52
- package/constants/index.js +1 -4
- package/constants/index.mjs +2 -2
- package/default-D0Jk5ROI.mjs +4 -0
- package/default-DbU6vPaB.js +2 -0
- package/helpers/assertRateConfirmationMatchesIntent.js +1 -23
- package/helpers/assertRateConfirmationMatchesIntent.mjs +13 -16
- package/helpers/base64Utils.js +1 -31
- package/helpers/base64Utils.mjs +14 -24
- package/helpers/decodeLoginToken.js +1 -27
- package/helpers/decodeLoginToken.mjs +13 -18
- package/helpers/decodeToken.js +1 -39
- package/helpers/decodeToken.mjs +20 -31
- package/helpers/getApiURL.js +1 -7
- package/helpers/getApiURL.mjs +3 -5
- package/helpers/getBridgeURL.js +1 -7
- package/helpers/getBridgeURL.mjs +3 -5
- package/helpers/getDisplayName.js +1 -11
- package/helpers/getDisplayName.mjs +3 -8
- package/helpers/getMvxApiURL.js +1 -7
- package/helpers/getMvxApiURL.mjs +3 -5
- package/helpers/getMvxChainId.js +1 -7
- package/helpers/getMvxChainId.mjs +3 -5
- package/helpers/getMvxExplorerAddress.js +1 -7
- package/helpers/getMvxExplorerAddress.mjs +3 -5
- package/helpers/index.js +1 -26
- package/helpers/index.mjs +24 -24
- package/helpers/safeImageUrl.js +1 -23
- package/helpers/safeImageUrl.mjs +10 -20
- package/helpers/serializeTransaction.js +1 -8
- package/helpers/serializeTransaction.mjs +3 -5
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +1 -63
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +31 -41
- package/helpers/tests/base64Utils.spec.js +1 -29
- package/helpers/tests/base64Utils.spec.mjs +11 -24
- package/helpers/tests/decodeLoginToken.spec.js +1 -34
- package/helpers/tests/decodeLoginToken.spec.mjs +13 -24
- package/helpers/tests/decodeToken.spec.js +1 -27
- package/helpers/tests/decodeToken.spec.mjs +7 -12
- package/helpers/tests/safeImageUrl.spec.js +1 -48
- package/helpers/tests/safeImageUrl.spec.mjs +28 -43
- package/helpers/tests/serializeTransaction.spec.js +1 -36
- package/helpers/tests/serializeTransaction.spec.mjs +13 -24
- package/index.js +1 -232
- package/index.mjs +196 -196
- package/package.json +3 -3
- package/react.esm-B0AMOHxa.js +73 -0
- package/react.esm-BxvJJ86Q.mjs +9949 -0
- package/reactjs/adapters/SuiAdapter.js +1 -378
- package/reactjs/adapters/SuiAdapter.mjs +160 -217
- package/reactjs/components/AccountAddress/AccountAddress.js +1 -31
- package/reactjs/components/AccountAddress/AccountAddress.mjs +16 -16
- package/reactjs/components/AccountAddress/index.js +1 -4
- package/reactjs/components/AccountAddress/index.mjs +2 -2
- package/reactjs/components/AmountCard/AmountCard.js +1 -33
- package/reactjs/components/AmountCard/AmountCard.mjs +19 -21
- package/reactjs/components/AmountCard/index.js +1 -4
- package/reactjs/components/AmountCard/index.mjs +2 -2
- package/reactjs/components/AmountInput/AmountInput.js +1 -71
- package/reactjs/components/AmountInput/AmountInput.mjs +42 -46
- package/reactjs/components/AmountInput/index.js +1 -4
- package/reactjs/components/AmountInput/index.mjs +2 -2
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +9 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +1 -89
- package/reactjs/components/BridgeForm/BridgeForm.mjs +72 -79
- package/reactjs/components/BridgeForm/Deposit.js +1 -675
- package/reactjs/components/BridgeForm/Deposit.mjs +380 -504
- package/reactjs/components/BridgeForm/Transfer.js +1 -561
- package/reactjs/components/BridgeForm/Transfer.mjs +315 -428
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -78
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +47 -70
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -58
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +36 -47
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -266
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +163 -231
- package/reactjs/components/BridgeForm/index.js +1 -4
- package/reactjs/components/BridgeForm/index.mjs +2 -2
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -76
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +35 -65
- package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -381
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +170 -200
- package/reactjs/components/BridgeHistory/index.js +1 -4
- package/reactjs/components/BridgeHistory/index.mjs +2 -2
- package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -150
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +99 -115
- package/reactjs/components/Connect/BridgeConnectButton.js +1 -35
- package/reactjs/components/Connect/BridgeConnectButton.mjs +20 -20
- package/reactjs/components/Connect/ChainSelectConnect.js +1 -144
- package/reactjs/components/Connect/ChainSelectConnect.mjs +70 -83
- package/reactjs/components/Connect/CustomConnectButton.js +1 -40
- package/reactjs/components/Connect/CustomConnectButton.mjs +24 -30
- package/reactjs/components/Connect/MvxAccountDisplay.js +1 -97
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +47 -50
- package/reactjs/components/Connect/MvxConnectButton.js +1 -43
- package/reactjs/components/Connect/MvxConnectButton.mjs +35 -40
- package/reactjs/components/Connect/SwitchChainButton.js +1 -29
- package/reactjs/components/Connect/SwitchChainButton.mjs +15 -18
- package/reactjs/components/Connect/index.js +1 -16
- package/reactjs/components/Connect/index.mjs +14 -14
- package/reactjs/components/CopyButton/CopyButton.js +1 -46
- package/reactjs/components/CopyButton/CopyButton.mjs +33 -36
- package/reactjs/components/CopyButton/index.js +1 -4
- package/reactjs/components/CopyButton/index.mjs +2 -2
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -38
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -32
- package/reactjs/components/CopyButton/utils/index.js +1 -4
- package/reactjs/components/CopyButton/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -90
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +68 -75
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -39
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +26 -33
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -61
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +38 -46
- package/reactjs/components/DisplayAmount/index.js +1 -4
- package/reactjs/components/DisplayAmount/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/index.js +1 -4
- package/reactjs/components/DisplayAmount/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -21
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +9 -13
- package/reactjs/components/Error/Error.js +1 -66
- package/reactjs/components/Error/Error.mjs +29 -29
- package/reactjs/components/Error/index.js +1 -4
- package/reactjs/components/Error/index.mjs +2 -2
- package/reactjs/components/SmallLoader/SmallLoader.js +1 -21
- package/reactjs/components/SmallLoader/SmallLoader.mjs +13 -18
- package/reactjs/components/SmallLoader/index.js +1 -4
- package/reactjs/components/SmallLoader/index.mjs +2 -2
- package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -30
- package/reactjs/components/ToggleDirection/ToggleDirection.mjs +22 -28
- package/reactjs/components/TokenSelector/TokenSelector.js +1 -172
- package/reactjs/components/TokenSelector/TokenSelector.mjs +98 -118
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -94
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +48 -57
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -55
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +45 -48
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -18
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +9 -14
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -6
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +2 -4
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -43
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +21 -21
- package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -40
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +36 -38
- package/reactjs/components/TokenSelector/components/SelectContent.js +1 -136
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +79 -103
- package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -28
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +22 -24
- package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -82
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +52 -58
- package/reactjs/components/TokenSelector/components/TokenItem.js +1 -80
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +41 -54
- package/reactjs/components/TokenSelector/components/TokenList.js +1 -23
- package/reactjs/components/TokenSelector/components/TokenList.mjs +19 -21
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -25
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +14 -15
- package/reactjs/components/TokenSelector/index.js +1 -4
- package/reactjs/components/TokenSelector/index.mjs +2 -2
- package/reactjs/components/TransactionToast/TransactionToast.js +1 -53
- package/reactjs/components/TransactionToast/TransactionToast.mjs +27 -28
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -20
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +16 -18
- package/reactjs/components/TransactionToast/index.js +1 -6
- package/reactjs/components/TransactionToast/index.mjs +4 -4
- package/reactjs/components/TrimAddress/TrimAddress.js +1 -27
- package/reactjs/components/TrimAddress/TrimAddress.mjs +19 -24
- package/reactjs/components/TrimAddress/index.js +1 -4
- package/reactjs/components/TrimAddress/index.mjs +2 -2
- package/reactjs/components/base/MxButton/MxButton.js +1 -71
- package/reactjs/components/base/MxButton/MxButton.mjs +46 -46
- package/reactjs/components/base/MxButton/index.js +1 -4
- package/reactjs/components/base/MxButton/index.mjs +2 -2
- package/reactjs/components/base/MxCard/MxCard.js +1 -54
- package/reactjs/components/base/MxCard/MxCard.mjs +34 -34
- package/reactjs/components/base/MxCard/index.js +1 -4
- package/reactjs/components/base/MxCard/index.mjs +2 -2
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -28
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +24 -26
- package/reactjs/components/base/MxCircleLoader/index.js +1 -4
- package/reactjs/components/base/MxCircleLoader/index.mjs +2 -2
- package/reactjs/components/base/MxLink/MxLink.js +1 -70
- package/reactjs/components/base/MxLink/MxLink.mjs +44 -46
- package/reactjs/components/base/MxLink/index.js +1 -4
- package/reactjs/components/base/MxLink/index.mjs +2 -2
- package/reactjs/components/base/MxSearch/MxSearch.js +1 -69
- package/reactjs/components/base/MxSearch/MxSearch.mjs +37 -41
- package/reactjs/components/base/MxSearch/index.js +1 -4
- package/reactjs/components/base/MxSearch/index.mjs +2 -2
- package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -78
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +72 -74
- package/reactjs/components/base/MxSlideover/index.js +1 -4
- package/reactjs/components/base/MxSlideover/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -163
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +92 -135
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -33
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +29 -31
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -27
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +23 -25
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/index.js +1 -6
- package/reactjs/components/base/MxTooltip/components/index.mjs +4 -4
- package/reactjs/components/base/MxTooltip/index.js +1 -4
- package/reactjs/components/base/MxTooltip/index.mjs +2 -2
- package/reactjs/components/base/index.js +1 -14
- package/reactjs/components/base/index.mjs +12 -12
- package/reactjs/components/index.js +1 -54
- package/reactjs/components/index.mjs +52 -52
- package/reactjs/constants/chains.js +1 -54
- package/reactjs/constants/chains.mjs +33 -52
- package/reactjs/constants/index.js +1 -13
- package/reactjs/constants/index.mjs +9 -10
- package/reactjs/context/Web3AppProvider.js +1 -42
- package/reactjs/context/Web3AppProvider.mjs +34 -36
- package/reactjs/context/queryClient.js +1 -11
- package/reactjs/context/queryClient.mjs +5 -8
- package/reactjs/context/useWeb3App.js +1 -12
- package/reactjs/context/useWeb3App.mjs +7 -8
- package/reactjs/helpers/index.js +1 -6
- package/reactjs/helpers/index.mjs +4 -4
- package/reactjs/helpers/resolveBridgeApiChainId.js +1 -40
- package/reactjs/helpers/resolveBridgeApiChainId.mjs +21 -34
- package/reactjs/hooks/index.js +1 -35
- package/reactjs/hooks/index.mjs +33 -33
- package/reactjs/hooks/tests/useGenericSignMessage.spec.js +1 -68
- package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +23 -38
- package/reactjs/hooks/tests/useSignTransaction.spec.js +1 -195
- package/reactjs/hooks/tests/useSignTransaction.spec.mjs +72 -110
- package/reactjs/hooks/useAccount.js +1 -13
- package/reactjs/hooks/useAccount.mjs +7 -8
- package/reactjs/hooks/useBalances.js +1 -53
- package/reactjs/hooks/useBalances.mjs +28 -40
- package/reactjs/hooks/useBridgeApiChainId.js +1 -13
- package/reactjs/hooks/useBridgeApiChainId.mjs +9 -9
- package/reactjs/hooks/useBridgeFormik.js +1 -167
- package/reactjs/hooks/useBridgeFormik.mjs +110 -155
- package/reactjs/hooks/useDebounce.js +1 -13
- package/reactjs/hooks/useDebounce.mjs +8 -10
- package/reactjs/hooks/useFetchBridgeData.js +1 -45
- package/reactjs/hooks/useFetchBridgeData.mjs +37 -38
- package/reactjs/hooks/useFetchTokens.js +1 -115
- package/reactjs/hooks/useFetchTokens.mjs +80 -108
- package/reactjs/hooks/useGenericSignMessage.js +1 -75
- package/reactjs/hooks/useGenericSignMessage.mjs +44 -64
- package/reactjs/hooks/useGetChainId.js +1 -11
- package/reactjs/hooks/useGetChainId.mjs +7 -8
- package/reactjs/hooks/useResolveTokenChain.js +1 -20
- package/reactjs/hooks/useResolveTokenChain.mjs +11 -14
- package/reactjs/hooks/useSendTransactions.js +1 -25
- package/reactjs/hooks/useSendTransactions.mjs +19 -23
- package/reactjs/hooks/useSignTransaction.js +1 -112
- package/reactjs/hooks/useSignTransaction.mjs +50 -76
- package/reactjs/hooks/useSuiConnect.js +1 -86
- package/reactjs/hooks/useSuiConnect.mjs +52 -70
- package/reactjs/hooks/validation/index.js +1 -10
- package/reactjs/hooks/validation/index.mjs +8 -8
- package/reactjs/hooks/validation/useAmountSchema.js +1 -32
- package/reactjs/hooks/validation/useAmountSchema.mjs +8 -11
- package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -26
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -6
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -37
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -29
- package/reactjs/hooks/validation/useTestIsConnected.js +1 -27
- package/reactjs/hooks/validation/useTestIsConnected.mjs +13 -19
- package/reactjs/index.js +1 -190
- package/reactjs/index.mjs +154 -154
- package/reactjs/init/index.js +1 -5
- package/reactjs/init/index.mjs +3 -3
- package/reactjs/init/init.js +1 -147
- package/reactjs/init/init.mjs +57 -78
- package/reactjs/queries/index.js +1 -17
- package/reactjs/queries/index.mjs +15 -15
- package/reactjs/queries/useCheckAccount.query.js +1 -39
- package/reactjs/queries/useCheckAccount.query.mjs +29 -33
- package/reactjs/queries/useGetAllTokens.query.js +1 -35
- package/reactjs/queries/useGetAllTokens.query.mjs +26 -30
- package/reactjs/queries/useGetChains.query.js +1 -34
- package/reactjs/queries/useGetChains.query.mjs +26 -28
- package/reactjs/queries/useGetHistory.query.js +1 -69
- package/reactjs/queries/useGetHistory.query.mjs +53 -57
- package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -66
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +38 -46
- package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -81
- package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +49 -57
- package/reactjs/queries/useGetRate.mutation.js +1 -18
- package/reactjs/queries/useGetRate.mutation.mjs +12 -15
- package/reactjs/reexports.js +1 -48
- package/reactjs/reexports.mjs +13 -13
- package/reactjs/utils/delay.js +1 -6
- package/reactjs/utils/delay.mjs +3 -3
- package/reactjs/utils/formatAmount.js +1 -23
- package/reactjs/utils/formatAmount.mjs +16 -17
- package/reactjs/utils/getCleanStringAmount.js +1 -11
- package/reactjs/utils/getCleanStringAmount.mjs +6 -8
- package/reactjs/utils/getCompletePathname.js +1 -5
- package/reactjs/utils/getCompletePathname.mjs +3 -3
- package/reactjs/utils/getInitialTokens.js +1 -12
- package/reactjs/utils/getInitialTokens.mjs +6 -7
- package/reactjs/utils/hasEnoughFunds.js +1 -19
- package/reactjs/utils/hasEnoughFunds.mjs +11 -14
- package/reactjs/utils/index.js +1 -26
- package/reactjs/utils/index.mjs +24 -24
- package/reactjs/utils/isStringFloat.js +1 -21
- package/reactjs/utils/isStringFloat.mjs +11 -18
- package/reactjs/utils/mxClsx.js +1 -8
- package/reactjs/utils/mxClsx.mjs +4 -6
- package/reactjs/utils/pipe.js +1 -25
- package/reactjs/utils/pipe.mjs +13 -17
- package/reactjs/utils/removeCommas.js +1 -6
- package/reactjs/utils/removeCommas.mjs +2 -4
- package/reactjs/utils/roundAmount.js +1 -40
- package/reactjs/utils/roundAmount.mjs +16 -36
- package/reactjs/utils/testNumber.js +1 -4
- package/reactjs/utils/testNumber.mjs +2 -2
- package/store/inMemoryStore.js +1 -39
- package/store/inMemoryStore.mjs +17 -21
- package/style.css +1 -2274
- package/types/chainType.js +1 -11
- package/types/chainType.mjs +2 -9
- package/types/errors.js +1 -9
- package/types/errors.mjs +4 -5
- package/types/providerType.js +1 -9
- package/types/providerType.mjs +2 -7
- package/types/transaction.d.ts +2 -0
- package/all-networks-EJIVYZ_i.mjs +0 -4
- package/all-networks-NYACMyeN.js +0 -4
- package/default-BYtXv70Z.mjs +0 -4
- package/default-H3AbmzFV.js +0 -4
- package/react.esm-7GsOwMPq.js +0 -11815
- package/react.esm-CU-Iqz8D.mjs +0 -11796
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";const i="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_800_5975)'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='%23627EEA'/%3e%3cg%20clip-path='url(%23clip1_800_5975)'%3e%3cpath%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016Z'%20fill='%23627EEA'/%3e%3cpath%20d='M8.24902%202V6.435L11.9975%208.11L8.24902%202Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%202L4.5%208.11L8.249%206.435V2Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.9841V13.9976L12%208.80811L8.24902%2010.9841Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%2013.9976V10.9836L4.5%208.80811L8.249%2013.9976Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.2865L11.9975%208.11004L8.24902%206.43604V10.2865Z'%20fill='white'%20fill-opacity='0.2'/%3e%3cpath%20d='M4.5%208.11004L8.249%2010.2865V6.43604L4.5%208.11004Z'%20fill='white'%20fill-opacity='0.602'/%3e%3c/g%3e%3c/g%3e%3crect%20x='8'%20y='8'%20width='16'%20height='16'%20rx='4'%20fill='%23F0B90B'/%3e%3cpath%20d='M12.703%2015.9785L11.3515%2017.3252L10%2015.9785L11.3515%2014.6319L12.703%2015.9785ZM16%2012.6933L18.3168%2015.0166L19.6683%2013.67L17.3515%2011.3466L16%2010L14.6485%2011.3466L12.3168%2013.67L13.6683%2015.0166L16%2012.6933ZM20.6485%2014.6319L19.297%2015.9785L20.6485%2017.3252C21.1763%2016.7993%2021.4722%2016.5044%2022%2015.9785L20.6485%2014.6319ZM16%2019.2489L13.6832%2016.9404L12.3168%2018.2871L14.6337%2020.5956L15.9852%2021.9422L17.3366%2020.5956L19.6683%2018.2871L18.3168%2016.9404L16%2019.2489ZM16%2017.3252L17.3515%2015.9785L16%2014.6319L14.6485%2015.9785L16%2017.3252Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_800_5975'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_800_5975'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";exports.AllNetworks=i;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const i = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_800_5975)'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='%23627EEA'/%3e%3cg%20clip-path='url(%23clip1_800_5975)'%3e%3cpath%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016Z'%20fill='%23627EEA'/%3e%3cpath%20d='M8.24902%202V6.435L11.9975%208.11L8.24902%202Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%202L4.5%208.11L8.249%206.435V2Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.9841V13.9976L12%208.80811L8.24902%2010.9841Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%2013.9976V10.9836L4.5%208.80811L8.249%2013.9976Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.2865L11.9975%208.11004L8.24902%206.43604V10.2865Z'%20fill='white'%20fill-opacity='0.2'/%3e%3cpath%20d='M4.5%208.11004L8.249%2010.2865V6.43604L4.5%208.11004Z'%20fill='white'%20fill-opacity='0.602'/%3e%3c/g%3e%3c/g%3e%3crect%20x='8'%20y='8'%20width='16'%20height='16'%20rx='4'%20fill='%23F0B90B'/%3e%3cpath%20d='M12.703%2015.9785L11.3515%2017.3252L10%2015.9785L11.3515%2014.6319L12.703%2015.9785ZM16%2012.6933L18.3168%2015.0166L19.6683%2013.67L17.3515%2011.3466L16%2010L14.6485%2011.3466L12.3168%2013.67L13.6683%2015.0166L16%2012.6933ZM20.6485%2014.6319L19.297%2015.9785L20.6485%2017.3252C21.1763%2016.7993%2021.4722%2016.5044%2022%2015.9785L20.6485%2014.6319ZM16%2019.2489L13.6832%2016.9404L12.3168%2018.2871L14.6337%2020.5956L15.9852%2021.9422L17.3366%2020.5956L19.6683%2018.2871L18.3168%2016.9404L16%2019.2489ZM16%2017.3252L17.3515%2015.9785L16%2014.6319L14.6485%2015.9785L16%2017.3252Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_800_5975'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_800_5975'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
2
|
+
export {
|
|
3
|
+
i as A
|
|
4
|
+
};
|
package/api/checkAccount.js
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
async function checkAccount({
|
|
6
|
-
url,
|
|
7
|
-
walletAddress,
|
|
8
|
-
chainId,
|
|
9
|
-
nativeAuthToken
|
|
10
|
-
}) {
|
|
11
|
-
const config = {
|
|
12
|
-
baseURL: url,
|
|
13
|
-
headers: {
|
|
14
|
-
Authorization: `Bearer ${nativeAuthToken}`
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return await axios.get(
|
|
18
|
-
`/user/checkAccount?walletAddress=${walletAddress}&chainId=${chainId}`,
|
|
19
|
-
config
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
exports.checkAccount = checkAccount;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("axios");async function a({url:e,walletAddress:c,chainId:t,nativeAuthToken:n}){const o={baseURL:e,headers:{Authorization:`Bearer ${n}`}};return await r.get(`/user/checkAccount?walletAddress=${c}&chainId=${t}`,o)}exports.checkAccount=a;
|
package/api/checkAccount.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
async function
|
|
3
|
-
url,
|
|
4
|
-
walletAddress,
|
|
5
|
-
chainId,
|
|
6
|
-
nativeAuthToken
|
|
1
|
+
import a from "axios";
|
|
2
|
+
async function i({
|
|
3
|
+
url: c,
|
|
4
|
+
walletAddress: e,
|
|
5
|
+
chainId: t,
|
|
6
|
+
nativeAuthToken: o
|
|
7
7
|
}) {
|
|
8
|
-
const
|
|
9
|
-
baseURL:
|
|
8
|
+
const r = {
|
|
9
|
+
baseURL: c,
|
|
10
10
|
headers: {
|
|
11
|
-
Authorization: `Bearer ${
|
|
11
|
+
Authorization: `Bearer ${o}`
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
return await
|
|
15
|
-
`/user/checkAccount?walletAddress=${
|
|
16
|
-
|
|
14
|
+
return await a.get(
|
|
15
|
+
`/user/checkAccount?walletAddress=${e}&chainId=${t}`,
|
|
16
|
+
r
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
checkAccount
|
|
20
|
+
i as checkAccount
|
|
21
21
|
};
|
package/api/confirmRate.js
CHANGED
|
@@ -1,30 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
const helpers_decodeToken = require("../helpers/decodeToken.js");
|
|
6
|
-
async function confirmRate({
|
|
7
|
-
url,
|
|
8
|
-
nativeAuthToken,
|
|
9
|
-
body
|
|
10
|
-
}) {
|
|
11
|
-
var _a;
|
|
12
|
-
const config = {
|
|
13
|
-
baseURL: url,
|
|
14
|
-
headers: {
|
|
15
|
-
Authorization: `Bearer ${nativeAuthToken}`
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
if (!nativeAuthToken) {
|
|
19
|
-
(_a = config.headers) == null ? true : delete _a.Authorization;
|
|
20
|
-
}
|
|
21
|
-
const decodedToken = await helpers_decodeToken.decodeToken(nativeAuthToken);
|
|
22
|
-
if (config.headers.set) {
|
|
23
|
-
config.headers.set({
|
|
24
|
-
...config.headers,
|
|
25
|
-
origin: (decodedToken == null ? void 0 : decodedToken.origin) ?? ""
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return await axios.post(`/rate/confirm`, body, config);
|
|
29
|
-
}
|
|
30
|
-
exports.confirmRate = confirmRate;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),n=require("../helpers/decodeToken.js");async function c({url:t,nativeAuthToken:r,body:s}){var o;const e={baseURL:t,headers:{Authorization:`Bearer ${r}`}};r||(o=e.headers)==null||delete o.Authorization;const i=await n.decodeToken(r);return e.headers.set&&e.headers.set({...e.headers,origin:(i==null?void 0:i.origin)??""}),await a.post("/rate/confirm",s,e)}exports.confirmRate=c;
|
package/api/confirmRate.mjs
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { decodeToken } from "../helpers/decodeToken.mjs";
|
|
3
|
-
async function
|
|
4
|
-
url,
|
|
5
|
-
nativeAuthToken,
|
|
6
|
-
body
|
|
1
|
+
import s from "axios";
|
|
2
|
+
import { decodeToken as n } from "../helpers/decodeToken.mjs";
|
|
3
|
+
async function m({
|
|
4
|
+
url: a,
|
|
5
|
+
nativeAuthToken: e,
|
|
6
|
+
body: t
|
|
7
7
|
}) {
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
baseURL:
|
|
8
|
+
var o;
|
|
9
|
+
const r = {
|
|
10
|
+
baseURL: a,
|
|
11
11
|
headers: {
|
|
12
|
-
Authorization: `Bearer ${
|
|
12
|
+
Authorization: `Bearer ${e}`
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
...config.headers,
|
|
22
|
-
origin: (decodedToken == null ? void 0 : decodedToken.origin) ?? ""
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return await axios.post(`/rate/confirm`, body, config);
|
|
15
|
+
e || (o = r.headers) == null || delete o.Authorization;
|
|
16
|
+
const i = await n(e);
|
|
17
|
+
return r.headers.set && r.headers.set({
|
|
18
|
+
...r.headers,
|
|
19
|
+
origin: (i == null ? void 0 : i.origin) ?? ""
|
|
20
|
+
}), await s.post("/rate/confirm", t, r);
|
|
26
21
|
}
|
|
27
22
|
export {
|
|
28
|
-
confirmRate
|
|
23
|
+
m as confirmRate
|
|
29
24
|
};
|
package/api/getChains.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
async function getChains({
|
|
6
|
-
url,
|
|
7
|
-
nativeAuthToken,
|
|
8
|
-
bridgeOnly
|
|
9
|
-
}) {
|
|
10
|
-
const config = {
|
|
11
|
-
baseURL: url,
|
|
12
|
-
headers: {
|
|
13
|
-
Authorization: `Bearer ${nativeAuthToken}`
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
return axios.get(`/chains?isBridge=${bridgeOnly}`, config);
|
|
17
|
-
}
|
|
18
|
-
exports.getChains = getChains;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("axios");async function s({url:e,nativeAuthToken:n,bridgeOnly:i}){const t={baseURL:e,headers:{Authorization:`Bearer ${n}`}};return r.get(`/chains?isBridge=${i}`,t)}exports.getChains=s;
|
package/api/getChains.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
async function
|
|
3
|
-
url,
|
|
4
|
-
nativeAuthToken,
|
|
5
|
-
bridgeOnly
|
|
1
|
+
import o from "axios";
|
|
2
|
+
async function a({
|
|
3
|
+
url: e,
|
|
4
|
+
nativeAuthToken: i,
|
|
5
|
+
bridgeOnly: r
|
|
6
6
|
}) {
|
|
7
|
-
const
|
|
8
|
-
baseURL:
|
|
7
|
+
const n = {
|
|
8
|
+
baseURL: e,
|
|
9
9
|
headers: {
|
|
10
|
-
Authorization: `Bearer ${
|
|
10
|
+
Authorization: `Bearer ${i}`
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
return
|
|
13
|
+
return o.get(`/chains?isBridge=${r}`, n);
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
|
-
getChains
|
|
16
|
+
a as getChains
|
|
17
17
|
};
|
package/api/getRate.js
CHANGED
|
@@ -1,28 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
const helpers_decodeToken = require("../helpers/decodeToken.js");
|
|
6
|
-
async function getRate({
|
|
7
|
-
url,
|
|
8
|
-
nativeAuthToken,
|
|
9
|
-
body
|
|
10
|
-
}) {
|
|
11
|
-
var _a;
|
|
12
|
-
const config = {
|
|
13
|
-
baseURL: url,
|
|
14
|
-
headers: {
|
|
15
|
-
Authorization: `Bearer ${nativeAuthToken}`
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
if (!nativeAuthToken) {
|
|
19
|
-
(_a = config.headers) == null ? true : delete _a.Authorization;
|
|
20
|
-
}
|
|
21
|
-
const decodedToken = await helpers_decodeToken.decodeToken(nativeAuthToken);
|
|
22
|
-
config.headers = {
|
|
23
|
-
...config.headers,
|
|
24
|
-
origin: decodedToken == null ? void 0 : decodedToken.origin
|
|
25
|
-
};
|
|
26
|
-
return await axios.post(`/rate`, body, config);
|
|
27
|
-
}
|
|
28
|
-
exports.getRate = getRate;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios"),n=require("../helpers/decodeToken.js");async function c({url:i,nativeAuthToken:r,body:a}){var o;const e={baseURL:i,headers:{Authorization:`Bearer ${r}`}};r||(o=e.headers)==null||delete o.Authorization;const t=await n.decodeToken(r);return e.headers={...e.headers,origin:t==null?void 0:t.origin},await s.post("/rate",a,e)}exports.getRate=c;
|
package/api/getRate.mjs
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { decodeToken } from "../helpers/decodeToken.mjs";
|
|
3
|
-
async function
|
|
4
|
-
url,
|
|
5
|
-
nativeAuthToken,
|
|
6
|
-
body
|
|
1
|
+
import s from "axios";
|
|
2
|
+
import { decodeToken as n } from "../helpers/decodeToken.mjs";
|
|
3
|
+
async function d({
|
|
4
|
+
url: i,
|
|
5
|
+
nativeAuthToken: e,
|
|
6
|
+
body: t
|
|
7
7
|
}) {
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
baseURL:
|
|
8
|
+
var a;
|
|
9
|
+
const r = {
|
|
10
|
+
baseURL: i,
|
|
11
11
|
headers: {
|
|
12
|
-
Authorization: `Bearer ${
|
|
12
|
+
Authorization: `Bearer ${e}`
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
origin: decodedToken == null ? void 0 : decodedToken.origin
|
|
22
|
-
};
|
|
23
|
-
return await axios.post(`/rate`, body, config);
|
|
15
|
+
e || (a = r.headers) == null || delete a.Authorization;
|
|
16
|
+
const o = await n(e);
|
|
17
|
+
return r.headers = {
|
|
18
|
+
...r.headers,
|
|
19
|
+
origin: o == null ? void 0 : o.origin
|
|
20
|
+
}, await s.post("/rate", t, r);
|
|
24
21
|
}
|
|
25
22
|
export {
|
|
26
|
-
getRate
|
|
23
|
+
d as getRate
|
|
27
24
|
};
|
package/api/getTokens.js
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
async function getTokens({
|
|
6
|
-
url,
|
|
7
|
-
chainId,
|
|
8
|
-
nativeAuthToken,
|
|
9
|
-
bridgeOnly
|
|
10
|
-
}) {
|
|
11
|
-
const config = {
|
|
12
|
-
baseURL: url,
|
|
13
|
-
headers: {
|
|
14
|
-
Authorization: `Bearer ${nativeAuthToken}`
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const endpoint = chainId ? `/tokens/${chainId}` : "/tokens";
|
|
18
|
-
return await axios.get(
|
|
19
|
-
`${endpoint}?isBridge=${bridgeOnly}`,
|
|
20
|
-
config
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
exports.getTokens = getTokens;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios");async function a({url:t,chainId:e,nativeAuthToken:n,bridgeOnly:o}){const s={baseURL:t,headers:{Authorization:`Bearer ${n}`}},r=e?`/tokens/${e}`:"/tokens";return await i.get(`${r}?isBridge=${o}`,s)}exports.getTokens=a;
|
package/api/getTokens.mjs
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
async function
|
|
3
|
-
url,
|
|
4
|
-
chainId,
|
|
5
|
-
nativeAuthToken,
|
|
6
|
-
bridgeOnly
|
|
1
|
+
import i from "axios";
|
|
2
|
+
async function c({
|
|
3
|
+
url: o,
|
|
4
|
+
chainId: e,
|
|
5
|
+
nativeAuthToken: t,
|
|
6
|
+
bridgeOnly: n
|
|
7
7
|
}) {
|
|
8
|
-
const
|
|
9
|
-
baseURL:
|
|
8
|
+
const r = {
|
|
9
|
+
baseURL: o,
|
|
10
10
|
headers: {
|
|
11
|
-
Authorization: `Bearer ${
|
|
11
|
+
Authorization: `Bearer ${t}`
|
|
12
12
|
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
config
|
|
13
|
+
}, s = e ? `/tokens/${e}` : "/tokens";
|
|
14
|
+
return await i.get(
|
|
15
|
+
`${s}?isBridge=${n}`,
|
|
16
|
+
r
|
|
18
17
|
);
|
|
19
18
|
}
|
|
20
19
|
export {
|
|
21
|
-
getTokens
|
|
20
|
+
c as getTokens
|
|
22
21
|
};
|
package/api/getTokensBalances.js
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
async function getTokensBalances({
|
|
6
|
-
url,
|
|
7
|
-
userAddress,
|
|
8
|
-
chainId,
|
|
9
|
-
nativeAuthToken
|
|
10
|
-
}) {
|
|
11
|
-
const config = {
|
|
12
|
-
baseURL: url,
|
|
13
|
-
headers: {
|
|
14
|
-
Authorization: `Bearer ${nativeAuthToken}`
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return await axios.get(
|
|
18
|
-
`/tokens/balances/${userAddress}/${chainId}`,
|
|
19
|
-
config
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
exports.getTokensBalances = getTokensBalances;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios");async function r({url:e,userAddress:n,chainId:t,nativeAuthToken:a}){const o={baseURL:e,headers:{Authorization:`Bearer ${a}`}};return await s.get(`/tokens/balances/${n}/${t}`,o)}exports.getTokensBalances=r;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
async function
|
|
3
|
-
url,
|
|
4
|
-
userAddress,
|
|
5
|
-
chainId,
|
|
6
|
-
nativeAuthToken
|
|
1
|
+
import r from "axios";
|
|
2
|
+
async function i({
|
|
3
|
+
url: e,
|
|
4
|
+
userAddress: a,
|
|
5
|
+
chainId: n,
|
|
6
|
+
nativeAuthToken: o
|
|
7
7
|
}) {
|
|
8
|
-
const
|
|
9
|
-
baseURL:
|
|
8
|
+
const t = {
|
|
9
|
+
baseURL: e,
|
|
10
10
|
headers: {
|
|
11
|
-
Authorization: `Bearer ${
|
|
11
|
+
Authorization: `Bearer ${o}`
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
return await
|
|
15
|
-
`/tokens/balances/${
|
|
16
|
-
|
|
14
|
+
return await r.get(
|
|
15
|
+
`/tokens/balances/${a}/${n}`,
|
|
16
|
+
t
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
getTokensBalances
|
|
20
|
+
i as getTokensBalances
|
|
21
21
|
};
|
package/api/getTransactions.js
CHANGED
|
@@ -1,39 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
async function getTransactions({
|
|
6
|
-
url,
|
|
7
|
-
address,
|
|
8
|
-
sender,
|
|
9
|
-
provider,
|
|
10
|
-
status,
|
|
11
|
-
tokenIn,
|
|
12
|
-
tokenOut,
|
|
13
|
-
nativeAuthToken
|
|
14
|
-
}) {
|
|
15
|
-
const queryParams = new URLSearchParams({
|
|
16
|
-
receiver: address || "",
|
|
17
|
-
sender: sender || "",
|
|
18
|
-
provider: provider || "",
|
|
19
|
-
status: status || "",
|
|
20
|
-
tokenIn: tokenIn || "",
|
|
21
|
-
tokenOut: tokenOut || ""
|
|
22
|
-
});
|
|
23
|
-
const params = Object.entries(Object.fromEntries(queryParams.entries()));
|
|
24
|
-
for (const [key, value] of params) {
|
|
25
|
-
if (value === "") {
|
|
26
|
-
queryParams.delete(key);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const queryString = queryParams.toString();
|
|
30
|
-
const endpointWithParams = `/transactions?${queryString}`;
|
|
31
|
-
const config = {
|
|
32
|
-
baseURL: url,
|
|
33
|
-
headers: {
|
|
34
|
-
Authorization: `Bearer ${nativeAuthToken}`
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
return await axios.get(endpointWithParams, config);
|
|
38
|
-
}
|
|
39
|
-
exports.getTransactions = getTransactions;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("axios");async function m({url:t,address:n,sender:r,provider:s,status:o,tokenIn:a,tokenOut:i,nativeAuthToken:c}){const e=new URLSearchParams({receiver:n||"",sender:r||"",provider:s||"",status:o||"",tokenIn:a||"",tokenOut:i||""}),u=Object.entries(Object.fromEntries(e.entries()));for(const[f,y]of u)y===""&&e.delete(f);const g=`/transactions?${e.toString()}`,d={baseURL:t,headers:{Authorization:`Bearer ${c}`}};return await b.get(g,d)}exports.getTransactions=m;
|
package/api/getTransactions.mjs
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
async function
|
|
3
|
-
url,
|
|
4
|
-
address,
|
|
5
|
-
sender,
|
|
6
|
-
provider,
|
|
7
|
-
status,
|
|
8
|
-
tokenIn,
|
|
9
|
-
tokenOut,
|
|
10
|
-
nativeAuthToken
|
|
1
|
+
import p from "axios";
|
|
2
|
+
async function S({
|
|
3
|
+
url: t,
|
|
4
|
+
address: r,
|
|
5
|
+
sender: n,
|
|
6
|
+
provider: o,
|
|
7
|
+
status: s,
|
|
8
|
+
tokenIn: a,
|
|
9
|
+
tokenOut: i,
|
|
10
|
+
nativeAuthToken: c
|
|
11
11
|
}) {
|
|
12
|
-
const
|
|
13
|
-
receiver:
|
|
14
|
-
sender:
|
|
15
|
-
provider:
|
|
16
|
-
status:
|
|
17
|
-
tokenIn:
|
|
18
|
-
tokenOut:
|
|
19
|
-
});
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const queryString = queryParams.toString();
|
|
27
|
-
const endpointWithParams = `/transactions?${queryString}`;
|
|
28
|
-
const config = {
|
|
29
|
-
baseURL: url,
|
|
12
|
+
const e = new URLSearchParams({
|
|
13
|
+
receiver: r || "",
|
|
14
|
+
sender: n || "",
|
|
15
|
+
provider: o || "",
|
|
16
|
+
status: s || "",
|
|
17
|
+
tokenIn: a || "",
|
|
18
|
+
tokenOut: i || ""
|
|
19
|
+
}), u = Object.entries(Object.fromEntries(e.entries()));
|
|
20
|
+
for (const [g, d] of u)
|
|
21
|
+
d === "" && e.delete(g);
|
|
22
|
+
const f = `/transactions?${e.toString()}`, m = {
|
|
23
|
+
baseURL: t,
|
|
30
24
|
headers: {
|
|
31
|
-
Authorization: `Bearer ${
|
|
25
|
+
Authorization: `Bearer ${c}`
|
|
32
26
|
}
|
|
33
27
|
};
|
|
34
|
-
return await
|
|
28
|
+
return await p.get(f, m);
|
|
35
29
|
}
|
|
36
30
|
export {
|
|
37
|
-
getTransactions
|
|
31
|
+
S as getTransactions
|
|
38
32
|
};
|
package/api/index.js
CHANGED
|
@@ -1,19 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const api_confirmRate = require("./confirmRate.js");
|
|
5
|
-
const api_getChains = require("./getChains.js");
|
|
6
|
-
const api_getRate = require("./getRate.js");
|
|
7
|
-
const api_getTokens = require("./getTokens.js");
|
|
8
|
-
const api_getTokensBalances = require("./getTokensBalances.js");
|
|
9
|
-
const api_getTransactions = require("./getTransactions.js");
|
|
10
|
-
const api_sendTransactions = require("./sendTransactions.js");
|
|
11
|
-
const api_checkAccount = require("./checkAccount.js");
|
|
12
|
-
exports.confirmRate = api_confirmRate.confirmRate;
|
|
13
|
-
exports.getChains = api_getChains.getChains;
|
|
14
|
-
exports.getRate = api_getRate.getRate;
|
|
15
|
-
exports.getTokens = api_getTokens.getTokens;
|
|
16
|
-
exports.getTokensBalances = api_getTokensBalances.getTokensBalances;
|
|
17
|
-
exports.getTransactions = api_getTransactions.getTransactions;
|
|
18
|
-
exports.sendTransactions = api_sendTransactions.sendTransactions;
|
|
19
|
-
exports.checkAccount = api_checkAccount.checkAccount;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./confirmRate.js"),n=require("./getChains.js"),t=require("./getRate.js"),s=require("./getTokens.js"),a=require("./getTokensBalances.js"),c=require("./getTransactions.js"),i=require("./sendTransactions.js"),o=require("./checkAccount.js");exports.confirmRate=e.confirmRate;exports.getChains=n.getChains;exports.getRate=t.getRate;exports.getTokens=s.getTokens;exports.getTokensBalances=a.getTokensBalances;exports.getTransactions=c.getTransactions;exports.sendTransactions=i.sendTransactions;exports.checkAccount=o.checkAccount;
|
package/api/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { confirmRate } from "./confirmRate.mjs";
|
|
2
|
-
import { getChains } from "./getChains.mjs";
|
|
3
|
-
import { getRate } from "./getRate.mjs";
|
|
4
|
-
import { getTokens } from "./getTokens.mjs";
|
|
5
|
-
import { getTokensBalances } from "./getTokensBalances.mjs";
|
|
6
|
-
import { getTransactions } from "./getTransactions.mjs";
|
|
7
|
-
import { sendTransactions } from "./sendTransactions.mjs";
|
|
8
|
-
import { checkAccount } from "./checkAccount.mjs";
|
|
1
|
+
import { confirmRate as r } from "./confirmRate.mjs";
|
|
2
|
+
import { getChains as n } from "./getChains.mjs";
|
|
3
|
+
import { getRate as f } from "./getRate.mjs";
|
|
4
|
+
import { getTokens as s } from "./getTokens.mjs";
|
|
5
|
+
import { getTokensBalances as p } from "./getTokensBalances.mjs";
|
|
6
|
+
import { getTransactions as g } from "./getTransactions.mjs";
|
|
7
|
+
import { sendTransactions as T } from "./sendTransactions.mjs";
|
|
8
|
+
import { checkAccount as h } from "./checkAccount.mjs";
|
|
9
9
|
export {
|
|
10
|
-
checkAccount,
|
|
11
|
-
confirmRate,
|
|
12
|
-
getChains,
|
|
13
|
-
getRate,
|
|
14
|
-
getTokens,
|
|
15
|
-
getTokensBalances,
|
|
16
|
-
getTransactions,
|
|
17
|
-
sendTransactions
|
|
10
|
+
h as checkAccount,
|
|
11
|
+
r as confirmRate,
|
|
12
|
+
n as getChains,
|
|
13
|
+
f as getRate,
|
|
14
|
+
s as getTokens,
|
|
15
|
+
p as getTokensBalances,
|
|
16
|
+
g as getTransactions,
|
|
17
|
+
T as sendTransactions
|
|
18
18
|
};
|
package/api/sendTransactions.js
CHANGED
|
@@ -1,33 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
const helpers_serializeTransaction = require("../helpers/serializeTransaction.js");
|
|
6
|
-
const sendTransactions = async ({
|
|
7
|
-
transactions,
|
|
8
|
-
provider,
|
|
9
|
-
url,
|
|
10
|
-
token,
|
|
11
|
-
axiosConfig
|
|
12
|
-
}) => {
|
|
13
|
-
const config = {
|
|
14
|
-
baseURL: url,
|
|
15
|
-
headers: {
|
|
16
|
-
"Content-Type": "application/json",
|
|
17
|
-
Accept: "application/json",
|
|
18
|
-
Authorization: `Bearer ${token}`
|
|
19
|
-
},
|
|
20
|
-
...axiosConfig
|
|
21
|
-
};
|
|
22
|
-
return axios.post(
|
|
23
|
-
`/transactions`,
|
|
24
|
-
{
|
|
25
|
-
transactions: transactions.map(
|
|
26
|
-
(transaction) => JSON.parse(helpers_serializeTransaction.serializeTransaction(transaction))
|
|
27
|
-
),
|
|
28
|
-
provider
|
|
29
|
-
},
|
|
30
|
-
config
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
exports.sendTransactions = sendTransactions;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios"),c=require("../helpers/serializeTransaction.js"),p=async({transactions:n,provider:e,url:s,token:a,axiosConfig:t})=>{const o={baseURL:s,headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},...t};return i.post("/transactions",{transactions:n.map(r=>JSON.parse(c.serializeTransaction(r))),provider:e},o)};exports.sendTransactions=p;
|
package/api/sendTransactions.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { serializeTransaction } from "../helpers/serializeTransaction.mjs";
|
|
3
|
-
const
|
|
4
|
-
transactions,
|
|
5
|
-
provider,
|
|
6
|
-
url,
|
|
7
|
-
token,
|
|
8
|
-
axiosConfig
|
|
1
|
+
import e from "axios";
|
|
2
|
+
import { serializeTransaction as c } from "../helpers/serializeTransaction.mjs";
|
|
3
|
+
const f = async ({
|
|
4
|
+
transactions: a,
|
|
5
|
+
provider: n,
|
|
6
|
+
url: o,
|
|
7
|
+
token: t,
|
|
8
|
+
axiosConfig: s
|
|
9
9
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
baseURL:
|
|
10
|
+
const r = {
|
|
11
|
+
baseURL: o,
|
|
12
12
|
headers: {
|
|
13
13
|
"Content-Type": "application/json",
|
|
14
14
|
Accept: "application/json",
|
|
15
|
-
Authorization: `Bearer ${
|
|
15
|
+
Authorization: `Bearer ${t}`
|
|
16
16
|
},
|
|
17
|
-
...
|
|
17
|
+
...s
|
|
18
18
|
};
|
|
19
|
-
return
|
|
20
|
-
|
|
19
|
+
return e.post(
|
|
20
|
+
"/transactions",
|
|
21
21
|
{
|
|
22
|
-
transactions:
|
|
23
|
-
(
|
|
22
|
+
transactions: a.map(
|
|
23
|
+
(i) => JSON.parse(c(i))
|
|
24
24
|
),
|
|
25
|
-
provider
|
|
25
|
+
provider: n
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
r
|
|
28
28
|
);
|
|
29
29
|
};
|
|
30
30
|
export {
|
|
31
|
-
sendTransactions
|
|
31
|
+
f as sendTransactions
|
|
32
32
|
};
|