About light-token-client
A client-side cookbook skill for developers using Light Token with TypeScript or Rust. It documents token lifecycle operations and Token 2022 extensions, with examples for localnet and devnet.
Key features
- 01TypeScript and Rust client examples
- 02Mint and token account operations
- 03Transfer, approve, and revoke
- 04Wrap, unwrap, burn, and load
- 05Freeze, thaw, and close operations
- 06Token 2022 extension references
Use cases
- 01Create Light mints and token accounts
- 02Transfer tokens or manage delegates
- 03Wrap SPL tokens into Light and unwrap them
- 04Apply Token 2022 extensions
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ lightprotocol/ skills --skill light-token-clientAfter installing, type/light-token-clientin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/approve.mdburn-checked.mdburn.mdclose-token-account.mdcreate-associated-token-account.mdcreate-interface-pda.mdcreate-mint.mdcreate-token-account.mddelegate-transfer.mdfreeze.mdload-associated-token-account.mdmint-to.mdrevoke.mdspl-mint-wrap-transfer.mdspl-to-light.mdthaw.mdtransfer-checked.mdtransfer-interface.mdunwrap.mdreferences/extensions/close-mint.mdconfidential-transfer.mddefault-account-state.mdinterest-bearing-tokens.mdmetadata-and-metadata-pointer.mdoverview.mdpausable-mint.mdpermanent-delegate.mdtoken-groups-and-members.mdtransfer-fees.mdtransfer-hook.mdDetails
From the project READMELight 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
AskUserQuestionto 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
AskUserQuestionfor anything unclear — never guess or assume - Identify blockers: permissions, dependencies, unknowns
- Plan must be complete before execution begins
- Use
- Execute
- Use
Tasktool with subagents for parallel research - Subagents load skills via
Skilltool - Track progress with
TodoWrite
- Use
- When stuck: ask to spawn a read-only subagent with
Read,Glob,Grep, and DeepWiki MCP access, loadingskills/ask-mcp. Scope reads to skill references, example repos, and docs.
Domain references
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 | approveInterface | Approve | approve-revoke |
| Revoke | revokeInterface | Revoke | approve-revoke |
| Delegate transfer | transferInterface + { owner } | — | 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
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.