Skip to main content

Environment Setup

This guide walks you through setting up your development environment for deploying and testing Confidential SPL tokens on Solana devnet.

Prerequisites

Before you begin, make sure you have the following installed:
ToolVersionInstallation
RustLatest stablecurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Solana CLI1.18+sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
Anchor0.31.1cargo install --git https://github.com/coral-xyz/anchor avm && avm install 0.31.1
Node.js18+nvm install 18
YarnLatestnpm install -g yarn

Configure Solana for Devnet

Environment Variables

Create a .env file in your project root:

Project Setup

Anchor.toml Configuration

You only need to add your own program ID here. The Inco Lightning program ID is handled internally by the inco-lightning crate via the INCO_LIGHTNING_ID constant.

Cargo.toml (Workspace)

Cargo.toml (Program)

Located at programs/inco-token/Cargo.toml:

package.json

Build and Deploy

After deploying, make sure to update the declare_id! macro in your lib.rs with the actual deployed program ID.

Next Steps

Once your environment is set up, you can start using the Program Functions to create and manage confidential tokens.