@unifold/connect-react 0.1.62 → 0.1.64

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/README.md CHANGED
@@ -132,7 +132,7 @@ Launches the deposit modal with the specified configuration. **Returns a Promise
132
132
  | `destinationTokenAddress` | string | ✅ | Token contract address |
133
133
  | `destinationTokenSymbol` | string | ✅ | Token symbol (e.g., "USDC") |
134
134
  | `recipientAddress` | string | ✅ | Recipient wallet address |
135
- | `defaultSourceChainType` | string | - | Pre-select source chain type in Transfer Crypto (e.g. `"solana"`, `"ethereum"`). Must be paired with `defaultSourceChainId` + symbol or token address. If omitted or no match, defaults to the first token from `/supported_deposit_tokens`. |
135
+ | `defaultSourceChainType` | string | - | Prefer source chain type in Transfer Crypto, Wallet Connect, and Connect Exchange (e.g. `"solana"`, `"ethereum"`). Must be paired with `defaultSourceChainId` + symbol or token address. If omitted or no match, each flow uses its normal ordering. |
136
136
  | `defaultSourceChainId` | string | - | Source chain ID (e.g. `"mainnet"`, `"137"`). Paired with `defaultSourceChainType`. |
137
137
  | `defaultSourceTokenAddress` | string | - | Source token contract address. Paired with chain type + chain ID. |
138
138
  | `defaultSourceSymbol` | string | - | Source token symbol (e.g. `"USDC"`). Paired with chain type + chain ID. |
package/dist/index.d.mts CHANGED
@@ -28,15 +28,17 @@ interface UnifoldConnectProviderConfig {
28
28
  appearance?: ThemeMode | 'auto';
29
29
  /** Transfer input variant: 'single_input' or 'double_input'. Defaults to 'double_input' */
30
30
  transferInputVariant?: 'single_input' | 'double_input';
31
- /** Enable browser wallet connection option. Defaults to false */
31
+ /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
32
+ enableTransferCrypto?: boolean;
33
+ /** Enable browser wallet connection option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
32
34
  enableConnectWallet?: boolean;
33
- /** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
35
+ /** Enable "Pay with Exchange" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
34
36
  enablePayWithExchange?: boolean;
35
- /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Defaults to dashboard value or true. */
37
+ /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
36
38
  enableFiatOnramp?: boolean;
37
- /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Defaults to false. */
39
+ /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
38
40
  enableConnectExchange?: boolean;
39
- /** Enable "Pay with Cash App" option. Defaults to false. */
41
+ /** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
40
42
  enableCashApp?: boolean;
41
43
  /** Simple accent/primary color override (applies to both light and dark modes) */
42
44
  accentColor?: string;
@@ -84,6 +86,7 @@ interface DepositConfig {
84
86
  destinationChainId: string;
85
87
  destinationTokenAddress: string;
86
88
  destinationTokenSymbol: string;
89
+ /** Address that receives the deposited funds. */
87
90
  recipientAddress: string;
88
91
  /**
89
92
  * Array of contract calls to execute on the destination chain when delivering funds.
@@ -93,9 +96,9 @@ interface DepositConfig {
93
96
  */
94
97
  contractCalls?: EvmContractCall[];
95
98
  /**
96
- * Pre-select source token/chain in the Transfer Crypto view.
99
+ * Prefer a source token/chain in Transfer Crypto, Wallet Connect, and Connect Exchange flows.
97
100
  * All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
98
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
101
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
99
102
  */
100
103
  defaultSourceChainType?: ChainType;
101
104
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` and a symbol or token address. */
@@ -146,9 +149,9 @@ interface CheckoutConfig {
146
149
  /** The client_secret from a PaymentIntent created on your server */
147
150
  clientSecret: string;
148
151
  /**
149
- * Pre-select source token/chain in the Transfer Crypto view.
152
+ * Prefer a source token/chain in Transfer Crypto and Wallet Connect flows.
150
153
  * All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
151
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
154
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
152
155
  */
153
156
  defaultSourceChainType?: ChainType;
154
157
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` + symbol or token address. */
package/dist/index.d.ts CHANGED
@@ -28,15 +28,17 @@ interface UnifoldConnectProviderConfig {
28
28
  appearance?: ThemeMode | 'auto';
29
29
  /** Transfer input variant: 'single_input' or 'double_input'. Defaults to 'double_input' */
30
30
  transferInputVariant?: 'single_input' | 'double_input';
31
- /** Enable browser wallet connection option. Defaults to false */
31
+ /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
32
+ enableTransferCrypto?: boolean;
33
+ /** Enable browser wallet connection option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
32
34
  enableConnectWallet?: boolean;
33
- /** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
35
+ /** Enable "Pay with Exchange" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
34
36
  enablePayWithExchange?: boolean;
35
- /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Defaults to dashboard value or true. */
37
+ /** Enable the fiat on-ramp option (shown as "Deposit with Card"). Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
36
38
  enableFiatOnramp?: boolean;
37
- /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Defaults to false. */
39
+ /** Enable "Connect Exchange" option for direct Coinbase Connect integration. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
38
40
  enableConnectExchange?: boolean;
39
- /** Enable "Pay with Cash App" option. Defaults to false. */
41
+ /** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
40
42
  enableCashApp?: boolean;
41
43
  /** Simple accent/primary color override (applies to both light and dark modes) */
42
44
  accentColor?: string;
@@ -84,6 +86,7 @@ interface DepositConfig {
84
86
  destinationChainId: string;
85
87
  destinationTokenAddress: string;
86
88
  destinationTokenSymbol: string;
89
+ /** Address that receives the deposited funds. */
87
90
  recipientAddress: string;
88
91
  /**
89
92
  * Array of contract calls to execute on the destination chain when delivering funds.
@@ -93,9 +96,9 @@ interface DepositConfig {
93
96
  */
94
97
  contractCalls?: EvmContractCall[];
95
98
  /**
96
- * Pre-select source token/chain in the Transfer Crypto view.
99
+ * Prefer a source token/chain in Transfer Crypto, Wallet Connect, and Connect Exchange flows.
97
100
  * All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
98
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
101
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
99
102
  */
100
103
  defaultSourceChainType?: ChainType;
101
104
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` and a symbol or token address. */
@@ -146,9 +149,9 @@ interface CheckoutConfig {
146
149
  /** The client_secret from a PaymentIntent created on your server */
147
150
  clientSecret: string;
148
151
  /**
149
- * Pre-select source token/chain in the Transfer Crypto view.
152
+ * Prefer a source token/chain in Transfer Crypto and Wallet Connect flows.
150
153
  * All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
151
- * If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
154
+ * If omitted or no match is found in `/supported_deposit_tokens`, each flow uses its normal ordering.
152
155
  */
153
156
  defaultSourceChainType?: ChainType;
154
157
  /** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` + symbol or token address. */