From 4377cac0144da50662a777671025a2238a545dd2 Mon Sep 17 00:00:00 2001 From: tilo-14 Date: Sun, 9 Nov 2025 23:10:30 +0000 Subject: [PATCH] Add CLAUDE.md source code mapping and configure CodeRabbit verification - Add CLAUDE.md: ASCII tree mapping docs to source code/examples with GitHub URLs - Configure CodeRabbit: add path_instructions for doc-to-code verification - Update README.md: clarify DeepWiki debugging support - Improve client library README: remove Native Rust sections (Anchor-only) - Remove index.md: superseded by CLAUDE.md - Archive event-1000x-hackathon-sidetracks.md --- .coderabbit.yaml | 28 +- README.md | 2 +- index.md | 264 ---------------- ...d => .event-1000x-hackathon-sidetracks.md} | 0 zk-compression-docs/CLAUDE.md | 285 ++++++++++++++++++ .../compressed-pdas/client-library/README.md | 5 - 6 files changed, 312 insertions(+), 272 deletions(-) delete mode 100644 index.md rename zk-compression-docs/{event-1000x-hackathon-sidetracks.md => .event-1000x-hackathon-sidetracks.md} (100%) create mode 100644 zk-compression-docs/CLAUDE.md diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 5dbe305..5de3c31 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -9,8 +9,33 @@ reviews: - "!node_modules/**" - "!dist/**" - "src/**" - - "zk-compression-docs/**" - "LICENSE" + + # Custom review instructions for specific paths + path_instructions: + - path: "zk-compression-docs/**/*.md" + instructions: | + When reviewing documentation changes: + 1. Verify that all source code references in the documentation exist and are accurate + 2. Check CLAUDE.md to ensure the page-to-source-code mapping is updated if new pages are added + 3. Confirm that code examples match the actual implementation in the linked source files + 4. Validate that GitHub URLs in the documentation tree are correct and accessible + + - path: "zk-compression-docs/CLAUDE.md" + instructions: | + When reviewing CLAUDE.md changes: + 1. Verify that all referenced source code files exist in the light-protocol repository + 2. Ensure all GitHub URLs are valid and point to the correct files + 3. Check that the ASCII tree structure is consistent and properly formatted + 4. Confirm that new documentation pages have corresponding entries in this mapping file + + # General review instructions + review_instructions: | + Cross-verify documentation with source code: + - Use CLAUDE.md as the source of truth for page-to-code mappings + - When source code files are modified, check if corresponding documentation needs updates + - When documentation is added/modified, verify the source code references are accurate + # add linters and other tools, CodeRabbit will run and check these as part of its review process. See a list of supported tools: https://docs.coderabbit.ai/tools/list tools: eslint: @@ -32,4 +57,3 @@ knowledge_base: filePatterns: - "zk-compression-docs/.context/**" - "**/CLAUDE.md" - - ".claude/skills/gitbook-assistant/**" diff --git a/README.md b/README.md index 6f4163d..406ad4d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ Resources for developers to learn and build: [zkcompression.com](https://www.zkcompression.com). -Visit [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/Lightprotocol/developer-content) to query developer documentation in natural language. +Visit [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/Lightprotocol/developer-content) to query developer documentation in natural language and for help with debugging. diff --git a/index.md b/index.md deleted file mode 100644 index 8ab7e08..0000000 --- a/index.md +++ /dev/null @@ -1,264 +0,0 @@ ---- -description: >- - This file provides guidance to Claude Code (claude.ai/code) when working with - developer documentation in this repository. -hidden: true ---- - -# Developer Documentation Index - -## Table of Contents - -- [AI Integration](#ai-integration) -- [Project Overview](#project-overview) -- [Complete Documentation Index](#complete-documentation-index) -- [Development Quick Reference](#development-quick-reference) - - [Program Development (Rust)](#for-program-development-rust) - - [Client Development](#for-client-development) - - [Wallet Integration](#for-wallet-integration) - - [Infrastructure Requirements](#infrastructure-requirements) - - [Key Program IDs](#key-program-ids) - -*** - -> ## AI Integration -> -> This documentation supports AI-powered development workflows: -> -> * **[LLM Index](https://www.zkcompression.com/llms.txt)** — Site map optimized for LLM navigation -> * **[Full LLM Content](https://www.zkcompression.com/llms-full.txt)** — Complete documentation as single file for AI processing -> * **Markdown Export** — Append `.md` to any page URL across the site for raw markdown (e.g., [`whitepaper.md`](https://www.zkcompression.com/references/whitepaper.md)) -> -> ### Deep Wiki & Ask Devin -> * **[Developer Content](https://deepwiki.com/Lightprotocol/developer-content)** — AI-indexed documentation -> * **[Program Examples](https://deepwiki.com/Lightprotocol/program-examples)** — AI-indexed code examples -> * **[Light Protocol Repository](https://deepwiki.com/Lightprotocol/light-protocol)** — AI-indexed source code -*** - -### Complete Documentation Index - -``` -zk-compression-docs/ -│ -├─ [Introduction](README.md) — Introduction to ZK Compression -├─ [Quickstart](quickstart.md) — Create your first compressed token in minutes -├─ [Support](support.md) — Get expert help with ZK Compression, compressed tokens, compressed PDAs, local development and more -├─ [Event: 1000x Hackathon Sidetracks](event-1000x-hackathon-sidetracks.md) — Overview to Local Sidetracks to the Cypherpunk Hackathon -│ -├─ Compressed Tokens/ -│ ├─ [Overview](compressed-tokens/overview.md) — Complete overview to compressed tokens core features, setup guide and cookbook -│ ├─ Guides/ -│ │ ├─ [Index](compressed-tokens/guides/README.md) — Overview of guides to compressed token operations with full code examples -│ │ ├─ [How to Create and Register Mint](how-to-create-and-register-a-mint-account-for-compression.md) — Complete guide to create and register an SPL token mint account for compression with createMint() -│ │ ├─ [How to Create Token Accounts](how-to-create-compressed-token-accounts.md) — Short guide to compressed token account creation with ZK Compression on Solana -│ │ ├─ [How to Mint Compressed Tokens](how-to-mint-compressed-tokens.md) — Complete guide to mint compressed tokens with mintTo() -│ │ ├─ [How to Transfer Compressed Tokens](how-to-transfer-compressed-token.md) — Complete guide to transfer compressed SPL tokens between compressed or regular accounts with transfer() -│ │ ├─ [How to Compress/Decompress SPL Tokens](how-to-compress-and-decompress-spl-tokens.md) — Complete guide to compress SPL tokens with compress() and decompress with decompress(). Best used for transfers -│ │ ├─ [How to Compress Complete Token Accounts](how-to-compress-complete-spl-token-accounts.md) — Complete guide to compress complete SPL Token Accounts with compressSplTokenAccount. Use for account migration and to reclaim rent -│ │ ├─ [How to Merge Token Accounts](how-to-merge-compressed-token-accounts.md) — Complete guide to merge multiple compressed token accounts into a single account with mergeTokenAccounts() -│ │ ├─ [How to Create Token Pools](how-to-create-compressed-token-pools-for-mint-accounts.md) — Complete guide to create and manage token pools for compressed tokens for SPL mints with createTokenPool() -│ │ └─ [How to Approve/Revoke Delegate](how-to-approve-and-revoke-delegate-authority.md) — Complete guide to manage delegate authority for compressed tokens with approve() and revoke() -│ └─ Advanced Guides/ -│ ├─ [Index](compressed-tokens/advanced-guides/README.md) — Reference table mapping all advanced guides with descriptions -│ ├─ [Create an Airdrop](create-an-airdrop.md) — Complete guide to create an airdrop with or without code. ZK compression is the most efficient way to distribute SPL tokens -│ ├─ [Use Token 2022 with Compression](use-token-2022-with-compression.md) — Complete guide to mint, compress and transfer tokens with Token-2022 Metadata with ZK Compression -│ └─ [Add Wallet Support](add-wallet-support-for-compressed-tokens.md) — Complete guide to add Compressed Token Support to Your Wallet Application -│ -├─ Compressed PDAs/ -│ ├─ [Overview](compressed-pdas/overview.md) — Overview to compressed PDA core features -│ ├─ [Create a Program with Compressed PDAs](create-a-program-with-compressed-pdas.md) — Overview to compressed PDA core features and guide for program development -│ ├─ Guides/ -│ │ ├─ [Index](compressed-pdas/guides/README.md) -│ │ ├─ [How to Create Compressed Accounts](how-to-create-compressed-accounts.md) -│ │ │ ├─ Derive unique compressed account address -│ │ │ ├─ Fetch validity proof (proves address doesn't exist) -│ │ │ ├─ Pack accounts and build instruction -│ │ │ └─ Send transaction -│ │ ├─ [How to Update Compressed Accounts](how-to-update-compressed-accounts.md) -│ │ ├─ [How to Close Compressed Accounts](how-to-close-compressed-accounts.md) -│ │ ├─ [How to Reinitialize Compressed Accounts](how-to-reinitialize-compressed-accounts.md) -│ │ └─ [How to Burn Compressed Accounts](how-to-burn-compressed-accounts.md) -│ ├─ Client Library/ -│ │ ├─ [Index](compressed-pdas/client-library/README.md) -│ │ ├─ [Rust](rust.md) -│ │ └─ [TypeScript](typescript.md) -│ └─ Testing Libraries/ -│ ├─ [Index](compressed-pdas/testing-libraries/README.md) -│ ├─ [Light Program Test](light-program-test.md) -│ └─ [Light Client](light-client.md) -│ -├─ Resources/ -│ ├─ [CLI Installation](resources/cli-installation.md) — Steps to set up your local environment for ZK Compression development -│ ├─ [Addresses & URLs](resources/addresses-and-urls.md) — Overview to all of ZK Compression's RPC URLs, Program IDs & Accounts and Lookup Tables -│ ├─ JSON RPC Methods/ -│ │ ├─ [Index](resources/json-rpc-methods/README.md) — Overview of all available ZK compression JSON RPC endpoints on Solana, best practices, and error codes -│ │ ├─ [getCompressedAccount](getcompressedaccount.md) — Retrieve compressed account information by address or hash -│ │ ├─ [getCompressedAccountsByOwner](getcompressedaccountsbyowner.md) — Retrieve all compressed accounts owned by a specific address -│ │ ├─ [getCompressedBalance](getcompressedbalance.md) — Retrieve the lamport balance for a specific compressed account by address or hash -│ │ ├─ [getCompressedBalanceByOwner](getcompressedbalancebyowner.md) — Query the total compressed token balance for a specific account owner -│ │ ├─ [getCompressedMintTokenHolders](getcompressedminttokenholders.md) — Retrieve owner balances for a given mint in descending order -│ │ ├─ [getCompressedTokenAccountBalance](getcompressedtokenaccountbalance.md) — Retrieve the balance for a given token account by address or hash -│ │ ├─ [getCompressedTokenAccountByDelegate](getcompressedtokenaccountbydelegate.md) — Retrieve compressed token accounts that are partially or fully delegated to a given delegate -│ │ ├─ [getCompressedTokenAccountsByOwner](getcompressedtokenaccountsbyowner.md) — Retrieve compressed token accounts owned by a specific address -│ │ ├─ [getCompressedTokenBalancesByOwner](getcompressedtokenbalancesbyowner.md) — Retrieves all token balances for compressed accounts owned by an address -│ │ ├─ [getCompressionSignaturesForAccount](getcompressionsignaturesforaccount.md) — Retrieve the signatures of the transactions that closed or opened a compressed account with the given hash -│ │ ├─ [getCompressionSignaturesForAddress](getcompressionsignaturesforaddress.md) — Retrieve the signatures of the transactions that closed or opened a compressed account with the given address -│ │ ├─ [getCompressionSignaturesForOwner](getcompressionsignaturesforowner.md) — Retrieve the signatures of the transactions that have modified an owner's compressed accounts -│ │ ├─ [getCompressionSignaturesForTokenOwner](getcompressionsignaturesfortokenowner.md) — Retrieve the signatures of the transactions that have modified an owner's compressed token accounts -│ │ ├─ [getIndexerHealth](getindexerhealth.md) — Retrieve an error if the indexer is stale by more than a configurable number of blocks -│ │ ├─ [getIndexerSlot](getindexerslot.md) — Retrieve the slot of the last block indexed by the indexer -│ │ ├─ [getLatestCompressionSignatures](getlatestcompressionsignatures.md) — Retrieve the signatures of the latest transactions that used the compression program (paginated endpoint) -│ │ ├─ [getLatestNonVotingSignatures](getlatestnonvotingsignatures.md) — Retrieve the signatures of the latest transactions that are not voting transactions -│ │ ├─ [getMultipleCompressedAccounts](getmultiplecompressedaccounts.md) — Retrieve multiple compressed accounts with the given addresses or hashes -│ │ ├─ [getMultipleNewAddressProofs](getmultiplenewaddressproofs.md) — Retrieve proofs that the new addresses are not taken already and can be created -│ │ ├─ [getTransactionWithCompressionInfo](gettransactionwithcompressioninfo.md) — Retrieve the transaction data for the transaction with the given signature along with parsed compression info -│ │ └─ [getValidityProof](getvalidityproof.md) — Retrieve a single ZK Proof used by the compression program to verify that the given accounts are valid and the new addresses can be created -│ ├─ SDKs/ -│ │ ├─ [Index](resources/sdks/README.md) — Overview to TypeScript and Rust SDKs for Client and Program Development -│ │ ├─ [Client Development](client-development.md) — Overview to Client side development. Quick access to TypeScript and Rust SDKs -│ │ └─ [Program Development](program-development.md) — Overview to on-chain program development. Quick access to SDKs for Anchor, Pinocchio, or native Rust -│ └─ Error Cheatsheet/ -│ ├─ [Index](resources/error-cheatsheet/README.md) — Complete error code reference for ZK Compression. Search error codes with hex values and messages -│ └─ [Debug ProofVerificationFailed](debug-0x179b-6043-proofverificationfailed.md) — Common cause and debug steps for ProofVerificationFailed (0x179B / 6043) -│ -├─ Learn/ -│ ├─ Core Concepts/ -│ │ ├─ [Index](learn/core-concepts/README.md) — Overview to ZK Compression's Core Concepts. Get a high-level system overview -│ │ ├─ Compressed Account Model/ -│ │ │ ├─ [Overview](compressed-account-model/README.md) — Overview to the Compressed Account Model, State Merkle trees, and Validity Proofs -│ │ │ ├─ [State Merkle Trees](README.md#state-merkle-trees) -│ │ │ └─ [Validity Proofs](README.md#validity-proofs) -│ │ ├─ [Compressed Account Model](learn/core-concepts/compressed-account-model.md) — Overview to compressed account structure and how to access compressed account data -│ │ ├─ [Merkle Trees and Validity Proofs](learn/core-concepts/merkle-trees-validity-proofs.md) — State and address Merkle trees for compressed account storage -│ │ ├─ [Transaction Lifecycle](learn/core-concepts/transaction-lifecycle.md) — Overview to the lifecycle of a transaction that interacts with compressed accounts -│ │ └─ [Considerations](considerations.md) — Overview to considerations of ZK Compression: larger transaction size, higher compute unit usage, and per-transaction state cost -│ └─ [Node Operators](learn/node-operators.md) — Set up ZK Compression infrastructure. Learn how to run Forester nodes, Photon indexers and Prover -│ -├─ References/ -│ ├─ [Whitepaper](references/whitepaper.md) — Complete whitepaper introducing ZK Compression -│ ├─ [Terminology](references/terminology.md) — Overview to terminology related to ZK Compression and Solana -│ └─ [Security](references/security.md) — Overview to Light Protocol's bug bounty program, third party security audits, and formal verification of circuits -│ -└─ Links/ - ├─ [GitHub](https://github.com/Lightprotocol) - ├─ [DeepWiki](https://deepwiki.com/Lightprotocol/light-protocol) - └─ [Discord](https://discord.com/invite/CYvjBgzRFP) -``` - -### Development Quick Reference - -#### For Program Development (Rust) - -**SDK Options:** - -* `light-sdk` (Anchor) — Recommended for new projects. Full Anchor integration with macros -* `light-sdk` (Pinocchio) — Lightweight alternative, smaller binary size -* Native Rust — Direct access to compression primitives - -**Key Dependencies:** - -```toml -[dependencies] -light-sdk = "0.11.0" # For Anchor programs -light-system-program = "1.2.0" -light-compressed-token = "1.2.0" -``` - -**Core Operations:** - -* **Create**: Derive address → Get validity proof → Invoke create instruction -* **Update**: Get account data → Modify → Invoke update with proof -* **Close**: Invoke close instruction → Account removed from state tree -* **Burn**: Permanent deletion (cannot be reinitialized at same address) - -**RPC Methods You'll Need:** - -* `getValidityProof` — Required for creating new compressed accounts -* `getCompressedAccount` — Fetch account data by address/hash -* `getCompressedAccountsByOwner` — Query accounts by owner - -**Testing:** - -* `light-program-test` — Integration testing framework (similar to solana-program-test) -* Run against local test validator with Photon indexer - -#### For Client Development - -**TypeScript SDK:** - -```bash -npm install @lightprotocol/stateless.js @solana/web3.js -``` - -**Key Imports:** - -```typescript -import { Rpc, createRpc } from "@lightprotocol/stateless.js"; -import { createMint, mintTo, transfer } from "@lightprotocol/compressed-token"; -``` - -**Rust Client SDK:** - -```toml -[dependencies] -light-client = "1.2.0" -``` - -**RPC Setup:** - -* Mainnet: `https://zk-compression.solanarpcpool.com/` (rate-limited public endpoint) -* Devnet: `https://devnet.helius-rpc.com?api-key=` (requires API key) -* Local: `http://127.0.0.1:8784` (light test-validator) - -**Common Patterns:** - -* **Compressed tokens**: Create mint → Create token account → Mint tokens → Transfer -* **Compressed PDAs**: Derive address → Fetch proof → Create → Update → Close -* **State queries**: Use RPC methods to fetch account data and balances - -#### For Wallet Integration - -**Requirements:** - -* Support for compressed token accounts (similar to SPL tokens) -* Display compressed token balances via RPC -* Transaction signing for compressed token transfers - -**RPC Methods:** - -* `getCompressedTokenAccountsByOwner` — Get user's compressed token accounts -* `getCompressedTokenBalancesByOwner` — Get aggregated balances by mint -* `getCompressionSignaturesForTokenOwner` — Transaction history - -**Reference Implementation:** See `/compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens.md` - -#### Infrastructure Requirements - -**For Local Development:** - -* Solana test validator with ZK Compression support -* Photon indexer (provides compression RPC methods) -* Prover service (generates validity proofs) - -**Installation:** - -```bash -sh <(curl -sSfL https://release.anza.xyz/stable/install) -solana-install init stable -cargo install --git https://github.com/Lightprotocol/light-protocol light-test-validator -``` - -**For Production:** - -* RPC node with Photon indexer -* Forester nodes (state tree updates) -* Prover infrastructure - -#### Key Program IDs - -``` -Light System Program: H5sFv8VwWmjxHYS2GB4fTDsK7uTtnRT4WiixtHrET3bN -Compressed Token Program: cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m -Account Compression Program: compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq -Noop Program: noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV -``` \ No newline at end of file diff --git a/zk-compression-docs/event-1000x-hackathon-sidetracks.md b/zk-compression-docs/.event-1000x-hackathon-sidetracks.md similarity index 100% rename from zk-compression-docs/event-1000x-hackathon-sidetracks.md rename to zk-compression-docs/.event-1000x-hackathon-sidetracks.md diff --git a/zk-compression-docs/CLAUDE.md b/zk-compression-docs/CLAUDE.md new file mode 100644 index 0000000..1e8cb55 --- /dev/null +++ b/zk-compression-docs/CLAUDE.md @@ -0,0 +1,285 @@ +# ZK Compression Documentation Reference + +Maps documentation pages to source code and examples. + +## Quick Navigation + +- [Compressed Tokens](#compressed-tokens) - TypeScript SDK for token operations +- [Compressed PDAs](#compressed-pdas) - Rust SDK for program development +- [Learn](#learn) - Core concepts and transaction lifecycle +- [Resources](#resources) - CLI, RPC methods, SDKs, errors +- [References](#references) - Whitepaper, node operators, terminology, security + +## Link Prefix Legend + +- `src:` - Source code implementation +- `docs:` - API documentation (docs.rs or TypeDoc) +- `example:` - Complete example repository +- `anchor example:` - Anchor framework implementation +- `native example:` - Native Rust implementation +- `rpc:` - RPC method implementation +- `impl:` - Server-side implementation +- `tool:` - Related tooling + +## Key Repositories + +- **light-protocol**: https://github.com/Lightprotocol/light-protocol +- **photon**: https://github.com/helius-labs/photon +- **program-examples**: https://github.com/Lightprotocol/program-examples + +## Compressed Tokens + +``` +Compressed Tokens + ├── Overview (compressed-tokens/overview.md) + │ └── src: https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-token + ├── Guides (compressed-tokens/guides/README.md) + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-token/src/actions + │ ├── Create Compressed Token Accounts (how-to-create-compressed-token-accounts.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/mint-to.ts + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/transfer.ts + │ ├── Mint Compressed Tokens (how-to-mint-compressed-tokens.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/mint-to.ts + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/approve-and-mint-to.ts + │ ├── Transfer Compressed Token (how-to-transfer-compressed-token.md) + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/transfer.ts + │ ├── Compress and Decompress SPL Tokens (how-to-compress-and-decompress-spl-tokens.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/compress.ts + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/decompress.ts + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/decompress-delegated.ts + │ ├── Compress Complete SPL Token Accounts (how-to-compress-complete-spl-token-accounts.md) + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/compress-spl-token-account.ts + │ ├── Create and Register a Mint Account (how-to-create-and-register-a-mint-account-for-compression.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/create-mint.ts + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/add-token-pools.ts + │ ├── Create Compressed Token Pools (how-to-create-compressed-token-pools-for-mint-accounts.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/create-token-pool.ts + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/add-token-pools.ts + │ ├── Merge Compressed Token Accounts (how-to-merge-compressed-token-accounts.md) + │ │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/merge-token-accounts.ts + │ └── Approve and Revoke Delegate Authority (how-to-approve-and-revoke-delegate-authority.md) + │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/approve.ts + │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/revoke.ts + └── Advanced Guides (compressed-tokens/advanced-guides/README.md) + ├── Combine Instructions in One Transaction (how-to-combine-operations-in-one-transaction.md) + │ └── src: https://github.com/Lightprotocol/light-protocol/tree/main/js/stateless.js/src/actions + ├── Create an Airdrop without Claim (create-an-airdrop.md) + │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/compress.ts + │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/create-mint.ts + │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/create-token-pool.ts + │ ├── example: https://github.com/Lightprotocol/example-token-distribution + │ └── tool: https://github.com/helius-labs/airship + ├── Create an Airdrop with Claim + │ └── example: https://github.com/Lightprotocol/example-compressed-claim + ├── Add Wallet Support for Compressed Tokens (add-wallet-support-for-compressed-tokens.md) + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-token + │ ├── rpc: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compression_signatures_for_owner.rs + │ ├── rpc: https://github.com/helius-labs/photon/blob/main/src/api/method/get_transaction_with_compression_info.rs + │ └── rpc: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_token_balances_by_owner.rs + ├── Use Token 2022 with Compression (use-token-2022-with-compression.md) + │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/create-token-pool.ts + │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/compress.ts + │ └── src: https://github.com/Lightprotocol/light-protocol/blob/main/js/compressed-token/src/actions/transfer.ts + ├── Example Web Client + │ └── example: https://github.com/Lightprotocol/example-web-client + └── Example Node.js Client + └── example: https://github.com/Lightprotocol/example-nodejs-client +``` + +## Compressed PDAs + +``` +Compressed PDAs + ├── Create a Program with Compressed PDAs (compressed-pdas/create-a-program-with-compressed-pdas.md) + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk + │ └── example: https://github.com/Lightprotocol/program-examples + ├── Guides (compressed-pdas/guides/README.md) + │ ├── Create Compressed Accounts (how-to-create-compressed-accounts.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/sdk-libs/sdk/src/account.rs + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/blob/main/sdk-libs/sdk/src/address.rs + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/cpi + │ │ ├── anchor example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/anchor/create + │ │ └── native example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/native/programs/create + │ ├── Update Compressed Accounts (how-to-update-compressed-accounts.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/account + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/instruction + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/cpi + │ │ ├── anchor example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/anchor/update + │ │ └── native example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/native/programs/update + │ ├── Close Compressed Accounts (how-to-close-compressed-accounts.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/account + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/instruction + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/cpi + │ │ ├── anchor example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/anchor/close + │ │ └── native example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/native/programs/close + │ ├── Reinitialize Compressed Accounts (how-to-reinitialize-compressed-accounts.md) + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/account + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/instruction + │ │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/cpi + │ │ ├── anchor example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/anchor/reinit + │ │ └── native example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/native/programs/reinit + │ └── Burn Compressed Accounts (how-to-burn-compressed-accounts.md) + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/account + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/instruction + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/cpi + │ ├── anchor example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/anchor/burn + │ └── native example: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations/native/programs/burn + ├── Client Library (compressed-pdas/client-library/README.md) + │ ├── TypeScript + │ │ ├── stateless docs: https://lightprotocol.github.io/light-protocol/stateless.js/index.html + │ │ ├── token docs: https://lightprotocol.github.io/light-protocol/compressed-token/index.html + │ │ ├── stateless src: https://github.com/Lightprotocol/light-protocol/tree/main/js/stateless.js/src + │ │ ├── token src: https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-token/src + │ │ ├── test example: https://github.com/Lightprotocol/light-protocol/tree/main/js/stateless.js/tests/e2e + │ │ ├── web example: https://github.com/Lightprotocol/example-web-client + │ │ └── nodejs example: https://github.com/Lightprotocol/example-nodejs-client + │ └── Rust + │ ├── docs: https://docs.rs/light-client + │ ├── docs: https://docs.rs/light-program-test + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/client + │ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/program-test + │ └── example: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-tests/client-test/tests + └── Program Examples (compressed-pdas/program-examples.md) + ├── basic-operations: https://github.com/Lightprotocol/program-examples/tree/main/basic-operations + ├── counter: https://github.com/Lightprotocol/program-examples/tree/main/counter + ├── create-and-update: https://github.com/Lightprotocol/program-examples/tree/main/create-and-update + ├── read-only: https://github.com/Lightprotocol/program-examples/tree/main/read-only + ├── account-comparison: https://github.com/Lightprotocol/program-examples/tree/main/account-comparison + └── zk-id: https://github.com/Lightprotocol/program-examples/tree/main/zk-id +``` + +## Learn + +``` +Learn + ├── Core Concepts (learn/core-concepts/README.md) + │ ├── Compressed Account Model (compressed-account-model.md) + │ │ ├── account structure (Rust): https://github.com/Lightprotocol/light-protocol/blob/main/sdk-libs/client/src/indexer/types.rs#L508-L520 + │ │ ├── account structure (TypeScript): https://github.com/Lightprotocol/light-protocol/blob/main/js/stateless.js/src/state/compressed-account.ts + │ │ ├── account data structure: https://github.com/Lightprotocol/light-protocol/blob/main/js/stateless.js/src/state/types.ts + │ │ ├── address derivation (Rust): https://github.com/Lightprotocol/light-protocol/blob/main/sdk-libs/sdk-types/src/address.rs + │ │ └── address derivation (TypeScript): https://github.com/Lightprotocol/light-protocol/blob/main/js/stateless.js/src/utils/address.ts + │ ├── Merkle Trees and Validity Proofs (merkle-trees-validity-proofs.md) + │ │ ├── compressed account hash: https://github.com/Lightprotocol/light-protocol/tree/main/program-libs/compressed-account + │ │ ├── state trees: https://github.com/Lightprotocol/light-protocol/tree/main/programs/account-compression/src/state + │ │ ├── address trees: https://github.com/Lightprotocol/light-protocol/tree/main/programs/account-compression/src/state + │ │ └── validity proof structures: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/instruction + │ ├── Lifecycle of a Transaction (transaction-lifecycle.md) + │ │ ├── Light System Program: https://github.com/Lightprotocol/light-protocol/tree/main/programs/system/src + │ │ ├── Photon indexer: https://github.com/helius-labs/photon + │ │ ├── TypeScript RPC: https://github.com/Lightprotocol/light-protocol/blob/main/js/stateless.js/src/rpc.ts + │ │ ├── Rust indexer client: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/client/src/indexer + │ │ └── read-only example: https://github.com/Lightprotocol/program-examples/tree/main/read-only + │ └── Considerations (considerations.md) + │ ├── Poseidon hasher: https://github.com/Lightprotocol/light-protocol/tree/main/program-libs/hasher + │ ├── CU cost constants: https://github.com/Lightprotocol/light-protocol/blob/main/program-libs/compressible/docs/RENT.md + │ └── Forester node: https://github.com/Lightprotocol/light-protocol/tree/main/forester + └── AI Tools Guide (ai-tools-guide.md) +``` + + +## Resources + +``` +Resources + ├── CLI Installation (cli-installation.md) + │ ├── CLI source: https://github.com/Lightprotocol/light-protocol/tree/main/cli + │ ├── test-validator command: https://github.com/Lightprotocol/light-protocol/blob/main/cli/src/commands/test-validator/index.ts + │ └── CLI commands: https://github.com/Lightprotocol/light-protocol/tree/main/cli/src/commands + ├── Error Cheatsheet (error-cheatsheet/README.md) + │ ├── SystemProgramError: https://github.com/Lightprotocol/light-protocol/blob/main/programs/system/src/errors.rs + │ ├── LightSdkError: https://github.com/Lightprotocol/light-protocol/blob/main/sdk-libs/sdk/src/error.rs + │ ├── program-libs errors: https://github.com/Lightprotocol/light-protocol/tree/main/program-libs + │ └── Debug 0x179b / 6043 / ProofVerificationFailed (debug-0x179b-6043-proofverificationfailed.md) + ├── JSON RPC methods (json-rpc-methods/README.md) + │ ├── Photon indexer: https://github.com/helius-labs/photon + │ ├── TypeScript RPC: https://github.com/Lightprotocol/light-protocol/blob/main/js/stateless.js/src/rpc.ts + │ ├── Rust client RPC: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/client/src/rpc + │ ├── getcompressedaccount (getcompressedaccount.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_account.rs + │ ├── getcompressedaccountsbyowner (getcompressedaccountsbyowner.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_accounts_by_owner.rs + │ ├── getcompressedbalancebyowner (getcompressedbalancebyowner.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_balance_by_owner.rs + │ ├── getcompressedbalance (getcompressedbalance.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_balance.rs + │ ├── getcompressedminttokenholders (getcompressedminttokenholders.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_mint_token_holders.rs + │ ├── getcompressedtokenaccountbalance (getcompressedtokenaccountbalance.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_token_account_balance.rs + │ ├── getcompressedtokenaccountbydelegate (getcompressedtokenaccountbydelegate.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_token_account_by_delegate.rs + │ ├── getcompressedtokenaccountsbyowner (getcompressedtokenaccountsbyowner.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_token_accounts_by_owner.rs + │ ├── getcompressedtokenbalancesbyowner (getcompressedtokenbalancesbyowner.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compressed_token_balances_by_owner.rs + │ ├── getcompressionsignaturesforaccount (getcompressionsignaturesforaccount.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compression_signatures_for_account.rs + │ ├── getcompressionsignaturesforaddress (getcompressionsignaturesforaddress.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compression_signatures_for_address.rs + │ ├── getcompressionsignaturesforowner (getcompressionsignaturesforowner.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compression_signatures_for_owner.rs + │ ├── getcompressionsignaturesfortokenowner (getcompressionsignaturesfortokenowner.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_compression_signatures_for_token_owner.rs + │ ├── getindexerhealth (getindexerhealth.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_indexer_health.rs + │ ├── getindexerslot (getindexerslot.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_indexer_slot.rs + │ ├── getlatestcompressionsignatures (getlatestcompressionsignatures.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_latest_compression_signatures.rs + │ ├── getlatestnonvotingsignatures (getlatestnonvotingsignatures.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_latest_non_voting_signatures.rs + │ ├── getmultiplecompressedaccounts (getmultiplecompressedaccounts.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_multiple_compressed_accounts.rs + │ ├── getmultiplenewaddressproofs (getmultiplenewaddressproofs.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_multiple_new_address_proofs.rs + │ ├── gettransactionwithcompressioninfo (gettransactionwithcompressioninfo.md) + │ │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_transaction_with_compression_info.rs + │ └── getvalidityproof (getvalidityproof.md) + │ └── impl: https://github.com/helius-labs/photon/blob/main/src/api/method/get_validity_proof.rs + ├── SDKs (sdks/README.md) + │ ├── Client Development (client-development.md) + │ │ ├── TypeScript + │ │ │ ├── stateless.js docs: https://lightprotocol.github.io/light-protocol/stateless.js/index.html + │ │ │ ├── stateless.js source: https://github.com/Lightprotocol/light-protocol/tree/main/js/stateless.js/src + │ │ │ ├── stateless.js RPC: https://github.com/Lightprotocol/light-protocol/blob/main/js/stateless.js/src/rpc.ts + │ │ │ ├── compressed-token docs: https://lightprotocol.github.io/light-protocol/compressed-token/index.html + │ │ │ ├── compressed-token source: https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-token/src + │ │ │ ├── e2e test example: https://github.com/Lightprotocol/light-protocol/tree/main/js/stateless.js/tests/e2e + │ │ │ ├── web example: https://github.com/Lightprotocol/example-web-client + │ │ │ └── nodejs example: https://github.com/Lightprotocol/example-nodejs-client + │ │ └── Rust + │ │ ├── light-client docs: https://docs.rs/light-client + │ │ ├── light-client source: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/client + │ │ ├── light-program-test docs: https://docs.rs/light-program-test + │ │ ├── light-program-test source: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/program-test + │ │ └── test example: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-tests/client-test/tests + │ └── Program Development (program-development.md) + │ ├── light-sdk docs: https://docs.rs/light-sdk + │ ├── light-sdk source: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk + │ ├── light-sdk CPI: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/cpi + │ ├── light-sdk account: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk/src/account + │ ├── light-sdk macros: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/macros + │ ├── light-sdk-pinocchio docs: https://docs.rs/light-sdk-pinocchio + │ ├── light-sdk-pinocchio source: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk-pinocchio + │ ├── Light System Program: https://github.com/Lightprotocol/light-protocol/tree/main/programs/system + │ ├── Compressed Token Program: https://github.com/Lightprotocol/light-protocol/tree/main/programs/compressed-token + │ └── Account Compression Program: https://github.com/Lightprotocol/light-protocol/tree/main/programs/account-compression + └── Addresses & URLs (addresses-and-urls.md) + ├── Rust constants: https://github.com/Lightprotocol/light-protocol/blob/main/sdk-libs/sdk-types/src/constants.rs + ├── TypeScript constants: https://github.com/Lightprotocol/light-protocol/blob/main/js/stateless.js/src/constants.ts + ├── test accounts: https://github.com/Lightprotocol/light-protocol/blob/main/sdk-libs/program-test/src/accounts/test_accounts.rs + └── lookup table helper: https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-token/src +``` + +## References + +├── Whitepaper (references/whitepaper.md) +│ └── PDF: https://github.com/Lightprotocol/light-protocol/blob/main/light_paper_v0.1.0.pdf +├── Node Operators (references/node-operators.md) +│ ├── Photon indexer: https://github.com/helius-labs/photon +│ ├── Prover: https://github.com/Lightprotocol/light-protocol/tree/main/light-prover +│ └── Forester: https://github.com/Lightprotocol/light-protocol/tree/main/forester +├── Terminology (references/terminology.md) +└── Security (references/security.md) + └── audits: https://github.com/Lightprotocol/light-protocol/tree/main/audits \ No newline at end of file diff --git a/zk-compression-docs/compressed-pdas/client-library/README.md b/zk-compression-docs/compressed-pdas/client-library/README.md index 8cc4452..6601a3a 100644 --- a/zk-compression-docs/compressed-pdas/client-library/README.md +++ b/zk-compression-docs/compressed-pdas/client-library/README.md @@ -840,11 +840,6 @@ const { remainingAccounts, systemStart, packedStart } = * From Section 3: `packedAddressTreeInfo` (Create) OR `packedInputAccounts` (Update/Close/Reinit/Burn) * From Section 4: `outputStateTreeIndex` (Create/Update/Close/Reinit only - Burn has no output state tree) -{% hint style="info" %} -**Anchor programs:** Pass `remainingAccounts` to `.remainingAccounts()`. The `systemStart` and `packedStart` offsets are used internally by the Light System Program. - -**Native programs:** Include `systemStart` and `packedStart` in your instruction data so the program knows the account array layout. -{% endhint %} {% endtab %} {% tab title="Rust" %}