@unifold/ui-react 0.1.62 → 0.1.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -160,9 +160,9 @@ interface DepositModalProps {
160
160
  */
161
161
  contractCalls?: EvmContractCall[];
162
162
  /**
163
- * Pre-select source token/chain in the Transfer Crypto view.
163
+ * Prefer a source token/chain in Transfer Crypto, Wallet Connect, and Connect Exchange flows.
164
164
  * All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
165
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
165
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
166
166
  */
167
167
  defaultSourceChainType?: ChainType;
168
168
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` + symbol or token address. */
@@ -171,6 +171,7 @@ interface DepositModalProps {
171
171
  defaultSourceTokenAddress?: string;
172
172
  /** Source token symbol (e.g. `"USDC"`). Must be paired with `defaultSourceChainType` + `defaultSourceChainId`. */
173
173
  defaultSourceSymbol?: string;
174
+ /** Hide the "Deposit Tracker" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false (shown). */
174
175
  hideDepositTracker?: boolean;
175
176
  /** Show balance in deposit modal header. Defaults to false */
176
177
  showBalanceHeader?: boolean;
@@ -182,20 +183,22 @@ interface DepositModalProps {
182
183
  * - "manual": User must click "I've made the deposit" to start polling
183
184
  */
184
185
  depositConfirmationMode?: DepositConfirmationMode;
185
- /** Enable browser wallet connection option. Defaults to false */
186
+ /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
187
+ enableTransferCrypto?: boolean;
188
+ /** Enable browser wallet connection option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
186
189
  enableConnectWallet?: boolean;
187
190
  /**
188
191
  * Connect Wallet → Enter amount: percentage chips (10%, 25%, 50%, 75%, MAX) from USD balance, or fixed USD ($25…).
189
192
  * @default "percentage"
190
193
  */
191
194
  browserWalletAmountQuickSelect?: BrowserWalletAmountQuickSelect;
192
- /** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
195
+ /** Enable "Pay with Exchange" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
193
196
  enablePayWithExchange?: boolean;
194
- /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Defaults to dashboard value or true. */
197
+ /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
195
198
  enableFiatOnramp?: boolean;
196
- /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Defaults to false. */
199
+ /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
197
200
  enableConnectExchange?: boolean;
198
- /** Enable "Pay with Cash App" option. Defaults to false. */
201
+ /** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
199
202
  enableCashApp?: boolean;
200
203
  /** Deposit with Card — onramp step: hide the You use / You buy / You receive card. @default false */
201
204
  hideDepositFlowInfo?: boolean;
@@ -218,7 +221,7 @@ interface DepositModalProps {
218
221
  /** First screen when the modal opens. Default `main` (deposit menu). */
219
222
  initialScreen?: DepositModalInitialScreen;
220
223
  }
221
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
224
+ 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, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
222
225
 
223
226
  interface DepositHeaderProps {
224
227
  title: string;
@@ -488,8 +491,12 @@ interface CoinbaseConnectProps {
488
491
  /** Whether back navigation from the root view is available (false when opened as a standalone initial screen). */
489
492
  canGoBack?: boolean;
490
493
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
494
+ defaultSourceChainType?: ChainType;
495
+ defaultSourceChainId?: string;
496
+ defaultSourceTokenAddress?: string;
497
+ defaultSourceSymbol?: string;
491
498
  }
492
- declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, canGoBack, onExecutionsChange, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
499
+ 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;
493
500
  declare namespace CoinbaseConnect {
494
501
  var displayName: string;
495
502
  }
@@ -548,12 +555,14 @@ interface CheckoutModalProps {
548
555
  clientSecret: string;
549
556
  publishableKey: string;
550
557
  modalTitle?: string;
551
- /** Enable browser wallet connection option. Defaults to false */
558
+ /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
559
+ enableTransferCrypto?: boolean;
560
+ /** Enable browser wallet connection option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
552
561
  enableConnectWallet?: boolean;
553
562
  /**
554
- * Pre-select source token/chain in the Transfer Crypto view.
563
+ * Prefer a source token/chain in Transfer Crypto and Wallet Connect flows.
555
564
  * All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
556
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
565
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
557
566
  */
558
567
  defaultSourceChainType?: ChainType;
559
568
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` + symbol or token address. */
@@ -573,7 +582,7 @@ interface CheckoutModalProps {
573
582
  code?: string;
574
583
  }) => void;
575
584
  }
576
- declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
585
+ declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
577
586
 
