@unifold/connect-react 0.1.40 → 0.1.41
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 +4 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +195 -153
- package/dist/index.mjs +204 -162
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -132,6 +132,10 @@ 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`. |
|
|
136
|
+
| `defaultSourceChainId` | string | - | Source chain ID (e.g. `"mainnet"`, `"137"`). Paired with `defaultSourceChainType`. |
|
|
137
|
+
| `defaultSourceTokenAddress` | string | - | Source token contract address. Paired with chain type + chain ID. |
|
|
138
|
+
| `defaultSourceSymbol` | string | - | Source token symbol (e.g. `"USDC"`). Paired with chain type + chain ID. |
|
|
135
139
|
| `onSuccess` | function | - | Success callback (fired immediately) |
|
|
136
140
|
| `onError` | function | - | Error callback (fired immediately) |
|
|
137
141
|
| `initialScreen` | `'main' \| 'transfer' \| 'card' \| 'tracker'` | - | `main` (default) = deposit menu. `transfer` / `card` use the **same geo/validation gates** as the menu. `tracker` opens the list **without** those gates. If not `main`, the header **back** is hidden (standalone); from `main`, back returns to the menu. Card quotes/onramp and tracker detail still show back for inner steps. |
|
package/dist/index.d.mts
CHANGED
|
@@ -66,6 +66,18 @@ interface DepositConfig {
|
|
|
66
66
|
destinationTokenAddress: string;
|
|
67
67
|
destinationTokenSymbol: string;
|
|
68
68
|
recipientAddress: string;
|
|
69
|
+
/**
|
|
70
|
+
* Pre-select source token/chain in the Transfer Crypto view.
|
|
71
|
+
* All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
|
|
72
|
+
* If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
|
|
73
|
+
*/
|
|
74
|
+
defaultSourceChainType?: ChainType;
|
|
75
|
+
/** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` and a symbol or token address. */
|
|
76
|
+
defaultSourceChainId?: string;
|
|
77
|
+
/** Source token contract address. Must be paired with `defaultSourceChainType` + `defaultSourceChainId` to match. */
|
|
78
|
+
defaultSourceTokenAddress?: string;
|
|
79
|
+
/** Source token symbol (e.g. `"USDC"`). Must be paired with `defaultSourceChainType` + `defaultSourceChainId` to match. */
|
|
80
|
+
defaultSourceSymbol?: string;
|
|
69
81
|
/** How to confirm deposit: 'auto_ui' (default), 'auto_silent', or 'manual' */
|
|
70
82
|
depositConfirmationMode?: DepositConfirmationMode;
|
|
71
83
|
onSuccess?: (data: DepositResult) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,18 @@ interface DepositConfig {
|
|
|
66
66
|
destinationTokenAddress: string;
|
|
67
67
|
destinationTokenSymbol: string;
|
|
68
68
|
recipientAddress: string;
|
|
69
|
+
/**
|
|
70
|
+
* Pre-select source token/chain in the Transfer Crypto view.
|
|
71
|
+
* All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
|
|
72
|
+
* If omitted or no match is found in `/supported_deposit_tokens`, the first available token and chain are used.
|
|
73
|
+
*/
|
|
74
|
+
defaultSourceChainType?: ChainType;
|
|
75
|
+
/** Source chain ID (e.g. `"mainnet"`, `"137"`). Must be paired with `defaultSourceChainType` and a symbol or token address. */
|
|
76
|
+
defaultSourceChainId?: string;
|
|
77
|
+
/** Source token contract address. Must be paired with `defaultSourceChainType` + `defaultSourceChainId` to match. */
|
|
78
|
+
defaultSourceTokenAddress?: string;
|
|
79
|
+
/** Source token symbol (e.g. `"USDC"`). Must be paired with `defaultSourceChainType` + `defaultSourceChainId` to match. */
|
|
80
|
+
defaultSourceSymbol?: string;
|
|
69
81
|
/** How to confirm deposit: 'auto_ui' (default), 'auto_silent', or 'manual' */
|
|
70
82
|
depositConfirmationMode?: DepositConfirmationMode;
|
|
71
83
|
onSuccess?: (data: DepositResult) => void;
|