@dhedge/trading-widget 5.0.0 → 5.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.
- package/README.md +35 -23
- package/core-kit/const/network.d.ts +127 -7
- package/core-kit/const/storage.d.ts +0 -3
- package/core-kit/const/trading.d.ts +2 -0
- package/core-kit/hooks/pool/use-available-manager-fee.d.ts +1 -1
- package/core-kit/hooks/pool/use-pool-dynamic-exit-remaining-cooldown.d.ts +1 -1
- package/core-kit/hooks/pool/use-user-vault-balance.d.ts +1 -1
- package/core-kit/hooks/state/action.d.ts +1 -1
- package/core-kit/hooks/state/index.d.ts +1 -0
- package/core-kit/hooks/state/stepper.d.ts +5 -0
- package/core-kit/hooks/trading/allowance/use-approve.d.ts +3 -1
- package/core-kit/hooks/trading/allowance/use-can-spend.d.ts +4 -1
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +1 -1
- package/core-kit/hooks/trading/index.d.ts +1 -0
- package/core-kit/hooks/trading/trade-handlers/use-handle-trade.d.ts +6 -1
- package/core-kit/hooks/trading/trade-handlers/use-trading-settle-handler.d.ts +7 -1
- package/core-kit/hooks/trading/use-easy-swapper-tracked-assets.d.ts +1 -1
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-auto-send-complete-withdraw-transaction.d.ts +6 -1
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-transaction.d.ts +3 -1
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-handle-complete-withdraw.d.ts +2 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-allowance.d.ts +7 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction.d.ts +6 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-is-unroll-and-claim-transaction.d.ts +5 -1
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +1 -1
- package/core-kit/types/config.types.d.ts +1 -0
- package/core-kit/types/state.types.d.ts +8 -3
- package/core-kit/types/trading-panel.types.d.ts +7 -0
- package/core-kit/utils/formatter.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +4122 -3752
- package/limit-orders/hooks/use-user-limit-order.d.ts +1 -1
- package/package.json +3 -3
- package/style.css +1 -1
- package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-buttons/add-to-wallet-button/add-to-wallet-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/add-to-wallet-button/add-to-wallet-button.hooks.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/index.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/notifications-settings-button/notifications-settings-button.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/withdraw-stepper-button/withdraw-stepper-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/withdraw-stepper-button/withdraw-stepper-button.hooks.d.ts +4 -0
- package/trading-widget/components/widget/widget-input/widget-input.hooks.d.ts +1 -1
- package/trading-widget/components/widget/widget-overlay/error-notification-overlay/complete-withdraw-error-overlay.d.ts +7 -0
- package/trading-widget/components/widget/widget-overlay/error-notification-overlay/error-notification-overlay.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/index.d.ts +1 -1
- package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/success-withdrawal-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/success-withdrawal-overlay.hooks.d.ts +9 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/approve-step.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/approve-step.hooks.d.ts +10 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/complete-withdraw-step.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/complete-withdraw-step.hooks.d.ts +10 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/init-withdraw-step.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/init-withdraw-step.hooks.d.ts +13 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/step-item.d.ts +9 -0
- package/trading-widget/components/widget/widget-overlay/{fmp-withdrawal-overlay/fmp-withdrawal-overlay.d.ts → withdraw-stepper-overlay/withdraw-stepper-overlay.d.ts} +1 -1
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/withdraw-stepper-overlay.hooks.d.ts +14 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/withdraw-steps.d.ts +11 -0
- package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.hooks.d.ts +1 -2
- package/trading-widget/hooks/index.d.ts +3 -0
- package/trading-widget/hooks/use-display-limit-sell-overlay.d.ts +1 -0
- package/trading-widget/hooks/use-step-description.d.ts +1 -0
- package/trading-widget/hooks/use-transaction-status-label.d.ts +5 -0
- package/trading-widget/providers/component-provider/component-provider.d.ts +1 -0
- package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +1 -0
- package/trading-widget/providers/component-provider/component-provider.types.d.ts +5 -0
- package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -0
- package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +6 -0
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +13 -7
- package/trading-widget/types/overlay.types.d.ts +1 -1
- package/trading-widget/types/theme.types.d.ts +1 -1
- package/trading-widget/components/widget/widget-overlay/fmp-withdrawal-overlay/fmp-withdrawal-overlay.hooks.d.ts +0 -10
- package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.d.ts +0 -2
- package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.hooks.d.ts +0 -6
- package/trading-widget/components/withdraw/complete-step/complete-step.hooks.d.ts +0 -3
- package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.d.ts +0 -2
- package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.hooks.d.ts +0 -6
- package/trading-widget/components/withdraw/stepper/withdraw-stepper.d.ts +0 -2
- package/trading-widget/components/withdraw/stepper/withdraw-stepper.hooks.d.ts +0 -8
package/index.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ export { normalizeNumber } from '@shared/utils/number.util';
|
|
|
9
9
|
export { getErrorMessage, isErrorWithMessage, toErrorWithMessage, } from '@shared/utils/error.util';
|
|
10
10
|
export { isZeroAddress, isEqualAddress } from '@shared/utils/web3.utils';
|
|
11
11
|
export type { TradingToken } from '@shared/types/trading.types';
|
|
12
|
-
export { USDC_BASE, USDCBC_BASE, WETH_BASE, CBETH_BASE, CBBTC_BASE, RETH_BASE, TBTC_BASE, WSTETH_BASE, BRIDGED_USDC_ARBITRUM, USDC_ARBITRUM, WETH_ARBITRUM, WBTC_ARBITRUM, TBTC_ARBITRUM, WSTETH_ARBITRUM, USDT_ARBITRUM, WSOL_ARBITRUM, WBNB_ARBITRUM, LINK_ARBITRUM, BRIDGED_USDC_OPTIMISM, USDC_OPTIMISM, USDT_OPTIMISM, WETH_OPTIMISM, SUSD_OPTIMISM, DAI_OPTIMISM, WBTC_OPTIMISM, SETH_OPTIMISM, LINK_OPTIMISM, TBTC_OPTIMISM, WSTETH_OPTIMISM, WETH_POLYGON, BRIDGED_USDC_POLYGON, USDC_POLYGON, PAXG_POLYGON, WBTC_POLYGON, WPOL_POLYGON, USDT_POLYGON, DAI_POLYGON, TBTC_POLYGON, WETH_MAINNET, USDC_MAINNET, WBTC_MAINNET, USDT_MAINNET, } from '@shared/constants/tokens';
|
|
12
|
+
export { USDC_BASE, USDCBC_BASE, WETH_BASE, CBETH_BASE, CBBTC_BASE, RETH_BASE, TBTC_BASE, WSTETH_BASE, BRIDGED_USDC_ARBITRUM, USDC_ARBITRUM, WETH_ARBITRUM, WBTC_ARBITRUM, TBTC_ARBITRUM, WSTETH_ARBITRUM, USDT_ARBITRUM, WSOL_ARBITRUM, WBNB_ARBITRUM, LINK_ARBITRUM, BRIDGED_USDC_OPTIMISM, USDC_OPTIMISM, USDT_OPTIMISM, WETH_OPTIMISM, SUSD_OPTIMISM, DAI_OPTIMISM, WBTC_OPTIMISM, SETH_OPTIMISM, LINK_OPTIMISM, TBTC_OPTIMISM, WSTETH_OPTIMISM, WETH_POLYGON, BRIDGED_USDC_POLYGON, USDC_POLYGON, PAXG_POLYGON, WBTC_POLYGON, WPOL_POLYGON, USDT_POLYGON, DAI_POLYGON, TBTC_POLYGON, WETH_MAINNET, USDC_MAINNET, WBTC_MAINNET, USDT_MAINNET, XAUT_MAINNET, } from '@shared/constants/tokens';
|
|
13
13
|
export type { GmxMarketAsset } from './core-kit/const';
|
|
14
|
-
export { arbitrum, base, optimism, polygon, MULTI_ASSET_TOKEN, MANAGER_FEE_DENOMINATOR, SIMULATION_TIMEOUT_ERROR, MAX_GAS_LIMIT_MAP, GAS_LIMIT_BUFFER_COEFF, GAS_ESTIMATION_ERROR, DEFAULT_SIMULATION_ERROR, DEFAULT_ERROR_MESSAGE, EMPTY_POOL_CONFIG, DEFAULT_DEPOSIT_SLIPPAGE, DEFAULT_WITHDRAW_SLIPPAGE, DEFAULT_MULTI_ASSET_WITHDRAW_METHOD, DEFAULT_DEPOSIT_SLIPPAGE_SCALE, DEFAULT_DEPOSIT_METHOD, DEFAULT_PROMISE_TIMEOUT_MS, DEFAULT_LOCK_TIME, CURRENCY_SYMBOL_MAP, contractsAddressesMap, contractsAbisMap, BRIDGED_TOKENS_SYMBOLS, CHAIN_NATIVE_TOKENS, ALCHEMY_RPC_URL_MAP, CHAIN_MAP, MaxUint256, DEFAULT_PRECISION, AddressZero, DEFAULT_POLLING_INTERVAL, SHORTEN_POLLING_INTERVAL, NATIVE_TOKEN_DEPOSIT_GAS_LIMIT, PYTH_API_LINK, WETH_BY_CHAIN_ID, WBTC_BY_CHAIN_ID, TRADING_LOG_EVENT_PARAM, TRADING_PANEL_LOG_EVENT, GMX_MARKET_ASSETS, GMX_MARKET_ASSETS_MAP, } from './core-kit/const';
|
|
14
|
+
export { arbitrum, base, optimism, polygon, MULTI_ASSET_TOKEN, MANAGER_FEE_DENOMINATOR, SIMULATION_TIMEOUT_ERROR, MAX_GAS_LIMIT_MAP, GAS_LIMIT_BUFFER_COEFF, GAS_ESTIMATION_ERROR, DEFAULT_SIMULATION_ERROR, DEFAULT_ERROR_MESSAGE, EMPTY_POOL_CONFIG, DEFAULT_DEPOSIT_SLIPPAGE, DEFAULT_WITHDRAW_SLIPPAGE, DEFAULT_MULTI_ASSET_WITHDRAW_METHOD, DEFAULT_DEPOSIT_SLIPPAGE_SCALE, DEFAULT_DEPOSIT_METHOD, DEFAULT_PROMISE_TIMEOUT_MS, DEFAULT_LOCK_TIME, CURRENCY_SYMBOL_MAP, contractsAddressesMap, contractsAbisMap, BRIDGED_TOKENS_SYMBOLS, CHAIN_NATIVE_TOKENS, ALCHEMY_RPC_URL_MAP, CHAIN_MAP, MaxUint256, DEFAULT_PRECISION, AddressZero, DEFAULT_POLLING_INTERVAL, SHORTEN_POLLING_INTERVAL, NATIVE_TOKEN_DEPOSIT_GAS_LIMIT, PYTH_API_LINK, WETH_BY_CHAIN_ID, WBTC_BY_CHAIN_ID, TRADING_LOG_EVENT_PARAM, TRADING_PANEL_LOG_EVENT, GMX_MARKET_ASSETS, GMX_MARKET_ASSETS_MAP, COMPLETE_WITHDRAW_ACTIONS, } from './core-kit/const';
|
|
15
15
|
export { EstimationError } from './core-kit/models';
|
|
16
16
|
export type { ChainId, ChainNativeTokenMap, NativeTokenSymbol, Chain, Address, PoolComposition, Hex, TransactionRequest, CallbackConfig, PoolConfig, PricingAsset, PoolCompositionWithFraction, PoolFallbackData, PoolContractAccountCallParams, PoolContractCallParams, EstimateCall, ContractActionFunc, EstimatedGas, CallExecutionError, DynamicTradingToken, Client, PublicClient, WalletClient, DepositMethodName, PendingTransaction, SimulateTransactionParams, SimulateTransactionResponse, SwapEntity, TradingPanelAction, TradingPanelActionsState, TradingPanelState, TradingPanelStateModal, TradingPanelSetters, TradingPanelType, TradingPanelContextConfig, TransactionAction, TradingModalStatus, TagInvestorByReferrerCallbackVariables, TokenSelectorPayload, UpdateTransactionsArguments, UseProjectedEarningsResult, UseReferralProgramProps, MulticallReturnType, ContractFunctionReturnType, UseReadContractsParameters, UseWriteContractParameters, WaitForTransactionReceiptReturnType, } from './core-kit/types';
|
|
17
17
|
export { formatNumeratorToPercentage, formatByCurrency, getContractAbiById, clientSide, getContractAddressById, formatEther, formatUnits, getConventionalTokenPriceDecimals, getNativeTokenInvestableBalance, isNativeToken, getPercent, getPoolFraction, shortenAddress, shiftBy, trim, validateLoggerEventParams, decodeErrorResult, hexToString, encodeFunctionData, transformAddressForAnalytics, isFmpAirdropVaultAddress, isAaveLendAndBorrowAsset, } from './core-kit/utils';
|