| Event | Description |
|---|---|
| New mints | Raw mint data |
| Mint updates | Supply changes, authority changes |
| TokenMetadata | Name, symbol, URI, additional_metadata |
| Cold/hot transitions | Mint compressed or decompressed |
This guide is for teams building custom data pipelines (aggregators, market makers).
If you just need account lookups, use
get_account_interface instead.Architecture
Light mints are Solana accounts owned by the Light Token Program. The streaming setup requires two gRPC subscriptions:| Subscription | Detects | How |
|---|---|---|
Account sub (owner: cToken..., account_type == 1) | Hot state + cold-to-hot | Pubkey cache lookup |
Transaction sub (account_include: cToken...) | Hot-to-cold | Balance heuristic (pre > 0, post == 0) |
CompressAndCloseMint changes the owner to System Program, which the account
subscription no longer matches).
Setup
Cargo.toml
Connect
- Mainnet
- Devnet
Subscribe
Deserialize mint accounts
Detect mints going cold
Two data structures:cache: HashMap<[u8; 32], T>— hot account state (for quoting/routing)cold_cache: HashMap<[u8; 32], AccountInterface>— cold accounts withColdContext(for building load instructions)
cache.remove filters out unrelated closures in the same transaction. No discriminator
check is needed — compress_and_close always drains lamports to zero.To build transactions that decompress cold accounts, see
Router Integration.