An open-source embedded wallet stack built on MPC (Multi-Party Computation). Threshold signatures (ECDSA/EdDSA) enable distributed key management without single points of failure.
crypto/- Threshold signature implementationstecdsa/- Threshold ECDSA using Cait-Sith (for EVM, Cosmos)teddsa/- Threshold EdDSA using FROST (for Solana)- Both compile to WASM for browser environments
sdk/- Client SDKs for wallet integrationoko_sdk_core/- Core wallet logicoko_sdk_eth/,oko_sdk_cosmos/,oko_sdk_svm/- Chain-specific SDKs
backend/- API servicesoko_api/- Main API servertss_api/- Threshold signature service
key_share_node/- Distributed signing nodes (KSN)apps/- Web applications (admin, user dashboard, demo)embed/oko_attached/- Embeddable wallet iframe
- MPC Security - Private keys are never reconstructed; signing happens via multi-party computation
- Multi-chain Support - Single architecture supports EVM, Cosmos, and Solana ecosystems
- Modular SDKs - Chain-specific SDKs extend a common core
- WASM-first Crypto - Rust crypto compiled to WASM for browser compatibility
This project has complex setup requirements due to WASM compilation and multiple Rust/TypeScript packages. Follow the CI workflow order.
# Node.js 22+ required
node --version # v22.x.x or higher
# Enable Corepack for Yarn 4.x
corepack enable
# Rust nightly toolchain
rustup default nightly
# wasm-pack for WASM builds
cargo install wasm-packPackage dependencies require a specific build order. Follow CI exactly:
# 1. Install dependencies
yarn install --immutable
# 2. Build Cait-Sith WASM (tECDSA)
yarn ci build_cs
# 3. Build FROST WASM (tEdDSA)
yarn ci build_frost
# 4. Build internal packages
yarn ci build_pkgs
# 5. Build SDK packages
yarn ci build_sdk
# 6. Run typecheck
yarn ci typecheck- TypeScript: Biome for linting/formatting (
@biomejs/biome) - Rust: Standard cargo fmt, workspace-level management
- Run
yarn ci lang_checkbefore commits
- Adding chain support - Extend
sdk/oko_sdk_core/and create chain-specific SDK - Crypto changes - Modify Rust in
crypto/, rebuild WASM, update TypeScript interfaces - API changes - Update
backend/oko_api/, regenerate OpenAPI types - UI changes - Components in
ui/oko_common_ui/, apps inapps/
This project uses @asteasolutions/zod-to-openapi to define API schemas with
Zod and generate OpenAPI specs.
When modifying or adding routes, you must update OpenAPI in two places:
-
Schema definitions - Define request/response types using Zod with
.openapi()annotations andregistry.register():- Backend APIs →
backend/openapi/src/(tss/, ct_dashboard/, oko_admin/, etc.) - Key Share Node →
key_share_node/server/src/openapi/schema/
- Backend APIs →
-
Route registration - Call
registry.registerPath()directly in the route file alongside the Express route handler. This documents the endpoint's method, path, request/response schemas, and security requirements.
See backend/tss_api/src/routes/keygen.ts for a complete example of this
pattern.
# Rust tests
cargo test --workspace
# TypeScript typecheck (serves as primary validation)
yarn ci typecheck- Build order matters - WASM packages must build before TypeScript packages that depend on them
- Rust nightly required - Some crypto dependencies require nightly features
- WASM rebuild after Rust changes - Always run
yarn ci build_csorbuild_frostafter modifying Rust crypto code - Yarn immutable - Use
yarn install --immutableto ensure lockfile consistency
All PRs must pass:
- TypeScript typecheck (
yarn ci typecheck) - Rust check (
cargo check --workspace)
- WASM issues - Check that wasm-pack is installed and Rust nightly is active
- Type errors after crypto changes - Rebuild WASM packages first
- Dependency issues - Run
yarn ci deps_checkto verify package versions
| Command | Description |
|---|---|
yarn ci build_cs |
Build Cait-Sith WASM (tECDSA) |
yarn ci build_frost |
Build FROST WASM (tEdDSA) |
yarn ci build_pkgs |
Build internal packages |
yarn ci build_sdk |
Build SDK packages |
yarn ci typecheck |
TypeScript typecheck |
yarn ci lang_check |
Code style check |
yarn ci lang_format |
Code formatting |
yarn ci deps_check |
Dependency verification |
cargo check --workspace |
Rust workspace check |
cargo test --workspace |
Rust tests |