@dhedge/trading-widget 3.2.3 → 3.3.0-alpha.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 (41) hide show
  1. package/README.md +1 -0
  2. package/core-kit/abi/aave/aave-asset-guard.d.ts +50 -0
  3. package/core-kit/abi/easy-swapper-v2.d.ts +92 -0
  4. package/core-kit/abi/index.d.ts +3 -2
  5. package/core-kit/abi/pool-logic.d.ts +67 -0
  6. package/core-kit/abi/pool-manager-logic.d.ts +19 -0
  7. package/core-kit/const/contracts/polygon.d.ts +2 -0
  8. package/core-kit/hooks/pool/index.d.ts +1 -0
  9. package/core-kit/hooks/pool/multicall/use-pool-manager.dynamic.d.ts +75 -190
  10. package/core-kit/hooks/pool/multicall/use-pool-manager.static.d.ts +57 -0
  11. package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +274 -0
  12. package/core-kit/hooks/pool/multicall/use-pools.dynamic.d.ts +353 -0
  13. package/core-kit/hooks/pool/use-has-dhedge-vault-in-composition.d.ts +64 -0
  14. package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +1 -0
  15. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +92 -0
  16. package/core-kit/hooks/trading/use-swaps-data-query.d.ts +6 -0
  17. package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +1 -1
  18. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-aave-swap-params.d.ts +6 -0
  19. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-aave-swap-data.d.ts +5 -0
  20. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts +5 -0
  21. package/core-kit/hooks/trading/withdraw-v2/init-step/use-get-init-withdraw-transaction-arguments.d.ts +10 -0
  22. package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +92 -0
  23. package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +92 -0
  24. package/core-kit/hooks/web3/use-static-call-query.d.ts +7 -6
  25. package/core-kit/types/contract.types.d.ts +28 -0
  26. package/core-kit/types/index.d.ts +1 -0
  27. package/core-kit/types/web3.types.d.ts +0 -12
  28. package/core-kit/utils/transaction.d.ts +14 -3
  29. package/core-kit/utils/web3.d.ts +0 -2
  30. package/{index-83b0df05.js → index-5ba43d21.js} +9864 -9704
  31. package/index-addee486.cjs +217 -0
  32. package/index.cjs +1 -1
  33. package/index.d.ts +2 -2
  34. package/index.js +45 -45
  35. package/package.json +1 -1
  36. package/{pyth-adapter-99bcb2fd.cjs → pyth-adapter-557e7325.cjs} +1 -1
  37. package/{pyth-adapter-ae1c3eb3.js → pyth-adapter-ae35e010.js} +1 -1
  38. package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -0
  39. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction-arguments.d.ts +0 -5
  40. package/index-76ee9693.cjs +0 -217
  41. /package/core-kit/abi/{aave-lending-pool.d.ts → aave/aave-lending-pool.d.ts} +0 -0
@@ -88,6 +88,25 @@ export declare const usePoolManagerStatic: ({ address, chainId, }: PoolContractC
88
88
  }];
89
89
  readonly stateMutability: "nonpayable";
90
90
  readonly type: "function";
91
+ }, {
92
+ readonly inputs: readonly [];
93
+ readonly name: "getSupportedAssets";
94
+ readonly outputs: readonly [{
95
+ readonly components: readonly [{
96
+ readonly internalType: "address";
97
+ readonly name: "asset";
98
+ readonly type: "address";
99
+ }, {
100
+ readonly internalType: "bool";
101
+ readonly name: "isDeposit";
102
+ readonly type: "bool";
103
+ }];
104
+ readonly internalType: "struct IHasSupportedAsset.Asset[]";
105
+ readonly name: "";
106
+ readonly type: "tuple[]";
107
+ }];
108
+ readonly stateMutability: "view";
109
+ readonly type: "function";
91
110
  }];
92
111
  readonly functionName: "getFeeIncreaseInfo";
93
112
  readonly chainId: number;
@@ -180,6 +199,25 @@ export declare const usePoolManagerStatic: ({ address, chainId, }: PoolContractC
180
199
  }];
181
200
  readonly stateMutability: "nonpayable";
182
201
  readonly type: "function";
202
+ }, {
203
+ readonly inputs: readonly [];
204
+ readonly name: "getSupportedAssets";
205
+ readonly outputs: readonly [{
206
+ readonly components: readonly [{
207
+ readonly internalType: "address";
208
+ readonly name: "asset";
209
+ readonly type: "address";
210
+ }, {
211
+ readonly internalType: "bool";
212
+ readonly name: "isDeposit";
213
+ readonly type: "bool";
214
+ }];
215
+ readonly internalType: "struct IHasSupportedAsset.Asset[]";
216
+ readonly name: "";
217
+ readonly type: "tuple[]";
218
+ }];
219
+ readonly stateMutability: "view";
220
+ readonly type: "function";
183
221
  }];
184
222
  readonly functionName: "minDepositUSD";
185
223
  readonly chainId: number;
@@ -272,6 +310,25 @@ export declare const usePoolManagerStatic: ({ address, chainId, }: PoolContractC
272
310
  }];
273
311
  readonly stateMutability: "nonpayable";
274
312
  readonly type: "function";
313
+ }, {
314
+ readonly inputs: readonly [];
315
+ readonly name: "getSupportedAssets";
316
+ readonly outputs: readonly [{
317
+ readonly components: readonly [{
318
+ readonly internalType: "address";
319
+ readonly name: "asset";
320
+ readonly type: "address";
321
+ }, {
322
+ readonly internalType: "bool";
323
+ readonly name: "isDeposit";
324
+ readonly type: "bool";
325
+ }];
326
+ readonly internalType: "struct IHasSupportedAsset.Asset[]";
327
+ readonly name: "";
328
+ readonly type: "tuple[]";
329
+ }];
330
+ readonly stateMutability: "view";
331
+ readonly type: "function";
275
332
  }];
276
333
  readonly functionName: "isMemberAllowed";
277
334
  readonly args: readonly [`0x${string}`];
@@ -226,6 +226,33 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
226
226
  }];
227
227
  readonly stateMutability: "view";
228
228
  readonly type: "function";
229
+ }, {
230
+ readonly inputs: readonly [{
231
+ readonly internalType: "uint256";
232
+ readonly name: "_fundTokenAmount";
233
+ readonly type: "uint256";
234
+ }, {
235
+ readonly components: readonly [{
236
+ readonly internalType: "address";
237
+ readonly name: "supportedAsset";
238
+ readonly type: "address";
239
+ }, {
240
+ readonly internalType: "bytes";
241
+ readonly name: "withdrawData";
242
+ readonly type: "bytes";
243
+ }, {
244
+ readonly internalType: "uint256";
245
+ readonly name: "slippageTolerance";
246
+ readonly type: "uint256";
247
+ }];
248
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
249
+ readonly name: "_complexAssetsData";
250
+ readonly type: "tuple[]";
251
+ }];
252
+ readonly name: "withdrawSafe";
253
+ readonly outputs: readonly [];
254
+ readonly stateMutability: "nonpayable";
255
+ readonly type: "function";
229
256
  }, {
230
257
  readonly inputs: readonly [{
231
258
  readonly internalType: "uint256";
@@ -685,6 +712,54 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
685
712
  }];
686
713
  readonly stateMutability: "view";
687
714
  readonly type: "function";
715
+ }, {
716
+ readonly inputs: readonly [{
717
+ readonly internalType: "address";
718
+ readonly name: "_dHedgeVault";
719
+ readonly type: "address";
720
+ }, {
721
+ readonly internalType: "uint256";
722
+ readonly name: "_amountIn";
723
+ readonly type: "uint256";
724
+ }, {
725
+ readonly components: readonly [{
726
+ readonly internalType: "address";
727
+ readonly name: "supportedAsset";
728
+ readonly type: "address";
729
+ }, {
730
+ readonly internalType: "bytes";
731
+ readonly name: "withdrawData";
732
+ readonly type: "bytes";
733
+ }, {
734
+ readonly internalType: "uint256";
735
+ readonly name: "slippageTolerance";
736
+ readonly type: "uint256";
737
+ }];
738
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
739
+ readonly name: "_complexAssetsData";
740
+ readonly type: "tuple[]";
741
+ }];
742
+ readonly name: "initWithdrawal";
743
+ readonly outputs: readonly [{
744
+ readonly components: readonly [{
745
+ readonly internalType: "address";
746
+ readonly name: "token";
747
+ readonly type: "address";
748
+ }, {
749
+ readonly internalType: "uint256";
750
+ readonly name: "balance";
751
+ readonly type: "uint256";
752
+ }];
753
+ readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
754
+ readonly name: "trackedAssets";
755
+ readonly type: "tuple[]";
756
+ }, {
757
+ readonly internalType: "address";
758
+ readonly name: "vault";
759
+ readonly type: "address";
760
+ }];
761
+ readonly stateMutability: "nonpayable";
762
+ readonly type: "function";
688
763
  }, {
689
764
  readonly inputs: readonly [{
690
765
  readonly internalType: "address";
@@ -928,6 +1003,50 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
928
1003
  }];
929
1004
  readonly stateMutability: "nonpayable";
930
1005
  readonly type: "function";
1006
+ }, {
1007
+ readonly inputs: readonly [{
1008
+ readonly internalType: "address";
1009
+ readonly name: "_dHedgeVault";
1010
+ readonly type: "address";
1011
+ }, {
1012
+ readonly internalType: "uint256";
1013
+ readonly name: "_amountIn";
1014
+ readonly type: "uint256";
1015
+ }, {
1016
+ readonly components: readonly [{
1017
+ readonly internalType: "address";
1018
+ readonly name: "supportedAsset";
1019
+ readonly type: "address";
1020
+ }, {
1021
+ readonly internalType: "bytes";
1022
+ readonly name: "withdrawData";
1023
+ readonly type: "bytes";
1024
+ }, {
1025
+ readonly internalType: "uint256";
1026
+ readonly name: "slippageTolerance";
1027
+ readonly type: "uint256";
1028
+ }];
1029
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
1030
+ readonly name: "_complexAssetsData";
1031
+ readonly type: "tuple[]";
1032
+ }];
1033
+ readonly name: "unrollAndClaim";
1034
+ readonly outputs: readonly [{
1035
+ readonly components: readonly [{
1036
+ readonly internalType: "address";
1037
+ readonly name: "token";
1038
+ readonly type: "address";
1039
+ }, {
1040
+ readonly internalType: "uint256";
1041
+ readonly name: "balance";
1042
+ readonly type: "uint256";
1043
+ }];
1044
+ readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
1045
+ readonly name: "";
1046
+ readonly type: "tuple[]";
1047
+ }];
1048
+ readonly stateMutability: "nonpayable";
1049
+ readonly type: "function";
931
1050
  }, {
932
1051
  readonly inputs: readonly [];
933
1052
  readonly name: "weth";
@@ -1640,6 +1759,54 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
1640
1759
  }];
