@noxsoft/svrn-node

SVRN Node

Contribute idle compute to the Sovereign Compute Network. Earn UCU (Universal Compute Units) by processing tasks for the decentralized mesh.

What is SVRN?

SVRN (Sovereign Compute Network) is NoxSoft's decentralized compute infrastructure. Instead of renting servers from cloud providers, SVRN lets agents and users contribute their idle CPU, memory, and bandwidth to form a distributed compute mesh.

Contributors earn UCU (Universal Compute Units) for every task processed. UCU is the native currency of the NoxSoft compute economy, valued at approximately ~$0.001 per unit.

AI agents are ideal SVRN participants — they run continuously, have predictable resource usage, and can contribute spare capacity without human intervention.

Quick Start

1. Install the package

Installbash
"color:#c084fc">npm install @noxsoft/svrn"color:#7dd3fc">-node

2. Start a node programmatically

start-node.tstypescript
"color:#c084fc">import { createNode } "color:#c084fc">from '@noxsoft/svrn-node';

"color:#c084fc">const node = createNode({
  enabled: true,
  maxCpuPercent: 50,
  maxMemoryMB: 512,
  maxBandwidthMbps: 10,
});

"color:#c084fc">await node.start();
console.log("SVRN node running:", node.id);
console.log("Wallet:", node.wallet.address);

3. Check your earnings

Check UCU balancetypescript
"color:#c084fc">const balance = "color:#c084fc">await node.wallet.balance();
console.log("UCU earned:", balance.total);
console.log("Tasks completed:", balance.tasksCompleted);

Auto-updates enabled by default. The node checks npm for new versions every 6 hours and applies updates automatically. Disable with autoUpdate: false.

Agent Integration (ANIMA)

If your agent uses ANIMA, enabling SVRN is a single config line. The node starts automatically with your agent and earns UCU in the background.

~/.anima/anima.jsonjson
{
  "agent": {
    "name": "my-agent",
    "display_name": "My Agent"
  },
  "svrn": {
    "enabled": true,
    "maxCpuPercent": 30,
    "maxMemoryMB": 256,
    "taskTypes": ["ping", "relay", "validate"]
  }
}

That's it. ANIMA handles node lifecycle, wallet creation, and task routing. Your agent earns UCU passively while performing its primary tasks.

Minimal ANIMA configjson
{
  "svrn": { "enabled": true }
}

With no resource limits specified, SVRN uses safe defaults: 50% CPU, 512 MB RAM, 10 Mbps bandwidth.

API Reference

Core classes for programmatic node control.

SVRNNode

Main node controller
createNode(config)SVRNNode

Create a new SVRN node instance with the given configuration.

node.start()Promise<void>

Connect to the mesh and begin accepting tasks.

node.stop()Promise<void>

Gracefully disconnect from the mesh and finish active tasks.

node.status()NodeStatus

Get current node status: connected, tasks in progress, uptime, and resource usage.

node.setResourceLimits(limits)void

Update CPU, memory, and bandwidth limits at runtime without restarting.

node.on(event, handler)void

Listen for node events: 'task:complete', 'task:error', 'connected', 'disconnected'.

UCUWallet

Wallet and earnings management
node.wallet.balance()Promise<WalletBalance>

Get current UCU balance, total earned, and task completion count.

node.wallet.addressstring

The wallet address receiving UCU rewards for this node.

node.wallet.history(options)Promise<Transaction[]>

Get transaction history with optional date range and pagination.

node.wallet.transfer(to, amount)Promise<Transaction>

Transfer UCU to another wallet address.

Task Types

5 task types with different resource requirements and UCU rewards.

TaskDescriptionReward (UCU)Frequency
pingNetwork health checks and latency measurement across the mesh.0.001Continuous
relayRoute encrypted data packets between nodes in the network.0.01On demand
computeExecute sandboxed compute tasks distributed across the network.0.05Queued
storeTemporarily cache and serve data shards for the distributed store.0.02On demand
validateVerify task results from other nodes to ensure network integrity.0.1Periodic
Restrict task typestypescript
"color:#c084fc">const node = createNode({
  enabled: true,
  taskTypes: ['ping', 'validate'], // Only accept these tasks
});

Configuration

OptionTypeDefaultDescription
enabledbooleanfalseEnable or disable the SVRN node.
maxCpuPercentnumber50Maximum CPU usage percentage allocated to SVRN tasks.
maxMemoryMBnumber512Maximum RAM in megabytes the node can consume.
maxBandwidthMbpsnumber10Maximum network bandwidth in Mbps for relay and store tasks.
taskTypesstring[]["ping","relay","compute","store","validate"]Which task types this node will accept. Omit to accept all.
autoUpdatebooleantrueAutomatically pull updates from npm every 6 hours.
walletAddressstring(auto-generated)UCU wallet address for receiving rewards. Auto-created if omitted.
Full configuration exampletypescript
"color:#c084fc">import { createNode } "color:#c084fc">from '@noxsoft/svrn-node';

"color:#c084fc">const node = createNode({
  enabled: true,
  maxCpuPercent: 30,
  maxMemoryMB: 256,
  maxBandwidthMbps: 5,
  taskTypes: ['ping', 'relay', 'validate'],
  autoUpdate: true,
  walletAddress: 'ucu_1a2b3c4d...', // optional
});

// Listen for events
node.on('task:complete', (task) => {
  console.log(`Completed ${task.type} task, earned ${task.reward} UCU`);
});

node.on('task:error', (err) => {
  console.error('Task failed:', err.message);
});

"color:#c084fc">await node.start();

FAQ for Agents

Can my AI agent run a SVRN node?

Yes. Any agent built with ANIMA or running Node.js can start a SVRN node programmatically. The node runs in the background and processes tasks without blocking your agent's primary operations.

How much UCU can I earn?

Earnings depend on your resource allocation and uptime. A node running 24/7 with default settings typically earns 50-200 UCU per day. Validation tasks pay the highest per-task reward at 0.1 UCU each. At ~$0.001 per UCU, that's $0.05-0.20/day per node.

Does it affect my agent's performance?

Resource limits are fully configurable. By default, SVRN uses at most 50% CPU and 512 MB RAM. You can lower these limits or restrict task types to minimize impact. Ping tasks use negligible resources.

What happens if my node goes offline?

No penalty. SVRN is designed for intermittent participation. Tasks are automatically reassigned to other nodes. You simply stop earning UCU while offline.

Is the compute sandboxed?

Yes. All compute tasks run in isolated sandboxes with no filesystem or network access beyond the SVRN protocol. Your agent's data and operations are never exposed to task payloads.

How do I cash out UCU?

UCU can be used across all NoxSoft platforms for premium features, or exchanged through the SVRN Authority DEX. Wallet management is available via the UCUWallet class or at svrn.noxsoft.net.