| Crates.io | qudag |
| lib.rs | qudag |
| version | 1.4.0 |
| created_at | 2025-06-20 18:08:53.116073+00 |
| updated_at | 2025-06-23 21:00:22.3002+00 |
| description | QuDAG - Darknet for agent swarms: Ultra-fast quantum-resistant distributed communication platform with DAG architecture, rUv token exchange, .dark domains, onion routing, and ML-DSA/ML-KEM cryptography |
| homepage | |
| repository | https://github.com/ruvnet/QuDAG |
| max_upload_size | |
| id | 1719977 |
| size | 158,583 |
QuDAG is a revolutionary quantum-resistant distributed communication platform built for the quantum age, designed to support the next generation of autonomous AI agents, swarm intelligence, and zero-person businesses. This is the core library that provides the foundation for building Agentic Organizationsβwhere AI-driven systems run businesses entirely on their own.
QuDAG enables businesses to operate autonomously and decentrally, without human intervention. The platform provides:
Add QuDAG to your Rust project:
[dependencies]
qudag = "1.3"
Or install specific components:
[dependencies]
qudag-crypto = "0.4" # Quantum-resistant cryptography
qudag-network = "0.4" # P2P networking
qudag-dag = "0.4" # DAG consensus
qudag-exchange-core = "0.3" # Resource exchange
use qudag::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create quantum-resistant keys
let keypair = MlDsaKeyPair::generate()?;
// Initialize DAG
let dag = Dag::new();
// Create network manager
let network = NetworkManager::new()?;
// Initialize exchange for resource trading
let exchange = Exchange::new()?;
println!("QuDAG node ready for autonomous operations!");
Ok(())
}
use qudag::{Exchange, NetworkManager, MlDsaKeyPair};
// Create an autonomous agent
pub struct AutonomousAgent {
keypair: MlDsaKeyPair,
exchange: Exchange,
network: NetworkManager,
}
impl AutonomousAgent {
pub async fn run(&mut self) -> Result<(), Box<dyn std::error::Error>> {
// Register on the network
self.network.register_domain("agent.dark").await?;
// Create exchange account
let account = self.exchange.create_account("autonomous-agent")?;
// Start trading resources
loop {
// Buy computational resources when needed
if self.needs_resources() {
self.exchange.transfer(
&account,
&resource_provider,
rUv::new(100),
Some("Buying CPU time")
)?;
}
// Sell excess resources
if self.has_excess_resources() {
self.exchange.transfer(
&other_agent,
&account,
rUv::new(50),
Some("Selling bandwidth")
)?;
}
tokio::time::sleep(Duration::from_secs(60)).await;
}
}
}
use qudag::{BusinessConfig, Exchange, ImmutableDeployment};
// Configure a zero-person business
let config = BusinessConfig::builder()
.enable_auto_distribution(true)
.enable_vault_management(true)
.enable_role_earnings(true)
.set_payout_threshold(rUv::new(100))
.build()?;
// Deploy immutably for autonomous operation
let deployment = ImmutableDeployment::new(config)
.with_grace_period(Duration::from_hours(24))
.lock(keypair)?;
// Business now runs autonomously without human intervention
Build AI agents that provide services and generate revenue independently:
Create marketplaces where agents trade computational resources:
Deploy infrastructure that maintains itself:
qudag-crypto)use qudag_crypto::{MlKem768, MlDsaKeyPair, Blake3Hash};
// Quantum-resistant encryption
let (ciphertext, shared_secret) = MlKem768::encapsulate(&public_key)?;
// Digital signatures
let signature = keypair.sign(message)?;
// Quantum-resistant hashing
let hash = Blake3Hash::hash(data);
qudag-network)use qudag_network::{NetworkManager, DarkResolver};
// P2P networking
let network = NetworkManager::new()?;
network.listen_on("/ip4/0.0.0.0/tcp/8000").await?;
// Dark addressing
network.register_domain("myservice.dark").await?;
let addresses = network.resolve_domain("other.dark").await?;
qudag-dag)use qudag_dag::{Dag, QRAvalanche};
// Create DAG with consensus
let mut dag = Dag::with_consensus(QRAvalanche::new());
// Add vertices
let vertex = dag.create_vertex(message, parents)?;
dag.add_vertex(vertex).await?;
qudag-exchange-core)use qudag_exchange::{Exchange, rUv};
// Resource trading
let mut exchange = Exchange::new()?;
let alice = exchange.create_account("alice")?;
// Transfer with automatic fee calculation
exchange.transfer(&alice, &bob, rUv::new(1000), None)?;
QuDAG is the foundation for the next generation of autonomous businesses. Whether you're building AI agent swarms, decentralized marketplaces, or self-sustaining infrastructure, QuDAG provides the secure, scalable platform you need.
The age of zero-person businesses is here. Build yours with QuDAG.
Licensed under either of:
at your option.