@unifold/ui-react 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -0
- package/dist/assets/fonts/Sons-Black.ttf +0 -0
- package/dist/assets/fonts/Sons-BlackItalic.ttf +0 -0
- package/dist/assets/fonts/Sons-Bold.ttf +0 -0
- package/dist/assets/fonts/Sons-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/Sons-Extrabold.ttf +0 -0
- package/dist/assets/fonts/Sons-ExtraboldItalic.ttf +0 -0
- package/dist/assets/fonts/Sons-Light.ttf +0 -0
- package/dist/assets/fonts/Sons-LightItalic.ttf +0 -0
- package/dist/assets/fonts/Sons-Medium.ttf +0 -0
- package/dist/assets/fonts/Sons-MediumItalic.ttf +0 -0
- package/dist/assets/fonts/Sons-Regular.ttf +0 -0
- package/dist/assets/fonts/Sons-RegularItalic.ttf +0 -0
- package/dist/assets/fonts/Sons-Semibold.ttf +0 -0
- package/dist/assets/fonts/Sons-SemiboldItalic.ttf +0 -0
- package/dist/assets/fonts/Sons-Thin.ttf +0 -0
- package/dist/assets/fonts/Sons-ThinItalic.ttf +0 -0
- package/dist/index.d.mts +565 -0
- package/dist/index.d.ts +565 -0
- package/dist/index.js +2847 -0
- package/dist/index.mjs +2763 -0
- package/dist/styles.css +1 -0
- package/package.json +70 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
7
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
8
|
+
import { ClassValue } from 'clsx';
|
|
9
|
+
|
|
10
|
+
interface DepositModalProps {
|
|
11
|
+
open: boolean;
|
|
12
|
+
onOpenChange: (open: boolean) => void;
|
|
13
|
+
userId: string;
|
|
14
|
+
publishableKey: string;
|
|
15
|
+
modalTitle?: string;
|
|
16
|
+
destinationTokenSymbol?: string;
|
|
17
|
+
recipientAddress?: string;
|
|
18
|
+
destinationChainId?: string;
|
|
19
|
+
destinationTokenAddress?: string;
|
|
20
|
+
hideDepositTracker?: boolean;
|
|
21
|
+
onDepositSuccess?: (data: {
|
|
22
|
+
message: string;
|
|
23
|
+
transaction?: unknown;
|
|
24
|
+
executionId?: string;
|
|
25
|
+
}) => void;
|
|
26
|
+
onDepositError?: (error: {
|
|
27
|
+
message: string;
|
|
28
|
+
error?: unknown;
|
|
29
|
+
code?: string;
|
|
30
|
+
}) => void;
|
|
31
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
32
|
+
}
|
|
33
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainId, destinationTokenAddress, hideDepositTracker, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
interface DepositHeaderProps {
|
|
36
|
+
title: string;
|
|
37
|
+
showBack?: boolean;
|
|
38
|
+
showClose?: boolean;
|
|
39
|
+
onBack?: () => void;
|
|
40
|
+
onClose?: () => void;
|
|
41
|
+
badge?: {
|
|
42
|
+
count: number;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
declare function DepositHeader({ title, showBack, showClose, onBack, onClose, badge, }: DepositHeaderProps): react_jsx_runtime.JSX.Element;
|
|
46
|
+
|
|
47
|
+
interface TransferCryptoProps {
|
|
48
|
+
userId: string;
|
|
49
|
+
publishableKey: string;
|
|
50
|
+
recipientAddress?: string;
|
|
51
|
+
destinationChainId?: string;
|
|
52
|
+
destinationTokenAddress?: string;
|
|
53
|
+
copyButtonMode?: "compact" | "fullWidth";
|
|
54
|
+
onExecutionsChange?: (executions: any[]) => void;
|
|
55
|
+
onDepositSuccess?: (data: {
|
|
56
|
+
message: string;
|
|
57
|
+
transaction?: unknown;
|
|
58
|
+
executionId?: string;
|
|
59
|
+
}) => void;
|
|
60
|
+
onDepositError?: (error: {
|
|
61
|
+
message: string;
|
|
62
|
+
error?: unknown;
|
|
63
|
+
code?: string;
|
|
64
|
+
}) => void;
|
|
65
|
+
}
|
|
66
|
+
declare function TransferCrypto(props: TransferCryptoProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
|
|
68
|
+
interface TransferCrypto2Props {
|
|
69
|
+
userId: string;
|
|
70
|
+
publishableKey: string;
|
|
71
|
+
recipientAddress?: string;
|
|
72
|
+
destinationChainId?: string;
|
|
73
|
+
destinationTokenAddress?: string;
|
|
74
|
+
copyButtonMode?: "compact" | "fullWidth";
|
|
75
|
+
onExecutionsChange?: (executions: any[]) => void;
|
|
76
|
+
}
|
|
77
|
+
declare function TransferCrypto2(props: TransferCrypto2Props): react_jsx_runtime.JSX.Element;
|
|
78
|
+
|
|
79
|
+
declare function setApiConfig(config: {
|
|
80
|
+
baseUrl?: string;
|
|
81
|
+
publishableKey?: string;
|
|
82
|
+
defaultConfig?: {
|
|
83
|
+
destinationChainId?: string;
|
|
84
|
+
destinationTokenAddress?: string;
|
|
85
|
+
recipientAddress?: string;
|
|
86
|
+
};
|
|
87
|
+
}): void;
|
|
88
|
+
declare function getApiBaseUrl(): string;
|
|
89
|
+
/**
|
|
90
|
+
* Build an icon URL using the API base URL
|
|
91
|
+
* Converts relative paths like "/icons/networks/ethereum.svg" to full URLs
|
|
92
|
+
* like "http://localhost:3002/api/public/icons/networks/ethereum.svg"
|
|
93
|
+
*/
|
|
94
|
+
declare function getIconUrl(iconPath: string): string;
|
|
95
|
+
interface Wallet {
|
|
96
|
+
id: string;
|
|
97
|
+
chain_type: "ethereum" | "solana" | "bitcoin";
|
|
98
|
+
address_type: string | null;
|
|
99
|
+
address: string;
|
|
100
|
+
destination_chain_type: string;
|
|
101
|
+
destination_chain_id: string;
|
|
102
|
+
destination_token_address: string;
|
|
103
|
+
recipient_address: string;
|
|
104
|
+
is_primary: boolean;
|
|
105
|
+
}
|
|
106
|
+
interface EOAResponse {
|
|
107
|
+
data: Wallet[];
|
|
108
|
+
}
|
|
109
|
+
interface CreateEOARequest {
|
|
110
|
+
user_id: string;
|
|
111
|
+
destination_chain_type: string;
|
|
112
|
+
destination_chain_id: string;
|
|
113
|
+
destination_token_address: string;
|
|
114
|
+
recipient_address: string;
|
|
115
|
+
client_metadata?: Record<string, unknown>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Create EOA wallets for a user
|
|
119
|
+
* @param overrides - Override default configuration (user_id, recipient_address, etc.)
|
|
120
|
+
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
121
|
+
*/
|
|
122
|
+
declare function createEOA(overrides?: Partial<CreateEOARequest>, publishableKey?: string): Promise<EOAResponse>;
|
|
123
|
+
/**
|
|
124
|
+
* Get wallet address for a specific chain type
|
|
125
|
+
*/
|
|
126
|
+
declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin"): Wallet | undefined;
|
|
127
|
+
interface AutoSwapRequest {
|
|
128
|
+
wallet_id: string;
|
|
129
|
+
origin_currency: string;
|
|
130
|
+
}
|
|
131
|
+
declare enum ExecutionStatus {
|
|
132
|
+
DELAYED = "delayed",
|
|
133
|
+
FAILED = "failed",
|
|
134
|
+
PENDING = "pending",
|
|
135
|
+
REFUNDED = "refunded",
|
|
136
|
+
SUCCEEDED = "succeeded",
|
|
137
|
+
WAITING = "waiting"
|
|
138
|
+
}
|
|
139
|
+
interface AutoSwapResponse {
|
|
140
|
+
id: string;
|
|
141
|
+
project_id: string;
|
|
142
|
+
user_id: string;
|
|
143
|
+
wallet_id: string;
|
|
144
|
+
transaction_hash: string;
|
|
145
|
+
recipient_address: string;
|
|
146
|
+
provider: string;
|
|
147
|
+
provider_id: string;
|
|
148
|
+
source_chain_type: string;
|
|
149
|
+
source_chain_id: string;
|
|
150
|
+
source_token_address: string;
|
|
151
|
+
destination_chain_type: string;
|
|
152
|
+
destination_chain_id: string;
|
|
153
|
+
destination_token_address: string;
|
|
154
|
+
source_amount_base_unit: string;
|
|
155
|
+
destination_amount_base_unit: string;
|
|
156
|
+
provider_metadata: unknown;
|
|
157
|
+
created_at?: string;
|
|
158
|
+
updated_at?: string;
|
|
159
|
+
explorer_url: string;
|
|
160
|
+
destination_transaction_hashes: string[];
|
|
161
|
+
status: ExecutionStatus;
|
|
162
|
+
source_token_metadata?: {
|
|
163
|
+
icon_url: string;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
declare const SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
167
|
+
interface QueryExecutionsRequest {
|
|
168
|
+
external_user_id: string;
|
|
169
|
+
}
|
|
170
|
+
interface QueryExecutionsResponse {
|
|
171
|
+
data: AutoSwapResponse[];
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Query all direct executions for a user
|
|
175
|
+
* Returns ALL executions - filter client-side for new ones
|
|
176
|
+
* @param externalUserId - External user ID
|
|
177
|
+
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
178
|
+
*/
|
|
179
|
+
declare function queryExecutions(externalUserId: string, publishableKey?: string): Promise<QueryExecutionsResponse>;
|
|
180
|
+
interface SupportedChain {
|
|
181
|
+
chain_id: string;
|
|
182
|
+
chain_name: string;
|
|
183
|
+
chain_type: string;
|
|
184
|
+
icon_url: string;
|
|
185
|
+
token_address: string;
|
|
186
|
+
estimated_price_impact_percent: number;
|
|
187
|
+
max_slippage_percent: number;
|
|
188
|
+
estimated_processing_time: number | null;
|
|
189
|
+
minimum_deposit_amount_usd: number;
|
|
190
|
+
}
|
|
191
|
+
interface SupportedToken {
|
|
192
|
+
symbol: string;
|
|
193
|
+
name: string;
|
|
194
|
+
icon_url: string;
|
|
195
|
+
is_newly_added: boolean;
|
|
196
|
+
chains: SupportedChain[];
|
|
197
|
+
}
|
|
198
|
+
interface SupportedDepositTokensResponse {
|
|
199
|
+
data: SupportedToken[];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get supported deposit tokens
|
|
203
|
+
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
204
|
+
*/
|
|
205
|
+
declare function getSupportedDepositTokens(publishableKey?: string): Promise<SupportedDepositTokensResponse>;
|
|
206
|
+
interface MeldQuote {
|
|
207
|
+
transaction_type: string;
|
|
208
|
+
payment_method_type: string;
|
|
209
|
+
source_amount: number;
|
|
210
|
+
source_amount_without_fees: number;
|
|
211
|
+
fiat_amount_without_fees: number;
|
|
212
|
+
destination_amount_without_fees: number | null;
|
|
213
|
+
source_currency_code: string;
|
|
214
|
+
country_code: string;
|
|
215
|
+
total_fee: number;
|
|
216
|
+
network_fee: number;
|
|
217
|
+
transaction_fee: number;
|
|
218
|
+
destination_amount: number;
|
|
219
|
+
destination_currency_code: string;
|
|
220
|
+
exchange_rate: number;
|
|
221
|
+
customer_score: number;
|
|
222
|
+
service_provider: string;
|
|
223
|
+
service_provider_display_name: string;
|
|
224
|
+
institution_name: string | null;
|
|
225
|
+
low_kyc: boolean | null;
|
|
226
|
+
partner_fee: number | null;
|
|
227
|
+
icon_url: string;
|
|
228
|
+
}
|
|
229
|
+
interface MeldQuotesRequest {
|
|
230
|
+
country_code: string;
|
|
231
|
+
destination_currency_code: string;
|
|
232
|
+
source_amount: string;
|
|
233
|
+
source_currency_code: string;
|
|
234
|
+
}
|
|
235
|
+
interface MeldQuotesResponse {
|
|
236
|
+
data: MeldQuote[];
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Get Meld onramp quotes
|
|
240
|
+
* @param request - Meld quotes request
|
|
241
|
+
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
242
|
+
*/
|
|
243
|
+
declare function getMeldQuotes(request: MeldQuotesRequest, publishableKey?: string): Promise<MeldQuotesResponse>;
|
|
244
|
+
interface MeldSessionRequest {
|
|
245
|
+
service_provider: string;
|
|
246
|
+
country_code: string;
|
|
247
|
+
destination_currency_code: string;
|
|
248
|
+
source_currency_code: string;
|
|
249
|
+
wallet_address: string;
|
|
250
|
+
source_amount: string;
|
|
251
|
+
}
|
|
252
|
+
interface MeldSessionResponse {
|
|
253
|
+
id: string;
|
|
254
|
+
external_session_id: string | null;
|
|
255
|
+
external_customer_id: string | null;
|
|
256
|
+
customer_id: string;
|
|
257
|
+
widget_url: string;
|
|
258
|
+
service_provider_widget_url: string;
|
|
259
|
+
token: string;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Create a Meld onramp session
|
|
263
|
+
* @param request - Meld session request
|
|
264
|
+
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
265
|
+
*/
|
|
266
|
+
declare function createMeldSession(request: MeldSessionRequest, publishableKey?: string): Promise<MeldSessionResponse>;
|
|
267
|
+
interface FiatCurrency {
|
|
268
|
+
currency_code: string;
|
|
269
|
+
name: string;
|
|
270
|
+
icon_url: string;
|
|
271
|
+
}
|
|
272
|
+
interface FiatCurrenciesResponse {
|
|
273
|
+
data: FiatCurrency[];
|
|
274
|
+
preferred: string[];
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Get supported fiat currencies
|
|
278
|
+
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
279
|
+
*/
|
|
280
|
+
declare function getFiatCurrencies(publishableKey?: string): Promise<FiatCurrenciesResponse>;
|
|
281
|
+
|
|
282
|
+
type LayoutVariant = "horizontal" | "vertical";
|
|
283
|
+
interface TransferCryptoBaseProps {
|
|
284
|
+
userId: string;
|
|
285
|
+
publishableKey: string;
|
|
286
|
+
recipientAddress?: string;
|
|
287
|
+
destinationChainId?: string;
|
|
288
|
+
destinationTokenAddress?: string;
|
|
289
|
+
copyButtonMode?: "compact" | "fullWidth";
|
|
290
|
+
layoutVariant?: LayoutVariant;
|
|
291
|
+
showDetailedDropdowns?: boolean;
|
|
292
|
+
onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
|
|
293
|
+
onDepositSuccess?: (data: {
|
|
294
|
+
message: string;
|
|
295
|
+
transaction?: unknown;
|
|
296
|
+
executionId?: string;
|
|
297
|
+
}) => void;
|
|
298
|
+
onDepositError?: (error: {
|
|
299
|
+
message: string;
|
|
300
|
+
error?: unknown;
|
|
301
|
+
code?: string;
|
|
302
|
+
}) => void;
|
|
303
|
+
}
|
|
304
|
+
declare function TransferCryptoBase({ userId, publishableKey, recipientAddress, destinationChainId, destinationTokenAddress, copyButtonMode, layoutVariant, showDetailedDropdowns, onExecutionsChange, onDepositSuccess, onDepositError, }: TransferCryptoBaseProps): react_jsx_runtime.JSX.Element;
|
|
305
|
+
|
|
306
|
+
interface BuyWithCardProps {
|
|
307
|
+
userId: string;
|
|
308
|
+
publishableKey: string;
|
|
309
|
+
view?: "amount" | "quotes" | "onramp";
|
|
310
|
+
onViewChange?: (view: "amount" | "quotes" | "onramp", quotesCount?: number) => void;
|
|
311
|
+
maxAmountUsd?: number;
|
|
312
|
+
accentColor?: string;
|
|
313
|
+
destinationTokenSymbol?: string;
|
|
314
|
+
recipientAddress?: string;
|
|
315
|
+
destinationChainId?: string;
|
|
316
|
+
destinationTokenAddress?: string;
|
|
317
|
+
onDepositSuccess?: (data: {
|
|
318
|
+
message: string;
|
|
319
|
+
transaction?: unknown;
|
|
320
|
+
executionId?: string;
|
|
321
|
+
}) => void;
|
|
322
|
+
onDepositError?: (error: {
|
|
323
|
+
message: string;
|
|
324
|
+
error?: unknown;
|
|
325
|
+
code?: string;
|
|
326
|
+
}) => void;
|
|
327
|
+
themeClass?: string;
|
|
328
|
+
}
|
|
329
|
+
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainId, destinationTokenAddress, themeClass, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
330
|
+
|
|
331
|
+
interface CurrencyModalProps {
|
|
332
|
+
open: boolean;
|
|
333
|
+
onOpenChange: (open: boolean) => void;
|
|
334
|
+
currencies: FiatCurrency[];
|
|
335
|
+
preferredCurrencyCodes: string[];
|
|
336
|
+
selectedCurrency: string;
|
|
337
|
+
onSelectCurrency: (currencyCode: string) => void;
|
|
338
|
+
themeClass?: string;
|
|
339
|
+
}
|
|
340
|
+
declare function CurrencyModal({ open, onOpenChange, currencies, preferredCurrencyCodes, selectedCurrency, onSelectCurrency, themeClass, }: CurrencyModalProps): react_jsx_runtime.JSX.Element;
|
|
341
|
+
|
|
342
|
+
interface DepositSuccessToastProps {
|
|
343
|
+
depositTx: string;
|
|
344
|
+
completionTx?: string;
|
|
345
|
+
orderSubmittedAt: string;
|
|
346
|
+
orderFilledAt: string;
|
|
347
|
+
explorerUrl: string;
|
|
348
|
+
completionExplorerUrl?: string;
|
|
349
|
+
status: ExecutionStatus;
|
|
350
|
+
tokenIconUrl?: string;
|
|
351
|
+
onClose: () => void;
|
|
352
|
+
}
|
|
353
|
+
declare function DepositSuccessToast({ depositTx, completionTx, orderSubmittedAt, orderFilledAt, explorerUrl, completionExplorerUrl, status, tokenIconUrl, onClose, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
|
|
354
|
+
|
|
355
|
+
interface DepositsModalProps {
|
|
356
|
+
open: boolean;
|
|
357
|
+
onOpenChange: (open: boolean) => void;
|
|
358
|
+
executions: AutoSwapResponse[];
|
|
359
|
+
userId: string;
|
|
360
|
+
publishableKey: string;
|
|
361
|
+
themeClass?: string;
|
|
362
|
+
}
|
|
363
|
+
declare function DepositsModal({ open, onOpenChange, executions: sessionExecutions, userId, publishableKey, themeClass, }: DepositsModalProps): react_jsx_runtime.JSX.Element;
|
|
364
|
+
|
|
365
|
+
interface StyledQRCodeProps {
|
|
366
|
+
value: string;
|
|
367
|
+
size?: number;
|
|
368
|
+
imageUrl?: string;
|
|
369
|
+
imageSize?: number;
|
|
370
|
+
darkMode?: boolean;
|
|
371
|
+
}
|
|
372
|
+
declare function StyledQRCode({ value, size, imageUrl, imageSize, darkMode, }: StyledQRCodeProps): react_jsx_runtime.JSX.Element;
|
|
373
|
+
|
|
374
|
+
interface TransferCryptoButtonProps {
|
|
375
|
+
onClick: () => void;
|
|
376
|
+
title: string;
|
|
377
|
+
subtitle: string;
|
|
378
|
+
}
|
|
379
|
+
declare function TransferCryptoButton({ onClick, title, subtitle, }: TransferCryptoButtonProps): react_jsx_runtime.JSX.Element;
|
|
380
|
+
|
|
381
|
+
interface DepositWithCardButtonProps {
|
|
382
|
+
onClick: () => void;
|
|
383
|
+
title: string;
|
|
384
|
+
subtitle: string;
|
|
385
|
+
}
|
|
386
|
+
declare function DepositWithCardButton({ onClick, title, subtitle, }: DepositWithCardButtonProps): react_jsx_runtime.JSX.Element;
|
|
387
|
+
|
|
388
|
+
interface DepositTrackerButtonProps {
|
|
389
|
+
onClick: () => void;
|
|
390
|
+
title: string;
|
|
391
|
+
subtitle: string;
|
|
392
|
+
badge?: number;
|
|
393
|
+
}
|
|
394
|
+
declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: DepositTrackerButtonProps): react_jsx_runtime.JSX.Element;
|
|
395
|
+
|
|
396
|
+
interface DepositExecutionItemProps {
|
|
397
|
+
execution: AutoSwapResponse;
|
|
398
|
+
showCloseButton?: boolean;
|
|
399
|
+
onClose?: () => void;
|
|
400
|
+
}
|
|
401
|
+
declare function DepositExecutionItem({ execution, showCloseButton, onClose, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
|
|
402
|
+
|
|
403
|
+
interface CurrencyListItemProps {
|
|
404
|
+
currency: FiatCurrency;
|
|
405
|
+
isSelected: boolean;
|
|
406
|
+
onSelect: (currencyCode: string) => void;
|
|
407
|
+
}
|
|
408
|
+
declare function CurrencyListItem({ currency, isSelected, onSelect, }: CurrencyListItemProps): react_jsx_runtime.JSX.Element;
|
|
409
|
+
|
|
410
|
+
interface CurrencyListSectionProps {
|
|
411
|
+
title: string;
|
|
412
|
+
currencies: FiatCurrency[];
|
|
413
|
+
selectedCurrency: string;
|
|
414
|
+
onSelect: (currencyCode: string) => void;
|
|
415
|
+
}
|
|
416
|
+
declare function CurrencyListSection({ title, currencies, selectedCurrency, onSelect, }: CurrencyListSectionProps): react_jsx_runtime.JSX.Element | null;
|
|
417
|
+
|
|
418
|
+
declare const buttonVariants: (props?: ({
|
|
419
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
420
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
421
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
422
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
423
|
+
asChild?: boolean;
|
|
424
|
+
}
|
|
425
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
426
|
+
|
|
427
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
428
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
429
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
430
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
431
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
432
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
433
|
+
declare const DialogHeader: {
|
|
434
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
435
|
+
displayName: string;
|
|
436
|
+
};
|
|
437
|
+
declare const DialogFooter: {
|
|
438
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
439
|
+
displayName: string;
|
|
440
|
+
};
|
|
441
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
442
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
443
|
+
|
|
444
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
445
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
446
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
447
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
448
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
449
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
450
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
451
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
452
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
453
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
454
|
+
|
|
455
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
456
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
457
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
458
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* User IP information interface
|
|
462
|
+
*/
|
|
463
|
+
interface UserIpInfo {
|
|
464
|
+
alpha2: string;
|
|
465
|
+
state?: string;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Hook to fetch user's IP-based location information
|
|
469
|
+
*
|
|
470
|
+
* Implements a two-tier fallback strategy:
|
|
471
|
+
* 1. Primary: Moonpay IP API (if API key is provided)
|
|
472
|
+
* 2. Fallback: ipapi.co
|
|
473
|
+
*
|
|
474
|
+
* The result is cached in-memory using React Query:
|
|
475
|
+
* - Data persists for the entire browser session
|
|
476
|
+
* - Shared across all components using this hook
|
|
477
|
+
* - Reduces API calls and protects against rate limiting
|
|
478
|
+
*
|
|
479
|
+
* @param moonpayApiKey - Optional Moonpay API key for primary lookup
|
|
480
|
+
* @returns User IP information including country code
|
|
481
|
+
*/
|
|
482
|
+
declare function useUserIp(moonpayApiKey?: string): {
|
|
483
|
+
userIpInfo: UserIpInfo | undefined;
|
|
484
|
+
isLoading: boolean;
|
|
485
|
+
error: Error | null;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
interface ThemeContextValue {
|
|
489
|
+
themeClass: string;
|
|
490
|
+
}
|
|
491
|
+
declare function ThemeProvider({ children, themeClass }: {
|
|
492
|
+
children: React.ReactNode;
|
|
493
|
+
themeClass: string;
|
|
494
|
+
}): react_jsx_runtime.JSX.Element;
|
|
495
|
+
declare function useTheme(): ThemeContextValue;
|
|
496
|
+
|
|
497
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
498
|
+
|
|
499
|
+
declare const i18n: {
|
|
500
|
+
transferCrypto: {
|
|
501
|
+
priceImpact: {
|
|
502
|
+
label: string;
|
|
503
|
+
tooltip: string;
|
|
504
|
+
finalCost: string;
|
|
505
|
+
};
|
|
506
|
+
slippage: {
|
|
507
|
+
label: string;
|
|
508
|
+
auto: string;
|
|
509
|
+
tooltip: string;
|
|
510
|
+
finalCost: string;
|
|
511
|
+
};
|
|
512
|
+
processingTime: {
|
|
513
|
+
label: string;
|
|
514
|
+
lessThanMinutes: string;
|
|
515
|
+
lessThanHours: string;
|
|
516
|
+
};
|
|
517
|
+
minDeposit: {
|
|
518
|
+
label: string;
|
|
519
|
+
tooltip: string;
|
|
520
|
+
};
|
|
521
|
+
help: {
|
|
522
|
+
needHelp: string;
|
|
523
|
+
contactSupport: string;
|
|
524
|
+
};
|
|
525
|
+
terms: {
|
|
526
|
+
termsApply: string;
|
|
527
|
+
};
|
|
528
|
+
supportedToken: string;
|
|
529
|
+
supportedChain: string;
|
|
530
|
+
depositAddress: {
|
|
531
|
+
label: string;
|
|
532
|
+
tooltip: string;
|
|
533
|
+
};
|
|
534
|
+
copyAddress: string;
|
|
535
|
+
copied: string;
|
|
536
|
+
loading: string;
|
|
537
|
+
loadingQRCode: string;
|
|
538
|
+
noAddressAvailable: string;
|
|
539
|
+
noChainsAvailable: string;
|
|
540
|
+
};
|
|
541
|
+
depositModal: {
|
|
542
|
+
transferCrypto: {
|
|
543
|
+
title: string;
|
|
544
|
+
subtitle: string;
|
|
545
|
+
};
|
|
546
|
+
depositWithCard: {
|
|
547
|
+
title: string;
|
|
548
|
+
subtitle: string;
|
|
549
|
+
};
|
|
550
|
+
quotes: string;
|
|
551
|
+
};
|
|
552
|
+
buyWithCard: {
|
|
553
|
+
onramp: {
|
|
554
|
+
completeTransaction: string;
|
|
555
|
+
canCloseModal: string;
|
|
556
|
+
youUse: string;
|
|
557
|
+
youBuy: string;
|
|
558
|
+
youReceive: string;
|
|
559
|
+
intentAddressNote: string;
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
type I18nStrings = typeof i18n;
|
|
564
|
+
|
|
565
|
+
export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
|