Note: This page is for the new Light Token Program Beta. For production use today, use
Compressed Tokens, which are live on Solana Mainnet and supported
by leading wallets such as Phantom & Backpack.
Creation Cost
| Light-Token | SPL-Token | |
|---|---|---|
| Mint Account | 0.00001 SOL | 0.0015 SOL |
| Token Account | 0.00001 SOL | 0.002 SOL |
CU Performance
| Light-Token | SPL-Token | |
|---|---|---|
| ATA Creation | 4,348 | 14,194 |
| Transfer | 312 | 4,645 |
| Transfer (rent-free) | 1,885 | 4,645 |
Mint Accounts
Light-mint accounts represent a unique mint and optionally can store token-metadata.
Functionally equivalent to SPL mints.
Token Accounts
Light-token accounts can hold balances from any light, SPL, or Token-2022 mint, without the need
to pay rent-exemption.
Quickstart
Installation
- npm
- yarn
- pnpm
Install packages in your working directory:Install the CLI globally:
Get Started
Mint tokens in under 3 minutes.
DeFi Integration
Program Integration
Build rent-free AMMs and DeFi programs.
Router Integration
Add support for rent-free AMMs to your aggregator.
Pinocchio Programs
High-performance DeFi programs with Pinocchio.
Payments
Integration Guide
Guide to integrate light-token APIs with comparison to SPL.
Nullifier PDA
Prevent onchain instructions from being executed more than once.
Wallets
Integration Guide
Guide for Wallet Applications to let users display and swap light-tokens.
Sign with Privy Wallets
Add rent-free tokens to Privy embedded wallets.
Data Streaming
Mint Accounts
Stream mint events from the network in real-time.
Token Accounts
Stream token events from the network in real-time.
PDA Accounts
Light PDA
Solana PDAs with sponsored rent-exemption that can be implemented with minimal code changes.
Anchor Constraints
Syntax reference for #[light_account] constraints for PDA, mint, token, and associated token accounts.
Cookbook
| Create Mint | Create light-mints with token metadata |
| Create ATA | Create associated light-token accounts |
| Create Token Account | Create light-token accounts |
| Mint To | Mint tokens to light-token accounts |
| Close Token Account | Close token account to reclaim remaining lamports |
| Transfer | Transfer between Light Token, SPL and Token 2022 accounts |
| Transfer Checked | Transfer between Light Token accounts with decimals verification |
| Burn | Burn tokens from light-token accounts |
| Freeze & Thaw | Freeze and thaw light-token accounts |
| Approve & Revoke | Delegate and revoke token authority |
| Wrap & Unwrap | Convert between SPL/Token 2022 and light-token |
| Load ATA | Load cold light-token accounts to hot balance for transfers in one instruction |
Examples
Client
| TypeScript | Actions and instructions for all token operations |
| Rust | Actions and instructions for all token operations |
Program
| Examples | AMM reference, CPI create-and-transfer, Pinocchio swap |
| Macros | Counter PDA, ATA, mint, and token account creation |
| Instructions | All CPI instructions: approve, burn, close, freeze, mint-to, transfer, and more |
SDK Reference
Client
@lightprotocol/stateless.js
TypeScript RPC client for Light Token and Compressed Accounts.
light-client
Rust RPC client for Light Token and ZK Compression.
@lightprotocol/compressed-token
TypeScript token operations for Light Token and Compressed Tokens.
light-token-client
Rust token operations for Light Token.
Program
light-sdk
Core SDK for on-chain programs.
light-sdk-macros
Procedural macros for Light accounts.
light-token
CPI instructions for Light Token program.
light-program-test
Local testing framework for programs.