| Creation | Regular PDA Account | Compressed PDA |
|---|---|---|
| 100-byte PDA | ~1,600,000 lamports | 15,000 lamports |
Use Compressed PDAs to store app and user state or other accounts that are infrequently accessed.
Do not use for shared state, pool accounts, or config accounts.
- Create
- Update
- Close
- Reinitialize
- Burn


Start Building with the Program Template
Prerequisites
Required versions:
- Rust: 1.86.0 or later
- Solana CLI: 2.2.15
- Anchor CLI: 0.31.1
- Zk compression CLI: 0.27.0 or later
- Node.js: 23.5.0 or later
- npm
- yarn
- pnpm
Initialize your Program
Instantiate a template Solana program with compressed accounts with all required dependencies.The
light init command creates only Anchor-based projects . For Pinocchio programs, manually configure dependencies using light-sdk-pinocchio.Dependencies
Dependencies
Rust Crates
light-sdk- Core SDK for compressed accounts in native and anchor programslight-sdk-pinocchioCore SDK for compressed accounts in pinocchio programslight-client- RPC client and indexer for interacting with compressed accountslight-program-test- Testing utilities for compressed programs.
@lightprotocol/stateless.js- Client library for interacting with compressed accounts@lightprotocol/zk-compression-cli- Command-line tools for ZK compression development
Common Errors
assert.h file not found - during compilation.
assert.h file not found - during compilation.
Guides
| Create | Initialize compressed PDAs in your program |
| Update | Modify state in compressed accounts |
| Close | Reclaim lamports from compressed accounts |
| Reinitialize | Reset and reuse compressed accounts |
| Burn | Permanently delete compressed accounts |
| Nullifier PDAs | Prevent replay attacks with one-time use accounts |
Program Examples
| Example | Description |
|---|---|
| Account Comparison | Compare compressed accounts with standard Solana accounts |
| basic-operations/anchor | Anchor programs to create, update, close, reinitialize and burn compressed accounts with Rust and TypeScript tests |
| basic-operations/native | Native Solana program implementation to create, update, close, reinitialize and burn compressed accounts with Rust tests |
| Counter (Anchor) | Full compressed account lifecycle (create, increment, decrement, reset, close) using Anchor framework |
| Counter (Native) | Native Solana program implementation with Rust tests |
| Counter (Pinocchio) | Pinocchio implementation using light-sdk-pinocchio with Rust tests |
| Create-and-Update | Create new compressed accounts and update existing ones within a single instruction and one validity proof |
| merkle-distributor | SPL token distribution with compressed PDAs for claim tracking, vesting, and clawback |
| Nullifier Program | System for payments, AI agents and more to prevent your onchain instruction from being executed more than once |
| Read-Only | Create compressed accounts and read them on-chain |
| simple-claim | Distributes compressed tokens that decompress to SPL on claim |
| ZK-ID | Zero-knowledge proofs for identity verification with compressed accounts |
| ZK-Nullifier | Implementation of nullifiers for zk programs on Solana to prevent double spending |
SDK Reference
Client
@lightprotocol/stateless.js
TypeScript RPC client for compressed accounts, validity proofs, and address derivation.
light-client
Rust RPC client and indexer for compressed accounts.
Program
light-sdk
Core SDK for compressed accounts in Anchor programs.
light-sdk-macros
Procedural macros for LightAccount derivation.
light-program-test
Local testing framework for programs.







