Deposits
This guide covers depositing tokens from your wallet into your private balance using the Privacy Boost React Native SDK.Basic Deposit
Deposit Parameters
Deposit Steps
When a deposit is submitted, the SDK executes these steps in order:Deposit Result
sdk.getShieldStatus(result.requestId) until
it reaches a terminal state (e.g. "confirmed" or "failed").
Depositing ETH
To deposit native ETH, use the zero address. The SDK automatically wraps ETH to WETH:- Wraps ETH to WETH
- Approves WETH spending
- Deposits WETH to the shield contract
Parsing Amounts
Use helper functions to convert between human-readable and wei formats:Complete Example
Error Handling
Best Practices
1. Validate Amounts Before Depositing
Always check the wallet balance before attempting a deposit to provide early feedback.2. Refresh Balance After Deposit
3. Handle Long Operations
Deposits involve multiple on-chain transactions and may take time. Show appropriate loading states in your UI.Relayed Deposits (build calldata, relay yourself)
If your users don’t submit transactions directly — they hold funds at addresses you relay for (a gasless relayer, an EIP-7702 session key, a custom pipeline) — build the deposit calldata without submitting it, relay it through your own infrastructure, then finalize from the mined receipt.{ to, value, data }, so the array drops directly into an
EIP-5792 / Porto wallet_prepareCalls bundle.
Server-side (no session)
A backend that holds only a recipient’s privacy address can build a deposit on their behalf with the statelessbuildShieldPayload named export — no signed-in
session and no private keys: