@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.
Files changed (65) hide show
  1. package/README.md +95 -98
  2. package/core-kit/abi/easy-swapper-v2.d.ts +4 -48
  3. package/core-kit/abi/index.d.ts +2 -3
  4. package/core-kit/abi/pool-logic.d.ts +124 -878
  5. package/core-kit/abi/pool-manager-logic.d.ts +0 -19
  6. package/core-kit/const/contracts/base.d.ts +1 -1
  7. package/core-kit/const/contracts/polygon.d.ts +0 -2
  8. package/core-kit/const/default-data.d.ts +1 -1
  9. package/core-kit/const/synthetix.d.ts +1 -0
  10. package/core-kit/hooks/pool/multicall/use-pool-manager.dynamic.d.ts +190 -75
  11. package/core-kit/hooks/pool/multicall/use-pool-manager.static.d.ts +0 -57
  12. package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +90 -955
  13. package/core-kit/hooks/pool/multicall/use-pools.dynamic.d.ts +214 -3315
  14. package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +0 -1
  15. package/core-kit/hooks/pool/use-pool-fees.d.ts +1 -0
  16. package/core-kit/hooks/state/action.d.ts +0 -3
  17. package/core-kit/hooks/state/index.d.ts +1 -2
  18. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +4 -48
  19. package/core-kit/hooks/trading/use-is-transaction-loading.d.ts +2 -0
  20. package/core-kit/hooks/trading/use-swaps-data-query.d.ts +0 -6
  21. package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +1 -1
  22. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction-arguments.d.ts +1 -6
  23. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction.d.ts +5 -1
  24. package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +4 -48
  25. package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +4 -48
  26. package/core-kit/hooks/web3/use-static-call-query.d.ts +6 -7
  27. package/core-kit/types/index.d.ts +0 -1
  28. package/core-kit/types/state.types.d.ts +0 -8
  29. package/core-kit/types/web3.types.d.ts +12 -0
  30. package/core-kit/utils/transaction.d.ts +3 -14
  31. package/core-kit/utils/web3.d.ts +2 -0
  32. package/{index-97262ee5.js → index-1ece81a6.js} +11509 -12797
  33. package/index-925f46e2.cjs +217 -0
  34. package/index.cjs +1 -1
  35. package/index.d.ts +3 -3
  36. package/index.js +203 -204
  37. package/package.json +1 -1
  38. package/{pyth-adapter-3dec6847.cjs → pyth-adapter-59d66d7b.cjs} +1 -1
  39. package/{pyth-adapter-4822ae26.js → pyth-adapter-de3394ab.js} +1 -1
  40. package/style.css +1 -1
  41. package/trading-widget/components/deposit/button/trade-button/trade-button.hooks.d.ts +1 -0
  42. package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +1 -0
  43. package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +0 -3
  44. 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
  45. 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
  46. package/trading-widget/components/widget/widget-overlay/index.d.ts +0 -1
  47. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +1 -0
  48. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/vault-transaction-summary.d.ts +1 -7
  49. package/trading-widget/components/withdraw/complete-step/button/claim-button/claim-button.hooks.d.ts +1 -0
  50. package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.hooks.d.ts +1 -0
  51. package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.hooks.d.ts +1 -0
  52. package/trading-widget/components/withdraw/init-step/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +1 -3
  53. package/trading-widget/providers/config-provider/config-provider.types.d.ts +0 -1
  54. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +1 -1
  55. package/core-kit/abi/aave/aave-asset-guard.d.ts +0 -50
  56. package/core-kit/hooks/state/meta.d.ts +0 -6
  57. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-aave-swap-params.d.ts +0 -6
  58. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts +0 -5
  59. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-aave-swap-data.d.ts +0 -5
  60. package/core-kit/types/contract.types.d.ts +0 -28
  61. package/index-3ff0a312.cjs +0 -217
  62. package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.d.ts +0 -2
  63. package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.hooks.d.ts +0 -3
  64. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/claim-summary.d.ts +0 -7
  65. /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>;
@@ -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 {};