Intro to Development
Welcome! This guide has everything you need to know to start developing with ZK Compression on Solana.
Last updated
Was this helpful?
Welcome! This guide has everything you need to know to start developing with ZK Compression on Solana.
Last updated
Was this helpful?
Development with ZK Compression on Solana consists of two main parts:
The is the glue between clients and on-chain programs. It extends Solana's with additional endpoints for interacting with ZK compressed accounts. You can view the complete list of supported endpoints .
The following TypeScript and Rust SDKs are used to interact with ZK Compression:
TypeScript
SDK to interact with compression programs via the ZK Compression RPC API
TypeScript
SDK to interact with the compressed token program
Rust
Rust client
You need an RPC connection to interact with the network. You can either work with an RPC infrastructure provider that supports ZK Compression or run your own RPC Node.
You can write custom programs using ZK compression in Anchor or native Rust.
The system program. It enforces the compressed account layout with ownership and sum checks and verifies the validity of your input state
It is also invoked to create/write to compressed accounts and PDAs
A compressed token implementation built on top of ZK Compression. It enforces a SPL-compatible token layout and allows for arbitrary compression/decompression between this and the SPL standard
Implements state and address trees. It is used by the Light System program
While you get started building with ZK Compression, use these GitHub resources available to help accelerate your journey:
ZK Compression is available on Localnet using light test-validator
, Devnet, and Mainnet-Beta.
For the best support, head to the:
Remember to include as much detail as possible in your question, and please use text (not screenshots) to show error messages so other people with the same problem can find your question!
The ZK Compression primitive is the core of . To leverage ZK Compression, your custom program invokes the Light system program via Cross-Program Invocation (CPI).
First, ensure your development environment has installed Rust, the Solana CLI, and Anchor. If you haven't installed them, refer to this .
We provide tooling for testing your on-chain program on a local Solana cluster. The light test-validator
command, available with the , automatically initializes a local Solana cluster with the compression programs, all necessary system accounts, and syscalls activated. By default, it also starts a local Photon RPC instance and Prover node.
for Solana-specific questions
for program and client-related questions
for RPC-related questions
You're now ready to start building with ZK Compression! Head to the section, or !