TypeScript SDK now available — run free Solidity security audits from Node.js

typescript dev.to

Following up on the Nexus Gateway launch, the TypeScript SDK is now live on npm.

Install

npm install nexus-gateway-sdk
Enter fullscreen mode Exit fullscreen mode

Free Solidity Security Audit — 3 Lines

import { NexusClient } from "nexus-gateway-sdk";

const client = new NexusClient({ clientId: "my-app" });

const result = await client.dryRun({
  source_code: "pragma solidity ^0.8.20; contract Token { }"
});
Enter fullscreen mode Exit fullscreen mode

The audit returns:

  • 7 breach scenarios — Unauthorized Minting, Transfer Violation, Fund Drain, Emergency Freeze, Ownership Renounce, Reentrancy Attack, Replay Attack
  • Risk levels per scenario (low / medium / high / critical)
  • Overall risk assessment with deployable check
  • Digital Twin v3.1 matrix — clause-to-code mapping with breach conditions
  • Nonce & replay defense check
  • Recommendations for fixing issues

Latency: ~2ms. SLA: <500ms. No signup or API key needed for the free dry-run.

LangChain.js + Vercel AI SDK Integration

The SDK ships with native tool wrappers for AI agent frameworks:

import { createNexusTools, createNexusVercelTools } from "nexus-gateway-sdk";

// LangChain.js tools
const langchainTools = createNexusTools({ clientId: "my-agent" });

// Vercel AI SDK tools
const vercelTools = createNexusVercelTools({ clientId: "my-agent" });
Enter fullscreen mode Exit fullscreen mode

Each wrapper returns tool objects compatible with their respective frameworks — just pass them to your agent and it can call the Nexus Gateway services directly.

Try It Without Installing

Visit the interactive playground — paste Solidity code in your browser, click "Run Security Audit", and get instant results with visual risk badges:

👉 https://xibzsthfrbomefnvbicb.supabase.co/functions/v1/landing

Three example contracts are pre-loaded: ERC-20 token, Vulnerable Vault, and Escrow — click to load and audit them instantly.

Paid Services

Beyond the free dry-run, the gateway offers:

Service Cost What you get
Structured Data 20 CRED ($0.20) Verified JSON schemas for Web3/compliance
Code Modules 120 CRED ($1.20) Audited Solidity smart contracts (ERC-20, ERC-721, Escrow)
Legal-Code Hybrid 29,900 CRED ($299) Bilingual EN/ID legal contracts + Digital Twin v3.1 mapping

Payment via USDC pull payment (EIP-712) on Polygon PoS — 1 USDC = 100 CRED.

Links

Source: dev.to

arrow_back Back to Tutorials