@dodoex/widgets 3.0.1-solana.4 → 3.0.1-solana.6
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-007ZFocI.css → bundle-D7APNfvA.css} +0 -298
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/index.cjs +23 -1
- package/dist/index.js +23 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/components/ConnectWallet/NeedConnectButton.d.ts +1 -1
- package/dist/types/components/SpaceBetweenItem.d.ts +5 -0
- package/dist/types/components/Swap/SwapOrderHistory/RoutingCard.d.ts +1 -1
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -2
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageSetting.d.ts +1 -1
- package/dist/types/components/Swap/components/SwitchBox.d.ts +3 -2
- package/dist/types/components/Swap/components/TokenCard/index.d.ts +3 -3
- package/dist/types/components/TokenLogo.d.ts +1 -1
- package/dist/types/components/TokenPairStatusButton.d.ts +6 -0
- package/dist/types/components/TokenPicker/TokenItem.d.ts +1 -1
- package/dist/types/components/TokenSelect.d.ts +21 -0
- package/dist/types/components/Widget/index.d.ts +11 -9
- package/dist/types/components/WidgetContainer.d.ts +1 -1
- package/dist/types/constants/api.d.ts +5 -7
- package/dist/types/constants/chains.d.ts +1 -1
- package/dist/types/constants/pool.d.ts +2 -0
- package/dist/types/constants/testId.d.ts +1 -0
- package/dist/types/hooks/Bridge/useExecuteBridgeRoute.d.ts +1 -1
- package/dist/types/hooks/ConnectWallet/useCurrentChainId.d.ts +1 -1
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +7 -4
- package/dist/types/hooks/Submission/types.d.ts +7 -20
- package/dist/types/hooks/Submission/useExecution.d.ts +1 -1
- package/dist/types/hooks/Swap/index.d.ts +1 -2
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +3 -31
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +22 -99
- package/dist/types/hooks/Token/useSelectChainList.d.ts +3 -2
- package/dist/types/hooks/Token/useTokenStatus.d.ts +2 -1
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +1 -112
- package/dist/types/hooks/contract/wallet.d.ts +1 -3
- package/dist/types/hooks/raydium-sdk-V2/RaydiumSDKContext.d.ts +6 -0
- package/dist/types/hooks/raydium-sdk-V2/common/programId.d.ts +25 -0
- package/dist/types/hooks/raydium-sdk-V2/config.d.ts +10 -0
- package/dist/types/hooks/raydium-sdk-V2/useRaydiumSDK.d.ts +2 -0
- package/dist/types/hooks/solana/useFetchSolanaRoutePrice.d.ts +76 -8
- package/dist/types/hooks/solana/useSolanaConnection.d.ts +9 -1
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/index.d.ts +3 -32
- package/dist/types/providers/SolanaReactProvider.d.ts +0 -1
- 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 +8 -6
- package/dist/types/widgets/MiningWidget/MiningCreate/hooks/useRewardsStatus.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/MiningList/hooks/useDepositOrWithdrawOrClaim.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/MiningList/hooks/useStatusAndStartBlockNumber.d.ts +1 -2
- package/dist/types/widgets/MiningWidget/OperateArea/index.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/helper.d.ts +1 -2
- package/dist/types/widgets/MiningWidget/hooks/helper.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useClaimMiningSubmit.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useMiningItem.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useMiningList.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useMyCreatedMiningList.d.ts +1 -1
- 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/MiningWidget/hooks/useStakeMiningSubmit.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +2 -8
- package/dist/types/widgets/MiningWidget/hooks/useUnstakeMiningSubmit.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/utils.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 +13 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/MyLiqidity.d.ts +14 -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 +13 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/ClaimButton.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/CurrencyInputPanel.d.ts +11 -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 +18 -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 +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/PositionSelectedRangePreview.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/PositionViewCard.d.ts +17 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/RangeSelector.d.ts +20 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/RateToggle.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/RemoveButton.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/ReviewModal.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/TokenPairSelect.d.ts +8 -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/usePool.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePoolTickData.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useRangeHopCallbacks.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useSwapTaxes.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useTokenBalance.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useTokenInfo.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3DerivedMintInfo.d.ts +48 -0
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3MintActionHandlers.d.ts +10 -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 +66 -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 +3 -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 +12 -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 +17 -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.d.ts +46 -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/maxAmountSpend.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/priceToTick.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/slippage.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/tickToPrice.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils/tryParseCurrencyAmount.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/AMMV3/utils.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolList/components/CreatePoolBtn.d.ts +3 -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/AddPoolOperate.d.ts +1 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +1 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/components/LiquidityInfo.d.ts +2 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +7 -3
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/usePercentageRemove.d.ts +3 -3
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +4 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +6 -8
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +5 -1
- package/dist/types/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2Balance.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +10 -10
- package/dist/types/widgets/PoolWidget/hooks/useUniV2CreatePairs.d.ts +29 -0
- package/dist/types/widgets/PoolWidget/utils.d.ts +13 -6
- package/package.json +17 -6
- package/dist/28442382d977858a.svg +0 -9
- package/dist/ed726d76d93d4899.svg +0 -10
- package/dist/helper-BRdshlvi.js +0 -1
- package/dist/helper-DTQrPt46.cjs +0 -1
- package/dist/index-C-JJJoC9.cjs +0 -31
- package/dist/index-CO1qQeSY.js +0 -12
- package/dist/index-ChJQibM9.cjs +0 -78
- package/dist/index-DEmot-71.cjs +0 -12
- package/dist/index-DFuFSFb0.js +0 -78
- package/dist/index-DGgHFsY_.js +0 -31
- package/dist/types/hooks/Chain/useChainList.test.d.ts +0 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.test.d.ts +0 -1
- package/dist/types/hooks/Token/useFindTokenByAddress.test.d.ts +0 -1
- package/dist/types/hooks/Token/useSelectChainList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenStatus.test.d.ts +0 -1
- package/dist/types/utils/token.test.d.ts +0 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +0 -47
|
@@ -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",
|
|
@@ -63,26 +70,6 @@ export interface ExecuteCustomHandlerParameters {
|
|
|
63
70
|
setShowing: React.Dispatch<React.SetStateAction<Showing | null>>;
|
|
64
71
|
}
|
|
65
72
|
export type ExecutionCtx = {
|
|
66
|
-
/**
|
|
67
|
-
* Execute an on-chain operation
|
|
68
|
-
* @param breif: TX title. e.g.: "Swap"
|
|
69
|
-
* @param spec: TX specification.
|
|
70
|
-
* @param subtitle: Additional hint text. e.g.: "10 USDT to 10 USDC"
|
|
71
|
-
* @param early: When given, the returned promise resolves when user confirmed in their wallet.
|
|
72
|
-
* @param mixpanelProps: mixpanel properties
|
|
73
|
-
* @param submittedConfirmBack: submittedConfirmBack
|
|
74
|
-
* @param successBack: successBack
|
|
75
|
-
* @param metadata: metadata
|
|
76
|
-
*/
|
|
77
|
-
execute: (brief: string, spec: StepSpec, params?: {
|
|
78
|
-
subtitle?: string | React.ReactNode | null;
|
|
79
|
-
early?: boolean;
|
|
80
|
-
submittedBack?: () => void;
|
|
81
|
-
mixpanelProps?: Record<string, any>;
|
|
82
|
-
submittedConfirmBack?: () => void;
|
|
83
|
-
successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void;
|
|
84
|
-
metadata?: Metadata;
|
|
85
|
-
}) => Promise<ExecutionResult>;
|
|
86
73
|
executeCustom: (params: {
|
|
87
74
|
brief: string;
|
|
88
75
|
subtitle?: string | React.ReactNode | null;
|
|
@@ -9,39 +9,11 @@ export declare enum RoutePriceStatus {
|
|
|
9
9
|
export interface FetchRoutePrice {
|
|
10
10
|
fromToken: TokenInfo | null;
|
|
11
11
|
toToken: TokenInfo | null;
|
|
12
|
-
marginAmount?: string;
|
|
13
12
|
fromAmount: string;
|
|
14
|
-
|
|
15
|
-
estimateGas?: boolean;
|
|
16
|
-
isReverseRouting?: boolean;
|
|
17
|
-
slippage?: number;
|
|
18
|
-
slippageLoading?: boolean;
|
|
13
|
+
slippage: number;
|
|
19
14
|
}
|
|
20
|
-
|
|
21
|
-
resAmount: number;
|
|
22
|
-
priceImpact: number;
|
|
23
|
-
baseFeeAmount: number;
|
|
24
|
-
additionalFeeAmount: number;
|
|
25
|
-
resPricePerToToken: number;
|
|
26
|
-
resPricePerFromToken: number;
|
|
27
|
-
to: string;
|
|
28
|
-
data: string;
|
|
29
|
-
value: string;
|
|
30
|
-
useSource: string;
|
|
31
|
-
duration: number;
|
|
32
|
-
}
|
|
33
|
-
export declare function useFetchRoutePrice({ toToken, fromToken, fromAmount, toAmount, marginAmount, estimateGas, isReverseRouting, slippage, slippageLoading, }: FetchRoutePrice): {
|
|
15
|
+
export declare function useFetchRoutePrice({ toToken, fromToken, fromAmount, slippage, }: FetchRoutePrice): {
|
|
34
16
|
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;
|
|
43
|
-
refetch: () => Promise<void>;
|
|
17
|
+
rawBrief: import("../solana/useFetchSolanaRoutePrice").IRouteResponse | undefined;
|
|
44
18
|
executeSwap: (subtitle: React.ReactNode) => void;
|
|
45
|
-
reset: () => void;
|
|
46
19
|
};
|
|
47
|
-
export {};
|
|
@@ -1,27 +1,10 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { TokenInfo } from '../Token';
|
|
3
1
|
export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
4
2
|
account: string | undefined;
|
|
5
3
|
chainId?: number;
|
|
6
4
|
limit?: number;
|
|
7
5
|
}): {
|
|
8
|
-
orderList:
|
|
9
|
-
|
|
10
|
-
fromToken: TokenInfo;
|
|
11
|
-
toToken: TokenInfo;
|
|
12
|
-
fromAmount: BigNumber | null;
|
|
13
|
-
toAmount: string;
|
|
14
|
-
minAmount: string;
|
|
15
|
-
fromTokenPrice: string;
|
|
16
|
-
toTokenPrice: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
routeData: any;
|
|
19
|
-
safeTxHash: string | undefined;
|
|
20
|
-
safeTxUrl: string;
|
|
21
|
-
status: string;
|
|
22
|
-
transactionHash: string;
|
|
23
|
-
}[];
|
|
24
|
-
data: import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>;
|
|
6
|
+
orderList: any;
|
|
7
|
+
data: import("@tanstack/react-query").InfiniteData<unknown, unknown>;
|
|
25
8
|
error: Error;
|
|
26
9
|
isError: true;
|
|
27
10
|
isPending: false;
|
|
@@ -30,8 +13,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
30
13
|
isRefetchError: true;
|
|
31
14
|
isSuccess: false;
|
|
32
15
|
status: "error";
|
|
33
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
34
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
16
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
17
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
35
18
|
hasNextPage: boolean;
|
|
36
19
|
hasPreviousPage: boolean;
|
|
37
20
|
isFetchingNextPage: boolean;
|
|
@@ -49,26 +32,11 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
49
32
|
isPlaceholderData: boolean;
|
|
50
33
|
isRefetching: boolean;
|
|
51
34
|
isStale: boolean;
|
|
52
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
35
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
53
36
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
54
37
|
} | {
|
|
55
|
-
orderList:
|
|
56
|
-
|
|
57
|
-
fromToken: TokenInfo;
|
|
58
|
-
toToken: TokenInfo;
|
|
59
|
-
fromAmount: BigNumber | null;
|
|
60
|
-
toAmount: string;
|
|
61
|
-
minAmount: string;
|
|
62
|
-
fromTokenPrice: string;
|
|
63
|
-
toTokenPrice: string;
|
|
64
|
-
createdAt: string;
|
|
65
|
-
routeData: any;
|
|
66
|
-
safeTxHash: string | undefined;
|
|
67
|
-
safeTxUrl: string;
|
|
68
|
-
status: string;
|
|
69
|
-
transactionHash: string;
|
|
70
|
-
}[];
|
|
71
|
-
data: import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>;
|
|
38
|
+
orderList: any;
|
|
39
|
+
data: import("@tanstack/react-query").InfiniteData<unknown, unknown>;
|
|
72
40
|
error: null;
|
|
73
41
|
isError: false;
|
|
74
42
|
isPending: false;
|
|
@@ -77,8 +45,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
77
45
|
isRefetchError: false;
|
|
78
46
|
isSuccess: true;
|
|
79
47
|
status: "success";
|
|
80
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
81
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
48
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
49
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
82
50
|
hasNextPage: boolean;
|
|
83
51
|
hasPreviousPage: boolean;
|
|
84
52
|
isFetchingNextPage: boolean;
|
|
@@ -96,25 +64,10 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
96
64
|
isPlaceholderData: boolean;
|
|
97
65
|
isRefetching: boolean;
|
|
98
66
|
isStale: boolean;
|
|
99
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
67
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
100
68
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
101
69
|
} | {
|
|
102
|
-
orderList:
|
|
103
|
-
hash: string;
|
|
104
|
-
fromToken: TokenInfo;
|
|
105
|
-
toToken: TokenInfo;
|
|
106
|
-
fromAmount: BigNumber | null;
|
|
107
|
-
toAmount: string;
|
|
108
|
-
minAmount: string;
|
|
109
|
-
fromTokenPrice: string;
|
|
110
|
-
toTokenPrice: string;
|
|
111
|
-
createdAt: string;
|
|
112
|
-
routeData: any;
|
|
113
|
-
safeTxHash: string | undefined;
|
|
114
|
-
safeTxUrl: string;
|
|
115
|
-
status: string;
|
|
116
|
-
transactionHash: string;
|
|
117
|
-
}[];
|
|
70
|
+
orderList: any;
|
|
118
71
|
data: undefined;
|
|
119
72
|
error: Error;
|
|
120
73
|
isError: true;
|
|
@@ -124,8 +77,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
124
77
|
isRefetchError: false;
|
|
125
78
|
isSuccess: false;
|
|
126
79
|
status: "error";
|
|
127
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
128
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
80
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
81
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
129
82
|
hasNextPage: boolean;
|
|
130
83
|
hasPreviousPage: boolean;
|
|
131
84
|
isFetchingNextPage: boolean;
|
|
@@ -143,25 +96,10 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
143
96
|
isPlaceholderData: boolean;
|
|
144
97
|
isRefetching: boolean;
|
|
145
98
|
isStale: boolean;
|
|
146
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
99
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
147
100
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
148
101
|
} | {
|
|
149
|
-
orderList:
|
|
150
|
-
hash: string;
|
|
151
|
-
fromToken: TokenInfo;
|
|
152
|
-
toToken: TokenInfo;
|
|
153
|
-
fromAmount: BigNumber | null;
|
|
154
|
-
toAmount: string;
|
|
155
|
-
minAmount: string;
|
|
156
|
-
fromTokenPrice: string;
|
|
157
|
-
toTokenPrice: string;
|
|
158
|
-
createdAt: string;
|
|
159
|
-
routeData: any;
|
|
160
|
-
safeTxHash: string | undefined;
|
|
161
|
-
safeTxUrl: string;
|
|
162
|
-
status: string;
|
|
163
|
-
transactionHash: string;
|
|
164
|
-
}[];
|
|
102
|
+
orderList: any;
|
|
165
103
|
data: undefined;
|
|
166
104
|
error: null;
|
|
167
105
|
isError: false;
|
|
@@ -171,8 +109,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
171
109
|
isRefetchError: false;
|
|
172
110
|
isSuccess: false;
|
|
173
111
|
status: "pending";
|
|
174
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
175
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
112
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
113
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
176
114
|
hasNextPage: boolean;
|
|
177
115
|
hasPreviousPage: boolean;
|
|
178
116
|
isFetchingNextPage: boolean;
|
|
@@ -190,25 +128,10 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
190
128
|
isPlaceholderData: boolean;
|
|
191
129
|
isRefetching: boolean;
|
|
192
130
|
isStale: boolean;
|
|
193
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
131
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
194
132
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
195
133
|
} | {
|
|
196
|
-
orderList:
|
|
197
|
-
hash: string;
|
|
198
|
-
fromToken: TokenInfo;
|
|
199
|
-
toToken: TokenInfo;
|
|
200
|
-
fromAmount: BigNumber | null;
|
|
201
|
-
toAmount: string;
|
|
202
|
-
minAmount: string;
|
|
203
|
-
fromTokenPrice: string;
|
|
204
|
-
toTokenPrice: string;
|
|
205
|
-
createdAt: string;
|
|
206
|
-
routeData: any;
|
|
207
|
-
safeTxHash: string | undefined;
|
|
208
|
-
safeTxUrl: string;
|
|
209
|
-
status: string;
|
|
210
|
-
transactionHash: string;
|
|
211
|
-
}[];
|
|
134
|
+
orderList: any;
|
|
212
135
|
data: undefined;
|
|
213
136
|
error: null;
|
|
214
137
|
isError: false;
|
|
@@ -217,8 +140,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
217
140
|
isRefetchError: false;
|
|
218
141
|
isSuccess: false;
|
|
219
142
|
status: "pending";
|
|
220
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
221
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
143
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
144
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
222
145
|
hasNextPage: boolean;
|
|
223
146
|
hasPreviousPage: boolean;
|
|
224
147
|
isFetchingNextPage: boolean;
|
|
@@ -237,6 +160,6 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
237
160
|
isPlaceholderData: boolean;
|
|
238
161
|
isRefetching: boolean;
|
|
239
162
|
isStale: boolean;
|
|
240
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
163
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<unknown, unknown>, Error>>;
|
|
241
164
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
242
165
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { ChainListItem } from '../../constants/chainList';
|
|
2
3
|
export declare function useSelectChainList(side?: 'from' | 'to'): {
|
|
3
4
|
chainList: ChainListItem[];
|
|
4
|
-
selectChainId:
|
|
5
|
-
setSelectChainId: import("react").Dispatch<import("react").SetStateAction<
|
|
5
|
+
selectChainId: ChainId;
|
|
6
|
+
setSelectChainId: import("react").Dispatch<import("react").SetStateAction<ChainId>>;
|
|
6
7
|
};
|
|
@@ -7,10 +7,11 @@ 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;
|
|
13
|
-
needReset:
|
|
14
|
+
needReset: false;
|
|
14
15
|
needShowTokenStatusButton: boolean;
|
|
15
16
|
insufficientBalance: boolean;
|
|
16
17
|
loading: boolean;
|
|
@@ -1,112 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function useFetchETHBalance(chainId?: number): import("@tanstack/react-query").QueryObserverRefetchErrorResult<{
|
|
3
|
-
symbol: string;
|
|
4
|
-
address: string;
|
|
5
|
-
name: string;
|
|
6
|
-
decimals: number;
|
|
7
|
-
balance: import("bignumber.js").BigNumber;
|
|
8
|
-
allowance: import("bignumber.js").BigNumber;
|
|
9
|
-
account: string;
|
|
10
|
-
spender: string | undefined;
|
|
11
|
-
chainId: number;
|
|
12
|
-
} | {
|
|
13
|
-
address: string;
|
|
14
|
-
decimals: number;
|
|
15
|
-
symbol: string;
|
|
16
|
-
name: string;
|
|
17
|
-
balance: import("bignumber.js").BigNumber;
|
|
18
|
-
spender: string | undefined;
|
|
19
|
-
allowance: import("bignumber.js").BigNumber;
|
|
20
|
-
chainId: number;
|
|
21
|
-
account?: undefined;
|
|
22
|
-
} | null, Error> | import("@tanstack/react-query").QueryObserverSuccessResult<{
|
|
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>;
|
|
1
|
+
export default function useFetchETHBalance(chainId?: number): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
2
1
|
import type { TransactionRequest } from '@ethersproject/abstract-provider';
|
|
3
2
|
import { BigNumber as EthersBigNumber } from '@ethersproject/bignumber';
|
|
4
|
-
import
|
|
3
|
+
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
5
4
|
import { TokenInfo } from '../Token';
|
|
6
5
|
export type Deferrable<T> = {
|
|
7
6
|
[K in keyof T]: T[K] | Promise<T[K]>;
|
|
@@ -14,7 +13,6 @@ export declare enum WatchResult {
|
|
|
14
13
|
export declare const getEstimateGas: (params: any, provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
|
|
15
14
|
export declare const getGasPrice: (provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
|
|
16
15
|
export declare const sendTransaction: (params: Deferrable<TransactionRequest>, provider: JsonRpcProvider) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
17
|
-
export declare const approve: (tokenAddress: string, accountAddress: string, contractAddress: string, allowance: BigNumber, provider: JsonRpcProvider) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
18
16
|
/**
|
|
19
17
|
* Add custom token to metamask
|
|
20
18
|
* https://docs.metamask.io/guide/registering-your-token.html#registering-tokens-with-users
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { ApiClmmConfigV3, ApiCpmmConfigInfo } from '@raydium-io/raydium-sdk-v2';
|
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
|
4
|
+
/** -----soon testnet----- */
|
|
5
|
+
export declare const CREATE_CPMM_POOL_PROGRAM: PublicKey;
|
|
6
|
+
export declare const CREATE_CPMM_POOL_AUTH: PublicKey;
|
|
7
|
+
/** create pool fee account */
|
|
8
|
+
export declare const CREATE_CPMM_POOL_FEE_ACC: PublicKey;
|
|
9
|
+
/**
|
|
10
|
+
* @see https://api-v3.raydium.io/main/cpmm-config
|
|
11
|
+
*/
|
|
12
|
+
export declare const CREATE_CPMM_CONFIG: ApiCpmmConfigInfo[];
|
|
13
|
+
export declare const cpmmConfigMap: Record<ChainId, {
|
|
14
|
+
programId: PublicKey;
|
|
15
|
+
auth: PublicKey;
|
|
16
|
+
config: ApiCpmmConfigInfo[];
|
|
17
|
+
feeAcc: PublicKey;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const CLMM_PROGRAM_ID: PublicKey;
|
|
20
|
+
export declare const CREATE_CLMM_CONFIG: ApiClmmConfigV3[];
|
|
21
|
+
export declare const TOKEN_METADATA_PROGRAM_ID: PublicKey;
|
|
22
|
+
export declare const clmmConfigMap: Record<ChainId, {
|
|
23
|
+
programId: PublicKey;
|
|
24
|
+
config: ApiClmmConfigV3[];
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Raydium, TxVersion } from '@raydium-io/raydium-sdk-v2';
|
|
2
|
+
import { useWallet } from '@solana/wallet-adapter-react';
|
|
3
|
+
import { Connection } from '@solana/web3.js';
|
|
4
|
+
import { ChainId } from '../../widgets/PoolWidget/AMMV3/sdks/sdk-core';
|
|
5
|
+
export declare const txVersion = TxVersion["LEGACY"];
|
|
6
|
+
export declare const initSdk: ({ chainId, walletConnection, wallet, }: {
|
|
7
|
+
chainId: ChainId;
|
|
8
|
+
walletConnection?: Connection;
|
|
9
|
+
wallet?: ReturnType<typeof useWallet>;
|
|
10
|
+
}) => Promise<Raydium>;
|
|
@@ -1,16 +1,84 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { TokenInfo } from '../Token/type';
|
|
3
|
+
declare const routeApiResponseDataExample: {
|
|
4
|
+
resAmount: number;
|
|
5
|
+
priceImpact: number;
|
|
6
|
+
useSource: string;
|
|
7
|
+
resPricePerToToken: number;
|
|
8
|
+
resPricePerFromToken: number;
|
|
9
|
+
inputMint: string;
|
|
10
|
+
inAmount: string;
|
|
11
|
+
inputMintDecimal: number;
|
|
12
|
+
outputMint: string;
|
|
13
|
+
outAmount: string;
|
|
14
|
+
outputMintDecimal: number;
|
|
15
|
+
minOutAmount: string;
|
|
16
|
+
inAmountWithOutDecimals: number;
|
|
17
|
+
outAmountWithOutDecimals: number;
|
|
18
|
+
slippageBps: number;
|
|
19
|
+
routePlan: {
|
|
20
|
+
swapInfo: {
|
|
21
|
+
ammKey: string;
|
|
22
|
+
label: string;
|
|
23
|
+
inputMint: string;
|
|
24
|
+
outputMint: string;
|
|
25
|
+
inAmount: string;
|
|
26
|
+
outAmount: string;
|
|
27
|
+
feeAmount: string;
|
|
28
|
+
feeMint: string;
|
|
29
|
+
};
|
|
30
|
+
percent: number;
|
|
31
|
+
}[];
|
|
32
|
+
data: string;
|
|
33
|
+
lastValidBlockHeight: number;
|
|
34
|
+
};
|
|
35
|
+
declare const routeApiResponseExample: {
|
|
36
|
+
status: number;
|
|
37
|
+
data: {
|
|
5
38
|
resAmount: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
priceImpact: null;
|
|
39
|
+
priceImpact: number;
|
|
40
|
+
useSource: string;
|
|
9
41
|
resPricePerToToken: number;
|
|
10
42
|
resPricePerFromToken: number;
|
|
11
|
-
|
|
43
|
+
inputMint: string;
|
|
44
|
+
inAmount: string;
|
|
45
|
+
inputMintDecimal: number;
|
|
46
|
+
outputMint: string;
|
|
47
|
+
outAmount: string;
|
|
48
|
+
outputMintDecimal: number;
|
|
49
|
+
minOutAmount: string;
|
|
50
|
+
inAmountWithOutDecimals: number;
|
|
51
|
+
outAmountWithOutDecimals: number;
|
|
52
|
+
slippageBps: number;
|
|
53
|
+
routePlan: {
|
|
54
|
+
swapInfo: {
|
|
55
|
+
ammKey: string;
|
|
56
|
+
label: string;
|
|
57
|
+
inputMint: string;
|
|
58
|
+
outputMint: string;
|
|
59
|
+
inAmount: string;
|
|
60
|
+
outAmount: string;
|
|
61
|
+
feeAmount: string;
|
|
62
|
+
feeMint: string;
|
|
63
|
+
};
|
|
64
|
+
percent: number;
|
|
65
|
+
}[];
|
|
66
|
+
data: string;
|
|
67
|
+
lastValidBlockHeight: number;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export type IRouteResponseData = typeof routeApiResponseExample;
|
|
71
|
+
export type IRouteResponse = typeof routeApiResponseDataExample | null;
|
|
72
|
+
export declare function useFetchSolanaRoutePrice({ toToken, fromToken, fromAmount, slippage, }: {
|
|
73
|
+
fromToken: TokenInfo | null;
|
|
74
|
+
toToken: TokenInfo | null;
|
|
75
|
+
fromAmount: string;
|
|
76
|
+
slippage: number;
|
|
77
|
+
}): {
|
|
78
|
+
fetchRouteQuery: import("@tanstack/react-query").UseQueryResult<IRouteResponse, Error>;
|
|
12
79
|
execute: import("@tanstack/react-query").UseMutationResult<import("../Submission/types").ExecutionResult | undefined, Error, {
|
|
13
|
-
|
|
80
|
+
rawBrief: IRouteResponse;
|
|
14
81
|
subtitle: React.ReactNode;
|
|
15
82
|
}, unknown>;
|
|
16
83
|
};
|
|
84
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
|
1
3
|
import BigNumber from 'bignumber.js';
|
|
4
|
+
import { TokenInfo } from '../Token/type';
|
|
2
5
|
export declare function useSolanaConnection(): {
|
|
3
|
-
|
|
6
|
+
fetchSOLBalance: () => Promise<{
|
|
4
7
|
amount: BigNumber;
|
|
5
8
|
decimals: number;
|
|
6
9
|
uiAmount: number;
|
|
@@ -19,4 +22,9 @@ export declare function useSolanaConnection(): {
|
|
|
19
22
|
amount: BigNumber;
|
|
20
23
|
}>;
|
|
21
24
|
fetchBlockNumber: () => Promise<number>;
|
|
25
|
+
fetchTokenInfo: ({ mint, chainId, symbol, }: {
|
|
26
|
+
mint: string | PublicKey | undefined;
|
|
27
|
+
chainId: ChainId;
|
|
28
|
+
symbol?: string;
|
|
29
|
+
}) => Promise<TokenInfo>;
|
|
22
30
|
};
|