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.
useBlinkDeposit hook wraps the Deposit class with reactive React state. It manages the instance lifecycle and cleans up on unmount.
The React entry point requires
react >= 18 as a peer dependency.Usage
Parameters
The hook accepts a singleDepositConfig object. See Deposit Class for the full config reference.
Deposit instance is created once on first render and destroyed on unmount. The config is read during initialization only. Changing config props after mount does not reconfigure the instance.
Return value
| Property | Type | Description |
|---|---|---|
status | DepositStatus | Current phase: 'idle', 'signer-loading', 'iframe-active', 'completed', or 'error'. |
result | DepositResult | null | Last successful deposit result. Reset to null when a new deposit starts. |
error | DepositError | null | Last transfer error. Reset to null on successful completion. |
displayMessage | string | null | User-friendly error message derived from error via getDisplayMessage(), or null when there is no error. |
isActive | boolean | true when status is 'signer-loading' or 'iframe-active'. |
requestDeposit | (request: DepositRequest) => Promise<DepositResult> | Start a deposit flow. Opens the modal iframe with the hosted transfer. |
focus | () => void | No-op. Retained for API compatibility. |
close | () => void | Close the transfer iframe and reset to idle. |