@dhedge/trading-widget 3.2.0 → 3.3.0-alpha.0

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 (38) 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 +875 -121
  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/multicall/use-pool-manager.dynamic.d.ts +75 -190
  9. package/core-kit/hooks/pool/multicall/use-pool-manager.static.d.ts +57 -0
  10. package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +981 -20
  11. package/core-kit/hooks/pool/multicall/use-pools.dynamic.d.ts +3331 -230
  12. package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +1 -0
  13. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +92 -0
  14. package/core-kit/hooks/trading/use-swaps-data-query.d.ts +6 -0
  15. package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +1 -1
  16. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-aave-swap-params.d.ts +6 -0
  17. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts +5 -0
  18. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-aave-swap-data.d.ts +5 -0
  19. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction-arguments.d.ts +6 -1
  20. package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +92 -0
  21. package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +92 -0
  22. package/core-kit/hooks/web3/use-static-call-query.d.ts +7 -6
  23. package/core-kit/types/contract.types.d.ts +28 -0
  24. package/core-kit/types/index.d.ts +1 -0
  25. package/core-kit/types/web3.types.d.ts +0 -12
  26. package/core-kit/utils/transaction.d.ts +14 -3
  27. package/core-kit/utils/web3.d.ts +0 -2
  28. package/index-486e8b60.cjs +217 -0
  29. package/{index-d62956b7.js → index-a29190ba.js} +10593 -9573
  30. package/index.cjs +1 -1
  31. package/index.d.ts +1 -1
  32. package/index.js +125 -126
  33. package/package.json +1 -1
  34. package/{pyth-adapter-e278f630.js → pyth-adapter-330946d6.js} +1 -1
  35. package/{pyth-adapter-c8d76d79.cjs → pyth-adapter-a81f3e9c.cjs} +1 -1
  36. package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -0
  37. package/index-8d920656.cjs +0 -217
  38. /package/core-kit/abi/{aave-lending-pool.d.ts → aave/aave-lending-pool.d.ts} +0 -0
package/README.md CHANGED
@@ -128,6 +128,7 @@ UI configuration provider. Manages params to configure custom styling, component
128
128
  > | `standalone` | `boolean` | `true` | Handles token selection in SPA mode |
129
129
  > | `isAllAssetsWithdrawOptionDefault` | `boolean` | `false` | Sets "All Assets" withdraw option by default |
130
130
  > | `chainConfig` | `Partial<Record<ChainId, { name: string; iconPath: string }>>` | `{}` | Sets map of chain `name` and `iconPath` |
131
+ > | `aaveOffchainWithdrawChainIds` | `ChainId[]` | `[]` | Offchain swap data will be used for Aave withdrawals for selected chains |
131
132
 
132
133
  ##### actions
133
134
 
@@ -0,0 +1,50 @@
1
+ export declare const AaveAssetGuardAbi: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "address";
4
+ readonly name: "_pool";
5
+ readonly type: "address";
6
+ }, {
7
+ readonly internalType: "uint256";
8
+ readonly name: "_poolTokenAmount";
9
+ readonly type: "uint256";
10
+ }, {
11
+ readonly internalType: "uint256";
12
+ readonly name: "_slippageTolerance";
13
+ readonly type: "uint256";
14
+ }];
15
+ readonly name: "calculateSwapDataParams";
16
+ readonly outputs: readonly [{
17
+ readonly components: readonly [{
18
+ readonly components: readonly [{
19
+ readonly internalType: "address";
20
+ readonly name: "asset";
21
+ readonly type: "address";
22
+ }, {
23
+ readonly internalType: "uint256";
24
+ readonly name: "amount";
25
+ readonly type: "uint256";
26
+ }];
27
+ readonly internalType: "struct ISwapDataConsumingGuard.AssetStructure[]";
28
+ readonly name: "srcData";
29
+ readonly type: "tuple[]";
30
+ }, {
31
+ readonly components: readonly [{
32
+ readonly internalType: "address";
33
+ readonly name: "asset";
34
+ readonly type: "address";
35
+ }, {
36
+ readonly internalType: "uint256";
37
+ readonly name: "amount";
38
+ readonly type: "uint256";
39
+ }];
40
+ readonly internalType: "struct ISwapDataConsumingGuard.AssetStructure";
41
+ readonly name: "dstData";
42
+ readonly type: "tuple";
43
+ }];
44
+ readonly internalType: "struct ISwapDataConsumingGuard.SwapDataParams";
45
+ readonly name: "swapDataParams";
46
+ readonly type: "tuple";
47
+ }];
48
+ readonly stateMutability: "nonpayable";
49
+ readonly type: "function";
50
+ }];
@@ -434,6 +434,54 @@ export declare const EasySwapperV2Abi: readonly [{
434
434
  }];
