@dhedge/trading-widget 3.0.0-alpha.4 → 3.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/core-kit/abi/easy-swapper-v2.d.ts +322 -0
- package/core-kit/const/default-data.d.ts +2 -0
- package/core-kit/const/network.d.ts +156 -1706
- package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +644 -0
- package/core-kit/hooks/pool/multicall/use-pools.dynamic.d.ts +4 -1
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +322 -0
- package/core-kit/hooks/trading/withdraw-v2/index.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +3 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-estimated-receive-assets.d.ts +210 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction-arguments.d.ts +5 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-is-unroll-and-claim-transaction.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdraw-assets-info.d.ts +219 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +832 -0
- package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +322 -0
- package/core-kit/types/trading-panel.types.d.ts +1 -1
- package/index-33c9ef9c.cjs +217 -0
- package/index-3d8f663e.js +40423 -0
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/pyth-adapter-78dd047a.js +5705 -0
- package/pyth-adapter-83411db2.cjs +11 -0
- package/style.css +1 -1
- package/trading-widget/components/common/balance/withdraw-assets-composition-table.d.ts +7 -0
- package/trading-widget/components/common/meta/assets-composition-disclosure/assets-composition-disclosure.d.ts +3 -0
- package/trading-widget/components/common/spinner/spinner.d.ts +0 -2
- package/trading-widget/components/withdraw/complete-step/balance/complete-withdraw-balance.hooks.d.ts +1 -1
- package/trading-widget/components/withdraw/init-step/input-group/init-withdraw-input-group.hooks.d.ts +0 -1
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/all-assets-composition-table/all-assets-composition-table.d.ts +2 -0
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/all-assets-composition-table/all-assets-composition-table.hooks.d.ts +14 -0
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/single-asset-composition-table/single-asset-composition-table.d.ts +3 -0
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/single-asset-composition-table/single-asset-composition-table.hooks.d.ts +10 -0
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/withdraw-section.d.ts +4 -1
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/withdraw-section.hooks.d.ts +11 -8
- package/trading-widget/components/withdraw/stepper/withdraw-stepper.d.ts +2 -0
- package/trading-widget/components/withdraw/stepper/withdraw-stepper.hooks.d.ts +8 -0
- package/trading-widget/components/withdraw/tab-panel/tab-panel.hooks.d.ts +0 -2
- package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +0 -1
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +5 -1
- package/trading-widget/utils/synthetix-v3.d.ts +8 -9
- package/index-9fbabd1e.js +0 -39505
- package/index-aca26249.cjs +0 -207
- package/pyth-adapter-5451669c.cjs +0 -11
- package/pyth-adapter-f527b1bb.js +0 -4119
- package/trading-widget/components/widget/widget-meta/stepper.d.ts +0 -9
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/asset-composition-table/asset-composition-table.d.ts +0 -2
- package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/asset-composition-table/asset-composition-table.hooks.d.ts +0 -12
- /package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/{asset-composition-table → all-assets-composition-table}/withdraw-explanation-tip.d.ts +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { AllAssetsCompositionTableProps } from 'trading-widget/components/withdraw/init-step/input-group/withdraw-section/all-assets-composition-table/all-assets-composition-table.hooks';
|
|
2
|
+
export declare const AllAssetsCompositionTable: ({ className, showFraction, iconSize, showAllAsset, }: AllAssetsCompositionTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TokenIconSize } from 'trading-widget/types';
|
|
2
|
+
export interface AllAssetsCompositionTableProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
showFraction?: boolean;
|
|
5
|
+
iconSize?: TokenIconSize;
|
|
6
|
+
showAllAsset?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const useAllAssetsCompositionTable: (showAllAsset: AllAssetsCompositionTableProps['showAllAsset']) => {
|
|
9
|
+
visibleAssets: import("../../../../../../..").PoolCompositionWithFraction[];
|
|
10
|
+
hiddenAssets: import("../../../../../../..").PoolCompositionWithFraction[];
|
|
11
|
+
chainId: number;
|
|
12
|
+
showUnitWithdrawalTip: boolean;
|
|
13
|
+
address: `0x${string}`;
|
|
14
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { SingleAssetCompositionTableProps } from 'trading-widget/components/withdraw/init-step/input-group/withdraw-section/single-asset-composition-table/single-asset-composition-table.hooks';
|
|
3
|
+
export declare const SingleAssetCompositionTable: FC<SingleAssetCompositionTableProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { useInitWithdrawEstimatedReceiveAssets } from 'core-kit/hooks/trading/withdraw-v2/init-step';
|
|
2
|
+
export interface SingleAssetCompositionTableProps {
|
|
3
|
+
assets: ReturnType<typeof useInitWithdrawEstimatedReceiveAssets>['data'];
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const useSingleAssetCompositionTable: ({ assets, }: Pick<SingleAssetCompositionTableProps, 'assets'>) => {
|
|
7
|
+
showReceivedResults: boolean;
|
|
8
|
+
showSingleTokenAmount: boolean;
|
|
9
|
+
singleTokenBalance: number | undefined;
|
|
10
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
|
|
2
|
+
interface WithdrawSectionProps {
|
|
3
|
+
isMultiAssetWithdraw: boolean;
|
|
4
|
+
}
|
|
3
5
|
export declare const WithdrawSection: FC<WithdrawSectionProps>;
|
|
6
|
+
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export declare const useWithdrawSection: () => {
|
|
2
|
+
assets: {
|
|
3
|
+
address: `0x${string}`;
|
|
4
|
+
symbol: string;
|
|
5
|
+
decimals: number;
|
|
6
|
+
rawBalance: bigint;
|
|
7
|
+
balance: number;
|
|
8
|
+
price: number;
|
|
9
|
+
}[];
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
usdAmount: string;
|
|
3
12
|
assetSymbol: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const useWithdrawSection: ({ isMultiAssetWithdraw, assetSymbol, }: WithdrawSectionProps) => {
|
|
6
|
-
isMultiAssetWithdraw: boolean;
|
|
7
|
-
label: string;
|
|
8
|
-
assetSymbol: string;
|
|
9
|
-
vaultSymbol: string;
|
|
10
13
|
};
|
|
@@ -80,15 +80,19 @@ export type TranslationMap = {
|
|
|
80
80
|
depositAction: string;
|
|
81
81
|
withdrawAction: string;
|
|
82
82
|
unrollAction: string;
|
|
83
|
+
unrollAndClaimAction: string;
|
|
83
84
|
swapAction: string;
|
|
84
85
|
claimAction: string;
|
|
85
86
|
claimLabel: string;
|
|
86
87
|
swapAndClaimTo: string;
|
|
87
|
-
withdrawDescriptionTitle: string;
|
|
88
88
|
initWithdrawDescription: string;
|
|
89
89
|
initWithdrawTooltip: string;
|
|
90
90
|
completeWithdrawDescription: string;
|
|
91
91
|
completeWithdrawTooltip: string;
|
|
92
|
+
unrollAndClaimDescription: string;
|
|
93
|
+
total: string;
|
|
94
|
+
showAll: string;
|
|
95
|
+
hide: string;
|
|
92
96
|
[key: string]: string;
|
|
93
97
|
};
|
|
94
98
|
export interface TranslationProviderProps {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { UTCDate } from '@date-fns/utc';
|
|
2
1
|
import type { SynthetixV3PeriodType } from 'trading-widget/types/synthetix-v3.types';
|
|
3
2
|
export declare const getDateRangeByPeriod: (period: SynthetixV3PeriodType) => {
|
|
4
|
-
from:
|
|
5
|
-
to:
|
|
3
|
+
from: Date;
|
|
4
|
+
to: Date;
|
|
6
5
|
intraWeekRanges: {
|
|
7
|
-
from:
|
|
8
|
-
to:
|
|
6
|
+
from: Date;
|
|
7
|
+
to: Date;
|
|
9
8
|
}[];
|
|
10
9
|
duration: {
|
|
11
10
|
percentage: number;
|
|
@@ -16,11 +15,11 @@ export declare const getDateRangeByPeriod: (period: SynthetixV3PeriodType) => {
|
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
17
|
export declare const getRangeData: () => {
|
|
19
|
-
from:
|
|
20
|
-
to:
|
|
18
|
+
from: Date;
|
|
19
|
+
to: Date;
|
|
21
20
|
intraWeekRanges: {
|
|
22
|
-
from:
|
|
23
|
-
to:
|
|
21
|
+
from: Date;
|
|
22
|
+
to: Date;
|
|
24
23
|
}[];
|
|
25
24
|
duration: {
|
|
26
25
|
percentage: number;
|