Skip to main content
Compressed Tokens are supported by leading Solana wallets such as Phantom and Backpack.
CreationSolanaCompressed
Token Account~2,000,000 lamports5,000 lamports
  1. Compressed token accounts store token balance, owner, and other information for SPL and Token 2022 mints.
  2. Compressed token accounts are rent-free.
  3. Any SPL or Token 2022 token can be compressed and decompressed at will.

Token Distribution

Distribute tokens without paying upfront rent per recipient.

Create an Airdrop

Store SPL-token accounts rent-free

Compress existing SPL-token accounts to save rent costs for your users.

Compress SPL Token Accounts

Get Started

1

Install dependencies

npm install @lightprotocol/stateless.js@^0.23.0 \
            @lightprotocol/compressed-token@^0.23.0
2

Set up your developer environment

By default, all guides use Localnet.
npm install -g @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();
1

Basic Guides

GuideDescription
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
Create a Mint with Interface PDACreate new SPL mint with SPL Interface PDA for compression
Create SPL Interface for Existing MintsCreate SPL Interface PDA for existing SPL mints
Merge Compressed AccountsConsolidate multiple compressed accounts of the same mint into one
Approve and Revoke Delegate AuthorityApprove or revoke delegates for compressed token accounts
2

Advanced Guides

GuideDescription
Create an Airdrop without ClaimZK Compression is the most efficient way to distribute SPL tokens. Distribute via Webapp or customize with claim.
Privy GuideIntegrate compressed tokens with Privy embedded wallets for rent-free token accounts