@unifold/ui-react 0.1.40 → 0.1.42

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/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { AutoSwapResponse, ChainType, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork } from '@unifold/core';
2
+ import { AutoSwapResponse, ChainType, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, DestinationToken, DestinationTokenChain, SupportedDestinationTokensResponse, VerifyAddressResponse } from '@unifold/core';
3
3
  export { ChainType } from '@unifold/core';
4
+ import * as _tanstack_react_query from '@tanstack/react-query';
4
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
- import * as React from 'react';
6
+ import * as React$1 from 'react';
6
7
  import { VariantProps } from 'class-variance-authority';
7
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
8
9
  import * as SelectPrimitive from '@radix-ui/react-select';
@@ -92,6 +93,36 @@ interface EthereumProvider {
92
93
 
93
94
  /** Quick amount chips on the browser wallet "Enter amount" step */
94
95
  type BrowserWalletAmountQuickSelect = "usd" | "percentage";
96
+ interface SolanaWalletProvider {
97
+ isPhantom?: boolean;
98
+ isConnected?: boolean;
99
+ publicKey?: {
100
+ toString(): string;
101
+ };
102
+ connect(opts?: {
103
+ onlyIfTrusted?: boolean;
104
+ }): Promise<{
105
+ publicKey: {
106
+ toString(): string;
107
+ };
108
+ }>;
109
+ disconnect(): Promise<void>;
110
+ signTransaction(transaction: any): Promise<any>;
111
+ on(event: string, callback: (...args: unknown[]) => void): void;
112
+ off(event: string, callback: (...args: unknown[]) => void): void;
113
+ }
114
+ interface EvmWalletProvider {
115
+ isMetaMask?: boolean;
116
+ isPhantom?: boolean;
117
+ isCoinbaseWallet?: boolean;
118
+ selectedAddress?: string;
119
+ request(args: {
120
+ method: string;
121
+ params?: unknown[];
122
+ }): Promise<unknown>;
123
+ on(event: string, callback: (...args: unknown[]) => void): void;
124
+ removeListener(event: string, callback: (...args: unknown[]) => void): void;
125
+ }
95
126
 
96
127
  type DepositModalInitialScreen = "main" | "transfer" | "card" | "tracker";
97
128
  interface DepositModalProps {
@@ -115,6 +146,18 @@ interface DepositModalProps {
115
146
  destinationChainType?: ChainType;
116
147
  destinationChainId?: string;
117
148
  destinationTokenAddress?: string;
149
+ /**
150
+ * Pre-select source token/chain in the Transfer Crypto view.
151
+ * All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
152
+ * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
153
+ */
154
+ defaultSourceChainType?: ChainType;
155
+ /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` + symbol or token address. */
156
+ defaultSourceChainId?: string;
157
+ /** Source token contract address. Must be paired with `defaultSourceChainType` + `defaultSourceChainId`. */
158
+ defaultSourceTokenAddress?: string;
159
+ /** Source token symbol (e.g. `"USDC"`). Must be paired with `defaultSourceChainType` + `defaultSourceChainId`. */
160
+ defaultSourceSymbol?: string;
118
161
  hideDepositTracker?: boolean;
119
162
  /** Show balance in deposit modal header. Defaults to false */
120
163
  showBalanceHeader?: boolean;
@@ -155,7 +198,7 @@ interface DepositModalProps {
155
198
  /** First screen when the modal opens. Default `main` (deposit menu). */
156
199
  initialScreen?: DepositModalInitialScreen;
157
200
  }
158
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
201
+ declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
159
202
 
160
203
  interface DepositHeaderProps {
161
204
  title: string;
@@ -185,6 +228,10 @@ interface TransferCryptoSingleInputProps {
185
228
  destinationChainType?: ChainType;
186
229
  destinationChainId?: string;
187
230
  destinationTokenAddress?: string;
231
+ defaultSourceChainType?: ChainType;
232
+ defaultSourceChainId?: string;
233
+ defaultSourceTokenAddress?: string;
234
+ defaultSourceSymbol?: string;
188
235
  /** Controls when polling starts and whether a waiting UI is shown.
189
236
  * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
190
237
  * - "auto_silent": After 10s, starts polling silently (no waiting UI)
@@ -204,7 +251,7 @@ interface TransferCryptoSingleInputProps {
204
251
  }) => void;
205
252
  wallets?: Wallet[];
206
253
  }
207
- declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
254
+ declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
208
255
 
209
256
  interface TransferCryptoDoubleInputProps {
210
257
  userId: string;
@@ -213,6 +260,10 @@ interface TransferCryptoDoubleInputProps {
213
260
  destinationChainType?: ChainType;
214
261
  destinationChainId?: string;
215
262
  destinationTokenAddress?: string;
263
+ defaultSourceChainType?: ChainType;
264
+ defaultSourceChainId?: string;
265
+ defaultSourceTokenAddress?: string;
266
+ defaultSourceSymbol?: string;
216
267
  /** Controls when polling starts and whether a waiting UI is shown.
217
268
  * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
218
269
  * - "auto_silent": After 10s, starts polling silently (no waiting UI)
@@ -232,7 +283,7 @@ interface TransferCryptoDoubleInputProps {
232
283
  }) => void;
233
284
  wallets?: Wallet[];
234
285
  }
235
- declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
286
+ declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
236
287
 
237
288
  interface BuyWithCardProps {
238
289
  userId: string;
@@ -347,8 +398,10 @@ interface DepositDetailContentProps {
347
398
  execution: AutoSwapResponse;
348
399
  /** Merged into root (e.g. wider horizontal padding in embedded deposit details). */
349
400
  className?: string;
401
+ /** Use "withdraw" to show "Withdrawal Tx" instead of "Deposit Tx" in details. */
402
+ variant?: "deposit" | "withdraw";
350
403
  }
351
- declare function DepositDetailContent({ execution, className, }: DepositDetailContentProps): react_jsx_runtime.JSX.Element;
404
+ declare function DepositDetailContent({ execution, className, variant, }: DepositDetailContentProps): react_jsx_runtime.JSX.Element;
352
405
 
353
406
  interface DepositPollingUiProps {
354
407
  depositConfirmationMode: DepositConfirmationMode;
@@ -375,6 +428,181 @@ interface ConfirmingViewProps {
375
428
  }
376
429
  declare function ConfirmingView({ isConfirming, onClose, executions, isPolling, }: ConfirmingViewProps): react_jsx_runtime.JSX.Element;
377
430
 
431
+ interface WithdrawTransactionInfo {
432
+ /** Source (sending) chain type */
433
+ sourceChainType: ChainType;
434
+ /** Source (sending) chain ID */
435
+ sourceChainId: string;
436
+ /** Source token contract address — the token being sent */
437
+ sourceTokenAddress: string;
438
+ /** Source token symbol */
439
+ sourceTokenSymbol: string;
440
+ /** Destination (receiving) chain type */
441
+ destinationChainType: string;
442
+ /** Destination (receiving) chain ID */
443
+ destinationChainId: string;
444
+ /** Destination token contract address */
445
+ destinationTokenAddress: string;
446
+ /** Destination token symbol */
447
+ destinationTokenSymbol: string;
448
+ amount: string;
449
+ amountBaseUnit: string;
450
+ /** The Unifold deposit wallet address to send funds to */
451
+ withdrawIntentAddress: string;
452
+ /** The user-provided final destination address */
453
+ recipientAddress: string;
454
+ }
455
+ interface WithdrawModalProps {
456
+ open: boolean;
457
+ onOpenChange: (open: boolean) => void;
458
+ publishableKey: string;
459
+ modalTitle?: string;
460
+ externalUserId: string;
461
+ sourceChainType: ChainType;
462
+ sourceChainId: string;
463
+ sourceTokenAddress: string;
464
+ sourceTokenSymbol?: string;
465
+ recipientAddress?: string;
466
+ senderAddress: string;
467
+ onWithdraw?: (txInfo: WithdrawTransactionInfo) => void | Promise<void>;
468
+ onWithdrawSuccess?: (data: {
469
+ message: string;
470
+ transaction?: unknown;
471
+ }) => void;
472
+ onWithdrawError?: (error: {
473
+ message: string;
474
+ error?: unknown;
475
+ code?: string;
476
+ }) => void;
477
+ theme?: "light" | "dark" | "auto";
478
+ hideOverlay?: boolean;
479
+ }
480
+ declare function WithdrawModal({ open, onOpenChange, publishableKey, modalTitle, externalUserId, sourceChainType, sourceChainId, sourceTokenAddress, sourceTokenSymbol, recipientAddress: recipientAddressProp, senderAddress, onWithdraw, onWithdrawSuccess, onWithdrawError, theme, hideOverlay, }: WithdrawModalProps): react_jsx_runtime.JSX.Element;
481
+
482
+ interface WithdrawTokenSelectorProps {
483
+ tokens: DestinationToken[];
484
+ onSelect: (token: DestinationToken, chain: DestinationTokenChain) => void;
485
+ onBack: () => void;
486
+ }
487
+ declare function WithdrawTokenSelector({ tokens, onSelect, onBack, }: WithdrawTokenSelectorProps): react_jsx_runtime.JSX.Element;
488
+
489
+ interface WithdrawDoubleInputProps {
490
+ tokens: DestinationToken[];
491
+ selectedTokenSymbol: string | null;
492
+ selectedChainKey: string | null;
493
+ onTokenChange: (symbol: string) => void;
494
+ onChainChange: (chainKey: string) => void;
495
+ isLoading?: boolean;
496
+ }
497
+ declare function WithdrawDoubleInput({ tokens, selectedTokenSymbol, selectedChainKey, onTokenChange, onChainChange, isLoading, }: WithdrawDoubleInputProps): react_jsx_runtime.JSX.Element;
498
+
499
+ interface AddressBalanceResult {
500
+ balanceBaseUnit: string;
501
+ balanceHuman: string;
502
+ balanceUsd: string | null;
503
+ exchangeRate: string | null;
504
+ decimals: number;
505
+ symbol: string;
506
+ }
507
+ /**
508
+ * Hook to fetch a token balance for a given address.
509
+ * Uses React Query for caching and deduplication.
510
+ */
511
+ declare function useAddressBalance(params: {
512
+ address?: string;
513
+ chainType?: ChainType;
514
+ chainId?: string;
515
+ tokenAddress?: string;
516
+ publishableKey: string;
517
+ enabled?: boolean;
518
+ }): _tanstack_react_query.UseQueryResult<AddressBalanceResult | null, Error>;
519
+
520
+ type DetectedWallet = {
521
+ name: string;
522
+ address: string;
523
+ } & ({
524
+ chainFamily: "evm";
525
+ provider: EvmWalletProvider;
526
+ } | {
527
+ chainFamily: "solana";
528
+ provider: SolanaWalletProvider;
529
+ });
530
+ declare function sendEvmWithdraw(params: {
531
+ provider: EvmWalletProvider;
532
+ fromAddress: string;
533
+ depositWalletAddress: string;
534
+ sourceTokenAddress: string;
535
+ sourceChainId: string;
536
+ amountBaseUnit: string;
537
+ }): Promise<string>;
538
+ declare function sendSolanaWithdraw(params: {
539
+ provider: SolanaWalletProvider;
540
+ fromAddress: string;
541
+ depositWalletAddress: string;
542
+ sourceTokenAddress: string;
543
+ amountBaseUnit: string;
544
+ publishableKey: string;
545
+ }): Promise<string>;
546
+ declare function detectBrowserWallet(chainType: string, senderAddress?: string): Promise<DetectedWallet | null>;
547
+
548
+ interface WithdrawFormProps {
549
+ publishableKey: string;
550
+ externalUserId: string;
551
+ sourceChainType: ChainType;
552
+ selectedToken: DestinationToken | null;
553
+ selectedChain: DestinationTokenChain | null;
554
+ sourceTokenSymbol?: string;
555
+ recipientAddressProp?: string;
556
+ balanceData: AddressBalanceResult | null;
557
+ isLoadingBalance: boolean;
558
+ minimumWithdrawAmountUsd: number | null;
559
+ estimatedProcessingTime: number | null;
560
+ maxSlippagePercent: number | null;
561
+ priceImpactPercent: number | null;
562
+ /** Detected browser wallet with provider ref — used for SDK-native sends */
563
+ detectedWallet: DetectedWallet | null;
564
+ sourceChainId: string;
565
+ sourceTokenAddress: string;
566
+ isWalletMatch: boolean;
567
+ connectedWalletName: string | null;
568
+ canWithdraw: boolean;
569
+ onWithdraw?: (txInfo: WithdrawTransactionInfo) => void | Promise<void>;
570
+ onWithdrawError?: (error: {
571
+ message: string;
572
+ error?: unknown;
573
+ code?: string;
574
+ }) => void;
575
+ /** Creates the deposit wallet and starts polling. Returns the wallet address + id. */
576
+ onDepositWalletCreation: (params: {
577
+ destinationChainType: string;
578
+ destinationChainId: string;
579
+ destinationTokenAddress: string;
580
+ recipientAddress: string;
581
+ }) => Promise<{
582
+ id: string;
583
+ address: string;
584
+ }>;
585
+ /** Called after a successful withdraw submit — navigates to confirming view */
586
+ onWithdrawSubmitted?: (txInfo: WithdrawTransactionInfo) => void;
587
+ /** Optional element rendered on the left side of the footer row (e.g. tracker link) */
588
+ footerLeft?: React.ReactNode;
589
+ }
590
+ declare function WithdrawForm({ publishableKey, externalUserId, sourceChainType, selectedToken, selectedChain, sourceTokenSymbol, recipientAddressProp, balanceData, isLoadingBalance, minimumWithdrawAmountUsd, estimatedProcessingTime, maxSlippagePercent, priceImpactPercent, detectedWallet, sourceChainId, sourceTokenAddress, isWalletMatch, connectedWalletName, canWithdraw, onWithdraw, onWithdrawError, onDepositWalletCreation, onWithdrawSubmitted, footerLeft, }: WithdrawFormProps): react_jsx_runtime.JSX.Element;
591
+
592
+ interface WithdrawExecutionItemProps {
593
+ execution: AutoSwapResponse;
594
+ onClick?: () => void;
595
+ }
596
+ declare function WithdrawExecutionItem({ execution, onClick, }: WithdrawExecutionItemProps): react_jsx_runtime.JSX.Element;
597
+
598
+ interface WithdrawConfirmingViewProps {
599
+ txInfo: WithdrawTransactionInfo;
600
+ executions: AutoSwapResponse[];
601
+ onClose: () => void;
602
+ onViewTracker: () => void;
603
+ }
604
+ declare function WithdrawConfirmingView({ txInfo, executions, onClose, onViewTracker, }: WithdrawConfirmingViewProps): react_jsx_runtime.JSX.Element;
605
+
378
606
  interface CurrencyListItemProps {
379
607
  currency: FiatCurrency;
380
608
  isSelected: boolean;
@@ -394,17 +622,17 @@ declare const buttonVariants: (props?: ({
394
622
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
395
623
  size?: "default" | "icon" | "sm" | "lg" | null | undefined;
396
624
  } & class_variance_authority_types.ClassProp) | undefined) => string;
397
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
625
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
398
626
  asChild?: boolean;
399
627
  }
400
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
628
+ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
401
629
 
402
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
403
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
404
- declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
405
- declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
406
- declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
407
- interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
630
+ declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
631
+ declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
632
+ declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
633
+ declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
634
+ declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
635
+ interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
408
636
  /** Render inline without portal, overlay, or close button (for embedded/inline mode) */
409
637
  hideOverlay?: boolean;
410
638
  /**
@@ -417,30 +645,30 @@ interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof Dialo
417
645
  /** Merged into `DialogOverlay` (e.g. z-index above in-app layers such as deposit toasts). */
418
646
  overlayClassName?: string;
419
647
  }
420
- declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
648
+ declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
421
649
  declare const DialogHeader: {
422
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
650
+ ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
423
651
  displayName: string;
424
652
  };
425
653
  declare const DialogFooter: {
426
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
654
+ ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
427
655
  displayName: string;
428
656
  };
429
- declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
430
- declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
431
-
432
- declare const Select: React.FC<SelectPrimitive.SelectProps>;
433
- declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
434
- declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
435
- declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
436
- declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
437
- declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
438
- declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
439
- declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
440
- declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
441
- declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
442
-
443
- declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
657
+ declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
658
+ declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
659
+
660
+ declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
661
+ declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
662
+ declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
663
+ declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
664
+ declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
665
+ declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
666
+ declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
667
+ declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
668
+ declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
669
+ declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
670
+
671
+ declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
444
672
  /**
445
673
  * Tooltip wrapper that supports both hover (desktop) and tap-to-toggle (mobile).
446
674
  *
@@ -448,13 +676,13 @@ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
448
676
  * This wrapper adds controlled open state so the trigger's onClick can toggle it,
449
677
  * while preserving the default hover behavior on desktop.
450
678
  */
451
- declare function Tooltip({ children, ...props }: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
679
+ declare function Tooltip({ children, ...props }: React$1.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
452
680
  /**
453
681
  * Tooltip trigger that adds click-to-toggle for mobile/touch support.
454
682
  * On desktop, hover still works as usual via Radix's built-in behavior.
455
683
  */
456
- declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
457
- declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
684
+ declare const TooltipTrigger: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
685
+ declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
458
686
 
459
687
  /**
460
688
  * Result of the useAllowedCountry hook
@@ -495,6 +723,73 @@ interface AllowedCountryResult {
495
723
  */
496
724
  declare function useAllowedCountry(publishableKey: string): AllowedCountryResult;
497
725
 
726
+ interface UseWithdrawPollingOptions {
727
+ userId: string | undefined;
728
+ publishableKey: string;
729
+ depositWalletId?: string;
730
+ enabled?: boolean;
731
+ onWithdrawSuccess?: (data: {
732
+ message: string;
733
+ transaction?: unknown;
734
+ executionId?: string;
735
+ }) => void;
736
+ onWithdrawError?: (error: {
737
+ message: string;
738
+ error?: unknown;
739
+ code?: string;
740
+ }) => void;
741
+ }
742
+ interface UseWithdrawPollingResult {
743
+ executions: AutoSwapResponse[];
744
+ isPolling: boolean;
745
+ }
746
+ declare function useWithdrawPolling({ userId, publishableKey, depositWalletId, enabled, onWithdrawSuccess, onWithdrawError, }: UseWithdrawPollingOptions): UseWithdrawPollingResult;
747
+
748
+ /**
749
+ * Hook to fetch supported destination tokens with caching and deduplication via react-query.
750
+ * Used in the withdraw flow to show available tokens the user can withdraw to.
751
+ *
752
+ * @param publishableKey - Publishable key for API calls
753
+ * @param enabled - Whether to fetch (defaults to true)
754
+ */
755
+ declare function useSupportedDestinationTokens(publishableKey: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<SupportedDestinationTokensResponse, Error>;
756
+
757
+ interface UseVerifyRecipientAddressParams {
758
+ chainType?: string;
759
+ chainId?: string;
760
+ tokenAddress?: string;
761
+ recipientAddress?: string;
762
+ publishableKey: string;
763
+ enabled?: boolean;
764
+ }
765
+ /**
766
+ * Hook to verify a recipient address via React Query.
767
+ * Debounced by the caller — only fires when all params are present and enabled is true.
768
+ * Caches results by the full (chain + token + address) tuple.
769
+ */
770
+ declare function useVerifyRecipientAddress(params: UseVerifyRecipientAddressParams): _tanstack_react_query.UseQueryResult<VerifyAddressResponse, Error>;
771
+
772
+ interface SourceTokenValidationResult {
773
+ isSupported: boolean;
774
+ minimumAmountUsd: number | null;
775
+ estimatedProcessingTime: number | null;
776
+ maxSlippagePercent: number | null;
777
+ priceImpactPercent: number | null;
778
+ errorMessage: string | null;
779
+ }
780
+ /**
781
+ * Hook to validate that a source token is supported for withdrawal
782
+ * by checking it against /supported_deposit_tokens.
783
+ */
784
+ declare function useSourceTokenValidation(params: {
785
+ sourceChainType?: string;
786
+ sourceChainId?: string;
787
+ sourceTokenAddress?: string;
788
+ sourceTokenSymbol?: string;
789
+ publishableKey: string;
790
+ enabled?: boolean;
791
+ }): _tanstack_react_query.UseQueryResult<SourceTokenValidationResult, Error>;
792
+
498
793
  /**
499
794
  * Unifold color palette for React (Web)
500
795
  * Matches the React Native theme colors
@@ -737,7 +1032,7 @@ interface ThemeContextValue {
737
1032
  isDark: boolean;
738
1033
  }
739
1034
  interface ThemeProviderProps {
740
- children: React.ReactNode;
1035
+ children: React$1.ReactNode;
741
1036
  /** Force a specific theme mode, or 'auto' to use system preference */
742
1037
  mode?: ThemeMode | "auto";
743
1038
  /** Simple accent/primary color override (applies to both light and dark) */
@@ -771,4 +1066,4 @@ declare function cn(...inputs: ClassValue[]): string;
771
1066
  */
772
1067
  declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
773
1068
 
774
- export { type AllowedCountryResult, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type BuyWithCardProps, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, ConfirmingView, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, type DepositModalInitialScreen, type DepositModalProps, DepositPollingUi, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, truncateAddress, useAllowedCountry, useDepositPolling, useTheme };
1069
+ export { type AllowedCountryResult, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type BuyWithCardProps, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, ConfirmingView, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, type DepositModalInitialScreen, type DepositModalProps, DepositPollingUi, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, type DetectedWallet, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EvmWalletProvider, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SolanaWalletProvider, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, WithdrawConfirmingView, WithdrawDoubleInput, WithdrawExecutionItem, WithdrawForm, WithdrawModal, type WithdrawModalProps, WithdrawTokenSelector, type WithdrawTransactionInfo, buttonVariants, cn, colors, defaultColors, detectBrowserWallet, getColors, mergeColors, resolveComponentTokens, sendEvmWithdraw, sendSolanaWithdraw, truncateAddress, useAddressBalance, useAllowedCountry, useDepositPolling, useSourceTokenValidation, useSupportedDestinationTokens, useTheme, useVerifyRecipientAddress, useWithdrawPolling };