Private by default · Scalable by design
Build scalable, private applications.
A zero-knowledge layer 2 with client-side proving. Accounts and notes are private by default — only commitments go onchain.
Install the toolchainRust + Cargo
cargo install midenup && midenup initStart a path
Choose what you need next.
Recommended start
Build your first smart contract
Create an account component in Rust, compile it to MASM, and prove its state transition locally before sending it to the network.
Rust · MASM · client-side provingSDK integrationConnect an application
Use the Web, React, or Rust client to create accounts, move assets, and work with private notes.
Web · React · RustProtocol and researchUnderstand how Miden works
Trace execution through accounts, notes, the VM, and the recursive proof system.
Protocol · VM · proofsPeek under the hood
A counter account, in Rust.
Smart contracts on Miden are plain Rust crates. Storage is typed, functions are `#[component]`-annotated, and state transitions are proved client-side before submission to the network.
contracts/counter/src/lib.rs
use miden::{component, Felt, StorageMap, StorageMapAccess, Word};
#[component]
struct CounterContract {
#[storage(description = "counter contract storage map")]
count_map: StorageMap,
}
#[component]
impl CounterContract {
/// Increments the counter by one.
pub fn increment_count(&mut self) -> Felt {
let key = Word::from_u64_unchecked(0, 0, 0, 1);
let next: Felt = self.count_map.get(&key) + Felt::from_u32(1);
self.count_map.set(key, next);
next
}
}