Skip to content

Add Rust client examples to cookbook#20

Closed
tilo-14 wants to merge 15 commits intomainfrom
add-rust-client
Closed

Add Rust client examples to cookbook#20
tilo-14 wants to merge 15 commits intomainfrom
add-rust-client

Conversation

@tilo-14
Copy link
Member

@tilo-14 tilo-14 commented Feb 2, 2026

Summary

  • Add Rust client code examples (action + instruction) to cookbook pages: create-mint, create-ata, create-token-account, mint-to, transfer-interface, transfer-checked, close-token-account, burn, freeze-thaw, approve-revoke, wrap-unwrap
  • Add SPL vs Light code comparison widgets to cookbook pages
  • Remove program tabs from cookbook (moved to add-anchor branch)
  • Add client examples overview page
  • Align Rust dependency versions with examples-light-token
  • Update streaming mints/tokens toolkit pages
  • Fix MDX parsing issues (missing blank lines after imports)
  • Clean up info snippet text

Test plan

  • Verify all cookbook pages render without errors
  • Verify code snippets display correctly in Action/Instruction tabs
  • Verify code comparison widgets render
  • Check no broken imports or missing snippet files

Summary by CodeRabbit

Release Notes

  • New Features

    • Added comprehensive Light Token cookbook guides including transfer-checked, burn operations, freeze/thaw, and approve/revoke functionality.
    • Added Light Token DeFi integration guides for program and router integration.
    • Added Privy integration for rent-free token accounts.
    • Added new OpenAPI endpoints for cold mint data retrieval.
  • Documentation

    • Updated documentation to consistently refer to "Light Token Program."
    • Added comprehensive Light Token terminology reference.
    • Added compressed PDAs and ZK nullifiers documentation.
  • Updates

    • Updated package versions from alpha to beta across all installation instructions.

@tilo-14 tilo-14 closed this Feb 2, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This PR systematically renames "Compressed Token" to "Light Token" across the documentation, updates package versions from alpha to beta releases, adds comprehensive new guides for DeFi integration and Privy workflows, introduces new OpenAPI specifications for cold-mint endpoints, restructures navigation in docs.json, and expands the light-token cookbook with six new operation guides.

Changes

