@unifold/ui-react 0.1.25 → 0.1.27

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.
Binary file
Binary file
Binary file
package/dist/index.d.mts CHANGED
@@ -8,6 +8,42 @@ import * as SelectPrimitive from '@radix-ui/react-select';
8
8
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
9
9
  import { ClassValue } from 'clsx';
10
10
 
11
+ type DepositConfirmationMode = "auto_ui" | "auto_silent" | "manual";
12
+ interface UseDepositPollingOptions {
13
+ userId: string | undefined;
14
+ publishableKey: string;
15
+ /** Controls when polling starts and whether a waiting UI is shown.
16
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
17
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
18
+ * - "manual": User must click "I've made the deposit" to start polling
19
+ */
20
+ depositConfirmationMode?: DepositConfirmationMode;
21
+ /** Deposit wallet ID used to trigger the backend poll endpoint */
22
+ depositWalletId?: string;
23
+ enabled?: boolean;
24
+ onDepositSuccess?: (data: {
25
+ message: string;
26
+ transaction?: unknown;
27
+ executionId?: string;
28
+ }) => void;
29
+ onDepositError?: (error: {
30
+ message: string;
31
+ error?: unknown;
32
+ code?: string;
33
+ }) => void;
34
+ }
35
+ interface UseDepositPollingResult {
36
+ executions: AutoSwapResponse[];
37
+ isPolling: boolean;
38
+ /** Whether the backend poll endpoint has been enabled */
39
+ pollingEnabled: boolean;
40
+ /** Whether the "Processing deposit transactions" card should be shown */
41
+ showWaitingUi: boolean;
42
+ /** Call this when user clicks "I've made the deposit" (manual mode) */
43
+ handleIveDeposited: () => void;
44
+ }
45
+ declare function useDepositPolling({ userId, publishableKey, depositConfirmationMode, depositWalletId, enabled, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
46
+
11
47
  interface DepositModalProps {
12
48
  open: boolean;
13
49
  onOpenChange: (open: boolean) => void;
@@ -16,7 +52,7 @@ interface DepositModalProps {
16
52
  modalTitle?: string;
17
53
  destinationTokenSymbol?: string;
18
54
  recipientAddress?: string;
19
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
55
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
20
56
  destinationChainId?: string;
21
57
  destinationTokenAddress?: string;
22
58
  hideDepositTracker?: boolean;
@@ -24,6 +60,14 @@ interface DepositModalProps {
24
60
  showBalanceHeader?: boolean;
25
61
  /** Input variant for Transfer Crypto view: "single_input" or "double_input" (default) */
26
62
  transferInputVariant?: "single_input" | "double_input";
63
+ /** Controls when deposit polling starts and what UI is shown.
64
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
65
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
66
+ * - "manual": User must click "I've made the deposit" to start polling
67
+ */
68
+ depositConfirmationMode?: DepositConfirmationMode;
69
+ /** Enable browser wallet connection option. Defaults to false */
70
+ enableConnectWallet?: boolean;
27
71
  onDepositSuccess?: (data: {
28
72
  message: string;
29
73
  transaction?: unknown;
@@ -36,10 +80,11 @@ interface DepositModalProps {
36
80
  }) => void;
37
81
  theme?: "light" | "dark" | "auto";
38
82
  }
39
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
83
+ declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
40
84
 
41
85
  interface DepositHeaderProps {
42
86
  title: string;
87
+ subtitle?: string;
43
88
  showBack?: boolean;
44
89
  showClose?: boolean;
45
90
  onBack?: () => void;
@@ -49,20 +94,28 @@ interface DepositHeaderProps {
49
94
  };
50
95
  showBalance?: boolean;
51
96
  balanceAddress?: string;
52
- balanceChainType?: "ethereum" | "solana" | "bitcoin";
97
+ balanceChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
53
98
  balanceChainId?: string;
54
99
  balanceTokenAddress?: string;
100
+ /** Project name for balance label e.g. "{projectName} Balance: $0.00" */
101
+ projectName?: string;
55
102
  publishableKey?: string;
56
103
  }
57
- declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
104
+ declare function DepositHeader({ title, subtitle, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, projectName, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
58
105
 
59
106
  interface TransferCryptoSingleInputProps {
60
107
  userId: string;
61
108
  publishableKey: string;
62
109
  recipientAddress?: string;
63
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
110
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
64
111
  destinationChainId?: string;
65
112
  destinationTokenAddress?: string;
113
+ /** Controls when polling starts and whether a waiting UI is shown.
114
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
115
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
116
+ * - "manual": User must click "I've made the deposit" to start polling
117
+ */
118
+ depositConfirmationMode?: DepositConfirmationMode;
66
119
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
67
120
  onDepositSuccess?: (data: {
68
121
  message: string;
@@ -76,15 +129,21 @@ interface TransferCryptoSingleInputProps {
76
129
  }) => void;
77
130
  wallets?: Wallet[];
78
131
  }
79
- declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
132
+ declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
80
133
 
81
134
  interface TransferCryptoDoubleInputProps {
82
135
  userId: string;
83
136
  publishableKey: string;
84
137
  recipientAddress?: string;
85
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
138
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
86
139
  destinationChainId?: string;
87
140
  destinationTokenAddress?: string;
141
+ /** Controls when polling starts and whether a waiting UI is shown.
142
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
143
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
144
+ * - "manual": User must click "I've made the deposit" to start polling
145
+ */
146
+ depositConfirmationMode?: DepositConfirmationMode;
88
147
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
89
148
  onDepositSuccess?: (data: {
90
149
  message: string;
@@ -98,7 +157,7 @@ interface TransferCryptoDoubleInputProps {
98
157
  }) => void;
99
158
  wallets?: Wallet[];
100
159
  }
101
- declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
160
+ declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
102
161
 
103
162
  interface BuyWithCardProps {
104
163
  userId: string;
@@ -109,7 +168,7 @@ interface BuyWithCardProps {
109
168
  accentColor?: string;
110
169
  destinationTokenSymbol?: string;
111
170
  recipientAddress?: string;
112
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
171
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
113
172
  destinationChainId?: string;
114
173
  destinationTokenAddress?: string;
115
174
  onDepositSuccess?: (data: {
@@ -199,6 +258,45 @@ interface DepositTrackerButtonProps {
199
258
  }
200
259
  declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: DepositTrackerButtonProps): react_jsx_runtime.JSX.Element;
201
260
 
261
+ declare global {
262
+ interface Window {
263
+ phantom?: {
264
+ solana?: PhantomSolanaProvider;
265
+ ethereum?: EthereumProvider;
266
+ };
267
+ solana?: PhantomSolanaProvider;
268
+ ethereum?: EthereumProvider;
269
+ }
270
+ }
271
+ interface PhantomSolanaProvider {
272
+ isPhantom?: boolean;
273
+ isConnected?: boolean;
274
+ publicKey?: {
275
+ toString(): string;
276
+ };
277
+ connect(opts?: {
278
+ onlyIfTrusted?: boolean;
279
+ }): Promise<{
280
+ publicKey: {
281
+ toString(): string;
282
+ };
283
+ }>;
284
+ disconnect(): Promise<void>;
285
+ on(event: string, callback: (...args: unknown[]) => void): void;
286
+ off(event: string, callback: (...args: unknown[]) => void): void;
287
+ }
288
+ interface EthereumProvider {
289
+ isMetaMask?: boolean;
290
+ isPhantom?: boolean;
291
+ selectedAddress?: string;
292
+ request(args: {
293
+ method: string;
294
+ params?: unknown[];
295
+ }): Promise<unknown>;
296
+ on(event: string, callback: (...args: unknown[]) => void): void;
297
+ removeListener(event: string, callback: (...args: unknown[]) => void): void;
298
+ }
299
+
202
300
  interface DepositExecutionItemProps {
203
301
  execution: AutoSwapResponse;
204
302
  onClick?: () => void;
@@ -210,6 +308,23 @@ interface DepositDetailContentProps {
210
308
  }
211
309
  declare function DepositDetailContent({ execution }: DepositDetailContentProps): react_jsx_runtime.JSX.Element;
212
310
 
311
+ interface DepositPollingUiProps {
312
+ depositConfirmationMode: DepositConfirmationMode;
313
+ /** Whether polling has been triggered and waiting UI should be visible */
314
+ showWaitingUi: boolean;
315
+ /** Whether at least one execution has been detected (hides the processing card) */
316
+ hasExecution: boolean;
317
+ /** Called when user clicks "I've made the deposit" in manual mode */
318
+ onIveDeposited: () => void;
319
+ }
320
+ /**
321
+ * Deposit polling UI that renders the correct element based on confirmation mode:
322
+ * - manual (before click): "I've made the deposit" button
323
+ * - auto_ui / manual (after click): "Processing deposit transactions" spinner card
324
+ * - auto_silent: nothing (null)
325
+ */
326
+ declare function DepositPollingUi({ depositConfirmationMode, showWaitingUi, hasExecution, onIveDeposited, }: DepositPollingUiProps): react_jsx_runtime.JSX.Element | null;
327
+
213
328
  interface CurrencyListItemProps {
214
329
  currency: FiatCurrency;
215
330
  isSelected: boolean;
@@ -227,7 +342,7 @@ declare function CurrencyListSection({ title, currencies, selectedCurrency, onSe
227
342
 
228
343
  declare const buttonVariants: (props?: ({
229
344
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
230
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
345
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
231
346
  } & class_variance_authority_types.ClassProp) | undefined) => string;
232
347
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
233
348
  asChild?: boolean;
@@ -583,4 +698,4 @@ declare function cn(...inputs: ClassValue[]): string;
583
698
  */
584
699
  declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
585
700
 
586
- export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, 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, useTheme };
701
+ export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, 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 };
package/dist/index.d.ts CHANGED
@@ -8,6 +8,42 @@ import * as SelectPrimitive from '@radix-ui/react-select';
8
8
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
9
9
  import { ClassValue } from 'clsx';
10
10
 
11
+ type DepositConfirmationMode = "auto_ui" | "auto_silent" | "manual";
12
+ interface UseDepositPollingOptions {
13
+ userId: string | undefined;
14
+ publishableKey: string;
15
+ /** Controls when polling starts and whether a waiting UI is shown.
16
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
17
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
18
+ * - "manual": User must click "I've made the deposit" to start polling
19
+ */
20
+ depositConfirmationMode?: DepositConfirmationMode;
21
+ /** Deposit wallet ID used to trigger the backend poll endpoint */
22
+ depositWalletId?: string;
23
+ enabled?: boolean;
24
+ onDepositSuccess?: (data: {
25
+ message: string;
26
+ transaction?: unknown;
27
+ executionId?: string;
28
+ }) => void;
29
+ onDepositError?: (error: {
30
+ message: string;
31
+ error?: unknown;
32
+ code?: string;
33
+ }) => void;
34
+ }
35
+ interface UseDepositPollingResult {
36
+ executions: AutoSwapResponse[];
37
+ isPolling: boolean;
38
+ /** Whether the backend poll endpoint has been enabled */
39
+ pollingEnabled: boolean;
40
+ /** Whether the "Processing deposit transactions" card should be shown */
41
+ showWaitingUi: boolean;
42
+ /** Call this when user clicks "I've made the deposit" (manual mode) */
43
+ handleIveDeposited: () => void;
44
+ }
45
+ declare function useDepositPolling({ userId, publishableKey, depositConfirmationMode, depositWalletId, enabled, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
46
+
11
47
  interface DepositModalProps {
12
48
  open: boolean;
13
49
  onOpenChange: (open: boolean) => void;
@@ -16,7 +52,7 @@ interface DepositModalProps {
16
52
  modalTitle?: string;
17
53
  destinationTokenSymbol?: string;
18
54
  recipientAddress?: string;
19
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
55
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
20
56
  destinationChainId?: string;
21
57
  destinationTokenAddress?: string;
22
58
  hideDepositTracker?: boolean;
@@ -24,6 +60,14 @@ interface DepositModalProps {
24
60
  showBalanceHeader?: boolean;
25
61
  /** Input variant for Transfer Crypto view: "single_input" or "double_input" (default) */
26
62
  transferInputVariant?: "single_input" | "double_input";
63
+ /** Controls when deposit polling starts and what UI is shown.
64
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
65
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
66
+ * - "manual": User must click "I've made the deposit" to start polling
67
+ */
68
+ depositConfirmationMode?: DepositConfirmationMode;
69
+ /** Enable browser wallet connection option. Defaults to false */
70
+ enableConnectWallet?: boolean;
27
71
  onDepositSuccess?: (data: {
28
72
  message: string;
29
73
  transaction?: unknown;
@@ -36,10 +80,11 @@ interface DepositModalProps {
36
80
  }) => void;
37
81
  theme?: "light" | "dark" | "auto";
38
82
  }
39
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
83
+ declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
40
84
 
41
85
  interface DepositHeaderProps {
42
86
  title: string;
87
+ subtitle?: string;
43
88
  showBack?: boolean;
44
89
  showClose?: boolean;
45
90
  onBack?: () => void;
@@ -49,20 +94,28 @@ interface DepositHeaderProps {
49
94
  };
50
95
  showBalance?: boolean;
51
96
  balanceAddress?: string;
52
- balanceChainType?: "ethereum" | "solana" | "bitcoin";
97
+ balanceChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
53
98
  balanceChainId?: string;
54
99
  balanceTokenAddress?: string;
100
+ /** Project name for balance label e.g. "{projectName} Balance: $0.00" */
101
+ projectName?: string;
55
102
  publishableKey?: string;
56
103
  }
57
- declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
104
+ declare function DepositHeader({ title, subtitle, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, projectName, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
58
105
 
59
106
  interface TransferCryptoSingleInputProps {
60
107
  userId: string;
61
108
  publishableKey: string;
62
109
  recipientAddress?: string;
63
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
110
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
64
111
  destinationChainId?: string;
65
112
  destinationTokenAddress?: string;
113
+ /** Controls when polling starts and whether a waiting UI is shown.
114
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
115
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
116
+ * - "manual": User must click "I've made the deposit" to start polling
117
+ */
118
+ depositConfirmationMode?: DepositConfirmationMode;
66
119
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
67
120
  onDepositSuccess?: (data: {
68
121
  message: string;
@@ -76,15 +129,21 @@ interface TransferCryptoSingleInputProps {
76
129
  }) => void;
77
130
  wallets?: Wallet[];
78
131
  }
79
- declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
132
+ declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
80
133
 
81
134
  interface TransferCryptoDoubleInputProps {
82
135
  userId: string;
83
136
  publishableKey: string;
84
137
  recipientAddress?: string;
85
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
138
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
86
139
  destinationChainId?: string;
87
140
  destinationTokenAddress?: string;
141
+ /** Controls when polling starts and whether a waiting UI is shown.
142
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
143
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
144
+ * - "manual": User must click "I've made the deposit" to start polling
145
+ */
146
+ depositConfirmationMode?: DepositConfirmationMode;
88
147
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
89
148
  onDepositSuccess?: (data: {
90
149
  message: string;
@@ -98,7 +157,7 @@ interface TransferCryptoDoubleInputProps {
98
157
  }) => void;
99
158
  wallets?: Wallet[];
100
159
  }
101
- declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
160
+ declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
102
161
 
103
162
  interface BuyWithCardProps {
104
163
  userId: string;
@@ -109,7 +168,7 @@ interface BuyWithCardProps {
109
168
  accentColor?: string;
110
169
  destinationTokenSymbol?: string;
111
170
  recipientAddress?: string;
112
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
171
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
113
172
  destinationChainId?: string;
114
173
  destinationTokenAddress?: string;
115
174
  onDepositSuccess?: (data: {
@@ -199,6 +258,45 @@ interface DepositTrackerButtonProps {
199
258
  }
200
259
  declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: DepositTrackerButtonProps): react_jsx_runtime.JSX.Element;
201
260
 
261
+ declare global {
262
+ interface Window {
263
+ phantom?: {
264
+ solana?: PhantomSolanaProvider;
265
+ ethereum?: EthereumProvider;
266
+ };
267
+ solana?: PhantomSolanaProvider;
268
+ ethereum?: EthereumProvider;
269
+ }
270
+ }
271
+ interface PhantomSolanaProvider {
272
+ isPhantom?: boolean;
273
+ isConnected?: boolean;
274
+ publicKey?: {
275
+ toString(): string;
276
+ };
277
+ connect(opts?: {
278
+ onlyIfTrusted?: boolean;
279
+ }): Promise<{
280
+ publicKey: {
281
+ toString(): string;
282
+ };
283
+ }>;
284
+ disconnect(): Promise<void>;
285
+ on(event: string, callback: (...args: unknown[]) => void): void;
286
+ off(event: string, callback: (...args: unknown[]) => void): void;
287
+ }
288
+ interface EthereumProvider {
289
+ isMetaMask?: boolean;
290
+ isPhantom?: boolean;
291
+ selectedAddress?: string;
292
+ request(args: {
293
+ method: string;
294
+ params?: unknown[];
295
+ }): Promise<unknown>;
296
+ on(event: string, callback: (...args: unknown[]) => void): void;
297
+ removeListener(event: string, callback: (...args: unknown[]) => void): void;
298
+ }
299
+
202
300
  interface DepositExecutionItemProps {
203
301
  execution: AutoSwapResponse;
204
302
  onClick?: () => void;
@@ -210,6 +308,23 @@ interface DepositDetailContentProps {
210
308
  }
211
309
  declare function DepositDetailContent({ execution }: DepositDetailContentProps): react_jsx_runtime.JSX.Element;
212
310
 
311
+ interface DepositPollingUiProps {
312
+ depositConfirmationMode: DepositConfirmationMode;
313
+ /** Whether polling has been triggered and waiting UI should be visible */
314
+ showWaitingUi: boolean;
315
+ /** Whether at least one execution has been detected (hides the processing card) */
316
+ hasExecution: boolean;
317
+ /** Called when user clicks "I've made the deposit" in manual mode */
318
+ onIveDeposited: () => void;
319
+ }
320
+ /**
321
+ * Deposit polling UI that renders the correct element based on confirmation mode:
322
+ * - manual (before click): "I've made the deposit" button
323
+ * - auto_ui / manual (after click): "Processing deposit transactions" spinner card
324
+ * - auto_silent: nothing (null)
325
+ */
326
+ declare function DepositPollingUi({ depositConfirmationMode, showWaitingUi, hasExecution, onIveDeposited, }: DepositPollingUiProps): react_jsx_runtime.JSX.Element | null;
327
+
213
328
  interface CurrencyListItemProps {
214
329
  currency: FiatCurrency;
215
330
  isSelected: boolean;
@@ -227,7 +342,7 @@ declare function CurrencyListSection({ title, currencies, selectedCurrency, onSe
227
342
 
228
343
  declare const buttonVariants: (props?: ({
229
344
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
230
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
345
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
231
346
  } & class_variance_authority_types.ClassProp) | undefined) => string;
232
347
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
233
348
  asChild?: boolean;
@@ -583,4 +698,4 @@ declare function cn(...inputs: ClassValue[]): string;
583
698
  */
584
699
  declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
585
700
 
586
- export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, 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, useTheme };
701
+ export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, 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 };