Quick Start
Get your first E3 program running on the Enclave Protocol! This guide assumes you have the Enclave CLI installed.
Prerequisites Check
Make sure you have the required software installed:
# Check versions
docker --version # Should be 25.0.6+
node --version # Should be 22.10.0+
pnpm --version # Should be 10.7.1+
rustc --version # Should be 1.86.0+
enclave --version # Confirm CLI is installed
1. Create Your Project
Generate a new E3 program from the default template:
enclave init my-first-e3
cd my-first-e3
This creates a complete E3 project with:
- FHE computation logic (
./program/
) - Smart contracts (
./contracts/
) - Client application (
./client/
) - Coordination server (
./server/
) - Configuration (
enclave.config.yaml
)
2. Compile Your E3 Program
First, compile your E3 program to build the Risc0 zkvm image:
enclave program compile
This builds the Risc0 zkvm image that will be deployed on the blockchain and used for verification of the final proof.
3. Start the Development Environment
Launch all services with one command:
pnpm dev:all
This starts:
- Local Ethereum network (Hardhat)
- Deploys all the smart contracts to the local network
- Multiple ciphernodes for FHE processing
- TypeScript coordination server
- FHE program server
- Frontend client application
Wait for all services to start (usually 30-60 seconds).
4. Access Your Application
- Open your browser to http://localhost:3000 (opens in a new tab)
- Configure MetaMask for local development:
- Network:
http://localhost:8545
- Chain ID:
31337
- Network:
5. Test the FHE Computation
The default template includes a simple addition program that:
- Encrypts two numbers on the client
- Computes their sum using FHE (without decrypting)
- Returns the encrypted result
- Decrypts and displays the result
Try it:
- Input two numbers in the web interface
- Click "Submit"
- Watch the encrypted computation happen!
What Just Happened?
You successfully ran a Fully Homomorphic Encryption computation where:
- Your inputs were encrypted before leaving the browser
- The computation happened on encrypted data
- The result was computed without exposing your private inputs
- All coordination was handled by the Enclave protocol
Next Steps
Now that you have a working E3 program:
- Explore the code: Check out
./program/src/lib.rs
to see the FHE computation - Modify the computation: Try changing the addition to multiplication
- Update the UI: Customize the client in
./client/src/
- Deploy: Learn about production deployment
Ready to dive deeper? Continue with our Hello World Tutorial for a step-by-step breakdown of building E3 programs from scratch.