A Multi-Party Computation (MPC) wallet browser extension built with WXT, Svelte, and Rust/WebAssembly. This extension enables secure distributed key generation and signing operations across multiple parties using the FROST (Flexible Round-Optimized Schnorr Threshold) signature scheme.
# Install dependencies
bun install
# Build WASM modules
bun run build:wasm
# Start development server
bun run dev
# Build for production
bun run build
mpc-wallet/
├── src/ # Source code
│ ├── entrypoints/ # Extension entry points
│ │ ├── background/ # Service worker
│ │ ├── content/ # Content scripts
│ │ ├── offscreen/ # Offscreen document
│ │ └── popup/ # Extension popup UI
│ ├── components/ # Svelte UI components
│ ├── services/ # Business logic
│ ├── types/ # TypeScript definitions
│ └── lib.rs # Rust/WASM implementation
├── docs/ # Documentation
│ ├── architecture/ # Technical architecture
│ ├── implementation/ # Implementation details
│ └── testing/ # Testing documentation
├── scripts/ # Utility scripts
│ ├── build/ # Build scripts
│ └── test/ # Test scripts
├── tests/ # Test suites
├── test-data/ # Test fixtures and data
└── test-fixtures/ # Manual test files
The extension follows Chrome Extension Manifest V3 architecture with four main contexts:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Popup Page │ │ Background Page │ │ Offscreen Page │
│ │ │ │ │ │
│ - UI Components │ │ - Service Worker│ │ - WebRTC Manager│
│ - State Display │◄──►│ - Message Router│◄──►│ - FROST DKG │
│ - User Actions │ │ - WebSocket │ │ - Crypto Ops │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐
│ Content Script │
│ │
│ - Web3 Provider │◄── Web Page
│ - JSON-RPC Proxy│ (window.ethereum)
└─────────────────┘
- FROST MPC Protocol: Secure threshold signatures using FROST
- Multi-Chain Support: Ethereum (secp256k1) and Solana (ed25519)
- Distributed Key Generation: Generate keys across multiple parties
- WebRTC P2P Communication: Direct peer-to-peer connections
- CLI Compatibility: Import/export keystores compatible with CLI nodes
- Web3 Integration: EIP-1193 compatible provider
- Bun runtime
- Chrome/Chromium browser
- Rust toolchain with
wasm-pack
-
Clone the repository
git clone <repository-url> cd mpc-wallet
-
Install dependencies
bun install
-
Build WASM modules
bun run build:wasm
-
Start development server
bun run dev
-
Load extension in Chrome
- Navigate to
chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked"
- Select the
dist
folder
- Navigate to
bun run dev
- Start development server with hot reloadbun run build
- Build production extensionbun run build:wasm
- Build Rust/WASM modulesbun run test
- Run test suitebun run check
- Run Svelte type checking
# Run all tests
bun test
# Run specific test suites
bun test services/
bun test components/
bun test webrtc
# Run with coverage
bun test --coverage
- No Single Point of Failure: Keys are distributed using MPC
- Threshold Signatures: Requires t-of-n participants to sign
- Secure Communication: WebRTC encrypted channels
- Isolated Contexts: Crypto operations in offscreen document
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Apache-2.0 License - see LICENSE file for details
- Built with WXT - Next-gen Web Extension Framework
- FROST implementation using frost-core
- UI components with Svelte
- Create an issue for bug reports or feature requests
- Check existing issues before creating new ones
- See CLAUDE.md for AI assistant guidance