Skip to main content
Let’s see how to deploy an app on an example of a simple addition program using the Silvana framework. The program showcases the integration between Sui Move contracts, TypeScript agents, and Mina zkApps.

Prerequisites

Before starting, make sure you have these tools installed:
  1. Node.js and npm
  1. Sui CLI
Follow the installation instructions at Sui Documentation.
  1. Docker
  • Download from Docker Desktop
  • Ensure Docker is running before proceeding
  1. Silvana CLI

Getting Started

Step 1: Create a New Project

Use the Silvana CLI to create a new project from the template:
This command will:
  • Download the project template;
  • Generate Sui and Mina keypairs for both user and Coordinator;
  • Automatically fund all accounts from testnets;
  • Fetch devnet configuration;
  • Create a Silvana registry on-chain;
  • Store the agent’s private key in secure storage;
  • Generate environment files with all necessary configuration.

Step 2: Navigate to Your Project

Run this command:
Your project structure will look like this:

Step 3: Build and Deploy Move Contract

Navigate to the move directory and deploy your smart contract:
After publishing, you’ll see output containing the PackageID, like:
Copy this PackageID and add it to your agent/.env file: APP_PACKAGE_ID=0xf238cb13361d361c6324e069b99a2ebccbd69c3ac703b25c2f0ee41e7924736b

Step 4: Build and Compile the Agent

Navigate to the agent directory and set up the TypeScript agent:
The npm run compile command needs to be run twice to create a complete set of zk prover keys for the Mina zkApp.

Step 5: Verify Account Funding

The setup process automatically funded your accounts, but you can verify the balances:
You should see positive balances. Otherwise, you can manually request funds using silvana faucet command.

Step 6: Deploy the Application

Deploy your application to both Mina and Sui blockchains:
This command will:
  • Deploy the Mina zkApp contract;
  • Create the application on the Sui blockchain;
  • Register the app in the Silvana registry;
  • Generate the app instance configuration.
You should see an output of this type:
The deployment will automatically save the configuration to .env.app file with:
  • App ID: the unique identifier for your application;
  • App instance ID: the specific instance of your deployed app;
  • Mina contract address: the deployed zkApp address on Mina;
  • Registry information: connection to the Silvana registry.

Step 7: Start the Silvana Coordinator

Open a new terminal window and navigate to the silvana folder:
To ensure proper process management, use a regular system terminal for this step, not an integrated terminal in your IDE.
The Coordinator will:
  • Connect to the Sui blockchain;
  • Monitor for incoming jobs;
  • Coordinate execution between the agent and blockchain;
  • Handle settlement and verification.
You should see the Coordinator starting up and waiting for jobs. Keep this terminal running. The Coordinator performs the following initialization steps:
  1. Configuration Loading: fetches devnet configuration from the API server and injects environment variables.
  2. Sui Connection: connects to the Sui blockchain API endpoint.
  3. Balance Check: verifies sufficient SUI balance for operations.
  4. Gas Coin Pool: initializes a pool of gas coins by splitting large coins for better transaction performance.
  5. Service Startup: starts multiple background services:
    • Job Searcher: monitors for new jobs on the blockchain;
    • Multicall Processor: batches multiple operations for efficiency;
    • Docker Buffer Processor: manages Docker container execution;
    • Event Monitor: watches blockchain events;
    • API Server: provides API for agent communication;
    • Periodic Tasks: runs reconciliation, block creation, and proof analysis.
Once running, the Coordinator will:
  • Detect new jobs created on the blockchain;
  • Launch Docker containers to execute agent code;
  • Process job results and update blockchain state;
  • andle proof generation and settlement.
You’ll see logs like:

Step 8: Send Test Transactions

With the Coordinator running, open another terminal and navigate to the agent directory to send test transactions:
This command runs a batch test that sends multiple transactions to your deployed application. You’ll see output like:
The batch test:
  • Sends multiple addition requests to the Sui blockchain;
  • Each transaction creates a job that the Coordinator detects;
  • The Coordinator launches Docker containers to process each job;
  • Results are computed, proven with zkSNARKs, and settled on-chain.
Congratulations! Your first Silvana app is now up and running!
You’ve successfully:
  • βœ… Created a new Silvana project with the automated setup;
  • βœ… Deployed a Move smart contract on Sui;
  • βœ… Built and compiled a TypeScript agent with zkSNARK circuits;
  • βœ… Deployed a Mina zkApp for proof verification;
  • βœ… Started the Silvana Coordinator to orchestrate execution;
  • βœ… Sent transactions that trigger distributed computation.
Your application is now processing addition operations across multiple blockchains:
  • Sui handles job creation, proving orchestration and optimistic state calculations;
  • Docker containers execute the computation securely;
  • Mina verifies zero-knowledge proofs of correct execution;
  • Silvana coordinates the entire workflow.

Running Agent on Silvana Devnet

Instead of running your own Coordinator, you can deploy your application to the Silvana devnet, where it will be processed by the shared Silvana infrastructure.

Option 1: Deploy to Shared Silvana Devnet

To use the shared Silvana devnet registry:
  1. Get the devnet registry ID:
Look for:
  1. Update your agent configuration to use the shared registry:
  1. Register your app in the shared registry using Silvana registry commands:
Your jobs will now be processed by the Silvana devnet infrastructure - no need to run your own Coordinator!

Option 2: Join as a Devnet Operator

To contribute computing power to the Silvana devnet:
  1. Configure your Coordinator to use the shared registry:
  1. Start your Coordinator:
Your Coordinator will now process jobs from all applications registered in the shared devnet registry.

Amending the Code

When you want to modify the application logic and deploy your own version:

Step 1: Modify the Circuit Logic

Edit agent/src/circuit.ts to implement your custom computation logic. This file contains the zkSNARK circuit that defines what computation will be proven and verified.

Step 2: Configure Docker Hub

Before building and pushing your Docker image, configure your Docker Hub credentials in agent/.env:
To get a Docker Access Token, follow these steps:
  1. Log in to Docker Hub.
  2. Go to Account Settings β†’ Security.
  3. Create a New Access Token.
  4. Copy the token to DOCKER_ACCESS_TOKEN.

Step 3: Build and Deploy

After making your changes, rebuild and deploy your agent:
This process:
  • Builds your modified TypeScript code;
  • Compiles the zkSNARK circuits to generate prover/verifier keys;
  • Creates a Docker image containing your agent code and prover keys;
  • Pushes the image to Docker Hub under your account.

Step 4: Update Your App Configuration

After pushing your new Docker image, update your app to use it:
  1. Note your new Docker image URL: docker.io/your-username/your-image-name:latest.
  2. Update your app configuration to reference this new image.
  3. Redeploy your app with npm run deploy.
The compiled prover keys are large (can be several GB) and are included in the Docker image. Therefore, the docker image can be large, too.
You should use a public Docker repository to ensure that the Coordinator will be able to pull the image.

Troubleshooting

In the table below, see typical issues you may encounter and how you can handle them:

Silvana CLI

Run silvana help to see all available commands: