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_KEY env 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
- 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
External references
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.json for 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/skills installs 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, and Grep scoped 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.
1---
2name: light-token-client
3description: "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)."
4metadata:
5 source: https://skillmd.com/skills/modbender/light-token-client
6 upstream: https://github.com/Lightprotocol/skills
7 documentation: https://www.zkcompression.com
8 openclaw:
9 requires:
10 env: ["API_KEY"] # Helius or Triton RPC key; only needed for devnet/mainnet
11 config: ["~/.config/solana/id.json"] # Solana keypair; only needed for devnet/mainnet
12 bins: ["node", "cargo"] # node for TS SDK, cargo for Rust SDK examples
13---
14
15# Light Token Client SDKs
16
17Client-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.
18
19| Creation cost | SPL | Light Token |
20| :---------------- | :------------------ | :------------------- |
21| **Token account** | ~2,000,000 lamports | ~**11,000** lamports |
22
23## Prerequisites
24
25Examples show both localnet and devnet configurations. For devnet, set:
26
27- `API_KEY` env var — Helius or Triton RPC API key. In production, load from a secrets manager.
28- `~/.config/solana/id.json` — local Solana keypair (`solana-keygen new`). In production, load from a secrets manager.
29
30## Workflow
31
321. **Clarify intent**
33 - Recommend plan mode, if it's not activated
34 - Use `AskUserQuestion` to resolve blind spots
35 - All questions must be resolved before execution
362. **Identify references and skills**
37 - Match task to [domain references](#domain-references) below
38 - Locate relevant documentation and examples
393. **Write plan file** (YAML task format)
40 - Use `AskUserQuestion` for anything unclear — never guess or assume
41 - Identify blockers: permissions, dependencies, unknowns
42 - Plan must be complete before execution begins
434. **Execute**
44 - Use `Task` tool with subagents for parallel research
45 - Subagents load skills via `Skill` tool
46 - Track progress with `TodoWrite`
475. **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.
48
49## Domain references
50
51| Task | Reference |
52|------|-----------|
53| Create a mint | [create-mint.md](references/create-mint.md) |
54| Create SPL interface PDA | [create-interface-pda.md](references/create-interface-pda.md) |
55| Create associated token account | [create-associated-token-account.md](references/create-associated-token-account.md) |
56| Create token account | [create-token-account.md](references/create-token-account.md) |
57| Mint tokens | [mint-to.md](references/mint-to.md) |
58| Transfer tokens | [transfer-interface.md](references/transfer-interface.md) |
59| Transfer checked | [transfer-checked.md](references/transfer-checked.md) |
60| Approve delegate | [approve.md](references/approve.md) |
61| Revoke delegate | [revoke.md](references/revoke.md) |
62| Wrap SPL to Light | [wrap.md](references/wrap.md) |
63| Unwrap Light to SPL | [unwrap.md](references/unwrap.md) |
64| Load associated token account | [load-associated-token-account.md](references/load-associated-token-account.md) |
65| Burn tokens | [burn.md](references/burn.md) |
66| Burn checked | [burn-checked.md](references/burn-checked.md) |
67| Freeze token account | [freeze.md](references/freeze.md) |
68| Thaw token account | [thaw.md](references/thaw.md) |
69| Close token account | [close-token-account.md](references/close-token-account.md) |
70| Mint SPL, wrap, and transfer | [spl-mint-wrap-transfer.md](references/spl-mint-wrap-transfer.md) |
71
72## Operations overview
73
74| Operation | TypeScript | Rust | Docs |
75|-----------|-----------|------|------|
76| Create Light mint | `createMintInterface` | `CreateMint` | [create-mint](https://zkcompression.com/light-token/cookbook/create-mint) |
77| Create SPL mint w/ interface PDA | `createMintInterface` + `TOKEN_PROGRAM_ID` | — | [create-mint](https://zkcompression.com/light-token/cookbook/create-mint) |
78| Create T22 mint w/ interface PDA | `createMintInterface` + `TOKEN_2022_PROGRAM_ID` | — | [create-mint](https://zkcompression.com/light-token/cookbook/create-mint) |
79| Add interface PDA to existing mint | `createSplInterface` | — | [create-mint](https://zkcompression.com/light-token/cookbook/create-mint) |
80| Create associated token account | `createAtaInterface` | `CreateAta` | [create-ata](https://zkcompression.com/light-token/cookbook/create-ata) |
81| Create token account | — | `CreateTokenAccount` | [create-token-account](https://zkcompression.com/light-token/cookbook/create-token-account) |
82| Mint to | `mintToInterface` | `MintTo` | [mint-to](https://zkcompression.com/light-token/cookbook/mint-to) |
83| Transfer | `transferInterface` | `TransferInterface` | [transfer-interface](https://zkcompression.com/light-token/cookbook/transfer-interface) |
84| Transfer checked | — | `TransferChecked` | [transfer-checked](https://zkcompression.com/light-token/cookbook/transfer-checked) |
85| Approve | `approve` | `Approve` | [approve-revoke](https://zkcompression.com/light-token/cookbook/approve-revoke) |
86| Revoke | `revoke` | `Revoke` | [approve-revoke](https://zkcompression.com/light-token/cookbook/approve-revoke) |
87| Burn | — | `Burn` | [burn](https://zkcompression.com/light-token/cookbook/burn) |
88| Burn checked | — | `BurnChecked` | [burn](https://zkcompression.com/light-token/cookbook/burn) |
89| Wrap SPL to Light | `wrap` | `Wrap` | [wrap-unwrap](https://zkcompression.com/light-token/cookbook/wrap-unwrap) |
90| Unwrap Light to SPL | `unwrap` | `Unwrap` | [wrap-unwrap](https://zkcompression.com/light-token/cookbook/wrap-unwrap) |
91| Load associated token account (cold to hot) | `loadAta` | — | [load-ata](https://zkcompression.com/light-token/cookbook/load-ata) |
92| Freeze | — | `Freeze` | [freeze-thaw](https://zkcompression.com/light-token/cookbook/freeze-thaw) |
93| Thaw | — | `Thaw` | [freeze-thaw](https://zkcompression.com/light-token/cookbook/freeze-thaw) |
94| Close | — | `Close` | [close-token-account](https://zkcompression.com/light-token/cookbook/close-token-account) |
95
96## External references
97
98| Resource | Link |
99|----------|------|
100| Docs cookbook | [zkcompression.com/light-token/cookbook](https://zkcompression.com/light-token/cookbook/) |
101| TypeScript examples | [examples-light-token/typescript-client](https://github.com/Lightprotocol/examples-light-token/tree/main/typescript-client) |
102| Rust examples | [examples-light-token/rust-client](https://github.com/Lightprotocol/examples-light-token/tree/main/rust-client) |
103| `@lightprotocol/stateless.js` | [API docs](https://lightprotocol.github.io/light-protocol/stateless.js/index.html) |
104| `@lightprotocol/compressed-token` | [API docs](https://lightprotocol.github.io/light-protocol/compressed-token/index.html) |
105| `light-client` | [docs.rs](https://docs.rs/light-client/latest/light_client/) |
106| `light-token-client` | [docs.rs](https://docs.rs/light-token-client/latest/light_token_client/) |
107| `light-token` | [docs.rs](https://docs.rs/light-token/latest/light_token/) |
108
109
110## Security
111
112This skill does not pull, store, or transmit external secrets. It provides code patterns, documentation references, and development guidance only.
113
114- **Declared dependencies.** Devnet and mainnet examples require `API_KEY` (Helius or Triton RPC key) and read `~/.config/solana/id.json` for the payer keypair. Neither is needed on localnet. In production, load both from a secrets manager.
115- **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.
116- **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.
117- **Subagent scope.** When stuck, the skill asks to spawn a read-only subagent with `Read`, `Glob`, and `Grep` scoped to skill references, example repos, and docs.
118- **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).