Skip to content

Commit 6cb1b6f

Browse files
committed
docs: finalized absolute comprehensive command and flag guide in root readme
1 parent b6e456a commit 6cb1b6f

1 file changed

Lines changed: 82 additions & 74 deletions

File tree

README.md

Lines changed: 82 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -30,132 +30,140 @@ graph TD
3030

3131
---
3232

33-
## 🚀 Ecosystem Infrastructure & Features
33+
## � Project Lifecycle & Orchestration
3434

35-
### 1. Advanced Zero-Knowledge Stack
36-
- **Groth16 Proving Pipeline**: High-performance proving implementation on the **BN254 curve**.
37-
- **Poseidon-3 Hashing**: Standardized sponge construction ensuring 100% hash parity across **Circom (circuits)**, **Rust (Anchor program)**, and **TypeScript (SDK)**.
38-
- **20-Level Merkle Tree**: Optimized sparse tree supporting over 1.04M unique commitments per pool.
39-
40-
### 2. Specialized ZK Circuitry
41-
- **`withdraw.circom`**: Orchestrates nullifier verification, Merkle membership checks, and public signal binding.
42-
- **`rescue.circom`**: A specialized emergency circuit for the Atomic Rescue Engine, enabling private migration of assets from compromised identities.
43-
- **`merkleTree.circom`**: Efficient logarithmic witness generation for state membership.
44-
45-
### 3. On-Chain Cryptoeconomics & Programs
46-
- **Anchor Protocol**: A secure on-chain verifier and state management layer.
47-
- **Nullifier Management**: Persistent on-chain nullifier tracking to prevent double-spending without leaking deposit history.
48-
- **Protocol Economics**: Integrated fee-distribution and relayer-bounty mechanisms implemented in `economics.rs`.
49-
50-
### 4. Shadow Relayer Network (Onion Routing)
51-
- **Identity Decoupling**: RSA-OAEP multi-hop encryption ensures the destination identity is never linked to the origin RPC metadata.
52-
- **Gasless Withdrawals**: Users can execute withdrawals without maintaining native SOL in the destination wallet; fees are deducted directly from the shielded commitment.
53-
54-
### 5. Privacy Ghost Score (Anonymity Audit)
55-
- **Heuristic Diagnostic Engine**: Quantifies wallet privacy (0-100) by analyzing transaction-graph entropy, identity linkage, and temporal correlations.
56-
- **Social Artifacts**: Generate ZK-verified "Privacy Badges" to prove anonymity status without revealing sensitive data.
57-
58-
### 6. Atomic Rescue Engine (MEV Protection)
59-
- **Jito Integration**: Leverages the **Jito-Solana mev-bundle** for sub-2s critical execution, protecting assets from front-running and sandwich attacks during emergency rotations.
60-
- **Private Migration**: Automates the batch-shielding process to transit leaked assets into a secure, private state.
61-
62-
### 7. Global Command Center (CLI & Dashboard)
63-
- **SolVoid CLI**: High-performance terminal interface for system-wide orchestration, rescue ops, and auditing.
64-
- **Web Dashboard**: An institutional-grade Next.js interface providing real-time protocol telemetry, vault liquidity snapshots, and individual privacy audit histories.
65-
66-
### 8. Quality Assurance & Engineering Standards
67-
- **Strict Data Integrity (DIE)**: Zod-powered schema enforcement at every operational boundary (CLI, API, SDK).
68-
- **Comprehensive Test Suite**: Unit, integration, and E2E testing using **Jest** and **Anchor Test**, ensuring ZK circuit parity and state consistency.
69-
- **Automated CI/CD**: Optimized GitHub Actions for continuous deployment and cryptographic validation.
70-
71-
---
72-
73-
## 🛠 Command Orchestration & Implementation
74-
75-
### 1. Environment Initialization
76-
Standard procedures for initializing the SolVoid development and deployment environment.
35+
### 1. Environment & Deployment Hub
36+
The foundation for building, testing, and deploying the SolVoid protocol.
7737

7838
```bash
79-
# Clone and Initialize
39+
# Repository Initialization
8040
git clone https://github.com/brainless3178/SolVoid.git
8141
cd SolVoid
8242
npm install
8343

84-
# ZK Proving Pipeline Initialization
85-
# Ensure circom and snarkjs are present in the system path
44+
# ZK Cryptographic Pipeline
45+
# Compiles circuits and generates proving/verification keys
8646
./scripts/build-zk.sh
8747

88-
# On-Chain Deployment (Anchor)
48+
# On-Chain Program Lifecycle (Anchor)
8949
anchor build
9050
anchor deploy --provider.cluster devnet
51+
52+
# Quality Assurance Suite
53+
npm test # Execute full test matrix
54+
npm run lint # Static code analysis
55+
npm run dashboard:dev # Launch local UI environment
9156
```
9257

9358
### 2. CLI Command Specification (`solvoid`)
94-
Standard orchestration for protocol interaction and emergency remediation.
59+
The primary interface for protocol interaction, auditing, and emergency response.
9560

96-
#### **Shielding (Deposit)**
61+
#### **Surgical Shielding (Deposit)**
9762
```bash
9863
solvoid shield <amount>
9964
```
65+
* **Args**: `<amount>` (SOL to shield)
66+
* **Protocol Action**: Generates `Secret` and `Nullifier` keys and commits hashed state to the Merkle tree.
10067

101-
#### **Withdrawal (Unlinking)**
68+
#### **Unlinkable Withdrawal**
10269
```bash
103-
solvoid withdraw <secret> <nullifier> <recipient> <amount> [flags]
70+
solvoid withdraw <secret> <nullifier> <recipient> <amount> [options]
10471
```
105-
| Flag | Description | Default |
72+
| Option | Description | Default |
10673
|:---|:---|:---|
107-
| `--relayer <url>` | Target Shadow Relayer endpoint | `http://localhost:8080` |
108-
| `--rpc <url>` | Override default Solana RPC | `.env` default |
74+
| `--relayer <url>`| Target Shadow Relayer endpoint | `.env` default |
75+
| `--rpc <url>` | Override default Solana RPC | `.env` default |
10976

110-
#### **Ghost Score (Anonymity Audit)**
77+
#### **Privacy Ghost Score (Audit)**
11178
```bash
112-
solvoid ghost <address> [flags]
79+
solvoid ghost <address> [options]
11380
```
114-
| Flag | Description |
81+
| Option | Description |
11582
|:---|:---|
116-
| `--badge` | Generate a ZK-verified privacy badge artifact |
117-
| `--json` | Return raw audit data for programmatic ingestion |
83+
| `--badge` | Generate a ZK-verified Privacy Badge artifact |
84+
| `--share` | Generate social metadata for X/Discord platforms |
85+
| `--verify <p>` | Cryptographically validate an external privacy proof |
86+
| `--json` | Return raw audit data for programmatic ingestion |
11887

119-
#### **Atomic Rescue (Emergency Remediation)**
88+
#### **Atomic Rescue (MEV Protection)**
89+
```bash
90+
solvoid rescue <wallet> [options]
91+
```
92+
| Option | Description |
93+
|:---|:---|
94+
| `--to <addr>` | Specified recovery destination address |
95+
| `--auto-generate`| Initialize a fresh, secure remediation wallet |
96+
| `--jito-bundle` | Utilize Jito-Solana MEV bundles for atomic execution |
97+
| `--emergency` | Priority fee escalation for sub-2s critical rotation |
98+
| `--dry-run` | Simulate orchestration without network broadcast |
99+
| `--monitor` | Activate real-time post-remediation threat alerts |
100+
101+
#### **Protocol Administration (Emergency Controls)**
120102
```bash
121-
solvoid rescue <wallet_input> [flags]
103+
solvoid admin <command> [args]
122104
```
123-
| Flag | Description |
105+
| Command | Action |
124106
|:---|:---|
125-
| `--to <address>` | Specified recovery destination for remediated assets |
126-
| `--emergency` | Escalated priority for Jito-MEV critical execution |
107+
| `pause` | Trigger the ZK Circuit Breaker to suspend withdrawals |
108+
| `resume` | Reset breaker and resume protocol operations |
109+
| `trigger-emergency` | Escalates protocol-wide fee multipliers (x1-x10) |
110+
| `disable-emergency` | Resets protocol fees to baseline state |
127111

