zkArb-sdk

zkarb-sdk

Write Circom. Compile. Deploy. Verify — all in just one click, Powered by Arbitrum

A zero-setup toolkit to build, deploy, and verify ZK circuits using Circom — with no Web3 knowledge required.


Index

Welcome to the zkArb SDK documentation.
Use the links below to navigate through different sections of the SDK documentation.

📦 SDK Artifacts & Build System

🖥️ CLI Documentation

🌐 Platform & Compatibility

🧪 Examples & Testing

🗂️ Repository Structure


💡 Tip

If you’re new to the SDK, start with Repository LayoutCLI OutlineExamples for the smoothest onboarding experience.

✨ Features

📦 Installation

Install in your project:

npm install zkarb-sdk

⚡️ Usage

✅ Compile Circom circuit

npx zkarb-sdk compile <path-to-your-circom-file>

This command:

✅ Test Compiled Circom Circuit

npx zkarb-sdk test <path-to-generated-folder> <path-to-input.json>

This command:

✅ Deploy Compiled Circom Circuit

npx zkarb-sdk deploy <path-to-generated-folder> <PRIVATE_KEY> \
  [--optimized] \
  [--network one|nova|sepolia|orbit] \
  [--rpc <custom-rpc-url>] \
  [--bridge-l1]

This command:

✅ Verify ZK Proof Programmatically

You can verify a proof directly using a single function call.

 const { verifyProof } = require("zkarb-sdk");

const result = await verifyProof({
  input: {
    // Your circuit input goes here
  },
  "<relative-path-to-generated-folder>",
});

console.log(result ? "✅ Valid proof" : "❌ Invalid proof");

✅ Verify ZK Proof Programmatically & Send the message to L1, that Proof is verified

You can verify a proof directly using a single function call, and send that proof to L1. Note : For using VerifyAndEmit function, developer must use deploy command with the option “–bridge-l1”

const { verifyAndEmit } = require("zkarb-sdk");

const result = await verifyAndEmit({
  input: {
    //your circuit input goes here
  },
  "<relative-path-to-generated-folder>", //folder containing artifacts generated during compile process
  "private-key>" //for bridging zk proof from l2 to l1
});

console.log(result ? "Valid proof" : "Invalid Proof");

You don’t need to manually use snarkjs or interact with web3 directly — the SDK abstracts it all for you.

🛠 Commands Overview

Command Description
npx zkarb-sdk compile Compiles the .circom file and runs Groth16 setup
npx zkarb-sdk test Tests the Circom logic locally using ZK Proofs
npx zkarb-sdk deploy [--optimized] [--network one,nova,sepolia,orbit] [--rpc ] [--bridge-l1] Deploys the verifier contract to Arbitrum, according to options choosed
verifyProof(input,”") *(programmatic only)* Generates proof and verifies it on-chain using deployed contract