@dodoex/widgets 3.0.1-solana.5 → 3.0.1-taiko.10
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/dist/assets/bundle-DSSoJu9z.css +297 -0
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-Darn0QJb.js → helper-BlT6kZC3.js} +1 -1
- package/dist/{helper-B57dDnaI.cjs → helper-D7ankZFX.cjs} +1 -1
- package/dist/{index-DIDEQvpO.cjs → index-0FfWpfdq.cjs} +5 -5
- package/dist/index-5bb3Lo5e.js +31 -0
- package/dist/{index-A6qmUreY.cjs → index-B8WJZC7h.cjs} +2 -2
- package/dist/index-BylHuMIA.cjs +31 -0
- package/dist/{index-Bchn6BWj.js → index-CSVHxU84.js} +2 -2
- package/dist/index-CVrAZE-L.js +78 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/components/SpaceBetweenItem.d.ts +5 -0
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -1
- package/dist/types/components/Swap/components/SwitchBox.d.ts +3 -2
- package/dist/types/components/TokenLogo.d.ts +1 -1
- package/dist/types/components/TokenPairStatusButton.d.ts +6 -0
- package/dist/types/components/TokenSelect.d.ts +21 -0
- package/dist/types/components/Widget/index.d.ts +4 -6
- package/dist/types/constants/pool.d.ts +1 -0
- package/dist/types/constants/testId.d.ts +1 -0
- package/dist/types/constants/wallet.d.ts +1 -9
- package/dist/types/hooks/ConnectWallet/useCurrentChainId.d.ts +1 -1
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +4 -4
- package/dist/types/hooks/Submission/types.d.ts +7 -24
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +1 -8
- package/dist/types/hooks/Token/useTokenStatus.d.ts +1 -0
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +2 -93
- package/dist/types/hooks/contract/useFetchTokens.d.ts +2 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/providers/useInitContractRequest.d.ts +1 -0
- package/dist/types/router/types.d.ts +9 -1
- package/dist/types/utils/address.d.ts +9 -0
- package/dist/types/widgets/MiningWidget/OperateArea/index.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/helper.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useReviewRewardToken.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV2Create/ConfirmDialog.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/CreateItem.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/FeeEdit.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/MyLiqidity.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/Ratio.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/Setting.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/index.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/AMMV3/AMMV3PositionManage.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/AMMV3/AMMV3PositionsView.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/AMMV3/AddLiquidityV3.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/Badge/AMMV3.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/Badge/RangeBadge.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/Buttons.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/ClaimButton.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/CurrencyInputPanel.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/FeeSelector.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/InRangeDot.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/InputStepCounter.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/Area.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/AxisBottom.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/Brush.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/Chart.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/Line.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/Zoom.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/hooks.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/index.d.ts +17 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/svg.d.ts +22 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/types.d.ts +50 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/utils.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/PositionAmountPreview.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/PositionPreview.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/PositionSelectedRangePreview.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/PositionViewCard.d.ts +17 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/RangeSelector.d.ts +21 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/RateToggle.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/RemoveButton.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/ReviewModal.d.ts +21 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/TokenPairSelect.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/shared.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/widgets.d.ts +55 -0
- package/dist/types/widgets/PoolWidget/AMMV3/constants/misc.d.ts +17 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useContract.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useDerivedPositionInfo.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useDerivedV3BurnInfo.d.ts +20 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useIsTickAtLimit.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePoolTickData.d.ts +20 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePools.d.ts +22 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useRangeHopCallbacks.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useSwapTaxes.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3DerivedMintInfo.d.ts +46 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3MintActionHandlers.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3PositionFees.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3Positions.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/AMMV3/reducer.d.ts +55 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/addresses.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/constants.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/baseCurrency.d.ts +49 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/currency.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/fractions/currencyAmount.d.ts +32 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/fractions/fraction.d.ts +24 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/fractions/index.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/fractions/percent.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/fractions/price.d.ts +38 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/index.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/nativeCurrency.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/nativeCurrencyClass.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/entities/token.d.ts +48 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/index.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/utils/computePriceImpact.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/utils/index.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/utils/sortedInsert.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/utils/sqrt.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/utils/validateAndParseAddress.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/constants.d.ts +23 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/index.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/pool.d.ts +81 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/position.d.ts +131 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/route.d.ts +26 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/tick.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/tickDataProvider.d.ts +31 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/tickListDataProvider.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/entities/trade.d.ts +220 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/index.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/internalConstants.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/multicall.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/nonfungiblePositionManager.d.ts +159 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/payments.d.ts +24 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/quoter.d.ts +37 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/selfPermit.d.ts +25 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/staker.d.ts +101 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/swapRouter.d.ts +51 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/calldata.d.ts +20 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/computePoolAddress.d.ts +21 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/encodeRouteToPath.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/encodeSqrtRatioX96.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/fullMath.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/index.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/isSorted.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/liquidityMath.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/maxLiquidityForAmounts.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/mostSignificantBit.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/nearestUsableTick.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/position.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/priceTickConversions.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/sqrtPriceMath.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/swapMath.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/tickLibrary.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/tickList.d.ts +23 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/tickMath.d.ts +34 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/utils/v3swap.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/types/position.d.ts +20 -0
- package/dist/types/widgets/PoolWidget/AMMV3/types.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/computeSurroundingTicks.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/formatTickPrice.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/getTickToPrice.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/maxAmountSpend.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/slippage.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/tryParseCurrencyAmount.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/tryParseTick.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/GoPoolDetailBtn.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/OnlyV3Toggle.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +6 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +22 -16
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2Balance.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +9 -9
- package/dist/types/widgets/PoolWidget/hooks/useUniV2CreatePairs.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +27 -0
- package/dist/types/widgets/PoolWidget/index.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/utils.d.ts +8 -6
- package/package.json +11 -12
- package/dist/assets/bundle-007ZFocI.css +0 -593
- package/dist/index-BC99bNlf.cjs +0 -31
- package/dist/index-BwlM86Tc.js +0 -78
- package/dist/index-CRfoDSZE.js +0 -31
- package/dist/types/constants/solana.d.ts +0 -1
- package/dist/types/contract/solana/helper.d.ts +0 -12
- package/dist/types/contract/solana/transaction.d.ts +0 -3
- package/dist/types/hooks/solana/useFetchSolanaRoutePrice.d.ts +0 -16
- package/dist/types/hooks/solana/useSolanaConnection.d.ts +0 -22
- package/dist/types/hooks/solana/useSolanaProgram.d.ts +0 -2
- package/dist/types/hooks/solana/useSolanaStablePoolProgram.d.ts +0 -1
- package/dist/types/hooks/solana/useSolanaWallet.d.ts +0 -1
- package/dist/types/providers/SolanaReactProvider.d.ts +0 -4
|
@@ -10,13 +10,12 @@ import { InitTokenListProps } from '../../hooks/Token/useInitTokenList';
|
|
|
10
10
|
import { ConfirmProps } from '../Confirm';
|
|
11
11
|
import { DialogProps } from '../Swap/components/Dialog';
|
|
12
12
|
import { Page } from '../../router';
|
|
13
|
-
import { useWallet } from '@solana/wallet-adapter-react';
|
|
14
13
|
export declare const WIDGET_CLASS_NAME = "dodo-widget-container";
|
|
15
14
|
export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, ExecutionProps {
|
|
16
15
|
apikey?: string;
|
|
17
16
|
theme?: PartialDeep<ThemeOptions>;
|
|
18
17
|
colorMode?: PaletteMode;
|
|
19
|
-
defaultChainId?:
|
|
18
|
+
defaultChainId?: ChainId;
|
|
20
19
|
width?: string | number;
|
|
21
20
|
height?: string | number;
|
|
22
21
|
feeRate?: number;
|
|
@@ -30,7 +29,7 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
30
29
|
crossChain?: boolean;
|
|
31
30
|
noPowerBy?: boolean;
|
|
32
31
|
noDocumentLink?: boolean;
|
|
33
|
-
onlyChainId?:
|
|
32
|
+
onlyChainId?: ChainId;
|
|
34
33
|
noUI?: boolean;
|
|
35
34
|
noLangProvider?: boolean;
|
|
36
35
|
noAutoConnect?: boolean;
|
|
@@ -39,11 +38,10 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
39
38
|
name: string;
|
|
40
39
|
logoUrl?: string;
|
|
41
40
|
};
|
|
41
|
+
supportAMMV2?: boolean;
|
|
42
|
+
supportAMMV3?: boolean;
|
|
42
43
|
/** When the winding status changes, no pop-up window will be displayed. */
|
|
43
44
|
noSubmissionDialog?: boolean;
|
|
44
|
-
onlySolana?: boolean;
|
|
45
|
-
noSolanaProvider?: boolean;
|
|
46
|
-
solanaWallet?: ReturnType<typeof useWallet>;
|
|
47
45
|
onProviderChanged?: (provider?: any) => void;
|
|
48
46
|
getStaticJsonRpcProviderByChainId?: Exclude<ConstructorParameters<typeof ContractRequests>[0], undefined>['getProvider'];
|
|
49
47
|
widgetRef?: React.RefObject<HTMLDivElement>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const AUTO_SWAP_SLIPPAGE_PROTECTION = "auto";
|
|
2
2
|
export declare const AUTO_LIQUIDITY_SLIPPAGE_PROTECTION = "0.1";
|
|
3
|
+
export declare const AUTO_AMM_V2_LIQUIDITY_SLIPPAGE_PROTECTION = "0.5";
|
|
3
4
|
/**
|
|
4
5
|
* slippage protection
|
|
5
6
|
* First read out the reserve of the pool base and quote. If the slippage is 1%, then it is reserve * 0.99 and pass in func.
|
|
@@ -6,5 +6,6 @@ export declare const swapAlertEnterAmountBtn = "swap-alert-enter-amount-btn";
|
|
|
6
6
|
export declare const swapAlertFetchPriceBtn = "swap-alert-fetch-price-btn";
|
|
7
7
|
export declare const swapAlertInsufficientBalanceBtn = "swap-alert-insufficient-balance-btn";
|
|
8
8
|
export declare const numberInputWrapper = "number-input-wrapper";
|
|
9
|
+
export declare const selectTokenBtn = "select-token-btn";
|
|
9
10
|
export declare const tokenPickerWrapper = "token-picker-wrapper";
|
|
10
11
|
export declare const tokenPickerItem = "token-picker-item";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export declare enum WalletType {
|
|
2
2
|
INTEGRATOR = "integrator",
|
|
3
3
|
METAMASK = "metamask",
|
|
4
|
-
WALLET_CONNECT = "walletConnect"
|
|
5
|
-
SOLANG = "solang"
|
|
4
|
+
WALLET_CONNECT = "walletConnect"
|
|
6
5
|
}
|
|
7
6
|
export declare const WalletMap: {
|
|
8
7
|
metamask: {
|
|
@@ -20,11 +19,4 @@ export declare const WalletMap: {
|
|
|
20
19
|
title?: string;
|
|
21
20
|
}>;
|
|
22
21
|
};
|
|
23
|
-
solang: {
|
|
24
|
-
name: string;
|
|
25
|
-
type: WalletType;
|
|
26
|
-
icon: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
27
|
-
title?: string;
|
|
28
|
-
}>;
|
|
29
|
-
};
|
|
30
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useCurrentChainId():
|
|
1
|
+
export declare function useCurrentChainId(): import("@dodoex/api").ChainId;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
export declare function useWalletInfo(): {
|
|
2
3
|
account: string | undefined;
|
|
3
|
-
chainId:
|
|
4
|
+
chainId: ChainId;
|
|
4
5
|
connectedChainId: number | undefined;
|
|
5
|
-
defaultChainId:
|
|
6
|
-
onlyChainId:
|
|
7
|
-
isSolana: boolean | undefined;
|
|
6
|
+
defaultChainId: ChainId | undefined;
|
|
7
|
+
onlyChainId: ChainId | undefined;
|
|
8
8
|
};
|
|
@@ -15,6 +15,13 @@ export declare enum MetadataFlag {
|
|
|
15
15
|
createDSPPool = "createDSPPool",
|
|
16
16
|
createGSPPool = "createGSPPool",
|
|
17
17
|
createDVMPool = "createDVMPool",
|
|
18
|
+
createAMMV2Position = "createAMMV2Position",
|
|
19
|
+
addLiquidityAMMV2Position = "addLiquidityAMMV2Position",
|
|
20
|
+
removeLiqidityAMMV2Position = "removeLiqidityAMMV2Position",
|
|
21
|
+
createAMMV3Pool = "createAMMV3Pool",
|
|
22
|
+
addAMMV3Pool = "addAMMV3Pool",
|
|
23
|
+
removeAMMV3Pool = "removeAMMV3Pool",
|
|
24
|
+
claimAMMV3Pool = "claimAMMV3Pool",
|
|
18
25
|
stakeMining = "stakeMining",
|
|
19
26
|
unstakeMining = "unstakeMining",
|
|
20
27
|
claimMining = "claimMining",
|
|
@@ -49,19 +56,6 @@ export interface Showing {
|
|
|
49
56
|
subtitle?: string | React.ReactNode;
|
|
50
57
|
spec: StepSpec;
|
|
51
58
|
}
|
|
52
|
-
export interface ExecuteCustomHandlerParameters {
|
|
53
|
-
onSubmit: (tx: string, params?: {
|
|
54
|
-
reportInfo?: Record<string, any>;
|
|
55
|
-
showing?: Partial<Showing> | null;
|
|
56
|
-
}) => void;
|
|
57
|
-
onSuccess: (tx: string, params?: {
|
|
58
|
-
reportInfo?: Record<string, any>;
|
|
59
|
-
notShowingDone?: boolean;
|
|
60
|
-
showing?: Partial<Showing>;
|
|
61
|
-
}) => Promise<void>;
|
|
62
|
-
onError: (e: any) => void;
|
|
63
|
-
setShowing: React.Dispatch<React.SetStateAction<Showing | null>>;
|
|
64
|
-
}
|
|
65
59
|
export type ExecutionCtx = {
|
|
66
60
|
/**
|
|
67
61
|
* Execute an on-chain operation
|
|
@@ -83,17 +77,6 @@ export type ExecutionCtx = {
|
|
|
83
77
|
successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void;
|
|
84
78
|
metadata?: Metadata;
|
|
85
79
|
}) => Promise<ExecutionResult>;
|
|
86
|
-
executeCustom: (params: {
|
|
87
|
-
brief: string;
|
|
88
|
-
subtitle?: string | React.ReactNode | null;
|
|
89
|
-
early?: boolean;
|
|
90
|
-
mixpanelProps?: Record<string, any>;
|
|
91
|
-
submittedBack?: () => void;
|
|
92
|
-
submittedConfirmBack?: () => void;
|
|
93
|
-
metadata?: Record<string, any>;
|
|
94
|
-
successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void;
|
|
95
|
-
handler: (params: ExecuteCustomHandlerParameters) => Promise<any>;
|
|
96
|
-
}) => Promise<ExecutionResult>;
|
|
97
80
|
/**
|
|
98
81
|
* order
|
|
99
82
|
*/
|
|
@@ -32,14 +32,7 @@ interface IRouteResponse {
|
|
|
32
32
|
}
|
|
33
33
|
export declare function useFetchRoutePrice({ toToken, fromToken, fromAmount, toAmount, marginAmount, estimateGas, isReverseRouting, slippage, slippageLoading, }: FetchRoutePrice): {
|
|
34
34
|
status: RoutePriceStatus;
|
|
35
|
-
rawBrief:
|
|
36
|
-
resAmount: number;
|
|
37
|
-
baseFeeAmount: number;
|
|
38
|
-
additionalFeeAmount: number;
|
|
39
|
-
priceImpact: null;
|
|
40
|
-
resPricePerToToken: number;
|
|
41
|
-
resPricePerFromToken: number;
|
|
42
|
-
} | IRouteResponse | null | undefined;
|
|
35
|
+
rawBrief: IRouteResponse | null;
|
|
43
36
|
refetch: () => Promise<void>;
|
|
44
37
|
executeSwap: (subtitle: React.ReactNode) => void;
|
|
45
38
|
reset: () => void;
|
|
@@ -7,6 +7,7 @@ export declare function useTokenStatus(token: TokenInfo | undefined | null, { am
|
|
|
7
7
|
overrideBalance?: BigNumber | null;
|
|
8
8
|
skipQuery?: boolean;
|
|
9
9
|
}): {
|
|
10
|
+
token: TokenInfo | null | undefined;
|
|
10
11
|
isApproving: boolean;
|
|
11
12
|
isGetApproveLoading: boolean;
|
|
12
13
|
needApprove: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export default function useFetchETHBalance(chainId?: number): import("@tanstack/react-query").QueryObserverRefetchErrorResult<{
|
|
1
|
+
export default function useFetchETHBalance(chainId?: number): import("@tanstack/react-query").UseQueryResult<{
|
|
3
2
|
symbol: string;
|
|
4
3
|
address: string;
|
|
5
4
|
name: string;
|
|
@@ -19,94 +18,4 @@ export default function useFetchETHBalance(chainId?: number): import("@tanstack/
|
|
|
19
18
|
allowance: import("bignumber.js").BigNumber;
|
|
20
19
|
chainId: number;
|
|
21
20
|
account?: undefined;
|
|
22
|
-
} | null, Error
|
|
23
|
-
symbol: string;
|
|
24
|
-
address: string;
|
|
25
|
-
name: string;
|
|
26
|
-
decimals: number;
|
|
27
|
-
balance: import("bignumber.js").BigNumber;
|
|
28
|
-
allowance: import("bignumber.js").BigNumber;
|
|
29
|
-
account: string;
|
|
30
|
-
spender: string | undefined;
|
|
31
|
-
chainId: number;
|
|
32
|
-
} | {
|
|
33
|
-
address: string;
|
|
34
|
-
decimals: number;
|
|
35
|
-
symbol: string;
|
|
36
|
-
name: string;
|
|
37
|
-
balance: import("bignumber.js").BigNumber;
|
|
38
|
-
spender: string | undefined;
|
|
39
|
-
allowance: import("bignumber.js").BigNumber;
|
|
40
|
-
chainId: number;
|
|
41
|
-
account?: undefined;
|
|
42
|
-
} | null, Error> | import("@tanstack/react-query").QueryObserverLoadingErrorResult<{
|
|
43
|
-
symbol: string;
|
|
44
|
-
address: string;
|
|
45
|
-
name: string;
|
|
46
|
-
decimals: number;
|
|
47
|
-
balance: import("bignumber.js").BigNumber;
|
|
48
|
-
allowance: import("bignumber.js").BigNumber;
|
|
49
|
-
account: string;
|
|
50
|
-
spender: string | undefined;
|
|
51
|
-
chainId: number;
|
|
52
|
-
} | {
|
|
53
|
-
address: string;
|
|
54
|
-
decimals: number;
|
|
55
|
-
symbol: string;
|
|
56
|
-
name: string;
|
|
57
|
-
balance: import("bignumber.js").BigNumber;
|
|
58
|
-
spender: string | undefined;
|
|
59
|
-
allowance: import("bignumber.js").BigNumber;
|
|
60
|
-
chainId: number;
|
|
61
|
-
account?: undefined;
|
|
62
|
-
} | null, Error> | import("@tanstack/react-query").QueryObserverPendingResult<{
|
|
63
|
-
symbol: string;
|
|
64
|
-
address: string;
|
|
65
|
-
name: string;
|
|
66
|
-
decimals: number;
|
|
67
|
-
balance: import("bignumber.js").BigNumber;
|
|
68
|
-
allowance: import("bignumber.js").BigNumber;
|
|
69
|
-
account: string;
|
|
70
|
-
spender: string | undefined;
|
|
71
|
-
chainId: number;
|
|
72
|
-
} | {
|
|
73
|
-
address: string;
|
|
74
|
-
decimals: number;
|
|
75
|
-
symbol: string;
|
|
76
|
-
name: string;
|
|
77
|
-
balance: import("bignumber.js").BigNumber;
|
|
78
|
-
spender: string | undefined;
|
|
79
|
-
allowance: import("bignumber.js").BigNumber;
|
|
80
|
-
chainId: number;
|
|
81
|
-
account?: undefined;
|
|
82
|
-
} | null, Error> | import("@tanstack/react-query").QueryObserverRefetchErrorResult<{
|
|
83
|
-
balance: BigNumber;
|
|
84
|
-
allowance: BigNumber;
|
|
85
|
-
symbol: string;
|
|
86
|
-
address: string;
|
|
87
|
-
name: string;
|
|
88
|
-
decimals: number;
|
|
89
|
-
showDecimals: number;
|
|
90
|
-
wrappedTokenSymbol: string;
|
|
91
|
-
wrappedTokenAddress: string;
|
|
92
|
-
}, Error> | import("@tanstack/react-query").QueryObserverSuccessResult<{
|
|
93
|
-
balance: BigNumber;
|
|
94
|
-
allowance: BigNumber;
|
|
95
|
-
symbol: string;
|
|
96
|
-
address: string;
|
|
97
|
-
name: string;
|
|
98
|
-
decimals: number;
|
|
99
|
-
showDecimals: number;
|
|
100
|
-
wrappedTokenSymbol: string;
|
|
101
|
-
wrappedTokenAddress: string;
|
|
102
|
-
}, Error> | import("@tanstack/react-query").QueryObserverPendingResult<{
|
|
103
|
-
balance: BigNumber;
|
|
104
|
-
allowance: BigNumber;
|
|
105
|
-
symbol: string;
|
|
106
|
-
address: string;
|
|
107
|
-
name: string;
|
|
108
|
-
decimals: number;
|
|
109
|
-
showDecimals: number;
|
|
110
|
-
wrappedTokenSymbol: string;
|
|
111
|
-
wrappedTokenAddress: string;
|
|
112
|
-
}, Error>;
|
|
21
|
+
} | null, Error>;
|
|
@@ -4,8 +4,9 @@ type TokenInfoMap = Map<string, {
|
|
|
4
4
|
balance: BigNumber;
|
|
5
5
|
allowance: BigNumber;
|
|
6
6
|
}>;
|
|
7
|
-
export default function useFetchTokens({ tokenList, blockNumber, chainId, skip, }: {
|
|
7
|
+
export default function useFetchTokens({ tokenList, addresses: addressesProps, blockNumber, chainId, skip, }: {
|
|
8
8
|
tokenList?: TokenList;
|
|
9
|
+
addresses?: string[];
|
|
9
10
|
blockNumber?: number;
|
|
10
11
|
chainId?: number;
|
|
11
12
|
skip?: boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { useTradeSwapOrderList } from './hooks/Swap/useTradeSwapOrderList';
|
|
|
18
18
|
export { Pool } from './widgets/PoolWidget';
|
|
19
19
|
export { default as PoolList } from './widgets/PoolWidget/PoolList';
|
|
20
20
|
export { default as PoolCreate } from './widgets/PoolWidget/PoolCreate';
|
|
21
|
+
export { default as AMMV2Create } from './widgets/PoolWidget/AMMV2Create';
|
|
21
22
|
export { default as PoolModify } from './widgets/PoolWidget/PoolModify';
|
|
22
23
|
export { default as PoolDetail } from './widgets/PoolWidget/PoolDetail';
|
|
23
24
|
export { default as PoolOperateDialog, PoolOperate, } from './widgets/PoolWidget/PoolOperate';
|
|
@@ -26,6 +27,9 @@ export { usePoolBalanceInfo } from './widgets/PoolWidget/hooks/usePoolBalanceInf
|
|
|
26
27
|
export { MiningList } from './widgets/MiningWidget/MiningList';
|
|
27
28
|
export { MiningDetail } from './widgets/MiningWidget/MiningDetail';
|
|
28
29
|
export { MiningCreate } from './widgets/MiningWidget/MiningCreate';
|
|
30
|
+
export { default as AddLiquidityV3 } from './widgets/PoolWidget/AMMV3/AddLiquidityV3';
|
|
31
|
+
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
32
|
+
export { AMMV3PositionManage } from './widgets/PoolWidget/AMMV3/AMMV3PositionManage';
|
|
29
33
|
export { TokenCard } from './components/Swap/components/TokenCard';
|
|
30
34
|
export { default as TokenLogo } from './components/TokenLogo';
|
|
31
35
|
export { FailedList } from './components/List/FailedList';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useInitContractRequest(): void;
|
|
@@ -6,7 +6,9 @@ export declare enum PageType {
|
|
|
6
6
|
CreatePool = "createPool",
|
|
7
7
|
ModifyPool = "modifyPool",
|
|
8
8
|
MiningList = "miningList",
|
|
9
|
-
MiningDetail = "miningDetail"
|
|
9
|
+
MiningDetail = "miningDetail",
|
|
10
|
+
createPoolAMMV2 = "createPoolAMMV2",
|
|
11
|
+
createPoolAMMV3 = "createPoolAMMV3"
|
|
10
12
|
}
|
|
11
13
|
interface PageTypeParams {
|
|
12
14
|
[PageType.Pool]: {
|
|
@@ -32,6 +34,12 @@ interface PageTypeParams {
|
|
|
32
34
|
miningContractAddress: string | undefined;
|
|
33
35
|
stakeTokenAddress: string | undefined;
|
|
34
36
|
};
|
|
37
|
+
[PageType.createPoolAMMV2]: undefined;
|
|
38
|
+
[PageType.createPoolAMMV3]: {
|
|
39
|
+
from?: string;
|
|
40
|
+
to?: string;
|
|
41
|
+
fee?: string;
|
|
42
|
+
} | undefined;
|
|
35
43
|
}
|
|
36
44
|
export interface Page<T extends PageType = PageType> {
|
|
37
45
|
type: T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../hooks/Token';
|
|
2
3
|
export declare const isSameAddress: (tokenAddress1: string, tokenAddress2: string) => boolean;
|
|
3
4
|
export declare function isAddress(value: any): boolean;
|
|
4
5
|
export declare function isETHAddress(addr: string): boolean;
|
|
@@ -15,3 +16,11 @@ export declare function truncatePoolAddress(address: string): string;
|
|
|
15
16
|
export declare function sortsAddress(address0: string, address1: string): boolean;
|
|
16
17
|
export declare function getEtherscanPage(chainId: ChainId, id?: string | null, prefix?: string): string;
|
|
17
18
|
export declare function openEtherscanPage(path: string | undefined, chainId: ChainId, customUrl?: string): Promise<void>;
|
|
19
|
+
export declare const UNI_INIT_CODE_HASH = "0x67a372377cf6d7f78cfdcc9df0bc21e1139bd49e5a47c33ee0de5389a4396410";
|
|
20
|
+
export declare function sortsBefore(tokenA: TokenInfo, tokenB: TokenInfo): boolean;
|
|
21
|
+
export declare const computePairAddress: ({ factoryAddress, tokenA, tokenB, fee, }: {
|
|
22
|
+
factoryAddress: string;
|
|
23
|
+
tokenA: TokenInfo;
|
|
24
|
+
tokenB: TokenInfo;
|
|
25
|
+
fee: number;
|
|
26
|
+
}) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FetchMiningListItem, OperateType } from '../types';
|
|
2
1
|
import { MiningStatusE } from '@dodoex/api';
|
|
3
2
|
import React from 'react';
|
|
3
|
+
import { FetchMiningListItem, OperateType } from '../types';
|
|
4
4
|
export default function OperateArea({ chainId, poolAddress, status, loading, operateType, setOperateType, miningItem, associatedMineSectionVisible, goLpLink, }: {
|
|
5
5
|
chainId: number;
|
|
6
6
|
poolAddress: string;
|
|
@@ -60,10 +60,10 @@ export declare function getV3MiningSingleRewardAmount(t: ReviewedMiningRewardTok
|
|
|
60
60
|
workThroughReward: BigNumber | undefined;
|
|
61
61
|
lastFlagBlock: BigNumber | undefined;
|
|
62
62
|
rewardVault: string | undefined;
|
|
63
|
+
startTime: BigNumber | undefined;
|
|
64
|
+
endTime: BigNumber | undefined;
|
|
63
65
|
rewardPerBlock: BigNumber | undefined;
|
|
64
66
|
startBlock: BigNumber | undefined;
|
|
65
67
|
endBlock: BigNumber | undefined;
|
|
66
|
-
startTime: BigNumber | undefined;
|
|
67
|
-
endTime: BigNumber | undefined;
|
|
68
68
|
};
|
|
69
69
|
export {};
|
|
@@ -19,10 +19,10 @@ export declare function useReviewRewardToken({ chainId, index, miningContractAdd
|
|
|
19
19
|
workThroughReward: BigNumber | undefined;
|
|
20
20
|
lastFlagBlock: BigNumber | undefined;
|
|
21
21
|
rewardVault: string | undefined;
|
|
22
|
+
startTime: BigNumber | undefined;
|
|
23
|
+
endTime: BigNumber | undefined;
|
|
22
24
|
rewardPerBlock: BigNumber | undefined;
|
|
23
25
|
startBlock: BigNumber | undefined;
|
|
24
26
|
endBlock: BigNumber | undefined;
|
|
25
|
-
startTime: BigNumber | undefined;
|
|
26
|
-
endTime: BigNumber | undefined;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -4,7 +4,7 @@ export declare function useRewardListAmount({ miningItem, }: {
|
|
|
4
4
|
miningItem: FetchMiningListItem;
|
|
5
5
|
}): {
|
|
6
6
|
data: {
|
|
7
|
-
amount:
|
|
7
|
+
amount: BigNumber | null | undefined;
|
|
8
8
|
address: string;
|
|
9
9
|
symbol: string;
|
|
10
10
|
decimals: number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { useAMMV2AddLiquidity } from '../hooks/useAMMV2AddLiquidity';
|
|
4
|
+
export default function ConfirmDialog({ open, onClose, slippage, baseToken, quoteToken, baseAmount, quoteAmount, lpAmount, fee, price, shareOfPool, pairAddress, createMutation, }: {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
slippage: number;
|
|
8
|
+
baseToken?: TokenInfo;
|
|
9
|
+
quoteToken?: TokenInfo;
|
|
10
|
+
baseAmount: string;
|
|
11
|
+
quoteAmount: string;
|
|
12
|
+
lpAmount: BigNumber | undefined;
|
|
13
|
+
fee: number | undefined;
|
|
14
|
+
price?: BigNumber | null;
|
|
15
|
+
shareOfPool?: string;
|
|
16
|
+
pairAddress?: string;
|
|
17
|
+
createMutation: ReturnType<typeof useAMMV2AddLiquidity>;
|
|
18
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
4
|
+
export declare function RatioPrice({ baseToken, quoteToken, midPrice, loading, disabled, }: {
|
|
5
|
+
baseToken?: TokenInfo;
|
|
6
|
+
quoteToken?: TokenInfo;
|
|
7
|
+
midPrice?: BigNumber | null;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
export default function Ratio({ baseToken, quoteToken, loading, midPrice, shareOfPool, sx, }: {
|
|
12
|
+
baseToken?: TokenInfo;
|
|
13
|
+
quoteToken?: TokenInfo;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
midPrice?: BigNumber | null;
|
|
16
|
+
shareOfPool?: string;
|
|
17
|
+
sx?: BoxProps['sx'];
|
|
18
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { AUTO_SWAP_SLIPPAGE_PROTECTION } from '../../../constants/pool';
|
|
3
|
+
export declare const useSlipper: ({ address }: {
|
|
4
|
+
address?: string;
|
|
5
|
+
}) => {
|
|
6
|
+
slipper: number | "auto";
|
|
7
|
+
setSlipper: import("react").Dispatch<import("react").SetStateAction<number | "auto">>;
|
|
8
|
+
slipperValue: number;
|
|
9
|
+
resetSlipper: () => void;
|
|
10
|
+
};
|
|
11
|
+
export default function Setting({ sx, disabled, slippage, onChangeSlippage, }: {
|
|
12
|
+
sx?: BoxProps['sx'];
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
slippage: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION;
|
|
15
|
+
onChangeSlippage: (val: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION) => void;
|
|
16
|
+
}): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AMMV2Create(): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
import { ChainId } from './sdks/sdk-core';
|
|
3
|
+
import { FeeAmount } from './sdks/v3-sdk';
|
|
4
|
+
export interface AMMV3PositionManageProps {
|
|
5
|
+
chainId: ChainId;
|
|
6
|
+
baseToken: TokenInfo;
|
|
7
|
+
quoteToken: TokenInfo;
|
|
8
|
+
feeAmount: FeeAmount;
|
|
9
|
+
tokenId: string;
|
|
10
|
+
onClose: (() => void) | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare const AMMV3PositionManage: ({ chainId, baseToken, quoteToken, feeAmount, tokenId, onClose, }: AMMV3PositionManageProps) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token/type';
|
|
3
|
+
import { FeeAmount } from './sdks/v3-sdk';
|
|
4
|
+
export interface AMMV3PositionsViewProps {
|
|
5
|
+
chainId: ChainId;
|
|
6
|
+
baseToken: TokenInfo;
|
|
7
|
+
quoteToken: TokenInfo;
|
|
8
|
+
feeAmount: FeeAmount;
|
|
9
|
+
onClose: (() => void) | undefined;
|
|
10
|
+
handleGoToAddLiquidityV3: (params: {
|
|
11
|
+
from?: string;
|
|
12
|
+
to?: string;
|
|
13
|
+
fee?: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const AMMV3PositionsView: ({ chainId, baseToken, quoteToken, feeAmount, onClose, handleGoToAddLiquidityV3, }: AMMV3PositionsViewProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { useTokenStatus } from '../../../../hooks/Token/useTokenStatus';
|
|
3
|
+
import { Currency, CurrencyAmount } from '../sdks/sdk-core';
|
|
4
|
+
export interface ButtonsProps {
|
|
5
|
+
chainId: ChainId;
|
|
6
|
+
approvalA: ReturnType<typeof useTokenStatus>;
|
|
7
|
+
approvalB: ReturnType<typeof useTokenStatus>;
|
|
8
|
+
parsedAmounts: {
|
|
9
|
+
CURRENCY_A?: CurrencyAmount<Currency> | undefined;
|
|
10
|
+
CURRENCY_B?: CurrencyAmount<Currency> | undefined;
|
|
11
|
+
};
|
|
12
|
+
isValid: boolean;
|
|
13
|
+
depositADisabled: boolean;
|
|
14
|
+
depositBDisabled: boolean;
|
|
15
|
+
errorMessage: React.ReactNode;
|
|
16
|
+
setShowConfirm: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
|
+
}
|
|
18
|
+
export declare const Buttons: ({ chainId, approvalA, approvalB, parsedAmounts, isValid, depositADisabled, depositBDisabled, errorMessage, setShowConfirm, }: ButtonsProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export interface ClaimButtonProps {
|
|
3
|
+
chainId: ChainId;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
onConfirm: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const ClaimButton: ({ chainId, disabled, isLoading, onConfirm, }: ClaimButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Currency, CurrencyAmount } from '../sdks/sdk-core';
|
|
2
|
+
export interface CurrencyInputPanelProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onUserInput: (value: string) => void;
|
|
5
|
+
maxAmount: CurrencyAmount<Currency> | undefined;
|
|
6
|
+
balance: CurrencyAmount<Currency> | undefined;
|
|
7
|
+
currency?: Currency | null;
|
|
8
|
+
locked?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const CurrencyInputPanel: ({ value, onUserInput, maxAmount, balance, currency, locked, }: CurrencyInputPanelProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Actions } from '../reducer';
|
|
2
|
+
import { FeeAmount } from '../sdks/v3-sdk/constants';
|
|
3
|
+
export interface FeeSelectorProps {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
feeAmount?: FeeAmount;
|
|
6
|
+
dispatch: React.Dispatch<Actions>;
|
|
7
|
+
}
|
|
8
|
+
export declare const FeeSelector: ({ disabled, feeAmount, dispatch, }: FeeSelectorProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FeeAmount } from '../sdks/v3-sdk';
|
|
3
|
+
interface StepCounterProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onUserInput: (value: string) => void;
|
|
6
|
+
decrement: () => string;
|
|
7
|
+
increment: () => string;
|
|
8
|
+
decrementDisabled?: boolean;
|
|
9
|
+
incrementDisabled?: boolean;
|
|
10
|
+
feeAmount?: FeeAmount;
|
|
11
|
+
label?: string;
|
|
12
|
+
locked?: boolean;
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
tokenA?: string;
|
|
15
|
+
tokenB?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const StepCounter: ({ value, decrement, increment, decrementDisabled, incrementDisabled, locked, onUserInput, title, tokenA, tokenB, }: StepCounterProps) => JSX.Element;
|
|
18
|
+
export default StepCounter;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScaleLinear } from 'd3';
|
|
2
|
+
import { ChartEntry } from './types';
|
|
3
|
+
export declare const Area: ({ series, xScale, yScale, xValue, yValue, fill, }: {
|
|
4
|
+
series: ChartEntry[];
|
|
5
|
+
xScale: ScaleLinear<number, number>;
|
|
6
|
+
yScale: ScaleLinear<number, number>;
|
|
7
|
+
xValue: (d: ChartEntry) => number;
|
|
8
|
+
yValue: (d: ChartEntry) => number;
|
|
9
|
+
fill?: string;
|
|
10
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ScaleLinear } from 'd3';
|
|
2
|
+
export declare const Brush: ({ id, xScale, interactive, brushLabelValue, brushExtent, setBrushExtent, innerWidth, innerHeight, westHandleColor, eastHandleColor, }: {
|
|
3
|
+
id: string;
|
|
4
|
+
xScale: ScaleLinear<number, number>;
|
|
5
|
+
interactive: boolean;
|
|
6
|
+
brushLabelValue: (d: "w" | "e", x: number) => string;
|
|
7
|
+
brushExtent: [number, number];
|
|
8
|
+
setBrushExtent: (extent: [number, number], mode: string | undefined) => void;
|
|
9
|
+
innerWidth: number;
|
|
10
|
+
innerHeight: number;
|
|
11
|
+
westHandleColor: string;
|
|
12
|
+
eastHandleColor: string;
|
|
13
|
+
}) => JSX.Element;
|