Sample Project
https://github.com/Privacy-Cash/privacy-cash-evm-sdk/blob/main/example/Installation
Requires Node.js 20+. The SDK is written in TypeScript and includes type definitions.
Signing In
The SDK uses a wallet signature to derive your private encryption key and UTXO keypair. Ask the user to sign a fixed message:signature and address strings are passed directly to each SDK function. Pass the selected network to read from and submit to the correct EVM deployment.
Sending Transactions
deposit() requires a txSender callback that signs and submits the raw transaction:
Interacting with Privacy Cash
Once the above steps are done, you can check balance, make deposits and withdrawals.Supported Networks
Privacy Cash EVM currently supports mainnet deployments only:| Network | Chain ID | SDK constant | Supported tokens |
|---|---|---|---|
| Base | 8453 | BASE_NETWORK | ETH, USDC |
| Ethereum | 1 | ETH_NETWORK | ETH, USDT |
network is omitted, the SDK reads NEXT_PUBLIC_CHAIN_ID and falls back to Base (8453).
Key Path
All functions accept akeyBasePath parameter pointing to the circuit zkey file (without extension):
.zkey file in the public/ folder:
