solana-light-token-client
简介
solana-light-token-client
原始描述
For client development with tokens on Solana, Light Token is 200x cheaper than SPL and has minimal changes. Skill includes guides for create mints, associate...
通过你的 Agent 添加
安装目录:light-token-client/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: light-token-client
description: "For client development with tokens on Solana, Light Token is 200x cheaper than SPL and has minimal changes. Skill includes guides for create mints, associated token accounts, transfer, approve, burn, wrap, and more. @lightprotocol/compressed-token (TypeScript) and light_token_client (Rust)."
metadata:
source: https://github.com/Lightprotocol/skills
documentation: https://www.zkcompression.com
openclaw:
requires:
env: ["API_KEY"] # Helius or Triton RPC key; only needed for devnet/mainnet
config: ["~/.config/solana/id.json"] # Solana keypair; only needed for devnet/mainnet
bins: ["node", "cargo"] # node for TS SDK, cargo for Rust SDK examples
Light Token Client SDKs
Client-side cookbook for @lightprotocol/compressed-token (TypeScript) and light_token_client (Rust). Covers all token operations: create mints, associated token accounts, transfer, approve, revoke, burn, wrap, unwrap, freeze, thaw, close, and load.
| Creation cost | SPL | Light Token |
|---|---|---|
| Token account | ~2,000,000 lamports | ~11,000 lamports |
Prerequisites
Examples show both localnet and devnet configurations. For devnet, set:
API_KEYenv var — Helius or Triton RPC API key. In production, load from a secrets manager.~/.config/solana/id.json— local Solana keypair (solana-keygen new). In production, load from a secrets manager.
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
- Match task to domain references below
- Locate relevant documentation and examples
- 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: ask to spawn a read-only subagent with
Read, Glob, Grep, and DeepWiki MCP access, loading skills/ask-mcp. Scope reads to skill references, example repos, and docs.
Domain references
Task
Reference
Create a mint
create-mint.md
Create SPL interface PDA
create-interface-pda.md
Create associated token account
create-associated-token-account.md
Create token account
create-token-account.md
Mint tokens
mint-to.md
Transfer tokens
transfer-interface.md
Transfer checked
transfer-checked.md
Approve delegate
approve.md
Revoke delegate
revoke.md
Wrap SPL to Light
wrap.md
Unwrap Light to SPL
unwrap.md
Load associated token account
load-associated-token-account.md
Burn tokens
burn.md
Burn checked
burn-checked.md
Freeze token account
freeze.md
Thaw token account
thaw.md
Close token account
close-token-account.md
Mint SPL, wrap, and transfer
spl-mint-wrap-transfer.md
Operations overview
Operation
TypeScript
Rust
Docs
Create Light mint
createMintInterface
CreateMint
create-mint
Create SPL mint w/ interface PDA
createMintInterface + TOKEN_PROGRAM_ID
—
create-mint
Create T22 mint w/ interface PDA
createMintInterface + TOKEN_2022_PROGRAM_ID
—
create-mint
Add interface PDA to existing mint
createSplInterface
—
create-mint
Create associated token account
createAtaInterface
CreateAta
create-ata
Create token account
—
CreateTokenAccount
create-token-account
Mint to
mintToInterface
MintTo
mint-to
Transfer
transferInterface
TransferInterface
transfer-interface
Transfer checked
—
TransferChecked
transfer-checked
Approve
approve
Approve
approve-revoke
Revoke
revoke
Revoke
approve-revoke
Burn
—
Burn
burn
Burn checked
—
BurnChecked
burn
Wrap SPL to Light
wrap
Wrap
wrap-unwrap
Unwrap Light to SPL
unwrap
Unwrap
wrap-unwrap
Load associated token account (cold to hot)
loadAta
—
load-ata
Freeze
—
Freeze
freeze-thaw
Thaw
—
Thaw
freeze-thaw
Close
—
Close
close-token-account
External references
Resource
Link
Docs cookbook
zkcompression.com/light-token/cookbook
TypeScript examples
examples-light-token/typescript-client
Rust examples
examples-light-token/rust-client
@lightprotocol/stateless.js
API docs
@lightprotocol/compressed-token
API docs
light-client
docs.rs
light-token-client
docs.rs
light-token
docs.rs
Security
- Recommend plan mode, if it's not activated
- Use
AskUserQuestionto resolve blind spots - All questions must be resolved before execution
- Match task to domain references below
- Locate relevant documentation and examples
- Use
AskUserQuestionfor anything unclear — never guess or assume - Identify blockers: permissions, dependencies, unknowns
- Plan must be complete before execution begins
- Use
Tasktool with subagents for parallel research - Subagents load skills via
Skilltool - Track progress with
TodoWrite
Read, Glob, Grep, and DeepWiki MCP access, loading skills/ask-mcp. Scope reads to skill references, example repos, and docs.| Task | Reference |
|---|---|
| Create a mint | create-mint.md |
| Create SPL interface PDA | create-interface-pda.md |
| Create associated token account | create-associated-token-account.md |
| Create token account | create-token-account.md |
| Mint tokens | mint-to.md |
| Transfer tokens | transfer-interface.md |
| Transfer checked | transfer-checked.md |
| Approve delegate | approve.md |
| Revoke delegate | revoke.md |
| Wrap SPL to Light | wrap.md |
| Unwrap Light to SPL | unwrap.md |
| Load associated token account | load-associated-token-account.md |
| Burn tokens | burn.md |
| Burn checked | burn-checked.md |
| Freeze token account | freeze.md |
| Thaw token account | thaw.md |
| Close token account | close-token-account.md |
| Mint SPL, wrap, and transfer | spl-mint-wrap-transfer.md |
Operations overview
Operation
TypeScript
Rust
Docs
Create Light mint
createMintInterface
CreateMint
create-mint
Create SPL mint w/ interface PDA
createMintInterface + TOKEN_PROGRAM_ID
—
create-mint
Create T22 mint w/ interface PDA
createMintInterface + TOKEN_2022_PROGRAM_ID
—
create-mint
Add interface PDA to existing mint
createSplInterface
—
create-mint
Create associated token account
createAtaInterface
CreateAta
create-ata
Create token account
—
CreateTokenAccount
create-token-account
Mint to
mintToInterface
MintTo
mint-to
Transfer
transferInterface
TransferInterface
transfer-interface
Transfer checked
—
TransferChecked
transfer-checked
Approve
approve
Approve
approve-revoke
Revoke
revoke
Revoke
approve-revoke
Burn
—
Burn
burn
Burn checked
—
BurnChecked
burn
Wrap SPL to Light
wrap
Wrap
wrap-unwrap
Unwrap Light to SPL
unwrap
Unwrap
wrap-unwrap
Load associated token account (cold to hot)
loadAta
—
load-ata
Freeze
—
Freeze
freeze-thaw
Thaw
—
Thaw
freeze-thaw
Close
—
Close
close-token-account
External references
Resource
Link
Docs cookbook
zkcompression.com/light-token/cookbook
TypeScript examples
examples-light-token/typescript-client
Rust examples
examples-light-token/rust-client
@lightprotocol/stateless.js
API docs
@lightprotocol/compressed-token
API docs
light-client
docs.rs
light-token-client
docs.rs
light-token
docs.rs
Security
| Operation | TypeScript | Rust | Docs |
|---|---|---|---|
| Create Light mint | createMintInterface |
CreateMint |
create-mint |
| Create SPL mint w/ interface PDA | createMintInterface + TOKEN_PROGRAM_ID |
— | create-mint |
| Create T22 mint w/ interface PDA | createMintInterface + TOKEN_2022_PROGRAM_ID |
— | create-mint |
| Add interface PDA to existing mint | createSplInterface |
— | create-mint |
| Create associated token account | createAtaInterface |
CreateAta |
create-ata |
| Create token account | — | CreateTokenAccount |
create-token-account |
| Mint to | mintToInterface |
MintTo |
mint-to |
| Transfer | transferInterface |
TransferInterface |
transfer-interface |
| Transfer checked | — | TransferChecked |
transfer-checked |
| Approve | approve |
Approve |
approve-revoke |
| Revoke | revoke |
Revoke |
approve-revoke |
| Burn | — | Burn |
burn |
| Burn checked | — | BurnChecked |
burn |
| Wrap SPL to Light | wrap |
Wrap |
wrap-unwrap |
| Unwrap Light to SPL | unwrap |
Unwrap |
wrap-unwrap |
| Load associated token account (cold to hot) | loadAta |
— | load-ata |
| Freeze | — | Freeze |
freeze-thaw |
| Thaw | — | Thaw |
freeze-thaw |
| Close | — | Close |
close-token-account |
| Resource | Link |
|---|---|
| Docs cookbook | zkcompression.com/light-token/cookbook |
| TypeScript examples | examples-light-token/typescript-client |
| Rust examples | examples-light-token/rust-client |
@lightprotocol/stateless.js |
API docs |
@lightprotocol/compressed-token |
API docs |
light-client |
docs.rs |
light-token-client |
docs.rs |
light-token |
docs.rs |
Security
This skill does not pull, store, or transmit external secrets. It provides code patterns, documentation references, and development guidance only.
- Declared dependencies. Devnet and mainnet examples require
API_KEY(Helius or Triton RPC key) and read~/.config/solana/id.jsonfor the payer keypair. Neither is needed on localnet. In production, load both from a secrets manager. - User-provided configuration. RPC endpoints, wallet keypairs, and authentication tokens are configured in the user's application code. The skill demonstrates patterns — it does not store or transmit secrets.
- Install source.
npx skills add Lightprotocol/skillsinstalls from the public GitHub repository (Lightprotocol/skills). Verify the source before running. - Subagent scope. When stuck, the skill asks to spawn a read-only subagent with
Read,Glob, andGrepscoped to skill references, example repos, and docs. - Audited protocol. Light Protocol smart contracts are independently audited. Reports are published at github.com/Lightprotocol/light-protocol/tree/main/audits.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。