create-zkarb-app
v0.1.1
Published
Scaffold a zkArb starter project
Downloads
217
Readme
zkArb – Getting Started
This guide walks you through creating, compiling, testing, and deploying a zk circuit using zkArb.
zkArb provides:
- A project scaffold for rapid setup
- A CLI-first SDK for compiling, testing, and deploying zkSNARK verifiers on Arbitrum and Orbit chains
1. Create a New zkArb Project
Generate a new zkArb project using the official scaffold tool:
npx create-zkarb-app my-zk-app
cd my-zk-appThis command:
- Creates a ready-to-use project folder
- Installs
zkarb-sdkautomatically - Includes a sample Circom circuit and test input
2. Project Structure
After scaffolding, your project will look like this:
my-zk-app/
├── circuits/
│ └── simple.circom
├── inputs/
│ └── input.json
├── package.json
├── README.md
└── .gitignore
What each folder does
circuits/
Contains your Circom circuits
inputs/
JSON inputs used for generating and verifying proofs
package.json
Preconfigured scripts for local development
3. Compile the Circuit (Offline)
Compile the Circom circuit and generate all zk artifacts locally:
npm run compileThis command:
- Compiles the Circom circuit
- Generates
.r1cs,.wasm, and verifier artifacts - Runs fully offline
4. Test the Circuit (Offline Verification)
Run proof generation and verification locally:
npm run testThis command:
- Generates a zk proof using the provided input
- Verifies the proof locally
- Confirms circuit correctness before deployment
Note: No network connection or blockchain interaction is required for compile or test.
5. Deploy the Verifier On-Chain
Deployment is performed using the official zkarb-sdk CLI.
This design is intentional:
- Deployment parameters vary by network
- Advanced options (optimization, bridging) are explicit
- Developers retain full control
Basic Deployment
Command format:
npx zkarb-sdk deploy <compiled-folder> <privateKey>Example:
npx zkarb-sdk deploy ./simple 0xYOUR_PRIVATE_KEYDeployment Options
--network
Target network: one, nova, sepolia, orbit (default: one)--rpc
Custom RPC endpoint (Orbit or local chains)--optimized
Enable verifier optimization and deploy wrapper contract--bridge-l1
Enable cross-chain deployment (deploy verifier on L2 + receiver on L1 and configure relayer)
Deployment Examples
Deploy to Arbitrum Sepolia:
npx zkarb-sdk deploy ./circuits/simple --network sepolia
Deploy to a custom Orbit chain:
npx zkarb-sdk deploy ./circuits/simple --network orbit --rpc https://your-orbit-rpc
Deploy with optimization enabled:
npx zkarb-sdk deploy ./circuits/simple --optimized
Cross-chain (L2 → L1) deployment:
npx zkarb-sdk deploy ./circuits/simple --bridge-l1
6. Recommended Workflow
- Write circuit in
circuits/ - Add input in
inputs/ - Run
npm run compile - Run
npm run test - Deploy using
npx zkarb-sdk deploy
This separation ensures:
- Deterministic local testing
- Safe on-chain deployment
- Clear mental model for developers
7. Why zkArb Is CLI-First
zkArb intentionally avoids hidden configuration files or implicit behavior.
- All network choices are explicit
- All deployment logic is transparent
- Works equally well in CI, scripts, and browsers
This makes zkArb suitable for:
- Production dApps
- Hackathons
- Infrastructure tooling
- zkPlayground-style environments
8. Next Steps
- Replace
simple.circomwith your own circuit - Add new inputs under
inputs/ - Deploy to Arbitrum or Orbit networks
- Explore advanced features like optimized verifiers and cross-chain bridging
Support & Resources
- GitHub: add your repository link
- zkArb SDK (npm): add npm link
- zkPlayground: https://zkArb.dev (coming soon)
Note: Compile and test are local operations. Deployment is always explicit and network-aware.
