Private messaging with local encryption, on-chain X-Wing identity, and ZK-verified registry-root and message-root updates.
- Wallet-authenticated web and Android chat clients
- Invite-based encrypted conversations
- X-Wing public key registration on Solana
- Redis-backed realtime relay and message sync
- Backend-generated proofs for registry-root and message-root updates
- Configurable MagicBlock Private Ephemeral Rollup (PER) submission path with direct Solana fallback
- Solana-settled root updates
- Solana wallet auth
- local X25519 and X-Wing messaging identity
- invite creation and import
- local encryption and decryption
- on-chain X-Wing registry integration
- React + Vite web client
- Android Expo client with Mobile Wallet Adapter
- challenge/verify auth flow
- WebSocket relay
- Redis message storage with TTL
- offline sync
- commitment tracking
- native proof generation
- automatic registry-root and message-root submission
- configurable PER delegation, commit, and undelegation flow
- direct Solana submission fallback
- main Enmarch program
- verifier program
- registry-root and message-root state PDAs
- append-only X-Wing registry PDA
- PER permission and delegation instructions
- Noir circuit for valid Merkle-tree append transitions
- native proof generation through Sunspot
- verifier-gated root updates
- durable conversation and message metadata database
- backend-owned inbox and history model
- long-term replacement for message-root and registry-root bootstrap leaves in env
- production-ready X-Wing registry account design
.
├── backend/ # Bun relay, sync API, on-chain submit path
├── frontend/ # React + Vite messaging app
├── mobile/ # Android Expo client with MWA wallet auth
├── packages/
│ ├── circuit/ # Noir circuit + proving artifacts
│ ├── core/ # Shared messaging protocol helpers
│ ├── encryption/ # X-Wing + symmetric encryption helpers
│ ├── merkle-tree/ # Poseidon tree and witness helpers
│ ├── onchain-client/ # Generated and low-level on-chain helpers
│ └── solana-client/ # App-facing Solana client helpers
├── program/
│ └── enmarch_program/ # Pinocchio Solana program
└── setup.sh # local dev bootstrap script
- Bun
- Docker + Docker Compose
- Solana CLI if you want to inspect or deploy program state
- Go toolchain if you want to run the native prover locally
- Copy the root env file.
cp .env.example .envIf you plan to use setup.sh, set a non-empty REDIS_PASSWORD in .env
first because the script enforces it.
- Install dependencies.
bun install
cd frontend && bun install- Start Redis.
docker compose up -d redis- Start the backend.
bun run backend:dev- Start the frontend in another terminal.
cd frontend
bun devBackend: http://localhost:3001
Frontend: http://localhost:5173
chmod +x ./setup.sh
./setup.shsetup.sh installs deps, starts Redis, then runs frontend and backend together.
At the repo root:
SOLANA_RPC_URLSOLANA_KEYPAIR_PATHMESSAGE_ROOT_BOOTSTRAP_LEAVES_HEXREGISTRY_ROOT_BOOTSTRAP_LEAVES_HEXSUNSPOT_GO_DIRREDIS_HOSTREDIS_PORTJWT_SECRET
Optional MagicBlock PER path:
MAGICBLOCK_ENABLEDMAGICBLOCK_RPC_URLMAGICBLOCK_VALIDATOR_ADDRESSMAGICBLOCK_MESSAGE_*MAGICBLOCK_REGISTRY_*MAGICBLOCK_COMMIT_THRESHOLDMAGICBLOCK_COMMIT_INTERVAL_MS
In frontend/.env.local if needed:
VITE_API_BASE_URLVITE_SOLANA_RPC_URL
In mobile/.env if needed:
EXPO_PUBLIC_API_BASE_URLEXPO_PUBLIC_SOLANA_RPC_URLEXPO_PUBLIC_MWA_CHAINEXPO_PUBLIC_APP_NAMEEXPO_PUBLIC_APP_URIEXPO_PUBLIC_APP_ICON_URIEXPO_PUBLIC_EXPO_PROJECT_ID
- Message payloads are still ephemeral and Redis-backed
- Conversation metadata is still partly client-side
MESSAGE_ROOT_BOOTSTRAP_LEAVES_HEXandREGISTRY_ROOT_BOOTSTRAP_LEAVES_HEXcurrently bridge pre-existing on-chain tree history until the backend owns durable tree state- Root updates use MagicBlock PER when enabled and fully configured. The backend falls back to direct Solana submission otherwise.
bun run typecheck
bun run backend:test
cd frontend && bun run lint && bun run buildMobile-specific build and device instructions live in
mobile/README.md.