@dhedge/trading-widget 3.2.0-alpha.0 → 3.2.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 (57) hide show
  1. package/README.md +1 -5
  2. package/core-kit/abi/easy-swapper-v2.d.ts +0 -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 +5 -878
  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 +0 -48
  19. package/core-kit/hooks/trading/use-swaps-data-query.d.ts +0 -6
  20. package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +1 -1
  21. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction-arguments.d.ts +1 -6
  22. package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +0 -48
  23. package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +0 -48
  24. package/core-kit/hooks/web3/use-static-call-query.d.ts +6 -7
  25. package/core-kit/types/index.d.ts +0 -1
  26. package/core-kit/types/state.types.d.ts +0 -8
  27. package/core-kit/types/web3.types.d.ts +12 -0
  28. package/core-kit/utils/transaction.d.ts +3 -14
  29. package/core-kit/utils/web3.d.ts +2 -0
  30. package/index-8d920656.cjs +217 -0
  31. package/{index-97262ee5.js → index-d62956b7.js} +10949 -12275
  32. package/index.cjs +1 -1
  33. package/index.d.ts +3 -3
  34. package/index.js +203 -204
  35. package/package.json +1 -1
  36. package/{pyth-adapter-3dec6847.cjs → pyth-adapter-c8d76d79.cjs} +1 -1
  37. package/{pyth-adapter-4822ae26.js → pyth-adapter-e278f630.js} +1 -1
  38. package/style.css +1 -1
  39. package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +0 -3
  40. package/trading-widget/components/widget/widget-buttons/approve-button/approve-button.hooks.d.ts +0 -1
  41. 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 -2
  42. 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 -2
  43. package/trading-widget/components/widget/widget-overlay/index.d.ts +0 -1
  44. package/trading-widget/components/withdraw/init-step/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +0 -3
  45. package/trading-widget/providers/config-provider/config-provider.types.d.ts +0 -1
  46. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +0 -1
  47. package/core-kit/abi/aave/aave-asset-guard.d.ts +0 -50
  48. package/core-kit/hooks/state/meta.d.ts +0 -6
  49. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-aave-swap-params.d.ts +0 -6
  50. package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts +0 -5
  51. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-aave-swap-data.d.ts +0 -5
  52. package/core-kit/types/contract.types.d.ts +0 -28
  53. package/index-3ff0a312.cjs +0 -217
  54. package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.d.ts +0 -2
  55. package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.hooks.d.ts +0 -3
  56. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/claim-summary.d.ts +0 -7
  57. /package/core-kit/abi/{aave/aave-lending-pool.d.ts → aave-lending-pool.d.ts} +0 -0
package/README.md CHANGED
@@ -59,7 +59,6 @@ Top level provider component. Headless part of trading logic. API handles params
59
59
  > | `onUpdateSendTokenInput` | (payload: Partial\<{ address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }\>) => void | undefined | triggers on send token change |
60
60
  > | `onUpdateTradingSettings` | (payload: Partial\<{ slippage: `number \| 'auto'`; minSlippage?: `number` isInfiniteAllowance: `boolean`; isMultiAssetWithdrawalEnabled: `boolean`; isMaxSlippageLoading: `boolean` }\>) => void | undefined | triggers on trading settings change |
61
61
  > | `onSetTradingType` | (payload: `'deposit' \| 'withdraw'`) => void | undefined | triggers on trading type change |