435
435
  readonly stateMutability: "view";
436
436
  readonly type: "function";
437
+ }, {
438
+ readonly inputs: readonly [{
439
+ readonly internalType: "address";
440
+ readonly name: "_dHedgeVault";
441
+ readonly type: "address";
442
+ }, {
443
+ readonly internalType: "uint256";
444
+ readonly name: "_amountIn";
445
+ readonly type: "uint256";
446
+ }, {
447
+ readonly components: readonly [{
448
+ readonly internalType: "address";
449
+ readonly name: "supportedAsset";
450
+ readonly type: "address";
451
+ }, {
452
+ readonly internalType: "bytes";
453
+ readonly name: "withdrawData";
454
+ readonly type: "bytes";
455
+ }, {
456
+ readonly internalType: "uint256";
457
+ readonly name: "slippageTolerance";
458
+ readonly type: "uint256";
459
+ }];
460
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
461
+ readonly name: "_complexAssetsData";
462
+ readonly type: "tuple[]";
463
+ }];
464
+ readonly name: "initWithdrawal";
465
+ readonly outputs: readonly [{
466
+ readonly components: readonly [{
467
+ readonly internalType: "address";
468
+ readonly name: "token";
469
+ readonly type: "address";
470
+ }, {
471
+ readonly internalType: "uint256";
472
+ readonly name: "balance";
473
+ readonly type: "uint256";
474
+ }];
475
+ readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
476
+ readonly name: "trackedAssets";
477
+ readonly type: "tuple[]";
478
+ }, {
479
+ readonly internalType: "address";
480
+ readonly name: "vault";
481
+ readonly type: "address";
482
+ }];
483
+ readonly stateMutability: "nonpayable";
484
+ readonly type: "function";
437
485
  }, {
438
486
  readonly inputs: readonly [{
439
487
  readonly internalType: "address";
@@ -677,6 +725,50 @@ export declare const EasySwapperV2Abi: readonly [{
677
725
  }];
678
726
  readonly stateMutability: "nonpayable";
679
727
  readonly type: "function";
728
+ }, {
729
+ readonly inputs: readonly [{
730
+ readonly internalType: "address";
731
+ readonly name: "_dHedgeVault";
732
+ readonly type: "address";
733
+ }, {
734
+ readonly internalType: "uint256";
735
+ readonly name: "_amountIn";
736
+ readonly type: "uint256";
737
+ }, {
738
+ readonly components: readonly [{
739
+ readonly internalType: "address";
740
+ readonly name: "supportedAsset";
741
+ readonly type: "address";
742
+ }, {
743
+ readonly internalType: "bytes";
744
+ readonly name: "withdrawData";
745
+ readonly type: "bytes";
746
+ }, {
747
+ readonly internalType: "uint256";
748
+ readonly name: "slippageTolerance";
749
+ readonly type: "uint256";
750
+ }];
751
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
752
+ readonly name: "_complexAssetsData";
753
+ readonly type: "tuple[]";
754
+ }];
755
+ readonly name: "unrollAndClaim";
756
+ readonly outputs: readonly [{
757
+ readonly components: readonly [{
758
+ readonly internalType: "address";
759
+ readonly name: "token";
760
+ readonly type: "address";
761
+ }, {
762
+ readonly internalType: "uint256";
763
+ readonly name: "balance";
764
+ readonly type: "uint256";
765
+ }];
766
+ readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
767
+ readonly name: "";
768
+ readonly type: "tuple[]";
769
+ }];
770
+ readonly stateMutability: "nonpayable";
771
+ readonly type: "function";
680
772
  }, {
681
773
  readonly inputs: readonly [];
682
774
  readonly name: "weth";
@@ -1,8 +1,9 @@
1
1
  export { erc20Abi } from './erc20';
2
- export { AaveLendingPoolAbi } from './aave-lending-pool';
2
+ export { AaveLendingPoolAbi } from './aave/aave-lending-pool';
3
+ export { AaveAssetGuardAbi } from './aave/aave-asset-guard';
3
4
  export { DHedgeStakingV2Abi } from './dhedge-staking-v2';
4
5
  export { PoolFactoryAbi } from './pool-factory';
5
- export { PoolLogicAbi } from './pool-logic';
6
+ export { PoolLogicAbi, ComplexWithdrawalAssetSrcDataAbiItem, ComplexWithdrawalDataAbiItem, } from './pool-logic';
6
7
  export { PoolManagerLogicAbi } from './pool-manager-logic';
7
8
  export { RewardDistributionAbi } from './reward-distribution';
8
9
  export { ITrustedMulticallForwarderAbi, IERC7412Abi, SynthetixV3CoreAbi, SynthetixV3AssetGuard, SynthetixV3ContractGuard, } from './synthetix-v3';