Deposits
This guide covers depositing tokens into the privacy pool using the Privacy Boost React SDK.Basic Deposit
Deposit Parameters
This differs from the TypeScript SDK, which only accepts
bigint (wei), and from the mobile SDKs, which accept a wei-as-string. The React useVault hook normalizes for you: a human-readable string is parsed with the token’s decimals before being passed to the underlying SDK.Progress Tracking
Track shield steps with theonProgress callback:
Deposit Steps
Thestep value comes from the ShieldStep enum and matches the same values across all SDK platforms.
Depositing ETH
Native ETH is automatically wrapped to WETH during shield:Complete Example
Error Handling
Best Practices
1. Refresh Balances After Deposit
useBalances() is reactive and will pick up updates the SDK already knows about. Call refreshBalances() (from useVault) to force a server fetch — for example, immediately after a shield, when you want the UI to reflect the new shielded balance without waiting for the next polling tick.