128112
---
129113

130114
### 3. SDK Integration Patterns
115+
A professional integration layer for third-party dApps and services.
116+
131117
```typescript
132118
import { SolVoidClient } from 'solvoid';
133119

120+
// 1. Client Orchestration
134121
const client = new SolVoidClient(config, wallet);
122+
123+
// 2. Surgical Shielding
135124
const { commitmentData } = await client.shield(1.5 * LAMPORTS_PER_SOL);
125+
126+
// 3. Privacy Auditing
136127
const passport = await client.getPassport(address);
128+
console.log(`Ghost Score: ${passport.overallScore}/100`);
129+
130+
// 4. Low-level Proof Generation
131+
const proof = await client.prepareWithdrawal(secret, nullifier, ...);
137132
```
138133

139-
### 4. Relayer API Specification
140-
| Endpoint | Method | Data Requirement |
134+
---
135+
136+
### 4. Shadow Relayer API Specification
137+
Technical endpoints for the decentralized relay network.
138+
139+
| Endpoint | Method | Functional Requirement |
141140
|:---|:---|:---|
142-
| `/status` | `GET` | Service health & metrics |
143-
| `/commitments` | `GET` | Merkle state synchronization |
144-
| `/relay` | `POST` | `transaction` (base64) & `hops` (1-5) |
141+
| `/status` | `GET` | Health monitoring & protocol metrics |
142+
| `/commitments` | `GET` | Multi-hop Merkle state synchronization |
143+
| `/relay` | `POST` | `transaction` (base64) & `hops` (onion routing depth 1-5) |
144+
145+
---
146+
147+
## � Key Ecosystem Infrastructure
148+
149+
* **Groth16 ZK-SNARKs**: High-performance proving implementation on the **BN254 curve**.
150+
* **Poseidon-3 Hashing**: Standardized sponge construction for 100% parity across Rust, TS, and Circom.
151+
* **Jito-MEV Integration**: Advanced front-running protection for critical asset rotations.
152+
* **Data Integrity Enforcement (DIE)**: Zod-powered schema validation at every operational boundary.
153+
* **Global Dashboard**: Institutional Next.js interface providing real-time technical telemetry.
145154

146155
---
147156

148-
## 📖 Reference Documentation Partitioning
157+
## 📖 Project Documentation
149158

150-
- **Protocol Core:** [DOCS.md](DOCS.md) | [ZK_REFERENCE.md](ZK_REFERENCE.md) | [GHOST_REFERENCE.md](GHOST_REFERENCE.md)
151-
- **Integration Layer:** [SDK_REFERENCE.md](SDK_REFERENCE.md) | [CLI_REFERENCE.md](CLI_REFERENCE.md) | [API_REFERENCE.md](API_REFERENCE.md)
152-
- **Operations:** [CICD_REFERENCE.md](CICD_REFERENCE.md) | [SYSTEM_STATUS.md](SYSTEM_STATUS.md) | [DEPLOYMENT.md](DEPLOYMENT.md)
159+
- **Core:** [DOCS.md](DOCS.md) | [ZK_REFERENCE.md](ZK_REFERENCE.md) | [GHOST_REFERENCE.md](GHOST_REFERENCE.md)
160+
- **Integration:** [SDK_REFERENCE.md](SDK_REFERENCE.md) | [CLI_REFERENCE.md](CLI_REFERENCE.md) | [API_REFERENCE.md](API_REFERENCE.md)
161+
- **Ops:** [CICD_REFERENCE.md](CICD_REFERENCE.md) | [SYSTEM_STATUS.md](SYSTEM_STATUS.md) | [DEPLOYMENT.md](DEPLOYMENT.md)
153162

154163
---
155164

156165
## 🔒 Security Compliance
157166
- **Status:** Experimental Beta
158-
- **Audit Path:** Undergoing internal peer review; third-party audit scheduled for Q2.
159167
- **Policy:** Refer to [SECURITY.md](SECURITY.md) for disclosure protocols.
160168

161169
---

0 commit comments

Comments
 (0)