Data Streaming
Stream Light Protocol account state transitions via Laserstream gRPC.
Workflow
- Clarify intent
- Recommend plan mode, if it's not activated
- Use
AskUserQuestion to resolve blind spots
- All questions must be resolved before execution
- Identify references and skills
- Write plan file (YAML task format)
- Use
AskUserQuestion for anything unclear — never guess or assume
- Identify blockers: permissions, dependencies, unknowns
- Plan must be complete before execution begins
- Execute
- Use
Task tool with subagents for parallel research
- Subagents load skills via
Skill tool
- Track progress with
TodoWrite
- When stuck: spawn subagent with
Read, Glob, Grep, DeepWiki MCP access and load skills/ask-mcp
When NOT to use
For simple account lookups, call get_account_interface from light-client. It races hot and cold lookups automatically.
This skill is for continuous data pipelines: aggregators, market makers, and indexers that need real-time state change notifications rather than point queries.
Domain references
| Audience |
Reference |
| All — shared architecture (read first) |
references/shared.md |
| Token accounts (SPL-compatible, 165 bytes) |
references/token-accounts.md |
| Mint accounts (borsh-deserialized, metadata) |
references/mint-accounts.md |
| Compressible PDAs (per-program, discriminator check) |
references/pdas.md |
Account type decision
| Streaming... |
Account type |
Key difference |
| SPL-compatible token balances |
Token accounts |
PodAccount parsing, 165-byte layout |
| Mint supply, metadata, authorities |
Mint accounts |
Mint::deserialize, borsh layout |
| Your program's PDA state |
Compressible PDAs |
8-byte discriminator check, per-program filter |
Program addresses
| Program |
Address |
| Light Token Program |
cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m |
| Light System Program |
SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 |
External references
SDK references
Security
This skill does not pull, store, or transmit external secrets. It provides code patterns, documentation references, and development guidance only.
- No credentials consumed. The skill requires no API keys, private keys, or signing secrets.
env: [] is declared explicitly.
- User-provided configuration. RPC endpoints, wallet keypairs, and authentication tokens (Privy, wallet adapters) are configured in the user's own application code — the skill only demonstrates how to use them.
- API keys. Reference code uses
HELIUS_API_KEY as a placeholder. For production, set your RPC provider key as an environment variable.
- Subagent scope. This skill may spawn read-only subagents that use
Read, Glob, and Grep to search the local repository. Restrict the working directory to your project.
- Install source.
npx skills add Lightprotocol/skills installs from the public GitHub repository (Lightprotocol/skills). Verify the source before running.
- Audited protocol. Light Protocol smart contracts are independently audited. Reports are published at github.com/Lightprotocol/light-protocol/tree/main/audits.
1---
2name: data-streaming
3description: "For data pipelines, aggregators, or indexers, real-time account state streaming on Solana with light account hot/cold lifecycle tracking. Stream Light token accounts, mint accounts, and PDAs via Laserstream gRPC."
4metadata:
5 source: https://skillmd.com/skills/modbender/data-streaming
6 upstream: https://github.com/Lightprotocol/skills
7 documentation: https://www.zkcompression.com
8 openclaw:
9 requires:
10 env: []
11 bins: ["cargo"] # Rust toolchain for building streaming examples in references/
12---
13
14# Data Streaming
15
16Stream Light Protocol account state transitions via Laserstream gRPC.
17
18## Workflow
19
201. **Clarify intent**
21 - Recommend plan mode, if it's not activated
22 - Use `AskUserQuestion` to resolve blind spots
23 - All questions must be resolved before execution
242. **Identify references and skills**
25 - Match task to [domain references](#domain-references) below
26 - Locate relevant documentation and examples
273. **Write plan file** (YAML task format)
28 - Use `AskUserQuestion` for anything unclear — never guess or assume
29 - Identify blockers: permissions, dependencies, unknowns
30 - Plan must be complete before execution begins
314. **Execute**
32 - Use `Task` tool with subagents for parallel research
33 - Subagents load skills via `Skill` tool
34 - Track progress with `TodoWrite`
355. **When stuck**: spawn subagent with `Read`, `Glob`, `Grep`, DeepWiki MCP access and load `skills/ask-mcp`
36
37## When NOT to use
38
39For simple account lookups, call `get_account_interface` from `light-client`. It races hot and cold lookups automatically.
40
41This skill is for continuous data pipelines: aggregators, market makers, and indexers that need real-time state change notifications rather than point queries.
42
43## Domain references
44
45| Audience | Reference |
46| -------- | --------- |
47| All — shared architecture (read first) | [references/shared.md](references/shared.md) |
48| Token accounts (SPL-compatible, 165 bytes) | [references/token-accounts.md](references/token-accounts.md) |
49| Mint accounts (borsh-deserialized, metadata) | [references/mint-accounts.md](references/mint-accounts.md) |
50| Compressible PDAs (per-program, discriminator check) | [references/pdas.md](references/pdas.md) |
51
52## Account type decision
53
54| Streaming... | Account type | Key difference |
55|---|---|---|
56| SPL-compatible token balances | Token accounts | `PodAccount` parsing, 165-byte layout |
57| Mint supply, metadata, authorities | Mint accounts | `Mint::deserialize`, borsh layout |
58| Your program's PDA state | Compressible PDAs | 8-byte discriminator check, per-program filter |
59
60## Program addresses
61
62| Program | Address |
63|---------|---------|
64| Light Token Program | `cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m` |
65| Light System Program | `SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7` |
66
67## External references
68
69| Resource | Link |
70|----------|------|
71| Photon indexer | [github.com/helius-labs/photon](https://github.com/helius-labs/photon) |
72| Streaming tokens toolkit | [zkcompression.com/light-token/toolkits/for-streaming-tokens](https://www.zkcompression.com/light-token/toolkits/for-streaming-tokens) |
73| Streaming mints toolkit | [zkcompression.com/light-token/toolkits/for-streaming-mints](https://www.zkcompression.com/light-token/toolkits/for-streaming-mints) |
74
75## SDK references
76
77| Package | Link |
78|---------|------|
79| `@lightprotocol/stateless.js` | [API docs](https://lightprotocol.github.io/light-protocol/stateless.js/index.html) |
80| `light-client` | [docs.rs](https://docs.rs/light-client/latest/light_client/) |
81
82
83## Security
84
85This skill does not pull, store, or transmit external secrets. It provides code patterns, documentation references, and development guidance only.
86
87- **No credentials consumed.** The skill requires no API keys, private keys, or signing secrets. `env: []` is declared explicitly.
88- **User-provided configuration.** RPC endpoints, wallet keypairs, and authentication tokens (Privy, wallet adapters) are configured in the user's own application code — the skill only demonstrates how to use them.
89- **API keys.** Reference code uses `HELIUS_API_KEY` as a placeholder. For production, set your RPC provider key as an environment variable.
90- **Subagent scope.** This skill may spawn read-only subagents that use `Read`, `Glob`, and `Grep` to search the local repository. Restrict the working directory to your project.
91- **Install source.** `npx skills add Lightprotocol/skills` installs from the public GitHub repository ([Lightprotocol/skills](https://github.com/Lightprotocol/skills)). Verify the source before running.
92- **Audited protocol.** Light Protocol smart contracts are independently audited. Reports are published at [github.com/Lightprotocol/light-protocol/tree/main/audits](https://github.com/Lightprotocol/light-protocol/tree/main/audits).