62
- > | `onUpdateTradingMeta` | (payload: Partial\<{ approvingStatus: `'pending' \| 'success'` }\>) => void | undefined | triggers on trading meta change |
63
62
  > | `onUpdateTradingModal` | (payload: Partial\<{ isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'` }\>) => void | undefined | triggers on trading modal change |
64
63
  > | `onUpdateTransactions` | (payload: AddTransaction \| UpdateTransaction \| RemoveTransaction) => void | undefined | triggers on transaction action change |
65
64
  > | `onTradingSettleError` | (error: `Error`) => void | undefined | triggers on trading settle error |
@@ -90,7 +89,6 @@ Top level provider component. Headless part of trading logic. API handles params
90
89
  > | `type` | 'deposit' \| 'withdraw' | `'deposit'` | Trading type |
91
90
  > | `input` | { sendToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }; receiveToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` } } | `poolConfigMap[poolAddress]` | Send/receive tokens pair |
92
91
  > | `entryFee` | { deposit: `number`; depositWithCustomCooldown: `number`; } | { deposit: `0`; depositWithCustomCooldown: `0.1` } | Entry fee config map |
93
- > | `meta` | { approvingStatus?: `'pending' \| 'success'` } | `{}` | Trading meta info |
94
92
  > | `modal` | { isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'`; action: `'deposit' \| 'withdraw' \| 'approve \| 'oraclesUpdate'`; link?: `string`; sendToken: TradingToken \| null; receiveToken: TradingToken \| null } | `{ isOpen: `false`,status: `'None'`, receiveToken: `null`, sendToken: `null` }` | Trading modal state |
95
93
  > | `transactions` | { action: `'deposit' \| 'withdraw' \| 'approve'`; symbol: `string`; chainId: `ChainId`; txHash?: `Address` }[] | `[]` | Pending transactions |
96
94
  > | `poolFallbackData` | { address: `Address`; managerLogicAddress?: `Address`; poolCompositions: `PoolComposition[]`; tokenPrice?: `string`; apy?: { value: `number`; currency: `'USD' \| 'ETH'` } } | { address: `AddressZero` } | Current active pool fallback data to override or extend contract's response |
@@ -130,7 +128,6 @@ UI configuration provider. Manages params to configure custom styling, component
130
128
  > | `standalone` | `boolean` | `true` | Handles token selection in SPA mode |
131
129
  > | `isAllAssetsWithdrawOptionDefault` | `boolean` | `false` | Sets "All Assets" withdraw option by default |
132
130
  > | `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 |
134
131
 
135
132
  ##### actions
136
133
 
@@ -451,7 +448,6 @@ path: `component.meta[name]`
451
448
  > | `tokenAllowance` | string | Token Allowance | |
452
449
  > | `entryFee` | string | Entry Fee | |
453
450
  > | `entryFeeExplanation` | string | When you deposit, the token takes a small entry fee. This fee helps cover the costs when we rebalance the underlying funds, and it's shared among all token holders. | |
454
- > | `amountToBeApproved` | string | Amount of {symbol} tokens to be approved. Can be customized in settings. | |
455
451
  > | `minDepositUsd` | string | Minimum deposit in USD. | |
456
452
  > | `minDeposit` | string | Minimum Deposit | |
457
453
  > | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
@@ -515,7 +511,7 @@ path: `component.meta[name]`
515
511
  > | `unrollAction` | string | Unroll | |
516
512
  > | `unrollAndClaimAction` | string | Claim | |
517
513
  > | `claimAction` | string | Claim Without Swap | |
518
- > | `claimLabel` | string | Claim | |
514
+ > | `claimLabel` | string | Claim Assets | |
519
515
  > | `swapAndClaimTo` | string | Swap and claim assets to | |
520
516
  > | `initWithdrawDescription` | string | Unroll | |
521
517
  > | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
@@ -434,54 +434,6 @@ 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";
485
437
  }, {
486
438
  readonly inputs: readonly [{
487
439
  readonly internalType: "address";
@@ -1,9 +1,8 @@
1
1
  export { erc20Abi } from './erc20';
2
- export { AaveLendingPoolAbi } from './aave/aave-lending-pool';
3
- export { AaveAssetGuardAbi } from './aave/aave-asset-guard';
2
+ export { AaveLendingPoolAbi } from './aave-lending-pool';
4
3
  export { DHedgeStakingV2Abi } from './dhedge-staking-v2';
5
4
  export { PoolFactoryAbi } from './pool-factory';
6
- export { PoolLogicAbi, ComplexWithdrawalAssetSrcDataAbiItem, ComplexWithdrawalDataAbiItem, } from './pool-logic';
5
+ export { PoolLogicAbi } from './pool-logic';
7
6
  export { PoolManagerLogicAbi } from './pool-manager-logic';
8
7
  export { RewardDistributionAbi } from './reward-distribution';
9
8
  export { ITrustedMulticallForwarderAbi, IERC7412Abi, SynthetixV3CoreAbi, SynthetixV3AssetGuard, SynthetixV3ContractGuard, } from './synthetix-v3';