578
587
  interface WithdrawTransactionInfo {
579
588
  /** Source (sending) chain type */
package/dist/index.d.ts CHANGED
@@ -160,9 +160,9 @@ interface DepositModalProps {
160
160
  */
161
161
  contractCalls?: EvmContractCall[];
162
162
  /**
163
- * Pre-select source token/chain in the Transfer Crypto view.
163
+ * Prefer a source token/chain in Transfer Crypto, Wallet Connect, and Connect Exchange flows.
164
164
  * All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
165
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
165
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
166
166
  */
167
167
  defaultSourceChainType?: ChainType;
168
168
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` + symbol or token address. */
@@ -171,6 +171,7 @@ interface DepositModalProps {
171
171
  defaultSourceTokenAddress?: string;
172
172
  /** Source token symbol (e.g. `"USDC"`). Must be paired with `defaultSourceChainType` + `defaultSourceChainId`. */
173
173
  defaultSourceSymbol?: string;
174
+ /** Hide the "Deposit Tracker" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false (shown). */
174
175
  hideDepositTracker?: boolean;
175
176
  /** Show balance in deposit modal header. Defaults to false */
176
177
  showBalanceHeader?: boolean;
@@ -182,20 +183,22 @@ interface DepositModalProps {
182
183
  * - "manual": User must click "I've made the deposit" to start polling
183
184
  */
184
185
  depositConfirmationMode?: DepositConfirmationMode;
185
- /** Enable browser wallet connection option. Defaults to false */
186
+ /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
187
+ enableTransferCrypto?: boolean;
188
+ /** Enable browser wallet connection option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
186
189
  enableConnectWallet?: boolean;
187
190
  /**
188
191
  * Connect Wallet → Enter amount: percentage chips (10%, 25%, 50%, 75%, MAX) from USD balance, or fixed USD ($25…).
189
192
  * @default "percentage"
190
193
  */
191
194
  browserWalletAmountQuickSelect?: BrowserWalletAmountQuickSelect;
192
- /** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
195
+ /** Enable "Pay with Exchange" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
193
196
  enablePayWithExchange?: boolean;
194
- /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Defaults to dashboard value or true. */
197
+ /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
195
198
  enableFiatOnramp?: boolean;
196
- /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Defaults to false. */
199
+ /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
197
200
  enableConnectExchange?: boolean;
198
- /** Enable "Pay with Cash App" option. Defaults to false. */
201
+ /** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
199
202
  enableCashApp?: boolean;
200
203
  /** Deposit with Card — onramp step: hide the You use / You buy / You receive card. @default false */
201
204
  hideDepositFlowInfo?: boolean;
@@ -218,7 +221,7 @@ interface DepositModalProps {
218
221
  /** First screen when the modal opens. Default `main` (deposit menu). */
219
222
  initialScreen?: DepositModalInitialScreen;
220
223
  }
221
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
224
+ 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, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
222
225
 
223
226
  interface DepositHeaderProps {
224
227
  title: string;
@@ -488,8 +491,12 @@ interface CoinbaseConnectProps {
488
491
  /** Whether back navigation from the root view is available (false when opened as a standalone initial screen). */
489
492
  canGoBack?: boolean;
490
493
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
494
+ defaultSourceChainType?: ChainType;
495
+ defaultSourceChainId?: string;
496
+ defaultSourceTokenAddress?: string;
497
+ defaultSourceSymbol?: string;
491
498
  }
492
- declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, canGoBack, onExecutionsChange, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
499
+ 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;
493
500
  declare namespace CoinbaseConnect {
494
501
  var displayName: string;
495
502
  }
@@ -548,12 +555,14 @@ interface CheckoutModalProps {
548
555
  clientSecret: string;
549
556
  publishableKey: string;
550
557
  modalTitle?: string;
551
- /** Enable browser wallet connection option. Defaults to false */
558
+ /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
559
+ enableTransferCrypto?: boolean;
560
+ /** Enable browser wallet connection option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
552
561
  enableConnectWallet?: boolean;
553
562
  /**
554
- * Pre-select source token/chain in the Transfer Crypto view.
563
+ * Prefer a source token/chain in Transfer Crypto and Wallet Connect flows.
555
564
  * All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
556
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
565
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
557
566
  */
558
567
  defaultSourceChainType?: ChainType;
559
568
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` + symbol or token address. */
@@ -573,7 +582,7 @@ interface CheckoutModalProps {
573
582
  code?: string;
574
583
  }) => void;
575
584
  }
576
- declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
585
+ declare function CheckoutModal({ open, onOpenChange, clientSecret, publishableKey, modalTitle, enableTransferCrypto, enableConnectWallet, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, theme, onCheckoutSuccess, onCheckoutError, }: CheckoutModalProps): react_jsx_runtime.JSX.Element;
577
586
 
578
587
  interface WithdrawTransactionInfo {
579
588
  /** Source (sending) chain type */