@dhedge/trading-widget 3.5.8-canary.2 → 3.6.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/core-kit/abi/aave/aave-asset-guard.d.ts +50 -0
- package/core-kit/abi/aave/aave-lending-pool.d.ts +846 -0
- package/core-kit/abi/dhedge-staking-v2.d.ts +127 -0
- package/core-kit/abi/easy-swapper-v2.d.ts +1042 -0
- package/core-kit/abi/erc20.d.ts +1 -0
- package/core-kit/abi/flatcoin-points-module.d.ts +57 -0
- package/core-kit/abi/index.d.ts +12 -0
- package/core-kit/abi/limit-order.d.ts +736 -0
- package/core-kit/abi/pool-factory.d.ts +57 -0
- package/core-kit/abi/pool-logic.d.ts +307 -0
- package/core-kit/abi/pool-manager-logic.d.ts +107 -0
- package/core-kit/abi/reward-distribution.d.ts +121 -0
- package/core-kit/abi/synthetix-v3/i-trusted-multicall-forwarder.d.ts +41 -0
- package/core-kit/abi/synthetix-v3/ierc-7412.d.ts +53 -0
- package/core-kit/abi/synthetix-v3/index.d.ts +5 -0
- package/core-kit/abi/synthetix-v3/synthetix-v3-asset-guard.d.ts +37 -0
- package/core-kit/abi/synthetix-v3/synthetix-v3-contract-guard.d.ts +45 -0
- package/core-kit/abi/synthetix-v3/synthetix-v3-core.d.ts +41 -0
- package/core-kit/const/config.d.ts +13 -0
- package/core-kit/const/contracts/arbitrum.d.ts +4 -0
- package/core-kit/const/contracts/base.d.ts +8 -0
- package/core-kit/const/contracts/index.d.ts +5 -0
- package/core-kit/const/contracts/optimism.d.ts +5 -0
- package/core-kit/const/contracts/polygon.d.ts +4 -0
- package/core-kit/const/currency.d.ts +2 -0
- package/core-kit/const/default-data.d.ts +28 -0
- package/core-kit/const/error.d.ts +14 -0
- package/core-kit/const/flat-money.d.ts +10 -0
- package/core-kit/const/index.d.ts +13 -0
- package/core-kit/const/links.d.ts +3 -0
- package/core-kit/const/logger.d.ts +40 -0
- package/core-kit/const/network.d.ts +682 -0
- package/core-kit/const/synthetix.d.ts +6 -0
- package/core-kit/const/tokens/arbitrum.d.ts +8 -0
- package/core-kit/const/tokens/base.d.ts +9 -0
- package/core-kit/const/tokens/index.d.ts +9 -0
- package/core-kit/const/tokens/optimism.d.ts +12 -0
- package/core-kit/const/tokens/polygon.d.ts +10 -0
- package/core-kit/const/trading.d.ts +10 -0
- package/core-kit/const/web3.d.ts +4 -0
- package/core-kit/hooks/component/index.d.ts +2 -0
- package/core-kit/hooks/component/panel.d.ts +1 -0
- package/core-kit/hooks/component/tab.d.ts +2 -0
- package/core-kit/hooks/pool/index.d.ts +16 -0
- package/core-kit/hooks/pool/multicall/index.d.ts +4 -0
- package/core-kit/hooks/pool/multicall/use-pool-manager.dynamic.d.ts +230 -0
- package/core-kit/hooks/pool/multicall/use-pool-manager.static.d.ts +340 -0
- package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +2434 -0
- package/core-kit/hooks/pool/multicall/use-pools.dynamic.d.ts +1096 -0
- package/core-kit/hooks/pool/synthetixV3/use-pool-token-price-mutable.d.ts +8 -0
- package/core-kit/hooks/pool/synthetixV3/use-synthetix-v3-asset-balance.d.ts +8 -0
- package/core-kit/hooks/pool/synthetixV3/use-total-funds-value-mutable.d.ts +8 -0
- package/core-kit/hooks/pool/use-check-whitelist.d.ts +2 -0
- package/core-kit/hooks/pool/use-contract-pool-composition.d.ts +3 -0
- package/core-kit/hooks/pool/use-has-nested-vault-in-composition.d.ts +64 -0
- package/core-kit/hooks/pool/use-invalidate-pool-contract-data.d.ts +1 -0
- package/core-kit/hooks/pool/use-manager-logic-address.d.ts +2 -0
- package/core-kit/hooks/pool/use-pool-composition-with-fraction.d.ts +14 -0
- package/core-kit/hooks/pool/use-pool-composition.d.ts +3 -0
- package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +20 -0
- package/core-kit/hooks/pool/use-pool-dynamic-exit-remaining-cooldown.d.ts +276 -0
- package/core-kit/hooks/pool/use-pool-fees.d.ts +14 -0
- package/core-kit/hooks/pool/use-pool-manager-logic-data.d.ts +16 -0
- package/core-kit/hooks/pool/use-pool-token-price.d.ts +9 -0
- package/core-kit/hooks/pool/use-vault-vested-points.d.ts +73 -0
- package/core-kit/hooks/referral/index.d.ts +1 -0
- package/core-kit/hooks/referral/use-referral-program.d.ts +2 -0
- package/core-kit/hooks/state/action.d.ts +25 -0
- package/core-kit/hooks/state/context.d.ts +2 -0
- package/core-kit/hooks/state/default-data.d.ts +1 -0
- package/core-kit/hooks/state/index.d.ts +9 -0
- package/core-kit/hooks/state/input.d.ts +13 -0
- package/core-kit/hooks/state/modal.d.ts +5 -0
- package/core-kit/hooks/state/pool.d.ts +14 -0
- package/core-kit/hooks/state/settings.d.ts +5 -0
- package/core-kit/hooks/state/transaction.d.ts +5 -0
- package/core-kit/hooks/state/type.d.ts +6 -0
- package/core-kit/hooks/trading/allowance/index.d.ts +3 -0
- package/core-kit/hooks/trading/allowance/use-approve.d.ts +9 -0
- package/core-kit/hooks/trading/allowance/use-can-spend.d.ts +11 -0
- package/core-kit/hooks/trading/allowance/use-token-allowance-handler.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/index.d.ts +16 -0
- package/core-kit/hooks/trading/deposit-v2/use-applied-deposit-slippage.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-deposit-allowance.d.ts +4 -0
- package/core-kit/hooks/trading/deposit-v2/use-deposit-lock-time.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-deposit-price-diff.d.ts +5 -0
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +1043 -0
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-deposit-slippage.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-deposit.d.ts +2 -0
- package/core-kit/hooks/trading/deposit-v2/use-handle-pool-deposit-data.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-is-custom-cooldown-deposit.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-is-deposit-with-swap-transaction.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-is-vault-deposit-locked.d.ts +4 -0
- package/core-kit/hooks/trading/deposit-v2/use-min-vault-tokens-received-amount.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-swap-data-based-on-send-token.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-params.d.ts +2 -0
- package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-token-amount.d.ts +1 -0
- package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-tokens.d.ts +2 -0
- package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-transaction-arguments.d.ts +2 -0
- package/core-kit/hooks/trading/index.d.ts +14 -0
- package/core-kit/hooks/trading/projected-earnings/use-deposit-projected-earnings.d.ts +2 -0
- package/core-kit/hooks/trading/projected-earnings/use-projected-earnings-core.d.ts +10 -0
- package/core-kit/hooks/trading/synthetix-v3/use-available-withdraw-liquidity.d.ts +47 -0
- package/core-kit/hooks/trading/synthetix-v3/use-oracles-update-transaction-data.d.ts +23 -0
- package/core-kit/hooks/trading/synthetix-v3/use-send-oracles-update-transaction.d.ts +4 -0
- package/core-kit/hooks/trading/synthetix-v3/use-synthetix-v3-oracles-update.d.ts +7 -0
- package/core-kit/hooks/trading/synthetix-v3/use-withdraw-liquidity.d.ts +5 -0
- package/core-kit/hooks/trading/use-asset-price.d.ts +8 -0
- package/core-kit/hooks/trading/use-easy-swapper-tracked-assets.d.ts +1046 -0
- package/core-kit/hooks/trading/use-exchange-rate.d.ts +5 -0
- package/core-kit/hooks/trading/use-handle-trade.d.ts +6 -0
- package/core-kit/hooks/trading/use-is-trading-enabled.d.ts +1 -0
- package/core-kit/hooks/trading/use-is-transaction-loading.d.ts +2 -0
- package/core-kit/hooks/trading/use-raw-asset-price.d.ts +8 -0
- package/core-kit/hooks/trading/use-send-token-debounced-value.d.ts +8 -0
- package/core-kit/hooks/trading/use-swap-data-query.d.ts +6 -0
- package/core-kit/hooks/trading/use-swaps-data-query.d.ts +13 -0
- package/core-kit/hooks/trading/use-trading-result-handling.d.ts +1 -0
- package/core-kit/hooks/trading/use-trading-settle-handler.d.ts +3 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/index.d.ts +10 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-expected-amount.d.ts +4 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-quote.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-receive-diff.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-swap-data.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-total-usd-value.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-tracked-assets.d.ts +210 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-transaction.d.ts +6 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-handle-complete-withdraw.d.ts +11 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-has-swappable-assets.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-is-complete-withdraw-step.d.ts +4 -0
- package/core-kit/hooks/trading/withdraw-v2/index.d.ts +4 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/index.d.ts +6 -0
- 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-aave-swap-data.d.ts +5 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-fetch-init-withdraw-complex-asset-data.d.ts +6 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-get-init-withdraw-transaction-arguments.d.ts +10 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-allowance.d.ts +4 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-estimated-receive-assets.d.ts +210 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-quote.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction.d.ts +6 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-is-multi-asset-withdraw.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-is-offchain-aave-withdraw-supported.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-is-unroll-and-claim-transaction.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/use-applied-withdraw-slippage.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/use-min-withdraw-slippage.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdraw-assets-info.d.ts +219 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdraw-type-handler.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +1042 -0
- package/core-kit/hooks/user/index.d.ts +4 -0
- package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +1113 -0
- package/core-kit/hooks/user/use-flatmoney-points-user-balances.d.ts +10 -0
- package/core-kit/hooks/user/use-is-dhedge-vault-connected.d.ts +1 -0
- package/core-kit/hooks/user/use-is-insufficient-balance.d.ts +1 -0
- package/core-kit/hooks/user/use-user-token-balance.d.ts +8 -0
- package/core-kit/hooks/utils/index.d.ts +2 -0
- package/core-kit/hooks/utils/use-browser-storage.d.ts +1 -0
- package/core-kit/hooks/utils/use-debounce.d.ts +1 -0
- package/core-kit/hooks/web3/index.d.ts +13 -0
- package/core-kit/hooks/web3/use-account.d.ts +7 -0
- package/core-kit/hooks/web3/use-balance.d.ts +2 -0
- package/core-kit/hooks/web3/use-contract-function.d.ts +17 -0
- package/core-kit/hooks/web3/use-contract-read-error-logging.d.ts +6 -0
- package/core-kit/hooks/web3/use-contract-reads-error-logging.d.ts +5 -0
- package/core-kit/hooks/web3/use-gas-price.d.ts +2 -0
- package/core-kit/hooks/web3/use-invalidate-on-block.d.ts +6 -0
- package/core-kit/hooks/web3/use-invalidate-trading-queries.d.ts +4 -0
- package/core-kit/hooks/web3/use-is-wallet-connected.d.ts +1 -0
- package/core-kit/hooks/web3/use-network.d.ts +13 -0
- package/core-kit/hooks/web3/use-static-call-query.d.ts +13 -0
- package/core-kit/hooks/web3/use-token-allowance.d.ts +9 -0
- package/core-kit/index.d.ts +1 -0
- package/core-kit/models/estimation-error.d.ts +20 -0
- package/core-kit/models/index.d.ts +1 -0
- package/core-kit/providers/index.d.ts +6 -0
- package/core-kit/types/config.types.d.ts +33 -0
- package/core-kit/types/contract.types.d.ts +28 -0
- package/core-kit/types/index.d.ts +10 -0
- package/core-kit/types/pool.types.d.ts +17 -0
- package/core-kit/types/react-query.types.d.ts +11 -0
- package/core-kit/types/referral.types.d.ts +12 -0
- package/core-kit/types/state.types.d.ts +109 -0
- package/core-kit/types/synthetix-v3.types.d.ts +15 -0
- package/core-kit/types/trading-panel.types.d.ts +43 -0
- package/core-kit/types/trading.types.d.ts +32 -0
- package/core-kit/types/web3.types.d.ts +34 -0
- package/core-kit/utils/common.d.ts +4 -0
- package/core-kit/utils/error.d.ts +17 -0
- package/core-kit/utils/flat-money.d.ts +9 -0
- package/core-kit/utils/formatter.d.ts +17 -0
- package/core-kit/utils/index.d.ts +12 -0
- package/core-kit/utils/logger.d.ts +17 -0
- package/core-kit/utils/number.d.ts +8 -0
- package/core-kit/utils/synthetix-v3/eip-7412.d.ts +21 -0
- package/core-kit/utils/synthetix-v3/parse-error.d.ts +3 -0
- package/core-kit/utils/synthetix-v3/pyth-adapter.d.ts +13 -0
- package/core-kit/utils/synthetix.d.ts +2 -0
- package/core-kit/utils/token.d.ts +8 -0
- package/core-kit/utils/transaction.d.ts +39 -0
- package/core-kit/utils/ua.d.ts +1 -0
- package/core-kit/utils/url.d.ts +3 -0
- package/core-kit/utils/web3.d.ts +9 -0
- package/index-22789f33.cjs +217 -0
- package/index-5567d59f.js +42941 -0
- package/index.cjs +1 -0
- package/index.d.ts +18 -0
- package/index.js +242 -0
- package/limit-orders/component/common/action-button.d.ts +10 -0
- package/limit-orders/component/common/modal-content.d.ts +8 -0
- package/limit-orders/component/common/modal-dialog.d.ts +9 -0
- package/limit-orders/component/common/price-input.d.ts +20 -0
- package/limit-orders/component/input-group/input-group.d.ts +2 -0
- package/limit-orders/component/input-group/input-group.hooks.d.ts +15 -0
- package/limit-orders/component/limit-order-button/limit-order-approve-button.d.ts +2 -0
- package/limit-orders/component/limit-order-button/limit-order-approve-button.hooks.d.ts +5 -0
- package/limit-orders/component/limit-order-button/limit-order-button.d.ts +2 -0
- package/limit-orders/component/limit-order-button/limit-order-button.hooks.d.ts +9 -0
- package/limit-orders/component/limit-order-button/network-check-button.d.ts +2 -0
- package/limit-orders/component/limit-order-button/network-check-button.hooks.d.ts +4 -0
- package/limit-orders/component/limit-order-modal.d.ts +13 -0
- package/limit-orders/component/limit-order-modal.hooks.d.ts +6 -0
- package/limit-orders/constants.d.ts +1 -0
- package/limit-orders/hooks/state.d.ts +2 -0
- package/limit-orders/hooks/use-invalidate-limit-order-query.d.ts +1 -0
- package/limit-orders/hooks/use-is-limit-order-approved.d.ts +1 -0
- package/limit-orders/hooks/use-limit-order-approve-transaction.d.ts +4 -0
- package/limit-orders/hooks/use-listen-limit-order-execution.d.ts +1 -0
- package/limit-orders/hooks/use-on-limit-order-settled.d.ts +2 -0
- package/limit-orders/hooks/use-user-limit-order.d.ts +753 -0
- package/limit-orders/index.d.ts +2 -0
- package/limit-orders/providers/state-provider/reducer.d.ts +7 -0
- package/limit-orders/providers/state-provider/state-provider.d.ts +6 -0
- package/limit-orders/providers/state-provider/state-provider.types.d.ts +51 -0
- package/limit-orders/providers/theme-provider/index.d.ts +2 -0
- package/limit-orders/providers/theme-provider/theme-provider.d.ts +3 -0
- package/limit-orders/providers/theme-provider/theme-provider.types.d.ts +132 -0
- package/limit-orders/providers/translation-provider/index.d.ts +3 -0
- package/limit-orders/providers/translation-provider/translation-provider.d.ts +4 -0
- package/limit-orders/providers/translation-provider/translation-provider.defaults.d.ts +2 -0
- package/limit-orders/providers/translation-provider/translation-provider.hooks.d.ts +1 -0
- package/limit-orders/providers/translation-provider/translation-provider.types.d.ts +15 -0
- package/limit-orders/utils.d.ts +25 -0
- package/package.json +4 -20
- package/pyth-adapter-7336cdaa.js +5705 -0
- package/pyth-adapter-cc16310a.cjs +11 -0
- package/style.css +1 -0
- package/theme/colors.d.ts +49 -0
- package/trading-widget/components/common/alert/alert.d.ts +6 -0
- package/trading-widget/components/common/badge/token-badge/token-badge.d.ts +13 -0
- package/trading-widget/components/common/balance/balance.d.ts +7 -0
- package/trading-widget/components/common/balance/withdraw-assets-composition-table.d.ts +7 -0
- package/trading-widget/components/common/button/action-button/action-button.d.ts +10 -0
- package/trading-widget/components/common/button/disabled-button-with-prompt/disabled-button-with-prompt.d.ts +6 -0
- package/trading-widget/components/common/button/external-link-button/external-link-button.d.ts +9 -0
- package/trading-widget/components/common/button/icon-button/icon-button.d.ts +10 -0
- package/trading-widget/components/common/button/max-balance-button/max-balance-button.d.ts +6 -0
- package/trading-widget/components/common/button/reload-button/reload-button.d.ts +3 -0
- package/trading-widget/components/common/button/reload-button/reload-button.hooks.d.ts +10 -0
- package/trading-widget/components/common/icon/token-icon/token-icon.d.ts +14 -0
- package/trading-widget/components/common/index.d.ts +21 -0
- package/trading-widget/components/common/layout/balance/balance.d.ts +2 -0
- package/trading-widget/components/common/layout/index.d.ts +18 -0
- package/trading-widget/components/common/layout/input-group/input-group.d.ts +2 -0
- package/trading-widget/components/common/layout/meta/meta.d.ts +2 -0
- package/trading-widget/components/common/layout/notification/notification.d.ts +6 -0
- package/trading-widget/components/common/layout/overlay/overlay.d.ts +9 -0
- package/trading-widget/components/common/layout/panel/panel.d.ts +2 -0
- package/trading-widget/components/common/layout/settings/settings-popover/settings-popover.d.ts +8 -0
- package/trading-widget/components/common/layout/settings/settings.d.ts +2 -0
- package/trading-widget/components/common/meta/assets-composition-disclosure/assets-composition-disclosure.d.ts +3 -0
- package/trading-widget/components/common/meta/transaction-disclosure/transaction-disclosure-item/transaction-disclosure-item.d.ts +12 -0
- package/trading-widget/components/common/meta/transaction-disclosure/transaction-disclosure.d.ts +11 -0
- package/trading-widget/components/common/overlay/pending-overlay/pending-overlay.d.ts +7 -0
- package/trading-widget/components/common/settings/settings-option/settings-option.d.ts +7 -0
- package/trading-widget/components/common/skeleton/skeleton.d.ts +8 -0
- package/trading-widget/components/common/spinner/spinner.d.ts +6 -0
- package/trading-widget/components/common/switch/switch.d.ts +10 -0
- package/trading-widget/components/common/tab/tab-button/tab-button.d.ts +7 -0
- package/trading-widget/components/common/tooltip/info-tooltip/info-tooltip.d.ts +6 -0
- package/trading-widget/components/common/tooltip/tooltip-icon/tooltip-icon.d.ts +7 -0
- package/trading-widget/components/common/tooltip/tooltip-wrapper/tooltip-wrapper.d.ts +7 -0
- package/trading-widget/components/default-examples/image/image.d.ts +3 -0
- package/trading-widget/components/deposit/balance/balance.d.ts +2 -0
- package/trading-widget/components/deposit/balance/balance.hooks.d.ts +4 -0
- package/trading-widget/components/deposit/button/trade-button/trade-button.d.ts +2 -0
- package/trading-widget/components/deposit/button/trade-button/trade-button.hooks.d.ts +6 -0
- package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.d.ts +2 -0
- package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +18 -0
- package/trading-widget/components/deposit/index.d.ts +2 -0
- package/trading-widget/components/deposit/input-group/input-group.d.ts +1 -0
- package/trading-widget/components/deposit/input-group/input-group.hooks.d.ts +25 -0
- package/trading-widget/components/deposit/meta/meta.d.ts +2 -0
- package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.d.ts +1 -0
- package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +13 -0
- package/trading-widget/components/deposit/settings/deposit-settings/deposit-settings.d.ts +2 -0
- package/trading-widget/components/deposit/tab-panel/tab-panel.d.ts +3 -0
- package/trading-widget/components/deposit/tab-panel/tab-panel.hooks.d.ts +1 -0
- package/trading-widget/components/index.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/approve-button/approve-button.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/approve-button/approve-button.hooks.d.ts +8 -0
- package/trading-widget/components/widget/widget-buttons/connect-wallet-button/connect-wallet-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/index.d.ts +4 -0
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-deposit-swap-quote-button/reload-deposit-swap-quote-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-deposit-swap-quote-button/reload-deposit-swap-quote-button.hooks.d.ts +6 -0
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-swap-quote-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-withdraw-swap-quote-button/reload-withdraw-swap-quote-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-withdraw-swap-quote-button/reload-withdraw-swap-quote-button.hooks.d.ts +6 -0
- package/trading-widget/components/widget/widget-buttons/switch-network-button/switch-network-button.d.ts +1 -0
- package/trading-widget/components/widget/widget-buttons/valid-network-button/valid-network-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/valid-network-button/valid-network-button.hooks.d.ts +4 -0
- package/trading-widget/components/widget/widget-input/all-assets-composition-table/all-assets-composition-table.d.ts +2 -0
- package/trading-widget/components/widget/widget-input/all-assets-composition-table/all-assets-composition-table.hooks.d.ts +15 -0
- package/trading-widget/components/widget/widget-input/all-assets-composition-table/withdraw-explanation-tip.d.ts +4 -0
- package/trading-widget/components/widget/widget-input/index.d.ts +1 -0
- package/trading-widget/components/widget/widget-input/token-selector/token-selector.d.ts +3 -0
- package/trading-widget/components/widget/widget-input/token-selector/token-selector.hooks.d.ts +9 -0
- package/trading-widget/components/widget/widget-input/widget-input.d.ts +3 -0
- package/trading-widget/components/widget/widget-input/widget-input.hooks.d.ts +27 -0
- package/trading-widget/components/widget/widget-input/widget-input.utils.d.ts +3 -0
- package/trading-widget/components/widget/widget-meta/exchange-rate/exchange-rate.d.ts +6 -0
- package/trading-widget/components/widget/widget-meta/index.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/fmp-withdrawal-overlay/fmp-withdrawal-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/fmp-withdrawal-overlay/fmp-withdrawal-overlay.hooks.d.ts +10 -0
- package/trading-widget/components/widget/widget-overlay/high-slippage-overlay/high-slippage-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/index.d.ts +8 -0
- package/trading-widget/components/widget/widget-overlay/notification-overlay/notification-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/notification-overlay/notification-overlay.hooks.d.ts +8 -0
- package/trading-widget/components/widget/widget-overlay/overlay-switch/overlay-switch.d.ts +2 -0
- package/trading-widget/components/widget/widget-overlay/pool-select-overlay/network-header/network-header.d.ts +7 -0
- package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +31 -0
- package/trading-widget/components/widget/widget-overlay/terms-of-use-overlay/terms-of-use-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/token-select-overlay/multi-token-select-item/multi-token-select-item.d.ts +2 -0
- package/trading-widget/components/widget/widget-overlay/token-select-overlay/multi-token-select-item/multi-token-select-item.hooks.d.ts +8 -0
- package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-item/token-select-item.d.ts +2 -0
- package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-item/token-select-item.hooks.d.ts +11 -0
- package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-overlay.hooks.d.ts +12 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +10 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/approve-summary.d.ts +7 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/oracles-update-summary.d.ts +2 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/swap-summary.d.ts +7 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/trading-summary.d.ts +2 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/vault-transaction-summary.d.ts +3 -0
- package/trading-widget/components/widget/widget-settings/index.d.ts +2 -0
- package/trading-widget/components/widget/widget-settings/slippage-selector/slippage-selector.d.ts +2 -0
- package/trading-widget/components/widget/widget-settings/slippage-selector/slippage-selector.hooks.d.ts +15 -0
- package/trading-widget/components/widget/widget-settings/token-allowance-switch/token-allowance-switch.d.ts +1 -0
- package/trading-widget/components/widget/widget-settings/widget-settings.d.ts +7 -0
- package/trading-widget/components/widget/widget-tabs/widget-tabs.d.ts +2 -0
- package/trading-widget/components/widget/widget.d.ts +2 -0
- package/trading-widget/components/widget/widget.hooks.d.ts +5 -0
- package/trading-widget/components/withdraw/complete-step/balance/complete-withdraw-balance.d.ts +2 -0
- package/trading-widget/components/withdraw/complete-step/balance/complete-withdraw-balance.hooks.d.ts +12 -0
- package/trading-widget/components/withdraw/complete-step/button/claim-button/claim-button.d.ts +3 -0
- package/trading-widget/components/withdraw/complete-step/button/claim-button/claim-button.hooks.d.ts +7 -0
- package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.d.ts +2 -0
- package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.hooks.d.ts +6 -0
- package/trading-widget/components/withdraw/complete-step/button/valid-swap-button/valid-swap-button.d.ts +2 -0
- package/trading-widget/components/withdraw/complete-step/button/valid-swap-button/valid-swap-button.hooks.d.ts +5 -0
- package/trading-widget/components/withdraw/complete-step/complete-step.d.ts +2 -0
- package/trading-widget/components/withdraw/complete-step/complete-step.hooks.d.ts +3 -0
- package/trading-widget/components/withdraw/complete-step/input-group/complete-withdraw-input-group.d.ts +2 -0
- package/trading-widget/components/withdraw/complete-step/input-group/complete-withdraw-input-group.hooks.d.ts +12 -0
- package/trading-widget/components/withdraw/complete-step/meta/meta.d.ts +2 -0
- package/trading-widget/components/withdraw/complete-step/meta/transaction-disclosure/transaction-disclosure.d.ts +1 -0
- package/trading-widget/components/withdraw/complete-step/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +6 -0
- package/trading-widget/components/withdraw/index.d.ts +2 -0
- package/trading-widget/components/withdraw/init-step/balance/init-withdraw-balance.d.ts +2 -0
- package/trading-widget/components/withdraw/init-step/balance/init-withdraw-balance.hooks.d.ts +4 -0
- package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.d.ts +2 -0
- package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.hooks.d.ts +6 -0
- package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.d.ts +2 -0
- package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.hooks.d.ts +21 -0
- package/trading-widget/components/withdraw/init-step/init-step.d.ts +1 -0
- package/trading-widget/components/withdraw/init-step/input-group/init-withdraw-input-group.d.ts +1 -0
- package/trading-widget/components/withdraw/init-step/input-group/init-withdraw-input-group.hooks.d.ts +22 -0
- package/trading-widget/components/withdraw/init-step/meta/meta.d.ts +2 -0
- package/trading-widget/components/withdraw/init-step/meta/transaction-disclosure/transaction-disclosure.d.ts +1 -0
- package/trading-widget/components/withdraw/init-step/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +9 -0
- package/trading-widget/components/withdraw/settings/withdraw-settings/withdraw-settings.d.ts +2 -0
- package/trading-widget/components/withdraw/stepper/withdraw-stepper.d.ts +2 -0
- package/trading-widget/components/withdraw/stepper/withdraw-stepper.hooks.d.ts +8 -0
- package/trading-widget/components/withdraw/tab-panel/tab-panel.d.ts +2 -0
- package/trading-widget/components/withdraw/tab-panel/tab-panel.hooks.d.ts +3 -0
- package/trading-widget/constants/synthetix-v3.d.ts +2 -0
- package/trading-widget/constants/tab.d.ts +1 -0
- package/trading-widget/hooks/index.d.ts +7 -0
- package/trading-widget/hooks/use-crypto-icon.d.ts +3 -0
- package/trading-widget/hooks/use-get-slippage-placeholder.d.ts +6 -0
- package/trading-widget/hooks/use-get-theme-type-by-slippage.d.ts +2 -0
- package/trading-widget/hooks/use-high-slippage-check.d.ts +5 -0
- package/trading-widget/hooks/use-leveraged-flat-money-withdrawal-checks.d.ts +4 -0
- package/trading-widget/hooks/use-synthetix-withdrawal-window.d.ts +4 -0
- package/trading-widget/hooks/use-trading-type-name.d.ts +2 -0
- package/trading-widget/hooks/use-user-staked-pools.d.ts +5 -0
- package/trading-widget/hooks/use-user-vault-balance.d.ts +3 -0
- package/trading-widget/hooks/use-user-vaults-balances.d.ts +2 -0
- package/trading-widget/providers/component-provider/component-provider.d.ts +14 -0
- package/trading-widget/providers/component-provider/component-provider.defaults.d.ts +2 -0
- package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +11 -0
- package/trading-widget/providers/component-provider/component-provider.types.d.ts +31 -0
- package/trading-widget/providers/component-provider/index.d.ts +3 -0
- package/trading-widget/providers/config-provider/config-provider.d.ts +4 -0
- package/trading-widget/providers/config-provider/config-provider.defaults.d.ts +3 -0
- package/trading-widget/providers/config-provider/config-provider.hooks.d.ts +3 -0
- package/trading-widget/providers/config-provider/config-provider.types.d.ts +39 -0
- package/trading-widget/providers/config-provider/index.d.ts +4 -0
- package/trading-widget/providers/index.d.ts +12 -0
- package/trading-widget/providers/overlay-provider/index.d.ts +2 -0
- package/trading-widget/providers/overlay-provider/overlay-provider.d.ts +2 -0
- package/trading-widget/providers/overlay-provider/overlay-provider.hooks.d.ts +16 -0
- package/trading-widget/providers/overlay-provider/overlay-provider.types.d.ts +16 -0
- package/trading-widget/providers/theme-provider/index.d.ts +2 -0
- package/trading-widget/providers/theme-provider/theme-provider.d.ts +3 -0
- package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +225 -0
- package/trading-widget/providers/translation-provider/index.d.ts +3 -0
- package/trading-widget/providers/translation-provider/translation-provider.d.ts +4 -0
- package/trading-widget/providers/translation-provider/translation-provider.defaults.d.ts +2 -0
- package/trading-widget/providers/translation-provider/translation-provider.hooks.d.ts +1 -0
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +104 -0
- package/trading-widget/types/balance.types.d.ts +9 -0
- package/trading-widget/types/index.d.ts +5 -0
- package/trading-widget/types/overlay.types.d.ts +13 -0
- package/trading-widget/types/staking.types.d.ts +6 -0
- package/trading-widget/types/synthetix-v3.types.d.ts +24 -0
- package/trading-widget/types/theme.types.d.ts +9 -0
- package/trading-widget/utils/format.d.ts +6 -0
- package/trading-widget/utils/icon.d.ts +2 -0
- package/trading-widget/utils/synthetix-v3.d.ts +39 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LimitOrderAction, LimitOrderState } from 'limit-orders/providers/state-provider/state-provider.types';
|
|
2
|
+
export declare const DEFAULT_FORM_DATA: {
|
|
3
|
+
takeProfitPrice: string;
|
|
4
|
+
stopLossPrice: string;
|
|
5
|
+
termsAccepted: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const reducer: (state: LimitOrderState, action: LimitOrderAction) => LimitOrderState;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { LimitOrderActionsState, LimitOrderContextConfig, LimitOrderState } from './state-provider.types';
|
|
3
|
+
export declare const getDefaultLimitOrderState: (config: LimitOrderContextConfig['initialState']) => LimitOrderState;
|
|
4
|
+
export declare const LimitOrderStateContext: import("react").Context<LimitOrderState>;
|
|
5
|
+
export declare const LimitOrderActionsContext: import("react").Context<LimitOrderActionsState>;
|
|
6
|
+
export declare const LimitOrderStateProvider: FC<PropsWithChildren<LimitOrderContextConfig>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Address, Hash } from 'viem';
|
|
2
|
+
export interface LimitOrderState {
|
|
3
|
+
isModalOpen: boolean;
|
|
4
|
+
vaultAddress: Address;
|
|
5
|
+
vaultChainId: number;
|
|
6
|
+
isReversedOrder?: boolean;
|
|
7
|
+
form: {
|
|
8
|
+
takeProfitPrice: string;
|
|
9
|
+
stopLossPrice: string;
|
|
10
|
+
termsAccepted: boolean;
|
|
11
|
+
};
|
|
12
|
+
pricingAsset: {
|
|
13
|
+
address: Address;
|
|
14
|
+
symbol: string;
|
|
15
|
+
};
|
|
16
|
+
pendingTransaction: Hash | null;
|
|
17
|
+
}
|
|
18
|
+
export type LimitOrderCallbacks = {
|
|
19
|
+
onTransactionSuccess?: (transaction: Address) => void;
|
|
20
|
+
onTransactionError?: (transaction: Address) => void;
|
|
21
|
+
};
|
|
22
|
+
export type LimitOrderActionsState = LimitOrderCallbacks & {
|
|
23
|
+
setIsModalOpen: (payload: boolean) => void;
|
|
24
|
+
setTakeProfitPrice: (payload: string) => void;
|
|
25
|
+
setStopLossPrice: (payload: string) => void;
|
|
26
|
+
setTermsAccepted: (payload: boolean) => void;
|
|
27
|
+
setPendingTransaction: (payload: Hash | null) => void;
|
|
28
|
+
reset: () => void;
|
|
29
|
+
};
|
|
30
|
+
export type LimitOrderAction = {
|
|
31
|
+
type: 'SET_TAKE_PROFIT_PRICE';
|
|
32
|
+
payload: string;
|
|
33
|
+
} | {
|
|
34
|
+
type: 'SET_STOP_LOSS_PRICE';
|
|
35
|
+
payload: string;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'SET_IS_MODAL_OPEN';
|
|
38
|
+
payload: boolean;
|
|
39
|
+
} | {
|
|
40
|
+
type: 'SET_TERMS_ACCEPTED';
|
|
41
|
+
payload: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'RESET';
|
|
44
|
+
} | {
|
|
45
|
+
type: 'SET_PENDING_TRANSACTION';
|
|
46
|
+
payload: Hash | null;
|
|
47
|
+
};
|
|
48
|
+
export interface LimitOrderContextConfig {
|
|
49
|
+
initialState: Pick<LimitOrderState, 'vaultAddress' | 'vaultChainId' | 'pricingAsset' | 'isReversedOrder'>;
|
|
50
|
+
actions?: LimitOrderCallbacks;
|
|
51
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export interface ThemeProviderConfigProps {
|
|
2
|
+
global?: {
|
|
3
|
+
color?: {
|
|
4
|
+
colorTextPrimary?: string;
|
|
5
|
+
colorTextPrimaryHover?: string;
|
|
6
|
+
colorBorderPrimary?: string;
|
|
7
|
+
colorBgPrimary?: string;
|
|
8
|
+
colorTextSecondary?: string;
|
|
9
|
+
colorBgSecondary?: string;
|
|
10
|
+
colorTextAccent?: string;
|
|
11
|
+
colorTextAccentHover?: string;
|
|
12
|
+
colorBgAccentFrom?: string;
|
|
13
|
+
colorBgAccentTo?: string;
|
|
14
|
+
colorBgAccentFromHover?: string;
|
|
15
|
+
colorBgAccentToHover?: string;
|
|
16
|
+
colorTextNeutral?: string;
|
|
17
|
+
colorBgNeutral?: string;
|
|
18
|
+
colorTextLoading?: string;
|
|
19
|
+
colorTextError?: string;
|
|
20
|
+
colorTextWarning?: string;
|
|
21
|
+
colorIcon?: string;
|
|
22
|
+
};
|
|
23
|
+
size?: {
|
|
24
|
+
gap?: string;
|
|
25
|
+
spacer?: string;
|
|
26
|
+
fontSizeBase?: string;
|
|
27
|
+
lineHeightBase?: string;
|
|
28
|
+
fontSizeXs?: string;
|
|
29
|
+
lineHeightXs?: string;
|
|
30
|
+
fontSizeSm?: string;
|
|
31
|
+
lineHeightSm?: string;
|
|
32
|
+
fontSizeLg?: string;
|
|
33
|
+
lineHeightLg?: string;
|
|
34
|
+
iconSize?: string;
|
|
35
|
+
iconSizeSm?: string;
|
|
36
|
+
iconSecondarySize?: string;
|
|
37
|
+
iconSecondarySizeSm?: string;
|
|
38
|
+
labelFontSize?: string;
|
|
39
|
+
labelLineHeight?: string;
|
|
40
|
+
};
|
|
41
|
+
style?: {
|
|
42
|
+
radiusPrimary?: string;
|
|
43
|
+
radiusSecondary?: string;
|
|
44
|
+
fontWeightLight?: string;
|
|
45
|
+
fontWeightMedium?: string;
|
|
46
|
+
fontWeightBold?: string;
|
|
47
|
+
actionOpacity?: string;
|
|
48
|
+
actionOpacityHover?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
component?: {
|
|
52
|
+
inputGroup?: {
|
|
53
|
+
color?: object;
|
|
54
|
+
size?: {
|
|
55
|
+
px?: string;
|
|
56
|
+
gap?: string;
|
|
57
|
+
};
|
|
58
|
+
style?: object;
|
|
59
|
+
};
|
|
60
|
+
input?: {
|
|
61
|
+
color?: {
|
|
62
|
+
textColor?: string;
|
|
63
|
+
loadingTextColor?: string;
|
|
64
|
+
bgColor?: string;
|
|
65
|
+
bgColorFocus?: string;
|
|
66
|
+
borderColor?: string;
|
|
67
|
+
borderColorFocus?: string;
|
|
68
|
+
placeholderColor?: string;
|
|
69
|
+
buttonBgColor?: string;
|
|
70
|
+
buttonBorderColor?: string;
|
|
71
|
+
buttonTextColor?: string;
|
|
72
|
+
};
|
|
73
|
+
size?: {
|
|
74
|
+
px?: string;
|
|
75
|
+
py?: string;
|
|
76
|
+
gap?: string;
|
|
77
|
+
priceGap?: string;
|
|
78
|
+
iconSize?: string;
|
|
79
|
+
iconSizeSm?: string;
|
|
80
|
+
labelFontSize?: string;
|
|
81
|
+
labelLineHeight?: string;
|
|
82
|
+
fontSize?: string;
|
|
83
|
+
lineHeight?: string;
|
|
84
|
+
fontSizeLg?: string;
|
|
85
|
+
lineHeightLg?: string;
|
|
86
|
+
tokenFontSize?: string;
|
|
87
|
+
tokenLineHeight?: string;
|
|
88
|
+
tokenFontSizeSm?: string;
|
|
89
|
+
tokenLineHeightSm?: string;
|
|
90
|
+
buttonPx?: string;
|
|
91
|
+
buttonPy?: string;
|
|
92
|
+
buttonFontSize?: string;
|
|
93
|
+
buttonLineHeight?: string;
|
|
94
|
+
};
|
|
95
|
+
style?: {
|
|
96
|
+
radius?: string;
|
|
97
|
+
labelFontWeight?: string;
|
|
98
|
+
fontWeight?: string;
|
|
99
|
+
tokenFontWeight?: string;
|
|
100
|
+
buttonRadius?: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
actionButton?: {
|
|
104
|
+
color?: {
|
|
105
|
+
colorBgFrom?: string;
|
|
106
|
+
colorBgTo?: string;
|
|
107
|
+
colorBgFromHover?: string;
|
|
108
|
+
colorBgToHover?: string;
|
|
109
|
+
colorBorder?: string;
|
|
110
|
+
colorText?: string;
|
|
111
|
+
outlineColorBorder?: string;
|
|
112
|
+
outlineColorBorderHover?: string;
|
|
113
|
+
outlineColorText?: string;
|
|
114
|
+
};
|
|
115
|
+
size?: {
|
|
116
|
+
borderWidth?: string;
|
|
117
|
+
};
|
|
118
|
+
style?: object;
|
|
119
|
+
};
|
|
120
|
+
tooltip?: {
|
|
121
|
+
color?: {
|
|
122
|
+
colorBg?: string;
|
|
123
|
+
colorText?: string;
|
|
124
|
+
};
|
|
125
|
+
size?: object;
|
|
126
|
+
style?: object;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface ThemeProviderProps {
|
|
131
|
+
config?: ThemeProviderConfigProps;
|
|
132
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { TranslationProviderProps } from './translation-provider.types';
|
|
3
|
+
export declare const TranslationProviderContext: import("react").Context<Required<Partial<import("./translation-provider.types").TranslationMap> | undefined>>;
|
|
4
|
+
export declare const TranslationProvider: FC<PropsWithChildren<TranslationProviderProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTranslationContext: () => Required<Partial<import("./translation-provider.types").TranslationMap>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type TranslationMap = {
|
|
2
|
+
switchNetwork: string;
|
|
3
|
+
approve: string;
|
|
4
|
+
stopLossLabel: string;
|
|
5
|
+
takeProfitLabel: string;
|
|
6
|
+
price: string;
|
|
7
|
+
limitOrderTerms: string;
|
|
8
|
+
modify: string;
|
|
9
|
+
invalidLimitOrderPriceError: string;
|
|
10
|
+
invalidLimitOrderPriceErrorReversed: string;
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
export interface TranslationProviderProps {
|
|
14
|
+
config?: Partial<TranslationMap>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Address } from 'core-kit/types';
|
|
2
|
+
import type { TranslationMap } from 'limit-orders/providers/translation-provider';
|
|
3
|
+
export declare const getLimitOrderId: ({ userAddress, vaultAddress, }: {
|
|
4
|
+
userAddress: Address;
|
|
5
|
+
vaultAddress: Address;
|
|
6
|
+
}) => `0x${string}`;
|
|
7
|
+
export declare const calculateProfitPriceDifference: ({ price, markPrice, }: {
|
|
8
|
+
price: string;
|
|
9
|
+
markPrice: string;
|
|
10
|
+
}) => string;
|
|
11
|
+
export declare const calculateLossPriceDifference: ({ price, markPrice, }: {
|
|
12
|
+
price: string;
|
|
13
|
+
markPrice: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
export declare const adjustLimitOrderError: ({ error, isReversedOrder, translationMap, }: {
|
|
16
|
+
error: {
|
|
17
|
+
title: string;
|
|
18
|
+
hint?: string;
|
|
19
|
+
} | null;
|
|
20
|
+
isReversedOrder: boolean | undefined;
|
|
21
|
+
translationMap: Required<Partial<TranslationMap>>;
|
|
22
|
+
}) => {
|
|
23
|
+
title: string;
|
|
24
|
+
hint?: string | undefined;
|
|
25
|
+
} | null;
|
package/package.json
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhedge/trading-widget",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
8
|
-
"
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.mjs",
|
|
13
|
-
"require": "./dist/index.js"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist",
|
|
18
|
-
"README.md"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsc && vite build",
|
|
22
|
-
"dev": "vite",
|
|
23
|
-
"typecheck": "tsc --noEmit"
|
|
24
|
-
},
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"module": "index.mjs",
|
|
8
|
+
"typings": "index.d.ts",
|
|
25
9
|
"peerDependencies": {
|
|
26
10
|
"@tanstack/react-query": "^5.28.4",
|
|
27
11
|
"react": ">=18.2.0",
|