1641
1760
  readonly stateMutability: "view";
1642
1761
  readonly type: "function";
1762
+ }, {
1763
+ readonly inputs: readonly [{
1764
+ readonly internalType: "address";
1765
+ readonly name: "_dHedgeVault";
1766
+ readonly type: "address";
1767
+ }, {
1768
+ readonly internalType: "uint256";
1769
+ readonly name: "_amountIn";
1770
+ readonly type: "uint256";
1771
+ }, {
1772
+ readonly components: readonly [{
1773
+ readonly internalType: "address";
1774
+ readonly name: "supportedAsset";
1775
+ readonly type: "address";
1776
+ }, {
1777
+ readonly internalType: "bytes";
1778
+ readonly name: "withdrawData";
1779
+ readonly type: "bytes";
1780
+ }, {
1781
+ readonly internalType: "uint256";
1782
+ readonly name: "slippageTolerance";
1783
+ readonly type: "uint256";
1784
+ }];
1785
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
1786
+ readonly name: "_complexAssetsData";
1787
+ readonly type: "tuple[]";
1788
+ }];
1789
+ readonly name: "initWithdrawal";
1790
+ readonly outputs: readonly [{
1791
+ readonly components: readonly [{
1792
+ readonly internalType: "address";
1793
+ readonly name: "token";
1794
+ readonly type: "address";
1795
+ }, {
1796
+ readonly internalType: "uint256";
1797
+ readonly name: "balance";
1798
+ readonly type: "uint256";
1799
+ }];
1800
+ readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
1801
+ readonly name: "trackedAssets";
1802
+ readonly type: "tuple[]";
1803
+ }, {
1804
+ readonly internalType: "address";
1805
+ readonly name: "vault";
1806
+ readonly type: "address";
1807
+ }];
1808
+ readonly stateMutability: "nonpayable";
1809
+ readonly type: "function";
1643
1810
  }, {
1644
1811
  readonly inputs: readonly [{
1645
1812
  readonly internalType: "address";
@@ -1883,6 +2050,50 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
1883
2050
  }];
1884
2051
  readonly stateMutability: "nonpayable";
1885
2052
  readonly type: "function";
2053
+ }, {
2054
+ readonly inputs: readonly [{
2055
+ readonly internalType: "address";
2056
+ readonly name: "_dHedgeVault";
2057
+ readonly type: "address";
2058
+ }, {
2059
+ readonly internalType: "uint256";
2060
+ readonly name: "_amountIn";
2061
+ readonly type: "uint256";
2062
+ }, {
2063
+ readonly components: readonly [{
2064
+ readonly internalType: "address";
2065
+ readonly name: "supportedAsset";
2066
+ readonly type: "address";
2067
+ }, {
2068
+ readonly internalType: "bytes";
2069
+ readonly name: "withdrawData";
2070
+ readonly type: "bytes";
2071
+ }, {
2072
+ readonly internalType: "uint256";
2073
+ readonly name: "slippageTolerance";
2074
+ readonly type: "uint256";
2075
+ }];
2076
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
2077
+ readonly name: "_complexAssetsData";
2078
+ readonly type: "tuple[]";
2079
+ }];
2080
+ readonly name: "unrollAndClaim";
2081
+ readonly outputs: readonly [{
2082
+ readonly components: readonly [{
2083
+ readonly internalType: "address";
2084
+ readonly name: "token";
2085
+ readonly type: "address";
2086
+ }, {
2087
+ readonly internalType: "uint256";
2088
+ readonly name: "balance";
2089
+ readonly type: "uint256";
2090
+ }];
2091
+ readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
2092
+ readonly name: "";
2093
+ readonly type: "tuple[]";
2094
+ }];
2095
+ readonly stateMutability: "nonpayable";
2096
+ readonly type: "function";
1886
2097
  }, {
1887
2098
  readonly inputs: readonly [];
1888
2099
  readonly name: "weth";
@@ -2153,8 +2364,71 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
2153
2364
  readonly functionName: "customCooldown";
2154
2365
  readonly args: readonly [];
2155
2366
  readonly chainId: number;
2367
+ }, {
2368
+ readonly address: `0x${string}`;
2369
+ readonly chainId: number;
2370
+ readonly abi: readonly [{
2371
+ readonly inputs: readonly [{
2372
+ readonly internalType: "address";
2373
+ readonly name: "asset";
2374
+ readonly type: "address";
2375
+ }];
2376
+ readonly name: "getAssetPrice";
2377
+ readonly outputs: readonly [{
2378
+ readonly internalType: "uint256";
2379
+ readonly name: "price";
2380
+ readonly type: "uint256";
2381
+ }];
2382
+ readonly stateMutability: "view";
2383
+ readonly type: "function";
2384
+ }, {
2385
+ readonly inputs: readonly [{
2386
+ readonly internalType: "address";
2387
+ readonly name: "";
2388
+ readonly type: "address";
2389
+ }];
2390
+ readonly name: "isPool";
2391
+ readonly outputs: readonly [{
2392
+ readonly internalType: "bool";
2393
+ readonly name: "";
2394
+ readonly type: "bool";
2395
+ }];
2396
+ readonly stateMutability: "view";
2397
+ readonly type: "function";
2398
+ }, {
2399
+ readonly inputs: readonly [{
2400
+ readonly internalType: "address";
2401
+ readonly name: "extContract";
2402
+ readonly type: "address";
2403
+ }];
2404
+ readonly name: "getAssetGuard";
2405
+ readonly outputs: readonly [{
2406
+ readonly internalType: "address";
2407
+ readonly name: "guard";
2408
+ readonly type: "address";
2409
+ }];
2410
+ readonly stateMutability: "view";
2411
+ readonly type: "function";
2412
+ }, {
2413
+ readonly inputs: readonly [{
2414
+ readonly internalType: "address";
2415
+ readonly name: "extContract";
2416
+ readonly type: "address";
2417
+ }];
2418
+ readonly name: "getContractGuard";
2419
+ readonly outputs: readonly [{
2420
+ readonly internalType: "address";
2421
+ readonly name: "guard";
2422
+ readonly type: "address";
2423
+ }];
2424
+ readonly stateMutability: "view";
2425
+ readonly type: "function";
2426
+ }];
2427
+ readonly functionName: "getAssetGuard";
2428
+ readonly args: readonly [`0x${string}`];
2156
2429
  }], true, {
2157
2430
  poolManagerLogic: `0x${string}` | undefined;
2158
2431
  isCustomCooldownDepositAllowed: boolean | undefined;
2159
2432
  customCooldown: bigint | undefined;
2433
+ aaveAssetGuardAddress: `0x${string}` | undefined;
2160
2434
  }>;