Why Build on Zcash?
Zcash is the only major blockchain with production-ready zero-knowledge privacy built directly into the protocol. For developers building financial applications, this means you get cryptographic privacy guarantees without implementing complex cryptography yourself - the SDK handles zk-SNARK proof generation, address derivation, and note scanning automatically.
Zcash offers something no other privacy coin provides: a complete, audited, production-tested developer toolchain with official support from the Electric Coin Company (ECC). The SDKs are actively maintained, thoroughly documented, and have been battle-tested in production wallets used by hundreds of thousands of users.
Step 1: Install the Zcash SDK
The SDK you choose depends on your target platform. Here are the official options:
Rust (librustzcash)
The core library used by all other SDKs. Best for backend services, command-line tools, and custom integrations.
# Add to your Cargo.toml
[dependencies]
zcash_client_backend = "0.12"
zcash_primitives = "0.15"
zcash_proofs = "0.15"
Android SDK (Kotlin)
// build.gradle (app module)
dependencies {
implementation 'cash.z.ecc.android:zcash-android-sdk:2.0.4'
}
// Enable Java 8+ features
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}
iOS SDK (Swift)
// Package.swift
dependencies: [
.package(
url: "https://github.com/zcash/ZcashLightClientKit",
from: "2.0.0"
)
]
zcashd Node (RPC)
For backend integrations that don't need the full SDK, running a zcashd node and using its JSON-RPC API is the simplest approach.
# Install on Ubuntu/Debian
apt-get install apt-transport-https wget gnupg2
wget -qO - https://apt.z.cash/zcash.asc | gpg --import
gpg --export 3FE63B67F85EA808DE9B880E6DEF3BAF272766C0 | \
apt-key add -
echo "deb [arch=amd64] https://apt.z.cash/ focal main" | \
tee /etc/apt/sources.list.d/zcash.list
apt-get update && apt-get install zcash
Step 2: Set Up a Zcash Testnet Node
Always develop against testnet first. Testnet ZEC is free and mistakes don't cost real money.
# ~/.zcash/zcash.conf
testnet=1
addnode=testnet.z.cash
rpcuser=your_rpc_username
rpcpassword=your_secure_rpc_password
rpcport=18232
rpcallowip=127.0.0.1
txindex=1
insightexplorer=1
Start the node and monitor sync progress:
# Start zcashd
zcashd -daemon
# Check sync status
zcash-cli getblockchaininfo | grep -E '"blocks"|"headers"|"synced"'
# Get testnet ZEC from faucet
# Visit: https://faucet.zecpages.com/
# Enter your t-address to receive 0.1 testnet ZEC
Wait for the node to fully sync before proceeding. Testnet sync typically takes 30–90 minutes on a fast connection.
Step 3: Create a Wallet and Generate Addresses
With the Android SDK, wallet initialization looks like this:
// Kotlin - Android SDK
val coordinator = SdkSynchronizer.new(
context = applicationContext,
network = ZcashNetwork.Testnet,
lightWalletEndpoint = LightWalletEndpoint.defaultForNetwork(ZcashNetwork.Testnet),
birthday = WalletBirthday.aroundCurrentTime(ZcashNetwork.Testnet),
seed = seed
)
// Generate a Unified Address
val account = coordinator.getAccounts().first()
val address = coordinator.getUnifiedAddress(account)
println("Unified Address: $address")
Via RPC (zcashd):
# Generate a new Unified Address
zcash-cli z_getnewaccount
# List addresses
zcash-cli z_listunifiedreceivers "ua1..."
# Get shielded balance
zcash-cli z_gettotalbalance
Step 4: Build Your First Payment Integration
Sending a shielded transaction via RPC:
# Send shielded ZEC
zcash-cli z_sendmany \
"your_ua_address" \
'[{"address":"recipient_ua","amount":0.01,"memo":"SGVsbG8gWmNhc2g="}]' \
1 \
0.00001 \
"FullPrivacy"
# Returns an operation ID - check status
zcash-cli z_getoperationstatus '["opid-xxx"]'
# Wait for completion
zcash-cli z_getoperationresult '["opid-xxx"]'
Kotlin SDK equivalent:
// Send a shielded transaction
val proposal = coordinator.proposeTransfer(
account = 0,
recipient = "recipient_unified_address",
amount = Zatoshi(1_000_000L), // 0.01 ZEC
memo = "Hello from Zcash SDK"
)
val txId = coordinator.createProposedTransactions(proposal, seed)
Step 5: Deploy to Mainnet
Transitioning from testnet to mainnet requires only configuration changes:
# ~/.zcash/zcash.conf (mainnet)
# Remove or comment out: testnet=1
addnode=mainnet.z.cash
rpcuser=your_rpc_username
rpcpassword=your_secure_rpc_password
rpcport=8232
# In Kotlin SDK
val network = ZcashNetwork.Mainnet
val endpoint = LightWalletEndpoint.defaultForNetwork(ZcashNetwork.Mainnet)
Before going live on mainnet:
- Audit all address handling - ensure you never expose seed phrases or spending keys
- Test the full transaction lifecycle with small amounts (0.001 ZEC)
- Implement proper error handling for network interruptions and reorg scenarios
- Set up monitoring for your node's sync status and RPC availability
- Consider using a hosted lightwalletd server for mobile applications instead of running your own full node
Recommended Next Steps
With a working integration, explore these advanced topics:
- Integrating shielded payments into web apps
- Building a full privacy wallet with the SDK
- Essential developer tools for 2025
- Understanding Zcash protocol internals
Resources: Official Zcash Docs • zcashd on GitHub • Android SDK • iOS SDK