Skip to main content
CreationRegular SPL TokenCompressed TokenCost Reduction
100 Token Accounts~ 0.2 SOL~ 0.00004 SOL5000x
Compressed token accounts store information about an individual’s ownership of a specific token (mint). Different from regular token accounts, they don’t require an Associated Token Account (ATA) per token holder. For example, this simplifies token distribution, since you don’t need to allocate a token account per recipient. Compressed Tokens at a Glance

Rent-free tokens

Create token accounts without upfront rent exempt balance.

SPL Compatibility

Compatible with SPL tokens and Solana programs.

Wallet Support

Supported by leading wallets including Phantom and Backpack.

Start building

Developing with compressed tokens works similar SPL tokens and involves minimal setup:
1
Install dependencies
npm install --save-dev typescript tsx @types/node && \
npm install --save \
    @lightprotocol/stateless.js \
    @lightprotocol/compressed-token \
    @solana/web3.js \
    @solana/spl-token
2
Set up your developer environment
By default, all guides use Localnet.
# Install the development CLI
npm install @lightprotocol/zk-compression-cli
# Start a local test validator
light test-validator

## ensure you have the Solana CLI accessible in your system PATH
// createRpc() defaults to local test validator endpoints
import {
  Rpc,
  createRpc,
} from "@lightprotocol/stateless.js";

const connection: Rpc = createRpc();

async function main() {
  let slot = await connection.getSlot();
  console.log(slot);

  let health = await connection.getIndexerHealth(slot);
  console.log(health);
  // "Ok"
}

main();
Alternative: Using DevnetReplace <your-api-key> with your actual API key. Get your API key here, if you don’t have one yet.
import { createRpc } from "@lightprotocol/stateless.js";

// Helius exposes Solana and Photon RPC endpoints through a single URL
const RPC_ENDPOINT = "https://devnet.helius-rpc.com?api-key=<your_api_key>";
const connection = createRpc(RPC_ENDPOINT, RPC_ENDPOINT, RPC_ENDPOINT);

console.log("Connection created!");
console.log("RPC Endpoint:", RPC_ENDPOINT);
3
Get started with our cookbook or advanced guides for implementations

Guides

GuideDescription
Create and Register a Mint Account for CompressionCreate new SPL mint with token pool for compression
Create Compressed Token AccountsCreate compressed and learn difference to regular token accounts
Mint Compressed TokensCreate new compressed tokens to existing mint
Transfer Compressed TokensMove compressed tokens between compressed accounts
Decompress and Compress TokensConvert SPL tokens between regular and compressed format
Compress Complete SPL Token AccountsCompress complete SPL token accounts and reclaim rent afterwards
Merge Compressed AccountsConsolidate multiple compressed accounts of the same mint into one
Create Token Pools for Mint AccountsCreate token pool for compression for existing SPL mints
Approve and Revoke Delegate AuthorityApprove or revoke delegates for compressed token accounts

Advanced Guides

GuideDescription
Add Wallet Support for Compressed TokensAdd compressed token support in your wallet application
Use Token-2022 with CompressionCreate compressed Token-2022 mints with metadata and other extensions
Create an Airdrop without ClaimCreate an airdrop that appears directly in recipients’ wallets (with or without code)
Example Airdrop with ClaimDemo for time-locked airdrop with compressed tokens
Example Web ClientDemonstrates how to use @lightprotocol/stateless.js in a browser environment to interact with ZK Compression
Example Node.js ClientScript to execute basic compression/decompression/transfers

Next Steps

Get started with the first cookbook guide.