Withdraw SOL
Withdraw SOL from your private balance to any recipient address.Parameters
Returns
Example
Withdrawal Fees
Fee Calculation Example
How Withdrawals Work
1
UTXO Selection
The SDK selects your largest UTXOs to cover the withdrawal amount
2
ZK Proof Generation
A zero-knowledge proof is generated proving you own the funds
3
Relayer Submission
The proof is sent to the relayer, which signs and submits the transaction
4
Funds Received
The recipient receives funds with no on-chain link to your wallet
Privacy Guarantee
The withdrawal transaction on-chain (visible on SolScan or other explorers) contains no information about the original depositor. The zero-knowledge proof ensures:- The relayer cannot modify the recipient address
- The relayer cannot modify the amount
- Any tampering causes the transaction to fail
Partial Withdrawals
If your private balance is less than the requested amount, the SDK performs a partial withdrawal:Withdraw to Self
If you omitrecipientAddress, funds are withdrawn to your own wallet:
Best Practices
Use Clean Wallets
Always withdraw to a fresh, never-used wallet address
Wait Before Withdrawing
Wait at least a day between deposit and withdrawal
Split Withdrawals
Split large amounts into multiple smaller withdrawals over time
Vary Amounts
Don’t withdraw the exact same amount you deposited
