File size: 8,926 Bytes
9ff7e0c
4147ce5
 
 
9ff7e0c
 
 
 
4147ce5
9ff7e0c
4147ce5
9ff7e0c
4147ce5
 
 
 
 
9ff7e0c
4147ce5
9ff7e0c
4147ce5
9ff7e0c
4147ce5
945e815
 
9ff7e0c
 
 
 
 
 
 
 
 
 
 
 
 
 
945e815
 
 
9ff7e0c
945e815
9ff7e0c
945e815
9ff7e0c
 
945e815
9ff7e0c
 
 
 
945e815
 
9ff7e0c
 
945e815
9ff7e0c
 
945e815
9ff7e0c
945e815
9ff7e0c
 
 
 
 
 
945e815
 
9ff7e0c
 
945e815
9ff7e0c
 
945e815
9ff7e0c
945e815
9ff7e0c
945e815
9ff7e0c
 
 
 
 
 
 
 
 
945e815
9ff7e0c
945e815
 
 
9ff7e0c
945e815
9ff7e0c
 
 
 
 
 
 
945e815
9ff7e0c
945e815
9ff7e0c
945e815
9ff7e0c
 
 
 
 
 
945e815
 
9ff7e0c
 
 
 
 
 
 
 
 
945e815
 
 
9ff7e0c
945e815
 
 
 
9ff7e0c
 
 
 
 
 
945e815
9ff7e0c
 
 
945e815
9ff7e0c
 
 
945e815
9ff7e0c
 
 
 
 
 
 
 
 
 
945e815
9ff7e0c
 
 
 
945e815
 
9ff7e0c
 
945e815
 
9ff7e0c
945e815
 
 
9ff7e0c
 
 
 
 
 
 
 
945e815
 
 
9ff7e0c
945e815
9ff7e0c
945e815
 
 
 
 
9ff7e0c
945e815
9ff7e0c
945e815
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# SolVox β€” Voice-First Private AI Wallet for Solana

<div align="center">

