Skip to main content

Withdrawals

This guide covers withdrawing tokens from your private balance back to a wallet address using the Privacy Boost WASM SDK.

Basic Withdrawal

Withdrawal Parameters

Withdrawal Result

WETH Unwrapping

WETH unwrapping is a separate step after the withdrawal settles on-chain. Call unwrapWeth() once the withdrawal is confirmed:

Withdraw to Self

Error Handling

Best Practices

1. Default to Self-Withdrawal

Pre-fill the recipient with sdk.walletAddress for the most common use case.

2. Use Separate Unwrap for ETH

When users want to receive native ETH, withdraw WETH first and then call unwrapWeth() after the withdrawal settles on-chain.

3. Refresh Balance After Withdrawal

Next Steps