🌐 Quantum-Resistant Distributed Communication Platform
QuDAG is a revolutionary quantum-resistant distributed communication platform built on a Directed Acyclic Graph (DAG) architecture. This NPM package provides easy access to the QuDAG CLI through Node.js and NPX.
No installation required! Just run:
npx qudag@latest --help
Install globally for direct CLI access:
npm install -g qudag
qudag --help
Add to your project as a dependency:
npm install qudag
- Node.js >= 16.0.0
- Supported platforms:
- Linux (x64, arm64)
- macOS (x64, arm64)
- Windows (x64)
# Using npx
npx qudag@latest start --port 8000
# If installed globally
qudag start --port 8000
# Register a .dark domain
npx qudag@latest address register mynode.dark
# Resolve a dark address
npx qudag@latest address resolve mynode.dark
# Generate a temporary shadow address
npx qudag@latest address shadow --ttl 3600
# Create a quantum fingerprint
npx qudag@latest address fingerprint --data "Hello QuDAG!"
# List connected peers
npx qudag@latest peer list
# Add a new peer
npx qudag@latest peer add /ip4/192.168.1.100/tcp/8000
# Remove a peer
npx qudag@latest peer remove 12D3KooWExample...
# Check node status
npx qudag@latest status
# View network statistics
npx qudag@latest network stats
# Stop the node
npx qudag@latest stop
const { QuDAG } = require('qudag');
// or
import { QuDAG } from 'qudag';
// Start a node
const startResult = await QuDAG.start(8000);
console.log('Node started:', startResult.stdout);
// Get node status
const status = await QuDAG.status();
console.log('Status:', status.stdout);
// Register a dark address
const register = await QuDAG.registerAddress('myapp.dark');
console.log('Registered:', register.stdout);
// List peers
const peers = await QuDAG.listPeers();
console.log('Peers:', peers.stdout);
// Execute raw commands
const result = await QuDAG.raw(['--version']);
console.log('Version:', result.stdout);
const { execute, getPlatformInfo, isInstalled } = require('qudag');
// Check if binary is installed
if (!isInstalled()) {
console.log('QuDAG binary not installed');
}
// Get platform information
const info = getPlatformInfo();
console.log('Platform:', info.platform);
console.log('Architecture:', info.arch);
console.log('Binary path:', info.binaryPath);
// Execute custom commands with options
const result = await execute(['peer', 'list', '--format', 'json'], {
env: { ...process.env, RUST_LOG: 'debug' }
});
const peers = JSON.parse(result.stdout);
console.log(`Connected to ${peers.length} peers`);
This NPM package acts as a wrapper around the native QuDAG binary, providing:
- Automatic Binary Management: Downloads the correct binary for your platform
- Cross-Platform Support: Works on Linux, macOS, and Windows
- TypeScript Support: Full type definitions included
- Programmatic API: Use QuDAG from your Node.js applications
-
NPX Support: Run without installation using
npx qudag@latest
If the binary fails to download during installation:
- Check your internet connection
- Verify your platform is supported
- Check if a proxy is blocking GitHub access
- Try manual installation:
# The binary will be downloaded on first use
npx qudag@latest --help
If you get permission errors:
# Make the binary executable
chmod +x $(npm root -g)/qudag/bin/platform/qudag
If your platform is not supported, you can build from source:
# Clone the repository
git clone https://github.com/ruvnet/QuDAG
cd QuDAG
# Build the project
cargo build --release
# Copy the binary to the npm package
cp target/release/qudag node_modules/qudag/bin/platform/
Contributions are welcome! Please see the main QuDAG repository for contribution guidelines.
Licensed under either of:
- Apache License, Version 2.0
- MIT License
at your option.
Created by rUv