@unifold/ui-react 0.1.79 → 0.1.81
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 +412 -99
- package/dist/index.d.ts +412 -99
- package/dist/index.js +9816 -5215
- package/dist/index.mjs +9319 -4733
- package/dist/styles-base.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DirectExecutionSucceededEvent, DirectExecutionFailedEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, WalletPayMethod, CoinbaseWalletPaySessionResponse, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, DefaultTokenResponse, ConfirmIntegrationTransferResult, CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, PublicIncidentResponse, WithdrawDirectExecutionFailedEvent, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
2
|
+
import { DirectExecutionSucceededEvent, DirectExecutionFailedEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, WalletPayMethod, CoinbaseWalletPaySessionResponse, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, DefaultTokenResponse, ConfirmIntegrationTransferResult, CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, TokenMetadata, PublicIncidentResponse, WithdrawDirectExecutionFailedEvent, ActionType, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
3
3
|
export { ChainType, DepositMethod } from '@unifold/core';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import { MutableRefObject } from 'react';
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
|
+
import { BrowserWalletProviderErrorStage, EventTracker, AnalyticsProperties, AnalyticsEvent } from '@unifold/analytics';
|
|
8
|
+
import { Wallet as Wallet$1, WalletAccount } from '@wallet-standard/base';
|
|
7
9
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
10
|
import { VariantProps } from 'class-variance-authority';
|
|
9
11
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
12
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
11
13
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
12
|
-
import { EventTracker, AnalyticsProperties, AnalyticsEvent } from '@unifold/analytics';
|
|
13
14
|
import { ClassValue } from 'clsx';
|
|
14
15
|
|
|
15
16
|
/** The two tabs the deposit menu splits funding methods across. */
|
|
@@ -96,52 +97,25 @@ interface UseDepositPollingResult {
|
|
|
96
97
|
}
|
|
97
98
|
declare function useDepositPolling({ userId, publishableKey, clientSecret, depositConfirmationMode, depositWalletId, depositWalletIds, enabled, immediateDirectPolling, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
declare global {
|
|
120
|
-
interface Window {
|
|
121
|
-
phantom?: {
|
|
122
|
-
solana?: PhantomSolanaProvider;
|
|
123
|
-
ethereum?: EthereumProvider;
|
|
124
|
-
};
|
|
125
|
-
solana?: PhantomSolanaProvider;
|
|
126
|
-
ethereum?: EthereumProvider;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
interface PhantomSolanaProvider {
|
|
130
|
-
isPhantom?: boolean;
|
|
131
|
-
isConnected?: boolean;
|
|
132
|
-
publicKey?: {
|
|
133
|
-
toString(): string;
|
|
100
|
+
type WalletType = 'phantom-solana' | 'phantom-ethereum' | 'metamask' | 'coinbase' | 'solflare' | 'backpack' | 'glow' | 'trust' | 'trust-solana' | 'rainbow' | 'rabby' | 'okx' | 'robinhood';
|
|
101
|
+
interface BrowserWalletInfo {
|
|
102
|
+
type: WalletType;
|
|
103
|
+
name: string;
|
|
104
|
+
address: string;
|
|
105
|
+
balance?: string;
|
|
106
|
+
balanceUsd?: string;
|
|
107
|
+
icon: string;
|
|
108
|
+
depositWallet?: {
|
|
109
|
+
id: string;
|
|
110
|
+
chain_type: ChainType;
|
|
111
|
+
address_type: string | null;
|
|
112
|
+
address: string;
|
|
113
|
+
destination_chain_type: ChainType;
|
|
114
|
+
destination_chain_id: string;
|
|
115
|
+
destination_token_address: string;
|
|
116
|
+
recipient_address: string;
|
|
117
|
+
is_primary: boolean;
|
|
134
118
|
};
|
|
135
|
-
connect(opts?: {
|
|
136
|
-
onlyIfTrusted?: boolean;
|
|
137
|
-
}): Promise<{
|
|
138
|
-
publicKey: {
|
|
139
|
-
toString(): string;
|
|
140
|
-
};
|
|
141
|
-
}>;
|
|
142
|
-
disconnect(): Promise<void>;
|
|
143
|
-
on(event: string, callback: (...args: unknown[]) => void): void;
|
|
144
|
-
off(event: string, callback: (...args: unknown[]) => void): void;
|
|
145
119
|
}
|
|
146
120
|
|
|
147
121
|
/** Quick amount chips on the browser wallet "Enter amount" step */
|
|
@@ -229,6 +203,8 @@ interface DepositModalProps {
|
|
|
229
203
|
showBalanceHeader?: boolean;
|
|
230
204
|
/** Input variant for Transfer Crypto view: "single_input" or "double_input" (default) */
|
|
231
205
|
transferInputVariant?: 'single_input' | 'double_input';
|
|
206
|
+
/** Transfer Crypto: show the reference exchange-rate row. @default false */
|
|
207
|
+
showTransferCryptoExchangeRate?: boolean;
|
|
232
208
|
/** Controls when deposit polling starts and what UI is shown.
|
|
233
209
|
* - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
|
|
234
210
|
* - "auto_silent": After 10s, starts polling silently (no waiting UI)
|
|
@@ -289,7 +265,7 @@ interface DepositModalProps {
|
|
|
289
265
|
applePayTitle?: string;
|
|
290
266
|
/**
|
|
291
267
|
* Subtitle shown for the Apple Pay row in the main menu.
|
|
292
|
-
* @default `"Instant"` (localized from `depositModal.applePayMenu.subtitle`)
|
|
268
|
+
* @default `"Instant • Debit card only"` (localized from `depositModal.applePayMenu.subtitle`)
|
|
293
269
|
*/
|
|
294
270
|
applePaySubTitle?: string;
|
|
295
271
|
/**
|
|
@@ -306,7 +282,7 @@ interface DepositModalProps {
|
|
|
306
282
|
googlePayTitle?: string;
|
|
307
283
|
/**
|
|
308
284
|
* Subtitle shown for the Google Pay row in the main menu.
|
|
309
|
-
* @default `"Instant"` (localized from `depositModal.googlePayMenu.subtitle`)
|
|
285
|
+
* @default `"Instant • Debit card only"` (localized from `depositModal.googlePayMenu.subtitle`)
|
|
310
286
|
*/
|
|
311
287
|
googlePaySubTitle?: string;
|
|
312
288
|
/**
|
|
@@ -368,7 +344,7 @@ interface DepositModalProps {
|
|
|
368
344
|
*/
|
|
369
345
|
displayMode?: DepositMenuLayoutType;
|
|
370
346
|
}
|
|
371
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, prefilledAmountUsd, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableTransferCrypto, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, enableApplePay, applePayTitle: applePayTitleProp, applePaySubTitle: applePaySubTitleProp, enableGooglePay, googlePayTitle: googlePayTitleProp, googlePaySubTitle: googlePaySubTitleProp, enableBankTransfer, enableIncidentBanner, enableStripeLink, onrampDestinationAmount, userEmail, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, layout, displayMode, transferCryptoTitle: transferCryptoTitleProp, depositWithCardTitle: depositWithCardTitleProp, payWithExchangeTitle: payWithExchangeTitleProp, depositTrackerTitle: depositTrackerTitleProp, depositTrackerSubTitle: depositTrackerSubTitleProp, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
347
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, prefilledAmountUsd, hideDepositTracker, showBalanceHeader, transferInputVariant, showTransferCryptoExchangeRate, depositConfirmationMode, enableTransferCrypto, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, enableApplePay, applePayTitle: applePayTitleProp, applePaySubTitle: applePaySubTitleProp, enableGooglePay, googlePayTitle: googlePayTitleProp, googlePaySubTitle: googlePaySubTitleProp, enableBankTransfer, enableIncidentBanner, enableStripeLink, onrampDestinationAmount, userEmail, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, layout, displayMode, transferCryptoTitle: transferCryptoTitleProp, depositWithCardTitle: depositWithCardTitleProp, payWithExchangeTitle: payWithExchangeTitleProp, depositTrackerTitle: depositTrackerTitleProp, depositTrackerSubTitle: depositTrackerSubTitleProp, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
372
348
|
|
|
373
349
|
interface DepositHeaderProps {
|
|
374
350
|
title: string;
|
|
@@ -439,7 +415,7 @@ interface TransferCryptoSingleInputProps {
|
|
|
439
415
|
minimumDepositAmountUsd: number;
|
|
440
416
|
isStablecoin: boolean;
|
|
441
417
|
}) => void;
|
|
442
|
-
/** Optional USD
|
|
418
|
+
/** Optional USD prefill. You send is omitted when this is set. */
|
|
443
419
|
prefilledAmountUsd?: string;
|
|
444
420
|
/** Checkout mode: estimated source amount to send (from /public/quotes). Shown above the QR code. */
|
|
445
421
|
checkoutQuote?: {
|
|
@@ -455,8 +431,10 @@ interface TransferCryptoSingleInputProps {
|
|
|
455
431
|
persistCheckingIndicator?: boolean;
|
|
456
432
|
/** Product context sent to the API — "deposit" (default) or "payment". */
|
|
457
433
|
productType?: ProductType;
|
|
434
|
+
/** Show the reference exchange-rate row between selected and destination token. */
|
|
435
|
+
showExchangeRate?: boolean;
|
|
458
436
|
}
|
|
459
|
-
declare function TransferCryptoSingleInput({ userId, publishableKey, clientSecret, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, onSourceTokenChange, prefilledAmountUsd, checkoutQuote, isCheckoutQuoteLoading, persistCheckingIndicator, productType, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
|
|
437
|
+
declare function TransferCryptoSingleInput({ userId, publishableKey, clientSecret, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, onSourceTokenChange, prefilledAmountUsd, checkoutQuote, isCheckoutQuoteLoading, persistCheckingIndicator, productType, showExchangeRate, }: TransferCryptoSingleInputProps): react_jsx_runtime.JSX.Element;
|
|
460
438
|
|
|
461
439
|
interface TransferCryptoDoubleInputProps {
|
|
462
440
|
userId: string;
|
|
@@ -469,7 +447,7 @@ interface TransferCryptoDoubleInputProps {
|
|
|
469
447
|
defaultSourceChainId?: string;
|
|
470
448
|
defaultSourceTokenAddress?: string;
|
|
471
449
|
defaultSourceSymbol?: string;
|
|
472
|
-
/** Optional USD
|
|
450
|
+
/** Optional USD prefill. You send is omitted when this is set. */
|
|
473
451
|
prefilledAmountUsd?: string;
|
|
474
452
|
/** Controls when polling starts and whether a waiting UI is shown.
|
|
475
453
|
* - "auto_ui": After 10s, starts polling and shows "Processing..." card (default)
|
|
@@ -490,14 +468,18 @@ interface TransferCryptoDoubleInputProps {
|
|
|
490
468
|
code?: string;
|
|
491
469
|
}) => void;
|
|
492
470
|
wallets?: Wallet[];
|
|
471
|
+
/** Show the reference exchange-rate row between selected and destination token. */
|
|
472
|
+
showExchangeRate?: boolean;
|
|
493
473
|
}
|
|
494
|
-
declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol,
|
|
474
|
+
declare function TransferCryptoDoubleInput({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, depositConfirmationMode, onExecutionsChange, onDepositSuccess, onDepositError, wallets: externalWallets, showExchangeRate, }: TransferCryptoDoubleInputProps): react_jsx_runtime.JSX.Element;
|
|
495
475
|
|
|
476
|
+
type CardView = 'amount' | 'quotes' | 'review';
|
|
496
477
|
interface BuyWithCardProps {
|
|
497
478
|
userId: string;
|
|
498
479
|
publishableKey: string;
|
|
499
|
-
view?:
|
|
500
|
-
onViewChange?: (view:
|
|
480
|
+
view?: CardView;
|
|
481
|
+
onViewChange?: (view: CardView, quotesCount?: number) => void;
|
|
482
|
+
projectName?: string;
|
|
501
483
|
maxAmountUsd?: number;
|
|
502
484
|
accentColor?: string;
|
|
503
485
|
destinationTokenSymbol?: string;
|
|
@@ -535,10 +517,10 @@ interface BuyWithCardProps {
|
|
|
535
517
|
*/
|
|
536
518
|
destinationAmount?: string;
|
|
537
519
|
}
|
|
538
|
-
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, // Keep prop for backward compatibility but don't use default
|
|
539
|
-
destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onDepositSuccess, onDepositError, onEvent, themeClass, wallets: externalWallets, assetCdnUrl, hideDepositFlowInfo, hideDisplayDescription, prefilledAmountUsd, destinationAmount, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
520
|
+
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, projectName, maxAmountUsd, accentColor, // Keep prop for backward compatibility but don't use default
|
|
521
|
+
destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, onDepositSuccess, onDepositError, onEvent, themeClass, wallets: externalWallets, assetCdnUrl, hideDepositFlowInfo: _hideDepositFlowInfo, hideDisplayDescription: _hideDisplayDescription, prefilledAmountUsd, destinationAmount, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
540
522
|
|
|
541
|
-
type WalletPayView = 'loading_config' | 'disabled' | '
|
|
523
|
+
type WalletPayView = 'loading_config' | 'disabled' | 'contact_input' | 'submitting_session' | 'email_otp' | 'phone_otp' | 'amount' | 'creating_order' | 'payment' | 'checking_deposit' | 'delivering' | 'success' | 'guest_limit_reached' | 'limit_upgrade_intro' | 'limit_upgrade_form' | 'limit_upgrade_submitting' | 'limit_upgrade_failed';
|
|
542
524
|
type View = WalletPayView;
|
|
543
525
|
interface BuyWithWalletPayProps {
|
|
544
526
|
/**
|
|
@@ -645,6 +627,13 @@ interface WalletPayQrCheckoutProps {
|
|
|
645
627
|
/** Coinbase-hosted checkout page for this order. */
|
|
646
628
|
paymentUrl: string;
|
|
647
629
|
quote: WalletPayQuote;
|
|
630
|
+
/**
|
|
631
|
+
* Final-dest Amount Received. When passed (including `null`), replaces the
|
|
632
|
+
* Coinbase session routing currency so we don't label USDC as the project dest.
|
|
633
|
+
*/
|
|
634
|
+
amountReceived?: string | null;
|
|
635
|
+
/** Final-dest chain name. When passed, replaces the Coinbase routing network. */
|
|
636
|
+
destinationNetwork?: string | null;
|
|
648
637
|
}
|
|
649
638
|
/**
|
|
650
639
|
* Desktop hand-off for the headless Coinbase device wallets: the code to scan,
|
|
@@ -659,7 +648,7 @@ interface WalletPayQrCheckoutProps {
|
|
|
659
648
|
* Payment happens entirely on Coinbase's side, on another device, so nothing
|
|
660
649
|
* here reports back — the parent polls the provider and the chain.
|
|
661
650
|
*/
|
|
662
|
-
declare function WalletPayQrCheckout({ method, paymentUrl, quote }: WalletPayQrCheckoutProps): react_jsx_runtime.JSX.Element;
|
|
651
|
+
declare function WalletPayQrCheckout({ method, paymentUrl, quote, amountReceived: amountReceivedOverride, destinationNetwork: destinationNetworkOverride, }: WalletPayQrCheckoutProps): react_jsx_runtime.JSX.Element;
|
|
663
652
|
|
|
664
653
|
type MobilePlatform = 'ios' | 'android';
|
|
665
654
|
|
|
@@ -779,6 +768,17 @@ interface QRCodeSkeletonProps {
|
|
|
779
768
|
darkMode?: boolean;
|
|
780
769
|
}
|
|
781
770
|
declare function QRCodeSkeleton({ size, darkMode }: QRCodeSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
771
|
+
/**
|
|
772
|
+
* Themed QR used on Transfer Crypto: card border + shadow, 180px code,
|
|
773
|
+
* theme-aware modules. Wallet Pay and Binance Pay use this instead of the
|
|
774
|
+
* larger Cash App white tile.
|
|
775
|
+
*/
|
|
776
|
+
declare function TransferQrCode({ value, imageUrl, errorCorrectionLevel, loading, }: {
|
|
777
|
+
value: string;
|
|
778
|
+
imageUrl?: string;
|
|
779
|
+
errorCorrectionLevel?: ErrorCorrectionLevel;
|
|
780
|
+
loading?: boolean;
|
|
781
|
+
}): react_jsx_runtime.JSX.Element;
|
|
782
782
|
declare function StyledQRCode({ value, size, imageUrl, imageSize, darkMode, errorCorrectionLevel, }: StyledQRCodeProps): react_jsx_runtime.JSX.Element;
|
|
783
783
|
|
|
784
784
|
interface TransferCryptoButtonProps {
|
|
@@ -956,6 +956,9 @@ interface PayWithStripeLinkProps {
|
|
|
956
956
|
email?: string;
|
|
957
957
|
/** URL for the Link logo icon (from CDN) */
|
|
958
958
|
iconUrl?: string;
|
|
959
|
+
projectName?: string;
|
|
960
|
+
assetCdnUrl?: string;
|
|
961
|
+
destinationTokenSymbol?: string;
|
|
959
962
|
/** Controlled step state (optional — for header back button coordination) */
|
|
960
963
|
step?: StripeLinkStep;
|
|
961
964
|
onStepChange?: (step: StripeLinkStep) => void;
|
|
@@ -995,7 +998,7 @@ interface PayWithStripeLinkProps {
|
|
|
995
998
|
* The Stripe publishable key is auto-fetched from the backend via GET /config,
|
|
996
999
|
* so consumers only need their Unifold publishable key.
|
|
997
1000
|
*/
|
|
998
|
-
declare function PayWithStripeLink({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, countryCode, subdivisionCode, wallets: externalWallets, email: emailProp, iconUrl, step: controlledStep, onStepChange, backHandlerRef, onDepositSuccess, onDepositError, onEvent, }: PayWithStripeLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1001
|
+
declare function PayWithStripeLink({ userId, publishableKey, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, countryCode, subdivisionCode, wallets: externalWallets, email: emailProp, iconUrl, projectName, assetCdnUrl, destinationTokenSymbol, step: controlledStep, onStepChange, backHandlerRef, onDepositSuccess, onDepositError, onEvent, }: PayWithStripeLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
999
1002
|
|
|
1000
1003
|
interface DepositExecutionItemProps {
|
|
1001
1004
|
execution: DirectExecutionResponse;
|
|
@@ -1075,6 +1078,8 @@ interface CheckoutModalProps {
|
|
|
1075
1078
|
defaultSourceTokenAddress?: string;
|
|
1076
1079
|
/** Source token symbol (e.g. `"USDC"`). Must be paired with `defaultSourceChainType` + `defaultSourceChainId`. */
|
|
1077
1080
|
defaultSourceSymbol?: string;
|
|
1081
|
+
/** Transfer Crypto: show the reference exchange-rate row. @default false */
|
|
1082
|
+
showTransferCryptoExchangeRate?: boolean;
|
|
1078
1083
|
theme?: 'light' | 'dark' | 'auto';
|
|
1079
1084
|
onCheckoutSuccess?: (data: {
|
|
1080
1085
|
paymentIntentId: string;
|
|
@@ -1096,7 +1101,7 @@ interface CheckoutModalProps {
|
|
|
1096
1101
|
}) => void;
|
|
1097
1102
|
onEvent?: (event: CheckoutEvent) => void;
|
|
1098
1103
|
}
|
|
1099
|
-
declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, enableIncidentBanner, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, onEvent, externalUserId, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
|
|
1104
|
+
declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, enableIncidentBanner, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, showTransferCryptoExchangeRate, theme, onCheckoutSuccess, onCheckoutError, onEvent, externalUserId, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
|
|
1100
1105
|
|
|
1101
1106
|
interface WithdrawTransactionInfo {
|
|
1102
1107
|
/** Source (sending) chain type */
|
|
@@ -1119,7 +1124,15 @@ interface WithdrawTransactionInfo {
|
|
|
1119
1124
|
amount: string;
|
|
1120
1125
|
/** Token amount in base units (smallest denomination). */
|
|
1121
1126
|
amountBaseUnit: string;
|
|
1122
|
-
/**
|
|
1127
|
+
/**
|
|
1128
|
+
* The Unifold deposit wallet address to send funds to.
|
|
1129
|
+
*
|
|
1130
|
+
* Normally on `sourceChainType`. Withdrawing off a chain Unifold can't monitor
|
|
1131
|
+
* (N1) instead gives an address on the chain the funds have to be bridged to
|
|
1132
|
+
* first — for N1 that's Solana, which shares N1's address format, so the two
|
|
1133
|
+
* are indistinguishable by inspection. Send there and Unifold routes the funds
|
|
1134
|
+
* on to `recipientAddress`.
|
|
1135
|
+
*/
|
|
1123
1136
|
withdrawIntentAddress: string;
|
|
1124
1137
|
/** The user-provided final destination address */
|
|
1125
1138
|
recipientAddress: string;
|
|
@@ -1145,6 +1158,24 @@ interface WithdrawModalProps {
|
|
|
1145
1158
|
sourceTokenSymbol?: string;
|
|
1146
1159
|
recipientAddress?: string;
|
|
1147
1160
|
senderAddress: string;
|
|
1161
|
+
/**
|
|
1162
|
+
* Sender token balance in smallest units (e.g. `"1500000"` for 1.5 USDC).
|
|
1163
|
+
* When provided, skips `/addresses/balance` and is the source of truth for
|
|
1164
|
+
* max withdraw, over-balance checks, and amount conversion.
|
|
1165
|
+
*/
|
|
1166
|
+
balanceInBaseUnit?: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* USD value of {@link WithdrawModalProps.balanceInBaseUnit}. When provided,
|
|
1169
|
+
* used for fiat display, max, and crypto↔USD conversion. When omitted, the
|
|
1170
|
+
* modal prices the token (stablecoins assume $1) to compute USD.
|
|
1171
|
+
*/
|
|
1172
|
+
balanceUsd?: string | number;
|
|
1173
|
+
/**
|
|
1174
|
+
* Source token decimals (e.g. `6` for USDC). Used with `balanceInBaseUnit`
|
|
1175
|
+
* to format the human amount without waiting on the token catalog. Falls
|
|
1176
|
+
* back to catalog decimals when omitted.
|
|
1177
|
+
*/
|
|
1178
|
+
sourceTokenDecimals?: number;
|
|
1148
1179
|
/**
|
|
1149
1180
|
* Pre-select the destination (receive) token/chain in the withdraw view.
|
|
1150
1181
|
* All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
|
|
@@ -1173,7 +1204,7 @@ interface WithdrawModalProps {
|
|
|
1173
1204
|
theme?: 'light' | 'dark' | 'auto';
|
|
1174
1205
|
hideOverlay?: boolean;
|
|
1175
1206
|
}
|
|
1176
|
-
declare function WithdrawModal({ open, onOpenChange, publishableKey, modalTitle, externalUserId, sourceChainType, sourceChainId, sourceTokenAddress, sourceTokenSymbol, recipientAddress: recipientAddressProp, senderAddress, defaultDestinationChainType, defaultDestinationChainId, defaultDestinationTokenAddress, defaultDestinationSymbol, onWithdraw, onWithdrawSuccess, onWithdrawError, onEvent, theme, hideOverlay, }: WithdrawModalProps): react_jsx_runtime.JSX.Element;
|
|
1207
|
+
declare function WithdrawModal({ open, onOpenChange, publishableKey, modalTitle, externalUserId, sourceChainType, sourceChainId, sourceTokenAddress, sourceTokenSymbol, recipientAddress: recipientAddressProp, senderAddress, balanceInBaseUnit, balanceUsd, sourceTokenDecimals, defaultDestinationChainType, defaultDestinationChainId, defaultDestinationTokenAddress, defaultDestinationSymbol, onWithdraw, onWithdrawSuccess, onWithdrawError, onEvent, theme, hideOverlay, }: WithdrawModalProps): react_jsx_runtime.JSX.Element;
|
|
1177
1208
|
|
|
1178
1209
|
interface WithdrawTokenSelectorProps {
|
|
1179
1210
|
tokens: DestinationToken[];
|
|
@@ -1192,7 +1223,11 @@ interface WithdrawDoubleInputProps {
|
|
|
1192
1223
|
}
|
|
1193
1224
|
declare function WithdrawDoubleInput({ tokens, selectedTokenSymbol, selectedChainKey, onTokenChange, onChainChange, isLoading, }: WithdrawDoubleInputProps): react_jsx_runtime.JSX.Element;
|
|
1194
1225
|
|
|
1195
|
-
|
|
1226
|
+
/**
|
|
1227
|
+
* Token amount helpers: base-unit ↔ human formatting, host-supplied
|
|
1228
|
+
* balance/decimals parsing, and proportional base-unit scaling.
|
|
1229
|
+
*/
|
|
1230
|
+
interface TokenBalance {
|
|
1196
1231
|
balanceBaseUnit: string;
|
|
1197
1232
|
balanceHuman: string;
|
|
1198
1233
|
balanceUsd: string | null;
|
|
@@ -1200,6 +1235,8 @@ interface AddressBalanceResult {
|
|
|
1200
1235
|
decimals: number;
|
|
1201
1236
|
symbol: string;
|
|
1202
1237
|
}
|
|
1238
|
+
|
|
1239
|
+
type AddressBalanceResult = TokenBalance;
|
|
1203
1240
|
/**
|
|
1204
1241
|
* Hook to fetch a token balance for a given address.
|
|
1205
1242
|
* Uses React Query for caching and deduplication.
|
|
@@ -1211,7 +1248,7 @@ declare function useAddressBalance(params: {
|
|
|
1211
1248
|
tokenAddress?: string;
|
|
1212
1249
|
publishableKey: string;
|
|
1213
1250
|
enabled?: boolean;
|
|
1214
|
-
}): _tanstack_react_query.UseQueryResult<
|
|
1251
|
+
}): _tanstack_react_query.UseQueryResult<TokenBalance | null, Error>;
|
|
1215
1252
|
|
|
1216
1253
|
interface WithdrawFormProps {
|
|
1217
1254
|
publishableKey: string;
|
|
@@ -1271,8 +1308,14 @@ interface WithdrawConfirmingViewProps {
|
|
|
1271
1308
|
executions: DirectExecutionResponse[];
|
|
1272
1309
|
onClose: () => void;
|
|
1273
1310
|
onViewTracker: () => void;
|
|
1311
|
+
/**
|
|
1312
|
+
* Seconds until the funds are expected to land. Worth surfacing while the
|
|
1313
|
+
* spinner is up because a bridged withdrawal (N1) takes about an hour, and
|
|
1314
|
+
* without a number the user has no way to tell that from a stuck transfer.
|
|
1315
|
+
*/
|
|
1316
|
+
estimatedProcessingTime?: number | null;
|
|
1274
1317
|
}
|
|
1275
|
-
declare function WithdrawConfirmingView({ txInfo, executions, onClose, onViewTracker, }: WithdrawConfirmingViewProps): react_jsx_runtime.JSX.Element;
|
|
1318
|
+
declare function WithdrawConfirmingView({ txInfo, executions, onClose, onViewTracker, estimatedProcessingTime, }: WithdrawConfirmingViewProps): react_jsx_runtime.JSX.Element;
|
|
1276
1319
|
|
|
1277
1320
|
declare const HYPERCORE_CHAIN_ID = "1337";
|
|
1278
1321
|
|
|
@@ -1316,6 +1359,106 @@ declare function sendHypercoreWithdraw(params: {
|
|
|
1316
1359
|
|
|
1317
1360
|
declare function detectBrowserWallet(chainType: string, senderAddress?: string): Promise<DetectedWallet | null>;
|
|
1318
1361
|
|
|
1362
|
+
type BrowserWalletErrorReporter = (error: unknown, metadata: {
|
|
1363
|
+
stage: BrowserWalletProviderErrorStage;
|
|
1364
|
+
chainType?: 'ethereum' | 'solana';
|
|
1365
|
+
providerSource?: string;
|
|
1366
|
+
componentStack?: string;
|
|
1367
|
+
/**
|
|
1368
|
+
* The provider threw but we still obtained a usable value, so the wallet
|
|
1369
|
+
* stays available and only telemetry records the incompatibility.
|
|
1370
|
+
*/
|
|
1371
|
+
recovered?: boolean;
|
|
1372
|
+
}) => void;
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Silently detects an already-connected injected browser wallet without triggering
|
|
1376
|
+
* any wallet popups. Solana reads authorized Wallet Standard accounts; Ethereum
|
|
1377
|
+
* uses the read-only `eth_accounts`.
|
|
1378
|
+
* Returns the connected wallet, or `null` when none is connected (or the user
|
|
1379
|
+
* previously disconnected explicitly).
|
|
1380
|
+
*
|
|
1381
|
+
* When the user has previously connected a wallet, its `WalletType` is persisted
|
|
1382
|
+
* in localStorage; on subsequent refreshes we move that candidate to the front of
|
|
1383
|
+
* the scan so multi-wallet setups (e.g. MetaMask + Phantom installed, Phantom
|
|
1384
|
+
* Solana also connected) don't always resolve to whichever provider happens to be
|
|
1385
|
+
* iterated first.
|
|
1386
|
+
*/
|
|
1387
|
+
declare function detectConnectedBrowserWallet(chainType?: 'ethereum' | 'solana', reportError?: BrowserWalletErrorReporter): Promise<BrowserWalletInfo | null>;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* Inline this in `<head>` so announce events that fire before React boots
|
|
1391
|
+
* (MetaMask/Rainbow at document_start) are not lost. Splits Connect often
|
|
1392
|
+
* `stopImmediatePropagation`s `eip6963:requestProvider`, so a late
|
|
1393
|
+
* `requestProvider` will not get those wallets to re-announce.
|
|
1394
|
+
*/
|
|
1395
|
+
declare const EIP6963_BOOTSTRAP_SCRIPT: string;
|
|
1396
|
+
/** Start discovery as soon as the SDK mounts — do not wait for the modal. */
|
|
1397
|
+
declare function startBrowserWalletDiscovery(): void;
|
|
1398
|
+
/** Ask installed wallets to announce again. Safe to call more than once. */
|
|
1399
|
+
declare function requestEip6963Providers(): void;
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* Shared Solana Wallet Standard discovery — the Solana counterpart to our
|
|
1403
|
+
* guarded EIP-6963 registry.
|
|
1404
|
+
*
|
|
1405
|
+
* Wallets announce themselves to the page through the Wallet Standard registry,
|
|
1406
|
+
* so every installed Solana wallet is enumerated without reading `window.solana`
|
|
1407
|
+
* (one global that only ever holds a single wallet, so multi-extension setups
|
|
1408
|
+
* race to own it) and without ever calling `connect()`.
|
|
1409
|
+
*
|
|
1410
|
+
* Everything here is read-only: `wallet.accounts` is populated by the wallet only
|
|
1411
|
+
* for origins the user has already authorized, which makes it a silent
|
|
1412
|
+
* already-connected check with no approval prompt.
|
|
1413
|
+
*/
|
|
1414
|
+
|
|
1415
|
+
interface SolanaStandardWallet {
|
|
1416
|
+
walletId: string;
|
|
1417
|
+
name: string;
|
|
1418
|
+
/** Data-URI icon supplied by the wallet itself. */
|
|
1419
|
+
icon: string;
|
|
1420
|
+
wallet: Wallet$1;
|
|
1421
|
+
}
|
|
1422
|
+
interface SolanaStandardAccount extends SolanaStandardWallet {
|
|
1423
|
+
/** Base58 address of the wallet's first authorized account for this origin. */
|
|
1424
|
+
address: string;
|
|
1425
|
+
account: WalletAccount;
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* All registered Solana wallets. Purely a registry read — safe to call on mount
|
|
1429
|
+
* and on every render.
|
|
1430
|
+
*/
|
|
1431
|
+
declare function getSolanaStandardWallets(): SolanaStandardWallet[];
|
|
1432
|
+
/** Find a registered Solana wallet by our internal wallet ID. */
|
|
1433
|
+
declare function findSolanaStandardWallet(walletId: string): SolanaStandardWallet | undefined;
|
|
1434
|
+
/** Whether a Solana wallet is installed, by our internal wallet ID. */
|
|
1435
|
+
declare function isSolanaWalletDetectedViaWalletStandard(walletId: string): boolean;
|
|
1436
|
+
/**
|
|
1437
|
+
* Solana wallets that already have an authorized account for this origin.
|
|
1438
|
+
*
|
|
1439
|
+
* The Wallet Standard equivalent of EVM's `eth_accounts`: wallets only publish
|
|
1440
|
+
* `accounts` once the user has approved the origin, so this reports existing
|
|
1441
|
+
* connections without prompting. Wallets the user has never approved simply
|
|
1442
|
+
* expose an empty array.
|
|
1443
|
+
*/
|
|
1444
|
+
declare function getAuthorizedSolanaStandardAccounts(): SolanaStandardAccount[];
|
|
1445
|
+
/** Connect a selected Wallet Standard wallet. Call only from a user gesture. */
|
|
1446
|
+
declare function connectSolanaStandardWallet(walletId: string): Promise<SolanaStandardAccount | null>;
|
|
1447
|
+
/** Sign a serialized Solana transaction through Wallet Standard when supported. */
|
|
1448
|
+
declare function signSolanaStandardTransaction(walletId: string, address: string, transaction: Uint8Array): Promise<Uint8Array | null>;
|
|
1449
|
+
/**
|
|
1450
|
+
* Fires whenever a wallet registers or unregisters. Wallets register
|
|
1451
|
+
* asynchronously after page load, so callers that enumerate wallets on mount need
|
|
1452
|
+
* this to pick up late arrivals.
|
|
1453
|
+
*/
|
|
1454
|
+
declare function subscribeSolanaStandardWallets(listener: () => void): () => void;
|
|
1455
|
+
/**
|
|
1456
|
+
* Fires when any registered Solana wallet changes its accounts — connect,
|
|
1457
|
+
* disconnect, or account switch. Replaces per-wallet `provider.on('connect')`
|
|
1458
|
+
* listeners for wallets that implement `standard:events`.
|
|
1459
|
+
*/
|
|
1460
|
+
declare function subscribeSolanaStandardAccountChanges(listener: () => void): () => void;
|
|
1461
|
+
|
|
1319
1462
|
interface CurrencyListItemProps {
|
|
1320
1463
|
currency: FiatCurrency;
|
|
1321
1464
|
isSelected: boolean;
|
|
@@ -1404,10 +1547,12 @@ var common = {
|
|
|
1404
1547
|
review: "Review",
|
|
1405
1548
|
tryAgain: "Try Again",
|
|
1406
1549
|
somethingWentWrong: "Something went wrong",
|
|
1550
|
+
quoteFailed: "Failed to fetch quote, please try again later",
|
|
1407
1551
|
seeMoreDetails: "See more details",
|
|
1408
1552
|
seeLess: "See less",
|
|
1409
1553
|
dateTime: "{{date}} at {{time}}",
|
|
1410
1554
|
"continue": "Continue",
|
|
1555
|
+
confirm: "Confirm",
|
|
1411
1556
|
processing: "Processing",
|
|
1412
1557
|
checkingFor: "Checking for {{target}}",
|
|
1413
1558
|
depositTarget: "deposit",
|
|
@@ -1417,6 +1562,9 @@ var common = {
|
|
|
1417
1562
|
help: "Help",
|
|
1418
1563
|
done: "Done",
|
|
1419
1564
|
from: "From",
|
|
1565
|
+
to: "To",
|
|
1566
|
+
youPay: "You pay",
|
|
1567
|
+
intentAddressDisclaimer: "The address shown in the provider is an intent address. Funds will be automatically deposited into your account.",
|
|
1420
1568
|
max: "Max",
|
|
1421
1569
|
or: "or",
|
|
1422
1570
|
minimumAmount: "Minimum amount is {{amount}}",
|
|
@@ -1434,7 +1582,8 @@ var common = {
|
|
|
1434
1582
|
balance: "Balance: {{amount}}",
|
|
1435
1583
|
balanceWithProject: "{{projectName}} Balance: {{amount}}",
|
|
1436
1584
|
balanceWithToken: "Balance: {{amount}} ({{tokenAmount}})",
|
|
1437
|
-
amountDue: "Amount due: {{amount}}"
|
|
1585
|
+
amountDue: "Amount due: {{amount}}",
|
|
1586
|
+
back: "Back"
|
|
1438
1587
|
};
|
|
1439
1588
|
var executionDetails = {
|
|
1440
1589
|
processing: "Processing",
|
|
@@ -1489,8 +1638,7 @@ var connectWallet = {
|
|
|
1489
1638
|
confirming: "Confirming...",
|
|
1490
1639
|
minimumForTokenOnChain: "Minimum for {{token}} on {{chain}} is ${{amount}}",
|
|
1491
1640
|
amountAdjusted: "Amount adjusted from remaining ${{amount}}",
|
|
1492
|
-
minimumDeposit: "Minimum deposit: ${{amount}}"
|
|
1493
|
-
walletWillPrompt: "{{wallet}} wallet will ask you to approve this transaction."
|
|
1641
|
+
minimumDeposit: "Minimum deposit: ${{amount}}"
|
|
1494
1642
|
},
|
|
1495
1643
|
confirming: {
|
|
1496
1644
|
waitingTitle: "Waiting for confirmation...",
|
|
@@ -1522,6 +1670,32 @@ var connectWallet = {
|
|
|
1522
1670
|
connectFailed: "Failed to connect wallet",
|
|
1523
1671
|
transactionFailed: "Transaction failed"
|
|
1524
1672
|
};
|
|
1673
|
+
var walletErrors = {
|
|
1674
|
+
insufficientGas: "You don't have enough to cover the network fee.",
|
|
1675
|
+
insufficientBalance: "Not enough balance for this transaction.",
|
|
1676
|
+
activationFeeRequired: "This transfer is too small to cover the one-time activation fee.",
|
|
1677
|
+
nonceConflict: "A previous transaction is still pending. Wait for it to finish, then try again.",
|
|
1678
|
+
gasTooLow: "The network fee was set too low. Raise it in your wallet and try again.",
|
|
1679
|
+
reverted: "The network rejected the transaction.",
|
|
1680
|
+
networkNotAdded: "That network isn't set up in your wallet. Add it, then try again.",
|
|
1681
|
+
networkSwitchDeclined: "Switch to the right network in your wallet to continue.",
|
|
1682
|
+
wrongNetwork: "Your wallet is on the wrong network. Switch it, then try again.",
|
|
1683
|
+
requestPending: "Your wallet already has a request open. Finish it there, then try again.",
|
|
1684
|
+
walletNotFound: "We couldn't reach your wallet. Make sure it's installed and unlocked.",
|
|
1685
|
+
noAccounts: "No account was shared. Unlock your wallet and try again.",
|
|
1686
|
+
invalidRecipient: "That deposit address looks wrong. Contact support before retrying.",
|
|
1687
|
+
noDepositAddress: "No deposit address is available for that network. Try a different wallet.",
|
|
1688
|
+
rpcUnavailable: "The network is unreachable right now. Try again in a moment.",
|
|
1689
|
+
walletLocked: "Unlock your wallet and try again.",
|
|
1690
|
+
unsupportedMethod: "Your wallet doesn't support this action. Try a different wallet.",
|
|
1691
|
+
chainDisconnected: "Your wallet is disconnected. Reconnect it and try again.",
|
|
1692
|
+
chainDisconnectedNetwork: "Your wallet is disconnected from this network. Reconnect and try again.",
|
|
1693
|
+
walletRejectedTransaction: "Your wallet rejected the transaction.",
|
|
1694
|
+
connectDeclined: "Connection declined.",
|
|
1695
|
+
signatureDeclined: "Signature declined.",
|
|
1696
|
+
connectFailed: "Connection failed.",
|
|
1697
|
+
transactionFailed: "Transaction failed."
|
|
1698
|
+
};
|
|
1525
1699
|
var transferCrypto = {
|
|
1526
1700
|
priceImpact: {
|
|
1527
1701
|
label: "Price impact",
|
|
@@ -1596,7 +1770,8 @@ var transferCrypto = {
|
|
|
1596
1770
|
},
|
|
1597
1771
|
defaultError: "The recipient address cannot receive funds for the selected token"
|
|
1598
1772
|
},
|
|
1599
|
-
selectNetworkPlaceholder: "Select network"
|
|
1773
|
+
selectNetworkPlaceholder: "Select network",
|
|
1774
|
+
recipientAddress: "Recipient address"
|
|
1600
1775
|
};
|
|
1601
1776
|
var glossary = {
|
|
1602
1777
|
title: "Glossary",
|
|
@@ -1633,13 +1808,14 @@ var depositModal = {
|
|
|
1633
1808
|
},
|
|
1634
1809
|
stripeLink: {
|
|
1635
1810
|
title: "Pay with Link",
|
|
1636
|
-
subtitle: "Buy with
|
|
1811
|
+
subtitle: "Buy with debit or credit card",
|
|
1637
1812
|
unavailableInRegionMessage: "Pay with Link is currently unavailable in your region."
|
|
1638
1813
|
},
|
|
1639
1814
|
browserWallet: {
|
|
1640
1815
|
title: "Connect Wallet",
|
|
1641
1816
|
subtitle: "Deposit from your wallet",
|
|
1642
|
-
disconnect: "Disconnect"
|
|
1817
|
+
disconnect: "Disconnect",
|
|
1818
|
+
balanceWithInstant: "${{balance}} • Instant"
|
|
1643
1819
|
},
|
|
1644
1820
|
cashApp: {
|
|
1645
1821
|
creatingOrder: "Creating order...",
|
|
@@ -1665,11 +1841,11 @@ var depositModal = {
|
|
|
1665
1841
|
},
|
|
1666
1842
|
applePayMenu: {
|
|
1667
1843
|
title: "Pay with Apple Pay",
|
|
1668
|
-
subtitle: "Instant"
|
|
1844
|
+
subtitle: "Instant • Debit card only"
|
|
1669
1845
|
},
|
|
1670
1846
|
googlePayMenu: {
|
|
1671
1847
|
title: "Pay with Google Pay",
|
|
1672
|
-
subtitle: "Instant"
|
|
1848
|
+
subtitle: "Instant • Debit card only"
|
|
1673
1849
|
},
|
|
1674
1850
|
cardMethodName: "Card",
|
|
1675
1851
|
applePayMethodName: "Apple Pay",
|
|
@@ -1692,6 +1868,7 @@ var depositModal = {
|
|
|
1692
1868
|
cash: "Use Cash"
|
|
1693
1869
|
},
|
|
1694
1870
|
applePayHeader: {
|
|
1871
|
+
enterContact: "Verification",
|
|
1695
1872
|
enterEmail: "Enter your email",
|
|
1696
1873
|
enterPhone: "Enter your phone",
|
|
1697
1874
|
verifyEmail: "Verify your email",
|
|
@@ -1750,7 +1927,13 @@ var payWithExchange = {
|
|
|
1750
1927
|
completeTransaction: "Complete transfer with {{provider}}",
|
|
1751
1928
|
canCloseModal: "You can close this modal.",
|
|
1752
1929
|
reopenExchange: "Reopen exchange window",
|
|
1753
|
-
walletOrTokenUnavailable: "Wallet address or token information not available"
|
|
1930
|
+
walletOrTokenUnavailable: "Wallet address or token information not available",
|
|
1931
|
+
creatingOrder: "Creating order...",
|
|
1932
|
+
tokenUnavailable: "Token information not available",
|
|
1933
|
+
walletUnavailable: "Wallet address not available",
|
|
1934
|
+
enterAmountToTransfer: "Enter an amount to transfer",
|
|
1935
|
+
createSessionFailed: "Failed to create transfer session",
|
|
1936
|
+
transferFailed: "Transfer failed"
|
|
1754
1937
|
};
|
|
1755
1938
|
var connectExchange = {
|
|
1756
1939
|
title: "Connect Exchange",
|
|
@@ -1768,7 +1951,7 @@ var connectExchange = {
|
|
|
1768
1951
|
connectingDesc: "Complete authorization in the popup window",
|
|
1769
1952
|
connected: {
|
|
1770
1953
|
title: "Connected to {{exchange}}",
|
|
1771
|
-
subtitle: "Your
|
|
1954
|
+
subtitle: "Your account is linked and ready to use.",
|
|
1772
1955
|
exchange: "Exchange",
|
|
1773
1956
|
status: "Status",
|
|
1774
1957
|
statusConnected: "Connected",
|
|
@@ -1777,8 +1960,7 @@ var connectExchange = {
|
|
|
1777
1960
|
flowSource: "Source",
|
|
1778
1961
|
flowTransfer: "Transfer",
|
|
1779
1962
|
flowDirect: "Direct",
|
|
1780
|
-
flowDestination: "Destination"
|
|
1781
|
-
secureNote: "All transfers are secured with two-factor authentication and encrypted end-to-end."
|
|
1963
|
+
flowDestination: "Destination"
|
|
1782
1964
|
},
|
|
1783
1965
|
holdings: {
|
|
1784
1966
|
title: "Select asset"
|
|
@@ -1797,7 +1979,7 @@ var connectExchange = {
|
|
|
1797
1979
|
mfaEnrollmentTitle: "Enable SMS or Authy 2FA",
|
|
1798
1980
|
mfaEnrollmentMessage: "Please make sure you enable SMS or Authy 2FA in your Coinbase account. Press Continue after you enable it.",
|
|
1799
1981
|
mfaEnrollmentSettingsLink: "Open Coinbase security settings",
|
|
1800
|
-
termsNoticePrefix: "By clicking on Confirm
|
|
1982
|
+
termsNoticePrefix: "By clicking on Confirm, you agree to our ",
|
|
1801
1983
|
termsNoticeLink: "terms",
|
|
1802
1984
|
termsNoticeSuffix: "."
|
|
1803
1985
|
},
|
|
@@ -1833,7 +2015,20 @@ var connectExchange = {
|
|
|
1833
2015
|
errors: {
|
|
1834
2016
|
oauthStartFailed: "Failed to start OAuth",
|
|
1835
2017
|
createTransferFailed: "Failed to create transfer",
|
|
1836
|
-
transferFailed: "Transfer failed"
|
|
2018
|
+
transferFailed: "Transfer failed",
|
|
2019
|
+
noDepositWallet: "No deposit wallet available",
|
|
2020
|
+
noDepositWalletForNetwork: "No deposit wallet available for the {{network}} network",
|
|
2021
|
+
paymentFailed: "Payment failed",
|
|
2022
|
+
createSessionFailed: "Failed to create exchange transfer session",
|
|
2023
|
+
transferDetailsNotReady: "Transfer details not ready. Please try again.",
|
|
2024
|
+
sessionExpired: "Session expired. Please reconnect your exchange."
|
|
2025
|
+
},
|
|
2026
|
+
transferFrom: "Transfer from {{exchange}}",
|
|
2027
|
+
redirect: {
|
|
2028
|
+
paymentReceived: "Payment received",
|
|
2029
|
+
paymentProcessing: "Payment processing",
|
|
2030
|
+
converting: "Converting to your destination token...",
|
|
2031
|
+
confirmingPayment: "Your {{exchange}} payment is being confirmed..."
|
|
1837
2032
|
}
|
|
1838
2033
|
};
|
|
1839
2034
|
var buyWithCard = {
|
|
@@ -1858,7 +2053,9 @@ var buyWithCard = {
|
|
|
1858
2053
|
bankTransferWalletUnavailable: "Wallet address not available for bank transfer"
|
|
1859
2054
|
},
|
|
1860
2055
|
refreshingIn: "Refreshing in {{seconds}}s",
|
|
1861
|
-
estimatedDeliveryTime: "Estimated delivery time: {{time}}"
|
|
2056
|
+
estimatedDeliveryTime: "Estimated delivery time: {{time}}",
|
|
2057
|
+
thisToken: "this token",
|
|
2058
|
+
destinationNotStablecoin: "Buying a fixed amount with card is only available for stablecoins (e.g. USDC, USDT). {{token}} isn't supported for this option."
|
|
1862
2059
|
};
|
|
1863
2060
|
var buyWithApplePay = {
|
|
1864
2061
|
email: {
|
|
@@ -1877,7 +2074,8 @@ var buyWithApplePay = {
|
|
|
1877
2074
|
placeholder: "000000",
|
|
1878
2075
|
incorrect: "Incorrect code. Please try again.",
|
|
1879
2076
|
resend: "Resend code",
|
|
1880
|
-
resendIn: "Resend in {{seconds}}s"
|
|
2077
|
+
resendIn: "Resend in {{seconds}}s",
|
|
2078
|
+
verify: "Verify"
|
|
1881
2079
|
},
|
|
1882
2080
|
amount: {
|
|
1883
2081
|
enterAmount: "Enter amount",
|
|
@@ -2173,7 +2371,8 @@ var withdrawModal = {
|
|
|
2173
2371
|
history: "Withdrawal History",
|
|
2174
2372
|
status: "Withdrawal Status",
|
|
2175
2373
|
checking: "Checking Withdrawal",
|
|
2176
|
-
empty: "No withdrawals to track yet"
|
|
2374
|
+
empty: "No withdrawals to track yet",
|
|
2375
|
+
estimatedTime: "Estimated delivery time: {{time}}. You can close this and check back later."
|
|
2177
2376
|
},
|
|
2178
2377
|
executionItem: {
|
|
2179
2378
|
processing: "Withdrawal processing",
|
|
@@ -2197,6 +2396,7 @@ var en = {
|
|
|
2197
2396
|
executionDetails: executionDetails,
|
|
2198
2397
|
depositTracker: depositTracker,
|
|
2199
2398
|
connectWallet: connectWallet,
|
|
2399
|
+
walletErrors: walletErrors,
|
|
2200
2400
|
transferCrypto: transferCrypto,
|
|
2201
2401
|
glossary: glossary,
|
|
2202
2402
|
depositModal: depositModal,
|
|
@@ -2217,14 +2417,20 @@ var en = {
|
|
|
2217
2417
|
*/
|
|
2218
2418
|
type I18nStrings = typeof en;
|
|
2219
2419
|
/**
|
|
2220
|
-
* Canonical locale codes we ship a translation table for.
|
|
2420
|
+
* Canonical locale codes we ship a translation table for. Codes follow Stripe's
|
|
2421
|
+
* style: language-only unless a region split is required (`zh` vs `zh-TW`).
|
|
2422
|
+
* - `en` → English
|
|
2221
2423
|
* - `zh` → Simplified Chinese (Mainland China, Singapore)
|
|
2222
2424
|
* - `zh-TW` → Traditional Chinese (Taiwan, Hong Kong, Macau)
|
|
2425
|
+
* - `fr` → French (France)
|
|
2426
|
+
* - `th` → Thai (Thailand)
|
|
2427
|
+
* - `ja` → Japanese (Japan)
|
|
2428
|
+
* - `ko` → Korean (South Korea)
|
|
2223
2429
|
*
|
|
2224
|
-
* Callers may pass any BCP-47 tag (e.g. `zh-CN`, `
|
|
2430
|
+
* Callers may pass any BCP-47 tag (e.g. `zh-CN`, `fr-FR`, `ja-JP`); it is
|
|
2225
2431
|
* mapped onto one of these via `normalizeLocale`.
|
|
2226
2432
|
*/
|
|
2227
|
-
type LocaleCode = 'en' | 'zh' | 'zh-TW';
|
|
2433
|
+
type LocaleCode = 'en' | 'zh' | 'zh-TW' | 'fr' | 'th' | 'ja' | 'ko';
|
|
2228
2434
|
/** Locales with a bundled translation table. */
|
|
2229
2435
|
declare const SUPPORTED_LOCALES: LocaleCode[];
|
|
2230
2436
|
/**
|
|
@@ -2242,10 +2448,12 @@ declare const i18n: {
|
|
|
2242
2448
|
review: string;
|
|
2243
2449
|
tryAgain: string;
|
|
2244
2450
|
somethingWentWrong: string;
|
|
2451
|
+
quoteFailed: string;
|
|
2245
2452
|
seeMoreDetails: string;
|
|
2246
2453
|
seeLess: string;
|
|
2247
2454
|
dateTime: string;
|
|
2248
2455
|
continue: string;
|
|
2456
|
+
confirm: string;
|
|
2249
2457
|
processing: string;
|
|
2250
2458
|
checkingFor: string;
|
|
2251
2459
|
depositTarget: string;
|
|
@@ -2255,6 +2463,9 @@ declare const i18n: {
|
|
|
2255
2463
|
help: string;
|
|
2256
2464
|
done: string;
|
|
2257
2465
|
from: string;
|
|
2466
|
+
to: string;
|
|
2467
|
+
youPay: string;
|
|
2468
|
+
intentAddressDisclaimer: string;
|
|
2258
2469
|
max: string;
|
|
2259
2470
|
or: string;
|
|
2260
2471
|
minimumAmount: string;
|
|
@@ -2273,6 +2484,7 @@ declare const i18n: {
|
|
|
2273
2484
|
balanceWithProject: string;
|
|
2274
2485
|
balanceWithToken: string;
|
|
2275
2486
|
amountDue: string;
|
|
2487
|
+
back: string;
|
|
2276
2488
|
};
|
|
2277
2489
|
executionDetails: {
|
|
2278
2490
|
processing: string;
|
|
@@ -2328,7 +2540,6 @@ declare const i18n: {
|
|
|
2328
2540
|
minimumForTokenOnChain: string;
|
|
2329
2541
|
amountAdjusted: string;
|
|
2330
2542
|
minimumDeposit: string;
|
|
2331
|
-
walletWillPrompt: string;
|
|
2332
2543
|
};
|
|
2333
2544
|
confirming: {
|
|
2334
2545
|
waitingTitle: string;
|
|
@@ -2360,6 +2571,32 @@ declare const i18n: {
|
|
|
2360
2571
|
connectFailed: string;
|
|
2361
2572
|
transactionFailed: string;
|
|
2362
2573
|
};
|
|
2574
|
+
walletErrors: {
|
|
2575
|
+
insufficientGas: string;
|
|
2576
|
+
insufficientBalance: string;
|
|
2577
|
+
activationFeeRequired: string;
|
|
2578
|
+
nonceConflict: string;
|
|
2579
|
+
gasTooLow: string;
|
|
2580
|
+
reverted: string;
|
|
2581
|
+
networkNotAdded: string;
|
|
2582
|
+
networkSwitchDeclined: string;
|
|
2583
|
+
wrongNetwork: string;
|
|
2584
|
+
requestPending: string;
|
|
2585
|
+
walletNotFound: string;
|
|
2586
|
+
noAccounts: string;
|
|
2587
|
+
invalidRecipient: string;
|
|
2588
|
+
noDepositAddress: string;
|
|
2589
|
+
rpcUnavailable: string;
|
|
2590
|
+
walletLocked: string;
|
|
2591
|
+
unsupportedMethod: string;
|
|
2592
|
+
chainDisconnected: string;
|
|
2593
|
+
chainDisconnectedNetwork: string;
|
|
2594
|
+
walletRejectedTransaction: string;
|
|
2595
|
+
connectDeclined: string;
|
|
2596
|
+
signatureDeclined: string;
|
|
2597
|
+
connectFailed: string;
|
|
2598
|
+
transactionFailed: string;
|
|
2599
|
+
};
|
|
2363
2600
|
transferCrypto: {
|
|
2364
2601
|
priceImpact: {
|
|
2365
2602
|
label: string;
|
|
@@ -2435,6 +2672,7 @@ declare const i18n: {
|
|
|
2435
2672
|
defaultError: string;
|
|
2436
2673
|
};
|
|
2437
2674
|
selectNetworkPlaceholder: string;
|
|
2675
|
+
recipientAddress: string;
|
|
2438
2676
|
};
|
|
2439
2677
|
glossary: {
|
|
2440
2678
|
title: string;
|
|
@@ -2478,6 +2716,7 @@ declare const i18n: {
|
|
|
2478
2716
|
title: string;
|
|
2479
2717
|
subtitle: string;
|
|
2480
2718
|
disconnect: string;
|
|
2719
|
+
balanceWithInstant: string;
|
|
2481
2720
|
};
|
|
2482
2721
|
cashApp: {
|
|
2483
2722
|
creatingOrder: string;
|
|
@@ -2530,6 +2769,7 @@ declare const i18n: {
|
|
|
2530
2769
|
cash: string;
|
|
2531
2770
|
};
|
|
2532
2771
|
applePayHeader: {
|
|
2772
|
+
enterContact: string;
|
|
2533
2773
|
enterEmail: string;
|
|
2534
2774
|
enterPhone: string;
|
|
2535
2775
|
verifyEmail: string;
|
|
@@ -2589,6 +2829,12 @@ declare const i18n: {
|
|
|
2589
2829
|
canCloseModal: string;
|
|
2590
2830
|
reopenExchange: string;
|
|
2591
2831
|
walletOrTokenUnavailable: string;
|
|
2832
|
+
creatingOrder: string;
|
|
2833
|
+
tokenUnavailable: string;
|
|
2834
|
+
walletUnavailable: string;
|
|
2835
|
+
enterAmountToTransfer: string;
|
|
2836
|
+
createSessionFailed: string;
|
|
2837
|
+
transferFailed: string;
|
|
2592
2838
|
};
|
|
2593
2839
|
connectExchange: {
|
|
2594
2840
|
title: string;
|
|
@@ -2616,7 +2862,6 @@ declare const i18n: {
|
|
|
2616
2862
|
flowTransfer: string;
|
|
2617
2863
|
flowDirect: string;
|
|
2618
2864
|
flowDestination: string;
|
|
2619
|
-
secureNote: string;
|
|
2620
2865
|
};
|
|
2621
2866
|
holdings: {
|
|
2622
2867
|
title: string;
|
|
@@ -2672,6 +2917,19 @@ declare const i18n: {
|
|
|
2672
2917
|
oauthStartFailed: string;
|
|
2673
2918
|
createTransferFailed: string;
|
|
2674
2919
|
transferFailed: string;
|
|
2920
|
+
noDepositWallet: string;
|
|
2921
|
+
noDepositWalletForNetwork: string;
|
|
2922
|
+
paymentFailed: string;
|
|
2923
|
+
createSessionFailed: string;
|
|
2924
|
+
transferDetailsNotReady: string;
|
|
2925
|
+
sessionExpired: string;
|
|
2926
|
+
};
|
|
2927
|
+
transferFrom: string;
|
|
2928
|
+
redirect: {
|
|
2929
|
+
paymentReceived: string;
|
|
2930
|
+
paymentProcessing: string;
|
|
2931
|
+
converting: string;
|
|
2932
|
+
confirmingPayment: string;
|
|
2675
2933
|
};
|
|
2676
2934
|
};
|
|
2677
2935
|
buyWithCard: {
|
|
@@ -2697,6 +2955,8 @@ declare const i18n: {
|
|
|
2697
2955
|
};
|
|
2698
2956
|
refreshingIn: string;
|
|
2699
2957
|
estimatedDeliveryTime: string;
|
|
2958
|
+
thisToken: string;
|
|
2959
|
+
destinationNotStablecoin: string;
|
|
2700
2960
|
};
|
|
2701
2961
|
buyWithApplePay: {
|
|
2702
2962
|
email: {
|
|
@@ -2716,6 +2976,7 @@ declare const i18n: {
|
|
|
2716
2976
|
incorrect: string;
|
|
2717
2977
|
resend: string;
|
|
2718
2978
|
resendIn: string;
|
|
2979
|
+
verify: string;
|
|
2719
2980
|
};
|
|
2720
2981
|
amount: {
|
|
2721
2982
|
enterAmount: string;
|
|
@@ -3012,6 +3273,7 @@ declare const i18n: {
|
|
|
3012
3273
|
status: string;
|
|
3013
3274
|
checking: string;
|
|
3014
3275
|
empty: string;
|
|
3276
|
+
estimatedTime: string;
|
|
3015
3277
|
};
|
|
3016
3278
|
executionItem: {
|
|
3017
3279
|
processing: string;
|
|
@@ -3045,18 +3307,21 @@ declare function interpolate(template: string, params?: Record<string, string |
|
|
|
3045
3307
|
*
|
|
3046
3308
|
* Chinese is resolved by script rather than a single region: any Traditional
|
|
3047
3309
|
* signal (script `Hant`, or region TW/HK/MO) maps to `zh-TW` (Traditional);
|
|
3048
|
-
* every other `zh` tag maps to `zh` (Simplified).
|
|
3310
|
+
* every other `zh` tag maps to `zh` (Simplified). Other languages collapse to
|
|
3311
|
+
* their language-only Stripe-style code (`fr-FR` → `fr`, `ja-JP` → `ja`).
|
|
3049
3312
|
*
|
|
3050
3313
|
* @example normalizeLocale("zh-CN") // "zh" (Simplified)
|
|
3051
3314
|
* @example normalizeLocale("zh-TW") // "zh-TW" (Traditional)
|
|
3052
3315
|
* @example normalizeLocale("zh-HK") // "zh-TW" (Traditional)
|
|
3053
3316
|
* @example normalizeLocale("zh-Hant-TW") // "zh-TW" (Traditional)
|
|
3317
|
+
* @example normalizeLocale("fr-FR") // "fr"
|
|
3318
|
+
* @example normalizeLocale("ja-JP") // "ja"
|
|
3054
3319
|
* @example normalizeLocale("en_US") // "en"
|
|
3055
3320
|
*/
|
|
3056
3321
|
declare function normalizeLocale(tag?: string | null): LocaleCode;
|
|
3057
3322
|
/**
|
|
3058
3323
|
* Best-effort browser locale detection. Walks `navigator.languages` in the
|
|
3059
|
-
* user's own order and takes the first language we ship, so `["
|
|
3324
|
+
* user's own order and takes the first language we ship, so `["de", "zh-TW"]`
|
|
3060
3325
|
* resolves to `zh-TW` while `["en-US", "zh-CN"]` stays English. Returns "en"
|
|
3061
3326
|
* during SSR or when nothing matches.
|
|
3062
3327
|
*/
|
|
@@ -3080,8 +3345,8 @@ interface I18nContextValue {
|
|
|
3080
3345
|
interface I18nProviderProps {
|
|
3081
3346
|
children: React$1.ReactNode;
|
|
3082
3347
|
/**
|
|
3083
|
-
* Locale tag (e.g. "zh", "zh-CN", "en-US"). When omitted, the
|
|
3084
|
-
* is auto-detected. Unsupported locales fall back to English.
|
|
3348
|
+
* Locale tag (e.g. "zh", "zh-CN", "fr", "ja-JP", "en-US"). When omitted, the
|
|
3349
|
+
* browser locale is auto-detected. Unsupported locales fall back to English.
|
|
3085
3350
|
*/
|
|
3086
3351
|
locale?: string;
|
|
3087
3352
|
}
|
|
@@ -3183,7 +3448,19 @@ interface UseDepositQuoteParams {
|
|
|
3183
3448
|
sourceChainType: string;
|
|
3184
3449
|
sourceChainId: string;
|
|
3185
3450
|
sourceTokenAddress: string;
|
|
3186
|
-
|
|
3451
|
+
/**
|
|
3452
|
+
* Exact-in: how much the user will send. Mutually exclusive with
|
|
3453
|
+
* `destinationAmount` — provide exactly one.
|
|
3454
|
+
*/
|
|
3455
|
+
sourceAmount?: string;
|
|
3456
|
+
/**
|
|
3457
|
+
* Exact-out: how much the recipient should receive. Mutually exclusive with
|
|
3458
|
+
* `sourceAmount` — provide exactly one.
|
|
3459
|
+
*
|
|
3460
|
+
* Checkout (CheckoutModal / WalletConnect / BrowserWalletModal) only sends
|
|
3461
|
+
* this field. Omitting `sourceAmount` keeps that historic path.
|
|
3462
|
+
*/
|
|
3463
|
+
destinationAmount?: string;
|
|
3187
3464
|
destinationChainType: string;
|
|
3188
3465
|
destinationChainId: string;
|
|
3189
3466
|
destinationTokenAddress: string;
|
|
@@ -3196,12 +3473,27 @@ interface UseDepositQuoteParams {
|
|
|
3196
3473
|
/**
|
|
3197
3474
|
* Hook to fetch a deposit quote via react-query.
|
|
3198
3475
|
*
|
|
3199
|
-
*
|
|
3200
|
-
* destination amount
|
|
3201
|
-
*
|
|
3476
|
+
* Exact-out (`destinationAmount`): estimated source token needed to receive
|
|
3477
|
+
* that destination amount. Exact-in (`sourceAmount`): estimated destination
|
|
3478
|
+
* amount received for that source amount. The response includes the project's
|
|
3479
|
+
* platform fee from billing (`platform_fee_percent`).
|
|
3480
|
+
* Server-side cached for 1 minute; client treats a quote as fresh for 5 minutes.
|
|
3202
3481
|
*/
|
|
3203
3482
|
declare function useDepositQuote(params: UseDepositQuoteParams): _tanstack_react_query.UseQueryResult<DepositQuote, Error>;
|
|
3204
3483
|
|
|
3484
|
+
interface UseTokenMetadataParams {
|
|
3485
|
+
chainType?: string;
|
|
3486
|
+
chainId?: string;
|
|
3487
|
+
tokenAddress?: string;
|
|
3488
|
+
publishableKey: string;
|
|
3489
|
+
enabled?: boolean;
|
|
3490
|
+
}
|
|
3491
|
+
/**
|
|
3492
|
+
* Token metadata (symbol, icons, decimals, chain) for a chain/token address.
|
|
3493
|
+
* Shared query key so transfer, card, and other surfaces reuse the same cache.
|
|
3494
|
+
*/
|
|
3495
|
+
declare function useTokenMetadata(params: UseTokenMetadataParams): _tanstack_react_query.UseQueryResult<TokenMetadata | null, Error>;
|
|
3496
|
+
|
|
3205
3497
|
interface UsePublicIncidentOptions {
|
|
3206
3498
|
publishableKey: string;
|
|
3207
3499
|
enabled?: boolean;
|
|
@@ -3237,14 +3529,24 @@ interface UseWithdrawPollingResult {
|
|
|
3237
3529
|
}
|
|
3238
3530
|
declare function useWithdrawPolling({ userId, publishableKey, depositWalletId, enabled, onWithdrawSuccess, onWithdrawError, }: UseWithdrawPollingOptions): UseWithdrawPollingResult;
|
|
3239
3531
|
|
|
3532
|
+
interface UseSupportedDestinationTokensOptions {
|
|
3533
|
+
/** Which surface the list is for; only read by the API alongside `sourceChainType`. */
|
|
3534
|
+
actionType?: ActionType;
|
|
3535
|
+
/**
|
|
3536
|
+
* Chain the funds are being sent from, so the API can drop destinations it
|
|
3537
|
+
* can't reach (a withdrawal bridged off N1 can't land back on N1).
|
|
3538
|
+
*/
|
|
3539
|
+
sourceChainType?: ChainType;
|
|
3540
|
+
}
|
|
3240
3541
|
/**
|
|
3241
3542
|
* Hook to fetch supported destination tokens with caching and deduplication via react-query.
|
|
3242
3543
|
* Used in the withdraw flow to show available tokens the user can withdraw to.
|
|
3243
3544
|
*
|
|
3244
3545
|
* @param publishableKey - Publishable key for API calls
|
|
3245
3546
|
* @param enabled - Whether to fetch (defaults to true)
|
|
3547
|
+
* @param options - Optional surface + source filters
|
|
3246
3548
|
*/
|
|
3247
|
-
declare function useSupportedDestinationTokens(publishableKey: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<SupportedDestinationTokensResponse, Error>;
|
|
3549
|
+
declare function useSupportedDestinationTokens(publishableKey: string, enabled?: boolean, options?: UseSupportedDestinationTokensOptions): _tanstack_react_query.UseQueryResult<SupportedDestinationTokensResponse, Error>;
|
|
3248
3550
|
|
|
3249
3551
|
interface UseSupportedDepositTokensOptions {
|
|
3250
3552
|
destination_token_address?: string;
|
|
@@ -3281,6 +3583,10 @@ declare function useVerifyRecipientAddress(params: UseVerifyRecipientAddressPara
|
|
|
3281
3583
|
interface SourceTokenValidationResult {
|
|
3282
3584
|
isSupported: boolean;
|
|
3283
3585
|
isStablecoin: boolean;
|
|
3586
|
+
/** Decimals of the matched source token, when found in the catalog. */
|
|
3587
|
+
decimals: number | null;
|
|
3588
|
+
/** Catalog symbol of the matched source token, when found. */
|
|
3589
|
+
symbol: string | null;
|
|
3284
3590
|
minimumAmountUsd: number | null;
|
|
3285
3591
|
estimatedProcessingTime: number | null;
|
|
3286
3592
|
maxSlippagePercent: number | null;
|
|
@@ -3296,6 +3602,13 @@ declare function useSourceTokenValidation(params: {
|
|
|
3296
3602
|
sourceChainId?: string;
|
|
3297
3603
|
sourceTokenAddress?: string;
|
|
3298
3604
|
sourceTokenSymbol?: string;
|
|
3605
|
+
/**
|
|
3606
|
+
* Which catalog to validate against. `withdraw` also matches chains that can
|
|
3607
|
+
* only ever be a withdrawal source, because their funds are bridged onto a
|
|
3608
|
+
* settlement chain (N1) — the deposit catalog deliberately hides those, since
|
|
3609
|
+
* nothing can be routed off them directly. Omitted defers to the API default.
|
|
3610
|
+
*/
|
|
3611
|
+
actionType?: ActionType;
|
|
3299
3612
|
publishableKey: string;
|
|
3300
3613
|
enabled?: boolean;
|
|
3301
3614
|
}): _tanstack_react_query.UseQueryResult<SourceTokenValidationResult, Error>;
|
|
@@ -3599,4 +3912,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
3599
3912
|
*/
|
|
3600
3913
|
declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
|
|
3601
3914
|
|
|
3602
|
-
export { type AllowedCountryResult, AnalyticsProvider, type AnalyticsProviderProps, BankTransfer, BankTransferButton, type BankTransferProps, type BankTransferView, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithApplePay, type BuyWithApplePayProps, BuyWithCard, type BuyWithCardProps, BuyWithGooglePay, type BuyWithGooglePayProps, BuyWithWalletPay, type BuyWithWalletPayHandle, type BuyWithWalletPayProps, type CardTokens, CheckingForDepositIndicator, CheckoutModal, type CheckoutModalProps, CoinbaseConnect, type ComponentConfig, type ComponentOverrides, type ComponentTokens, ConfirmingView, ConnectExchangeButton, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, type DepositMenuLayout, type DepositMenuLayoutType, DepositModal, type DepositModalInitialScreen, DepositSuccessToast, type DepositTab, DepositTrackerButton, DepositWithCardButton, DepositsModal, type DetectedWallet, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EvmWalletProvider, type FontConfig, HYPERCORE_CHAIN_ID, type HeaderTokens, type I18nContextValue, I18nProvider, type I18nProviderProps, type I18nStrings, type InputTokens, type ListTokens, type LocaleCode, ManualDepositButton, type MobilePlatform, PayWithStripeLink, type PayWithStripeLinkProps, QRCodeSkeleton, type ResolvedFonts, SUPPORTED_LOCALES, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SolanaWalletProvider, type StoredWalletPaySession as StoredApplePaySession, type StoredWalletPaySession, StripeLinkButton, type StripeLinkStep, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, type UseDepositQuoteParams, type UsePaymentIntentParams, type UseSupportedDepositTokensOptions, WalletPayQrCheckout, type WalletPayQrCheckoutProps, type WalletPayQuote, type WalletPayView, WithdrawConfirmingView, WithdrawDoubleInput, WithdrawExecutionItem, WithdrawForm, WithdrawModal, type WithdrawModalProps, WithdrawTokenSelector, type WithdrawTransactionInfo, buildWalletPayQuote, buttonVariants, clearStoredWalletPaySession as clearStoredApplePaySession, clearStoredWalletPaySession, cn, colors, defaultColors, detectBrowserLocale, detectBrowserWallet, formatCryptoAmount, formatFiat, getActiveLocale, getActiveStrings, getColors, getStoredWalletPaySession as getStoredApplePaySession, getStoredWalletPaySession, getStrings, i18n, interpolate, isHypercoreChain, isOnrampTokenFresh, mergeColors, normalizeLocale, platformSupportsWalletPay, qrErrorCorrectionLevel, resolveComponentTokens, sendEvmWithdraw, sendHypercoreWithdraw, sendSolanaWithdraw, setActiveLocale, setStoredWalletPaySession as setStoredApplePaySession, setStoredWalletPaySession, truncateAddress, useAddressBalance, useAllowedCountry, useAnalytics, useDebounce, useDepositPolling, useDepositQuote, useI18n, useMobilePlatform, usePaymentIntent, usePublicIncident, useSourceTokenValidation, useSupportedDepositTokens, useSupportedDestinationTokens, useTheme, useVerifyRecipientAddress, useWithdrawPolling };
|
|
3915
|
+
export { type AllowedCountryResult, AnalyticsProvider, type AnalyticsProviderProps, BankTransfer, BankTransferButton, type BankTransferProps, type BankTransferView, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithApplePay, type BuyWithApplePayProps, BuyWithCard, type BuyWithCardProps, BuyWithGooglePay, type BuyWithGooglePayProps, BuyWithWalletPay, type BuyWithWalletPayHandle, type BuyWithWalletPayProps, type CardTokens, CheckingForDepositIndicator, CheckoutModal, type CheckoutModalProps, CoinbaseConnect, type ComponentConfig, type ComponentOverrides, type ComponentTokens, ConfirmingView, ConnectExchangeButton, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, type DepositMenuLayout, type DepositMenuLayoutType, DepositModal, type DepositModalInitialScreen, DepositSuccessToast, type DepositTab, DepositTrackerButton, DepositWithCardButton, DepositsModal, type DetectedWallet, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, EIP6963_BOOTSTRAP_SCRIPT, type EvmWalletProvider, type FontConfig, HYPERCORE_CHAIN_ID, type HeaderTokens, type I18nContextValue, I18nProvider, type I18nProviderProps, type I18nStrings, type InputTokens, type ListTokens, type LocaleCode, ManualDepositButton, type MobilePlatform, PayWithStripeLink, type PayWithStripeLinkProps, QRCodeSkeleton, type ResolvedFonts, SUPPORTED_LOCALES, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SolanaStandardAccount, type SolanaStandardWallet, type SolanaWalletProvider, type StoredWalletPaySession as StoredApplePaySession, type StoredWalletPaySession, StripeLinkButton, type StripeLinkStep, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, TransferQrCode, type UseDepositQuoteParams, type UsePaymentIntentParams, type UseSupportedDepositTokensOptions, type UseTokenMetadataParams, WalletPayQrCheckout, type WalletPayQrCheckoutProps, type WalletPayQuote, type WalletPayView, WithdrawConfirmingView, WithdrawDoubleInput, WithdrawExecutionItem, WithdrawForm, WithdrawModal, type WithdrawModalProps, WithdrawTokenSelector, type WithdrawTransactionInfo, buildWalletPayQuote, buttonVariants, clearStoredWalletPaySession as clearStoredApplePaySession, clearStoredWalletPaySession, cn, colors, connectSolanaStandardWallet, defaultColors, detectBrowserLocale, detectBrowserWallet, detectConnectedBrowserWallet, findSolanaStandardWallet, formatCryptoAmount, formatFiat, getActiveLocale, getActiveStrings, getAuthorizedSolanaStandardAccounts, getColors, getSolanaStandardWallets, getStoredWalletPaySession as getStoredApplePaySession, getStoredWalletPaySession, getStrings, i18n, interpolate, isHypercoreChain, isOnrampTokenFresh, isSolanaWalletDetectedViaWalletStandard, mergeColors, normalizeLocale, platformSupportsWalletPay, qrErrorCorrectionLevel, requestEip6963Providers, resolveComponentTokens, sendEvmWithdraw, sendHypercoreWithdraw, sendSolanaWithdraw, setActiveLocale, setStoredWalletPaySession as setStoredApplePaySession, setStoredWalletPaySession, signSolanaStandardTransaction, startBrowserWalletDiscovery, subscribeSolanaStandardAccountChanges, subscribeSolanaStandardWallets, truncateAddress, useAddressBalance, useAllowedCountry, useAnalytics, useDebounce, useDepositPolling, useDepositQuote, useI18n, useMobilePlatform, usePaymentIntent, usePublicIncident, useSourceTokenValidation, useSupportedDepositTokens, useSupportedDestinationTokens, useTheme, useTokenMetadata, useVerifyRecipientAddress, useWithdrawPolling };
|