@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,10 @@
|
|
|
1
|
+
interface UseFlatmoneyPointsUserBalancesData {
|
|
2
|
+
userPortionOfLockedPointsBalance: string;
|
|
3
|
+
unlockTaxAmount: string;
|
|
4
|
+
vestedPointsAmount: string;
|
|
5
|
+
unlockTimestamp: number | null;
|
|
6
|
+
unlockDate: string | null;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const useFlatmoneyPointsUserBalances: () => UseFlatmoneyPointsUserBalancesData;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsDhedgeVaultConnected: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsInsufficientBalance: () => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Address } from 'core-kit/types/web3.types';
|
|
2
|
+
interface UserTokenBalanceParams {
|
|
3
|
+
symbol: string;
|
|
4
|
+
address: Address;
|
|
5
|
+
watch?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const useUserTokenBalance: ({ symbol, address, watch, }: UserTokenBalanceParams) => string;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useBrowserStorage<T>(storageType: 'sessionStorage' | 'localStorage', key: string, initialValue: T): [T, (value: T) => void];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDebounce: <T>(value: T, delay: number) => T;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { useConnect, useWriteContract, usePublicClient, useWaitForTransactionReceipt, useWalletClient, useSendTransaction, useReadContract, useReadContracts, useBlockNumber, useDisconnect, } from 'wagmi';
|
|
2
|
+
export { useAccount } from './use-account';
|
|
3
|
+
export { useNetwork } from './use-network';
|
|
4
|
+
export { useTokenAllowance } from './use-token-allowance';
|
|
5
|
+
export { useIsWalletConnected } from './use-is-wallet-connected';
|
|
6
|
+
export { useBalance } from './use-balance';
|
|
7
|
+
export { useContractFunction } from './use-contract-function';
|
|
8
|
+
export { useGasPrice } from './use-gas-price';
|
|
9
|
+
export { useContractReadsErrorLogging } from './use-contract-reads-error-logging';
|
|
10
|
+
export { useContractReadErrorLogging } from './use-contract-read-error-logging';
|
|
11
|
+
export { useStaticCallQuery } from './use-static-call-query';
|
|
12
|
+
export { useInvalidateOnBlock } from './use-invalidate-on-block';
|
|
13
|
+
export { useInvalidateTradingQueries } from './use-invalidate-trading-queries';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useAccount as useWagmiAccount } from 'wagmi';
|
|
2
|
+
import type { Address } from 'core-kit/types';
|
|
3
|
+
export declare const useAccount: () => Pick<import("wagmi").UseAccountReturnType<import("wagmi").Config>, "status" | "connector"> & {
|
|
4
|
+
account?: `0x${string}` | undefined;
|
|
5
|
+
providerName?: string | undefined;
|
|
6
|
+
isConnected: boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ContractId } from 'core-kit/const';
|
|
2
|
+
import type { Address, EstimateCall, UseWriteContractParameters } from 'core-kit/types/web3.types';
|
|
3
|
+
interface ContractFunctionOptions {
|
|
4
|
+
contractId: ContractId;
|
|
5
|
+
functionName: string;
|
|
6
|
+
dynamicContractAddress?: Address;
|
|
7
|
+
onSettled?: Required<UseWriteContractParameters>['mutation']['onSettled'];
|
|
8
|
+
}
|
|
9
|
+
export declare const checkArgsForTxOverrides: (args: any[]) => {
|
|
10
|
+
transactionOverrides: any;
|
|
11
|
+
argumentsWithoutOverrides: any[];
|
|
12
|
+
};
|
|
13
|
+
export declare const useContractFunction: ({ functionName, dynamicContractAddress, contractId, onSettled, }: ContractFunctionOptions) => {
|
|
14
|
+
send: (...args: unknown[]) => Promise<void>;
|
|
15
|
+
estimate: EstimateCall;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { UseReadContractsReturnType } from 'wagmi';
|
|
2
|
+
export interface InvalidateOnBlockConfig {
|
|
3
|
+
queryKey: UseReadContractsReturnType['queryKey'];
|
|
4
|
+
watch?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const useInvalidateOnBlock: ({ queryKey, watch, }: InvalidateOnBlockConfig) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsWalletConnected: () => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useAccount, useConfig, useSwitchChain } from 'wagmi';
|
|
2
|
+
import type { ChainId } from 'core-kit/types/web3.types';
|
|
3
|
+
interface UseNetworkData {
|
|
4
|
+
chain: ReturnType<typeof useAccount>['chain'];
|
|
5
|
+
chains: ReturnType<typeof useConfig>['chains'];
|
|
6
|
+
switchNetwork: ReturnType<typeof useSwitchChain>['switchChain'];
|
|
7
|
+
switchNetworkAsync: ReturnType<typeof useSwitchChain>['switchChainAsync'];
|
|
8
|
+
isSupported: boolean;
|
|
9
|
+
chainId: ChainId | undefined;
|
|
10
|
+
supportedChainId: ChainId;
|
|
11
|
+
}
|
|
12
|
+
export declare const useNetwork: () => UseNetworkData;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { usePublicClient } from 'wagmi';
|
|
3
|
+
import type { UseReadContractParameters } from 'wagmi';
|
|
4
|
+
type UseStaticCallVariables = Pick<Required<UseReadContractParameters>, 'functionName' | 'abi' | 'address' | 'chainId'> & {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
args: unknown[];
|
|
7
|
+
refetchInterval?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const makeStaticCall: <T>({ functionName, address, abi, args, publicClient, }: Omit<UseStaticCallVariables, "chainId" | "refetchInterval" | "disabled"> & {
|
|
10
|
+
publicClient: ReturnType<typeof usePublicClient>;
|
|
11
|
+
}) => Promise<T | undefined>;
|
|
12
|
+
export declare const useStaticCallQuery: <T>({ disabled, functionName, address, abi, args, chainId, refetchInterval, }: UseStaticCallVariables) => UseQueryResult<T>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useReadContract } from 'core-kit/hooks/web3';
|
|
2
|
+
import type { Address, ChainId } from 'core-kit/types/web3.types';
|
|
3
|
+
export declare const useTokenAllowance: ({ tokenAddress, ownerAddress, spenderAddress, chainId, skip, }: {
|
|
4
|
+
tokenAddress: Address;
|
|
5
|
+
ownerAddress: Address;
|
|
6
|
+
spenderAddress: Address;
|
|
7
|
+
chainId: ChainId;
|
|
8
|
+
skip?: boolean | undefined;
|
|
9
|
+
}) => ReturnType<typeof useReadContract>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TradingPanelProvider, getDefaultTradingPanelState } from './providers';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CustomError } from 'ts-custom-error';
|
|
2
|
+
interface EstimationErrorParams {
|
|
3
|
+
txArgs: unknown[];
|
|
4
|
+
account?: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
link?: string;
|
|
7
|
+
slippage?: number | 'auto';
|
|
8
|
+
functionName?: string;
|
|
9
|
+
onBypass?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare class EstimationError extends CustomError {
|
|
12
|
+
txArgs: unknown[];
|
|
13
|
+
link?: string;
|
|
14
|
+
account?: string;
|
|
15
|
+
slippage?: number | 'auto';
|
|
16
|
+
functionName?: string;
|
|
17
|
+
onBypass?: () => void;
|
|
18
|
+
constructor({ message, link, slippage, txArgs, account, onBypass, functionName, }: EstimationErrorParams);
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EstimationError } from './estimation-error';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { TradingPanelActionsState, TradingPanelContextConfig, TradingPanelState } from 'core-kit/types/state.types';
|
|
3
|
+
export declare const getDefaultTradingPanelState: (config?: Partial<TradingPanelState>) => TradingPanelState;
|
|
4
|
+
export declare const TradingPanelStateContext: import("react").Context<TradingPanelState>;
|
|
5
|
+
export declare const TradingPanelActionsContext: import("react").Context<TradingPanelActionsState>;
|
|
6
|
+
export declare const TradingPanelProvider: FC<PropsWithChildren<TradingPanelContextConfig>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { PoolComposition } from 'core-kit/types/pool.types';
|
|
2
|
+
import type { ApyCurrency, TradingToken } from 'core-kit/types/trading-panel.types';
|
|
3
|
+
import type { Address, ChainId } from 'core-kit/types/web3.types';
|
|
4
|
+
export interface PoolConfig {
|
|
5
|
+
address: Address;
|
|
6
|
+
symbol: string;
|
|
7
|
+
chainId: ChainId;
|
|
8
|
+
depositParams: {
|
|
9
|
+
customTokens: TradingToken[];
|
|
10
|
+
defaultDepositTokenSymbol?: string;
|
|
11
|
+
};
|
|
12
|
+
withdrawParams: {
|
|
13
|
+
customTokens: TradingToken[];
|
|
14
|
+
};
|
|
15
|
+
deprecated?: boolean;
|
|
16
|
+
maintenance?: boolean;
|
|
17
|
+
maintenanceDeposits?: boolean;
|
|
18
|
+
maintenanceWithdrawals?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface PoolFallbackData {
|
|
21
|
+
address: Address;
|
|
22
|
+
managerLogicAddress?: Address;
|
|
23
|
+
poolCompositions?: PoolComposition[];
|
|
24
|
+
tokenPrice?: string;
|
|
25
|
+
apy?: {
|
|
26
|
+
value: number;
|
|
27
|
+
currency: ApyCurrency;
|
|
28
|
+
};
|
|
29
|
+
performanceFeeNumerator?: string | null;
|
|
30
|
+
streamingFeeNumerator?: string | null;
|
|
31
|
+
entryFeeNumerator?: string | null;
|
|
32
|
+
exitFeeNumerator?: string | null;
|
|
33
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
export interface DynamicPoolContractData {
|
|
3
|
+
userBalance: string | undefined;
|
|
4
|
+
tokenPrice: string | undefined;
|
|
5
|
+
getExitRemainingCooldown: string | undefined;
|
|
6
|
+
totalValue: string | undefined;
|
|
7
|
+
totalSupply: string | undefined;
|
|
8
|
+
isPrivateVault: boolean | undefined;
|
|
9
|
+
performanceFee: string | undefined;
|
|
10
|
+
streamingFee: string | undefined;
|
|
11
|
+
entryFee: string | undefined;
|
|
12
|
+
exitFee: string | undefined;
|
|
13
|
+
managerAddress: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
type AssetStructure = {
|
|
16
|
+
asset: Address;
|
|
17
|
+
amount: bigint;
|
|
18
|
+
};
|
|
19
|
+
export interface CalculateSwapDataParamsResponse {
|
|
20
|
+
srcData: AssetStructure[];
|
|
21
|
+
dstData: AssetStructure;
|
|
22
|
+
}
|
|
23
|
+
export interface ComplexWithdrawAssetData {
|
|
24
|
+
supportedAsset: Address;
|
|
25
|
+
withdrawData: string;
|
|
26
|
+
slippageTolerance: bigint;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './config.types';
|
|
2
|
+
export * from './contract.types';
|
|
3
|
+
export * from './pool.types';
|
|
4
|
+
export * from './referral.types';
|
|
5
|
+
export * from './state.types';
|
|
6
|
+
export * from './trading.types';
|
|
7
|
+
export * from './trading-panel.types';
|
|
8
|
+
export * from './web3.types';
|
|
9
|
+
export * from './synthetix-v3.types';
|
|
10
|
+
export * from './react-query.types';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Address } from 'core-kit/types/web3.types';
|
|
2
|
+
export interface PoolComposition {
|
|
3
|
+
tokenName: string;
|
|
4
|
+
rate: string;
|
|
5
|
+
amount: string;
|
|
6
|
+
isDeposit: boolean;
|
|
7
|
+
tokenAddress: Address;
|
|
8
|
+
precision: number;
|
|
9
|
+
asset: {
|
|
10
|
+
iconSymbols: string[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface PoolCompositionWithFraction extends PoolComposition {
|
|
14
|
+
fraction: string;
|
|
15
|
+
fractionUsd: string;
|
|
16
|
+
fractionUsdNumber: number;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TagInvestorByReferrerCallbackVariables {
|
|
2
|
+
poolAddress: string;
|
|
3
|
+
referrerAddress: string;
|
|
4
|
+
investorAddress: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UseReferralProgramProps {
|
|
7
|
+
vaultAddress: string;
|
|
8
|
+
userAddress?: string | null;
|
|
9
|
+
query: Record<string, string | string[] | undefined>;
|
|
10
|
+
logEvent?: () => void;
|
|
11
|
+
tagInvestorByReferrer: (data: TagInvestorByReferrerCallbackVariables) => Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { EstimationError } from 'core-kit/models';
|
|
2
|
+
import type { PoolConfig, PoolFallbackData } from 'core-kit/types/config.types';
|
|
3
|
+
import type { DynamicTradingToken, PendingTransaction, TokenSelectorPayload, TradingModalStatus, TradingPanelType, TradingToken, TransactionAction, UpdateTransactionsArguments } from 'core-kit/types/trading-panel.types';
|
|
4
|
+
import type { SwapDataRequest, SwapDataResponse } from 'core-kit/types/trading.types';
|
|
5
|
+
import type { Address, ChainId, SimulateTransactionParams, SimulateTransactionResponse, WaitForTransactionReceiptReturnType } from 'core-kit/types/web3.types';
|
|
6
|
+
export interface TradingPanelStateModal {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
status: TradingModalStatus;
|
|
9
|
+
action?: TransactionAction;
|
|
10
|
+
link?: string;
|
|
11
|
+
sendTokens: TradingToken[] | null;
|
|
12
|
+
receiveTokens: TradingToken[] | null;
|
|
13
|
+
meta?: {
|
|
14
|
+
withdrawPercentage?: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface TradingPanelState {
|
|
18
|
+
settings: {
|
|
19
|
+
slippage: number | 'auto';
|
|
20
|
+
minSlippage?: number;
|
|
21
|
+
isInfiniteAllowance: boolean;
|
|
22
|
+
isMultiAssetWithdrawalEnabled: boolean;
|
|
23
|
+
isMaxSlippageLoading: boolean;
|
|
24
|
+
};
|
|
25
|
+
type: TradingPanelType;
|
|
26
|
+
input: {
|
|
27
|
+
sendToken: DynamicTradingToken;
|
|
28
|
+
receiveToken: DynamicTradingToken;
|
|
29
|
+
};
|
|
30
|
+
modal: TradingPanelStateModal;
|
|
31
|
+
poolAddress: PoolConfig['address'];
|
|
32
|
+
poolConfigMap: Record<PoolConfig['address'], PoolConfig>;
|
|
33
|
+
transactions: PendingTransaction[];
|
|
34
|
+
poolFallbackData: PoolFallbackData;
|
|
35
|
+
defaultChainId?: ChainId;
|
|
36
|
+
}
|
|
37
|
+
export interface TradingPanelSetters {
|
|
38
|
+
setPoolAddress: (payload: TradingPanelState['poolAddress']) => void;
|
|
39
|
+
updateSendTokenInput: (payload: Partial<DynamicTradingToken>) => void;
|
|
40
|
+
updateReceiveTokenInput: (payload: Partial<DynamicTradingToken>) => void;
|
|
41
|
+
updateTradingSettings: (payload: Partial<TradingPanelState['settings']>) => void;
|
|
42
|
+
setTradingType: (payload: TradingPanelState['type']) => void;
|
|
43
|
+
updateTradingModal: (payload: Partial<TradingPanelState['modal']>) => void;
|
|
44
|
+
updateTransactions: (payload: UpdateTransactionsArguments) => void;
|
|
45
|
+
updatePoolFallbackData: (payload: PoolFallbackData) => void;
|
|
46
|
+
updatePoolConfig: (payload: Record<PoolConfig['address'], Pick<PoolConfig, 'maintenance' | 'maintenanceDeposits' | 'maintenanceWithdrawals'>>) => void;
|
|
47
|
+
}
|
|
48
|
+
export interface CallbackConfig {
|
|
49
|
+
onSetPoolAddress: TradingPanelSetters['setPoolAddress'];
|
|
50
|
+
onUpdateSendTokenInput: TradingPanelSetters['updateSendTokenInput'];
|
|
51
|
+
onUpdateReceiveTokenInput: TradingPanelSetters['updateReceiveTokenInput'];
|
|
52
|
+
onUpdateTradingSettings: TradingPanelSetters['updateTradingSettings'];
|
|
53
|
+
onSetTradingType: TradingPanelSetters['setTradingType'];
|
|
54
|
+
onUpdateTradingModal: TradingPanelSetters['updateTradingModal'];
|
|
55
|
+
onUpdateTransactions: TradingPanelSetters['updateTransactions'];
|
|
56
|
+
onTradingSettleError: (error: Error) => void;
|
|
57
|
+
onTransactionError: (error: Error, action: TransactionAction | undefined, chainId?: ChainId, txHash?: Address) => void;
|
|
58
|
+
onTransactionSuccess: (data: WaitForTransactionReceiptReturnType, action: TransactionAction | undefined, link?: string) => void;
|
|
59
|
+
onTransactionEstimationError: (error: EstimationError, address: Address, chainId: ChainId, account?: Address) => void;
|
|
60
|
+
onTokenSelector: (payload: TokenSelectorPayload) => void;
|
|
61
|
+
onLog: (eventName: string, payload?: Record<string, unknown>) => void;
|
|
62
|
+
onSimulateTransaction: (params: SimulateTransactionParams) => Promise<SimulateTransactionResponse | null>;
|
|
63
|
+
getSwapData: (args: {
|
|
64
|
+
signal: AbortSignal;
|
|
65
|
+
variables: SwapDataRequest;
|
|
66
|
+
}) => Promise<SwapDataResponse | null>;
|
|
67
|
+
}
|
|
68
|
+
export type TradingPanelAction = {
|
|
69
|
+
type: 'SET_POOL_ADDRESS';
|
|
70
|
+
payload: TradingPanelState['poolAddress'];
|
|
71
|
+
} | {
|
|
72
|
+
type: 'SET_TRADING_TYPE';
|
|
73
|
+
payload: TradingPanelState['type'];
|
|
74
|
+
} | {
|
|
75
|
+
type: 'UPDATE_SEND_TOKEN_INPUT';
|
|
76
|
+
payload: Partial<DynamicTradingToken>;
|
|
77
|
+
} | {
|
|
78
|
+
type: 'UPDATE_RECEIVE_TOKEN_INPUT';
|
|
79
|
+
payload: Partial<DynamicTradingToken>;
|
|
80
|
+
} | {
|
|
81
|
+
type: 'UPDATE_TRADING_SETTINGS';
|
|
82
|
+
payload: Partial<TradingPanelState['settings']>;
|
|
83
|
+
} | {
|
|
84
|
+
type: 'UPDATE_TRADING_MODAL';
|
|
85
|
+
payload: Partial<TradingPanelState['modal']>;
|
|
86
|
+
} | {
|
|
87
|
+
type: 'UPDATE_TRADING_TRANSACTIONS';
|
|
88
|
+
payload: UpdateTransactionsArguments;
|
|
89
|
+
} | {
|
|
90
|
+
type: 'UPDATE_POOL_FALLBACK_DATA';
|
|
91
|
+
payload: PoolFallbackData;
|
|
92
|
+
} | {
|
|
93
|
+
type: 'UPDATE_POOL_CONFIG';
|
|
94
|
+
payload: Record<PoolConfig['address'], Pick<PoolConfig, 'maintenance' | 'maintenanceDeposits' | 'maintenanceWithdrawals'>>;
|
|
95
|
+
};
|
|
96
|
+
export interface TradingPanelContextConfig {
|
|
97
|
+
actions: Partial<CallbackConfig> & Pick<CallbackConfig, 'getSwapData'>;
|
|
98
|
+
initialState?: Partial<TradingPanelState>;
|
|
99
|
+
}
|
|
100
|
+
export type TradingPanelActionsState = TradingPanelSetters & {
|
|
101
|
+
onTradingSettleError: CallbackConfig['onTradingSettleError'] | undefined;
|
|
102
|
+
onTransactionError: CallbackConfig['onTransactionError'] | undefined;
|
|
103
|
+
onTransactionSuccess: CallbackConfig['onTransactionSuccess'] | undefined;
|
|
104
|
+
onTransactionEstimationError: CallbackConfig['onTransactionEstimationError'] | undefined;
|
|
105
|
+
onTokenSelector: CallbackConfig['onTokenSelector'] | undefined;
|
|
106
|
+
onLog: CallbackConfig['onLog'] | undefined;
|
|
107
|
+
onSimulateTransaction: CallbackConfig['onSimulateTransaction'] | undefined;
|
|
108
|
+
getSwapData: CallbackConfig['getSwapData'];
|
|
109
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Address, Hex, PublicClient, TransactionRequest } from 'core-kit/types/web3.types';
|
|
2
|
+
export interface OracleAdapter {
|
|
3
|
+
getOracleId: () => string;
|
|
4
|
+
fetchOffchainData: (client: PublicClient | undefined, oracleContract: Address, oracleQuery: Array<{
|
|
5
|
+
query: Hex;
|
|
6
|
+
fee: bigint;
|
|
7
|
+
}> | undefined) => Promise<Array<{
|
|
8
|
+
arg: Hex;
|
|
9
|
+
fee?: bigint;
|
|
10
|
+
}>>;
|
|
11
|
+
}
|
|
12
|
+
export interface Batcher {
|
|
13
|
+
batchable: (client: PublicClient, transactions: TransactionRequest[]) => Promise<boolean>;
|
|
14
|
+
batch: (transactions: TransactionRequest[]) => TransactionRequest;
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Address, ChainId } from 'core-kit/types/web3.types';
|
|
2
|
+
export interface TradingToken {
|
|
3
|
+
address: Address;
|
|
4
|
+
symbol: string;
|
|
5
|
+
value: string;
|
|
6
|
+
decimals: number;
|
|
7
|
+
}
|
|
8
|
+
export interface DynamicTradingToken extends TradingToken {
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type TradingModalStatus = 'Success' | 'None' | 'Mining' | 'Wallet';
|
|
12
|
+
export interface PendingTransaction {
|
|
13
|
+
action: TransactionAction;
|
|
14
|
+
symbol: string;
|
|
15
|
+
chainId: ChainId;
|
|
16
|
+
txHash?: Address;
|
|
17
|
+
}
|
|
18
|
+
type AddTransaction = {
|
|
19
|
+
type: 'add';
|
|
20
|
+
} & PendingTransaction;
|
|
21
|
+
type UpdateTransaction = {
|
|
22
|
+
type: 'update';
|
|
23
|
+
} & Partial<PendingTransaction>;
|
|
24
|
+
type RemoveTransaction = {
|
|
25
|
+
type: 'remove';
|
|
26
|
+
status: 'success' | 'fail';
|
|
27
|
+
} & Partial<PendingTransaction>;
|
|
28
|
+
export type UpdateTransactionsArguments = AddTransaction | UpdateTransaction | RemoveTransaction;
|
|
29
|
+
export type TradingPanelType = 'deposit' | 'withdraw';
|
|
30
|
+
export type TransactionAction = 'deposit' | 'multi_withdraw' | 'single_withdraw' | 'approve' | 'oraclesUpdate' | 'swap' | 'claim' | 'single_withdraw_and_claim';
|
|
31
|
+
export type SwapEntity = 'token' | 'pool';
|
|
32
|
+
export interface TokenSelectorPayload {
|
|
33
|
+
isOpen: boolean;
|
|
34
|
+
entity: SwapEntity;
|
|
35
|
+
}
|
|
36
|
+
export type ApyCurrency = 'USD' | 'ETH';
|
|
37
|
+
export interface UseProjectedEarningsResult {
|
|
38
|
+
dailyEarnings: string | null;
|
|
39
|
+
monthlyEarnings: string | null;
|
|
40
|
+
yearlyEarnings: string | null;
|
|
41
|
+
showEarnings: boolean;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Hex } from 'viem';
|
|
2
|
+
import type { Address, ChainId } from 'core-kit/types/web3.types';
|
|
3
|
+
export type NativeTokenSymbol = 'ETH' | 'POL';
|
|
4
|
+
export type ChainNativeTokenMap = {
|
|
5
|
+
[key in ChainId]?: {
|
|
6
|
+
nativeTokenSymbol: NativeTokenSymbol;
|
|
7
|
+
wrappedNativeTokenName: string;
|
|
8
|
+
address: Address;
|
|
9
|
+
decimals: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export interface SwapDataResponse {
|
|
13
|
+
destinationAmount: string;
|
|
14
|
+
rawTransaction: {
|
|
15
|
+
data: Hex;
|
|
16
|
+
};
|
|
17
|
+
routerKey: 'ONE_INCH' | 'ZERO_X' | 'PARASWAP' | 'ONE_INCH_V5' | 'PARASWAP_V6' | 'ODOS_V2';
|
|
18
|
+
}
|
|
19
|
+
export interface SwapDataRequest {
|
|
20
|
+
chainId: number;
|
|
21
|
+
sourceAddress: Address;
|
|
22
|
+
destinationAddress: Address;
|
|
23
|
+
walletAddress: Address;
|
|
24
|
+
fromAddress: Address;
|
|
25
|
+
amount: string;
|
|
26
|
+
slippage: string;
|
|
27
|
+
}
|
|
28
|
+
export interface VaultDepositParams {
|
|
29
|
+
depositMethod: DepositMethodName;
|
|
30
|
+
vaultDepositTokenAddress: Address;
|
|
31
|
+
}
|
|
32
|
+
export type DepositMethodName = 'deposit' | 'depositWithCustomCooldown' | 'nativeDeposit' | 'nativeDepositWithCustomCooldown' | 'zapNativeDeposit' | 'zapNativeDepositWithCustomCooldown' | 'zapDeposit' | 'zapDepositWithCustomCooldown';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Address, Chain, TransactionRequest as ViemTransactionRequest } from 'viem';
|
|
2
|
+
export type { UseWriteContractParameters, UseReadContractsParameters, } from 'wagmi';
|
|
3
|
+
export type { Hex, PublicClient, WalletClient, Client, WaitForTransactionReceiptReturnType, CallExecutionError, MulticallReturnType, Hash, ContractFunctionReturnType, } from 'viem';
|
|
4
|
+
export type { Address, Chain };
|
|
5
|
+
export type ChainId = Chain['id'];
|
|
6
|
+
export type TransactionRequest = Pick<ViemTransactionRequest, 'to' | 'data' | 'value' | 'from'>;
|
|
7
|
+
export type ContractActionFunc = () => Promise<void | unknown>;
|
|
8
|
+
export interface EstimatedGas {
|
|
9
|
+
value: bigint;
|
|
10
|
+
error: string;
|
|
11
|
+
}
|
|
12
|
+
export type EstimateCall = (...args: unknown[]) => Promise<EstimatedGas>;
|
|
13
|
+
export interface SimulateTransactionParams {
|
|
14
|
+
chainId: ChainId;
|
|
15
|
+
from: Address;
|
|
16
|
+
to: Address;
|
|
17
|
+
input: string;
|
|
18
|
+
gas: number;
|
|
19
|
+
value?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface SimulateTransactionResponse {
|
|
22
|
+
link?: string;
|
|
23
|
+
simulation: {
|
|
24
|
+
status: boolean;
|
|
25
|
+
error_message: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface PoolContractCallParams {
|
|
29
|
+
address: Address;
|
|
30
|
+
chainId: ChainId;
|
|
31
|
+
}
|
|
32
|
+
export interface PoolContractAccountCallParams extends PoolContractCallParams {
|
|
33
|
+
account: Address;
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type ErrorWithMessage = {
|
|
2
|
+
message: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const isErrorWithMessage: (error: unknown) => error is ErrorWithMessage;
|
|
5
|
+
export declare const toErrorWithMessage: (maybeError: unknown) => ErrorWithMessage;
|
|
6
|
+
export declare const getErrorMessage: (error: unknown) => string;
|
|
7
|
+
export declare const validateLoggerEventParams: (paramsMap: Record<string, {
|
|
8
|
+
type: 'string' | 'number';
|
|
9
|
+
}>) => boolean;
|
|
10
|
+
export declare const parseContractErrorMessage: ({ errorMessage, abiErrors, }: {
|
|
11
|
+
errorMessage: string | undefined | null;
|
|
12
|
+
abiErrors: string[];
|
|
13
|
+
}) => {
|
|
14
|
+
title: string;
|
|
15
|
+
hint?: string | undefined;
|
|
16
|
+
} | null;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
export declare const isFmpAirdropVaultAddress: (address: Address) => boolean;
|
|
3
|
+
export declare const isFlatMoneyLeveragedAsset: (address: Address) => boolean;
|
|
4
|
+
export declare const getFlatMoneyCollateralByLeverageAddress: (address: string) => {
|
|
5
|
+
symbol: string;
|
|
6
|
+
decimals: number;
|
|
7
|
+
address: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const getFlatMoneyLinkByUnitAddress: (address: string) => "https://flat.money/flatcoin" | "https://v1.flat.money/flatcoin";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ApyCurrency } from 'core-kit/types';
|
|
2
|
+
export declare const formatPercentage: (value: number, maximumFractionDigits?: number) => string;
|
|
3
|
+
export declare const formatToUsd: ({ value, minimumFractionDigits, maximumFractionDigits, compact, normalize, }: {
|
|
4
|
+
value: number | string;
|
|
5
|
+
minimumFractionDigits?: number | undefined;
|
|
6
|
+
maximumFractionDigits?: number | undefined;
|
|
7
|
+
compact?: boolean | undefined;
|
|
8
|
+
normalize?: boolean | undefined;
|
|
9
|
+
}) => string;
|
|
10
|
+
export declare const formatNumeratorToPercentage: (numerator: number | string, denominator: number, maximumFractionDigits?: number) => string;
|
|
11
|
+
export declare const removeInsignificantTrailingZeros: (value: string) => string;
|
|
12
|
+
export declare const formatNumberToLimitedDecimals: (value: number | string, decimals: number) => string;
|
|
13
|
+
export declare const formatByCurrency: ({ currency, value, }: {
|
|
14
|
+
currency: ApyCurrency;
|
|
15
|
+
value: number;
|
|
16
|
+
}) => string;
|
|
17
|
+
export declare const formatBalance: (value: string, precision: number) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './common';
|
|
2
|
+
export * from './url';
|
|
3
|
+
export * from './web3';
|
|
4
|
+
export * from './number';
|
|
5
|
+
export * from './transaction';
|
|
6
|
+
export * from './token';
|
|
7
|
+
export * from './error';
|
|
8
|
+
export * from './formatter';
|
|
9
|
+
export * from './synthetix';
|
|
10
|
+
export * from './ua';
|
|
11
|
+
export * from './flat-money';
|
|
12
|
+
export * from './logger';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TradingPanelActionsState, TransactionAction } from 'core-kit/types';
|
|
2
|
+
import type { Address } from 'core-kit/types/web3.types';
|
|
3
|
+
/**
|
|
4
|
+
* Transforms an Ethereum address to ensure it's treated as a string in Firebase Analytics.
|
|
5
|
+
* Adds a prefix to avoid scientific notation or numeric interpretation.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} ethereumAddress - The Ethereum address to transform.
|
|
8
|
+
* @returns {string} - The transformed Ethereum address.
|
|
9
|
+
*/
|
|
10
|
+
export declare const transformAddressForAnalytics: (ethereumAddress: Address) => string;
|
|
11
|
+
export declare const logTransactionByActionType: ({ action, log, symbol, vaultAddress, chainId, }: {
|
|
12
|
+
action: TransactionAction;
|
|
13
|
+
symbol: string;
|
|
14
|
+
log: TradingPanelActionsState['onLog'];
|
|
15
|
+
chainId: number;
|
|
16
|
+
vaultAddress: Address;
|
|
17
|
+
}) => void;
|