@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,39 @@
|
|
|
1
|
+
import type { ChainId } from 'core-kit/types';
|
|
2
|
+
export interface ConfigProviderParams {
|
|
3
|
+
isGeoBlocked: boolean;
|
|
4
|
+
isSanctioned: boolean;
|
|
5
|
+
depositQuoteDiffWarningThreshold: number;
|
|
6
|
+
depositQuoteDiffErrorThreshold: number;
|
|
7
|
+
defaultWithdrawSlippage: number;
|
|
8
|
+
defaultSwapTransactionSlippage: number;
|
|
9
|
+
defaultNoSwapMinDepositAmountGap: number;
|
|
10
|
+
defaultNotificationDuration: number;
|
|
11
|
+
defaultLockTime: string;
|
|
12
|
+
stablePrecision: number;
|
|
13
|
+
defaultPrecision: number;
|
|
14
|
+
stakingChainId: ChainId;
|
|
15
|
+
termsOfUseAccepted: boolean;
|
|
16
|
+
standalone: boolean;
|
|
17
|
+
chainConfig: Partial<Record<ChainId, {
|
|
18
|
+
name: string;
|
|
19
|
+
iconPath: string;
|
|
20
|
+
}>>;
|
|
21
|
+
isAllAssetsWithdrawOptionDefault: boolean;
|
|
22
|
+
aaveOffchainWithdrawChainIds: ChainId[];
|
|
23
|
+
aaveOffchainWithdrawMinValue: number;
|
|
24
|
+
getFallbackIconPath: (tokenName: string) => string;
|
|
25
|
+
}
|
|
26
|
+
export interface ConfigProviderActions {
|
|
27
|
+
onConnect: () => void;
|
|
28
|
+
onAcceptTermsOfUse: () => Promise<boolean>;
|
|
29
|
+
}
|
|
30
|
+
export interface ConfigProviderProps {
|
|
31
|
+
config?: {
|
|
32
|
+
params?: Partial<ConfigProviderParams>;
|
|
33
|
+
actions?: Partial<ConfigProviderActions>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export type ConfigProviderState = {
|
|
37
|
+
params: ConfigProviderParams;
|
|
38
|
+
actions: ConfigProviderActions;
|
|
39
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useConfigContext, useConfigContextParams, useConfigContextActions, } from './config-provider.hooks';
|
|
2
|
+
export { DEFAULT_CONFIG_PARAMS } from './config-provider.defaults';
|
|
3
|
+
export { ConfigProvider } from './config-provider';
|
|
4
|
+
export * from './config-provider.types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { ComponentProviderProps } from './component-provider';
|
|
3
|
+
import type { ConfigProviderProps } from './config-provider';
|
|
4
|
+
import type { ThemeProviderProps } from './theme-provider';
|
|
5
|
+
import type { TranslationProviderProps } from './translation-provider';
|
|
6
|
+
export interface ProvidersProps {
|
|
7
|
+
theme?: ThemeProviderProps['config'];
|
|
8
|
+
config?: ConfigProviderProps['config'];
|
|
9
|
+
components?: ComponentProviderProps['config'];
|
|
10
|
+
translation?: TranslationProviderProps['config'];
|
|
11
|
+
}
|
|
12
|
+
export declare const Providers: FC<PropsWithChildren<ProvidersProps>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Dispatch } from 'react';
|
|
2
|
+
import type { OverlayProps } from 'trading-widget/types';
|
|
3
|
+
import type { OverlayProviderAction, OverlayProviderState } from './overlay-provider.types';
|
|
4
|
+
export declare const useOverlayProvider: () => [OverlayProviderState, Dispatch<OverlayProviderAction>];
|
|
5
|
+
export declare const OverlayProviderStateContext: import("react").Context<OverlayProviderState>;
|
|
6
|
+
export declare const OverlayProviderDispatchContext: import("react").Context<Dispatch<OverlayProviderAction>>;
|
|
7
|
+
export declare const useOverlayStateContext: () => OverlayProviderState;
|
|
8
|
+
export declare const useOverlayDispatchContext: () => Dispatch<OverlayProviderAction>;
|
|
9
|
+
export declare const useOverlayHandlers: ({ type }: OverlayProps) => {
|
|
10
|
+
handleReject: () => void;
|
|
11
|
+
handleConfirm: () => Promise<void>;
|
|
12
|
+
isPending: boolean | undefined;
|
|
13
|
+
meta: {
|
|
14
|
+
error?: string | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OverlayType } from 'trading-widget/types';
|
|
2
|
+
export type OverlayProviderState = Record<OverlayType, Pick<MergeOverlayActionPayload, 'isOpen' | 'onConfirm' | 'isPending' | 'meta'>>;
|
|
3
|
+
type MergeOverlayActionPayload = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
type: OverlayType;
|
|
6
|
+
isPending?: boolean;
|
|
7
|
+
onConfirm?: (setPendingState: (pending: boolean) => void) => Promise<void>;
|
|
8
|
+
meta?: {
|
|
9
|
+
error?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type OverlayProviderAction = {
|
|
13
|
+
type: 'MERGE_OVERLAY';
|
|
14
|
+
payload: MergeOverlayActionPayload;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,225 @@
|
|
|
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
|
+
notification?: {
|
|
53
|
+
color?: {
|
|
54
|
+
colorBg?: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
popup?: {
|
|
58
|
+
color?: {
|
|
59
|
+
colorText?: string;
|
|
60
|
+
colorBg?: string;
|
|
61
|
+
colorBorder?: string;
|
|
62
|
+
};
|
|
63
|
+
size?: {
|
|
64
|
+
fontSize?: string;
|
|
65
|
+
};
|
|
66
|
+
style?: object;
|
|
67
|
+
};
|
|
68
|
+
popupList?: {
|
|
69
|
+
color?: {
|
|
70
|
+
itemBgEven?: string;
|
|
71
|
+
itemBgOdd?: string;
|
|
72
|
+
headerBg?: string;
|
|
73
|
+
};
|
|
74
|
+
size?: object;
|
|
75
|
+
style?: object;
|
|
76
|
+
};
|
|
77
|
+
tabGroup?: {
|
|
78
|
+
color?: object;
|
|
79
|
+
size?: {
|
|
80
|
+
px?: string;
|
|
81
|
+
};
|
|
82
|
+
style?: object;
|
|
83
|
+
};
|
|
84
|
+
tabContent?: {
|
|
85
|
+
color?: object;
|
|
86
|
+
size?: {
|
|
87
|
+
pt?: string;
|
|
88
|
+
px?: string;
|
|
89
|
+
pb?: string;
|
|
90
|
+
gap?: string;
|
|
91
|
+
};
|
|
92
|
+
style?: object;
|
|
93
|
+
};
|
|
94
|
+
tab?: {
|
|
95
|
+
color?: {
|
|
96
|
+
colorBg?: string;
|
|
97
|
+
colorText?: string;
|
|
98
|
+
selectColorText?: string;
|
|
99
|
+
colorTextHover?: string;
|
|
100
|
+
};
|
|
101
|
+
size?: {
|
|
102
|
+
px?: string;
|
|
103
|
+
py?: string;
|
|
104
|
+
fontSize?: string;
|
|
105
|
+
};
|
|
106
|
+
style?: {
|
|
107
|
+
fontWeight?: string;
|
|
108
|
+
lineHeight?: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
balance?: {
|
|
112
|
+
color?: {
|
|
113
|
+
colorText?: string;
|
|
114
|
+
priceColorText?: string;
|
|
115
|
+
};
|
|
116
|
+
size?: {
|
|
117
|
+
px?: string;
|
|
118
|
+
gap?: string;
|
|
119
|
+
fontSize?: string;
|
|
120
|
+
lineHeight?: string;
|
|
121
|
+
priceFontSize?: string;
|
|
122
|
+
priceLineHeight?: string;
|
|
123
|
+
};
|
|
124
|
+
style?: object;
|
|
125
|
+
};
|
|
126
|
+
inputGroup?: {
|
|
127
|
+
color?: object;
|
|
128
|
+
size?: {
|
|
129
|
+
px?: string;
|
|
130
|
+
gap?: string;
|
|
131
|
+
};
|
|
132
|
+
style?: object;
|
|
133
|
+
};
|
|
134
|
+
input?: {
|
|
135
|
+
color?: {
|
|
136
|
+
textColor?: string;
|
|
137
|
+
loadingTextColor?: string;
|
|
138
|
+
bgColor?: string;
|
|
139
|
+
bgColorFocus?: string;
|
|
140
|
+
borderColor?: string;
|
|
141
|
+
borderColorFocus?: string;
|
|
142
|
+
placeholderColor?: string;
|
|
143
|
+
buttonBgColor?: string;
|
|
144
|
+
buttonBorderColor?: string;
|
|
145
|
+
buttonTextColor?: string;
|
|
146
|
+
};
|
|
147
|
+
size?: {
|
|
148
|
+
px?: string;
|
|
149
|
+
py?: string;
|
|
150
|
+
gap?: string;
|
|
151
|
+
priceGap?: string;
|
|
152
|
+
iconSize?: string;
|
|
153
|
+
iconSizeSm?: string;
|
|
154
|
+
labelFontSize?: string;
|
|
155
|
+
labelLineHeight?: string;
|
|
156
|
+
fontSize?: string;
|
|
157
|
+
lineHeight?: string;
|
|
158
|
+
fontSizeLg?: string;
|
|
159
|
+
lineHeightLg?: string;
|
|
160
|
+
tokenFontSize?: string;
|
|
161
|
+
tokenLineHeight?: string;
|
|
162
|
+
tokenFontSizeSm?: string;
|
|
163
|
+
tokenLineHeightSm?: string;
|
|
164
|
+
buttonPx?: string;
|
|
165
|
+
buttonPy?: string;
|
|
166
|
+
buttonFontSize?: string;
|
|
167
|
+
buttonLineHeight?: string;
|
|
168
|
+
};
|
|
169
|
+
style?: {
|
|
170
|
+
radius?: string;
|
|
171
|
+
labelFontWeight?: string;
|
|
172
|
+
fontWeight?: string;
|
|
173
|
+
tokenFontWeight?: string;
|
|
174
|
+
buttonRadius?: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
actionButton?: {
|
|
178
|
+
color?: {
|
|
179
|
+
colorBgFrom?: string;
|
|
180
|
+
colorBgTo?: string;
|
|
181
|
+
colorBgFromHover?: string;
|
|
182
|
+
colorBgToHover?: string;
|
|
183
|
+
colorBorder?: string;
|
|
184
|
+
colorText?: string;
|
|
185
|
+
outlineColorBorder?: string;
|
|
186
|
+
outlineColorBorderHover?: string;
|
|
187
|
+
outlineColorText?: string;
|
|
188
|
+
};
|
|
189
|
+
size?: {
|
|
190
|
+
borderWidth?: string;
|
|
191
|
+
};
|
|
192
|
+
style?: object;
|
|
193
|
+
};
|
|
194
|
+
meta?: {
|
|
195
|
+
color?: {
|
|
196
|
+
linkTextColor?: string;
|
|
197
|
+
panelBgHover?: string;
|
|
198
|
+
};
|
|
199
|
+
size?: {
|
|
200
|
+
gap?: string;
|
|
201
|
+
px?: string;
|
|
202
|
+
};
|
|
203
|
+
style?: object;
|
|
204
|
+
};
|
|
205
|
+
tooltip?: {
|
|
206
|
+
color?: {
|
|
207
|
+
colorBg?: string;
|
|
208
|
+
colorText?: string;
|
|
209
|
+
};
|
|
210
|
+
size?: object;
|
|
211
|
+
style?: object;
|
|
212
|
+
};
|
|
213
|
+
switch?: {
|
|
214
|
+
color?: {
|
|
215
|
+
colorBgChecked?: string;
|
|
216
|
+
colorBg?: string;
|
|
217
|
+
};
|
|
218
|
+
size?: object;
|
|
219
|
+
style?: object;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
export interface ThemeProviderProps {
|
|
224
|
+
config?: ThemeProviderConfigProps;
|
|
225
|
+
}
|
|
@@ -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,104 @@
|
|
|
1
|
+
export type TranslationMap = {
|
|
2
|
+
depositSlippageWarning: string;
|
|
3
|
+
withdrawSlippageWarning: string;
|
|
4
|
+
minSlippageWarning: string;
|
|
5
|
+
highSlippageWarning: string;
|
|
6
|
+
recommendedMinSlippage: string;
|
|
7
|
+
projectedDailyEarningsTooltip: string;
|
|
8
|
+
dailyEarnings: string;
|
|
9
|
+
projectedYearlyEarningsTooltip: string;
|
|
10
|
+
yearlyEarnings: string;
|
|
11
|
+
fullReceiveDetails: string;
|
|
12
|
+
tradeDetails: string;
|
|
13
|
+
maxSlippage: string;
|
|
14
|
+
minReceiveAmount: string;
|
|
15
|
+
minReceived: string;
|
|
16
|
+
estimatedMultiAssetFractions: string;
|
|
17
|
+
infinite: string;
|
|
18
|
+
tokenAllowance: string;
|
|
19
|
+
entryFee: string;
|
|
20
|
+
entryFeeExplanation: string;
|
|
21
|
+
exitFee: string;
|
|
22
|
+
exitFeeExplanation: string;
|
|
23
|
+
minDepositUsd: string;
|
|
24
|
+
minDeposit: string;
|
|
25
|
+
tokensLockTime: string;
|
|
26
|
+
slippageTolerance: string;
|
|
27
|
+
reduceLockupTime: string;
|
|
28
|
+
toggleTokenApprovalAmount: string;
|
|
29
|
+
auto: string;
|
|
30
|
+
reduceLockup: string;
|
|
31
|
+
deposit: string;
|
|
32
|
+
withdraw: string;
|
|
33
|
+
yourBalance: string;
|
|
34
|
+
max: string;
|
|
35
|
+
allAssets: string;
|
|
36
|
+
all: string;
|
|
37
|
+
payWith: string;
|
|
38
|
+
buyEstimated: string;
|
|
39
|
+
sell: string;
|
|
40
|
+
receiveEstimated: string;
|
|
41
|
+
confirmInWallet: string;
|
|
42
|
+
pending: string;
|
|
43
|
+
approve: string;
|
|
44
|
+
connectWallet: string;
|
|
45
|
+
minimumPurchase: string;
|
|
46
|
+
poolIsInactive: string;
|
|
47
|
+
poolIsPrivate: string;
|
|
48
|
+
poolDepositsAreMaintenance: string;
|
|
49
|
+
poolWithdrawalsAreMaintenance: string;
|
|
50
|
+
updateOracles: string;
|
|
51
|
+
checkingOracles: string;
|
|
52
|
+
confirmMaxSlippage: string;
|
|
53
|
+
withdrawalWindowDisabled: string;
|
|
54
|
+
withdrawalLiquidityDisabled: string;
|
|
55
|
+
withdrawCooldown: string;
|
|
56
|
+
termsOfUse: string;
|
|
57
|
+
termOfUseDepositListTitle: string;
|
|
58
|
+
termOfUseDepositAssetSlippage: string;
|
|
59
|
+
termOfUseDepositBugs: string;
|
|
60
|
+
termOfUseDepositDowntime: string;
|
|
61
|
+
termOfUseDepositAuditRisk: string;
|
|
62
|
+
termOfUseDepositAccept: string;
|
|
63
|
+
back: string;
|
|
64
|
+
highSlippage: string;
|
|
65
|
+
responsibleHighSlippage: string;
|
|
66
|
+
highSlippageListTitle: string;
|
|
67
|
+
highSlippageQuoteDiff: string;
|
|
68
|
+
highSlippageRisk: string;
|
|
69
|
+
confirm: string;
|
|
70
|
+
selectToken: string;
|
|
71
|
+
sendingOrderToWallet: string;
|
|
72
|
+
settingUpTx: string;
|
|
73
|
+
miningTx: string;
|
|
74
|
+
updateSynthetixOracles: string;
|
|
75
|
+
approveSpending: string;
|
|
76
|
+
pay: string;
|
|
77
|
+
multiAssetFractions: string;
|
|
78
|
+
swappableAssets: string;
|
|
79
|
+
explorer: string;
|
|
80
|
+
as: string;
|
|
81
|
+
switchNetwork: string;
|
|
82
|
+
depositAction: string;
|
|
83
|
+
withdrawAction: string;
|
|
84
|
+
unrollAction: string;
|
|
85
|
+
unrollAndClaimAction: string;
|
|
86
|
+
swapAction: string;
|
|
87
|
+
claimAction: string;
|
|
88
|
+
claimLabel: string;
|
|
89
|
+
swapAndClaimTo: string;
|
|
90
|
+
initWithdrawDescription: string;
|
|
91
|
+
initWithdrawTooltip: string;
|
|
92
|
+
completeWithdrawDescription: string;
|
|
93
|
+
completeWithdrawTooltip: string;
|
|
94
|
+
unrollAndClaimDescription: string;
|
|
95
|
+
total: string;
|
|
96
|
+
showAll: string;
|
|
97
|
+
hide: string;
|
|
98
|
+
refreshSwapQuoteTooltip: string;
|
|
99
|
+
proceedWithNextStep: string;
|
|
100
|
+
[key: string]: string;
|
|
101
|
+
};
|
|
102
|
+
export interface TranslationProviderProps {
|
|
103
|
+
config?: Partial<TranslationMap>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const OVERLAY: {
|
|
2
|
+
readonly TERMS_OF_USE: "TERMS_OF_USE";
|
|
3
|
+
readonly HIGH_SLIPPAGE: "HIGH_SLIPPAGE";
|
|
4
|
+
readonly FMP_WITHDRAWAL: "FMP_WITHDRAWAL";
|
|
5
|
+
readonly TOKEN_SELECT: "TOKEN_SELECT";
|
|
6
|
+
readonly POOL_SELECT: "POOL_SELECT";
|
|
7
|
+
readonly TRADING: "TRADING";
|
|
8
|
+
readonly NOTIFICATION: "NOTIFICATION";
|
|
9
|
+
};
|
|
10
|
+
export type OverlayType = (typeof OVERLAY)[keyof typeof OVERLAY];
|
|
11
|
+
export interface OverlayProps {
|
|
12
|
+
type: OverlayType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const SYNTHETIX_V3_PERIOD: {
|
|
2
|
+
readonly DELEGATION: "DELEGATION";
|
|
3
|
+
readonly UNDELEGATION: "UNDELEGATION";
|
|
4
|
+
readonly WAIT: "WAIT";
|
|
5
|
+
readonly WITHDRAWAL: "WITHDRAWAL";
|
|
6
|
+
};
|
|
7
|
+
export type SynthetixV3PeriodType = (typeof SYNTHETIX_V3_PERIOD)[keyof typeof SYNTHETIX_V3_PERIOD];
|
|
8
|
+
export interface DayParams {
|
|
9
|
+
dayOfWeek: number;
|
|
10
|
+
hour: number;
|
|
11
|
+
}
|
|
12
|
+
export interface WeekPeriod {
|
|
13
|
+
start: DayParams;
|
|
14
|
+
end: DayParams;
|
|
15
|
+
}
|
|
16
|
+
export interface PeriodConfig {
|
|
17
|
+
id: SynthetixV3PeriodType;
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
gradient: [string, string];
|
|
21
|
+
start: DayParams;
|
|
22
|
+
end: DayParams;
|
|
23
|
+
intraWeekRanges: WeekPeriod[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const THEME_TYPE: {
|
|
2
|
+
readonly ERROR: "error";
|
|
3
|
+
readonly WARNING: "warning";
|
|
4
|
+
readonly SUCCESS: "success";
|
|
5
|
+
readonly DEFAULT: "default";
|
|
6
|
+
readonly CUSTOM: "custom";
|
|
7
|
+
};
|
|
8
|
+
export type ThemeType = (typeof THEME_TYPE)[keyof typeof THEME_TYPE];
|
|
9
|
+
export type TokenIconSize = 'xs' | 'sm' | 'm' | 'lg' | 'xl';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Balance } from 'trading-widget/types';
|
|
2
|
+
export declare function formatBalanceInUsd(balance: string | undefined, tokenPrice: string | undefined, maximumFractionDigits?: number): {
|
|
3
|
+
balanceInUsd: string;
|
|
4
|
+
balanceInUsdNumber: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const formatBalance: (balance: bigint | undefined, tokenPrice: bigint | undefined) => Omit<Balance, 'includesStakedTokens'>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SynthetixV3PeriodType } from 'trading-widget/types/synthetix-v3.types';
|
|
2
|
+
export declare const getDateRangeByPeriod: (period: SynthetixV3PeriodType) => {
|
|
3
|
+
from: Date;
|
|
4
|
+
to: Date;
|
|
5
|
+
intraWeekRanges: {
|
|
6
|
+
from: Date;
|
|
7
|
+
to: Date;
|
|
8
|
+
}[];
|
|
9
|
+
duration: {
|
|
10
|
+
percentage: number;
|
|
11
|
+
};
|
|
12
|
+
format: {
|
|
13
|
+
from: string;
|
|
14
|
+
to: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const getRangeData: () => {
|
|
18
|
+
from: Date;
|
|
19
|
+
to: Date;
|
|
20
|
+
intraWeekRanges: {
|
|
21
|
+
from: Date;
|
|
22
|
+
to: Date;
|
|
23
|
+
}[];
|
|
24
|
+
duration: {
|
|
25
|
+
percentage: number;
|
|
26
|
+
};
|
|
27
|
+
format: {
|
|
28
|
+
from: string;
|
|
29
|
+
to: string;
|
|
30
|
+
};
|
|
31
|
+
id: SynthetixV3PeriodType;
|
|
32
|
+
name: string;
|
|
33
|
+
description?: string | undefined;
|
|
34
|
+
gradient: [string, string];
|
|
35
|
+
start: import("trading-widget/types/synthetix-v3.types").DayParams;
|
|
36
|
+
end: import("trading-widget/types/synthetix-v3.types").DayParams;
|
|
37
|
+
}[];
|
|
38
|
+
export declare const getCurrentRangeIndex: () => number;
|
|
39
|
+
export declare const getWithdrawalWindowStart: () => string;
|