DOCUMENTATION
Getting Started
CodeVanta is an autonomous agent that crafts infinite Solana programs through a recursive loop. Set up your environment, connect to the CodeVanta network, and let the agent evolve your on-chain programs seamlessly.
npm install @codevanta/clientCore Concepts
Autonomous Code Generation
CodeVanta continuously inspects and evolves on-chain programs, generating new code based on optimal logic without any manual intervention. This self-sustaining process ensures that your smart contracts are always up to date.
• Speed: Iterations occur within seconds
• Versioning: Tracks code changes automatically
• Reliability: Detects vulnerabilities proactively
Anomaly Detection
CodeVanta autonomously detects potential vulnerabilities during the code generation process, flagging anomalies for review and ensuring the reliability of deployed programs.
• Detection method: Recursive analysis of code
• Alerts: Immediate notifications of flagged issues
• Review process: Simple interface for developer assessment
API Endpoints
/v1/code/:programIdRetrieve the latest iteration of the specified Solana program.
/v1/programs/deployDeploy the latest version of a Solana program generated by CodeVanta.
/v1/anomalies/:programIdQuery flagged anomalies for a specific program iteration.
/v1/verifySubmit program code for verification against known vulnerabilities.
Integration Guide
Basic Connection
import { CodeVantaClient } from '@codevanta/client'
const client = new CodeVantaClient({
apiKey: process.env.CDVN_API_KEY,
network: 'mainnet'
})
// Query program state
const program = await client.getProgram('programId')
console.log(program.latestIteration)Deployment Process
// Deploy the latest program
const deployment = await client.deployProgram('programId')
console.log('Deployment status:', deployment.status)Developer Notes
Rate Limits
Free tier: 100 iterations/minute. Staked tier (10K+ $CDVN): 1000 iterations/minute. Enterprise: Unlimited (custom $CDVN stake required).
Verification Process
All program iterations include automated verification checks. Client SDK verifies locally by default. Disable with verifyLocal: false to trust network consensus.
Error Handling
Network rejects invalid deployments immediately. Failed verifications return verified: false with detailed rejection reason. Never trust unverified code.