TheDocumentation Index
Fetch the complete documentation index at: https://docs.blink.cash/llms.txt
Use this file to discover all available pages before exploring further.
useBlinkMobileDeposit hook wraps MobileDeposit with reactive React state. It manages the instance lifecycle and cleans up on unmount.
Usage
Parameters
The hook accepts a singleMobileDepositConfig object. See MobileDeposit Class for the full config reference.
| Property | Type | Required | Description |
|---|---|---|---|
signer | string | SignerFunction | Yes | Signer endpoint URL or custom async function. |
callbackScheme | string | Yes | Custom URL scheme for deep link callbacks. |
openUrl | (url: string) => Promise<void> | Yes | Function to open a URL in an in-app browser. |
webviewBaseUrl | string | No | Base URL of the hosted payment app. |
callbackPath | string | No | Path for the callback deep link. |
signerTimeoutMs | number | No | Max ms to wait for signer response. |
flowTimeoutMs | number | No | Max ms for entire flow. |
debug | boolean | No | Enable debug logging. |
Return value
| Property | Type | Description |
|---|---|---|
status | MobileDepositStatus | Current flow phase: 'idle', 'signer-loading', 'browser-active', 'completed', or 'error'. |
result | DepositResult | null | Last successful result, or null. |
error | DepositError | null | Last error, or null. |
displayMessage | string | null | User-friendly error message from getDisplayMessage(error), or null. |
isActive | boolean | true during signer-loading or browser-active. |
requestDeposit | (request: DepositRequest) => Promise<DepositResult> | Start a deposit flow. |
handleDeepLink | (url: string) => boolean | Pass an incoming deep link URL to the SDK. Returns true if handled. |
focus | () => void | No-op retained for API compatibility with @swype-org/deposit. |
close | () => void | Cancel the current flow. |
Deep link setup
The hook does not set up deep link listeners. This keeps it platform-agnostic. UsehandleDeepLink in your app’s deep link handler:
Error handling
The hook providesdisplayMessage as a convenience for showing user-friendly error text: