Withdraw
Withdraw ETH or a supported ERC-20 token from your private balance to any EVM recipient address.Parameters
Returns
The transaction hash (string).
Example
Withdrawal Fees
Fees are deducted from thewithdrawAmountInput, so the recipient receives less than the requested amount.
Fee Calculation Example
How Withdrawals Work
1
UTXO Selection
The SDK scans on-chain events to find your unspent UTXOs (up to 2) to cover the withdrawal amount.
2
ZK Proof Generation
A zero-knowledge proof is generated proving you own the funds and authorizing the exact recipient and amount.
3
On-Chain Submission
The transaction is submitted directly to the selected EVM smart contract. No relayer is needed for EVM withdrawals.
4
Funds Received
The recipient receives ETH with no on-chain link to your depositing wallet.
Privacy Guarantee
The withdrawal transaction on-chain contains no information about the original depositor. The zero-knowledge proof ensures:- The recipient address cannot be modified
- The amount cannot be modified
- Any tampering causes the transaction to revert
Insufficient Balance
If your private balance is less thanwithdrawAmountInput, the SDK throws:
getBalance().