@unifold/ui-react 0.1.26 → 0.1.28

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.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { AutoSwapResponse, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork } from '@unifold/core';
3
+ export { ChainType } from '@unifold/core';
3
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
5
  import * as React from 'react';
5
6
  import { VariantProps } from 'class-variance-authority';
@@ -8,6 +9,42 @@ import * as SelectPrimitive from '@radix-ui/react-select';
8
9
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
9
10
  import { ClassValue } from 'clsx';
10
11
 
12
+ type DepositConfirmationMode = "auto_ui" | "auto_silent" | "manual";
13
+ interface UseDepositPollingOptions {
14
+ userId: string | undefined;
15
+ publishableKey: string;
16
+ /** Controls when polling starts and whether a waiting UI is shown.
17
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
18
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
19
+ * - "manual": User must click "I've made the deposit" to start polling
20
+ */
21
+ depositConfirmationMode?: DepositConfirmationMode;
22
+ /** Deposit wallet ID used to trigger the backend poll endpoint */
23
+ depositWalletId?: string;
24
+ enabled?: boolean;
25
+ onDepositSuccess?: (data: {
26
+ message: string;
27
+ transaction?: unknown;
28
+ executionId?: string;
29
+ }) => void;
30
+ onDepositError?: (error: {
31
+ message: string;
32
+ error?: unknown;
33
+ code?: string;
34
+ }) => void;
35
+ }
36
+ interface UseDepositPollingResult {
37
+ executions: AutoSwapResponse[];
38
+ isPolling: boolean;
39
+ /** Whether the backend poll endpoint has been enabled */
40
+ pollingEnabled: boolean;
41
+ /** Whether the "Processing deposit transactions" card should be shown */
42
+ showWaitingUi: boolean;
43
+ /** Call this when user clicks "I've made the deposit" (manual mode) */
44
+ handleIveDeposited: () => void;
45
+ }
46
+ declare function useDepositPolling({ userId, publishableKey, depositConfirmationMode, depositWalletId, enabled, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
47
+
11
48
  interface DepositModalProps {
12
49
  open: boolean;
13
50
  onOpenChange: (open: boolean) => void;
@@ -16,7 +53,7 @@ interface DepositModalProps {
16
53
  modalTitle?: string;
17
54
  destinationTokenSymbol?: string;
18
55
  recipientAddress?: string;
19
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
56
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
20
57
  destinationChainId?: string;
21
58
  destinationTokenAddress?: string;
22
59
  hideDepositTracker?: boolean;
@@ -24,6 +61,12 @@ interface DepositModalProps {
24
61
  showBalanceHeader?: boolean;
25
62
  /** Input variant for Transfer Crypto view: "single_input" or "double_input" (default) */
26
63
  transferInputVariant?: "single_input" | "double_input";
64
+ /** Controls when deposit polling starts and what UI is shown.
65
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
66
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
67
+ * - "manual": User must click "I've made the deposit" to start polling
68
+ */
69
+ depositConfirmationMode?: DepositConfirmationMode;
27
70
  /** Enable browser wallet connection option. Defaults to false */
28
71
  enableConnectWallet?: boolean;
29
72
  onDepositSuccess?: (data: {
@@ -38,10 +81,11 @@ interface DepositModalProps {
38
81
  }) => void;
39
82
  theme?: "light" | "dark" | "auto";
40
83
  }
41
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, enableConnectWallet, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
84
+ 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;
42
85
 
43
86
  interface DepositHeaderProps {
44
87
  title: string;
88
+ subtitle?: string;
45
89
  showBack?: boolean;
46
90
  showClose?: boolean;
47
91
  onBack?: () => void;
@@ -51,20 +95,28 @@ interface DepositHeaderProps {
51
95
  };
52
96
  showBalance?: boolean;
53
97
  balanceAddress?: string;
54
- balanceChainType?: "ethereum" | "solana" | "bitcoin";
98
+ balanceChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
55
99
  balanceChainId?: string;
56
100
  balanceTokenAddress?: string;
101
+ /** Project name for balance label e.g. "{projectName} Balance: $0.00" */
102
+ projectName?: string;
57
103
  publishableKey?: string;
58
104
  }
59
- declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
105
+ declare function DepositHeader({ title, subtitle, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, projectName, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
60
106
 
61
107
  interface TransferCryptoSingleInputProps {
62
108
  userId: string;
63
109
  publishableKey: string;
64
110
  recipientAddress?: string;
65
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
111
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
66
112
  destinationChainId?: string;
67
113
  destinationTokenAddress?: string;
114
+ /** Controls when polling starts and whether a waiting UI is shown.
115
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
116
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
117
+ * - "manual": User must click "I've made the deposit" to start polling
118
+ */
119
+ depositConfirmationMode?: DepositConfirmationMode;
68
120
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
69
121
  onDepositSuccess?: (data: {
70
122
  message: string;
@@ -78,15 +130,21 @@ interface TransferCryptoSingleInputProps {
78
130
  }) => void;
79
131
  wallets?: Wallet[];
80
132
  }
81
- declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
133
+ declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
82
134
 
83
135
  interface TransferCryptoDoubleInputProps {
84
136
  userId: string;
85
137
  publishableKey: string;
86
138
  recipientAddress?: string;
87
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
139
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
88
140
  destinationChainId?: string;
89
141
  destinationTokenAddress?: string;
142
+ /** Controls when polling starts and whether a waiting UI is shown.
143
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
144
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
145
+ * - "manual": User must click "I've made the deposit" to start polling
146
+ */
147
+ depositConfirmationMode?: DepositConfirmationMode;
90
148
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
91
149
  onDepositSuccess?: (data: {
92
150
  message: string;
@@ -100,7 +158,7 @@ interface TransferCryptoDoubleInputProps {
100
158
  }) => void;
101
159
  wallets?: Wallet[];
102
160
  }
103
- declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
161
+ declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
104
162
 
105
163
  interface BuyWithCardProps {
106
164
  userId: string;
@@ -111,7 +169,7 @@ interface BuyWithCardProps {
111
169
  accentColor?: string;
112
170
  destinationTokenSymbol?: string;
113
171
  recipientAddress?: string;
114
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
172
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
115
173
  destinationChainId?: string;
116
174
  destinationTokenAddress?: string;
117
175
  onDepositSuccess?: (data: {
@@ -175,19 +233,6 @@ interface StyledQRCodeProps {
175
233
  imageSize?: number;
176
234
  darkMode?: boolean;
177
235
  }
178
- /**
179
- * Pre-generate a QR code and cache it for instant display later.
180
- * Call this when wallet address is fetched, before modal opens.
181
- */
182
- declare function preloadQRCode(value: string, size?: number, imageUrl?: string, imageSize?: number, darkMode?: boolean): Promise<void>;
183
- /**
184
- * Check if a QR code is already cached
185
- */
186
- declare function isQRCodeCached(value: string, size?: number, imageUrl?: string, darkMode?: boolean): boolean;
187
- /**
188
- * Clear the QR code cache (useful for memory management)
189
- */
190
- declare function clearQRCodeCache(): void;
191
236
  declare function StyledQRCode({ value, size, imageUrl, imageSize, darkMode, }: StyledQRCodeProps): react_jsx_runtime.JSX.Element;
192
237
 
193
238
  interface TransferCryptoButtonProps {
@@ -264,6 +309,23 @@ interface DepositDetailContentProps {
264
309
  }
265
310
  declare function DepositDetailContent({ execution }: DepositDetailContentProps): react_jsx_runtime.JSX.Element;
266
311
 
312
+ interface DepositPollingUiProps {
313
+ depositConfirmationMode: DepositConfirmationMode;
314
+ /** Whether polling has been triggered and waiting UI should be visible */
315
+ showWaitingUi: boolean;
316
+ /** Whether at least one execution has been detected (hides the processing card) */
317
+ hasExecution: boolean;
318
+ /** Called when user clicks "I've made the deposit" in manual mode */
319
+ onIveDeposited: () => void;
320
+ }
321
+ /**
322
+ * Deposit polling UI that renders the correct element based on confirmation mode:
323
+ * - manual (before click): "I've made the deposit" button
324
+ * - auto_ui / manual (after click): "Processing deposit transactions" spinner card
325
+ * - auto_silent: nothing (null)
326
+ */
327
+ declare function DepositPollingUi({ depositConfirmationMode, showWaitingUi, hasExecution, onIveDeposited, }: DepositPollingUiProps): react_jsx_runtime.JSX.Element | null;
328
+
267
329
  interface CurrencyListItemProps {
268
330
  currency: FiatCurrency;
269
331
  isSelected: boolean;
@@ -637,4 +699,4 @@ declare function cn(...inputs: ClassValue[]): string;
637
699
  */
638
700
  declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
639
701
 
640
- 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, clearQRCodeCache, cn, colors, defaultColors, getColors, isQRCodeCached, mergeColors, preloadQRCode, resolveComponentTokens, truncateAddress, useAllowedCountry, useTheme };
702
+ 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
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { AutoSwapResponse, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork } from '@unifold/core';
3
+ export { ChainType } from '@unifold/core';
3
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
5
  import * as React from 'react';
5
6
  import { VariantProps } from 'class-variance-authority';
@@ -8,6 +9,42 @@ import * as SelectPrimitive from '@radix-ui/react-select';
8
9
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
9
10
  import { ClassValue } from 'clsx';
10
11
 
12
+ type DepositConfirmationMode = "auto_ui" | "auto_silent" | "manual";
13
+ interface UseDepositPollingOptions {
14
+ userId: string | undefined;
15
+ publishableKey: string;
16
+ /** Controls when polling starts and whether a waiting UI is shown.
17
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
18
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
19
+ * - "manual": User must click "I've made the deposit" to start polling
20
+ */
21
+ depositConfirmationMode?: DepositConfirmationMode;
22
+ /** Deposit wallet ID used to trigger the backend poll endpoint */
23
+ depositWalletId?: string;
24
+ enabled?: boolean;
25
+ onDepositSuccess?: (data: {
26
+ message: string;
27
+ transaction?: unknown;
28
+ executionId?: string;
29
+ }) => void;
30
+ onDepositError?: (error: {
31
+ message: string;
32
+ error?: unknown;
33
+ code?: string;
34
+ }) => void;
35
+ }
36
+ interface UseDepositPollingResult {
37
+ executions: AutoSwapResponse[];
38
+ isPolling: boolean;
39
+ /** Whether the backend poll endpoint has been enabled */
40
+ pollingEnabled: boolean;
41
+ /** Whether the "Processing deposit transactions" card should be shown */
42
+ showWaitingUi: boolean;
43
+ /** Call this when user clicks "I've made the deposit" (manual mode) */
44
+ handleIveDeposited: () => void;
45
+ }
46
+ declare function useDepositPolling({ userId, publishableKey, depositConfirmationMode, depositWalletId, enabled, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
47
+
11
48
  interface DepositModalProps {
12
49
  open: boolean;
13
50
  onOpenChange: (open: boolean) => void;
@@ -16,7 +53,7 @@ interface DepositModalProps {
16
53
  modalTitle?: string;
17
54
  destinationTokenSymbol?: string;
18
55
  recipientAddress?: string;
19
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
56
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
20
57
  destinationChainId?: string;
21
58
  destinationTokenAddress?: string;
22
59
  hideDepositTracker?: boolean;
@@ -24,6 +61,12 @@ interface DepositModalProps {
24
61
  showBalanceHeader?: boolean;
25
62
  /** Input variant for Transfer Crypto view: "single_input" or "double_input" (default) */
26
63
  transferInputVariant?: "single_input" | "double_input";
64
+ /** Controls when deposit polling starts and what UI is shown.
65
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
66
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
67
+ * - "manual": User must click "I've made the deposit" to start polling
68
+ */
69
+ depositConfirmationMode?: DepositConfirmationMode;
27
70
  /** Enable browser wallet connection option. Defaults to false */
28
71
  enableConnectWallet?: boolean;
29
72
  onDepositSuccess?: (data: {
@@ -38,10 +81,11 @@ interface DepositModalProps {
38
81
  }) => void;
39
82
  theme?: "light" | "dark" | "auto";
40
83
  }
41
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, enableConnectWallet, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
84
+ 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;
42
85
 
43
86
  interface DepositHeaderProps {
44
87
  title: string;
88
+ subtitle?: string;
45
89
  showBack?: boolean;
46
90
  showClose?: boolean;
47
91
  onBack?: () => void;
@@ -51,20 +95,28 @@ interface DepositHeaderProps {
51
95
  };
52
96
  showBalance?: boolean;
53
97
  balanceAddress?: string;
54
- balanceChainType?: "ethereum" | "solana" | "bitcoin";
98
+ balanceChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
55
99
  balanceChainId?: string;
56
100
  balanceTokenAddress?: string;
101
+ /** Project name for balance label e.g. "{projectName} Balance: $0.00" */
102
+ projectName?: string;
57
103
  publishableKey?: string;
58
104
  }
59
- declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
105
+ declare function DepositHeader({ title, subtitle, showBack, showClose, onBack, onClose, badge, showBalance, balanceAddress, balanceChainType, balanceChainId, balanceTokenAddress, projectName, publishableKey, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
60
106
 
61
107
  interface TransferCryptoSingleInputProps {
62
108
  userId: string;
63
109
  publishableKey: string;
64
110
  recipientAddress?: string;
65
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
111
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
66
112
  destinationChainId?: string;
67
113
  destinationTokenAddress?: string;
114
+ /** Controls when polling starts and whether a waiting UI is shown.
115
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
116
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
117
+ * - "manual": User must click "I've made the deposit" to start polling
118
+ */
119
+ depositConfirmationMode?: DepositConfirmationMode;
68
120
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
69
121
  onDepositSuccess?: (data: {
70
122
  message: string;
@@ -78,15 +130,21 @@ interface TransferCryptoSingleInputProps {
78
130
  }) => void;
79
131
  wallets?: Wallet[];
80
132
  }
81
- declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
133
+ declare function TransferCryptoSingleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
82
134
 
83
135
  interface TransferCryptoDoubleInputProps {
84
136
  userId: string;
85
137
  publishableKey: string;
86
138
  recipientAddress?: string;
87
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
139
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
88
140
  destinationChainId?: string;
89
141
  destinationTokenAddress?: string;
142
+ /** Controls when polling starts and whether a waiting UI is shown.
143
+ * - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
144
+ * - "auto_silent": After 10s, starts polling silently (no waiting UI)
145
+ * - "manual": User must click "I've made the deposit" to start polling
146
+ */
147
+ depositConfirmationMode?: DepositConfirmationMode;
90
148
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
91
149
  onDepositSuccess?: (data: {
92
150
  message: string;
@@ -100,7 +158,7 @@ interface TransferCryptoDoubleInputProps {
100
158
  }) => void;
101
159
  wallets?: Wallet[];
102
160
  }
103
- declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
161
+ declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
104
162
 
105
163
  interface BuyWithCardProps {
106
164
  userId: string;
@@ -111,7 +169,7 @@ interface BuyWithCardProps {
111
169
  accentColor?: string;
112
170
  destinationTokenSymbol?: string;
113
171
  recipientAddress?: string;
114
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand";
172
+ destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
115
173
  destinationChainId?: string;
116
174
  destinationTokenAddress?: string;
117
175
  onDepositSuccess?: (data: {
@@ -175,19 +233,6 @@ interface StyledQRCodeProps {
175
233
  imageSize?: number;
176
234
  darkMode?: boolean;
177
235
  }
178
- /**
179
- * Pre-generate a QR code and cache it for instant display later.
180
- * Call this when wallet address is fetched, before modal opens.
181
- */
182
- declare function preloadQRCode(value: string, size?: number, imageUrl?: string, imageSize?: number, darkMode?: boolean): Promise<void>;
183
- /**
184
- * Check if a QR code is already cached
185
- */
186
- declare function isQRCodeCached(value: string, size?: number, imageUrl?: string, darkMode?: boolean): boolean;
187
- /**
188
- * Clear the QR code cache (useful for memory management)
189
- */
190
- declare function clearQRCodeCache(): void;
191
236
  declare function StyledQRCode({ value, size, imageUrl, imageSize, darkMode, }: StyledQRCodeProps): react_jsx_runtime.JSX.Element;
192
237
 
193
238
  interface TransferCryptoButtonProps {
@@ -264,6 +309,23 @@ interface DepositDetailContentProps {
264
309
  }
265
310
  declare function DepositDetailContent({ execution }: DepositDetailContentProps): react_jsx_runtime.JSX.Element;
266
311
 
312
+ interface DepositPollingUiProps {
313
+ depositConfirmationMode: DepositConfirmationMode;
314
+ /** Whether polling has been triggered and waiting UI should be visible */
315
+ showWaitingUi: boolean;
316
+ /** Whether at least one execution has been detected (hides the processing card) */
317
+ hasExecution: boolean;
318
+ /** Called when user clicks "I've made the deposit" in manual mode */
319
+ onIveDeposited: () => void;
320
+ }
321
+ /**
322
+ * Deposit polling UI that renders the correct element based on confirmation mode:
323
+ * - manual (before click): "I've made the deposit" button
324
+ * - auto_ui / manual (after click): "Processing deposit transactions" spinner card
325
+ * - auto_silent: nothing (null)
326
+ */
327
+ declare function DepositPollingUi({ depositConfirmationMode, showWaitingUi, hasExecution, onIveDeposited, }: DepositPollingUiProps): react_jsx_runtime.JSX.Element | null;
328
+
267
329
  interface CurrencyListItemProps {
268
330
  currency: FiatCurrency;
269
331
  isSelected: boolean;
@@ -637,4 +699,4 @@ declare function cn(...inputs: ClassValue[]): string;
637
699
  */
638
700
  declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
639
701
 
640
- 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, clearQRCodeCache, cn, colors, defaultColors, getColors, isQRCodeCached, mergeColors, preloadQRCode, resolveComponentTokens, truncateAddress, useAllowedCountry, useTheme };
702
+ 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 };