Skip to main content

withdraw()

withdraw() is a function from privacycash-evm used to withdraw ETH or a supported ERC-20 token from Privacy Cash to an EVM recipient address.

Parameters


Example Usage


Fee Estimation

To display the estimated received amount before the user submits:

Notes

  • withdrawAmountInput is the total amount deducted from your private balance; the recipient receives less after fees.
  • Always validate that withdrawAmountInput <= privateBalance before calling withdraw().
  • The recipient must be a valid EVM address (0x + 40 hex characters).
  • Current token support is Base ETH/USDC and Ethereum ETH/USDT.