Installation¶
Prerequisites¶
Rust Toolchain (Protocol Node)¶
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustup default stable
Required: Rust 1.75+ (check with rustc --version)
Node.js (SDK, Wallet, Explorer)¶
# Via nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
nvm install 22
nvm use 22
Required: Node.js 22+
Flutter (Mobile Wallet)¶
Required: Flutter SDK 3.12+
Build the Protocol¶
The node binary will be at target/release/citizen-node.
Install the TypeScript SDK¶
Set Up a Wallet¶
Choose your surface:
Verify Your Installation¶
# Protocol compiles
cd citizen-protocol && cargo test
# SDK builds
cd sdk/typescript && npm test
# Explorer builds
cd explorer/frontend && npm install && npm run build
Troubleshooting¶
Rust: error: linker 'cc' not found¶
Install a C compiler:
Node.js: npm ERR! ERESOLVE¶
Use legacy peer deps resolution:
Flutter: Flutter SDK not found¶
Ensure Flutter is in your PATH: