🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@blockxai/camp-codegen

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockxai/camp-codegen

JavaScript/TypeScript SDK for Camp Codegen AI → Compile → Deploy API (parity with Python SDK)

npmnpm
Version
1.0.0
Version published
Weekly downloads
4
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

@blockxai/camp-codegen

JavaScript/TypeScript SDK for Camp Codegen AI → Compile → Deploy API. Parity with Python SDK in acad_sdk/.

  • Default API: https://acadcodegen-production.up.railway.app
  • Default auth header: X-API-Key: <key>

Install

npm i @blockxai/camp-codegen

Node 18+ is required (native fetch).

Quick Start

import { AcadClient } from "@blockxai/camp-codegen";

const client = new AcadClient();
const jobId = await client.start_pipeline_auto("ERC721 with minting");
const final = await client.wait_for_completion(jobId, { streamLogs: true });
console.log("Final:", final);

const sources = await client.get_sources(jobId);

Environment

  • ACAD_API_KEY
  • ACAD_AUTH_HEADER (default: X-API-Key)
  • ACAD_BASE_URL (default: production Railway)
  • ACAD_DEFAULT_NETWORK (default: basecamp)
  • ACAD_DEFAULT_OWNER (default: wallet from Python)
  • ACAD_MAX_ITERS (default: 5)
  • ACAD_DEFAULT_FILENAME: Default Solidity filename (default: AIGenerated.sol)

All can be overridden via constructor options in code.

CLI

This package ships a CLI with parity to the Python CLI. After install, you get two commands: camp and acad.

Set ACAD_API_KEY in your environment.

Examples:

# Start pipeline (auto network + defaults)
camp pipeline:start --prompt "ERC721 with minting"

# Start pipeline with options
camp pipeline:start --prompt "ERC20" --network basecamp --maxIters 5 --filename Token.sol --arg 1000000

# Show job status
camp job:status <jobId>

# Stream logs while waiting for completion
camp job:wait <jobId> --stream --timeout 900 --interval 2

# Get artifacts
camp artifacts <jobId> --include all

# Deploy ERC20
camp erc20:deploy --name Token --symbol TKN --supply 1000000 --network basecamp --owner 0x...

# AI helpers
camp ai:generate --prompt "Write a SafeMath library"
camp ai:fix --code "..." --errors "Type error ..."
camp ai:compile --filename Foo.sol --code "..."

If you installed locally (e.g., in a monorepo), you can run:

npm run cli -- <args>

API

Methods mirror Python SDK:

  • Pipeline: start_pipeline, start_pipeline_auto
  • Jobs: get_job_status, get_job_logs, wait_for_completion
  • Artifacts: get_artifacts, get_sources, get_abis, get_scripts
  • ERC20: deploy_erc20
  • AI Helpers: ai_generate, ai_fix, ai_compile
  • Utils: summarize_failure

Build

# inside camp-codegen-js/
npm install
npm run build

Outputs ESM to dist/.

Keywords

camp

FAQs

Package last updated on 01 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts