@unifold/ui-react 0.1.67 → 0.1.68-beta.0
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 +70 -5
- package/dist/index.d.ts +70 -5
- package/dist/index.js +2938 -2102
- package/dist/index.mjs +2753 -1908
- package/dist/styles-base.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DirectExecutionSucceededEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
2
|
+
import { DirectExecutionSucceededEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, DefaultTokenResponse, ConfirmIntegrationTransferResult, CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
3
3
|
export { ChainType, DepositMethod } from '@unifold/core';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -141,7 +141,7 @@ interface EvmWalletProvider {
|
|
|
141
141
|
removeListener?(event: string, callback: (...args: unknown[]) => void): void;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker" | "pay_with_exchange" | "exchange_connect" | "wallet_connect";
|
|
144
|
+
type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker" | "pay_with_exchange" | "exchange_connect" | "wallet_connect" | "bank_transfer";
|
|
145
145
|
interface DepositModalProps {
|
|
146
146
|
open: boolean;
|
|
147
147
|
onOpenChange: (open: boolean) => void;
|
|
@@ -210,6 +210,14 @@ interface DepositModalProps {
|
|
|
210
210
|
enableConnectExchange?: boolean;
|
|
211
211
|
/** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
212
212
|
enableCashApp?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Enable the "Bank Transfer" section (SEPA, etc.). Overrides dashboard default.
|
|
215
|
+
* Resolves as flag ?? dashboard `bank_transfer.enabled` ?? true.
|
|
216
|
+
*
|
|
217
|
+
* Even when enabled, the rails listed inside are filtered by country —
|
|
218
|
+
* users outside the SEPA zone see a disabled "coming soon" card.
|
|
219
|
+
*/
|
|
220
|
+
enableBankTransfer?: boolean;
|
|
213
221
|
/** Deposit with Card — onramp step: hide the You use / You buy / You receive card. @default false */
|
|
214
222
|
hideDepositFlowInfo?: boolean;
|
|
215
223
|
/** Deposit with Card — onramp step: hide the temporary wallet address disclaimer. @default false */
|
|
@@ -243,7 +251,7 @@ interface DepositModalProps {
|
|
|
243
251
|
*/
|
|
244
252
|
displayMode?: "stacked" | "tabs";
|
|
245
253
|
}
|
|
246
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableTransferCrypto, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, displayMode, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
254
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableTransferCrypto, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, enableBankTransfer, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, displayMode, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
247
255
|
|
|
248
256
|
interface DepositHeaderProps {
|
|
249
257
|
title: string;
|
|
@@ -492,6 +500,53 @@ interface DepositTrackerButtonProps {
|
|
|
492
500
|
}
|
|
493
501
|
declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: DepositTrackerButtonProps): react_jsx_runtime.JSX.Element;
|
|
494
502
|
|
|
503
|
+
interface BankTransferButtonProps {
|
|
504
|
+
onClick: () => void;
|
|
505
|
+
title: string;
|
|
506
|
+
subtitle: string;
|
|
507
|
+
/** When true, renders the row as a disabled "coming soon" card (no click). */
|
|
508
|
+
comingSoon?: boolean;
|
|
509
|
+
}
|
|
510
|
+
declare function BankTransferButton({ onClick, title, subtitle, comingSoon, }: BankTransferButtonProps): react_jsx_runtime.JSX.Element;
|
|
511
|
+
|
|
512
|
+
type BankTransferView = "providers" | "amount" | "pending";
|
|
513
|
+
interface BankTransferProps {
|
|
514
|
+
userId: string;
|
|
515
|
+
publishableKey: string;
|
|
516
|
+
view?: BankTransferView;
|
|
517
|
+
onViewChange?: (view: BankTransferView) => void;
|
|
518
|
+
recipientAddress?: string;
|
|
519
|
+
destinationChainType?: ChainType;
|
|
520
|
+
destinationChainId?: string;
|
|
521
|
+
destinationTokenAddress?: string;
|
|
522
|
+
destinationTokenSymbol?: string;
|
|
523
|
+
wallets?: Wallet[];
|
|
524
|
+
/** Pre-resolved default token (saves a network round-trip when provided). */
|
|
525
|
+
defaultToken?: DefaultTokenResponse | null;
|
|
526
|
+
assetCdnUrl?: string;
|
|
527
|
+
onDepositSuccess?: (data: {
|
|
528
|
+
message: string;
|
|
529
|
+
transaction?: unknown;
|
|
530
|
+
executionId?: string;
|
|
531
|
+
}) => void;
|
|
532
|
+
onEvent?: (event: DepositEvent) => void;
|
|
533
|
+
onDepositError?: (error: {
|
|
534
|
+
message: string;
|
|
535
|
+
error?: unknown;
|
|
536
|
+
code?: string;
|
|
537
|
+
}) => void;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Bank-transfer deposit flow. Three steps:
|
|
541
|
+
* 1. Provider list (returned by `getBankTransferProviders`)
|
|
542
|
+
* 2. Amount input (Swapped-only today; other providers may diverge later)
|
|
543
|
+
* 3. Pending — Swapped widget opens in a new tab, we poll for the deposit
|
|
544
|
+
*
|
|
545
|
+
* The widget itself handles KYC + IBAN entry + payment; we just collect the
|
|
546
|
+
* fiat amount up-front so users aren't surprised by the default in the widget.
|
|
547
|
+
*/
|
|
548
|
+
declare function BankTransfer({ userId, publishableKey, view: externalView, onViewChange, destinationChainType, destinationChainId, destinationTokenAddress, destinationTokenSymbol, wallets, defaultToken: externalDefaultToken, assetCdnUrl, onDepositSuccess, onEvent, onDepositError, }: BankTransferProps): react_jsx_runtime.JSX.Element;
|
|
549
|
+
|
|
495
550
|
interface DepositWallet {
|
|
496
551
|
id: string;
|
|
497
552
|
chain_type: string;
|
|
@@ -611,14 +666,24 @@ interface CheckoutModalProps {
|
|
|
611
666
|
onCheckoutSuccess?: (data: {
|
|
612
667
|
paymentIntentId: string;
|
|
613
668
|
status: string;
|
|
669
|
+
method?: CheckoutMethod;
|
|
670
|
+
/**
|
|
671
|
+
* The full payment intent at the time of the success callback, mapped to
|
|
672
|
+
* SDK camelCase. Present whenever the SDK has retrieved the PI (always for
|
|
673
|
+
* the terminal `succeeded` callback; may be undefined for intermediate
|
|
674
|
+
* wallet-confirmed `processing` callbacks fired before the PI is polled).
|
|
675
|
+
*/
|
|
676
|
+
paymentIntent?: CheckoutPaymentIntent;
|
|
614
677
|
}) => void;
|
|
615
678
|
onCheckoutError?: (error: {
|
|
616
679
|
message: string;
|
|
617
680
|
error?: unknown;
|
|
618
681
|
code?: string;
|
|
682
|
+
method?: CheckoutMethod;
|
|
619
683
|
}) => void;
|
|
684
|
+
onEvent?: (event: CheckoutEvent) => void;
|
|
620
685
|
}
|
|
621
|
-
declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
|
|
686
|
+
declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, onEvent, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
|
|
622
687
|
|
|
623
688
|
interface WithdrawTransactionInfo {
|
|
624
689
|
/** Source (sending) chain type */
|
|
@@ -1349,4 +1414,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1349
1414
|
*/
|
|
1350
1415
|
declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
|
|
1351
1416
|
|
|
1352
|
-
export { type AllowedCountryResult, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type BuyWithCardProps, 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, DepositModal, type DepositModalInitialScreen, type DepositModalProps, DepositSuccessToast, 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 InputTokens, type ListTokens, ManualDepositButton, QRCodeSkeleton, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SolanaWalletProvider, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, type UseDepositQuoteParams, type UsePaymentIntentParams, type UseSupportedDepositTokensOptions, WithdrawConfirmingView, WithdrawDoubleInput, WithdrawExecutionItem, WithdrawForm, WithdrawModal, type WithdrawModalProps, WithdrawTokenSelector, type WithdrawTransactionInfo, buttonVariants, cn, colors, defaultColors, detectBrowserWallet, getColors, isHypercoreChain, mergeColors, resolveComponentTokens, sendEvmWithdraw, sendHypercoreWithdraw, sendSolanaWithdraw, truncateAddress, useAddressBalance, useAllowedCountry, useDepositPolling, useDepositQuote, usePaymentIntent, useSourceTokenValidation, useSupportedDepositTokens, useSupportedDestinationTokens, useTheme, useVerifyRecipientAddress, useWithdrawPolling };
|
|
1417
|
+
export { type AllowedCountryResult, BankTransfer, BankTransferButton, type BankTransferProps, type BankTransferView, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type BuyWithCardProps, 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, DepositModal, type DepositModalInitialScreen, type DepositModalProps, DepositSuccessToast, 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 InputTokens, type ListTokens, ManualDepositButton, QRCodeSkeleton, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SolanaWalletProvider, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, type UseDepositQuoteParams, type UsePaymentIntentParams, type UseSupportedDepositTokensOptions, WithdrawConfirmingView, WithdrawDoubleInput, WithdrawExecutionItem, WithdrawForm, WithdrawModal, type WithdrawModalProps, WithdrawTokenSelector, type WithdrawTransactionInfo, buttonVariants, cn, colors, defaultColors, detectBrowserWallet, getColors, isHypercoreChain, mergeColors, resolveComponentTokens, sendEvmWithdraw, sendHypercoreWithdraw, sendSolanaWithdraw, truncateAddress, useAddressBalance, useAllowedCountry, useDepositPolling, useDepositQuote, usePaymentIntent, useSourceTokenValidation, useSupportedDepositTokens, useSupportedDestinationTokens, useTheme, useVerifyRecipientAddress, useWithdrawPolling };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DirectExecutionSucceededEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
2
|
+
import { DirectExecutionSucceededEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, DefaultTokenResponse, ConfirmIntegrationTransferResult, CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
3
3
|
export { ChainType, DepositMethod } from '@unifold/core';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -141,7 +141,7 @@ interface EvmWalletProvider {
|
|
|
141
141
|
removeListener?(event: string, callback: (...args: unknown[]) => void): void;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker" | "pay_with_exchange" | "exchange_connect" | "wallet_connect";
|
|
144
|
+
type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker" | "pay_with_exchange" | "exchange_connect" | "wallet_connect" | "bank_transfer";
|
|
145
145
|
interface DepositModalProps {
|
|
146
146
|
open: boolean;
|
|
147
147
|
onOpenChange: (open: boolean) => void;
|
|
@@ -210,6 +210,14 @@ interface DepositModalProps {
|
|
|
210
210
|
enableConnectExchange?: boolean;
|
|
211
211
|
/** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
212
212
|
enableCashApp?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Enable the "Bank Transfer" section (SEPA, etc.). Overrides dashboard default.
|
|
215
|
+
* Resolves as flag ?? dashboard `bank_transfer.enabled` ?? true.
|
|
216
|
+
*
|
|
217
|
+
* Even when enabled, the rails listed inside are filtered by country —
|
|
218
|
+
* users outside the SEPA zone see a disabled "coming soon" card.
|
|
219
|
+
*/
|
|
220
|
+
enableBankTransfer?: boolean;
|
|
213
221
|
/** Deposit with Card — onramp step: hide the You use / You buy / You receive card. @default false */
|
|
214
222
|
hideDepositFlowInfo?: boolean;
|
|
215
223
|
/** Deposit with Card — onramp step: hide the temporary wallet address disclaimer. @default false */
|
|
@@ -243,7 +251,7 @@ interface DepositModalProps {
|
|
|
243
251
|
*/
|
|
244
252
|
displayMode?: "stacked" | "tabs";
|
|
245
253
|
}
|
|
246
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableTransferCrypto, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, displayMode, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
254
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableTransferCrypto, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, enableBankTransfer, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, displayMode, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
247
255
|
|
|
248
256
|
interface DepositHeaderProps {
|
|
249
257
|
title: string;
|
|
@@ -492,6 +500,53 @@ interface DepositTrackerButtonProps {
|
|
|
492
500
|
}
|
|
493
501
|
declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: DepositTrackerButtonProps): react_jsx_runtime.JSX.Element;
|
|
494
502
|
|
|
503
|
+
interface BankTransferButtonProps {
|
|
504
|
+
onClick: () => void;
|
|
505
|
+
title: string;
|
|
506
|
+
subtitle: string;
|
|
507
|
+
/** When true, renders the row as a disabled "coming soon" card (no click). */
|
|
508
|
+
comingSoon?: boolean;
|
|
509
|
+
}
|
|
510
|
+
declare function BankTransferButton({ onClick, title, subtitle, comingSoon, }: BankTransferButtonProps): react_jsx_runtime.JSX.Element;
|
|
511
|
+
|
|
512
|
+
type BankTransferView = "providers" | "amount" | "pending";
|
|
513
|
+
interface BankTransferProps {
|
|
514
|
+
userId: string;
|
|
515
|
+
publishableKey: string;
|
|
516
|
+
view?: BankTransferView;
|
|
517
|
+
onViewChange?: (view: BankTransferView) => void;
|
|
518
|
+
recipientAddress?: string;
|
|
519
|
+
destinationChainType?: ChainType;
|
|
520
|
+
destinationChainId?: string;
|
|
521
|
+
destinationTokenAddress?: string;
|
|
522
|
+
destinationTokenSymbol?: string;
|
|
523
|
+
wallets?: Wallet[];
|
|
524
|
+
/** Pre-resolved default token (saves a network round-trip when provided). */
|
|
525
|
+
defaultToken?: DefaultTokenResponse | null;
|
|
526
|
+
assetCdnUrl?: string;
|
|
527
|
+
onDepositSuccess?: (data: {
|
|
528
|
+
message: string;
|
|
529
|
+
transaction?: unknown;
|
|
530
|
+
executionId?: string;
|
|
531
|
+
}) => void;
|
|
532
|
+
onEvent?: (event: DepositEvent) => void;
|
|
533
|
+
onDepositError?: (error: {
|
|
534
|
+
message: string;
|
|
535
|
+
error?: unknown;
|
|
536
|
+
code?: string;
|
|
537
|
+
}) => void;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Bank-transfer deposit flow. Three steps:
|
|
541
|
+
* 1. Provider list (returned by `getBankTransferProviders`)
|
|
542
|
+
* 2. Amount input (Swapped-only today; other providers may diverge later)
|
|
543
|
+
* 3. Pending — Swapped widget opens in a new tab, we poll for the deposit
|
|
544
|
+
*
|
|
545
|
+
* The widget itself handles KYC + IBAN entry + payment; we just collect the
|
|
546
|
+
* fiat amount up-front so users aren't surprised by the default in the widget.
|
|
547
|
+
*/
|
|
548
|
+
declare function BankTransfer({ userId, publishableKey, view: externalView, onViewChange, destinationChainType, destinationChainId, destinationTokenAddress, destinationTokenSymbol, wallets, defaultToken: externalDefaultToken, assetCdnUrl, onDepositSuccess, onEvent, onDepositError, }: BankTransferProps): react_jsx_runtime.JSX.Element;
|
|
549
|
+
|
|
495
550
|
interface DepositWallet {
|
|
496
551
|
id: string;
|
|
497
552
|
chain_type: string;
|
|
@@ -611,14 +666,24 @@ interface CheckoutModalProps {
|
|
|
611
666
|
onCheckoutSuccess?: (data: {
|
|
612
667
|
paymentIntentId: string;
|
|
613
668
|
status: string;
|
|
669
|
+
method?: CheckoutMethod;
|
|
670
|
+
/**
|
|
671
|
+
* The full payment intent at the time of the success callback, mapped to
|
|
672
|
+
* SDK camelCase. Present whenever the SDK has retrieved the PI (always for
|
|
673
|
+
* the terminal `succeeded` callback; may be undefined for intermediate
|
|
674
|
+
* wallet-confirmed `processing` callbacks fired before the PI is polled).
|
|
675
|
+
*/
|
|
676
|
+
paymentIntent?: CheckoutPaymentIntent;
|
|
614
677
|
}) => void;
|
|
615
678
|
onCheckoutError?: (error: {
|
|
616
679
|
message: string;
|
|
617
680
|
error?: unknown;
|
|
618
681
|
code?: string;
|
|
682
|
+
method?: CheckoutMethod;
|
|
619
683
|
}) => void;
|
|
684
|
+
onEvent?: (event: CheckoutEvent) => void;
|
|
620
685
|
}
|
|
621
|
-
declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
|
|
686
|
+
declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, onEvent, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
|
|
622
687
|
|
|
623
688
|
interface WithdrawTransactionInfo {
|
|
624
689
|
/** Source (sending) chain type */
|
|
@@ -1349,4 +1414,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1349
1414
|
*/
|
|
1350
1415
|
declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
|
|
1351
1416
|
|
|
1352
|
-
export { type AllowedCountryResult, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type BuyWithCardProps, 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, DepositModal, type DepositModalInitialScreen, type DepositModalProps, DepositSuccessToast, 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 InputTokens, type ListTokens, ManualDepositButton, QRCodeSkeleton, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SolanaWalletProvider, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, type UseDepositQuoteParams, type UsePaymentIntentParams, type UseSupportedDepositTokensOptions, WithdrawConfirmingView, WithdrawDoubleInput, WithdrawExecutionItem, WithdrawForm, WithdrawModal, type WithdrawModalProps, WithdrawTokenSelector, type WithdrawTransactionInfo, buttonVariants, cn, colors, defaultColors, detectBrowserWallet, getColors, isHypercoreChain, mergeColors, resolveComponentTokens, sendEvmWithdraw, sendHypercoreWithdraw, sendSolanaWithdraw, truncateAddress, useAddressBalance, useAllowedCountry, useDepositPolling, useDepositQuote, usePaymentIntent, useSourceTokenValidation, useSupportedDepositTokens, useSupportedDestinationTokens, useTheme, useVerifyRecipientAddress, useWithdrawPolling };
|
|
1417
|
+
export { type AllowedCountryResult, BankTransfer, BankTransferButton, type BankTransferProps, type BankTransferView, type BrowserWalletAmountQuickSelect, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type BuyWithCardProps, 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, DepositModal, type DepositModalInitialScreen, type DepositModalProps, DepositSuccessToast, 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 InputTokens, type ListTokens, ManualDepositButton, QRCodeSkeleton, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SolanaWalletProvider, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, type UseDepositQuoteParams, type UsePaymentIntentParams, type UseSupportedDepositTokensOptions, WithdrawConfirmingView, WithdrawDoubleInput, WithdrawExecutionItem, WithdrawForm, WithdrawModal, type WithdrawModalProps, WithdrawTokenSelector, type WithdrawTransactionInfo, buttonVariants, cn, colors, defaultColors, detectBrowserWallet, getColors, isHypercoreChain, mergeColors, resolveComponentTokens, sendEvmWithdraw, sendHypercoreWithdraw, sendSolanaWithdraw, truncateAddress, useAddressBalance, useAllowedCountry, useDepositPolling, useDepositQuote, usePaymentIntent, useSourceTokenValidation, useSupportedDepositTokens, useSupportedDestinationTokens, useTheme, useVerifyRecipientAddress, useWithdrawPolling };
|