to query the program examples in natural language and for help with debugging.
- basic-operations/anchor - Anchor program with Rust and TypeScript tests
- basic-operations/native-rust - Native Solana program with light-sdk and Rust tests.
Basic Operations include:
- create - Initialize a new compressed account.
- update - Modify data in an existing compressed account.
- close - Clear account data and preserve its address.
- reinit - Reinitialize a closed account with the same address.
- burn - Permanently delete a compressed account.
Full compressed account lifecycle (create, increment, decrement, reset, close):
- counter/anchor - Anchor program with Rust and TypeScript tests
- counter/native - Native Solana program with light-sdk and Rust tests.
- counter/pinocchio - Pinocchio program with light-sdk-pinocchio and Rust tests.
- create-and-update - Create a new compressed account and update an existing compressed account with a single validity proof in one instruction.
- read-only - Create a new compressed account and read it onchain.
- account-comparison - Compare compressed vs regular Solana accounts.
- zk-id - A minimal zk id Solana program that uses zero-knowledge proofs for identity verification with compressed accounts.
light-sdk- Core SDK for compressed accounts in native and anchor programslight-sdk-pinocchioCore SDK for compressed accounts in pinocchio programslight-hasher- Hashing utilities for ZK compressionlight-client- RPC client and indexer for interacting with compressed accountslight-program-test- Testing utilities for compressed programs.
@lightprotocol/[email protected]- Client library for interacting with compressed accounts@lightprotocol/[email protected]- Command-line tools for ZK compression development
Required versions:
- Rust: 1.90.0 or later
- Solana CLI: 2.3.11
- Anchor CLI: 0.31.1
- Zk compression CLI: 0.27.1-alpha.2 or later
- Node.js: 23.5.0 or later
Install the Light CLI:
$ npm -g i @lightprotocol/[email protected]Install Solana CLI:
sh -c "$(curl -sSfL https://release.solana.com/v2.3.11/install)"Install Anchor CLI:
cargo install --git https://github.com/coral-xyz/anchor avm --force
avm install latest
avm use 0.31.1- install the light cli
$ npm -g i @lightprotocol/[email protected]- instantiate a template Solana program with compressed accounts
$ light init <project-name>