Cohort / File(s) Summary
Configuration & Ignore Files
.gitignore, .mintignore, .mintlifyignore
Added patterns to ignore docs-audit files and node_modules directories for build workflows.
Terminology Rebranding
learn/light-token-standard.mdx, references/terminology.mdx, references/whitepaper.mdx, resources/addresses-and-urls.mdx, snippets/accounts-list/*
Systematically updated references from "Compressed Token Program" to "Light Token Program" across documentation and account descriptions.
Version & Release Updates
changelog.mdx, client-library/client-guide.mdx, snippets/setup/*, snippets/versions/*
Updated package versions from alpha to beta tags for @lightprotocol/stateless.js, @lightprotocol/compressed-token, and zk-compression-cli across all installation instructions.
Light Token Cookbook Guides
light-token/cookbook/approve-revoke.mdx, light-token/cookbook/burn.mdx, light-token/cookbook/freeze-thaw.mdx, light-token/cookbook/load-ata.mdx, light-token/cookbook/transfer-checked.mdx
Added six new comprehensive guides covering approve/revoke, burn, freeze/thaw, load operations, and transfer-with-decimal-check workflows with code examples and prerequisites.
Light Token Cookbook Refactoring
light-token/cookbook/create-ata.mdx, light-token/cookbook/create-mint.mdx, light-token/cookbook/create-token-account.mdx, light-token/cookbook/close-token-account.mdx, light-token/cookbook/mint-to.mdx, light-token/cookbook/transfer-interface.mdx, light-token/cookbook/wrap-unwrap.mdx
Restructured existing cookbook pages to use CodeCompare components, simplified code presentations, and added Rust client examples; removed heavy inline code blocks in favor of external snippet references.
DeFi Integration Documentation
light-token/defi/programs.mdx, light-token/defi/routers.mdx, light-token/welcome.mdx
Added comprehensive guides for integrating rent-free accounts with Light SDK for DeFi programs and routers, including account structures, CPI patterns, and LightProgramInterface trait usage; added welcome page section.
Examples & Client Documentation
light-token/examples/client.mdx, blog/light-token.mdx, home.mdx, compressed-tokens/for-privy.mdx
Added client examples page, removed streaming toolkit links, added Privy integration guide, and updated home page with DeFi integration cards.
API Reference & New Documentation
api-reference/libraries/light-token.mdx, references/light-token.md, references/light-token-terminology.mdx, references/compressed-pda.md, references/testing.md, references/sdk-reference.md, references/zk-nullifiers.md
Added comprehensive reference documentation for Light Token SDK, terminology guide, testing workflows, compressed PDA patterns, and ZK nullifiers with code examples and SDK listings.
OpenAPI Specifications
openapi/getColdMint.yaml, openapi/getColdMintsByAuthority.yaml
Introduced new OpenAPI 3.0.3 endpoint definitions for cold mint data retrieval with JSON-RPC payloads, pagination support, and comprehensive schema definitions.
Navigation & Configuration
docs.json
Restructured site navigation: renamed site to "Light Protocol", added DeFi/Examples groups under Light Token, expanded Cookbook recipes with new guides, reorganized SDK reference libraries, added light-token-terminology to references, and converted redirects to array structure.
Code Snippets - Light Token Operations
snippets/code-snippets/light-token/*/...
Added/updated 100+ code snippet files (MDX) for light-token operations including create-ata, create-mint, mint-to, transfer, burn, freeze/thaw, approve/revoke, wrap/unwrap with both TypeScript/Node.js and Rust client examples.
Code Snippets - Privy Integration
snippets/code-snippets/privy/*/, snippets/ai-prompts/privy-*.mdx
Added comprehensive Privy integration examples: transfer, compress, decompress, balances, transaction history for both Node.js and React, plus AI prompt guides for implementation phases.
Code Snippets - Utilities & React Stash
snippets/code-snippets/privy-react-stash/, snippets/jsx/code-compare.jsx
Added React hooks for transaction signing and sending; enhanced CodeCompare component with Rust syntax highlighting, copy functionality, and dynamic height adjustment.
Code Sample Exports
snippets/code-samples/code-compare-snippets.jsx
Expanded code snippet exports by 40+ new Rust/CPI/Macro code samples across transfer, mint, ATA creation, burn, freeze, approve, revoke operations for SPL and Light Token comparisons.
Build & Copy Scripts
scripts/copy-light-token-snippets.sh, scripts/copy-privy-snippets.sh, scripts/copy-rust-snippets.sh
Added/updated bash scripts to copy TypeScript and Rust code examples from source repositories into documentation snippet directories with proper MDX wrapping.
Overview Tables & Setup
snippets/overview-tables/*, snippets/setup/*, snippets/compressible-rent-explained.mdx
Updated advanced guides table (Privy entry), added cookbook guides and program examples tables, expanded rent explanation with cost breakdown, and updated all setup environment snippets to beta versions.
Streaming Toolkits Documentation
light-token/toolkits/for-streaming-mints.mdx, light-token/toolkits/for-streaming-tokens.mdx
Refactored streaming documentation: updated for-streaming-mints to use account-based filtering and new Mint/MintMetadata structures; simplified for-streaming-tokens with ActionCode/InstructionCode components.
Reference Documentation Updates
references/migration-v1-to-v2.mdx, learn/light-token-standard.mdx, compressed-tokens/advanced-guides/*
Added AI Prompt tab to migration guide, updated Light Token Standard documentation with Light Token Program references, and removed frontmatter from advanced-guide example files.
Spell Check Configuration
cspell.json
Added dictionary entries: Offramp, offramp, offramps, zkcompression, Tasktool, clippy.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~90 minutes

Possibly related PRs

  • chore: update #15: Overlapping modifications to light-token/defi/routers.mdx with enhancements to LightProgramInterface documentation and step clarifications.
  • chore: refactor airdrop guide #13: Parallel changes to compressed-tokens advanced-guides content and the advanced-guides overview table with Privy integration.
  • chore: update programs.md #16: Concurrent refinements to light-token/defi/programs.mdx including FAQ additions and client-SDK improvements.

Poem

🐰 Hops of joy through token lands,
Light Protocol now takes the stands,
From compress to rent-free grace,
New guides show every case,
Privy wrapped in TypeScript dreams—docs bloom! 🌸

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-rust-client

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant