Skip to main content
The mint account itself requires rent (like regular SPL mints), but individual compressed token accounts are rent-free.
Compressed tokens use an SPL mint that is registered with the compressed token program. Connect an existing SPL mint with createTokenPool() or use createMint() to create a new one from scratch.
Best Practice: Each mint supports a maximum of 4 token pools total. During compression/decompression operations, token pools get write-locked. Use addTokenPools() to create additional pools that increase per-block write-lock capacity.

Full Code Example

Prerequisites

Make sure you have dependencies and developer environment set up!
Dependencies
Alternatives:
Developer EnvironmentBy default, this guide uses Localnet.
Alternative: Using DevnetFollow these steps to create an RPC Connection. Replace <your_api_key> with your API key before running.
Get your API Key here, if you don’t have one yet.

Create SPL Mint with Token Pool for Compression

Run this script to create a mint account with token pool for compression.
create-mint.ts

Advanced Configurations

Customize who can mint new compressed tokens.
Customize who can freeze/thaw compressed token accounts.

Next Steps

Learn how to create additional compressed token pools for your SPL mint to increase write-lock limits.