Skip to content

cyberdreadx/rougechain-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

629 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RougeChain - Post-Quantum Programmable Blockchain

RougeChain is a production-ready L1 blockchain built from genesis with NIST-approved post-quantum cryptography (ML-DSA-65, ML-KEM-768). Every signature, transaction, and encrypted message is quantum-safe β€” not as a future patch, but as the foundation.

Live Testnet: rougechain.io | API: https://testnet.rougechain.io/api | SDK: npm i @rougechain/sdk

Features

Core Blockchain

  • Post-Quantum Cryptography: ML-DSA-65 (FIPS 204) signatures, ML-KEM-768 (FIPS 203) key exchange
  • L1 Node Daemon: Rust core with HTTP + gRPC APIs
  • Client-Side Signing: Private keys never leave your browser
  • EIP-1559 Dynamic Fees: Base fee auto-adjusts Β±12.5% per block, base fee burned
  • BFT Finality: Quorum certificates with β‰₯2/3 validator stake
  • HD Wallet Derivation: BIP-44-like PQC key derivation from mnemonic
  • P2P Networking: Multi-node peering with automatic peer discovery
  • Token Burning: On-chain burn address with transparent tracking

WASM Smart Contracts πŸ†•

  • wasmi Runtime: Pure-Rust WASM interpreter (Parity/Substrate-grade)
  • Fuel-Metered Execution: 10M default fuel limit per call
  • 12 Host Functions: Balance, transfer, storage R/W, events, SHA-256, block info
  • Persistent Contract Storage: sled-backed key-value state per contract
  • Deterministic Addresses: SHA-256(deployer β€– nonce) for contract addresses
  • Deploy + Call + Query: Full contract lifecycle via API

MCP Agentic Layer πŸ†•

  • 22 MCP Tools: AI agents interact with RougeChain natively
  • First MCP-Native Blockchain: No other L1 has built-in MCP integration
  • Chain Queries: Stats, blocks, balances, tokens, NFTs, pools, validators
  • Contract Operations: Deploy, call, read state, get events
  • Claude Desktop Ready: Drop-in claude_desktop_config.json support

DeFi (AMM/DEX)

  • Liquidity Pools: Uniswap V2-style constant product AMM
  • Token Swaps: Multi-hop routing with 0.3% fee
  • LP Tokens: Earn fees by providing liquidity
  • Custom Tokens: Create and deploy tokens with mint authority

Staking & Validators

  • Proof of Stake: Validator selection weighted by stake
  • Validator Names: Human-readable node identifiers
  • Slashing: Penalties for misbehavior
  • Unbonding Queue: 500-block cooldown for unstaking

Privacy & Shielded Transactions

  • ZK-STARK Proofs: Winterfell-based shielded transfers
  • Commitment Scheme: Pedersen-style commitments for note privacy
  • Nullifier Tracking: Double-spend prevention
  • Rollup Accumulator: Batch shielded operations for efficiency

NFTs

  • RC-721 Collections: Create collections with royalties and metadata
  • Batch Minting: Mint multiple tokens in a single transaction
  • Transfer & Burn: Full lifecycle management
  • Collection Freeze: Prevent further minting

Messaging & Mail

  • E2E Encrypted Messenger: Real-time chat with ML-KEM-768 encryption
  • Encrypted Mail: On-chain mail system with PQC encryption, multi-recipient CEK pattern
  • Signed API Requests: All mail/messenger/name operations require ML-DSA-65 signed requests with anti-replay nonces
  • TOFU Key Verification: SHA-256 fingerprints with key-change warnings
  • Push Notifications: Web push for new messages
  • Atomic Name Registry: compare-and-swap name registration via sled

Bridge

  • qETH Bridge: Bridge ETH from Base Sepolia to qETH on RougeChain
  • XRGE Bridge: Two-way XRGE bridging to Base
  • Relayer: Automated bridge withdrawal fulfillment

Governance

  • Proposals: On-chain governance proposals per token
  • Voting: Token-weighted voting

Browser Extension

  • RougeChain Wallet: Manifest V3 extension for Chrome, Edge, Brave, Firefox, Arc, Opera
  • dApp Provider: window.rougechain API for web integrations

Quick Start

Prerequisites

  • Node.js 18+ (frontend)
  • Rust toolchain (core node)

Local Development

# Clone and install
git clone https://github.com/cyberdreadx/rougechain-node.git
cd rougechain-node && npm install

# Start frontend
npm run dev

# In another terminal, start the node
cd core && cargo run -p quantum-vault-daemon -- --mine

Using the SDK

npm install @rougechain/sdk
import { RougeChain, Wallet } from '@rougechain/sdk';

const rc = new RougeChain('https://rougechain.io/api');
const wallet = Wallet.generate();

// Check balance
const { balance } = await rc.getBalance(wallet.publicKey);

// Deploy a WASM smart contract
const result = await rc.deployContract({
  wasm: base64WasmBytes,
  deployer: wallet.publicKey,
  nonce: 0,
});

MCP Server (AI Agent Integration)

cd mcp-server && npm install && npm run build

Add to your Claude Desktop config:

{
  "mcpServers": {
    "rougechain": {
      "command": "node",
      "args": ["path/to/mcp-server/dist/index.js"],
      "env": { "ROUGECHAIN_URL": "https://rougechain.io" }
    }
  }
}

Project Structure

quantum-vault/
β”œβ”€β”€ core/                  # Rust L1 node daemon
β”‚   β”œβ”€β”€ daemon/            # Main binary (API, miner, peer sync)
β”‚   β”œβ”€β”€ cli/               # CLI wallet (rougechain command)
β”‚   β”œβ”€β”€ types/             # Shared types and codec helpers
β”‚   β”œβ”€β”€ crypto/            # PQC signing (ML-DSA-65) and hashing
β”‚   β”œβ”€β”€ consensus/         # Proposer selection
β”‚   β”œβ”€β”€ storage/           # Chain, validator, pool persistence
β”‚   β”œβ”€β”€ vm/                # WASM smart contract engine (wasmi)
β”‚   └── p2p/               # TCP gossip scaffolding
β”œβ”€β”€ sdk/                   # TypeScript SDK (@rougechain/sdk)
β”œβ”€β”€ mcp-server/            # MCP server for AI agents
β”œβ”€β”€ src/                   # React frontend (Vite + TypeScript)
β”œβ”€β”€ docs/                  # Documentation (mdBook format)
β”œβ”€β”€ scripts/               # Bridge relayer scripts
β”œβ”€β”€ contracts/             # WASM smart contract templates
└── browser-extension/     # Browser wallet extension (MV3)

Technologies

  • Frontend: Vite, React, TypeScript, Tailwind CSS, shadcn/ui
  • Backend: Rust (Axum HTTP + Tonic gRPC)
  • Cryptography: ML-DSA-65, ML-KEM-768, SHA-256 (NIST FIPS 203/204)
  • Smart Contracts: wasmi WASM interpreter with fuel metering
  • Privacy: ZK-STARKs (winterfell) for shielded transactions
  • Storage: sled embedded database
  • AI Integration: MCP (Model Context Protocol) server

Network Info

Property Value
Chain ID rougechain-devnet-1
Native Token XRGE
Address Format rouge1... (Bech32m)
Testnet URL https://testnet.rougechain.io/api
Frontend https://rougechain.io
Block Time 400ms
Signing ML-DSA-65 (CRYSTALS-Dilithium)
Encryption ML-KEM-768 (CRYSTALS-Kyber)

License

MIT