@dhedge/trading-widget 3.1.5 → 3.2.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.
- package/README.md +1 -0
- package/core-kit/abi/aave/aave-asset-guard.d.ts +50 -0
- package/core-kit/abi/easy-swapper-v2.d.ts +48 -0
- package/core-kit/abi/index.d.ts +3 -2
- package/core-kit/abi/pool-logic.d.ts +875 -121
- package/core-kit/abi/pool-manager-logic.d.ts +19 -0
- package/core-kit/const/contracts/base.d.ts +1 -1
- package/core-kit/const/contracts/polygon.d.ts +2 -0
- package/core-kit/const/synthetix.d.ts +0 -1
- package/core-kit/hooks/pool/multicall/use-pool-manager.dynamic.d.ts +75 -190
- package/core-kit/hooks/pool/multicall/use-pool-manager.static.d.ts +57 -0
- package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +877 -4
- package/core-kit/hooks/pool/multicall/use-pools.dynamic.d.ts +3331 -230
- package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +1 -0
- package/core-kit/hooks/pool/use-pool-fees.d.ts +0 -1
- package/core-kit/hooks/state/action.d.ts +1 -1
- package/core-kit/hooks/state/meta.d.ts +1 -1
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +48 -0
- package/core-kit/hooks/trading/use-swaps-data-query.d.ts +6 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +1 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-aave-swap-params.d.ts +6 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts +5 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-aave-swap-data.d.ts +5 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction-arguments.d.ts +6 -1
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +48 -0
- package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +48 -0
- package/core-kit/hooks/web3/use-static-call-query.d.ts +7 -6
- package/core-kit/types/contract.types.d.ts +28 -0
- package/core-kit/types/index.d.ts +1 -0
- package/core-kit/types/web3.types.d.ts +0 -12
- package/core-kit/utils/transaction.d.ts +14 -3
- package/core-kit/utils/web3.d.ts +0 -2
- package/index-3ff0a312.cjs +217 -0
- package/{index-1dfa86c7.js → index-97262ee5.js} +11110 -9866
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +229 -231
- package/package.json +1 -1
- package/{pyth-adapter-cb1b8641.cjs → pyth-adapter-3dec6847.cjs} +1 -1
- package/{pyth-adapter-76999c34.js → pyth-adapter-4822ae26.js} +1 -1
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-deposit-swap-quote-button/reload-deposit-swap-quote-button.hooks.d.ts +2 -1
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-withdraw-swap-quote-button/reload-withdraw-swap-quote-button.hooks.d.ts +2 -1
- package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -0
- package/index-2de42113.cjs +0 -217
- /package/core-kit/abi/{aave-lending-pool.d.ts → aave/aave-lending-pool.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -130,6 +130,7 @@ UI configuration provider. Manages params to configure custom styling, component
|
|
|
130
130
|
> | `standalone` | `boolean` | `true` | Handles token selection in SPA mode |
|
|
131
131
|
> | `isAllAssetsWithdrawOptionDefault` | `boolean` | `false` | Sets "All Assets" withdraw option by default |
|
|
132
132
|
> | `chainConfig` | `Partial<Record<ChainId, { name: string; iconPath: string }>>` | `{}` | Sets map of chain `name` and `iconPath` |
|
|
133
|
+
> | `aaveOffchainWithdrawChainIds` | `ChainId[]` | `[]` | Offchain swap data will be used for Aave withdrawals for selected chains |
|
|
133
134
|
|
|
134
135
|
##### actions
|
|
135
136
|
|
|
@@ -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";
|
package/core-kit/abi/index.d.ts
CHANGED
|
@@ -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';
|