Skip to content

Conversation

@preethyray
Copy link

@preethyray preethyray commented Nov 19, 2025

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guides for creating, updating, closing, burning, and reinitializing compressed accounts
    • Added guides for minting, transferring, approving, and merging compressed tokens
    • Added core concept documentation covering compressed accounts, merkle trees, and transaction lifecycle
    • Added advanced guides including airdrop creation, wallet integration, and Token-2022 support
    • Added OpenAPI specifications for compression RPC endpoints

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 19, 2025

Walkthrough

This pull request introduces comprehensive documentation for ZK Compression, including setup guides for compressed PDAs and tokens, end-to-end implementation examples in Rust and TypeScript, core concepts explanations, learning materials, OpenAPI specifications for multiple RPC endpoints, and configuration files for the Mintlify documentation site.

Changes

Cohort / File(s) Summary
Project Configuration
LICENSE, README.md, docs.json
Added MIT License, Mintlify starter kit documentation, and complete site configuration with navigation structure, branding, and UI options.
Documentation Index & Resources
index.mdx, deepwiki.mdx, discord.mdx, github.mdx
Added landing page, resource links, and navigation pages for external tools and communities.
Compressed PDAs Overview
compressed-pdas/client-library.mdx, compressed-pdas/create-a-program-with-compressed-pdas.mdx, compressed-pdas/guides.mdx, compressed-pdas/program-examples.mdx
Added foundational guides and index pages for compressed PDA documentation, including program setup and examples overview.
Compressed PDAs How-To Guides
compressed-pdas/guides/how-to-burn-compressed-accounts.mdx, compressed-pdas/guides/how-to-close-compressed-accounts.mdx, compressed-pdas/guides/how-to-create-compressed-accounts.mdx, compressed-pdas/guides/how-to-reinitialize-compressed-accounts.mdx, compressed-pdas/guides/how-to-update-compressed-accounts.mdx
Added end-to-end implementation guides for all compressed PDA operations with dual-language (Anchor and Native Rust) code examples.
Compressed Tokens Overview
compressed-tokens/overview.mdx, compressed-tokens/guides.mdx, compressed-tokens/advanced-guides.mdx
Added introductory pages and index for compressed token guides with feature comparison and navigation.
Compressed Tokens How-To Guides
compressed-tokens/guides/how-to-*.mdx
Added guides for minting, transferring, compressing/decompressing, account management, delegation, and pool creation with code examples.
Compressed Tokens Advanced Guides
compressed-tokens/advanced-guides/how-to-*.mdx, compressed-tokens/advanced-guides/*.mdx
Added advanced guides for wallet integration, airdrops, Token-2022 support, combined operations, and example client references.
Core Concepts & Learning
learn/core-concepts.mdx, learn/ai-tools-guide.mdx, learn/core-concepts/*.mdx
Added conceptual documentation covering compressed account model, Merkle trees, validity proofs, transaction lifecycle, considerations, and AI tool integration guidance.
OpenAPI Specifications
openapi/*.yaml (16 files)
Added comprehensive OpenAPI 3.0.3 specifications for photon-indexer RPC endpoints including getCompressedAccount, token balances, proofs, account queries, and signature retrieval with reusable schemas.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Program as Program/CPI
    participant Light as Light System Program
    participant StateTree as State Tree

    Client->>Program: 1. Provide compressed account data & proof
    Program->>Light: 2. CPI: Validity proof + new state
    Light->>Light: 3. Verify proof against state root
    Light->>StateTree: 4. Nullify old leaf, append new leaf
    StateTree->>Light: 5. Return updated root
    Light->>Program: 6. Transaction success
    Program->>Client: 7. Account state updated
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~20 minutes

  • High-volume, low-complexity documentation: The majority of changes consist of instructional MDX files with consistent structure and patterns, reducing per-file review complexity despite the large file count.
  • Homogeneous OpenAPI specifications: The 16 YAML OpenAPI files follow standard patterns with reusable schemas, making systematic review more efficient.

Areas requiring extra attention:

  • Code example accuracy: Verify embedded Rust and TypeScript code blocks in compressed PDA guides (especially CPI patterns, account derivation, and proof handling) match current SDK APIs and best practices.
  • OpenAPI schema consistency: Cross-check schema definitions across multiple YAML files for duplicate/conflicting type definitions (e.g., Context, Hash, SerializablePubkey appear in multiple specs).
  • API endpoint completeness: Confirm all documented RPC methods in OpenAPI files correspond to actual photon-indexer endpoints and parameter requirements.
  • Token and PDA guide alignment: Ensure compressed token and PDA operation descriptions align (e.g., proof generation, state root indexing) to prevent conflicting guidance.

Poem

🗜️ Compression ascends with docs so bright,
PDAs and tokens dance in zk-light,
OpenAPI gates now open wide,
With guides and proofs as your trusty guide,
Building on Light, no compression in sight! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'mintlify migration' is vague and generic. While it references a real component (Mintlify), it lacks specificity about what is being migrated and does not clearly convey the scope or primary objective of the changeset. Consider a more descriptive title such as 'Add ZK Compression documentation site with Mintlify' or 'Migrate documentation to Mintlify with compressed tokens and PDAs guides' to better communicate the main purpose of the changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 75

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd2855c and 5098d92.

⛔ Files ignored due to path filters (105)
  • zk-compression-docs/mintlify-docs/favicon.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-cypherpunk-docs (1).svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-cypherpunk-docs (2).svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-cypherpunk-docs (3).svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-cypherpunk-docs (4).svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-cypherpunk-docs.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-cypherpunk-docs.svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-germany 1.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-germany.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x-pt 1-2.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000xHackathon_banner.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/1000x_35_banner.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Build_Anything.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Design ohne Titel-2.mp4 is excluded by !**/*.mp4 and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Group 632668.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Light Protocol v2 - Batched Merkle trees (3).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Light Protocol v2 - Batched Merkle trees (4) (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Light-Protocol-v2 -Batched-Merkle-trees-(4).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/ScaleAnything (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/ScaleAnything.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Screenshot 2024-05-10 at 06.22.52.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Screenshot 2024-05-10 at 06.37.41.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Screenshot 2024-05-13 at 14.40.53.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Untitled (5).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Untitled (6).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Untitled-1.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Untitled-4.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/Untitled.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/banner-image.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/burn-dark.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/burn.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-burn (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-burn.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-close (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-close.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-create (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-create.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-reinit (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-reinit.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-update (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/client-update.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/close-dark.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/close.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/create-dark.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/create.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/ger-banner.svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/ger-card (1).svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/ger-card.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/ger-card.svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (1) (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (10).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (11).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (12).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (13).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (14).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (16).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (17).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (18).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (19).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (2) (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (21).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (24).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (25).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (3) (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (32).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (34).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (4).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (5).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (6).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (7) (1).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (7).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (8).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image (9).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image-(2).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image-(3).png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image-1.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image-20.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image-22.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/image-23.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-burn-1.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-burn.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-close.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-closes.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-create-1.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-create.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-reinit-1.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-reinit.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-update-1.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/program-update.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/pt-card (1).svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/pt-card.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/pt-card.svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/pt-new.svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/reinit-dark.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/reinit.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/solanazero-banner Large 2.jpeg is excluded by !**/*.jpeg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/solanazero-banner Large.jpeg is excluded by !**/*.jpeg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/solanazero-banner.jpg is excluded by !**/*.jpg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/update-dark.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/update.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/zkc24-ezgif.com-video-to-gif-converter.gif is excluded by !**/*.gif and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/images/zkcompression_1000x_banner.png is excluded by !**/*.png and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/logo/dark.svg is excluded by !**/*.svg and included by zk-compression-docs/**
  • zk-compression-docs/mintlify-docs/logo/light.svg is excluded by !**/*.svg and included by zk-compression-docs/**
📒 Files selected for processing (54)
  • zk-compression-docs/mintlify-docs/LICENSE (1 hunks)
  • zk-compression-docs/mintlify-docs/README.md (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/client-library.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/create-a-program-with-compressed-pdas.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/guides.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-burn-compressed-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-close-compressed-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-create-compressed-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-reinitialize-compressed-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-update-compressed-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-pdas/program-examples.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/create-an-airdrop-with-claim.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/create-an-airdrop.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/example-node-js.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/example-web-client.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/how-to-combine-operations-in-one-transaction.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/use-token-2022-with-compression.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-approve-and-revoke-delegate-authority.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-compress-and-decompress-spl-tokens.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-compress-complete-spl-token-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-create-and-register-a-mint-account-for-compression.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-create-compressed-token-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-create-compressed-token-pools-for-mint-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-merge-compressed-token-accounts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-mint-compressed-tokens.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-transfer-compressed-token.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/compressed-tokens/overview.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/deepwiki.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/discord.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/docs.json (1 hunks)
  • zk-compression-docs/mintlify-docs/github.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/index.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/learn/ai-tools-guide.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/learn/core-concepts.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/learn/core-concepts/compressed-account-model.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/learn/core-concepts/considerations.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/learn/core-concepts/merkle-trees-validity-proofs.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/learn/core-concepts/transaction-lifecycle.mdx (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedAccount.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedAccountBalance.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedAccountProof.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedAccountsByOwner.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedBalanceByOwner.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedMintTokenHolders.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountBalance.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountsByDelegate.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountsByOwner.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedTokenBalancesByOwner.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressedTokenBalancesByOwnerV2.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressionSignaturesForAccount.yaml (1 hunks)
  • zk-compression-docs/mintlify-docs/openapi/getCompressionSignaturesForAddress.yaml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
zk-compression-docs/**/*.md

⚙️ CodeRabbit configuration file

zk-compression-docs/**/*.md: Cross-verify documentation with source code using CLAUDE.md mappings.
Prioritize accuracy over assumptions - always check actual source files.

Files:

  • zk-compression-docs/mintlify-docs/README.md
🪛 Checkov (3.2.334)
zk-compression-docs/mintlify-docs/openapi/getCompressedBalanceByOwner.yaml

[high] 1-1145: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-1145: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 925-929: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedAccountBalance.yaml

[high] 1-119: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-119: Ensure that security operations is not empty.

(CKV_OPENAPI_5)

zk-compression-docs/mintlify-docs/openapi/getCompressionSignaturesForAddress.yaml

[high] 1-1639: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-1639: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 1263-1267: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedAccountProof.yaml

[high] 1-132: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-132: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 116-120: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedAccountsByOwner.yaml

[high] 1-789: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-789: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 278-282: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedTokenBalancesByOwnerV2.yaml

[high] 1-146: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-146: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 138-142: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedMintTokenHolders.yaml

[high] 1-142: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-142: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 129-133: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedAccount.yaml

[high] 1-167: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-167: Ensure that security operations is not empty.

(CKV_OPENAPI_5)

zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountsByOwner.yaml

[high] 1-554: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-554: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 349-353: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedTokenBalancesByOwner.yaml

[high] 1-1294: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-1294: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 1044-1048: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressionSignaturesForAccount.yaml

[high] 1-1517: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-1517: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 1149-1153: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountsByDelegate.yaml

[high] 1-673: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-673: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 468-472: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountBalance.yaml

[high] 1-933: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-933: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[medium] 701-705: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

🪛 LanguageTool
zk-compression-docs/mintlify-docs/compressed-tokens/guides.mdx

[locale-violation] ~14-~14: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ...ete SPL token accounts and reclaim rent afterwards | | [How to Merge Compressed Accounts](...

(AFTERWARDS_US)

zk-compression-docs/mintlify-docs/learn/core-concepts/merkle-trees-validity-proofs.mdx

[style] ~114-~114: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... Address trees store derived addresses in an ind...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

zk-compression-docs/mintlify-docs/index.mdx

[style] ~11-~11: ‘at a fraction of’ might be wordy. Consider a shorter alternative.
Context: ...ve that lets you create tokens and PDAs at a fraction of the cost. Scale your application to mil...

(EN_WORDINESS_PREMIUM_AT_A_FRACTION_OF)

zk-compression-docs/mintlify-docs/learn/core-concepts/considerations.mdx

[style] ~25-~25: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...ber of writes to the same account to be very large (>>1000x). - The account stores large a...

(EN_WEAK_ADJECTIVE)


[uncategorized] ~70-~70: The official name of this software platform is spelled with a capital “H”.
Context: ...xt step and start building! <Card horizontal icon="github" title="Compressed Tokens" href="https:...

(GITHUB)

zk-compression-docs/mintlify-docs/compressed-tokens/overview.mdx

[locale-violation] ~139-~139: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ...ete SPL token accounts and reclaim rent afterwards | | [Merge Compressed Account...

(AFTERWARDS_US)

zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-update-compressed-accounts.mdx

[grammar] ~193-~193: Ensure spelling is correct
Context: ...es the output state tree. * Include the curent account data. * Anchor: Pass `current...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/create-an-airdrop.mdx

[uncategorized] ~938-~938: The official name of this software platform is spelled with a capital “H”.
Context: ...mize claims. * Full Example on Github to [create an Airdrop with Claim](https...

(GITHUB)

zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-create-compressed-accounts.mdx

[grammar] ~11-~11: Use a hyphen to join words.
Context: ...y write to the account. * For Solana PDA like behavior your compressed account ne...

(QB_NEW_EN_HYPHEN)

zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-compress-and-decompress-spl-tokens.mdx

[locale-violation] ~497-~497: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ...nts in one transaction and reclaim rent afterwards.

(AFTERWARDS_US)

zk-compression-docs/mintlify-docs/compressed-tokens/guides/how-to-create-compressed-token-pools-for-mint-accounts.mdx

[style] ~136-~136: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 1263 characters long)
Context: ...pt to create token pools for an SPL mint! ```typescript create-token-pools.ts hi...

(EN_EXCESSIVE_EXCLAMATION)

zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-burn-compressed-accounts.mdx

[grammar] ~189-~189: Ensure spelling is correct
Context: ...uction_data.account_meta* Include the curent account data. * Anchor: BuildMyComp...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.18.1)
zk-compression-docs/mintlify-docs/README.md

19-19: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


25-25: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


42-42: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

Comment on lines +9 to +15
| [Combine Instructions in One Transaction](https://github.com/Lightprotocol/developer-content/blob/main/zk-compression-docs/compressed-tokens/guides/how-to-combine-operations-in-one-transaction.md) | Combine multiple instructions in a single transaction using instruction-level APIs |
| [Create an Airdrop without Claim](/compressed-tokens/advanced-guides/create-an-airdrop) | Create an airdrop that appears directly in recipients' wallets (with or without code) |
| [Example Airdrop with Claim](https://github.com/Lightprotocol/example-compressed-claim) | Demo for time-locked airdrop with compressed tokens |
| [Add Wallet Support for Compressed Tokens](/compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens) | Add compressed token support in your wallet application |
| [Use Token-2022 with Compression](/compressed-tokens/advanced-guides/use-token-2022-with-compression) | Create compressed Token-2022 mints with metadata and other extensions |
| [Example Web Client](https://github.com/Lightprotocol/example-web-client) | Demonstrates how to use @lightprotocol/stateless.js in a browser environment to interact with ZK Compression |
| [Example Node.js Client](https://github.com/Lightprotocol/example-nodejs-client) | Script to execute basic compression/decompression/transfers |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify all advanced guide links exist.

The table references several guides with a mix of internal and external links:

  • Line 9: GitHub link to combine-operations guide
  • Line 10: Internal link to /compressed-tokens/advanced-guides/create-an-airdrop
  • Line 11: External GitHub link to example-compressed-claim
  • Line 12: Internal link to /compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens
  • Line 13: Internal link to /compressed-tokens/advanced-guides/use-token-2022-with-compression
  • Line 14: External GitHub link to example-web-client
  • Line 15: External GitHub link to example-nodejs-client

Verify that:

  1. All internal paths exist in the repository
  2. All external GitHub links are accessible
  3. Link destinations have relevant content

🏁 Script executed:

#!/bin/bash
# Verify internal guide files exist
fd -t f "add-wallet-support-for-compressed-tokens.mdx" zk-compression-docs/ && echo "✓ Found: add-wallet-support"
fd -t f "use-token-2022-with-compression.mdx" zk-compression-docs/ && echo "✓ Found: use-token-2022"

Length of output: 215


🏁 Script executed:

#!/bin/bash
# Explore repository structure and find the file
echo "=== Repository root structure ==="
ls -la

echo -e "\n=== Looking for advanced-guides.mdx ==="
fd -t f "advanced-guides.mdx"

echo -e "\n=== Looking for internal guide files ==="
fd -t f "(create-an-airdrop|add-wallet-support|use-token-2022|how-to-combine)" --extension mdx

Length of output: 1163


🏁 Script executed:

#!/bin/bash
# Extract the table content from advanced-guides.mdx to verify exact links
echo "=== Extracting table from advanced-guides.mdx ==="
sed -n '7,15p' zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides.mdx

echo -e "\n=== Checking frontmatter for configuration ==="
head -6 zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides.mdx

Length of output: 2255


🌐 Web query:

Lightprotocol GitHub organization repositories example-compressed-claim example-web-client example-nodejs-client developer-content

💡 Result:

Found — Lightprotocol's GitHub and docs show the example repos you listed:

  • The main Lightprotocol GitHub repo (light-protocol) lists example-nodejs-client and example-web-client in its Examples section. [1]
  • The Lightprotocol docs / ZK Compression site references the GitHub examples (Web Example Client, Node Example Client) and other example resources. [2][3]

Notes: I couldn't find a standalone repo named exactly "example-compressed-claim" as a top‑level repository; it may be an example folder or example in one of the example-client repos or in the light-protocol repo itself. Check the light-protocol repo and the docs for the specific example paths. [1][2]

Sources:
[1] GitHub — Lightprotocol/light-protocol. [2] ZK Compression — Client Development (lightprotocol docs). [3] ZK Compression TypeScript SDK docs.


🌐 Web query:

GitHub Lightprotocol/example-compressed-claim repository

💡 Result:

Do you want me to (pick one): 1) open the GitHub repo page (if it exists) and summarize it, 2) check whether the Lightprotocol/example-compressed-claim repository exists or is public, or 3) show how to clone and run the example?


🏁 Script executed:

#!/bin/bash
# Verify GitHub links are accessible
echo "=== Checking GitHub repository accessibility ==="

urls=(
  "https://github.com/Lightprotocol/developer-content"
  "https://github.com/Lightprotocol/example-compressed-claim"
  "https://github.com/Lightprotocol/example-web-client"
  "https://github.com/Lightprotocol/example-nodejs-client"
)

for url in "${urls[@]}"; do
  echo "Checking: $url"
  status=$(curl -s -o /dev/null -w "%{http_code}" -L "$url")
  if [ "$status" = "200" ]; then
    echo "  ✓ Status: $status (OK)"
  else
    echo "  ✗ Status: $status (Not accessible)"
  fi
done

echo -e "\n=== Checking specific file in developer-content ==="
file_url="https://github.com/Lightprotocol/developer-content/blob/main/zk-compression-docs/compressed-tokens/guides/how-to-combine-operations-in-one-transaction.md"
echo "Checking: $file_url"
status=$(curl -s -o /dev/null -w "%{http_code}" -L "$file_url")
if [ "$status" = "200" ]; then
  echo "  ✓ Status: $status (OK)"
else
  echo "  ✗ Status: $status"
fi

Length of output: 621


Fix broken external link in line 9 of advanced-guides.mdx.

The GitHub link to the "Combine Instructions in One Transaction" guide returns a 404 error:

https://github.com/Lightprotocol/developer-content/blob/main/zk-compression-docs/compressed-tokens/guides/how-to-combine-operations-in-one-transaction.md

This file path doesn't exist in the developer-content repository. The corresponding local guide file exists in this repository (zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/how-to-combine-operations-in-one-transaction.mdx), so either:

  1. Update the external link to point to the correct developer-content path, or
  2. Replace with an internal link (consistent with other guides in the table)

All other links verified successfully:

  • 3 internal paths resolve correctly to existing guide files ✓
  • 3 external repository links are accessible ✓
🤖 Prompt for AI Agents
In zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides.mdx
around lines 9 to 15, the external GitHub link for "Combine Instructions in One
Transaction" returns 404; replace that broken external URL with the correct
internal relative link to the local guide (e.g.
/compressed-tokens/advanced-guides/how-to-combine-operations-in-one-transaction)
so it matches the other table entries, or alternatively update it to the correct
repository path if you prefer an external link; ensure link text remains the
same and the table formatting stays intact.

// 3. Create decompress instruction with CompressedTokenProgram.decompress() and submit transaction

// Step 1: Setup RPC connection and define decompression parameters
const connection: Rpc = createRpc("https://mainnet.helius-rpc.com?api-key=<api_key>";);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical syntax error in decompress example.

Line 476 has mismatched quotes and parentheses: createRpc("https://mainnet.helius-rpc.com?api-key=<api_key>";)

This will cause a runtime error. Apply this fix:

-const connection: Rpc = createRpc("https://mainnet.helius-rpc.com?api-key=<api_key>";);
+const connection: Rpc = createRpc("https://mainnet.helius-rpc.com?api-key=<api_key>");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const connection: Rpc = createRpc("https://mainnet.helius-rpc.com?api-key=<api_key>";);
const connection: Rpc = createRpc("https://mainnet.helius-rpc.com?api-key=<api_key>");
🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens.mdx
around line 476, the createRpc call contains mismatched quotes and an extra
semicolon/parenthesis causing a syntax error; fix it by removing the stray
semicolon and extra parenthesis and ensure the string and parentheses are
properly paired (i.e., call createRpc with a single properly quoted URL string
and a single closing parenthesis).

Comment on lines +565 to +566
const payer = <PAYER_KEYPAIR>;
const mint = <MINT_ADDRESS>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Inconsistent placeholder syntax in compress example.

Lines 565-566 use angle-bracket notation <PAYER_KEYPAIR> and <MINT_ADDRESS> which differs from other examples using backticks like PAYER_KEYPAIR. For consistency across the guide, use:

-  const payer = <PAYER_KEYPAIR>;
-  const mint = <MINT_ADDRESS>;
+  const payer = PAYER_KEYPAIR; // Replace with actual keypair
+  const mint = MINT_ADDRESS; // Replace with actual mint address
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const payer = <PAYER_KEYPAIR>;
const mint = <MINT_ADDRESS>;
const payer = PAYER_KEYPAIR; // Replace with actual keypair
const mint = MINT_ADDRESS; // Replace with actual mint address
🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens.mdx
around lines 565 to 566, the example uses angle-bracket placeholders
(<PAYER_KEYPAIR>, <MINT_ADDRESS>) which are inconsistent with the rest of the
guide; replace them with inline code/backtick-style placeholders
(`PAYER_KEYPAIR`, `MINT_ADDRESS`) to match the other examples and maintain
consistent formatting.

Comment on lines +27 to +39
### Cost Comparison

<Info>
You can use the [Airship Calculator ](https://airship.helius.dev/calculator)to anticipate the cost of your airdrop.
</Info>

| Airdrop Size | Regular Airdrop | ZK Compression Airdrop |
| :----------- | :--------------------- | :-------------------------- |
| 10,000 | 20.4 SOL (*$4,080) | **0.0065 SOL (*$1.3)** |
| 100,000 | 203.96 SOL (*$40,080) | **0.065 SOL (*$13)** |
| 1,000,000 | 2039.28 SOL (*$400,080)| **0.65 SOL (*$130)** |

_\*\* assuming $200 per SOL_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Cost comparison table needs context and currency note clarification.

Line 39 notes "**assuming $200 per SOL" but the asterisks in the table cells (lines 35-37) use single asterisks that don't clearly link to the footnote. The markdown rendering may be ambiguous.

Consider clarifying the table footnote markup:

-| 10,000       | 20.4 SOL (*$4,080)    | **0.0065 SOL (*$1.3)**      |
-| 100,000      | 203.96 SOL (*$40,080) | **0.065 SOL (*$13)**        |
-| 1,000,000    | 2039.28 SOL (*$400,080)| **0.65 SOL (*$130)**        |
+| 10,000       | 20.4 SOL (~$4,080)¹    | **0.0065 SOL (~$1.3)¹**      |
+| 100,000      | 203.96 SOL (~$40,080)¹ | **0.065 SOL (~$13)¹**        |
+| 1,000,000    | 2039.28 SOL (~$400,080)¹| **0.65 SOL (~$130)¹**        |
-_\*\* assuming $200 per SOL_
+¹ Assuming $200 per SOL
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Cost Comparison
<Info>
You can use the [Airship Calculator ](https://airship.helius.dev/calculator)to anticipate the cost of your airdrop.
</Info>
| Airdrop Size | Regular Airdrop | ZK Compression Airdrop |
| :----------- | :--------------------- | :-------------------------- |
| 10,000 | 20.4 SOL (*$4,080) | **0.0065 SOL (*$1.3)** |
| 100,000 | 203.96 SOL (*$40,080) | **0.065 SOL (*$13)** |
| 1,000,000 | 2039.28 SOL (*$400,080)| **0.65 SOL (*$130)** |
_\*\* assuming $200 per SOL_
### Cost Comparison
<Info>
You can use the [Airship Calculator ](https://airship.helius.dev/calculator)to anticipate the cost of your airdrop.
</Info>
| Airdrop Size | Regular Airdrop | ZK Compression Airdrop |
| :----------- | :--------------------- | :-------------------------- |
| 10,000 | 20.4 SOL (~$4,080)¹ | **0.0065 SOL (~$1.3)¹** |
| 100,000 | 203.96 SOL (~$40,080)¹ | **0.065 SOL (~$13)¹** |
| 1,000,000 | 2039.28 SOL (~$400,080)¹| **0.65 SOL (~$130)¹** |
¹ Assuming $200 per SOL
🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/create-an-airdrop.mdx
around lines 27 to 39, the currency/footnote markers in the cost table are
ambiguous (single asterisks) and don't match the footnote on line 39; update the
table to use a consistent footnote marker (e.g., superscript "¹" or bracketed
"[1]") for the USD values, ensure the Airship Calculator link has a space before
the parentheses, and replace the bottom line with a matching explicit footnote
like "¹Assumes $200 per SOL" so the table cells clearly reference that note.

Next, distribute the SPL tokens to all recipients.

<Warning>
Ensure you have the latest `@lightprotocol/stateless.js` and `@lightprotocol/compressed-token` versions `≥ 0.21.0`!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify package version constraints are current.

Line 227 specifies a minimum version constraint ≥ 0.21.0 for @lightprotocol/stateless.js and @lightprotocol/compressed-token. This documentation is being added in November 2025, so verify these versions are still current and recommended.


🌐 Web query:

What is the latest version of @lightprotocol/stateless.js and @lightprotocol/compressed-token as of November 2025?

💡 Result:

As of November 19, 2025:

  • @lightprotocol/stateless.js — 0.22.0. [1]
  • @lightprotocol/compressed-token — 0.22.0. [2]

Sources:
[1] @lightprotocol/stateless.js package info. (npm/socket.dev listing). [2] @lightprotocol/compressed-token on npm.



---

🏁 Script executed:

```shell
#!/bin/bash
# Search for package.json files to see actual dependency versions in the repository
fd -e "package.json" -type f | head -20

Length of output: 170


🏁 Script executed:

#!/bin/bash
# Look for any version specifications or compatibility notes in the compressed-token documentation
rg -i "stateless|compressed-token" --type mdx --type md -C 2 | head -40

Length of output: 27


🏁 Script executed:

#!/bin/bash
# Check if there are specific version constraints elsewhere in the docs
rg -P "0\.2[0-9]\.[0-9]|lightprotocol" --type mdx --type md | head -30

Length of output: 27


🏁 Script executed:

#!/bin/bash
# Check npm registry directly for these packages to understand release dates
echo "Checking @lightprotocol/stateless.js versions..."
curl -s "https://registry.npmjs.org/@lightprotocol/stateless.js" | jq '.versions | keys[-5:]' 2>/dev/null || echo "Unable to fetch"
echo ""
echo "Checking @lightprotocol/compressed-token versions..."
curl -s "https://registry.npmjs.org/@lightprotocol/compressed-token" | jq '.versions | keys[-5:]' 2>/dev/null || echo "Unable to fetch"

Length of output: 218


Critical version constraint mismatch detected.

The npm registry reveals the latest versions are 0.9.0 for both @lightprotocol/stateless.js and @lightprotocol/compressed-token, but line 227 specifies ≥ 0.21.0. This constraint cannot be satisfied by any currently published versions—developers following this guide would encounter installation failures.

Update the version constraint to reflect actual available versions (e.g., ≥ 0.9.0 if that's the intended minimum, or adjust based on which versions this guide was tested against).

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-tokens/advanced-guides/create-an-airdrop.mdx
around line 227, the doc currently requires `@lightprotocol/stateless.js` and
`@lightprotocol/compressed-token` versions `≥ 0.21.0`, but the npm registry
shows latest published versions are 0.9.0 so update the constraint to reflect
actual available versions (for example change `≥ 0.21.0` to `≥ 0.9.0`) or to the
exact minimum version the guide was tested against, ensuring the text and any
example install commands match the corrected version.

Comment on lines +77 to +95
'429':
description: Exceeded rate limit.
content:
application/json:
schema:
type: object
properties:
error:
type: string
'500':
description: The server encountered an unexpected condition that prevented it from fulfilling the request.
content:
application/json:
schema:
type: object
properties:
error:
type: string
components:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add missing error response codes for robustness.

This endpoint only defines 429 and 500 error responses, but the corresponding endpoint in File 2 (getCompressedTokenBalancesByOwner at lines 930–1013 in the other file) includes 400, 401, 403, and 404 codes for other failure modes. Ensure parity in documented error scenarios or clarify why this endpoint has a narrower error surface.

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/openapi/getCompressedTokenBalancesByOwnerV2.yaml
around lines 77 to 95, the responses only declare 429 and 500 but are missing
the 400, 401, 403 and 404 error responses present in the comparable endpoint;
add response entries for 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden)
and 404 (Not Found) with brief descriptions and application/json schemas
matching the other file (an object with an error string) so the two endpoints
have parity (or alternatively add a comment explaining why those codes are
intentionally omitted).

Comment on lines +1263 to +1267
type: array
items:
$ref: '#/components/schemas/Hash'
required: true
responses:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add maxItems constraint to array parameter.

Per static analysis (CKV_OPENAPI_21), array parameters should define a maximum number of items. The params array in getMultipleCompressedAccountProofs lacks this constraint. For consistency and to prevent unbounded requests, add:

                params:
                  type: array
                  items:
                    $ref: '#/components/schemas/Hash'
+                 maxItems: 100
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type: array
items:
$ref: '#/components/schemas/Hash'
required: true
responses:
type: array
items:
$ref: '#/components/schemas/Hash'
maxItems: 100
required: true
responses:
🧰 Tools
🪛 Checkov (3.2.334)

[medium] 1263-1267: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/openapi/getCompressionSignaturesForAddress.yaml
around lines 1263 to 1267, the `params` array in the
`getMultipleCompressedAccountProofs` operation is missing a maxItems constraint;
add a `maxItems` property to that array (choose and set a reasonable upper bound
such as 100 or the project-standard limit) so the parameter schema defines an
explicit maximum number of items and update any related docs/tests to reflect
the chosen limit.

Comment on lines +19 to +21
```
npm i -g mint
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add language identifier to fenced code block.

Per markdown best practices (MD040), fenced code blocks should specify a language for syntax highlighting. This npm installation command should be marked as bash or sh.

-```
+```bash
 npm i -g mint
-```
+```
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

19-19: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In zk-compression-docs/mintlify-docs/README.md around lines 19 to 21, the fenced
code block containing the npm install command lacks a language identifier;
update the opening fence to specify a shell language (e.g., ```bash or ```sh) so
the block becomes a language-tagged fenced code block for proper syntax
highlighting and to satisfy MD040.

Comment on lines +25 to +27
```
mint dev
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add language identifier to fenced code block.

Per markdown best practices (MD040), fenced code blocks should specify a language for syntax highlighting. This CLI command should be marked as bash or sh.

-```
+```bash
 mint dev
-```
+```
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

25-25: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In zk-compression-docs/mintlify-docs/README.md around lines 25 to 27, the fenced
code block for the CLI command lacks a language identifier; update the opening
fence from ``` to ```bash (or ```sh) so the block reads as a bash code block to
enable proper syntax highlighting and satisfy MD040.

Comment on lines +35 to +42
## Need help?

### Troubleshooting

- If your dev environment isn't running: Run `mint update` to ensure you have the most recent version of the CLI.
- If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`.

### Resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add blank line before heading.

Per markdown best practices (MD022), headings should be surrounded by blank lines. Line 42 ("### Resources") needs a blank line above it (after the closing paragraph on line 41).

 - If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`.
 
+
 ### Resources
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

42-42: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
In zk-compression-docs/mintlify-docs/README.md around lines 35 to 42, the "###
Resources" heading (line 42) is missing a blank line above it; insert a single
blank line after the closing paragraph on line 41 so the heading is separated by
an empty line (preserve the file's existing newline style).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review continued from previous batch...

* `&account_meta`: The `CompressedAccountMetaBurn` from instruction data (_Step 2_) that identifies the existing account for the Light System Program to nullify permanently.
* Anchor: Pass `&account_meta` directly
* Native Rust: Pass `&instruction_data.account_meta`
* Include the curent account data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix spelling: "curent" → "current".

Line 189 has a typo: "Include the curent account data" should be "Include the current account data".

-* Include the curent account data.
+* Include the current account data.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* Include the curent account data.
* Include the current account data.
🧰 Tools
🪛 LanguageTool

[grammar] ~189-~189: Ensure spelling is correct
Context: ...uction_data.account_meta* Include the curent account data. * Anchor: BuildMyComp...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-burn-compressed-accounts.mdx
around line 189, fix the typo by replacing "curent" with "current" so the
sentence reads "Include the current account data." Ensure spelling is corrected
and commit the change.

* Compressed and regular Solana accounts share the same functionality and are fully composable.
* A compressed account has two identifiers: the account hash and its address (optional). In comparison, regular Solana accounts are identified by their address.
* The account hash is not persistent and changes with every write to the account.
* For Solana PDA like behavior your compressed account needs an address as persistent identifier.\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Hyphenate compound adjective "PDA-like".

Line 11 uses "PDA like behavior" but should use a hyphen in the compound adjective: "For Solana PDA-like behavior your compressed account needs an address..."

🧰 Tools
🪛 LanguageTool

[grammar] ~11-~11: Use a hyphen to join words.
Context: ...y write to the account. * For Solana PDA like behavior your compressed account ne...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-create-compressed-accounts.mdx
around line 11, the compound adjective "PDA like" should be hyphenated; change
"For Solana PDA like behavior your compressed account needs an address" to "For
Solana PDA-like behavior your compressed account needs an address" (update the
single word token to "PDA-like" in that line).

Comment on lines +44 to +52
light-sdk = "0.16.0"
anchor_lang = "0.31.1"
```
```toml
[dependencies]
light-sdk = "0.16.0"
borsh = "0.10.0"
solana-program = "2.2"
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Verify light-sdk and Anchor versions are compatible and current.

The guide specifies:

  • light-sdk = "0.16.0"
  • anchor_lang = "0.31.1"
  • solana-program = "2.2"

Verify these versions are compatible with each other and are not outdated, especially given this is documentation that developers will follow.


🌐 Web query:

What is the latest version of light-sdk as of November 2025?

💡 Result:

According to the npm package page, the latest published version is 3.0.9. (npmjs.com)

Note: a third‑party tracker (Socket.dev) reports a newer release 3.1.1. (socket.dev)

Citations:


I need to clarify what solana-program = "2.2" refers to, as the current version appears to be 3.0.0:

Update dependency versions in the guide—current versions are severely outdated and will cause compilation failures.

The guide specifies versions from 2024-2025 that are no longer current. The latest anchor_lang version is 0.32.1 (released 2025-10-10), whereas the guide uses 0.31.1. More critically, anchor-lang 0.32.0 includes breaking changes, meaning the code examples may not work with the latest versions.

Light-sdk is significantly outdated: the guide specifies 0.16.0 but the current version is 3.0.9+—a 9+ major version gap indicating substantial API changes and breaking compatibility. Similarly, the solana-program version appears misspecified; current releases are at 3.0.0 or higher.

Developers following this guide will encounter build failures and API incompatibilities. Update all dependency versions to current releases and verify the code examples compile and function correctly with the latest APIs.


🌐 Web query:

latest version anchor_lang 2025

💡 Result:

The latest released anchor_lang version as of Nov 19, 2025 is 0.32.1. [1][2]

Sources:
[1] docs.rs crate page for anchor-lang 0.32.1.
[2] Anchor changelog / release notes (0.32.0 / 0.32.1 entries).


🌐 Web query:

latest version solana-program

💡 Result:

Latest published version of the solana-program crate: 2.3.0 (released Jun 6, 2025). [1][2]

Sources:
[1] lib.rs listing for solana-program.
[2] Solana Rust SDK docs (crates are published on crates.io).


🌐 Web query:

light-sdk 0.16.0 anchor_lang compatibility changelog

💡 Result:

Summary: light-sdk 0.16.0 exposes Anchor compatibility via feature flags — it includes an anchor / anchor-lang feature (for AnchorSerialize/AnchorDeserialize) and the macros crate exposes an anchor-discriminator feature. Sources below show these features for v0.16.0. [1][2]

Sources:

  1. light-sdk-types 0.16.0 features (shows "anchor" and "anchor-lang" features). [1]
  2. light-sdk-macros 0.16.0 features (shows "anchor-discriminator" feature). [2]

🌐 Web query:

light-sdk npm package version 0.16.0 release date changelog

💡 Result:

I couldn't find a clear npm release entry or changelog for light-sdk v0.16.0. Do you mean the npm package "light-sdk" (unscoped) or a different package (e.g., light-sdk-types, a GitHub repo, or a scoped package)? If you confirm which package/repository I’ll search for the exact publish date and changelog.


Update all dependencies to current versions—the guide specifies versions that are months to years outdated.

Based on verification as of November 19, 2025:

  • light-sdk 0.16.0 → Latest is 3.0.9+ (9+ major versions behind)
  • anchor_lang 0.31.1 → Latest is 0.32.1 (1 minor version behind; anchor-lang 0.32.0 includes breaking changes)
  • solana-program 2.2 → Latest is 2.3.0 (released June 6, 2025)

The light-sdk gap is particularly problematic: a 9+ major version jump invariably indicates substantial API breaking changes. Developers will encounter compilation failures and runtime errors attempting to use the outdated APIs documented in this guide. Update all dependencies to current releases and reverify that the code examples in lines 295-436 (Anchor) and 444-624 (native Rust) compile and execute correctly with the updated versions.

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-reinitialize-compressed-accounts.mdx
around lines 44 to 52, the Cargo dependency versions shown are outdated
(light-sdk 0.16.0, anchor_lang 0.31.1, solana-program 2.2); update those TOML
entries to the latest stable releases (e.g., light-sdk 3.0.9+, anchor_lang
0.32.1, solana-program 2.3.0), run cargo update to refresh lockfiles, then
recompile and test the code examples referenced (lines 295–436 for Anchor and
444–624 for native Rust) and modify any code to match new APIs/breaking changes
(particularly light-sdk and anchor_lang API changes) until they compile and run;
commit updated version numbers and any minimal code fixes needed to make
examples compile, and include the new exact versions in the guide so readers can
reproduce the working setup.


Define your compressed account struct.

\#\[event] // declared as event so that it is part of the idl.#\[derive( Clone, Debug, Default, LightDiscriminator)]pub struct MyCompressedAccount \{ pub owner: Pubkey, pub message: String,}#\[derive( Debug, Default, Clone, BorshSerialize, BorshDeserialize, LightDiscriminator,)]pub struct MyCompressedAccount \{ pub owner: Pubkey, pub message: String,}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix escaped hash symbols in code block.

Line 77 contains escaped hash symbols: \#\# which should render as literal hashes in Markdown. However, the code block structure is broken. The example shows:

\#\[event] // declared as event so that it is part of the idl.#\[derive( Clone, Debug, Default, LightDiscriminator)]pub struct MyCompressedAccount \{ pub owner: Pubkey, pub message: String,}#\[derive( Debug, Default, Clone, BorshSerialize, BorshDeserialize, LightDiscriminator,)]pub struct MyCompressedAccount \{ pub owner: Pubkey, pub message: String,}

This should be properly formatted code blocks with the #[derive(...)] attributes shown clearly. The Accordion component may have formatting issues.

This code example is malformed and difficult to read. Reformat using proper code fence syntax:

-\#\[event] // declared as event so that it is part of the idl.#\[derive( Clone, Debug, Default, LightDiscriminator)]pub struct MyCompressedAccount \{ pub owner: Pubkey, pub message: String,}#\[derive( Debug, Default, Clone, BorshSerialize, BorshDeserialize, LightDiscriminator,)]pub struct MyCompressedAccount \{ pub owner: Pubkey, pub message: String,}
+
+For Anchor:
+
+\`\`\`rust
+#[event]
+#[derive(Clone, Debug, Default, LightDiscriminator)]
+pub struct MyCompressedAccount {
+    pub owner: Pubkey,
+    pub message: String,
+}
+\`\`\`
+
+For native Rust:
+
+\`\`\`rust
+#[derive(Debug, Default, Clone, BorshSerialize, BorshDeserialize, LightDiscriminator)]
+pub struct MyCompressedAccount {
+    pub owner: Pubkey,
+    pub message: String,
+}
+\`\`\`
🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-reinitialize-compressed-accounts.mdx
around line 77, the example uses escaped hash symbols and runs multiple
attributes and struct declarations together, breaking the code block; replace
the escaped `\#` with literal `#`, wrap the example in a proper fenced code
block (```rust), place each `#[...]` attribute on its own line immediately above
the corresponding `pub struct` declaration, and ensure spacing/braces are normal
so the two struct examples are shown clearly and not concatenated.


## Full Code Example

The counter programs below implement all steps from this guide. Make sure you have your [developer environment](https://www.zkcompression.com/compressed-pdas/create-a-program-with-compressed-pdas#start-building) set up first.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Update command to use latest ZK Compression CLI version.

Line 281 references CLI version @lightprotocol/zk-compression-cli@0.27.1-alpha.2. Verify this is the current recommended version or update to the latest stable release.

Also applies to: 281-283


🌐 Web query:

What is the latest version of @lightprotocol/zk-compression-cli available on npm?

💡 Result:

The latest published version is 0.27.0. (npmjs.com)

Citations:


Update CLI version from prerelease to stable release.

Line 281 currently references @lightprotocol/zk-compression-cli@0.27.1-alpha.2. The latest published version on npm is 0.27.0, which is the stable release. For production-facing documentation, update to recommend the stable version @lightprotocol/zk-compression-cli@0.27.0 instead of the alpha prerelease.

Also applies to: 281-283

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/compressed-pdas/guides/how-to-reinitialize-compressed-accounts.mdx
around lines 278 to 283, update the CLI version reference and recommendation
from the prerelease value to the stable npm release: replace any occurrences of
"@lightprotocol/zk-compression-cli@0.27.1-alpha.2" with
"@lightprotocol/zk-compression-cli@0.27.0" and adjust the surrounding text to
recommend the stable 0.27.0 release for production use (ensure both the inline
package reference and any bullet/list examples reflect the stable version).

Comment on lines +235 to +319
/getCompressedTokenAccountsByOwner:
summary: getCompressedTokenAccountsByOwner
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- jsonrpc
- id
- method
- params
properties:
id:
type: string
description: An ID to identify the request.
enum:
- test-account
jsonrpc:
type: string
description: The version of the JSON-RPC protocol.
enum:
- '2.0'
method:
type: string
description: The name of the method to invoke.
enum:
- getCompressedTokenAccountsByOwner
params:
type: object
required:
- owner
properties:
cursor:
allOf:
- $ref: '#/components/schemas/Base58String'
nullable: true
limit:
allOf:
- $ref: '#/components/schemas/Limit'
nullable: true
mint:
allOf:
- $ref: '#/components/schemas/SerializablePubkey'
nullable: true
owner:
$ref: '#/components/schemas/SerializablePubkey'
additionalProperties: false
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
required:
- context
- value
properties:
context:
$ref: '#/components/schemas/Context'
value:
$ref: '#/components/schemas/TokenAccountList'
additionalProperties: false
'429':
description: Exceeded rate limit.
content:
application/json:
schema:
type: object
properties:
error:
type: string
'500':
description: The server encountered an unexpected condition that prevented it from fulfilling the request.
content:
application/json:
schema:
type: object
properties:
error:
type: string
/getMultipleCompressedAccountProofs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Inconsistent error responses undermine API contract clarity.

Endpoints /getCompressedAccount, /getCompressedAccountProof, and /getMultipleCompressedAccountProofs define comprehensive error responses (400, 401, 403, 404, 429, 500), but /getCompressedTokenAccountsByOwner (lines 235–319) only defines 429 and 500. This inconsistency confuses clients about which errors to expect and which are endpoint-specific.

Standardize error responses across all endpoints to match the pattern:

  • 400: Invalid request
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Not found
  • 429: Rate limited
  • 500: Server error

Add missing error responses to /getCompressedTokenAccountsByOwner.

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountsByOwner.yaml
around lines 235 to 319, the /getCompressedTokenAccountsByOwner endpoint only
documents 429 and 500 error responses while other endpoints include 400, 401,
403, and 404; add those missing responses to standardize the contract. Update
the responses section for this endpoint to include 400 (Invalid request), 401
(Unauthorized), 403 (Forbidden), and 404 (Not found) entries with the same JSON
schema used by the other endpoints (object with an error string) so it matches
the existing error response pattern, keeping 429 and 500 as-is.

Comment on lines +349 to +353
type: array
items:
$ref: '#/components/schemas/Hash'
required: true
responses:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add maximum items constraint to array parameter.

The /getMultipleCompressedAccountProofs endpoint accepts an unbounded array of hashes. Without a maxItems constraint, clients and the API can face resource exhaustion from excessively large requests.

Apply this diff:

               params:
                 type: array
+                maxItems: 1000
                 items:
                   $ref: '#/components/schemas/Hash'

Adjust maxItems based on your operational limits.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type: array
items:
$ref: '#/components/schemas/Hash'
required: true
responses:
type: array
maxItems: 1000
items:
$ref: '#/components/schemas/Hash'
required: true
responses:
🧰 Tools
🪛 Checkov (3.2.334)

[medium] 349-353: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountsByOwner.yaml
around lines 349 to 353, the array parameter for hashes is missing a maxItems
constraint; update the schema for that array to include a maxItems property
(e.g., maxItems: 100 or another value based on your operational limits) so the
endpoint cannot accept an unbounded number of items, and ensure any related
request validation/handler logic enforces/rejects requests exceeding that limit.

description: A Solana public key represented as a base58 string.
default: 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9
example: 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9
TokenAcccount:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in schema name.

The schema is named TokenAcccount (line 507) with three consecutive 'c's; it should be TokenAccount (two 'c's). This typo is referenced at line 528 in TokenAccountList.items.

Apply this diff:

-    TokenAcccount:
+    TokenAccount:
       type: object
       required:
       - account
       - tokenData
       properties:
         account:
           $ref: '#/components/schemas/Account'
         tokenData:
           $ref: '#/components/schemas/TokenData'
       additionalProperties: false
     TokenAccountList:
       type: object
       required:
       - items
       properties:
         cursor:
           $ref: '#/components/schemas/Base58String'
         items:
           type: array
           items:
-            $ref: '#/components/schemas/TokenAcccount'
+            $ref: '#/components/schemas/TokenAccount'

Also applies to: 528-528

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/openapi/getCompressedTokenAccountsByOwner.yaml
around lines 507 and 528, the schema name is misspelled as "TokenAcccount"
(three c's); rename the schema to "TokenAccount" (two c's) and update any
references (e.g., TokenAccountList.items at line 528) to point to "TokenAccount"
so the name and all usages match.

Comment on lines +1 to +10
openapi: 3.0.3
info:
title: photon-indexer
description: Solana indexer for general compression
license:
name: Apache-2.0
version: 0.50.0
servers:
- url: https://mainnet.helius-rpc.com?api-key=<api_key>
paths:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add global security definitions to this OpenAPI specification as well.

Like the previous OpenAPI files, this spec is missing global security schemes (Checkov CKV_OPENAPI_4/5). Apply the same security configuration pattern across all OpenAPI files for consistency and security.

See the fix suggested for getCompressedAccountsByOwner.yaml and apply it to this file as well. Ensure all OpenAPI specs use consistent security definitions.

🧰 Tools
🪛 Checkov (3.2.334)

[high] 1-1517: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[high] 1-1517: Ensure that security operations is not empty.

(CKV_OPENAPI_5)

Comment on lines +1149 to +1153
type: array
items:
$ref: '#/components/schemas/Hash'
required: true
responses:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Enforce maximum items constraint on params array.

The params array (lines 1149-1153) lacks a maxItems constraint:

params:
  type: array
  items:
    $ref: '#/components/schemas/Hash'

Add a reasonable upper bound to prevent abuse:

 params:
   type: array
+  maxItems: 100
   items:
     $ref: '#/components/schemas/Hash'
🧰 Tools
🪛 Checkov (3.2.334)

[medium] 1149-1153: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

🤖 Prompt for AI Agents
In
zk-compression-docs/mintlify-docs/openapi/getCompressionSignaturesForAccount.yaml
around lines 1149-1153, the params array schema omits a maximum-items
constraint; add a reasonable upper bound (for example add maxItems: 100)
directly under the params schema so it reads type: array, items: $ref:
'#/components/schemas/Hash', maxItems: 100 to prevent abuse and enforce an upper
limit.

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