@unifold/ui-react 0.1.66 → 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 +109 -20
- package/dist/index.d.ts +109 -20
- package/dist/index.js +3019 -2102
- package/dist/index.mjs +2868 -1938
- 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,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { ChainType } 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
|
+
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';
|
|
6
6
|
import * as React$1 from 'react';
|
|
@@ -41,6 +41,7 @@ interface UseDepositPollingOptions {
|
|
|
41
41
|
message: string;
|
|
42
42
|
transaction?: unknown;
|
|
43
43
|
executionId?: string;
|
|
44
|
+
execution?: DirectExecutionSucceededEvent;
|
|
44
45
|
}) => void;
|
|
45
46
|
onDepositError?: (error: {
|
|
46
47
|
message: string;
|
|
@@ -55,7 +56,7 @@ interface UseDepositPollingOptions {
|
|
|
55
56
|
immediateDirectPolling?: boolean;
|
|
56
57
|
}
|
|
57
58
|
interface UseDepositPollingResult {
|
|
58
|
-
executions:
|
|
59
|
+
executions: DirectExecutionResponse[];
|
|
59
60
|
isPolling: boolean;
|
|
60
61
|
/** Whether the backend poll endpoint has been enabled */
|
|
61
62
|
pollingEnabled: boolean;
|
|
@@ -140,7 +141,7 @@ interface EvmWalletProvider {
|
|
|
140
141
|
removeListener?(event: string, callback: (...args: unknown[]) => void): void;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
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";
|
|
144
145
|
interface DepositModalProps {
|
|
145
146
|
open: boolean;
|
|
146
147
|
onOpenChange: (open: boolean) => void;
|
|
@@ -209,6 +210,14 @@ interface DepositModalProps {
|
|
|
209
210
|
enableConnectExchange?: boolean;
|
|
210
211
|
/** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
211
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;
|
|
212
221
|
/** Deposit with Card — onramp step: hide the You use / You buy / You receive card. @default false */
|
|
213
222
|
hideDepositFlowInfo?: boolean;
|
|
214
223
|
/** Deposit with Card — onramp step: hide the temporary wallet address disclaimer. @default false */
|
|
@@ -217,12 +226,17 @@ interface DepositModalProps {
|
|
|
217
226
|
message: string;
|
|
218
227
|
transaction?: unknown;
|
|
219
228
|
executionId?: string;
|
|
229
|
+
execution?: DirectExecutionSucceededEvent;
|
|
230
|
+
/** Which funding method produced this success event. */
|
|
231
|
+
method?: DepositMethod;
|
|
220
232
|
}) => void;
|
|
221
233
|
onEvent?: (event: DepositEvent) => void;
|
|
222
234
|
onDepositError?: (error: {
|
|
223
235
|
message: string;
|
|
224
236
|
error?: unknown;
|
|
225
237
|
code?: string;
|
|
238
|
+
/** Which funding method produced this error event. */
|
|
239
|
+
method?: DepositMethod;
|
|
226
240
|
}) => void;
|
|
227
241
|
theme?: "light" | "dark" | "auto";
|
|
228
242
|
/** Hide the dialog overlay and close button for inline/embedded mode */
|
|
@@ -237,7 +251,7 @@ interface DepositModalProps {
|
|
|
237
251
|
*/
|
|
238
252
|
displayMode?: "stacked" | "tabs";
|
|
239
253
|
}
|
|
240
|
-
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;
|
|
241
255
|
|
|
242
256
|
interface DepositHeaderProps {
|
|
243
257
|
title: string;
|
|
@@ -279,11 +293,12 @@ interface TransferCryptoSingleInputProps {
|
|
|
279
293
|
* - "manual": User must click "I've made the deposit" to start polling
|
|
280
294
|
*/
|
|
281
295
|
depositConfirmationMode?: DepositConfirmationMode;
|
|
282
|
-
onExecutionsChange?: (executions:
|
|
296
|
+
onExecutionsChange?: (executions: DirectExecutionResponse[]) => void;
|
|
283
297
|
onDepositSuccess?: (data: {
|
|
284
298
|
message: string;
|
|
285
299
|
transaction?: unknown;
|
|
286
300
|
executionId?: string;
|
|
301
|
+
execution?: DirectExecutionSucceededEvent;
|
|
287
302
|
}) => void;
|
|
288
303
|
onDepositError?: (error: {
|
|
289
304
|
message: string;
|
|
@@ -335,11 +350,12 @@ interface TransferCryptoDoubleInputProps {
|
|
|
335
350
|
* - "manual": User must click "I've made the deposit" to start polling
|
|
336
351
|
*/
|
|
337
352
|
depositConfirmationMode?: DepositConfirmationMode;
|
|
338
|
-
onExecutionsChange?: (executions:
|
|
353
|
+
onExecutionsChange?: (executions: DirectExecutionResponse[]) => void;
|
|
339
354
|
onDepositSuccess?: (data: {
|
|
340
355
|
message: string;
|
|
341
356
|
transaction?: unknown;
|
|
342
357
|
executionId?: string;
|
|
358
|
+
execution?: DirectExecutionSucceededEvent;
|
|
343
359
|
}) => void;
|
|
344
360
|
onDepositError?: (error: {
|
|
345
361
|
message: string;
|
|
@@ -366,6 +382,7 @@ interface BuyWithCardProps {
|
|
|
366
382
|
message: string;
|
|
367
383
|
transaction?: unknown;
|
|
368
384
|
executionId?: string;
|
|
385
|
+
execution?: DirectExecutionSucceededEvent;
|
|
369
386
|
}) => void;
|
|
370
387
|
onEvent?: (event: DepositEvent) => void;
|
|
371
388
|
onDepositError?: (error: {
|
|
@@ -406,7 +423,7 @@ interface DepositSuccessToastProps {
|
|
|
406
423
|
tokenIconUrl?: string;
|
|
407
424
|
sourceAmountUsd?: string;
|
|
408
425
|
onClose: () => void;
|
|
409
|
-
execution?:
|
|
426
|
+
execution?: DirectExecutionResponse;
|
|
410
427
|
}
|
|
411
428
|
declare function DepositSuccessToast({ depositTx, orderSubmittedAt, status, tokenIconUrl, sourceAmountUsd, onClose, execution, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
|
|
412
429
|
|
|
@@ -414,7 +431,7 @@ interface DepositsModalProps {
|
|
|
414
431
|
open: boolean;
|
|
415
432
|
onOpenChange: (open: boolean) => void;
|
|
416
433
|
onCloseAll?: () => void;
|
|
417
|
-
executions:
|
|
434
|
+
executions: DirectExecutionResponse[];
|
|
418
435
|
userId: string;
|
|
419
436
|
publishableKey: string;
|
|
420
437
|
themeClass?: string;
|
|
@@ -483,6 +500,53 @@ interface DepositTrackerButtonProps {
|
|
|
483
500
|
}
|
|
484
501
|
declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: DepositTrackerButtonProps): react_jsx_runtime.JSX.Element;
|
|
485
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
|
+
|
|
486
550
|
interface DepositWallet {
|
|
487
551
|
id: string;
|
|
488
552
|
chain_type: string;
|
|
@@ -497,6 +561,17 @@ interface CoinbaseConnectProps {
|
|
|
497
561
|
destinationChainId: string;
|
|
498
562
|
destinationChainType: string;
|
|
499
563
|
onTransferSuccess?: (result: ConfirmIntegrationTransferResult) => void;
|
|
564
|
+
onDepositSuccess?: (data: {
|
|
565
|
+
message: string;
|
|
566
|
+
transaction?: unknown;
|
|
567
|
+
executionId?: string;
|
|
568
|
+
execution?: DirectExecutionSucceededEvent;
|
|
569
|
+
}) => void;
|
|
570
|
+
onDepositError?: (error: {
|
|
571
|
+
message: string;
|
|
572
|
+
error?: unknown;
|
|
573
|
+
code?: string;
|
|
574
|
+
}) => void;
|
|
500
575
|
onTransferError?: (error: {
|
|
501
576
|
message: string;
|
|
502
577
|
}) => void;
|
|
@@ -506,25 +581,25 @@ interface CoinbaseConnectProps {
|
|
|
506
581
|
skipToHoldings?: boolean;
|
|
507
582
|
/** Whether back navigation from the root view is available (false when opened as a standalone initial screen). */
|
|
508
583
|
canGoBack?: boolean;
|
|
509
|
-
onExecutionsChange?: (executions:
|
|
584
|
+
onExecutionsChange?: (executions: DirectExecutionResponse[]) => void;
|
|
510
585
|
defaultSourceChainType?: ChainType;
|
|
511
586
|
defaultSourceChainId?: string;
|
|
512
587
|
defaultSourceTokenAddress?: string;
|
|
513
588
|
defaultSourceSymbol?: string;
|
|
514
589
|
}
|
|
515
|
-
declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, canGoBack, onExecutionsChange, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
|
|
590
|
+
declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onDepositSuccess, onDepositError, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, canGoBack, onExecutionsChange, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
|
|
516
591
|
declare namespace CoinbaseConnect {
|
|
517
592
|
var displayName: string;
|
|
518
593
|
}
|
|
519
594
|
|
|
520
595
|
interface DepositExecutionItemProps {
|
|
521
|
-
execution:
|
|
596
|
+
execution: DirectExecutionResponse;
|
|
522
597
|
onClick?: () => void;
|
|
523
598
|
}
|
|
524
599
|
declare function DepositExecutionItem({ execution, onClick, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
|
|
525
600
|
|
|
526
601
|
interface DepositDetailContentProps {
|
|
527
|
-
execution:
|
|
602
|
+
execution: DirectExecutionResponse;
|
|
528
603
|
/** Merged into root (e.g. wider horizontal padding in embedded deposit details). */
|
|
529
604
|
className?: string;
|
|
530
605
|
/** Use "withdraw" to show "Withdrawal Tx" instead of "Deposit Tx" in details. */
|
|
@@ -553,7 +628,7 @@ declare function CheckingForDepositIndicator({ showWaitingUi, hasExecution, }: {
|
|
|
553
628
|
interface ConfirmingViewProps {
|
|
554
629
|
isConfirming: boolean;
|
|
555
630
|
onClose: () => void;
|
|
556
|
-
executions?:
|
|
631
|
+
executions?: DirectExecutionResponse[];
|
|
557
632
|
isPolling?: boolean;
|
|
558
633
|
onNewDeposit?: () => void;
|
|
559
634
|
onDone?: () => void;
|
|
@@ -591,14 +666,24 @@ interface CheckoutModalProps {
|
|
|
591
666
|
onCheckoutSuccess?: (data: {
|
|
592
667
|
paymentIntentId: string;
|
|
593
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;
|
|
594
677
|
}) => void;
|
|
595
678
|
onCheckoutError?: (error: {
|
|
596
679
|
message: string;
|
|
597
680
|
error?: unknown;
|
|
598
681
|
code?: string;
|
|
682
|
+
method?: CheckoutMethod;
|
|
599
683
|
}) => void;
|
|
684
|
+
onEvent?: (event: CheckoutEvent) => void;
|
|
600
685
|
}
|
|
601
|
-
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;
|
|
602
687
|
|
|
603
688
|
interface WithdrawTransactionInfo {
|
|
604
689
|
/** Source (sending) chain type */
|
|
@@ -652,16 +737,19 @@ interface WithdrawModalProps {
|
|
|
652
737
|
onWithdrawSuccess?: (data: {
|
|
653
738
|
message: string;
|
|
654
739
|
transaction?: unknown;
|
|
740
|
+
executionId?: string;
|
|
741
|
+
execution?: WithdrawDirectExecutionSucceededEvent;
|
|
655
742
|
}) => void;
|
|
656
743
|
onWithdrawError?: (error: {
|
|
657
744
|
message: string;
|
|
658
745
|
error?: unknown;
|
|
659
746
|
code?: string;
|
|
660
747
|
}) => void;
|
|
748
|
+
onEvent?: (event: WithdrawEvent) => void;
|
|
661
749
|
theme?: "light" | "dark" | "auto";
|
|
662
750
|
hideOverlay?: boolean;
|
|
663
751
|
}
|
|
664
|
-
declare function WithdrawModal({ open, onOpenChange, publishableKey, modalTitle, externalUserId, sourceChainType, sourceChainId, sourceTokenAddress, sourceTokenSymbol, recipientAddress: recipientAddressProp, senderAddress, defaultDestinationChainType, defaultDestinationChainId, defaultDestinationTokenAddress, defaultDestinationSymbol, onWithdraw, onWithdrawSuccess, onWithdrawError, theme, hideOverlay, }: WithdrawModalProps): react_jsx_runtime.JSX.Element;
|
|
752
|
+
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;
|
|
665
753
|
|
|
666
754
|
interface WithdrawTokenSelectorProps {
|
|
667
755
|
tokens: DestinationToken[];
|
|
@@ -744,14 +832,14 @@ interface WithdrawFormProps {
|
|
|
744
832
|
declare function WithdrawForm({ publishableKey, externalUserId, sourceChainType, selectedToken, selectedChain, sourceTokenSymbol, recipientAddressProp, balanceData, isLoadingBalance, isStablecoin, minimumWithdrawAmountUsd, estimatedProcessingTime, maxSlippagePercent, priceImpactPercent, senderAddress, sourceChainId, sourceTokenAddress, onWithdraw, onWithdrawError, onDepositWalletCreation, onWithdrawSubmitted, footerLeft, }: WithdrawFormProps): react_jsx_runtime.JSX.Element;
|
|
745
833
|
|
|
746
834
|
interface WithdrawExecutionItemProps {
|
|
747
|
-
execution:
|
|
835
|
+
execution: DirectExecutionResponse;
|
|
748
836
|
onClick?: () => void;
|
|
749
837
|
}
|
|
750
838
|
declare function WithdrawExecutionItem({ execution, onClick, }: WithdrawExecutionItemProps): react_jsx_runtime.JSX.Element;
|
|
751
839
|
|
|
752
840
|
interface WithdrawConfirmingViewProps {
|
|
753
841
|
txInfo: WithdrawTransactionInfo;
|
|
754
|
-
executions:
|
|
842
|
+
executions: DirectExecutionResponse[];
|
|
755
843
|
onClose: () => void;
|
|
756
844
|
onViewTracker: () => void;
|
|
757
845
|
}
|
|
@@ -973,6 +1061,7 @@ interface UseWithdrawPollingOptions {
|
|
|
973
1061
|
message: string;
|
|
974
1062
|
transaction?: unknown;
|
|
975
1063
|
executionId?: string;
|
|
1064
|
+
execution?: WithdrawDirectExecutionSucceededEvent;
|
|
976
1065
|
}) => void;
|
|
977
1066
|
onWithdrawError?: (error: {
|
|
978
1067
|
message: string;
|
|
@@ -981,7 +1070,7 @@ interface UseWithdrawPollingOptions {
|
|
|
981
1070
|
}) => void;
|
|
982
1071
|
}
|
|
983
1072
|
interface UseWithdrawPollingResult {
|
|
984
|
-
executions:
|
|
1073
|
+
executions: DirectExecutionResponse[];
|
|
985
1074
|
isPolling: boolean;
|
|
986
1075
|
}
|
|
987
1076
|
declare function useWithdrawPolling({ userId, publishableKey, depositWalletId, enabled, onWithdrawSuccess, onWithdrawError, }: UseWithdrawPollingOptions): UseWithdrawPollingResult;
|
|
@@ -1325,4 +1414,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1325
1414
|
*/
|
|
1326
1415
|
declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
|
|
1327
1416
|
|
|
1328
|
-
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,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { ChainType } 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
|
+
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';
|
|
6
6
|
import * as React$1 from 'react';
|
|
@@ -41,6 +41,7 @@ interface UseDepositPollingOptions {
|
|
|
41
41
|
message: string;
|
|
42
42
|
transaction?: unknown;
|
|
43
43
|
executionId?: string;
|
|
44
|
+
execution?: DirectExecutionSucceededEvent;
|
|
44
45
|
}) => void;
|
|
45
46
|
onDepositError?: (error: {
|
|
46
47
|
message: string;
|
|
@@ -55,7 +56,7 @@ interface UseDepositPollingOptions {
|
|
|
55
56
|
immediateDirectPolling?: boolean;
|
|
56
57
|
}
|
|
57
58
|
interface UseDepositPollingResult {
|
|
58
|
-
executions:
|
|
59
|
+
executions: DirectExecutionResponse[];
|
|
59
60
|
isPolling: boolean;
|
|
60
61
|
/** Whether the backend poll endpoint has been enabled */
|
|
61
62
|
pollingEnabled: boolean;
|
|
@@ -140,7 +141,7 @@ interface EvmWalletProvider {
|
|
|
140
141
|
removeListener?(event: string, callback: (...args: unknown[]) => void): void;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
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";
|
|
144
145
|
interface DepositModalProps {
|
|
145
146
|
open: boolean;
|
|
146
147
|
onOpenChange: (open: boolean) => void;
|
|
@@ -209,6 +210,14 @@ interface DepositModalProps {
|
|
|
209
210
|
enableConnectExchange?: boolean;
|
|
210
211
|
/** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
211
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;
|
|
212
221
|
/** Deposit with Card — onramp step: hide the You use / You buy / You receive card. @default false */
|
|
213
222
|
hideDepositFlowInfo?: boolean;
|
|
214
223
|
/** Deposit with Card — onramp step: hide the temporary wallet address disclaimer. @default false */
|
|
@@ -217,12 +226,17 @@ interface DepositModalProps {
|
|
|
217
226
|
message: string;
|
|
218
227
|
transaction?: unknown;
|
|
219
228
|
executionId?: string;
|
|
229
|
+
execution?: DirectExecutionSucceededEvent;
|
|
230
|
+
/** Which funding method produced this success event. */
|
|
231
|
+
method?: DepositMethod;
|
|
220
232
|
}) => void;
|
|
221
233
|
onEvent?: (event: DepositEvent) => void;
|
|
222
234
|
onDepositError?: (error: {
|
|
223
235
|
message: string;
|
|
224
236
|
error?: unknown;
|
|
225
237
|
code?: string;
|
|
238
|
+
/** Which funding method produced this error event. */
|
|
239
|
+
method?: DepositMethod;
|
|
226
240
|
}) => void;
|
|
227
241
|
theme?: "light" | "dark" | "auto";
|
|
228
242
|
/** Hide the dialog overlay and close button for inline/embedded mode */
|
|
@@ -237,7 +251,7 @@ interface DepositModalProps {
|
|
|
237
251
|
*/
|
|
238
252
|
displayMode?: "stacked" | "tabs";
|
|
239
253
|
}
|
|
240
|
-
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;
|
|
241
255
|
|
|
242
256
|
interface DepositHeaderProps {
|
|
243
257
|
title: string;
|
|
@@ -279,11 +293,12 @@ interface TransferCryptoSingleInputProps {
|
|
|
279
293
|
* - "manual": User must click "I've made the deposit" to start polling
|
|
280
294
|
*/
|
|
281
295
|
depositConfirmationMode?: DepositConfirmationMode;
|
|
282
|
-
onExecutionsChange?: (executions:
|
|
296
|
+
onExecutionsChange?: (executions: DirectExecutionResponse[]) => void;
|
|
283
297
|
onDepositSuccess?: (data: {
|
|
284
298
|
message: string;
|
|
285
299
|
transaction?: unknown;
|
|
286
300
|
executionId?: string;
|
|
301
|
+
execution?: DirectExecutionSucceededEvent;
|
|
287
302
|
}) => void;
|
|
288
303
|
onDepositError?: (error: {
|
|
289
304
|
message: string;
|
|
@@ -335,11 +350,12 @@ interface TransferCryptoDoubleInputProps {
|
|
|
335
350
|
* - "manual": User must click "I've made the deposit" to start polling
|
|
336
351
|
*/
|
|
337
352
|
depositConfirmationMode?: DepositConfirmationMode;
|
|
338
|
-
onExecutionsChange?: (executions:
|
|
353
|
+
onExecutionsChange?: (executions: DirectExecutionResponse[]) => void;
|
|
339
354
|
onDepositSuccess?: (data: {
|
|
340
355
|
message: string;
|
|
341
356
|
transaction?: unknown;
|
|
342
357
|
executionId?: string;
|
|
358
|
+
execution?: DirectExecutionSucceededEvent;
|
|
343
359
|
}) => void;
|
|
344
360
|
onDepositError?: (error: {
|
|
345
361
|
message: string;
|
|
@@ -366,6 +382,7 @@ interface BuyWithCardProps {
|
|
|
366
382
|
message: string;
|
|
367
383
|
transaction?: unknown;
|
|
368
384
|
executionId?: string;
|
|
385
|
+
execution?: DirectExecutionSucceededEvent;
|
|
369
386
|
}) => void;
|
|
370
387
|
onEvent?: (event: DepositEvent) => void;
|
|
371
388
|
onDepositError?: (error: {
|
|
@@ -406,7 +423,7 @@ interface DepositSuccessToastProps {
|
|
|
406
423
|
tokenIconUrl?: string;
|
|
407
424
|
sourceAmountUsd?: string;
|
|
408
425
|
onClose: () => void;
|
|
409
|
-
execution?:
|
|
426
|
+
execution?: DirectExecutionResponse;
|
|
410
427
|
}
|
|
411
428
|
declare function DepositSuccessToast({ depositTx, orderSubmittedAt, status, tokenIconUrl, sourceAmountUsd, onClose, execution, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
|
|
412
429
|
|
|
@@ -414,7 +431,7 @@ interface DepositsModalProps {
|
|
|
414
431
|
open: boolean;
|
|
415
432
|
onOpenChange: (open: boolean) => void;
|
|
416
433
|
onCloseAll?: () => void;
|
|
417
|
-
executions:
|
|
434
|
+
executions: DirectExecutionResponse[];
|
|
418
435
|
userId: string;
|
|
419
436
|
publishableKey: string;
|
|
420
437
|
themeClass?: string;
|
|
@@ -483,6 +500,53 @@ interface DepositTrackerButtonProps {
|
|
|
483
500
|
}
|
|
484
501
|
declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: DepositTrackerButtonProps): react_jsx_runtime.JSX.Element;
|
|
485
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
|
+
|
|
486
550
|
interface DepositWallet {
|
|
487
551
|
id: string;
|
|
488
552
|
chain_type: string;
|
|
@@ -497,6 +561,17 @@ interface CoinbaseConnectProps {
|
|
|
497
561
|
destinationChainId: string;
|
|
498
562
|
destinationChainType: string;
|
|
499
563
|
onTransferSuccess?: (result: ConfirmIntegrationTransferResult) => void;
|
|
564
|
+
onDepositSuccess?: (data: {
|
|
565
|
+
message: string;
|
|
566
|
+
transaction?: unknown;
|
|
567
|
+
executionId?: string;
|
|
568
|
+
execution?: DirectExecutionSucceededEvent;
|
|
569
|
+
}) => void;
|
|
570
|
+
onDepositError?: (error: {
|
|
571
|
+
message: string;
|
|
572
|
+
error?: unknown;
|
|
573
|
+
code?: string;
|
|
574
|
+
}) => void;
|
|
500
575
|
onTransferError?: (error: {
|
|
501
576
|
message: string;
|
|
502
577
|
}) => void;
|
|
@@ -506,25 +581,25 @@ interface CoinbaseConnectProps {
|
|
|
506
581
|
skipToHoldings?: boolean;
|
|
507
582
|
/** Whether back navigation from the root view is available (false when opened as a standalone initial screen). */
|
|
508
583
|
canGoBack?: boolean;
|
|
509
|
-
onExecutionsChange?: (executions:
|
|
584
|
+
onExecutionsChange?: (executions: DirectExecutionResponse[]) => void;
|
|
510
585
|
defaultSourceChainType?: ChainType;
|
|
511
586
|
defaultSourceChainId?: string;
|
|
512
587
|
defaultSourceTokenAddress?: string;
|
|
513
588
|
defaultSourceSymbol?: string;
|
|
514
589
|
}
|
|
515
|
-
declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, canGoBack, onExecutionsChange, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
|
|
590
|
+
declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onDepositSuccess, onDepositError, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, canGoBack, onExecutionsChange, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
|
|
516
591
|
declare namespace CoinbaseConnect {
|
|
517
592
|
var displayName: string;
|
|
518
593
|
}
|
|
519
594
|
|
|
520
595
|
interface DepositExecutionItemProps {
|
|
521
|
-
execution:
|
|
596
|
+
execution: DirectExecutionResponse;
|
|
522
597
|
onClick?: () => void;
|
|
523
598
|
}
|
|
524
599
|
declare function DepositExecutionItem({ execution, onClick, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
|
|
525
600
|
|
|
526
601
|
interface DepositDetailContentProps {
|
|
527
|
-
execution:
|
|
602
|
+
execution: DirectExecutionResponse;
|
|
528
603
|
/** Merged into root (e.g. wider horizontal padding in embedded deposit details). */
|
|
529
604
|
className?: string;
|
|
530
605
|
/** Use "withdraw" to show "Withdrawal Tx" instead of "Deposit Tx" in details. */
|
|
@@ -553,7 +628,7 @@ declare function CheckingForDepositIndicator({ showWaitingUi, hasExecution, }: {
|
|
|
553
628
|
interface ConfirmingViewProps {
|
|
554
629
|
isConfirming: boolean;
|
|
555
630
|
onClose: () => void;
|
|
556
|
-
executions?:
|
|
631
|
+
executions?: DirectExecutionResponse[];
|
|
557
632
|
isPolling?: boolean;
|
|
558
633
|
onNewDeposit?: () => void;
|
|
559
634
|
onDone?: () => void;
|
|
@@ -591,14 +666,24 @@ interface CheckoutModalProps {
|
|
|
591
666
|
onCheckoutSuccess?: (data: {
|
|
592
667
|
paymentIntentId: string;
|
|
593
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;
|
|
594
677
|
}) => void;
|
|
595
678
|
onCheckoutError?: (error: {
|
|
596
679
|
message: string;
|
|
597
680
|
error?: unknown;
|
|
598
681
|
code?: string;
|
|
682
|
+
method?: CheckoutMethod;
|
|
599
683
|
}) => void;
|
|
684
|
+
onEvent?: (event: CheckoutEvent) => void;
|
|
600
685
|
}
|
|
601
|
-
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;
|
|
602
687
|
|
|
603
688
|
interface WithdrawTransactionInfo {
|
|
604
689
|
/** Source (sending) chain type */
|
|
@@ -652,16 +737,19 @@ interface WithdrawModalProps {
|
|
|
652
737
|
onWithdrawSuccess?: (data: {
|
|
653
738
|
message: string;
|
|
654
739
|
transaction?: unknown;
|
|
740
|
+
executionId?: string;
|
|
741
|
+
execution?: WithdrawDirectExecutionSucceededEvent;
|
|
655
742
|
}) => void;
|
|
656
743
|
onWithdrawError?: (error: {
|
|
657
744
|
message: string;
|
|
658
745
|
error?: unknown;
|
|
659
746
|
code?: string;
|
|
660
747
|
}) => void;
|
|
748
|
+
onEvent?: (event: WithdrawEvent) => void;
|
|
661
749
|
theme?: "light" | "dark" | "auto";
|
|
662
750
|
hideOverlay?: boolean;
|
|
663
751
|
}
|
|
664
|
-
declare function WithdrawModal({ open, onOpenChange, publishableKey, modalTitle, externalUserId, sourceChainType, sourceChainId, sourceTokenAddress, sourceTokenSymbol, recipientAddress: recipientAddressProp, senderAddress, defaultDestinationChainType, defaultDestinationChainId, defaultDestinationTokenAddress, defaultDestinationSymbol, onWithdraw, onWithdrawSuccess, onWithdrawError, theme, hideOverlay, }: WithdrawModalProps): react_jsx_runtime.JSX.Element;
|
|
752
|
+
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;
|
|
665
753
|
|
|
666
754
|
interface WithdrawTokenSelectorProps {
|
|
667
755
|
tokens: DestinationToken[];
|
|
@@ -744,14 +832,14 @@ interface WithdrawFormProps {
|
|
|
744
832
|
declare function WithdrawForm({ publishableKey, externalUserId, sourceChainType, selectedToken, selectedChain, sourceTokenSymbol, recipientAddressProp, balanceData, isLoadingBalance, isStablecoin, minimumWithdrawAmountUsd, estimatedProcessingTime, maxSlippagePercent, priceImpactPercent, senderAddress, sourceChainId, sourceTokenAddress, onWithdraw, onWithdrawError, onDepositWalletCreation, onWithdrawSubmitted, footerLeft, }: WithdrawFormProps): react_jsx_runtime.JSX.Element;
|
|
745
833
|
|
|
746
834
|
interface WithdrawExecutionItemProps {
|
|
747
|
-
execution:
|
|
835
|
+
execution: DirectExecutionResponse;
|
|
748
836
|
onClick?: () => void;
|
|
749
837
|
}
|
|
750
838
|
declare function WithdrawExecutionItem({ execution, onClick, }: WithdrawExecutionItemProps): react_jsx_runtime.JSX.Element;
|
|
751
839
|
|
|
752
840
|
interface WithdrawConfirmingViewProps {
|
|
753
841
|
txInfo: WithdrawTransactionInfo;
|
|
754
|
-
executions:
|
|
842
|
+
executions: DirectExecutionResponse[];
|
|
755
843
|
onClose: () => void;
|
|
756
844
|
onViewTracker: () => void;
|
|
757
845
|
}
|
|
@@ -973,6 +1061,7 @@ interface UseWithdrawPollingOptions {
|
|
|
973
1061
|
message: string;
|
|
974
1062
|
transaction?: unknown;
|
|
975
1063
|
executionId?: string;
|
|
1064
|
+
execution?: WithdrawDirectExecutionSucceededEvent;
|
|
976
1065
|
}) => void;
|
|
977
1066
|
onWithdrawError?: (error: {
|
|
978
1067
|
message: string;
|
|
@@ -981,7 +1070,7 @@ interface UseWithdrawPollingOptions {
|
|
|
981
1070
|
}) => void;
|
|
982
1071
|
}
|
|
983
1072
|
interface UseWithdrawPollingResult {
|
|
984
|
-
executions:
|
|
1073
|
+
executions: DirectExecutionResponse[];
|
|
985
1074
|
isPolling: boolean;
|
|
986
1075
|
}
|
|
987
1076
|
declare function useWithdrawPolling({ userId, publishableKey, depositWalletId, enabled, onWithdrawSuccess, onWithdrawError, }: UseWithdrawPollingOptions): UseWithdrawPollingResult;
|
|
@@ -1325,4 +1414,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1325
1414
|
*/
|
|
1326
1415
|
declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
|
|
1327
1416
|
|
|
1328
|
-
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 };
|