stoffel repository.
Run examples from the repository root:
Clear local execution
Use clear execution for fast logic checks before moving to local MPC runs.crates/stoffel-rust-sdk/examples/quickstart.rs.
Direct secret int64 arguments
The repository includes crates/stoffel-rust-sdk/examples/quickstart_mpc.rs, which demonstrates direct secret int64 function arguments:
Share and ClientStore examples below as local MPC smoke tests. They exercise explicit private inputs and deliberate reveal points.
Named Share inputs
Use this when the source function accepts share values directly and opens only the intended output.
crates/stoffel-rust-sdk/examples/local_mpc_named_inputs.rs.
ClientStore local inputs
UseClientStore.take_share when modeling local client slots.
crates/stoffel-rust-sdk/examples/local_mpc_client_input.rs.
Bytecode round trip
Compile source, save bytecode, load it back, and execute with inputs.crates/stoffel-rust-sdk/examples/bytecode_roundtrip.rs.
Network configuration
Generate TOML configs for a local network deployment and build server/client handles from those configs.crates/stoffel-rust-sdk/examples/network_config.rs.
Observability and health
crates/stoffel-rust-sdk/examples/observability.rs.
Choosing an input style
| Program shape | SDK input API | CLI equivalent |
|---|---|---|
def main(a: int64, b: int64) | .with_inputs(&[("a", 1_i64), ("b", 2_i64)]) | --input a=1 --input b=2 |
def main(a: secret int64, b: secret int64) | .with_inputs(&[("a", 1_i64), ("b", 2_i64)]) plus .execute_local().await | --input a=1 --input b=2 with local execution |
ClientStore.take_share(0, 0) | .with_client_input(0, &[1_i64]) | --client-input 0=1 |