Skip to main content
This guide is for teams building custom data pipelines (aggregators, market makers). If you just need account lookups, use get_account_interface instead.
Use the data-streaming agent skill to add Laserstream support to your project:
Add the marketplace and install:
For orchestration, install the general skill:

Architecture

Light mints are Solana accounts owned by the Light Token Program. The streaming setup requires two gRPC subscriptions:The account subscription delivers all state changes while mints are hot. The transaction subscription is needed to detect mints going cold (CompressAndCloseMint changes the owner to System Program, which the account subscription no longer matches).

Setup

Cargo.toml
1

Connect

2

Subscribe

3

Deserialize mint accounts

4

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 with ColdContext (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.
5

Extract TokenMetadata

Data Layouts

Mint

TokenMetadata

Streaming Token Accounts