360 Secure SkillHub
360 安全技能中心

solana-stream-light

核心功能:实现Solana上Light Protocol的Token账户、Mint账户及压缩PDA的实时状态变更流,附带冷热账户生命周期追踪。典型场景:适用于聚合器、做市商、索引器等需要持续数据流的系统,不适合简单账户查询。输入为明确任务需求,输出为YAML执行计划及实施指导,依赖Rust工具链,遵循先澄清需求再执行的工作流,仅提供代码模式与文档参考,无秘钥消耗。

tilo-14
tilo-14
热度 55.57
最近更新 2026-05-11 17:27:20
分类:开发依赖:代码执行 / 读写文件 / 第三方 API / MCP 服务 / 内部调用大模型应用场景:数据处理 / API 集成 / 代码生成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add solana-stream-light
Metadata
name
data-streaming
description
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.
metadata
{"source":"https://github.com/Lightprotocol/skills","documentation":"https://www.zkcompression.com","openclaw":{"requires":{"env":[],"bins":["cargo"]}}}

Data Streaming

Stream Light Protocol account state transitions via Laserstream gRPC.

Workflow

  1. Clarify intent
    • Recommend plan mode, if it's not activated
    • Use AskUserQuestion to resolve blind spots
    • All questions must be resolved before execution
  2. Identify references and skills
  3. 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
  4. Execute
    • Use Task tool with subagents for parallel research
    • Subagents load skills via Skill tool
    • Track progress with TodoWrite
  5. 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

Resource Link
Photon indexer github.com/helius-labs/photon
Streaming tokens toolkit zkcompression.com/light-token/toolkits/for-streaming-tokens
Streaming mints toolkit zkcompression.com/light-token/toolkits/for-streaming-mints

SDK references

Package Link
@lightprotocol/stateless.js API docs
light-client docs.rs

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.