Skip to main content

Overview

Bridging with PrivacyCash is a three-step process:
  1. Quote: Request a bridge quote and a one-time Solana deposit address from the relayer.
  2. Private Withdrawal: Execute a PrivacyCash withdrawal where the recipient is the relayer’s deposit address.
  3. Finalize: Notify the relayer of the transaction hash so they can release the funds on the destination chain.

Prerequisites

Install the required dependencies:

Implementation


Key Considerations

Address Validation

Always validate the recipientAddress against the outputChain format before calling withdraw. The relayer uses the following logic:
  • EVMS (Ethereum, BNB, Base, Polygon): Starts with 0x followed by 40 hex characters.
  • Solana: Base58 string (32-44 characters).
  • Bitcoin: Bech32 (bc1...) or Legacy/P2SH formats.

Minimum Amounts

The bridge typically requires a minimum amount (equivalent to ~0.05 SOL) to cover cross-chain fees.

Fees

Three types of fees are applied:
  1. PrivacyCash Fee: A percentage of the withdrawal amount.
  2. Solana Network Fee: Rent and transaction costs for the withdrawal.
  3. Relay Fee: The cost of executing the transaction on the destination chain (dynamic).