What is WooSDK?
WooSDK is an open-source framework for developers who want to launch Layer 3 networks on top of Aleo. It removes the infrastructure heavy-lifting by packaging five tightly integrated components into a single repository that can be bootstrapped with Docker or configured manually for production.
A WooSDK chain is anchored to Aleo L1 via a genesis contract, sequences transactions locally, proves them with Zero-Knowledge Proofs, and exposes an EVM-style RPC for wallet and dApp integrations.
SDK Component Map
| Component | Language | Role |
|---|---|---|
| Genesis Contract | Leo | Anchors batches, staking, bridge on Aleo L1 |
| L3 Node | Node.js / TypeScript | Sequencer, local L3 state, RPC |
| ZK Prover | Rust | Zero-Knowledge Proof generation & verification |
| CLI | Node.js | Deploy chains, mint tokens, bridge |
| Woo Wallet | Node.js / Web | User interface: transfers, DEX, RPC, deploy |
Requirements
Before installing WooSDK, make sure the following runtimes are available in your environment:
- Node.js v18 or later — nodejs.org
- Rust v1.70 or later — rustup.rs
- Leo v2.0.0 or later — developer.aleo.org/leo
leo executable is on your system PATH so the CLI can call it during deployment.
For Docker-based setup, only Docker and Docker Compose are required — all runtimes are bundled in the container images.
Genesis Contract (L1)
The Genesis Contract is a Leo smart contract deployed to Aleo L1. It is the on-chain anchor for your entire L3 network and handles three main responsibilities:
Batch anchoring
After the ZK Prover generates a proof for a batch of L3 transactions, the genesis contract receives and records that proof on L1, establishing finality.
Staking management
The genesis contract holds the logic for sequencer staking, allowing you to add economic security to your L3 over time.
Bridge vault
The contract acts as the vault for the L1→L3 bridge. When users call bridge_in, funds are locked in the vault on L1 and minted as Wrapped Aleo on L3. The sequencer address and vault address are the same entity for now — this will be decoupled in a future update.
L3 Node (Sequencer)
The L3 Node is the local chain runtime. Written in TypeScript, it does the following:
- Receives transactions from the wallet or any RPC-compatible client
- Orders transactions into batches
- Maintains the current L3 state (account balances, contract storage)
- Hands batches off to the ZK Prover
- Exposes an RPC endpoint for wallet and dApp integration
Start the RPC server from the root directory:
npx tsx src/rpc.ts
ZK Prover
The ZK Prover is a Rust binary that generates and verifies Zero-Knowledge Proofs for L3 transaction batches. It runs as a sidecar to the L3 node.
Build
cargo build
Run in production
cargo run --release
sed -i 's|CMD \["./zk-prover"\]|CMD ["./zk_prover"]|g' ~/woosdk/zk-prover/DockerfileThen force a rebuild:
docker compose build zk_prover --no-cache && docker compose up -d --force-recreate
CLI
The CLI (cli.mjs) is the primary tool for network operations. It wraps Leo contract deployment, token minting, and bridge calls into ergonomic subcommands.
full — deploy a new network
node cli.mjs full \ --chain-id 888 \ --gas-token-id 1 \ --sequencer <SEQUENCER_ADDRESS>
This deploys the genesis contract, mints the initial gas supply, and activates the network. The sequencer address becomes the bridge vault.
bridge-in — deposit from L1
node cli.mjs bridge-in \ --chain-id 888 \ --token-id 0 \ --amount 1000 \ --receiver aleo1YOUR_ADDRESS_HERE
Woo Wallet
A web-based wallet built for L3 interactions. It connects to your L3 node's RPC endpoint and supports:
- Custom RPC — point it at any WooSDK L3 node
- Token transfers — send any L3 token between addresses
- DEX — add liquidity pools (X/Y token pairs) and execute swaps
- Contract deployment — deploy and interact with L3 contracts from the browser
- Test token minting — deploy test tokens and call mint during development
Start the wallet
npm run dev
wanpedleo must be deployed before the wallet's DEX and bridge features function correctly. Both contracts are in the /aleo programs folder.
Installation
Option A — Docker (fastest)
git clone https://github.com/riquelima805/woosdk.git cd woosdk docker compose up --build
Option B — Manual
git clone https://github.com/riquelima805/woosdk.git cd woosdk npm install
cd woo-wallet npm install
cd ../zk-prover cargo build
Deploy a Network
Add your Aleo private key to the .env file in the root folder. You need Testnet credits — get them at faucet.aleo.org.
node cli.mjs full \ --chain-id 888 \ --gas-token-id 1 \ --sequencer <SEQUENCER_ADDRESS>
Then start all three services in separate terminals as described in the Quick Start — RPC, ZK Prover, and Wallet.
.env.test before deploying. The chain-id in the CLI command must match the one in your environment config.
Bridge (L1 to L3)
WooSDK supports depositing Aleo Testnet credits from L1 into your L3, producing Wrapped Aleo on L3.
Via CLI
node cli.mjs bridge-in \ --chain-id 1988 \ --token-id 0 \ --amount 1000 \ --receiver aleo1YOUR_ADDRESS_HERE
Via Leo execute
Run directly from the templates folder inside your genesis contract:
leo execute bridge_in \ 2011u64 1u64 5000000u64 \ <L1_RECEIVER_ADDRESS> \ <VAULT_ADDRESS> \ --broadcast \ --network testnet \ --endpoint "https://api.explorer.aleo.org/v1/testnet3" \ --private-key "YOUR_PRIVATE_KEY"
Testing Features
Tokens and DeFi
In the Woo Wallet, you can deploy test tokens and call their mint function to create supply. In the DeFi section, add two tokens (X and Y), deposit them, and call the liquidity function to create a pool. The current vault supports up to two tokens at a time.
Running services (quick reference)
docker compose up -d
docker compose logs -f node1
docker compose ps
Troubleshooting
The Dockerfile references ./zk-prover (hyphen) but the binary is built as ./zk_prover (underscore). Fix with:
sed -i 's|CMD \["./zk-prover"\]|CMD ["./zk_prover"]|g' ~/woosdk/zk-prover/Dockerfile docker compose build zk_prover --no-cache docker compose up -d --force-recreate
The DeFi contract and wanpedleo must be deployed before the wallet can interact with those features. Both contracts are in /aleo programs. Deploy them with Leo and ensure the addresses are correctly referenced in the wallet config.
Verify that the vault address in your bridge command matches the sequencer address set during network deployment. Also confirm the RPC node is running and connected to the correct chain ID.
Check that the leo binary is on your PATH (which leo should return a result). You need Leo v2.0.0 or later. Also confirm your private key in .env has Testnet credits from faucet.aleo.org.
Run docker compose logs -f node1 immediately after starting to capture the exit reason. The most common causes are a missing or invalid private key in .env.test, or a chain-id mismatch between the deploy command and the environment config.
Development Notes
WooSDK is under active development. The following known limitations will be addressed in future releases:
- The bridge currently accepts any address as a vault. This will be restricted in a future update so only the registered sequencer can act as vault.
- The RPC currently counts balances only for data provided by the owner as Vault. Multi-source accounting is planned.
- L3 authentication (Auth layer) is still under development. Authorization checks on L3 are not yet enforced.
Contributions are welcome. See the GitHub repository for open issues and the roadmap.