@unifold/ui-react 0.1.60 → 0.1.62

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
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { AutoSwapResponse, ChainType, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
2
+ import { AutoSwapResponse, ChainType, EvmContractCall, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
3
3
  export { ChainType } 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';
@@ -131,7 +131,7 @@ interface EvmWalletProvider {
131
131
  removeListener?(event: string, callback: (...args: unknown[]) => void): void;
132
132
  }
133
133
 
134
- type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker";
134
+ type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker" | "pay_with_exchange" | "exchange_connect" | "wallet_connect";
135
135
  interface DepositModalProps {
136
136
  open: boolean;
137
137
  onOpenChange: (open: boolean) => void;
@@ -153,6 +153,12 @@ interface DepositModalProps {
153
153
  destinationChainType?: ChainType;
154
154
  destinationChainId?: string;
155
155
  destinationTokenAddress?: string;
156
+ /**
157
+ * Array of contract calls to execute on the destination chain when delivering funds.
158
+ * Only supported when destinationChainType is "ethereum" and
159
+ * destinationChainId is one of: "1", "8453", "42161", "4326".
160
+ */
161
+ contractCalls?: EvmContractCall[];
156
162
  /**
157
163
  * Pre-select source token/chain in the Transfer Crypto view.
158
164
  * All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
@@ -212,7 +218,7 @@ interface DepositModalProps {
212
218
  /** First screen when the modal opens. Default `main` (deposit menu). */
213
219
  initialScreen?: DepositModalInitialScreen;
214
220
  }
215
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, 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;
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;
216
222
 
217
223
  interface DepositHeaderProps {
218
224
  title: string;
@@ -479,9 +485,11 @@ interface CoinbaseConnectProps {
479
485
  onBack?: () => void;
480
486
  onDisconnect?: () => void;
481
487
  skipToHoldings?: boolean;
488
+ /** Whether back navigation from the root view is available (false when opened as a standalone initial screen). */
489
+ canGoBack?: boolean;
482
490
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
483
491
  }
484
- declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, onExecutionsChange, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
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;
485
493
  declare namespace CoinbaseConnect {
486
494
  var displayName: string;
487
495
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { AutoSwapResponse, ChainType, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
2
+ import { AutoSwapResponse, ChainType, EvmContractCall, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
3
3
  export { ChainType } 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';
@@ -131,7 +131,7 @@ interface EvmWalletProvider {
131
131
  removeListener?(event: string, callback: (...args: unknown[]) => void): void;
132
132
  }
133
133
 
134
- type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker";
134
+ type DepositModalInitialScreen = "main" | "transfer" | "card" | "cashapp" | "tracker" | "pay_with_exchange" | "exchange_connect" | "wallet_connect";
135
135
  interface DepositModalProps {
136
136
  open: boolean;
137
137
  onOpenChange: (open: boolean) => void;
@@ -153,6 +153,12 @@ interface DepositModalProps {
153
153
  destinationChainType?: ChainType;
154
154
  destinationChainId?: string;
155
155
  destinationTokenAddress?: string;
156
+ /**
157
+ * Array of contract calls to execute on the destination chain when delivering funds.
158
+ * Only supported when destinationChainType is "ethereum" and
159
+ * destinationChainId is one of: "1", "8453", "42161", "4326".
160
+ */
161
+ contractCalls?: EvmContractCall[];
156
162
  /**
157
163
  * Pre-select source token/chain in the Transfer Crypto view.
158
164
  * All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
@@ -212,7 +218,7 @@ interface DepositModalProps {
212
218
  /** First screen when the modal opens. Default `main` (deposit menu). */
213
219
  initialScreen?: DepositModalInitialScreen;
214
220
  }
215
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, 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;
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;
216
222
 
217
223
  interface DepositHeaderProps {
218
224
  title: string;
@@ -479,9 +485,11 @@ interface CoinbaseConnectProps {
479
485
  onBack?: () => void;
480
486
  onDisconnect?: () => void;
481
487
  skipToHoldings?: boolean;
488
+ /** Whether back navigation from the root view is available (false when opened as a standalone initial screen). */
489
+ canGoBack?: boolean;
482
490
  onExecutionsChange?: (executions: AutoSwapResponse[]) => void;
483
491
  }
484
- declare function CoinbaseConnect({ publishableKey, userId, wallets, recipientAddress, destinationTokenAddress, destinationChainId, destinationChainType, onTransferSuccess, onTransferError, onClose, onBack: parentOnBack, onDisconnect, skipToHoldings, onExecutionsChange, }: CoinbaseConnectProps): react_jsx_runtime.JSX.Element | null;
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;
485
493
  declare namespace CoinbaseConnect {
486
494
  var displayName: string;
487
495
  }