CA:
9FpoqFaowv1JNJq9xXuQxoXcSnKTWJD1J2xVVe2ZpumpDocumentation
Technical reference for the NodevaLM protocol
Introduction
NodevaLM is a decentralized AI inference protocol built on Solana. It enables developers to deploy, run, and monetize large language models with zero-knowledge privacy guarantees. The protocol consists of three core layers: - Inference Layer: Distributed GPU nodes running NVIDIA NIM - Settlement Layer: Solana smart contracts for payments and verification - Privacy Layer: ZK circuits for private computation proofs
Quick Start
Install the NodevaLM SDK:
$ npm install @nodevalm/sdk
Initialize a client:
import { NodevaLM } from '@nodevalm/sdk';
const client = new NodevaLM({
network: 'mainnet-beta',
wallet: yourSolanaWallet
});
const response = await client.inference({
model: 'nodevalm-7b',
prompt: 'Explain zero-knowledge proofs',
maxTokens: 256
});Architecture
NodevaLM uses a modular architecture designed for horizontal scaling: INFERENCE ROUTER Routes requests to optimal nodes based on latency, load, and cost. Implements weighted round-robin with health checks. NODE REGISTRY On-chain registry of active inference nodes with staking requirements and performance metrics. PAYMENT STREAM Implements x402 protocol for micropayments. Supports both prepaid credits and real-time streaming. ZK VERIFIER Verifies computation proofs on-chain. Uses Groth16 for efficient verification.
API Reference
POST /v1/inference
Submit an inference request.
Request body:
{
"model": "nodevalm-7b",
"prompt": "string",
"max_tokens": 256,
"temperature": 0.7,
"private": false
}
Response:
{
"id": "inf_abc123",
"model": "nodevalm-7b",
"output": "string",
"usage": {
"prompt_tokens": 12,
"completion_tokens": 256
},
"proof": "0x..." // if private=true
}ZK Privacy
NodevaLM supports private inference using zero-knowledge proofs. When enabled, your prompts and outputs remain encrypted while still being verifiable.
Enable private mode:
const response = await client.inference({
model: 'nodevalm-7b',
prompt: 'sensitive query',
private: true
});
// Response includes ZK proof
console.log(response.proof);
// Verify proof on-chain
await client.verifyProof(response.proof);
Proof generation adds ~2.4 seconds overhead but provides cryptographic privacy guarantees.