The official CLI tool for building privacy-preserving applications with Stoffel's Multi-Party Computation (MPC) framework.
# Build from source
cargo build --release
# The binary will be at ./target/release/stoffel# Create a new Stoffel project
stoffel init my-mpc-app
# Compile StoffelLang source files
stoffel compile src/main.stfl -b
# Run in development mode
stoffel dev
# Execute compiled bytecode
stoffel run target/main.stfb
# Run tests
stoffel test| Command | Description | Status |
|---|---|---|
init |
Initialize a new Stoffel project | ✅ |
compile |
Compile StoffelLang source files | ✅ |
build |
Build all source files in project | ✅ |
dev |
Development mode (compile & run) | ✅ |
run |
Execute compiled bytecode | ✅ |
test |
Run project tests | ✅ |
deploy |
Deploy to MPC network | 🚧 |
add |
Add dependencies | 🚧 |
publish |
Publish to registry | 🚧 |
Create projects for different language ecosystems:
stoffel init my-app --template <template>| Template | Description |
|---|---|
stoffel |
Pure StoffelLang project (default) |
python |
Python SDK integration |
rust |
Rust SDK integration |
typescript |
TypeScript/Node.js integration |
solidity-foundry |
Solidity + Foundry monorepo |
solidity-hardhat |
Solidity + Hardhat project |
Default configuration for HoneyBadger MPC protocol:
| Parameter | Default | Description |
|---|---|---|
protocol |
honeybadger | MPC protocol |
parties |
5 | Number of parties (min 4) |
threshold |
1 | Max corrupted parties |
field |
bls12-381 | Cryptographic field |
Constraint: parties >= 3 * threshold + 1
# Function definition
def secure_add(x: secret int64, y: secret int64) -> secret int64:
return x + y
# Main entry point
main main() -> nil:
var a: secret int64 = 10
var b: secret int64 = 20
var result: secret int64 = secure_add(a, b)
discard result
my-mpc-app/
├── Stoffel.toml # Project configuration
├── src/
│ └── main.stfl # Main StoffelLang source
├── tests/
│ └── integration.stfl # Test files
└── target/ # Build output
└── main.stfb # Compiled bytecode
# Build the CLI
cargo build
# Run tests
cargo test
# Format and lint
cargo fmt && cargo clippyLicensed under the Apache License, Version 2.0. See LICENSE for details.