router-widget-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +180 -0
- package/dist/components/AggregateCallTypeSelector.d.ts +8 -0
- package/dist/components/AggregateCallTypeSelector.d.ts.map +1 -0
- package/dist/components/AppKitProvider.d.ts +5 -0
- package/dist/components/AppKitProvider.d.ts.map +1 -0
- package/dist/components/AppProviders.d.ts +29 -0
- package/dist/components/AppProviders.d.ts.map +1 -0
- package/dist/components/CapsuleControls.d.ts +16 -0
- package/dist/components/CapsuleControls.d.ts.map +1 -0
- package/dist/components/GetTokenPrice.d.ts +20 -0
- package/dist/components/GetTokenPrice.d.ts.map +1 -0
- package/dist/components/Image.d.ts +21 -0
- package/dist/components/Image.d.ts.map +1 -0
- package/dist/components/NodeMultiSelect.d.ts +10 -0
- package/dist/components/NodeMultiSelect.d.ts.map +1 -0
- package/dist/components/PosthogPageView.d.ts +2 -0
- package/dist/components/PosthogPageView.d.ts.map +1 -0
- package/dist/components/PosthogProvider.d.ts +4 -0
- package/dist/components/PosthogProvider.d.ts.map +1 -0
- package/dist/components/QuoteRefreshCountdown.d.ts +10 -0
- package/dist/components/QuoteRefreshCountdown.d.ts.map +1 -0
- package/dist/components/RecipientAddressEditor.d.ts +13 -0
- package/dist/components/RecipientAddressEditor.d.ts.map +1 -0
- package/dist/components/RouterWidget.d.ts +38 -0
- package/dist/components/RouterWidget.d.ts.map +1 -0
- package/dist/components/SlippageConfigurator.d.ts +14 -0
- package/dist/components/SlippageConfigurator.d.ts.map +1 -0
- package/dist/components/SwapInterface.d.ts +123 -0
- package/dist/components/SwapInterface.d.ts.map +1 -0
- package/dist/components/SwapReviewModal/SwapReviewModal.d.ts +29 -0
- package/dist/components/SwapReviewModal/SwapReviewModal.d.ts.map +1 -0
- package/dist/components/SwapReviewModal/TokenExchangeVisualization.d.ts +13 -0
- package/dist/components/SwapReviewModal/TokenExchangeVisualization.d.ts.map +1 -0
- package/dist/components/SwapReviewModal/TransactionDetailsDropdown.d.ts +14 -0
- package/dist/components/SwapReviewModal/TransactionDetailsDropdown.d.ts.map +1 -0
- package/dist/components/SwapReviewModal/TransactionExplorer.d.ts +17 -0
- package/dist/components/SwapReviewModal/TransactionExplorer.d.ts.map +1 -0
- package/dist/components/SwapReviewModal/TransactionStepProgress.d.ts +32 -0
- package/dist/components/SwapReviewModal/TransactionStepProgress.d.ts.map +1 -0
- package/dist/components/SwapReviewModal/index.d.ts +6 -0
- package/dist/components/SwapReviewModal/index.d.ts.map +1 -0
- package/dist/components/SwapSplit.d.ts +26 -0
- package/dist/components/SwapSplit.d.ts.map +1 -0
- package/dist/components/TokenSelector.d.ts +30 -0
- package/dist/components/TokenSelector.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/ChainPill.d.ts +8 -0
- package/dist/components/TokenSelectorV2/ChainPill.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/DesktopChainPanel.d.ts +9 -0
- package/dist/components/TokenSelectorV2/DesktopChainPanel.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/DesktopView.d.ts +22 -0
- package/dist/components/TokenSelectorV2/DesktopView.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/MobileChainView.d.ts +10 -0
- package/dist/components/TokenSelectorV2/MobileChainView.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/MobileTokenView.d.ts +20 -0
- package/dist/components/TokenSelectorV2/MobileTokenView.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/TokenList.d.ts +13 -0
- package/dist/components/TokenSelectorV2/TokenList.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/TokenPill.d.ts +9 -0
- package/dist/components/TokenSelectorV2/TokenPill.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/TokenPillGroup.d.ts +7 -0
- package/dist/components/TokenSelectorV2/TokenPillGroup.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/TriggerButton.d.ts +1 -0
- package/dist/components/TokenSelectorV2/TriggerButton.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/UserTokenList.d.ts +12 -0
- package/dist/components/TokenSelectorV2/UserTokenList.d.ts.map +1 -0
- package/dist/components/TokenSelectorV2/index.d.ts +15 -0
- package/dist/components/TokenSelectorV2/index.d.ts.map +1 -0
- package/dist/components/TurnkeyHdRejectionProvider.d.ts +16 -0
- package/dist/components/TurnkeyHdRejectionProvider.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/ActivityTab.d.ts +2 -0
- package/dist/components/UnifiedWallet/ActivityTab.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/ComicWalletIcon.d.ts +10 -0
- package/dist/components/UnifiedWallet/ComicWalletIcon.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/ConnectWalletButton.d.ts +11 -0
- package/dist/components/UnifiedWallet/ConnectWalletButton.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/SidebarHeader.d.ts +6 -0
- package/dist/components/UnifiedWallet/SidebarHeader.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/TokenList.d.ts +21 -0
- package/dist/components/UnifiedWallet/TokenList.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/WalletInfo.d.ts +12 -0
- package/dist/components/UnifiedWallet/WalletInfo.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/WalletList.d.ts +12 -0
- package/dist/components/UnifiedWallet/WalletList.d.ts.map +1 -0
- package/dist/components/UnifiedWallet.d.ts +2 -0
- package/dist/components/UnifiedWallet.d.ts.map +1 -0
- package/dist/components/Web3Modal.d.ts +5 -0
- package/dist/components/Web3Modal.d.ts.map +1 -0
- package/dist/components/WidgetProvider.d.ts +29 -0
- package/dist/components/WidgetProvider.d.ts.map +1 -0
- package/dist/components/theme-provider.d.ts +3 -0
- package/dist/components/theme-provider.d.ts.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/chart.d.ts +63 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +81 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/swap-review-skeleton.d.ts +2 -0
- package/dist/components/ui/swap-review-skeleton.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/contexts/AccountContext.d.ts +5 -0
- package/dist/contexts/AccountContext.d.ts.map +1 -0
- package/dist/contexts/WalletsContext.d.ts +20 -0
- package/dist/contexts/WalletsContext.d.ts.map +1 -0
- package/dist/contexts/WidgetConfigContext.d.ts +8 -0
- package/dist/contexts/WidgetConfigContext.d.ts.map +1 -0
- package/dist/hooks/tokens/list/example-usage.d.ts +1 -0
- package/dist/hooks/tokens/list/example-usage.d.ts.map +1 -0
- package/dist/hooks/tokens/list/index.d.ts +22 -0
- package/dist/hooks/tokens/list/index.d.ts.map +1 -0
- package/dist/hooks/tokens/list/relay.d.ts +17 -0
- package/dist/hooks/tokens/list/relay.d.ts.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/useBalances.d.ts +116 -0
- package/dist/hooks/useBalances.d.ts.map +1 -0
- package/dist/hooks/useCampaigns.d.ts +34 -0
- package/dist/hooks/useCampaigns.d.ts.map +1 -0
- package/dist/hooks/useClipboard.d.ts +8 -0
- package/dist/hooks/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useCurrencies.d.ts +34 -0
- package/dist/hooks/useCurrencies.d.ts.map +1 -0
- package/dist/hooks/useDynamicWallet.d.ts +18 -0
- package/dist/hooks/useDynamicWallet.d.ts.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.d.ts +7 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useNativeAmount.d.ts +9 -0
- package/dist/hooks/useNativeAmount.d.ts.map +1 -0
- package/dist/hooks/useNetworkConfig.d.ts +32 -0
- package/dist/hooks/useNetworkConfig.d.ts.map +1 -0
- package/dist/hooks/usePlaygroundConfig.d.ts +12 -0
- package/dist/hooks/usePlaygroundConfig.d.ts.map +1 -0
- package/dist/hooks/useSwapButtonState.d.ts +23 -0
- package/dist/hooks/useSwapButtonState.d.ts.map +1 -0
- package/dist/hooks/useSwapQuote.d.ts +27 -0
- package/dist/hooks/useSwapQuote.d.ts.map +1 -0
- package/dist/hooks/useSwapUrlManager.d.ts +16 -0
- package/dist/hooks/useSwapUrlManager.d.ts.map +1 -0
- package/dist/hooks/useTokenBalances.d.ts +15 -0
- package/dist/hooks/useTokenBalances.d.ts.map +1 -0
- package/dist/hooks/useTokenSearch.d.ts +8 -0
- package/dist/hooks/useTokenSearch.d.ts.map +1 -0
- package/dist/hooks/useTransactionAnalytics.d.ts +27 -0
- package/dist/hooks/useTransactionAnalytics.d.ts.map +1 -0
- package/dist/hooks/useTransactionHistory.d.ts +42 -0
- package/dist/hooks/useTransactionHistory.d.ts.map +1 -0
- package/dist/hooks/useTransactionPolling.d.ts +22 -0
- package/dist/hooks/useTransactionPolling.d.ts.map +1 -0
- package/dist/hooks/useTransactionState.d.ts +16 -0
- package/dist/hooks/useTransactionState.d.ts.map +1 -0
- package/dist/hooks/useWalletManagement.d.ts +14 -0
- package/dist/hooks/useWalletManagement.d.ts.map +1 -0
- package/dist/hooks/useWidgetConfigFromUrl.d.ts +27 -0
- package/dist/hooks/useWidgetConfigFromUrl.d.ts.map +1 -0
- package/dist/hooks/useWidgetTheme.d.ts +22 -0
- package/dist/hooks/useWidgetTheme.d.ts.map +1 -0
- package/dist/index.cjs.js +7122 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +268016 -0
- package/dist/lib/actions/bitcoin/balance.d.ts +4 -0
- package/dist/lib/actions/bitcoin/balance.d.ts.map +1 -0
- package/dist/lib/actions/bitcoin/bitcoinApiConfig.d.ts +12 -0
- package/dist/lib/actions/bitcoin/bitcoinApiConfig.d.ts.map +1 -0
- package/dist/lib/actions/getWalletBalanceUrl.d.ts +6 -0
- package/dist/lib/actions/getWalletBalanceUrl.d.ts.map +1 -0
- package/dist/lib/actions/handleBitcoinTransactions.d.ts +17 -0
- package/dist/lib/actions/handleBitcoinTransactions.d.ts.map +1 -0
- package/dist/lib/actions/handleEvmTransactions.d.ts +37 -0
- package/dist/lib/actions/handleEvmTransactions.d.ts.map +1 -0
- package/dist/lib/actions/handleSolanaTransactions.d.ts +13 -0
- package/dist/lib/actions/handleSolanaTransactions.d.ts.map +1 -0
- package/dist/lib/actions/handleSuiTransactions.d.ts +20 -0
- package/dist/lib/actions/handleSuiTransactions.d.ts.map +1 -0
- package/dist/lib/actions/submitSwapTransaction.d.ts +29 -0
- package/dist/lib/actions/submitSwapTransaction.d.ts.map +1 -0
- package/dist/lib/adapters/chain-adapters.d.ts +100 -0
- package/dist/lib/adapters/chain-adapters.d.ts.map +1 -0
- package/dist/lib/adapters/token-adapters.d.ts +83 -0
- package/dist/lib/adapters/token-adapters.d.ts.map +1 -0
- package/dist/lib/api.d.ts +67 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/chain-pills.d.ts +8 -0
- package/dist/lib/chain-pills.d.ts.map +1 -0
- package/dist/lib/domain/swap/payload.d.ts +26 -0
- package/dist/lib/domain/swap/payload.d.ts.map +1 -0
- package/dist/lib/errorApi.d.ts +13 -0
- package/dist/lib/errorApi.d.ts.map +1 -0
- package/dist/lib/grpc-client.d.ts +48 -0
- package/dist/lib/grpc-client.d.ts.map +1 -0
- package/dist/lib/requestManager.d.ts +15 -0
- package/dist/lib/requestManager.d.ts.map +1 -0
- package/dist/lib/tokens/list.d.ts +37 -0
- package/dist/lib/tokens/list.d.ts.map +1 -0
- package/dist/lib/types/api.d.ts +55 -0
- package/dist/lib/types/api.d.ts.map +1 -0
- package/dist/lib/types/bitcoin.d.ts +159 -0
- package/dist/lib/types/bitcoin.d.ts.map +1 -0
- package/dist/lib/types/proto.d.ts +75 -0
- package/dist/lib/types/proto.d.ts.map +1 -0
- package/dist/lib/types/widget.d.ts +48 -0
- package/dist/lib/types/widget.d.ts.map +1 -0
- package/dist/lib/utils/bigint-polyfill.d.ts +8 -0
- package/dist/lib/utils/bigint-polyfill.d.ts.map +1 -0
- package/dist/lib/utils/chain-helpers.d.ts +4 -0
- package/dist/lib/utils/chain-helpers.d.ts.map +1 -0
- package/dist/lib/utils/color-converter.d.ts +38 -0
- package/dist/lib/utils/color-converter.d.ts.map +1 -0
- package/dist/lib/utils/debounce.d.ts +4 -0
- package/dist/lib/utils/debounce.d.ts.map +1 -0
- package/dist/lib/utils/formatNumber.d.ts +31 -0
- package/dist/lib/utils/formatNumber.d.ts.map +1 -0
- package/dist/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/logger.d.ts +7 -0
- package/dist/lib/utils/logger.d.ts.map +1 -0
- package/dist/lib/utils/networkHelpers.d.ts +6 -0
- package/dist/lib/utils/networkHelpers.d.ts.map +1 -0
- package/dist/lib/utils/performance.d.ts +19 -0
- package/dist/lib/utils/performance.d.ts.map +1 -0
- package/dist/lib/utils/simulateTransaction.d.ts +29 -0
- package/dist/lib/utils/simulateTransaction.d.ts.map +1 -0
- package/dist/lib/utils/validateAddress.d.ts +7 -0
- package/dist/lib/utils/validateAddress.d.ts.map +1 -0
- package/dist/lib/utils/wallet-config.d.ts +4 -0
- package/dist/lib/utils/wallet-config.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +59 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/network/config.d.ts +530 -0
- package/dist/network/config.d.ts.map +1 -0
- package/dist/network/network.client.json.d.ts +18446 -0
- package/dist/styles.css +2 -0
- package/dist/types/Node.d.ts +22 -0
- package/dist/types/Node.d.ts.map +1 -0
- package/dist/types/chain.d.ts +158 -0
- package/dist/types/chain.d.ts.map +1 -0
- package/dist/types/chains.d.ts +7 -0
- package/dist/types/chains.d.ts.map +1 -0
- package/dist/types/index.d.ts +58 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/token.d.ts +134 -0
- package/dist/types/token.d.ts.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ToastActionElement, ToastProps } from "@/components/ui/toast";
|
|
3
|
+
type ToasterToast = ToastProps & {
|
|
4
|
+
id: string;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
action?: ToastActionElement;
|
|
8
|
+
};
|
|
9
|
+
declare const actionTypes: {
|
|
10
|
+
readonly ADD_TOAST: "ADD_TOAST";
|
|
11
|
+
readonly UPDATE_TOAST: "UPDATE_TOAST";
|
|
12
|
+
readonly DISMISS_TOAST: "DISMISS_TOAST";
|
|
13
|
+
readonly REMOVE_TOAST: "REMOVE_TOAST";
|
|
14
|
+
};
|
|
15
|
+
type ActionType = typeof actionTypes;
|
|
16
|
+
type Action = {
|
|
17
|
+
type: ActionType["ADD_TOAST"];
|
|
18
|
+
toast: ToasterToast;
|
|
19
|
+
} | {
|
|
20
|
+
type: ActionType["UPDATE_TOAST"];
|
|
21
|
+
toast: Partial<ToasterToast>;
|
|
22
|
+
} | {
|
|
23
|
+
type: ActionType["DISMISS_TOAST"];
|
|
24
|
+
toastId?: ToasterToast["id"];
|
|
25
|
+
} | {
|
|
26
|
+
type: ActionType["REMOVE_TOAST"];
|
|
27
|
+
toastId?: ToasterToast["id"];
|
|
28
|
+
};
|
|
29
|
+
interface State {
|
|
30
|
+
toasts: ToasterToast[];
|
|
31
|
+
}
|
|
32
|
+
export declare const reducer: (state: State, action: Action) => State;
|
|
33
|
+
type Toast = Omit<ToasterToast, "id">;
|
|
34
|
+
declare function toast({ ...props }: Toast): {
|
|
35
|
+
id: string;
|
|
36
|
+
dismiss: () => void;
|
|
37
|
+
update: (props: ToasterToast) => void;
|
|
38
|
+
};
|
|
39
|
+
declare function useToast(): {
|
|
40
|
+
toast: typeof toast;
|
|
41
|
+
dismiss: (toastId?: string) => void;
|
|
42
|
+
toasts: ToasterToast[];
|
|
43
|
+
};
|
|
44
|
+
export { useToast, toast };
|
|
45
|
+
//# sourceMappingURL=use-toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAK5E,KAAK,YAAY,GAAG,UAAU,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,WAAW;;;;;CAKP,CAAC;AASX,KAAK,UAAU,GAAG,OAAO,WAAW,CAAC;AAErC,KAAK,MAAM,GACP;IACE,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAC9B,KAAK,EAAE,YAAY,CAAC;CACrB,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEN,UAAU,KAAK;IACb,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAoBD,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,KAAG,KAmDtD,CAAC;AAaF,KAAK,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAEtC,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK;;;oBAGT,YAAY;EAwBpC;AAED,iBAAS,QAAQ;;wBAgBO,MAAM;YApIpB,YAAY,EAAE;EAsIvB;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
export interface DuneBalance {
|
|
3
|
+
chain?: string;
|
|
4
|
+
chain_id?: number;
|
|
5
|
+
address: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
balance?: string;
|
|
8
|
+
value_usd?: number;
|
|
9
|
+
symbol: string;
|
|
10
|
+
name: string;
|
|
11
|
+
decimals: number;
|
|
12
|
+
logo?: string;
|
|
13
|
+
price_usd?: number;
|
|
14
|
+
liquidity?: any;
|
|
15
|
+
low_liquidity?: boolean;
|
|
16
|
+
pool_size?: number;
|
|
17
|
+
token_metadata?: {
|
|
18
|
+
logo?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface EvmBalancesResponse {
|
|
22
|
+
wallet_address: string;
|
|
23
|
+
balances: DuneBalance[];
|
|
24
|
+
type: string;
|
|
25
|
+
chainType: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
api_version: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SvmBalancesResponse {
|
|
30
|
+
processing_time_ms: number;
|
|
31
|
+
wallet_address: string;
|
|
32
|
+
next_offset?: string;
|
|
33
|
+
balances_count: number;
|
|
34
|
+
balances: DuneBalance[];
|
|
35
|
+
type: string;
|
|
36
|
+
chainType: string;
|
|
37
|
+
timestamp: string;
|
|
38
|
+
api_version: string;
|
|
39
|
+
}
|
|
40
|
+
export type BalancesResponse = EvmBalancesResponse | SvmBalancesResponse;
|
|
41
|
+
export interface BatchBalancesResponse {
|
|
42
|
+
type: string;
|
|
43
|
+
chainType: string;
|
|
44
|
+
timestamp: string;
|
|
45
|
+
api_version: string;
|
|
46
|
+
results: Array<{
|
|
47
|
+
address: string;
|
|
48
|
+
status: 'fulfilled' | 'rejected';
|
|
49
|
+
data: EvmBalancesResponse | SvmBalancesResponse | null;
|
|
50
|
+
error: string | null;
|
|
51
|
+
}>;
|
|
52
|
+
total_addresses: number;
|
|
53
|
+
successful_addresses: number;
|
|
54
|
+
}
|
|
55
|
+
export interface UseBalancesParams {
|
|
56
|
+
address?: string | null;
|
|
57
|
+
type?: 'evm' | 'svm' | 'sol';
|
|
58
|
+
chainType?: string;
|
|
59
|
+
chain_ids?: string;
|
|
60
|
+
filters?: 'erc20' | 'native';
|
|
61
|
+
metadata?: string;
|
|
62
|
+
historical_prices?: string;
|
|
63
|
+
offset?: string;
|
|
64
|
+
limit?: string;
|
|
65
|
+
chains?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface UseBatchBalancesParams {
|
|
68
|
+
addresses?: string[];
|
|
69
|
+
type?: 'evm' | 'svm' | 'sol';
|
|
70
|
+
chainType?: string;
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}
|
|
73
|
+
export declare const advancedTokenFilter: (tokens: DuneBalance[], options: {
|
|
74
|
+
minLiquidity: number;
|
|
75
|
+
requireCompleteName: boolean;
|
|
76
|
+
minPriceUsd: number;
|
|
77
|
+
allowLowLiquidity: boolean;
|
|
78
|
+
}) => DuneBalance[];
|
|
79
|
+
/**
|
|
80
|
+
* Hook to fetch balances for a single wallet address using the Dune SIM API v2
|
|
81
|
+
*
|
|
82
|
+
* @param params - Parameters for the balances query
|
|
83
|
+
* @param options - TanStack Query options
|
|
84
|
+
* @returns TanStack Query result with balances data
|
|
85
|
+
*/
|
|
86
|
+
export declare function useBalances(params: UseBalancesParams, options?: Omit<UseQueryOptions<BalancesResponse, Error>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<BalancesResponse, Error>;
|
|
87
|
+
/**
|
|
88
|
+
* Hook to fetch balances for multiple wallet addresses using the Dune SIM API v2
|
|
89
|
+
*
|
|
90
|
+
* @param params - Parameters for the batch balances query
|
|
91
|
+
* @param options - TanStack Query options
|
|
92
|
+
* @returns TanStack Query result with batch balances data
|
|
93
|
+
*/
|
|
94
|
+
export declare function useBatchBalances(params: UseBatchBalancesParams, options?: Omit<UseQueryOptions<BatchBalancesResponse, Error>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<BatchBalancesResponse, Error>;
|
|
95
|
+
/**
|
|
96
|
+
* Hook for EVM balances with sensible defaults
|
|
97
|
+
*/
|
|
98
|
+
export declare function useEvmBalances(address: string | null | undefined, options?: {
|
|
99
|
+
chain_ids?: string;
|
|
100
|
+
filters?: 'erc20' | 'native';
|
|
101
|
+
metadata?: string;
|
|
102
|
+
limit?: string;
|
|
103
|
+
} & Omit<UseQueryOptions<BalancesResponse, Error>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<BalancesResponse, Error>;
|
|
104
|
+
/**
|
|
105
|
+
* Hook for SVM (Solana) balances with sensible defaults
|
|
106
|
+
*/
|
|
107
|
+
export declare function useSvmBalances(address: string | null | undefined, options?: {
|
|
108
|
+
chains?: string;
|
|
109
|
+
limit?: string;
|
|
110
|
+
} & Omit<UseQueryOptions<BalancesResponse, Error>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<BalancesResponse, Error>;
|
|
111
|
+
export declare function useTokenBalancesV2(params: {
|
|
112
|
+
address: string | null | undefined;
|
|
113
|
+
chainId?: string;
|
|
114
|
+
chainType?: string;
|
|
115
|
+
}): import("@tanstack/react-query").UseQueryResult<BalancesResponse, Error>;
|
|
116
|
+
//# sourceMappingURL=useBalances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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AG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2EAeA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface Campaign {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
subheading: string;
|
|
6
|
+
rewardAmount: string;
|
|
7
|
+
rewardToken: string;
|
|
8
|
+
eodTimestamp: number;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
requirements?: string[];
|
|
13
|
+
participants?: number;
|
|
14
|
+
maxParticipants?: number;
|
|
15
|
+
link: string;
|
|
16
|
+
}
|
|
17
|
+
export interface TimeRemaining {
|
|
18
|
+
days: number;
|
|
19
|
+
hours: number;
|
|
20
|
+
minutes: number;
|
|
21
|
+
seconds: number;
|
|
22
|
+
isExpired: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function useCampaigns(): {
|
|
25
|
+
campaigns: Campaign[];
|
|
26
|
+
loading: boolean;
|
|
27
|
+
error: string | null;
|
|
28
|
+
getTimeRemaining: (eodTimestamp: number) => TimeRemaining;
|
|
29
|
+
isCampaignExpired: (campaign: Campaign) => boolean;
|
|
30
|
+
getFilteredCampaigns: (type: "ongoing" | "completed") => Campaign[];
|
|
31
|
+
formatEndDate: (eodTimestamp: number, isExpired?: boolean) => string;
|
|
32
|
+
fetchCampaigns: () => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=useCampaigns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCampaigns.d.ts","sourceRoot":"","sources":["../../src/hooks/useCampaigns.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,YAAY;;;;qCAM0B,MAAM,KAAG,aAAa;kCAiBzB,QAAQ,KAAG,OAAO;iCAMnB,SAAS,GAAG,WAAW,KAAG,QAAQ,EAAE;kCAkCnC,MAAM,cAAa,OAAO,KAAW,MAAM;;EA8C7F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function useClipboard(): {
|
|
2
|
+
copiedSender: boolean;
|
|
3
|
+
copiedRecipient: boolean;
|
|
4
|
+
copiedError: boolean;
|
|
5
|
+
copyToClipboard: (text: string, type: "sender" | "recipient" | "error") => void;
|
|
6
|
+
resetClipboard: () => void;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useClipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../src/hooks/useClipboard.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY;;;;4BAKiB,MAAM,QAAQ,QAAQ,GAAG,WAAW,GAAG,OAAO;;EA4B1F"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
export interface CurrenciesRequest {
|
|
3
|
+
defaultList?: boolean;
|
|
4
|
+
chainIds?: number[];
|
|
5
|
+
term?: string;
|
|
6
|
+
address?: string;
|
|
7
|
+
currencyId?: string;
|
|
8
|
+
tokens?: string[];
|
|
9
|
+
verified?: boolean;
|
|
10
|
+
limit?: number;
|
|
11
|
+
includeAllChains?: boolean;
|
|
12
|
+
useExternalSearch?: boolean;
|
|
13
|
+
depositAddressOnly?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface CurrencyMetadata {
|
|
16
|
+
logoURI?: string;
|
|
17
|
+
verified?: boolean;
|
|
18
|
+
isNative?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface Currency {
|
|
21
|
+
chainId: number;
|
|
22
|
+
address: string;
|
|
23
|
+
symbol: string;
|
|
24
|
+
name: string;
|
|
25
|
+
decimals: number;
|
|
26
|
+
vmType: string;
|
|
27
|
+
metadata: CurrencyMetadata;
|
|
28
|
+
}
|
|
29
|
+
export declare const TOKEN_LIMIT: string | number;
|
|
30
|
+
export declare const useCurrencies: (params: CurrenciesRequest, id: string, options?: Omit<UseQueryOptions<Currency[], Error>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<Currency[], Error>;
|
|
31
|
+
export declare const useSearchCurrencies: (term: string, id: string, chainIds?: number[], options?: Omit<UseQueryOptions<Currency[], Error>, "queryKey" | "queryFn">) => import("@tanstack/react-query").UseQueryResult<Currency[], Error>;
|
|
32
|
+
export declare const useDefaultCurrencies: (chainIds?: number[], options?: Omit<UseQueryOptions<Currency[], Error>, "queryKey" | "queryFn">, id?: string) => import("@tanstack/react-query").UseQueryResult<Currency[], Error>;
|
|
33
|
+
export declare const useCurrencyByAddress: (address: string, chainId?: number, options?: Omit<UseQueryOptions<Currency[], Error>, "queryKey" | "queryFn">, id?: string) => import("@tanstack/react-query").UseQueryResult<Currency[], Error>;
|
|
34
|
+
//# sourceMappingURL=useCurrencies.d.ts.map
|
|
@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AAmB,GAC9B,MAAM,MAAM,EACZ,IAAI,MAAM,EACV,WAAW,MAAM,EAAE,EACnB,UAAU,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,sEAgB3E,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EAAE,EACnB,UAAU,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,EAC1E,KAAG,MAAgB,sEAYpB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,UAAU,MAAM,EAChB,UAAU,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,EAC1E,KAAI,MAAkB,sEAcvB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Wallet } from "@dynamic-labs/sdk-react-core";
|
|
2
|
+
interface UseDynamicWalletReturn {
|
|
3
|
+
primaryWallet: Wallet | null | undefined;
|
|
4
|
+
userWallets: readonly Wallet[] | undefined;
|
|
5
|
+
isConnected: boolean;
|
|
6
|
+
walletAddress: string;
|
|
7
|
+
handleLogOut: (() => Promise<void>) | (() => void);
|
|
8
|
+
setShowAuthFlow: ((show: boolean) => void) | undefined;
|
|
9
|
+
switchWallet: ((walletId: string) => Promise<void>) | (() => void) | undefined;
|
|
10
|
+
handleUnlinkWallet: ((walletId: string) => Promise<void>) | (() => void);
|
|
11
|
+
setShowLinkNewWalletModal: ((show: boolean) => void) | undefined;
|
|
12
|
+
connectWallet: () => void;
|
|
13
|
+
getSuitableWalletForChain: (chainType: string) => Wallet | undefined;
|
|
14
|
+
getFilteredWallets: () => Wallet[];
|
|
15
|
+
}
|
|
16
|
+
export declare function useDynamicWallet(): UseDynamicWalletReturn;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useDynamicWallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDynamicWallet.d.ts","sourceRoot":"","sources":["../../src/hooks/useDynamicWallet.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,8BAA8B,CAAC;AAGtC,UAAU,sBAAsB;IAE9B,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IAGtB,YAAY,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IACnD,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAGvD,YAAY,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC/E,kBAAkB,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAGzE,yBAAyB,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAGjE,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,yBAAyB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACrE,kBAAkB,EAAE,MAAM,MAAM,EAAE,CAAC;CACpC;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CAmEzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AAEnD,eAAO,MAAM,yBAAyB,kBAA8D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type UseMediaQueryOptions = {
|
|
2
|
+
defaultValue?: boolean;
|
|
3
|
+
initializeWithValue?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function useMediaQuery(query: string, { defaultValue, initializeWithValue }?: UseMediaQueryOptions): boolean;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.ts"],"names":[],"mappings":"AAGA,KAAK,oBAAoB,GAAG;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAIF,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,EAAE,YAAoB,EAAE,mBAA0B,EAAE,GAAE,oBAAyB,GAC9E,OAAO,CA2CT"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Chain } from "@/types";
|
|
2
|
+
interface UseNativeAmountProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
finalResponse: any;
|
|
5
|
+
fromChain: Chain;
|
|
6
|
+
}
|
|
7
|
+
export declare function useNativeAmount({ isOpen, finalResponse, fromChain }: UseNativeAmountProps): string | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useNativeAmount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNativeAmount.d.ts","sourceRoot":"","sources":["../../src/hooks/useNativeAmount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,UAAU,oBAAoB;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,SAAS,EAAE,KAAK,CAAC;CAClB;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,oBAAoB,iBAmCzF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for optimized network configuration access
|
|
3
|
+
* Provides memoized network data to prevent unnecessary recalculations
|
|
4
|
+
* @param context - Optional context ('source' | 'destination') to filter networks
|
|
5
|
+
*/
|
|
6
|
+
export declare function useNetworkConfig(context?: 'source' | 'destination'): {
|
|
7
|
+
networks: any[];
|
|
8
|
+
evmChains: any[];
|
|
9
|
+
solanaChains: any[];
|
|
10
|
+
bitcoinChains: any[];
|
|
11
|
+
supportedNetworkConfigs: any[];
|
|
12
|
+
supportedChainIds: string[];
|
|
13
|
+
getNetworkConfig: (chainId: string) => any;
|
|
14
|
+
getChainConfig: (chainId: string) => ReturnType<typeof import("viem").defineChain>;
|
|
15
|
+
isChainSupported: (chainId: string) => boolean;
|
|
16
|
+
chainConfigs: Record<string, any[]>;
|
|
17
|
+
findNetworkByChainId: (chainId: string) => any;
|
|
18
|
+
findChainByChainId: (chainId: string) => any;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Hook for getting networks by specific type
|
|
22
|
+
*/
|
|
23
|
+
export declare function useNetworksByType(chainType: string): any[];
|
|
24
|
+
/**
|
|
25
|
+
* Hook for getting a specific network configuration
|
|
26
|
+
*/
|
|
27
|
+
export declare function useNetworkConfigById(chainId: string): any;
|
|
28
|
+
/**
|
|
29
|
+
* Hook for getting a specific chain configuration
|
|
30
|
+
*/
|
|
31
|
+
export declare function useChainConfigById(chainId: string): any;
|
|
32
|
+
//# sourceMappingURL=useNetworkConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNetworkConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useNetworkConfig.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,aAAa;;;;;;;;;;;oCAwC/B,MAAM;kCACR,MAAM;EAEvC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,SAElD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,OAEnD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,OAEjD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WidgetConfig } from "@/lib/types/widget";
|
|
2
|
+
export declare function usePlaygroundConfig(): {
|
|
3
|
+
config: WidgetConfig;
|
|
4
|
+
configJson: string;
|
|
5
|
+
updateConfig: <K extends keyof WidgetConfig>(key: K, value: WidgetConfig[K]) => void;
|
|
6
|
+
updateTheme: (key: keyof NonNullable<WidgetConfig["theme"]>, value: string | undefined) => void;
|
|
7
|
+
updateFeatures: (key: keyof NonNullable<WidgetConfig["features"]>, value: boolean | undefined) => void;
|
|
8
|
+
updateInitialState: (key: keyof NonNullable<WidgetConfig["initialState"]>, value: string | undefined) => void;
|
|
9
|
+
updateSelectedNodes: (nodes: string[]) => void;
|
|
10
|
+
resetConfig: () => void;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=usePlaygroundConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePlaygroundConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/usePlaygroundConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAwBvD,wBAAgB,mBAAmB;;;mBAOX,CAAC,SAAS,MAAM,YAAY,OAC3C,CAAC,SACC,YAAY,CAAC,CAAC,CAAC;uBAMjB,MAAM,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,SACtC,MAAM,GAAG,SAAS;0BA2BpB,MAAM,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,SACzC,OAAO,GAAG,SAAS;8BASrB,MAAM,WAAW,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,SAC7C,MAAM,GAAG,SAAS;iCA0BS,MAAM,EAAE;;EAqB7C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface SwapButtonState {
|
|
2
|
+
text: string;
|
|
3
|
+
action: () => void;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface UseSwapButtonStateProps {
|
|
7
|
+
walletInfoIsConnected: boolean;
|
|
8
|
+
primaryWallet: any;
|
|
9
|
+
fromChain: any;
|
|
10
|
+
walletInfoExpectedChainType: string | null;
|
|
11
|
+
amount: string;
|
|
12
|
+
quoteStatus: string;
|
|
13
|
+
fromBalance: any;
|
|
14
|
+
recipientAddress: string;
|
|
15
|
+
toChain: any;
|
|
16
|
+
swapStatus: string;
|
|
17
|
+
connectWallet: () => void;
|
|
18
|
+
handleReviewSwap: () => void;
|
|
19
|
+
finalResponse: any;
|
|
20
|
+
}
|
|
21
|
+
export declare function useSwapButtonState({ walletInfoIsConnected, primaryWallet, fromChain, walletInfoExpectedChainType, amount, quoteStatus, fromBalance, recipientAddress, toChain, swapStatus, connectWallet, handleReviewSwap, finalResponse, }: UseSwapButtonStateProps): SwapButtonState;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=useSwapButtonState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSwapButtonState.d.ts","sourceRoot":"","sources":["../../src/hooks/useSwapButtonState.ts"],"names":[],"mappings":"AAIA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,uBAAuB;IAC/B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,aAAa,EAAE,GAAG,CAAC;IACnB,SAAS,EAAE,GAAG,CAAC;IACf,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,GAAG,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,EAAE,GAAG,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,2BAA2B,EAC3B,MAAM,EACN,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,aAAa,GACd,EAAE,uBAAuB,GAAG,eAAe,CA0F3C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AggregateCallType } from "@/lib/grpc-client";
|
|
2
|
+
import type { Token, Chain } from "@/types";
|
|
3
|
+
import type { SwapAction } from "@/components/SwapInterface";
|
|
4
|
+
interface UseSwapQuoteProps {
|
|
5
|
+
amount: string;
|
|
6
|
+
fromToken: Token;
|
|
7
|
+
toToken: Token;
|
|
8
|
+
fromChain: Chain;
|
|
9
|
+
toChain: Chain;
|
|
10
|
+
recipientAddress: string;
|
|
11
|
+
walletAddress: string;
|
|
12
|
+
createSwapRequestPayload: (amountInUnits: string, finalRecipientAddress: string) => any | null;
|
|
13
|
+
dispatch: React.Dispatch<SwapAction>;
|
|
14
|
+
onQuoteSuccess?: () => void;
|
|
15
|
+
selectedNodes: string[];
|
|
16
|
+
aggregateCallType: AggregateCallType;
|
|
17
|
+
slippageTolerance: number;
|
|
18
|
+
isApproving?: boolean;
|
|
19
|
+
debounceDelay?: number;
|
|
20
|
+
}
|
|
21
|
+
interface UseSwapQuoteReturn {
|
|
22
|
+
fetchQuote: () => Promise<void>;
|
|
23
|
+
abortPendingQuote: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function useSwapQuote({ amount, fromToken, toToken, fromChain, toChain, recipientAddress, walletAddress, createSwapRequestPayload, dispatch, onQuoteSuccess, selectedNodes, aggregateCallType, slippageTolerance, isApproving, debounceDelay, }: UseSwapQuoteProps): UseSwapQuoteReturn;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=useSwapQuote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSwapQuote.d.ts","sourceRoot":"","sources":["../../src/hooks/useSwapQuote.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,iBAAiB,EAKlB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAe7D,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC;IAC/F,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAErC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CAExB;AAED,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAI/B;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,aAAmB,GACpB,EAAE,iBAAiB,GAAG,kBAAkB,CAyQxC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Token, Chain } from "@/types";
|
|
2
|
+
import type { SwapAction } from "@/components/SwapInterface";
|
|
3
|
+
interface UseSwapUrlManagerProps {
|
|
4
|
+
dispatch: React.Dispatch<SwapAction>;
|
|
5
|
+
initialFromChain: Chain;
|
|
6
|
+
initialFromToken: Token;
|
|
7
|
+
initialToChain: Chain;
|
|
8
|
+
initialToToken: Token;
|
|
9
|
+
currentFromChain: Chain | null;
|
|
10
|
+
currentFromToken: Token | null;
|
|
11
|
+
currentToChain: Chain | null;
|
|
12
|
+
currentToken: Token | null;
|
|
13
|
+
}
|
|
14
|
+
export declare function useSwapUrlManager({ dispatch, initialFromChain, initialFromToken, initialToChain, initialToToken, currentFromChain, currentFromToken, currentToChain, currentToken, }: UseSwapUrlManagerProps): void;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useSwapUrlManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSwapUrlManager.d.ts","sourceRoot":"","sources":["../../src/hooks/useSwapUrlManager.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAO7D,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrC,gBAAgB,EAAE,KAAK,CAAC;IACxB,gBAAgB,EAAE,KAAK,CAAC;IACxB,cAAc,EAAE,KAAK,CAAC;IACtB,cAAc,EAAE,KAAK,CAAC;IACtB,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/B,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,KAAK,GAAG,IAAI,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,YAAY,GACb,EAAE,sBAAsB,GAAG,IAAI,CAwL/B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Token, TokenBalance } from "@/types";
|
|
2
|
+
type UseTokenBalancesParams = {
|
|
3
|
+
address: string | null | undefined;
|
|
4
|
+
chainId: string | undefined;
|
|
5
|
+
chainType: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare function useTokenBalances({ address, chainId, chainType }: UseTokenBalancesParams): {
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
error: string | null;
|
|
10
|
+
tokenBalances: any;
|
|
11
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<any, Error>>;
|
|
12
|
+
getTokenBalance: (token: Token, address: string) => Promise<TokenBalance | null | undefined>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useTokenBalances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTokenBalances.d.ts","sourceRoot":"","sources":["../../src/hooks/useTokenBalances.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsB9C,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAoJF,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,sBAAsB;;;;;6BAyB7E,KAAK,WACH,MAAM,KACd,OAAO,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;EAiC5C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TokensByChain } from "@/types";
|
|
2
|
+
export declare function useTokenSearch(): {
|
|
3
|
+
discoveredTokens: TokensByChain;
|
|
4
|
+
searchTokenByAddress: (address: string) => Promise<void>;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: string | null;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useTokenSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTokenSearch.d.ts","sourceRoot":"","sources":["../../src/hooks/useTokenSearch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,aAAa,EAAE,MAAM,SAAS,CAAC;AAelE,wBAAgB,cAAc;;oCAM6B,MAAM;;;EAyHhE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Token, Chain } from "@/types";
|
|
2
|
+
interface UseTransactionAnalyticsProps {
|
|
3
|
+
fromToken: Token;
|
|
4
|
+
toToken: Token;
|
|
5
|
+
fromChain: Chain;
|
|
6
|
+
toChain: Chain;
|
|
7
|
+
amountIn: string;
|
|
8
|
+
amountOut: string;
|
|
9
|
+
amountInWithFee: string;
|
|
10
|
+
priceImpact: number | null;
|
|
11
|
+
executionTime: number | null;
|
|
12
|
+
connectedAddress: string;
|
|
13
|
+
recipient: string;
|
|
14
|
+
finalResponse: any;
|
|
15
|
+
nativeAmount: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function useTransactionAnalytics({ fromToken, toToken, fromChain, toChain, amountIn, amountOut, amountInWithFee, priceImpact, executionTime, connectedAddress, recipient, finalResponse, nativeAmount, }: UseTransactionAnalyticsProps): {
|
|
18
|
+
trackTransactionInitiated: () => void;
|
|
19
|
+
trackTransactionSubmitted: (txHash: string) => void;
|
|
20
|
+
trackTransactionFailed: (error: any) => void;
|
|
21
|
+
trackTransactionCompleted: (txRecord: any) => void;
|
|
22
|
+
trackTransactionAbandoned: (txHash: string, transactionState: string) => void;
|
|
23
|
+
hasConfirmedRef: import("react").MutableRefObject<boolean>;
|
|
24
|
+
previousFinalResponseRef: import("react").MutableRefObject<any>;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=useTransactionAnalytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransactionAnalytics.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactionAnalytics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEvC,UAAU,4BAA4B;IACpC,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,GAAG,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,eAAe,EACf,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,YAAY,GACb,EAAE,4BAA4B;;wCA8C0B,MAAM;oCA2BV,GAAG;0CA+BG,GAAG;wCAmCL,MAAM,oBAAoB,MAAM;;;EAqCxF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
interface Transaction {
|
|
2
|
+
id: number;
|
|
3
|
+
user_id: number;
|
|
4
|
+
hash: string;
|
|
5
|
+
transaction_type: string;
|
|
6
|
+
status: string;
|
|
7
|
+
amount: string;
|
|
8
|
+
usd_value: string;
|
|
9
|
+
from_chain_id: string;
|
|
10
|
+
to_chain_id: string;
|
|
11
|
+
from_token: string;
|
|
12
|
+
to_token: string;
|
|
13
|
+
from_token_address: string;
|
|
14
|
+
to_token_address: string;
|
|
15
|
+
created_at: string;
|
|
16
|
+
updated_at: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ProcessedTransaction extends Transaction {
|
|
19
|
+
fromChainName: string;
|
|
20
|
+
fromChainIcon?: string;
|
|
21
|
+
fromChainType: string;
|
|
22
|
+
toChainName: string;
|
|
23
|
+
toChainIcon?: string;
|
|
24
|
+
toChainType: string;
|
|
25
|
+
fromTokenSymbol: string;
|
|
26
|
+
toTokenSymbol: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ApiResponse {
|
|
29
|
+
transactions: Transaction[];
|
|
30
|
+
total: number;
|
|
31
|
+
page: number;
|
|
32
|
+
limit: number;
|
|
33
|
+
}
|
|
34
|
+
export declare function useTransactionHistory(address: string | null, page: number): {
|
|
35
|
+
processedTransactions: ProcessedTransaction[];
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
error: string | null;
|
|
38
|
+
totalPages: number;
|
|
39
|
+
forceRefetch: () => void;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=useTransactionHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransactionHistory.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactionHistory.ts"],"names":[],"mappings":"AAQA,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IAExB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM;;;;;;EAoRzE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Token, Chain } from "@/types";
|
|
2
|
+
interface UseTransactionPollingProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
txHash?: string;
|
|
5
|
+
fromChain: Chain;
|
|
6
|
+
toChain: Chain;
|
|
7
|
+
fromToken: Token;
|
|
8
|
+
toToken: Token;
|
|
9
|
+
connectedAddress: string;
|
|
10
|
+
amountIn: string;
|
|
11
|
+
amountOut: string;
|
|
12
|
+
finalResponse: any;
|
|
13
|
+
recipient: string;
|
|
14
|
+
}
|
|
15
|
+
interface UseTransactionPollingReturn {
|
|
16
|
+
txRecord: any;
|
|
17
|
+
isLoadingTx: boolean;
|
|
18
|
+
setTransactionState: (state: "pending" | "submitted" | "failed") => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useTransactionPolling({ isOpen, txHash, fromChain, toChain, fromToken, toToken, connectedAddress, amountIn, amountOut, finalResponse, recipient, }: UseTransactionPollingProps): UseTransactionPollingReturn;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=useTransactionPolling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransactionPolling.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactionPolling.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEvC,UAAU,0BAA0B;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,GAAG,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,2BAA2B;IACnC,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,KAAK,IAAI,CAAC;CAC1E;AAED,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,SAAS,GACV,EAAE,0BAA0B,GAAG,2BAA2B,CA4H1D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EvmTransactionResult } from "@/types";
|
|
2
|
+
type TransactionState = "pending" | "submitted" | "failed";
|
|
3
|
+
interface UseTransactionStateProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onConfirm: () => Promise<EvmTransactionResult>;
|
|
6
|
+
onClearQuoteUpdateMessage?: () => void;
|
|
7
|
+
}
|
|
8
|
+
interface UseTransactionStateReturn {
|
|
9
|
+
transactionState: TransactionState;
|
|
10
|
+
error: string | null;
|
|
11
|
+
setError: (error: string | null) => void;
|
|
12
|
+
resetState: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useTransactionState({ isOpen, onConfirm, onClearQuoteUpdateMessage, }: UseTransactionStateProps): UseTransactionStateReturn;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useTransactionState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransactionState.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactionState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,KAAK,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE3D,UAAU,wBAAwB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC/C,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAC;CACxC;AAED,UAAU,yBAAyB;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,SAAS,EACT,yBAAyB,GAC1B,EAAE,wBAAwB,GAAG,yBAAyB,CA2EtD"}
|