@dhedge/trading-widget 3.2.0-alpha.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -98
- package/core-kit/abi/easy-swapper-v2.d.ts +4 -48
- package/core-kit/abi/index.d.ts +2 -3
- package/core-kit/abi/pool-logic.d.ts +124 -878
- package/core-kit/abi/pool-manager-logic.d.ts +0 -19
- package/core-kit/const/contracts/base.d.ts +1 -1
- package/core-kit/const/contracts/polygon.d.ts +0 -2
- package/core-kit/const/default-data.d.ts +1 -1
- package/core-kit/const/synthetix.d.ts +1 -0
- package/core-kit/hooks/pool/multicall/use-pool-manager.dynamic.d.ts +190 -75
- package/core-kit/hooks/pool/multicall/use-pool-manager.static.d.ts +0 -57
- package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +90 -955
- package/core-kit/hooks/pool/multicall/use-pools.dynamic.d.ts +214 -3315
- package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +0 -1
- package/core-kit/hooks/pool/use-pool-fees.d.ts +1 -0
- package/core-kit/hooks/state/action.d.ts +0 -3
- package/core-kit/hooks/state/index.d.ts +1 -2
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +4 -48
- package/core-kit/hooks/trading/use-is-transaction-loading.d.ts +2 -0
- package/core-kit/hooks/trading/use-swaps-data-query.d.ts +0 -6
- package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +1 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction-arguments.d.ts +1 -6
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction.d.ts +5 -1
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +4 -48
- package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +4 -48
- package/core-kit/hooks/web3/use-static-call-query.d.ts +6 -7
- package/core-kit/types/index.d.ts +0 -1
- package/core-kit/types/state.types.d.ts +0 -8
- package/core-kit/types/web3.types.d.ts +12 -0
- package/core-kit/utils/transaction.d.ts +3 -14
- package/core-kit/utils/web3.d.ts +2 -0
- package/{index-97262ee5.js → index-1ece81a6.js} +11509 -12797
- package/index-925f46e2.cjs +217 -0
- package/index.cjs +1 -1
- package/index.d.ts +3 -3
- package/index.js +203 -204
- package/package.json +1 -1
- package/{pyth-adapter-3dec6847.cjs → pyth-adapter-59d66d7b.cjs} +1 -1
- package/{pyth-adapter-4822ae26.js → pyth-adapter-de3394ab.js} +1 -1
- package/style.css +1 -1
- package/trading-widget/components/deposit/button/trade-button/trade-button.hooks.d.ts +1 -0
- package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +1 -0
- package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +0 -3
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-deposit-swap-quote-button/reload-deposit-swap-quote-button.hooks.d.ts +1 -3
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-withdraw-swap-quote-button/reload-withdraw-swap-quote-button.hooks.d.ts +1 -3
- package/trading-widget/components/widget/widget-overlay/index.d.ts +0 -1
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/vault-transaction-summary.d.ts +1 -7
- package/trading-widget/components/withdraw/complete-step/button/claim-button/claim-button.hooks.d.ts +1 -0
- package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.hooks.d.ts +1 -0
- package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.hooks.d.ts +1 -0
- package/trading-widget/components/withdraw/init-step/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +1 -3
- package/trading-widget/providers/config-provider/config-provider.types.d.ts +0 -1
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +1 -1
- package/core-kit/abi/aave/aave-asset-guard.d.ts +0 -50
- package/core-kit/hooks/state/meta.d.ts +0 -6
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-aave-swap-params.d.ts +0 -6
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts +0 -5
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-aave-swap-data.d.ts +0 -5
- package/core-kit/types/contract.types.d.ts +0 -28
- package/index-3ff0a312.cjs +0 -217
- package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.d.ts +0 -2
- package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.hooks.d.ts +0 -3
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/claim-summary.d.ts +0 -7
- /package/core-kit/abi/{aave/aave-lending-pool.d.ts → aave-lending-pool.d.ts} +0 -0
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TradingPanelActionsState, TradingPanelState } from 'core-kit/types/state.types';
|
|
2
|
-
export declare const useTradingPanelMeta: () => [
|
|
3
|
-
TradingPanelState['meta'],
|
|
4
|
-
TradingPanelActionsState['updateTradingMeta']
|
|
5
|
-
];
|
|
6
|
-
export declare const useTradingPanelApprovingStatus: () => ["success" | "pending" | undefined, (approvingStatus: TradingPanelState['meta']['approvingStatus']) => void];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CalculateSwapDataParamsResponse, PoolConfig } from 'core-kit/types';
|
|
2
|
-
export interface FetchAaveSwapParamsProps {
|
|
3
|
-
withdrawAmount: bigint;
|
|
4
|
-
slippage: number;
|
|
5
|
-
}
|
|
6
|
-
export declare const useFetchAaveSwapParams: ({ address, chainId, }: Pick<PoolConfig, 'address' | 'chainId'>) => ({ withdrawAmount, slippage, }: FetchAaveSwapParamsProps) => Promise<CalculateSwapDataParamsResponse | undefined>;
|
package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { FetchAaveSwapParamsProps } from 'core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-aave-swap-params';
|
|
2
|
-
import type { ComplexWithdrawAssetData, PoolConfig } from 'core-kit/types';
|
|
3
|
-
export declare const useFetchInitWithdrawComplexAssetData: ({ address, chainId, }: Pick<PoolConfig, 'address' | 'chainId'>) => ({ withdrawAmount, slippage, disabled, }: FetchAaveSwapParamsProps & {
|
|
4
|
-
disabled?: boolean | undefined;
|
|
5
|
-
}) => Promise<ComplexWithdrawAssetData[]>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { CalculateSwapDataParamsResponse, PoolConfig } from 'core-kit/types';
|
|
2
|
-
export declare const useFetchInitWithdrawAaveSwapData: ({ chainId, }: Pick<PoolConfig, 'chainId'>) => ({ swapParams, slippage, }: {
|
|
3
|
-
swapParams: CalculateSwapDataParamsResponse | undefined;
|
|
4
|
-
slippage: number;
|
|
5
|
-
}) => Promise<Record<`0x${string}`, import("core-kit/types").SwapDataResponse>>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Address } from 'viem';
|
|
2
|
-
export interface DynamicPoolContractData {
|
|
3
|
-
userBalance: string | undefined;
|
|
4
|
-
tokenPrice: string | undefined;
|
|
5
|
-
getExitRemainingCooldown: string | undefined;
|
|
6
|
-
totalValue: string | undefined;
|
|
7
|
-
totalSupply: string | undefined;
|
|
8
|
-
isPrivateVault: boolean | undefined;
|
|
9
|
-
performanceFee: string | undefined;
|
|
10
|
-
streamingFee: string | undefined;
|
|
11
|
-
entryFee: string | undefined;
|
|
12
|
-
exitFee: string | undefined;
|
|
13
|
-
managerAddress: string | undefined;
|
|
14
|
-
}
|
|
15
|
-
type AssetStructure = {
|
|
16
|
-
asset: Address;
|
|
17
|
-
amount: bigint;
|
|
18
|
-
};
|
|
19
|
-
export interface CalculateSwapDataParamsResponse {
|
|
20
|
-
srcData: AssetStructure[];
|
|
21
|
-
dstData: AssetStructure;
|
|
22
|
-
}
|
|
23
|
-
export interface ComplexWithdrawAssetData {
|
|
24
|
-
supportedAsset: Address;
|
|
25
|
-
withdrawData: string;
|
|
26
|
-
slippageTolerance: bigint;
|
|
27
|
-
}
|
|
28
|
-
export {};
|