@unifold/ui-react 0.1.63 → 0.1.65

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
@@ -27,6 +27,15 @@ interface UseDepositPollingOptions {
27
27
  depositConfirmationMode?: DepositConfirmationMode;
28
28
  /** Deposit wallet ID used to trigger the backend poll endpoint */
29
29
  depositWalletId?: string;
30
+ /**
31
+ * Multiple deposit wallet IDs to nudge `/poll` for. Used when the deposit chain
32
+ * isn't known up front (e.g. the mobile redirect flow, where the user may
33
+ * deposit on any supported chain) — we iterate the wallets from
34
+ * `/deposit_addresses` and poll each. Detection itself is via the single
35
+ * `/query` by `external_user_id` (which already spans all chains). Takes
36
+ * precedence over `depositWalletId` when non-empty.
37
+ */
38
+ depositWalletIds?: string[];
30
39
  enabled?: boolean;
31
40
  onDepositSuccess?: (data: {
32
41
  message: string;
@@ -55,7 +64,7 @@ interface UseDepositPollingResult {
55
64
  /** Call this when user clicks "I've made the deposit" (manual mode) */
56
65
  handleIveDeposited: () => void;
57
66
  }
58
- declare function useDepositPolling({ userId, publishableKey, clientSecret, depositConfirmationMode, depositWalletId, enabled, immediateDirectPolling, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
67
+ declare function useDepositPolling({ userId, publishableKey, clientSecret, depositConfirmationMode, depositWalletId, depositWalletIds, enabled, immediateDirectPolling, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
59
68
 
60
69
  declare global {
61
70
  interface Window {
@@ -220,8 +229,15 @@ interface DepositModalProps {
220
229
  hideOverlay?: boolean;
221
230
  /** First screen when the modal opens. Default `main` (deposit menu). */
222
231
  initialScreen?: DepositModalInitialScreen;
232
+ /**
233
+ * Main menu layout.
234
+ * - `"stacked"` (default): all deposit options are stacked in a single list.
235
+ * - `"tabs"`: options are grouped under "Use Crypto" / "Use Cash" tabs to keep
236
+ * the menu compact and mobile-friendly.
237
+ */
238
+ displayMode?: "stacked" | "tabs";
223
239
  }
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;
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;
225
241
 
226
242
  interface DepositHeaderProps {
227
243
  title: string;
@@ -235,7 +251,7 @@ interface DepositHeaderProps {
235
251
  };
236
252
  showBalance?: boolean;
237
253
  balanceAddress?: string;
238
- balanceChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl" | "cardano";
254
+ balanceChainType?: ChainType;
239
255
  balanceChainId?: string;
240
256
  balanceTokenAddress?: string;
241
257
  /** Project name for balance label e.g. "{projectName} Balance: $0.00" */
@@ -743,6 +759,8 @@ declare function WithdrawConfirmingView({ txInfo, executions, onClose, onViewTra
743
759
 
744
760
  declare const HYPERCORE_CHAIN_ID = "1337";
745
761
 
762
+ declare function isHypercoreChain(chainId: string): boolean;
763
+
746
764
  type DetectedWallet = {
747
765
  name: string;
748
766
  address: string;
@@ -770,14 +788,12 @@ declare function sendSolanaWithdraw(params: {
770
788
  publishableKey: string;
771
789
  }): Promise<string>;
772
790
 
773
- declare function isHypercoreChain(chainId: string): boolean;
774
791
  declare function sendHypercoreWithdraw(params: {
775
792
  provider: EvmWalletProvider;
776
793
  fromAddress: string;
777
794
  depositWalletAddress: string;
778
795
  sourceTokenAddress: string;
779
796
  amount: string;
780
- tokenSymbol: string;
781
797
  publishableKey: string;
782
798
  }): Promise<void>;
783
799
 
package/dist/index.d.ts CHANGED
@@ -27,6 +27,15 @@ interface UseDepositPollingOptions {
27
27
  depositConfirmationMode?: DepositConfirmationMode;
28
28
  /** Deposit wallet ID used to trigger the backend poll endpoint */
29
29
  depositWalletId?: string;
30
+ /**
31
+ * Multiple deposit wallet IDs to nudge `/poll` for. Used when the deposit chain
32
+ * isn't known up front (e.g. the mobile redirect flow, where the user may
33
+ * deposit on any supported chain) — we iterate the wallets from
34
+ * `/deposit_addresses` and poll each. Detection itself is via the single
35
+ * `/query` by `external_user_id` (which already spans all chains). Takes
36
+ * precedence over `depositWalletId` when non-empty.
37
+ */
38
+ depositWalletIds?: string[];
30
39
  enabled?: boolean;
31
40
  onDepositSuccess?: (data: {
32
41
  message: string;
@@ -55,7 +64,7 @@ interface UseDepositPollingResult {
55
64
  /** Call this when user clicks "I've made the deposit" (manual mode) */
56
65
  handleIveDeposited: () => void;
57
66
  }
58
- declare function useDepositPolling({ userId, publishableKey, clientSecret, depositConfirmationMode, depositWalletId, enabled, immediateDirectPolling, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
67
+ declare function useDepositPolling({ userId, publishableKey, clientSecret, depositConfirmationMode, depositWalletId, depositWalletIds, enabled, immediateDirectPolling, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
59
68
 
60
69
  declare global {
61
70
  interface Window {
@@ -220,8 +229,15 @@ interface DepositModalProps {
220
229
  hideOverlay?: boolean;
221
230
  /** First screen when the modal opens. Default `main` (deposit menu). */
222
231
  initialScreen?: DepositModalInitialScreen;
232
+ /**
233
+ * Main menu layout.
234
+ * - `"stacked"` (default): all deposit options are stacked in a single list.
235
+ * - `"tabs"`: options are grouped under "Use Crypto" / "Use Cash" tabs to keep
236
+ * the menu compact and mobile-friendly.
237
+ */
238
+ displayMode?: "stacked" | "tabs";
223
239
  }
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;
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;
225
241
 
226
242
  interface DepositHeaderProps {
227
243
  title: string;
@@ -235,7 +251,7 @@ interface DepositHeaderProps {
235
251
  };
236
252
  showBalance?: boolean;
237
253
  balanceAddress?: string;
238
- balanceChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl" | "cardano";
254
+ balanceChainType?: ChainType;
239
255
  balanceChainId?: string;
240
256
  balanceTokenAddress?: string;
241
257
  /** Project name for balance label e.g. "{projectName} Balance: $0.00" */
@@ -743,6 +759,8 @@ declare function WithdrawConfirmingView({ txInfo, executions, onClose, onViewTra
743
759
 
744
760
  declare const HYPERCORE_CHAIN_ID = "1337";
745
761
 
762
+ declare function isHypercoreChain(chainId: string): boolean;
763
+
746
764
  type DetectedWallet = {
747
765
  name: string;
748
766
  address: string;
@@ -770,14 +788,12 @@ declare function sendSolanaWithdraw(params: {
770
788
  publishableKey: string;
771
789
  }): Promise<string>;
772
790
 
773
- declare function isHypercoreChain(chainId: string): boolean;
774
791
  declare function sendHypercoreWithdraw(params: {
775
792
  provider: EvmWalletProvider;
776
793
  fromAddress: string;
777
794
  depositWalletAddress: string;
778
795
  sourceTokenAddress: string;
779
796
  amount: string;
780
- tokenSymbol: string;
781
797
  publishableKey: string;
782
798
  }): Promise<void>;
783
799