![SolVox](https://img.shields.io/badge/SolVox-Voice_AI_Wallet-0052ff?style=for-the-badge&labelColor=0a0b0d)
![QVAC](https://img.shields.io/badge/QVAC_SDK-6_Modules-05b169?style=for-the-badge&labelColor=0a0b0d)
![Solana](https://img.shields.io/badge/Solana-Devnet_+_Mainnet-0052ff?style=for-the-badge&labelColor=0a0b0d)
![TypeScript](https://img.shields.io/badge/TypeScript-0_Errors-05b169?style=for-the-badge&labelColor=0a0b0d)

**A fully offline, voice-controlled Solana wallet where AI drives every operation.**

*No cloud. No API keys. No data leaves your device. QVAC is the brain, not a wrapper.*

</div>

---

## Hackathon: Colosseum Frontier β€” Tether QVAC Track

**Listing:** [superteam.fun/earn/listing/tether-frontier-hackathon-track](https://superteam.fun/earn/listing/tether-frontier-hackathon-track)

SolVox integrates **all 6 QVAC addon packages** as load-bearing components of a production wallet. The LLM is an autonomous agent that decides which wallet tools to call. Embeddings power contact resolution and transaction search. OCR chains into LLM for document-to-payment extraction. Every voice command fires all 6 modules in a single pipeline.

---

## Pages (10 screens)

| # | Page | Description | QVAC Modules Used |
|---|---|---|---|
| 1 | **Dashboard** | Dark hero band with floating product-UI cards, sparkline charts, asset rows with mono prices, QVAC engine status | embed (RAG) |
| 2 | **Voice AI** | Hold-to-speak with waveform visualizer, AI agent chat with pipeline trace, suggestion chips | All 6: STT β†’ NMT β†’ LLM β†’ EMB β†’ NMT β†’ TTS |
| 3 | **Send** | Token pill selector, amount input with % buttons, AI risk assessment card, confirmation flow | LLM (risk), EMB (patterns) |
| 4 | **Scan & Pay** | Drag-drop image upload β†’ OCR text extraction β†’ LLM payment parsing β†’ auto-fill transaction | OCR β†’ LLM |
| 5 | **Contacts** | Semantic contact book β€” add contacts with notes, resolve by name/description via embeddings | EMB (cosine similarity) |
| 6 | **Transactions** | History with semantic AI search, asset-row pattern, status badges | EMB (RAG search) |
| 7 | **Security** | Transaction limits, toggle switches, address whitelist, AI anomaly detection log | LLM (anomaly analysis) |
| 8 | **Settings** | Network selector, QVAC model list with sizes, about section, danger zone | β€” |
| 9 | **Lock Screen** | PIN dot visualization, biometric support, encrypted vault | β€” |
| 10 | **Onboarding** | Step indicator, wallet create/import, PIN setup with AES-256-GCM | β€” |

---

## Deep QVAC Integration (40% of judging)

This is NOT a wrapper. QVAC drives the wallet:

### 1. Tool-Use Agent (`@qvac/llm-llamacpp`)
The LLM receives user commands and returns structured JSON with tool calls:
```
User: "Send 5 SOL to Alice"
β†’ LLM reasons: need to resolve contact first
β†’ Actions: [resolve_contact("Alice"), confirm_transaction(5, SOL, resolved_address)]
β†’ User confirms β†’ ai:executeConfirmed β†’ transaction sent + auto-indexed
```

### 2. Semantic Contact Book (`@qvac/embed-llamacpp`)
Contacts embedded with names + notes. "Send to my friend from the hackathon" resolves via cosine similarity β€” no exact match needed.

### 3. AI Risk Assessment (`@qvac/llm-llamacpp` + `@qvac/embed-llamacpp`)
Before every transaction, the LLM analyzes spending patterns from the embedded transaction history and generates a scored risk assessment with natural language reasoning.

### 4. Voice Pipeline (all 6 modules)
```
🎀 Audio β†’ @qvac/transcription-whispercpp β†’ text
        β†’ @qvac/translation-nmtcpp β†’ English (if non-English)
        β†’ @qvac/llm-llamacpp β†’ agent reasoning + tool calls
        β†’ @qvac/embed-llamacpp β†’ RAG context retrieval
        β†’ @qvac/translation-nmtcpp β†’ user's language
        β†’ @qvac/tts-onnx β†’ spoken response
```

### 5. Document-to-Payment (`@qvac/ocr-onnx` β†’ `@qvac/llm-llamacpp`)
Upload invoice β†’ OCR extracts text β†’ LLM parses amount, recipient, token, memo β†’ auto-fills transaction form.

### 6. Auto-Indexing RAG (`@qvac/embed-llamacpp`)
Every transaction auto-embeds on completion. The AI's knowledge grows with every interaction β€” entirely local.

---

## Security

- **OS keychain encryption** via Electron `safeStorage` + AES-256-GCM + PBKDF2 (600K iterations)
- **PIN + Touch ID** with 5-attempt lockout (15 min)
- **Transaction limits** β€” per-tx, daily volume, velocity, cooldown
- **Address whitelisting** β€” optional, restrict to approved addresses
- **AI anomaly detection** β€” LLM analyzes patterns, can block dangerous transactions
- **Process isolation** β€” `contextIsolation: true`, `sandbox: true`, `nodeIntegration: false`
- **CSP headers** block script injection, limit connections to Solana RPC only
- **Auto-lock** after 5 minutes idle
- **Zero key exposure** β€” private keys never cross IPC boundary

See [SECURITY.md](SECURITY.md) for full threat model.

---

## Design System

Coinbase-inspired institutional design:
- **Single accent color** β€” Coinbase Blue (#0052ff), used scarcely
- **White canvas** + hairline borders + dark hero bands
- **Pill geometry** β€” every CTA is rounded-pill (100px)
- **Inter** at weight 400 for display, **JetBrains Mono** for all numbers
- **96px section rhythm** β€” generous editorial pacing
- **Trading semantics** β€” green (#05b169) / red (#cf202f) for text only, never backgrounds

---

## Quick Start

```bash
git clone https://github.com/muthuk1/solvox.git
cd solvox
npm install
chmod +x scripts/download-models.sh && ./scripts/download-models.sh
npm run dev
```

### Models (~2.6 GB)
| Model | Package | Size |
|---|---|---|
| Llama 3.2 3B Instruct Q4_K_M | `@qvac/llm-llamacpp` | 2.0 GB |
| Nomic Embed Text v1.5 Q4_K_M | `@qvac/embed-llamacpp` | 260 MB |
| Whisper Base English | `@qvac/transcription-whispercpp` | 150 MB |
| Piper TTS Amy | `@qvac/tts-onnx` | 75 MB |
| OPUS MT EN↔ES | `@qvac/translation-nmtcpp` | 50 MB |
| PaddleOCR v4 | `@qvac/ocr-onnx` | 30 MB |

---

## Project Structure

```
solvox/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/                         # Electron main process
β”‚   β”‚   β”œβ”€β”€ main.ts                   # Window, CSP, IPC handlers, agent execution
β”‚   β”‚   β”œβ”€β”€ preload.ts                # contextBridge β€” allowlisted IPC channels
β”‚   β”‚   β”œβ”€β”€ ai/qvacEngine.ts          # QVAC deep integration (33KB) β€” agent, RAG, risk, OCR pipeline
β”‚   β”‚   β”œβ”€β”€ wallet/walletService.ts   # Solana wallet (BIP39, SOL, USDT)
β”‚   β”‚   └── security/                 # KeyVault, SecurityManager, TransactionGuard
β”‚   β”‚
β”‚   └── renderer/                     # React UI (Coinbase design)
β”‚       β”œβ”€β”€ App.tsx                   # Router, toast system, auth flow
β”‚       β”œβ”€β”€ types.ts                  # Preload bridge types (verified match)
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ Sidebar.tsx           # 8-item nav, QVAC badge
β”‚       β”‚   β”œβ”€β”€ TopBar.tsx            # Address pill, mono balances
β”‚       β”‚   └── ui/index.tsx          # Toast, Num, AssetRow, Sparkline, PipelineTrace, StepIndicator
β”‚       └── pages/
β”‚           β”œβ”€β”€ Dashboard.tsx         # Dark hero, sparklines, AI status
β”‚           β”œβ”€β”€ VoicePage.tsx         # Voice agent + chat + pipeline trace
β”‚           β”œβ”€β”€ SendPage.tsx          # Send with AI risk assessment
β”‚           β”œβ”€β”€ ScanPage.tsx          # OCR β†’ LLM payment extraction (NEW)
β”‚           β”œβ”€β”€ ContactsPage.tsx      # Semantic contact book (NEW)
β”‚           β”œβ”€β”€ HistoryPage.tsx       # Transactions + RAG search
β”‚           β”œβ”€β”€ SecurityPage.tsx      # Limits, toggles, whitelist, anomaly log
β”‚           β”œβ”€β”€ SettingsPage.tsx      # Network, models, about
β”‚           β”œβ”€β”€ LockScreen.tsx        # PIN dots, biometric
β”‚           └── OnboardingScreen.tsx  # Create/import, PIN setup
β”‚
β”œβ”€β”€ models/                           # AI models (~2.6 GB, downloaded locally)
β”œβ”€β”€ scripts/download-models.sh        # Model download script
β”œβ”€β”€ SECURITY.md                       # Full threat model
└── package.json
```

**TypeScript: 0 errors** (verified with `tsc --noEmit`)

---

## Tech Stack

| Layer | Technology |
|---|---|
| App Shell | Electron 30 |
| Frontend | React 18 + TypeScript + TailwindCSS |
| Design | Coinbase design system (Inter + JetBrains Mono) |
| AI Runtime | QVAC SDK (all 6 addons) |
| GPU | Vulkan API (any GPU β€” no CUDA) |
| Blockchain | Solana (@solana/web3.js + @solana/spl-token) |
| Encryption | safeStorage + AES-256-GCM + PBKDF2 |
| Build | Vite 5 + electron-builder |

---

## License

MIT β€” see [LICENSE](LICENSE).

---

<div align="center">

**Built for Colosseum Frontier Hackathon β€” Tether QVAC Track**

*QVAC is the brain. Not the wrapper.*

</div>