Built on the shoulders of giants - Special thanks to Umbra
Cash for pioneering stealth payment infrastructure.
What You’ll Build
The@shakesco/private SDK lets you implement truly private crypto transactions. No one except the sender and receiver can link the payment to the recipient’s known address.
How It Works
Deep dive into stealth address cryptography
EIP-5564 Standard
Read the official Ethereum proposal
Installation
Complete Integration Workflow
Step 1: Check for Existing Stealth Keys
Before sending private transactions, verify if the recipient has registered stealth keys in the Umbra registry:What are spending and viewing keys?
What are spending and viewing keys?
Spending Keys (
spendingPublicKey)- Used to generate stealth addresses where funds are sent
- Only the recipient can derive the private key to spend from these addresses
viewingPublicKey)- Allow scanning for incoming private transactions
- Can detect payments without exposing spending ability
- Safe to use for monitoring wallets
Step 2: Register Stealth Keys
If the user hasn’t registered, you’ll need to generate and register their key pairs.- Smart Wallets (ERC-4337)
- EOAs (Regular Wallets)
For account abstraction wallets, register via a contract call:Then execute the registration via your smart wallet:
Step 3: Generate Stealth Address for Payment
Ready to send a private transaction? Generate a one-time stealth address:1
Send funds to the stealth address
Transfer crypto to
stealthKeyPair.address - this is a brand new address
only the recipient can control2
Publish announcement data
The recipient needs
pubKeyXCoordinate and encrypted.ciphertext to prove
ownership and spend the fundsStep 4: Announce the Payment
Emit this event from your private transaction contract:How recipients discover payments
How recipients discover payments
Recipients scan the blockchain for
Announcement events. Use indexing services for efficient scanning:- The Graph - Decentralized indexing protocol
- Moralis - Web3 data APIs
- Custom indexer - Query RPC nodes directly (slower)
Step 5: Scan for Incoming Funds
Recipients check if an announcement belongs to them:Step 6: Spend the Private Funds
Once you’ve confirmed funds belong to you, derive the private key to spend them:What’s Next?
While stealth addresses provide strong privacy today, zero-knowledge
proofs will eventually offer even better solutions. Until then, stealth
payments are the best way to bring privacy to Ethereum transactions.
Additional Resources
Umbra Protocol Docs
Learn from the pioneers of stealth payments
EIP-5564 Discussion
Join the Ethereum community conversation
GitHub Repository
View source code and contribute