-
Notifications
You must be signed in to change notification settings - Fork 0
Add Extensions and C-Token documentation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add extensions/ directory with compressible, extensions, and token metadata docs - Add ctoken/ directory with C-Token program documentation - Update docs.json to include new "Extensions & C-Token" tab in navigation Co-Authored-By: Claude <[email protected]>
WalkthroughRenamed navigation tab and reorganized documentation into a new "Compressed Token Program" taxonomy; added many new MDX docs for cMint, cToken, Extensions, and guides; updated snippet links and .gitignore; updated a submodule reference. No executable code changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant SPL as SPL Token Account
participant Pool as Token Pool PDA
participant CToken as Compressed Token Account
Note over User,SPL: Mint/Transfer from SPL to CToken
User->>SPL: create transfer (SPL amount)
SPL->>Pool: transfer to token pool (sync supply)
Pool->>CToken: credit cToken balance (decompressed account)
Note over User,CToken: Decompress back to SPL
User->>CToken: request decompress/transfer
CToken->>Pool: compress to pool (reduce cToken balance)
Pool->>SPL: distribute SPL tokens to destination
Note over Pool: Token Pool PDA mediates supply alignment (new/updated docs describe this flow)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
ctoken/c-token-program.mdx(1 hunks)docs.json(2 hunks)extensions/compressible.mdx(1 hunks)extensions/extensions.mdx(1 hunks)extensions/token-metadata.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
ctoken/c-token-program.mdx
[grammar] ~60-~60: Ensure spelling is correct
Context: ...require rent by default. # cMint Accounts * **cMints are compres...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (14)
docs.json (3)
195-208: Verify external URLs in global anchors are valid and accessible.The new global anchors reference external URLs that should be validated:
- Community Discord:
https://discord.gg/rpddh53TeG(line 199)- About Us:
https://lightprotocol.com/blog#(line 204) — note the trailing#may be unintendedThe About Us link appears to end with
#which typically indicates a fragment identifier but lacks a target. Confirm this is intentional or should behttps://lightprotocol.com/blog.
14-174: Ensure all existing navigation paths remain valid after restructuring.The navigation structure has been significantly reorganized with new groupings and capitalization changes (e.g., "Getting started" → "Getting Started"). Verify that:
- All path references in existing groups still resolve correctly
- No pages were inadvertently removed or duplicated in the restructuring
- Internal references within documentation pages still work
176-193: All navigation paths for the new "Extensions & C-Token" tab are correctly configured and resolve to existing documentation files.Verification confirms all four referenced paths exist as MDX files:
- ✓
extensions/extensions.mdx- ✓
extensions/compressible.mdx- ✓
extensions/token-metadata.mdx- ✓
ctoken/c-token-program.mdxctoken/c-token-program.mdx (3)
78-81: Verify diagram images are available.The documentation references three diagram images that must exist in the documentation assets:
/images/token-explainer.png(line 79)/images/ctoken-explainer.png(line 174)/images/compressed-token-explainer.png(line 318)Confirm these image files exist in the repository at the specified paths.
350-350: Verify the "mint-actions" documentation page exists.Line 350 references
/compressible/mint-actionsas a next steps link. Confirm this page exists in the documentation structure.The "Next Steps" card (lines 346-352) links to
/compressible/mint-actions. Verify this page exists or update the link to point to an existing page.
1-100: LGTM: Overall documentation structure and technical content looks solid.The cMint account documentation is well-organized with clear sections, accurate code examples, and helpful comparisons to SPL standards. The Rust-like pseudocode is readable and represents the core data structures appropriately.
Once the internal link paths are corrected (see separate comments above), the documentation will be ready. Recommend verifying all links render correctly in Mintlify.
extensions/compressible.mdx (4)
29-44: Validate cost figures and timing calculations.The documentation provides specific cost and timing figures that should be validated:
- Line 33: "at least two epochs (12,600 slots / 84 min)" — verify this timing calculation is accurate
- Lines 41-45: Cost comparison table showing allocation and rent costs — confirm these are current
Please verify these figures are accurate and current:
- Confirm that 12,600 slots = 84 minutes on Solana mainnet
- Validate the cost comparison: allocate 0.000011 SOL vs 0.002 SOL for cToken vs SPL
- Confirm rent cost of 0.000005 SOL for 24h is accurate
112-112: Verify external Solscan URL is still valid.Line 112 references a specific Solana address on Solscan for the ATA derivation example:
https://solscan.io/account/cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3mConfirm this Solscan URL is valid and accessible, and that the address is still a current example of an associated cToken account.
248-248: Verify "mint-actions" link target exists.The Next Steps card (lines 244-250) links to
/compressible/mint-actions, which should be verified to exist.Confirm the
/compressible/mint-actionspage exists in the documentation or provide the correct link target.
90-109: LGTM: Code example is clear and well-documented.The Rust code example for creating a compressible token account is readable, includes helpful comments on key parameters, and demonstrates the main configuration options (num_prepaid_epochs, lamports_per_write, etc.).
extensions/token-metadata.mdx (4)
55-59: Verify field length constraints are accurate and complete.The documentation specifies field length constraints:
name: 1-32 characterssymbol: 1-10 charactersuri: 0-200 charactersadditional_metadata: Maximum 20 entries with keys (1-20 characters) and values (0-100 characters)Confirm these constraints match the actual implementation in the Token Metadata extension code.
68-107: Validate code example and verify field names match actual implementation.The code example demonstrates creating a CompressedMint with Token Metadata extension. Verify that:
- Field names (e.g.,
update_authority,mint,name,symbol,uri,additional_metadata) match the actual struct definitions- The nested AdditionalMetadata structure with
keyandvaluefields is accurate- The example follows current best practices
Please verify the code example matches the current implementation of the TokenMetadata extension.
190-190: Verify Next Steps link target exists.The Next Steps card links to
/compressible/mint-actions, which should be validated to exist.Confirm the
/compressible/mint-actionspage exists or provide the correct link target.
109-183: LGTM: Update workflows are clearly documented with good step-by-step organization.The three update operations (UpdateMetadataField, UpdateMetadataAuthority, RemoveMetadataKey) are well-organized using the Steps component, with clear code examples for each operation and helpful notes about constraints.
Once the
*revisit*placeholder on line 30 is replaced with proper content, this documentation will be complete.
| 2. Tokens created from cMints are **cTokens** (fully compatible with SPL tokens). | ||
|
|
||
| <Tip> | ||
| [Token Metadata](compressible/token-metadata) can be added to cMints in the `extensions` field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect internal link path.
Line 72 references compressible/token-metadata but should reference the correct extension page path. The Token Metadata extension is documented at extensions/token-metadata according to docs.json.
Apply this diff:
-[Token Metadata](compressible/token-metadata) can be added to cMints in the `extensions` field.
+[Token Metadata](/extensions/token-metadata) can be added to cMints in the `extensions` field.📝 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.
| [Token Metadata](compressible/token-metadata) can be added to cMints in the `extensions` field. | |
| [Token Metadata](/extensions/token-metadata) can be added to cMints in the `extensions` field. |
🤖 Prompt for AI Agents
In ctoken/c-token-program.mdx around line 72 the internal link points to
compressible/token-metadata but the correct path from docs.json is
extensions/token-metadata; update the Markdown link target to use
extensions/token-metadata so it points to the Token Metadata extension page.
| * A cToken account can only have one owner and hold units of one cMint. | ||
|
|
||
| <Tip> | ||
| * Use the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix inconsistent internal link paths to compressible extension.
Three lines reference /compressible/compressible which appears to be an incorrect path. Based on the navigation structure in docs.json, the compressible extension should be referenced as /extensions/compressible.
Apply this diff:
-* Use the **[compressible extension](/compressible/compressible) for sponsored rent exemption**.
+* Use the **[compressible extension](/extensions/compressible) for sponsored rent exemption**.And similarly for lines 298 and 311:
-Find the [source code to associated cToken accounts here](...)Verify all three instances (lines 166, 298, 311) and update to use /extensions/compressible.
Also applies to: 298-298, 311-311
🤖 Prompt for AI Agents
In ctoken/c-token-program.mdx around lines 166, 298, and 311 the internal links
incorrectly point to /compressible/compressible; update each of those three
instances to use the correct path /extensions/compressible so the links match
docs.json and navigation structure.
extensions/extensions.mdx
Outdated
| <table> | ||
| <thead> | ||
| <tr> | ||
| <th style={{width: '20%', textAlign: 'left'}}></th> | ||
| <th style={{width: '20%', textAlign: 'left'}}>Supported Accounts</th> | ||
| <th style={{width: '45%', textAlign: 'left'}}>Description</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr> | ||
| <td style={{textAlign: 'left'}}>**[Compressible](#compressible)**</td> | ||
| <td style={{textAlign: 'left'}}> | ||
| cToken accounts | ||
| </td> | ||
| <td style={{textAlign: 'left'}}> | ||
| * **Sponsored rent-exemption** | ||
| * 200x cheaper than SPL tokens | ||
| * Must be **added at account creation** | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td style={{textAlign: 'left'}}>**[Token Metadata](#token-metadata)**</td> | ||
| <td>cMint accounts</td> | ||
| <td style={{textAlign: 'left'}}> | ||
| * **Rent-free mint accounts** with Token Metadata | ||
| * Stores information like name, symbol, URI, and custom fields. | ||
| * Must be **added at creation** of cMint | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix table styling inconsistency and verify anchor links.
The table has inconsistent styling on line 34:
- Row 1 (Compressible): All cells have
style={{textAlign: 'left'}}attributes - Row 2 (Token Metadata): Second cell (
<td>cMint accounts</td>) is missing style attribute, while first and third cells have it
Additionally, the links to #compressible and #token-metadata (lines 22, 33) assume anchor IDs exist in the target documents. Verify these anchors are properly defined.
Apply this diff to fix the styling inconsistency:
<tr>
<td style={{textAlign: 'left'}}>**[Token Metadata](#token-metadata)**</td>
- <td>cMint accounts</td>
+ <td style={{textAlign: 'left'}}>cMint accounts</td>
<td style={{textAlign: 'left'}}>📝 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.
| <table> | |
| <thead> | |
| <tr> | |
| <th style={{width: '20%', textAlign: 'left'}}></th> | |
| <th style={{width: '20%', textAlign: 'left'}}>Supported Accounts</th> | |
| <th style={{width: '45%', textAlign: 'left'}}>Description</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td style={{textAlign: 'left'}}>**[Compressible](#compressible)**</td> | |
| <td style={{textAlign: 'left'}}> | |
| cToken accounts | |
| </td> | |
| <td style={{textAlign: 'left'}}> | |
| * **Sponsored rent-exemption** | |
| * 200x cheaper than SPL tokens | |
| * Must be **added at account creation** | |
| </td> | |
| </tr> | |
| <tr> | |
| <td style={{textAlign: 'left'}}>**[Token Metadata](#token-metadata)**</td> | |
| <td>cMint accounts</td> | |
| <td style={{textAlign: 'left'}}> | |
| * **Rent-free mint accounts** with Token Metadata | |
| * Stores information like name, symbol, URI, and custom fields. | |
| * Must be **added at creation** of cMint | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th style={{width: '20%', textAlign: 'left'}}></th> | |
| <th style={{width: '20%', textAlign: 'left'}}>Supported Accounts</th> | |
| <th style={{width: '45%', textAlign: 'left'}}>Description</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td style={{textAlign: 'left'}}>**[Compressible](#compressible)**</td> | |
| <td style={{textAlign: 'left'}}> | |
| cToken accounts | |
| </td> | |
| <td style={{textAlign: 'left'}}> | |
| * **Sponsored rent-exemption** | |
| * 200x cheaper than SPL tokens | |
| * Must be **added at account creation** | |
| </td> | |
| </tr> | |
| <tr> | |
| <td style={{textAlign: 'left'}}>**[Token Metadata](#token-metadata)**</td> | |
| <td style={{textAlign: 'left'}}>cMint accounts</td> | |
| <td style={{textAlign: 'left'}}> | |
| * **Rent-free mint accounts** with Token Metadata | |
| * Stores information like name, symbol, URI, and custom fields. | |
| * Must be **added at creation** of cMint | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> |
🤖 Prompt for AI Agents
In extensions/extensions.mdx around lines 12 to 42, the table has a styling
inconsistency where the second row’s middle cell (<td>cMint accounts</td> on
line ~34) lacks the inline style textAlign:left applied to other cells; update
that cell to include style={{textAlign: 'left'}} to match the row formatting,
ensure all <td> elements in the table use consistent style attributes, and
verify that the anchor IDs referenced by the links ([Compressible] ->
#compressible and [Token Metadata] -> #token-metadata) actually exist in the
document (add or correct the corresponding heading id attributes if missing).
| ## Key Points | ||
|
|
||
| *revisit* | ||
|
|
||
| * cMints with Token Metadata work alongside Token-2022 mints in the same program | ||
| * cMint Token Metadata serializes to identical bytes as Token-2022 metadata. | ||
| * Token Metadata embeds directly in the cMint account without a MetadataPointer extension | ||
| * cMints are rent-free and do not need rent-exempt calculations required by Token-2022 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace placeholder text in Key Points section.
Line 30 contains *revisit* which is incomplete documentation and should be replaced with the actual Key Points content. This appears to be a placeholder that was left in during development.
The placeholder on line 30 must be replaced with substantive content describing the key points of the Token Metadata extension. The current section reads:
## Key Points
*revisit*
* cMints with Token Metadata work alongside Token-2022 mints in the same program
...
The *revisit* text should be removed or replaced with appropriate introductory content for this section.
🤖 Prompt for AI Agents
In extensions/token-metadata.mdx around lines 28 to 36, the Key Points section
contains a placeholder line "*revisit*" (line 30); remove that placeholder and
replace it with a short, substantive introductory sentence (or heading line)
summarizing what follows — e.g., a one-line summary that Token Metadata
extension behavior and compatibility with Token-2022, serialization parity,
embedding in cMint accounts, and rent-free characteristics are the main
takeaways — ensuring the list items remain and the section reads as a complete,
polished summary.
| <td style={{textAlign: 'left'}}>Solana account</td> | ||
| <td style={{textAlign: 'left'}}> | ||
| <ul> | ||
| <li>**Token accounts** derived from cMints (**SPL-compatible**)</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <li>**Token accounts** derived from cMints (**SPL-compatible**)</li> | |
| <li>**Token accounts** (**SPL-compatible**)</li> |
| <td style={{textAlign: 'left'}}> | ||
| <ul> | ||
| <li>**Token accounts** derived from cMints (**SPL-compatible**)</li> | ||
| <li>Optional **sponsored rent** exemption via [compressible extension](#compressible) (200x cheaper than SPL tokens)</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(200x cheaper than SPL tokens)
hm cant see this in the ui
| <ul> | ||
| <li>**Token accounts** derived from cMints (**SPL-compatible**)</li> | ||
| <li>Optional **sponsored rent** exemption via [compressible extension](#compressible) (200x cheaper than SPL tokens)</li> | ||
| <li>Use for token accounts with **frequent writes** (trading, etc.)</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and maybe we can highlight the compress and decompress functionality as well
| <li>**Compressed account** with `TokenData` field</li> | ||
| <li>**Rent-free** and SPL-compatible</li> | ||
| <li>Use for **token distribution** (airdrops, payments, etc.)</li> | ||
| <li>cToken accounts with the **[compressible extension](#compressible) are automatically compressed/decompressed** when active/inactive.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should move this up
| <Note> | ||
| * **cMints are compressed accounts** and **cannot be decompressed**. | ||
| * SPL mints can not be compressed to cMints. | ||
| </Note> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first things you see is what you cant do
|
|
||
| cMints **store data and uniquely identify tokens**, similar to SPL mint accounts with two core differences: | ||
| 1. cMint accounts are **rent-free**. | ||
| 2. Tokens created from cMints are **cTokens** (fully compatible with SPL tokens). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, tokens minted by cmints can be both in ctoken accounts and compressed token accounts.
| /> | ||
| </Frame> | ||
| </Tab> | ||
| <Tab title="Source Code"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would remove this, doesn't add additional value here.
|
|
||
| The `metadata` field is used by the Compressed Token Program to store the internal state of a cMint. | ||
|
|
||
| The `BaseMint` field replicates the field layout and serialization format of [SPL Mint accounts](https://solana.com/docs/tokens#mint-account). The struct is serialized with Borsh to match the on-chain format of SPL tokens and mints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The `BaseMint` field replicates the field layout and serialization format of [SPL Mint accounts](https://solana.com/docs/tokens#mint-account). The struct is serialized with Borsh to match the on-chain format of SPL tokens and mints. | |
| The `BaseMint` field replicates the field layout and serialization format of [SPL Mint accounts](https://solana.com/docs/tokens#mint-account). |
I manually implemented borsh serialization but spl mint and token accounts dont follow default borsh serialization format.
| <td style={{textAlign: 'center'}}>✓</td> | ||
| </tr> | ||
| <tr> | ||
| <td>cMint Data</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have an expandable what Mint Data is just for completeness.
| <td style={{textAlign: 'center'}}>-</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Extensions</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could add that we only support TokenMetadata extension on Mint level while Token-2022 has TokenMetadata and many more extensions that we don't support (like 25 or so we shouldn't list them all).
| <Note> | ||
| **cToken accounts are Solana accounts**, not compressed accounts. | ||
| </Note> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it! Could we move it down a bit so that we start with description not an info box?
Or just make it the first bullet point.
|
|
||
| <Tip> | ||
| * Use the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. | ||
| * cToken accounts with this extension are **automatically compressed** with no writes in 6300 slots (1.75 hours), **and decompressed** with new writes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * cToken accounts with this extension are **automatically compressed** with no writes in 6300 slots (1.75 hours), **and decompressed** with new writes. | |
| * cToken accounts with this extension are **automatically compressed** have sponsored rent exemption and pay rent, once epoch rent 6300 slots (1.75 hours) is not covered. It can be **decompressed** again once it is needed. |
sth like this, is definitely not optimal should be improved.
| </Tabs> | ||
|
|
||
| <Info> | ||
| Find the [source code of cToken here](https://github.com/Lightprotocol/light-protocol/blob/main/program-libs/ctoken-types/src/state/ctoken/ctoken.rs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
| Find the [source code of cToken here](https://github.com/Lightprotocol/light-protocol/blob/main/program-libs/ctoken-types/src/state/ctoken/ctoken.rs). | ||
| </Info> | ||
|
|
||
| cToken accounts replicate the field layout and serialization format of [SPL Token accounts](https://solana.com/docs/tokens#token-account). The struct is serialized with Borsh to match the on-chain format of SPL tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| cToken accounts replicate the field layout and serialization format of [SPL Token accounts](https://solana.com/docs/tokens#token-account). The struct is serialized with Borsh to match the on-chain format of SPL tokens. | |
| cToken accounts replicate the field layout and serialization format of [SPL Token accounts](https://solana.com/docs/tokens#token-account). |
| </tr> | ||
| <tr> | ||
| <td>extensions</td> | ||
| <td style={{textAlign: 'center'}}>✓</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <td style={{textAlign: 'center'}}>✓</td> | |
| <td style={{textAlign: 'center'}}>✓ (Compressible)</td> |
| # Associated cToken Account | ||
|
|
||
| **Associated cToken** accounts follow the same pattern as [associated token accounts](https://docs.solana.com/developing/programming-model/associated-token-account) (ATA): | ||
| * Each wallet needs its own cToken account to hold tokens from the same cMint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each wallet needs its own cToken account to hold tokens from the same cMint.
What do you want to say?
| <table> | ||
| <thead> | ||
| <tr> | ||
| <th style={{width: '10%', textAlign: 'left'}}>Parameter</th> | ||
| <th style={{width: '45%', textAlign: 'left'}}>cToken ATA</th> | ||
| <th style={{width: '30%', textAlign: 'left'}}>SPL ATA</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr> | ||
| <td>owner</td> | ||
| <td colspan="2" style={{textAlign: 'center'}}>wallet address</td> | ||
| </tr> | ||
| <tr> | ||
| <td>program_id</td> | ||
| <td>COMPRESSED_TOKEN_PROGRAM_ID</td> | ||
| <td>SPL_TOKEN_PROGRAM_ID</td> | ||
| </tr> | ||
| <tr> | ||
| <td>mint</td> | ||
| <td colspan="2" style={{textAlign: 'center'}}>mint address</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't like the table better add two code snippets or grapics.
| </Info> | ||
|
|
||
| <Tip> | ||
| cToken ATAs can implement the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| cToken ATAs can implement the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. | |
| cToken ATAs support the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. |
or can be initialized with
| # Compressed Token Account | ||
|
|
||
| <Note> | ||
| * Compressed token accounts are stored as `TokenData` in **compressed accounts**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Compressed token accounts are stored as `TokenData` in **compressed accounts**. | |
| * Compressed token accounts are stored in **compressed accounts**. |
|
|
||
| <Note> | ||
| * Compressed token accounts are stored as `TokenData` in **compressed accounts**. | ||
| * Leading **wallets** like Phantom and Backpack **support compressed tokens**. The UI does not distinguish between SPL and compressed tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not the right place imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and pretty salesy maybe we a table with wallet support is less salesy
| * Leading **wallets** like Phantom and Backpack **support compressed tokens**. The UI does not distinguish between SPL and compressed tokens. | ||
| </Note> | ||
|
|
||
| Compressed token accounts store token balance, owner, and other information for SPL tokens and cTokens. Any cToken or SPL token can be compressed at will. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Compressed token accounts store token balance, owner, and other information for SPL tokens and cTokens. Any cToken or SPL token can be compressed at will. | |
| Compressed token accounts store token balance, owner, and other information for SPL tokens and cTokens. Any cToken or SPL token can be compressed. |
| <Tip> | ||
| **cToken accounts** with the **[compressible extension](/compressible/compressible) are automatically compressed** with no writes in 6300 slots (1.75 hours), and decompressed with new writes. | ||
| </Tip> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <Tip> | |
| **cToken accounts** with the **[compressible extension](/compressible/compressible) are automatically compressed** with no writes in 6300 slots (1.75 hours), and decompressed with new writes. | |
| </Tip> |
a bit redundant
| </Tip> | ||
|
|
||
| <Tabs> | ||
| <Tab title="Diagram"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the diagram can we make Account -> Compressed Account ?
| </Tab> | ||
| </Tabs> | ||
|
|
||
| <Info> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So many boxes so little other text xD
|
|
||
| <Info> | ||
| * Compressed token accounts use the hash as identifier by default. Find the [source code here](https://github.com/Lightprotocol/light-protocol/blob/main/programs/compressed-token/program/src/compressed_token_account.rs). | ||
| * Addresses are optional, since ensuring that the address of a new account is unique incurs additional computational overhead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not necessary
extensions/extensions.mdx
Outdated
| ## Key Points | ||
|
|
||
| * Like Token 2022, each extension adds specific state to an account. | ||
| * Depending on the extension, it can be added at account creation or existing accounts can migrate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Depending on the extension, it can be added at account creation or existing accounts can migrate. |
In token 22 extensions can only be added at mint creation.
Its the same for cmints and ctokens.
| * The creator still must pay the rent-exemption balance. | ||
| </Note> | ||
|
|
||
| **Compressible accounts** build on top of Solana's rent system, but use epochs with a length of 6300 slots to calculate rent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solanas 'rent system' is not really a rent system anymore since rent is not charged just rent exemption.
|
|
||
| Here are the steps to create a compressible account: | ||
|
|
||
| 1. **Set the initial lamports balance** to N epochs (must be at least 2 epochs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. **Set the initial lamports balance** to N epochs (must be at least 2 epochs) | |
| 1. **Set the initial lamports balance** to N epochs (must be 0 or at least 2 epochs) |
| * The account stays decompressed for N epochs. | ||
|
|
||
| * Paid by the **account creator**. | ||
| 2. **Set the top-up amount** for writes when the account balance falls below the set lamports balance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 2. **Set the top-up amount** for writes when the account balance falls below the set lamports balance. | |
| 2. **Set the top-up amount** for writes when the account balance falls below 2 epochs rent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that claiming is lazy and does not happen every epoch. It would not be worth to send so many transactions. We might start without claiming alltogether and just claim when compressing and closing.
| * Paid by the **account creator**. | ||
| 2. **Set the top-up amount** for writes when the account balance falls below the set lamports balance. | ||
| * Determines how much lamports are added when the account needs a top-up. | ||
| * Top-ups are made by the **transaction fee payer** when the account is written to and is below the set lamports balance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repetitive
| * Top-ups are made by the **transaction fee payer** when the account is written to and is below the set lamports balance. | ||
|
|
||
| <Note> | ||
| * Accounts become compressible when they advance two epochs without new transactions that add lamports. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, when the lamport balance doesn't cover rent for the current epoch anymore.
|
|
||
| <Note> | ||
| * Accounts become compressible when they advance two epochs without new transactions that add lamports. | ||
| * A forester node compresses the account after these two epochs and the protocol can reclaim the rent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * A forester node compresses the account after these two epochs and the protocol can reclaim the rent. | |
| * A forester node compresses the account once rent is not covered and to reclaim the rent exemption of the account for the protocol. |
| </Note> | ||
|
|
||
| ```rust | ||
| use light_token_client::actions::{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls don't use the token client in code examples it is currently only a test utility we will not release this immediately.
| <td>Base compression cost<br />+ protocol incentive</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Transaction fee</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <td>Transaction fee</td> | |
| <td>Solana Transaction fee</td> |
| <td>Solana rent exemption</td> | ||
| <td>~2,700,480 lamports</td> | ||
| <td>Rent sponsor PDA</td> | ||
| <td>Rent-exemption balance</td> | ||
| </tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is confusing since these are not costs the user bears.
| </tr> | ||
| <tr> | ||
| <td>Transaction fee</td> | ||
| <td>5,000-10,000 lamports</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <td>5,000-10,000 lamports</td> | |
| <td>5,000 lamports</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should remove it and just say + solana tx fee since maybe they are paying priority fees as well.
Also we need to make it very clear that this is not our fee.
| <tr> | ||
| <td>Compressible<br />(ran out of rent)</td> | ||
| <td>`lamports_per_write + rent_deficit`</td> | ||
| <td>Configured top-up: 5,000 lamports<br />Rent deficit: 3,000 lamports<br />Total payer cost: 8,000 lamports</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also needs to pay compression incentive again 11k lamports
| </table> | ||
|
|
||
| <Note> | ||
| Top-ups are additional to standard Solana transaction fees (typically <10,000 lamports). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Top-ups are additional to standard Solana transaction fees (typically <10,000 lamports). | |
| Top-ups are additional to standard Solana transaction fees and can be configured at compressible ctoken account creation. Top ups keep the ctoken accounts rent funded while it is being used regularly. |
|
|
||
| Compressible accounts can be closed by two parties. How rent and lamports balance are distributed depends on which party closes the account. | ||
|
|
||
| 1. The **Account Owner** can close the account at any time, regardless of rent status. The account is not compressed in this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. The **Account Owner** can close the account at any time, regardless of rent status. The account is not compressed in this case. | |
| 1. The **Account Owner** can close the account at any time, regardless of rent status. |
The account is not compressed in this case.
it can be its up to the owner the owner can do anything
- Rename 'Compressed Tokens' tab to 'Compressed Token Program' - Move c-token-program.mdx from ctoken/ to compressed-token-program/ - Reorganize compressed token guides into basic-guides/ and advanced-guides/ subdirectories - Move token-metadata.mdx from extensions/ to compressed-token-program/extensions/ - Add compressed-token-overview.mdx as main token overview - Create ctoken.mdx from compressible.mdx extension documentation - Update docs.json navigation to reflect new hierarchy - Update snippet tables for new guide structure - Remove redundant index pages (compressed-tokens/guides.mdx, advanced-guides.mdx, extensions.mdx)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
♻️ Duplicate comments (1)
compressed-token-program/c-token-program.mdx (1)
70-70: Fix incorrect internal link path to Token Metadata extension.Line 70 references
compressible/token-metadatabut the correct path according to docs.json is/extensions/token-metadata.Apply this diff:
-[Token Metadata](compressible/token-metadata) can be added to cMints in the `extensions` field. +[Token Metadata](/extensions/token-metadata) can be added to cMints in the `extensions` field.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
.gitignore(1 hunks)compressed-token-program/c-token-program.mdx(1 hunks)compressed-token-program/compressed-tokens/compressed-token-overview.mdx(1 hunks)compressed-token-program/ctoken.mdx(1 hunks)compressed-token-program/extensions/token-metadata.mdx(1 hunks)compressed-token-program/overview.mdx(0 hunks)docs.json(2 hunks)mintlify-docs/docs(1 hunks)snippets/compressed-tokens-advanced-guides-table.mdx(1 hunks)snippets/compressed-tokens-guides-table.mdx(1 hunks)
💤 Files with no reviewable changes (1)
- compressed-token-program/overview.mdx
✅ Files skipped from review due to trivial changes (3)
- mintlify-docs/docs
- compressed-token-program/compressed-tokens/compressed-token-overview.mdx
- compressed-token-program/extensions/token-metadata.mdx
🧰 Additional context used
🪛 GitHub Check: Mintlify Validation (luminouslabs-cc5545c6) - vale-spellcheck
compressed-token-program/c-token-program.mdx
[warning] 4-4: compressed-token-program/c-token-program.mdx#L4
Did you really mean 'cMints'?
[warning] 4-4: compressed-token-program/c-token-program.mdx#L4
Did you really mean 'cTokens'?
[warning] 7-7: compressed-token-program/c-token-program.mdx#L7
Did you really mean 'Solana'?
[warning] 30-30: compressed-token-program/c-token-program.mdx#L30
Did you really mean 'Solana'?
[warning] 33-33: compressed-token-program/c-token-program.mdx#L33
Did you really mean 'cMints'?
[warning] 47-47: compressed-token-program/c-token-program.mdx#L47
Did you really mean 'cToken'?
[warning] 58-58: compressed-token-program/c-token-program.mdx#L58
Did you really mean 'cMint'?
[warning] 61-61: compressed-token-program/c-token-program.mdx#L61
Did you really mean 'cMints'?
[warning] 65-65: compressed-token-program/c-token-program.mdx#L65
Did you really mean 'cMints'?
[warning] 66-66: compressed-token-program/c-token-program.mdx#L66
Did you really mean 'cMint'?
[warning] 67-67: compressed-token-program/c-token-program.mdx#L67
Did you really mean 'cMints'?
[warning] 67-67: compressed-token-program/c-token-program.mdx#L67
Did you really mean 'cTokens'?
[warning] 70-70: compressed-token-program/c-token-program.mdx#L70
Did you really mean 'cMints'?
[warning] 78-78: compressed-token-program/c-token-program.mdx#L78
Did you really mean 'cMint'?
[warning] 78-78: compressed-token-program/c-token-program.mdx#L78
Did you really mean 'cMint'?
[warning] 78-78: compressed-token-program/c-token-program.mdx#L78
Did you really mean 'cMint'?
[warning] 87-87: compressed-token-program/c-token-program.mdx#L87
Did you really mean 'cMint'?
[warning] 97-97: compressed-token-program/c-token-program.mdx#L97
Did you really mean 'cMints'?
[warning] 100-100: compressed-token-program/c-token-program.mdx#L100
Did you really mean 'cMint'?
[warning] 102-102: compressed-token-program/c-token-program.mdx#L102
Did you really mean 'Borsh'?
[warning] 104-104: compressed-token-program/c-token-program.mdx#L104
Did you really mean 'cMints'?
[warning] 109-109: compressed-token-program/c-token-program.mdx#L109
Did you really mean 'cMint'?
[warning] 115-115: compressed-token-program/c-token-program.mdx#L115
Did you really mean 'mint_authority'?
[warning] 130-130: compressed-token-program/c-token-program.mdx#L130
Did you really mean 'is_initialized'?
[warning] 135-135: compressed-token-program/c-token-program.mdx#L135
Did you really mean 'freeze_authority'?
[warning] 140-140: compressed-token-program/c-token-program.mdx#L140
Did you really mean 'cMint'?
[warning] 152-152: compressed-token-program/c-token-program.mdx#L152
Did you really mean 'cToken'?
[warning] 155-155: compressed-token-program/c-token-program.mdx#L155
Did you really mean 'Solana'?
[warning] 158-158: compressed-token-program/c-token-program.mdx#L158
Did you really mean 'cToken'?
[warning] 159-159: compressed-token-program/c-token-program.mdx#L159
Did you really mean 'cToken'?
🪛 LanguageTool
snippets/compressed-tokens-guides-table.mdx
[locale-violation] ~7-~7: 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 | | [Create and Register a Mi...
(AFTERWARDS_US)
compressed-token-program/c-token-program.mdx
[grammar] ~58-~58: Ensure spelling is correct
Context: ...require rent by default. # cMint Accounts * **cMints are compres...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (3)
.gitignore (1)
5-6: Ignore AI auxiliary files.Adding
.claudeand.contextto.gitignoreis consistent with the existing pattern of excluding auxiliary editor and AI tool files.snippets/compressed-tokens-advanced-guides-table.mdx (1)
1-9: Path updates are consistent.All guide links have been updated to the new
/compressed-token-program/compressed-tokens/base paths, aligning with the navigation restructuring in docs.json.docs.json (1)
39-77: Navigation restructuring is comprehensive and well-organized.The reorganization from a flat "Compressed Tokens" structure to a "Compressed Token Program" tab with "Basic Guides" and "Advanced Guides" subgroups provides better information architecture. All path updates are consistent across both tabs.
Also applies to: 173-211
| @@ -0,0 +1,351 @@ | |||
| --- | |||
| title: Compressed Token Program | |||
| sidebarTitle: Overview New | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up the sidebarTitle value.
The sidebarTitle contains "Overview New" which appears incomplete or residual from an editing session.
Apply this diff:
-sidebarTitle: Overview New
+sidebarTitle: Overview📝 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.
| sidebarTitle: Overview New | |
| sidebarTitle: Overview |
🤖 Prompt for AI Agents
In compressed-token-program/c-token-program.mdx around line 3, the frontmatter
key sidebarTitle is set to "Overview New" which looks like leftover text; update
that value to a clean title such as "Overview" (or the intended concise title),
ensuring the frontmatter line reads sidebarTitle: Overview (or sidebarTitle:
"Overview" if quoting is required by the file) and save the file.
| | [Mint Compressed Tokens](/compressed-token-program/compressed-tokens/basic-guides/how-to-mint-compressed-tokens) | Create new compressed tokens to existing mint | | ||
| | [Transfer Compressed Tokens](/compressed-token-program/compressed-tokens/basic-guides/how-to-transfer-compressed-token) | Move compressed tokens between compressed accounts | | ||
| | [Decompress and Compress Tokens](/compressed-token-program/compressed-tokens/basic-guides/how-to-compress-and-decompress-spl-tokens) | Convert SPL tokens between regular and compressed format | | ||
| | [Compress Complete SPL Token Accounts](/compressed-token-program/compressed-tokens/basic-guides/how-to-compress-complete-spl-token-accounts) | Compress complete SPL token accounts and reclaim rent afterwards | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use American English spelling.
Line 7 uses "afterwards" but the standard American English variant is "afterward."
Apply this diff:
-| [Compress Complete SPL Token Accounts](/compressed-token-program/compressed-tokens/basic-guides/how-to-compress-complete-spl-token-accounts) | Compress complete SPL token accounts and reclaim rent afterwards |
+| [Compress Complete SPL Token Accounts](/compressed-token-program/compressed-tokens/basic-guides/how-to-compress-complete-spl-token-accounts) | Compress complete SPL token accounts and reclaim rent afterward |📝 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.
| | [Compress Complete SPL Token Accounts](/compressed-token-program/compressed-tokens/basic-guides/how-to-compress-complete-spl-token-accounts) | Compress complete SPL token accounts and reclaim rent afterwards | | |
| | [Compress Complete SPL Token Accounts](/compressed-token-program/compressed-tokens/basic-guides/how-to-compress-complete-spl-token-accounts) | Compress complete SPL token accounts and reclaim rent afterward | |
🧰 Tools
🪛 LanguageTool
[locale-violation] ~7-~7: 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 | | [Create and Register a Mi...
(AFTERWARDS_US)
🤖 Prompt for AI Agents
In snippets/compressed-tokens-guides-table.mdx around line 7, change the
American English spelling by replacing "afterwards" with "afterward" in the
table cell so the line reads "...and reclaim rent afterward". Make only this
spelling adjustment and keep the rest of the row intact.
- Add card-based layout to compressed-token-overview.mdx for use cases - Include cost comparison table showing 50,000x reduction for 100k accounts - Organize advanced guides into Integration and Examples subgroups in docs.json - Convert guide tables from markdown to HTML tables with explicit width styling - Update terminology from 'Regular SPL Token' to 'SPL Token' in overview - Expand expanded property for advanced guide subgroups for better UX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
compressed-token-program/compressed-tokens/compressed-token-overview.mdx(1 hunks)compressed-token-program/overview.mdx(1 hunks)docs.json(2 hunks)snippets/compressed-tokens-advanced-guides-table.mdx(1 hunks)snippets/compressed-tokens-guides-table.mdx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- snippets/compressed-tokens-guides-table.mdx
- compressed-token-program/compressed-tokens/compressed-token-overview.mdx
- compressed-token-program/overview.mdx
🔇 Additional comments (3)
docs.json (3)
184-235: Clarify the intentionality of the duplicate "Compressed Token Program" tab.Lines 184–235 define a second tab with the same label and nearly identical structure to the "Compressed Token Program" group in the first "Docs" tab (lines 38–90). This appears to be a dedicated tab focused on compressed token content, but it creates content duplication in the navigation tree.
Questions to clarify:
- Is this intentional for UX (allowing users to jump to a focused view)?
- Should this tab have a different label to distinguish its purpose?
- Does Mintlify handle duplicate routes/paths across tabs correctly, or could this cause routing issues?
Confirm that this tab structure is intentional and that Mintlify's navigation handles it properly without conflicts or confusion. If this is a Compressed Token Program–focused tab, consider adding a clarifying label or description.
38-90: All referenced documentation files exist at their new paths.Verification confirms all 21 files referenced in the Compressed Token Program section (lines 38-90) are present and correctly mapped:
- ✓ 3 new top-level files (overview, c-token-program, ctoken)
- ✓ 1 compressed-token overview file
- ✓ 9 Basic Guides files
- ✓ 7 Advanced Guides files
- ✓ 1 extensions file (token-metadata)
The path restructuring is consistent and complete. No broken references detected.
45-87: All verification checks pass - no issues found.✓ All 16 guides are correctly categorized (9 basic + 7 advanced)
✓ New subgroup organization is accurate (Integration: 3 pages, Examples: 4 pages under Advanced Guides)
✓ All page paths are accurate and complete with no omissions or misplacementsThe filesystem contains exactly 16 guides that fully match the docs.json references, confirming the restructure is complete and correct.
| <tbody> | ||
| <tr> | ||
| <td style={{textAlign: 'left'}}>[Create an Airdrop without Claim](/compressed-token-program/compressed-tokens/advanced-guides/create-an-airdrop)</td> | ||
| <td style={{textAlign: 'left'}}>Distribute tokens that appear directly in recipients' wallets <br />(via WebApp or CLI)</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Fix minor text inconsistencies in guide descriptions.
Two descriptions have minor issues:
- Line 34: Text properly uses
<br />for line break—good. - Line 42: "Demo to @lightprotocol/stateless.js" should likely be "Demo of @lightprotocol/stateless.js in a browser environment" or "Demo using @lightprotocol/stateless.js" for clarity.
Please review the descriptions for accuracy and consistency with the actual guide content. Also verify all linked pages exist at the updated paths:
Also applies to: 42-42
🏁 Script executed:
#!/bin/bash
# Check if referenced guide files exist at new paths
set -e
guides=(
"compressed-token-program/compressed-tokens/advanced-guides/how-to-combine-operations-in-one-transaction"
"compressed-token-program/compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens"
"compressed-token-program/compressed-tokens/advanced-guides/use-token-2022-with-compression"
"compressed-token-program/compressed-tokens/advanced-guides/create-an-airdrop"
"compressed-token-program/compressed-tokens/advanced-guides/create-an-airdrop-with-claim"
"compressed-token-program/compressed-tokens/advanced-guides/example-web-client"
"compressed-token-program/compressed-tokens/advanced-guides/example-node-js"
)
echo "Checking if referenced guide files exist..."
for guide in "${guides[@]}"; do
if fd -e mdx "^${guide##*/}\.mdx$" 2>/dev/null | grep -q "compressed-token-program"; then
echo "✓ Found: $guide"
else
echo "✗ Missing: $guide.mdx"
fi
doneLength of output: 719
Fix text inconsistency on line 42 for clarity.
All referenced guide paths verified successfully. However, line 42 contains awkward phrasing: "Demo to @lightprotocol/stateless.js" should be "Demo of @lightprotocol/stateless.js" (or similar) for grammatical consistency.
🤖 Prompt for AI Agents
In snippets/compressed-tokens-advanced-guides-table.mdx around lines 34 to 34,
the phrase "Demo to @lightprotocol/stateless.js" is grammatically awkward;
change it to "Demo of @lightprotocol/stateless.js" (or similar like "Demo:
@lightprotocol/stateless.js") to ensure clarity and consistency across the guide
list.
…nt type sections - Split documentation into three distinct account type groups: cMint, cToken, and Compressed Token - Move ctoken.mdx to compressed-token-program/ctoken/ctoken.mdx subdirectory - Create cmint/ subdirectory with cmint.mdx, update-metadata.mdx, and mint-actions.mdx - Rename extensions/ to Extensions/ and add compressible.mdx - Update c-token-program.mdx: simplify descriptions and remove redundant content - Update compressed-token-overview.mdx: add link to ctoken subdirectory - Restructure docs.json navigation to reflect three separate account type sections
- Add 7 new cToken operation guides: create, transfer, compress, decompress, close operations - Add mint-ctokens.mdx guide for minting cTokens from cMint - Simplify cmint.mdx: move Note block after code examples - Refactor mint-actions.mdx: remove detailed implementation content, keep structure - Create SPL-to-ctoken-transfer.mdx for token migration patterns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs.json (1)
38-101: Add missing Extensions documentation to navigation in two locations.The file
compressed-token-program/Extensions/token-metadata.mdxexists but is not referenced in docs.json. The navigation must be updated in both the sidebar (around line 55) and the "Compressed Token Program" tab (around line 212).Add this group after the "cToken" group in both locations:
{ "group": "Extensions", "pages": [ "compressed-token-program/Extensions/token-metadata" ] }Note: Use capital "E" in "Extensions" to match the actual file path casing.
♻️ Duplicate comments (4)
compressed-token-program/c-token-program.mdx (4)
3-3: Clean up the sidebarTitle value.The sidebarTitle contains "Overview New" which appears incomplete or residual from an editing session.
Apply this diff:
-sidebarTitle: Overview New +sidebarTitle: Overview
302-302: Fix incorrect internal link path to compressible extension (third instance).The link points to
/compressible/compressiblewhich does not exist. Based on the documentation structure, it should reference/extensions/compressible.Apply this diff:
-**cToken accounts** with the **[compressible extension](/compressible/compressible) are automatically compressed** with no writes in 6300 slots (1.75 hours), and decompressed with new writes. +**cToken accounts** with the **[compressible extension](/extensions/compressible) are automatically compressed** with no writes in 6300 slots (1.75 hours), and decompressed with new writes.
293-293: Fix incorrect internal link path to compressible extension (second instance).The link points to
/compressible/compressiblewhich does not exist. Based on the documentation structure, it should reference/extensions/compressible.Apply this diff:
-cToken ATAs can implement the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. +cToken ATAs can implement the **[compressible extension](/extensions/compressible) for sponsored rent exemption**.
161-161: Fix incorrect internal link path to compressible extension.The link points to
/compressible/compressiblewhich does not exist. Based on the documentation structure, it should reference/extensions/compressible.Apply this diff:
-* Use the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. +* Use the **[compressible extension](/extensions/compressible) for sponsored rent exemption**.
🧹 Nitpick comments (1)
compressed-token-program/ctoken/create-ata.mdx (1)
6-17: Clarify section structure and introductory flow.The document introduces two variants in paragraphs (lines 6-14) before the formal section headings appear at line 20. This creates ambiguity about which paragraph describes which variant. The "Key parameters" label at line 15 duplicates content that appears in each variant section.
Restructure the introduction to clearly separate the two variants before diving into details. For example:
# Variant 1: CreateAssociatedTokenAccount Creates an ATA with owner and mint passed as instruction data. **Use when:** Owner and mint public keys are readily available... # Variant 2: CreateAssociatedTokenAccount (AccountMeta version) Creates an ATA with owner and mint passed as account infos... **Use when:** The program needs to access owner or mint accounts...Then provide "Key parameters" sections within each variant.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
compressed-token-program/Extensions/compressible.mdx(1 hunks)compressed-token-program/Extensions/token-metadata.mdx(1 hunks)compressed-token-program/c-token-program.mdx(1 hunks)compressed-token-program/cmint/cmint.mdx(1 hunks)compressed-token-program/cmint/mint-actions.mdx(1 hunks)compressed-token-program/cmint/mint-ctokens.mdx(1 hunks)compressed-token-program/cmint/update-metadata.mdx(1 hunks)compressed-token-program/compressed-tokens/compressed-token-overview.mdx(1 hunks)compressed-token-program/ctoken/SPL-to-ctoken-transfer.mdx(1 hunks)compressed-token-program/ctoken/close-ctoken.mdx(1 hunks)compressed-token-program/ctoken/compress-and-close.mdx(1 hunks)compressed-token-program/ctoken/create-ata.mdx(1 hunks)compressed-token-program/ctoken/create-ctoken.mdx(1 hunks)compressed-token-program/ctoken/ctoken-to-spl-decompress.mdx(1 hunks)compressed-token-program/ctoken/ctoken-transfer.mdx(1 hunks)compressed-token-program/ctoken/ctoken.mdx(1 hunks)docs.json(2 hunks)
✅ Files skipped from review due to trivial changes (5)
- compressed-token-program/cmint/mint-ctokens.mdx
- compressed-token-program/cmint/mint-actions.mdx
- compressed-token-program/ctoken/ctoken-transfer.mdx
- compressed-token-program/ctoken/ctoken.mdx
- compressed-token-program/cmint/update-metadata.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- compressed-token-program/compressed-tokens/compressed-token-overview.mdx
🧰 Additional context used
🪛 GitHub Check: Mintlify Validation (luminouslabs-cc5545c6) - vale-spellcheck
compressed-token-program/Extensions/compressible.mdx
[warning] 3-3: compressed-token-program/Extensions/compressible.mdx#L3
Did you really mean 'Solana'?
[warning] 18-18: compressed-token-program/Extensions/compressible.mdx#L18
Did you really mean 'cToken'?
[warning] 30-30: compressed-token-program/Extensions/compressible.mdx#L30
Did you really mean 'Solana'?
[warning] 33-33: compressed-token-program/Extensions/compressible.mdx#L33
Did you really mean 'lamport'?
[warning] 34-34: compressed-token-program/Extensions/compressible.mdx#L34
Did you really mean 'lamports'?
[warning] 39-39: compressed-token-program/Extensions/compressible.mdx#L39
Did you really mean 'cToken'?
[warning] 46-46: compressed-token-program/Extensions/compressible.mdx#L46
Did you really mean 'Solana'?
[warning] 49-49: compressed-token-program/Extensions/compressible.mdx#L49
Did you really mean 'lamports'?
[warning] 58-58: compressed-token-program/Extensions/compressible.mdx#L58
Did you really mean 'Solana'?
[warning] 62-62: compressed-token-program/Extensions/compressible.mdx#L62
Did you really mean 'Solana's'?
[warning] 72-72: compressed-token-program/Extensions/compressible.mdx#L72
Did you really mean 'cToken'?
[warning] 76-76: compressed-token-program/Extensions/compressible.mdx#L76
Did you really mean 'lamports'?
[warning] 82-82: compressed-token-program/Extensions/compressible.mdx#L82
Did you really mean 'lamports'?
[warning] 83-83: compressed-token-program/Extensions/compressible.mdx#L83
Did you really mean 'lamports'?
[warning] 86-86: compressed-token-program/Extensions/compressible.mdx#L86
Did you really mean 'lamports'?
[warning] 112-112: compressed-token-program/Extensions/compressible.mdx#L112
Did you really mean 'cToken'?
[warning] 112-112: compressed-token-program/Extensions/compressible.mdx#L112
Did you really mean 'compressed_token_program_id'?
[warning] 117-117: compressed-token-program/Extensions/compressible.mdx#L117
Did you really mean 'cToken'?
[warning] 130-130: compressed-token-program/Extensions/compressible.mdx#L130
Did you really mean 'Solana'?
[warning] 131-131: compressed-token-program/Extensions/compressible.mdx#L131
Did you really mean 'lamports'?
[warning] 143-143: compressed-token-program/Extensions/compressible.mdx#L143
Did you really mean 'lamports'?
[warning] 149-149: compressed-token-program/Extensions/compressible.mdx#L149
Did you really mean 'lamports'?
[warning] 151-151: compressed-token-program/Extensions/compressible.mdx#L151
Did you really mean 'Solana'?
[warning] 151-151: compressed-token-program/Extensions/compressible.mdx#L151
Did you really mean 'tx'?
[warning] 176-176: compressed-token-program/Extensions/compressible.mdx#L176
Did you really mean 'lamports'?
[warning] 182-182: compressed-token-program/Extensions/compressible.mdx#L182
Did you really mean 'lamports'?
[warning] 187-187: compressed-token-program/Extensions/compressible.mdx#L187
Did you really mean 'lamports'?
[warning] 193-193: compressed-token-program/Extensions/compressible.mdx#L193
Did you really mean 'Solana'?
[warning] 193-193: compressed-token-program/Extensions/compressible.mdx#L193
Did you really mean 'lamports'?
[warning] 198-198: compressed-token-program/Extensions/compressible.mdx#L198
Did you really mean 'lamports'?
🪛 LanguageTool
compressed-token-program/c-token-program.mdx
[grammar] ~59-~59: Ensure spelling is correct
Context: ...he same interoparability. # cMint Accounts * **cMints are compres...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
compressed-token-program/ctoken/create-ctoken.mdx
[style] ~29-~29: To form a complete sentence, be sure to include a subject.
Context: ...decompressed compressed token account). Can be created with or without a `Compressi...
(MISSING_IT_THERE)
🔇 Additional comments (11)
compressed-token-program/ctoken/SPL-to-ctoken-transfer.mdx (1)
1-36: LGTM!The SPL-to-cToken transfer documentation is clear and well-structured. The Rust example properly demonstrates the conversion workflow. No concerns.
compressed-token-program/Extensions/compressible.mdx (1)
1-251: Spell-check warnings are false positives for domain-specific terms.The vale spell-check warnings flag established Solana ecosystem terminology (lamports, cToken, Solana, tx, etc.). These are not errors and can be safely ignored. The documentation content is accurate and well-structured.
compressed-token-program/ctoken/close-ctoken.mdx (1)
1-37: LGTM!The close-ctoken documentation clearly presents both closing pathways with correct Rust examples. No concerns.
compressed-token-program/ctoken/compress-and-close.mdx (1)
1-33: LGTM!The CompressAndClose documentation is clear and concise. The Rust example properly demonstrates the workflow for compressing and closing a cToken account in a single transaction.
compressed-token-program/ctoken/ctoken-to-spl-decompress.mdx (1)
1-45: LGTM!The CtokenToSpl decompression documentation is well-structured. The Rust example correctly demonstrates the decompression workflow with proper token pool PDA handling.
compressed-token-program/ctoken/create-ata.mdx (1)
39-67: LGTM: Code examples are clear and comprehensive.Both Rust examples demonstrate correct SDK usage with proper imports, struct initialization, and error handling. The side-by-side comparison of basic vs. compressible flows is helpful.
compressed-token-program/Extensions/token-metadata.mdx (3)
28-56: LGTM: Key Points and constraints are well-documented.The section clearly explains rent-free benefits, serialization compatibility, and field constraints (name: 1-32 chars, symbol: 1-10 chars, etc.). The struct definition and field limits provide developers with clear boundaries.
66-105: LGTM: cMint creation example is comprehensive and correct.The Rust code properly demonstrates struct initialization with extensions. The example shows proper nesting of
CompressedMint,BaseMint, andTokenMetadatastructures, and correctly initializesAdditionalMetadataentries.
126-175: LGTM: Metadata update examples are clear and demonstrate all action types.The three update patterns (UpdateMetadataField, UpdateMetadataAuthority, RemoveMetadataKey) are well-illustrated with field_type conventions (e.g., 0 = Name) and proper constraint handling (e.g., idempotent flag).
docs.json (2)
38-101: Verify intentionality of duplicate navigation tabs.Lines 38-101 (first tab) and lines 196-257 (second tab) both create "Compressed Token Program" tabs with nearly identical navigation structures. This duplication appears unusual and may be unintentional.
Question: Is this intentional (e.g., to provide the section in two different contexts), or should one of these tabs be removed or renamed?
If duplication is intentional, it would be helpful to document this design decision. If not, consider removing one of the duplicate sections.
Also applies to: 196-257
196-257: Verify file path case consistency.The navigation structure references paths in lowercase (e.g.,
extensions/token-metadata), but the provided MDX file exists atcompressed-token-program/Extensions/token-metadata.mdx(capital 'E'). Depending on your file system and build tools, this case mismatch may cause broken links at build time.Recommendation:
- Standardize to lowercase: rename
Extensions/toextensions/- Or update docs.json references to use capital 'E' if you prefer that convention
Verify this is handled consistently across all documentation paths.
|
|
||
| <Tip> | ||
| **SPL mints and tokens** owned by the [Token Program](https://github.com/solana-program/token) or [Token-2022](https://github.com/solana-program/token-2022) **require rent** by default.<br /> | ||
| You can **migrate SPL token accounts to cTokens** with compressible extension for **sponsored rent-exemption** while keeping the **same interoparability**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo: "interoparability" should be "interoperability".
Apply this diff:
-You can **migrate SPL token accounts to cTokens** with compressible extension for **sponsored rent-exemption** while keeping the **same interoparability**.
+You can **migrate SPL token accounts to cTokens** with compressible extension for **sponsored rent-exemption** while keeping the **same interoperability**.📝 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.
| You can **migrate SPL token accounts to cTokens** with compressible extension for **sponsored rent-exemption** while keeping the **same interoparability**. | |
| You can **migrate SPL token accounts to cTokens** with compressible extension for **sponsored rent-exemption** while keeping the **same interoperability**. |
🤖 Prompt for AI Agents
In compressed-token-program/c-token-program.mdx around line 56, the word
"interoparability" is misspelled; replace it with "interoperability" so the
sentence reads "...while keeping the same interoperability."
| <Card | ||
| title=" Learn how to create cMints" | ||
| icon="chevron-right" | ||
| color="#0066ff" | ||
| href="/compressible/mint-actions" | ||
| horizontal | ||
| > | ||
| </Card> No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Fix broken "Next Steps" link target.
The href /compressible/mint-actions does not exist in the navigation structure. This path should be updated to point to the correct mint documentation page.
Please verify the correct path for the mint-related documentation. Based on the PR objectives and docs.json structure, confirm what page should be referenced for the "Learn how to create cMints" link.
🏁 Script executed:
#!/bin/bash
# Search docs.json for mint-related documentation paths
grep -n "mint" docs.json | head -30Length of output: 1257
🏁 Script executed:
#!/bin/bash
# Check the actual href in the mdx file and find similar patterns
echo "=== Current href in c-token-program.mdx around lines 331-338 ==="
sed -n '330,340p' compressed-token-program/c-token-program.mdx
echo -e "\n=== Other href patterns in the same file for comparison ==="
grep -n 'href=' compressed-token-program/c-token-program.mdx | head -15Length of output: 309
🏁 Script executed:
#!/bin/bash
# Check the docs.json structure to understand URL format and see if /compressible exists
echo "=== Checking for 'compressible' in docs.json ==="
grep -n "compressible" docs.json
echo -e "\n=== Sample navigation entry structure from docs.json ==="
sed -n '40,75p' docs.jsonLength of output: 2160
---
🏁 Script executed:
```shell
#!/bin/bash
# Search for other Card components with href to understand the URL pattern convention
echo "=== Other Card/link examples in documentation files ==="
find compressed-token-program -name "*.mdx" -exec grep -l "href=" {} \; | head -5
echo ""
grep -n "href=" compressed-token-program/*.mdx | grep -v "^Binary" | head -20
Length of output: 1057
---
🏁 Script executed:
```shell
#!/bin/bash
# Check overview.mdx to understand the href pattern
echo "=== Overview.mdx hrefs and context ==="
grep -B2 -A2 'href="/compressed-tokens' compressed-token-program/overview.mdx
echo -e "\n=== Search for mint-related hrefs in other files ==="
grep -r "mint" compressed-token-program --include="*.mdx" | grep href
Length of output: 1360
Fix broken "Next Steps" link target.
The href /compressible/mint-actions does not exist in the navigation structure. This broken link appears in 5 documentation files. Update to the correct path: /compressed-tokens/guides/how-to-create-and-register-a-mint-account-for-compression (or /compressed-tokens/guides/how-to-mint-compressed-tokens for a more general mint guide).
Note: This same broken href appears in:
- compressed-token-program/Extensions/compressible.mdx
- compressed-token-program/Extensions/token-metadata.mdx
- compressed-token-program/cmint/cmint.mdx
- compressed-token-program/ctoken/ctoken.mdx
Consider fixing all instances.
🤖 Prompt for AI Agents
In compressed-token-program/c-token-program.mdx around lines 331 to 338 the Card
href points to a non-existent path (/compressible/mint-actions); update that
href to the correct route
(/compressed-tokens/guides/how-to-create-and-register-a-mint-account-for-compression)
or the alternative general guide
(/compressed-tokens/guides/how-to-mint-compressed-tokens) depending on the
intended destination, and apply the same replacement to the other affected files
listed (compressed-token-program/Extensions/compressible.mdx,
compressed-token-program/Extensions/token-metadata.mdx,
compressed-token-program/cmint/cmint.mdx,
compressed-token-program/ctoken/ctoken.mdx).
| <Card | ||
| title=" Learn about all relevant actions to cMints" | ||
| icon="chevron-right" | ||
| color="#0066ff" | ||
| href="/compressible/mint-actions" | ||
| horizontal | ||
| > | ||
| </Card> No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Fix broken "Next Steps" link.
The href /compressible/mint-actions does not exist in the navigation structure. This should point to the correct mint-related documentation page.
Please search the codebase to identify the correct path for mint-related actions documentation, or confirm that this page should be removed pending future documentation.
🏁 Script executed:
#!/bin/bash
# Search for mint-related documentation paths in docs.json
grep -n "mint" docs.json | head -20
# Also search for any files with 'mint-actions' in the name
fd -e mdx | xargs grep -l "mint-actions" 2>/dev/nullLength of output: 1494
I need to gather more information about what the correct path should be.
Based on my verification, the broken link at line 142 has been confirmed. The path /compressible/mint-actions does not exist in the documentation's navigation structure (docs.json). However, I need to inspect the cmint.mdx file directly to determine the correct destination path.
---
🏁 Script executed:
```shell
#!/bin/bash
# View cmint.mdx to see the context around line 142
sed -n '130,150p' compressed-token-program/cmint/cmint.mdx
# Also check what "update-metadata" references in docs.json for context
grep -n "update-metadata" docs.json
Length of output: 500
Let me check how other mdx files format their href paths to ensure I recommend the correct format:
---
🏁 Script executed:
```shell
#!/bin/bash
# Check how other .mdx files format their href values in Card components
grep -n "href=\"/compressed-token-program" compressed-token-program/**/*.mdx | head -10
# Also check if there are any hrefs pointing to update-metadata
grep -n "update-metadata" compressed-token-program/**/*.mdx
Length of output: 828
Fix broken "Next Steps" link at line 142.
The href /compressible/mint-actions does not exist in the navigation structure. Change it to /compressed-token-program/cmint/update-metadata, which is the registered next page for cMint documentation.
<Card
title=" Learn about all relevant actions to cMints"
icon="chevron-right"
color="#0066ff"
href="/compressed-token-program/cmint/update-metadata"
horizontal
>
</Card>
🤖 Prompt for AI Agents
In compressed-token-program/cmint/cmint.mdx around lines 138 to 145, the Card's
href points to a non-existent route (/compressible/mint-actions); update the
href to the registered next page
(/compressed-token-program/cmint/update-metadata) so the "Next Steps" link
navigates correctly, leaving all other Card props unchanged.
| <Card | ||
| title=" Learn about all relevant actions to cMints" | ||
| icon="chevron-right" | ||
| color="#0066ff" | ||
| href="/compressible/mint-actions" | ||
| horizontal | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Fix broken internal link path.
Line 188 references href="/compressible/mint-actions", but based on the docs.json navigation restructuring, this path appears to be outdated. The new structure uses compressed-token-program/ paths. This link will likely break or navigate to an incorrect location.
Verify the correct destination path. If linking to mint actions, it should likely be:
href="/compressed-token-program/cmint/mint-actions"or similar, depending on the actual file structure.
I'll verify the link structure by exploring the repository to find the navigation configuration and mint-actions file location.
🏁 Script executed:
#!/bin/bash
# Find docs configuration files and navigation structure
echo "=== Finding navigation/config files ==="
fd -e json -e js -e ts | grep -E "(docs|sidebar|nav|config)" | head -20
echo -e "\n=== Finding mint-actions related files ==="
fd -i "mint-action" --type f
echo -e "\n=== Listing compressed-token-program directory structure ==="
find compressed-token-program -maxdepth 3 -type d 2>/dev/null | sort
echo -e "\n=== Searching for href patterns in mdx files ==="
rg -n 'href="' --type=mdx -C 2 | head -40Length of output: 563
🏁 Script executed:
#!/bin/bash
# Check docs.json structure
echo "=== docs.json content ==="
cat docs.json 2>/dev/null || echo "File not found"
echo -e "\n=== Searching for href patterns in all files ==="
rg -n 'href="/' -A 1 -B 1 | head -60
echo -e "\n=== Checking for /compressible/ usage ==="
rg '/compressible/' -n
echo -e "\n=== Checking for compressed-token-program paths in hrefs ==="
rg 'href="/compressed-token-program' -nLength of output: 22494
🏁 Script executed:
#!/bin/bash
# Check if mint-actions.mdx has content and examine it
echo "=== mint-actions.mdx file info ==="
wc -l compressed-token-program/cmint/mint-actions.mdx 2>/dev/null
head -20 compressed-token-program/cmint/mint-actions.mdx 2>/dev/null
echo -e "\n=== Search for any references to mint-actions ==="
rg "mint-action" -i -n
echo -e "\n=== Check if /compressible/ is registered anywhere or if it's a legacy path ==="
rg "compressible" -n | grep -E "(docs\.json|sidebar|nav)" | head -10Length of output: 1179
Fix broken internal link path in compressed-token-program/Extensions/token-metadata.mdx and 4 other files.
The href="/compressible/mint-actions" path is invalid. The "/compressible/" prefix does not exist in the navigation structure (docs.json), and the actual file is located at compressed-token-program/cmint/mint-actions.mdx.
The correct path should be:
href="/compressed-token-program/cmint/mint-actions"This same broken link appears in 5 files total and needs to be updated in all:
- compressed-token-program/Extensions/token-metadata.mdx:188
- compressed-token-program/ctoken/ctoken.mdx:248
- compressed-token-program/c-token-program.mdx:335
- compressed-token-program/cmint/cmint.mdx:142
- compressed-token-program/Extensions/compressible.mdx:248
🤖 Prompt for AI Agents
In compressed-token-program/Extensions/token-metadata.mdx around lines 184-190
(and the same broken href in compressed-token-program/ctoken/ctoken.mdx line
~248, compressed-token-program/c-token-program.mdx line ~335,
compressed-token-program/cmint/cmint.mdx line ~142,
compressed-token-program/Extensions/compressible.mdx line ~248), the Card href
uses an incorrect "/compressible/mint-actions" path; replace it with the correct
route "/compressed-token-program/cmint/mint-actions" in each file so the
internal link matches the docs navigation and points to
compressed-token-program/cmint/mint-actions. Ensure you update all five
occurrences to the exact corrected href.
- Add comprehensive compressible extension documentation with rent mechanics - Add BaseMint struct code example in new tab alongside comparison table - Add ATA derivation code example showing seed construction - Reorder compressed token use cases: storage first, then distribution - Simplify cmint.mdx: remove duplicate core concepts, link to main overview - Update ctoken.mdx: remove redundant sections covered in main overview - Add placeholder note for token type graphic - Fix source code link to ctoken_struct.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (8)
compressed-token-program/c-token-program.mdx (6)
3-3: Fix incomplete sidebarTitle value.The value "Overview New" appears incomplete. Simplify to a clean title.
-sidebarTitle: Overview New +sidebarTitle: Overview
59-59: Fix typo: "interoparability" should be "interoperability".-You can **migrate SPL token accounts to cTokens** with compressible extension for **sponsored rent-exemption** while keeping the **same interoparability**. +You can **migrate SPL token accounts to cTokens** with compressible extension for **sponsored rent-exemption** while keeping the **same interoperability**.
289-289: Fix incorrect internal link path to compressible extension (instance 1/3).The path
/compressible/compressibledoes not exist. According to docs.json, the compressible extension is at/extensions/compressible.-We recommend to create cToken accounts always with the [compressible extension](/compressible/compressible) for sponsored rent exemption. +We recommend to create cToken accounts always with the [compressible extension](/extensions/compressible) for sponsored rent exemption.
466-466: Fix incorrect internal link path to compressible extension (instance 2/3).The path
/compressible/compressibledoes not exist. Should reference/extensions/compressibleper docs.json.-cToken ATAs can implement the **[compressible extension](/compressible/compressible) for sponsored rent exemption**. +cToken ATAs can implement the **[compressible extension](/extensions/compressible) for sponsored rent exemption**.
475-475: Fix incorrect internal link path to compressible extension (instance 3/3).The path
/compressible/compressibledoes not exist. Should reference/extensions/compressibleper docs.json.-**cToken accounts** with the **[compressible extension](/compressible/compressible) are automatically compressed** with no writes in 6300 slots (1.75 hours), and decompressed with new writes. +**cToken accounts** with the **[compressible extension](/extensions/compressible) are automatically compressed** with no writes in 6300 slots (1.75 hours), and decompressed with new writes.
504-510: Fix broken Card href and verify destination path.The href
/compressible/mint-actionsdoes not exist in the docs.json navigation structure. Based on the PR objectives and related documentation files, this should likely point to a guide for creating cMints.Previous review suggests the path should be
/compressed-tokens/guides/how-to-create-and-register-a-mint-account-for-compressionor a similar mint-related guide. Please confirm the correct destination path before publication.<Card title=" Learn how to create cMints" icon="chevron-right" color="#0066ff" - href="/compressible/mint-actions" + href="[VERIFY_CORRECT_PATH]" horizontal > </Card>compressed-token-program/ctoken/ctoken.mdx (2)
112-151: Clarify cost attribution—separate protocol-funded vs. user-paid costs.The creation cost table mixes protocol-funded costs (rent exemption from sponsor PDA) with user-paid costs without clear distinction. Past review feedback indicates this is confusing because users do not bear the rent-exemption cost.
Restructure the table to separate:
- Protocol-Funded Costs (informational only): Rent exemption
- User-Paid Costs: Prepaid rent, top-up incentive, transaction fees
Additionally, verify the compression incentive amount at line 140 (currently 1,000 lamports; past feedback mentions 11,000 lamports).
Example restructure:
- <tr> - <td>Solana rent exemption</td> - <td>~2,700,480 lamports</td> - <td>Rent sponsor PDA</td> - <td>Rent-exemption balance</td> - </tr>Replace with a note clarifying that rent exemption is protocol-sponsored, then list only user-paid costs in the table.
193-201: Fix broken "Next Steps" link that references non-existent page.The href
/compressible/mint-actionsdoes not exist in the documentation structure and will fail at runtime. The valid target is registered in the documentation navigation structure at/compressed-token-program/compressed-tokens/basic-guides/how-to-mint-compressed-tokens. This same broken link appears in four additional files:compressed-token-program/c-token-program.mdx,compressed-token-program/Extensions/token-metadata.mdx,compressed-token-program/Extensions/compressible.mdx, andcompressed-token-program/cmint/cmint.mdx.Update the href to:
<Card title=" Learn about all relevant actions to cMints" icon="chevron-right" color="#0066ff" - href="/compressible/mint-actions" + href="/compressed-token-program/compressed-tokens/basic-guides/how-to-mint-compressed-tokens" horizontal > </Card>Apply the same fix to all five occurrences.
🧹 Nitpick comments (2)
compressed-token-program/c-token-program.mdx (1)
103-103: Clarify the Borsh serialization statement per reviewer feedback.The comment claims Borsh serialization matches SPL format, but reviewer noted SPL mint/token accounts don't follow default Borsh serialization. Consider clarifying that the struct is manually serialized to match SPL's on-chain format rather than using default Borsh.
-The `BaseMint` field replicates the field layout and serialization format of [SPL Mint accounts](https://solana.com/docs/tokens#mint-account). The struct is serialized with Borsh to match the on-chain format of SPL tokens and mints. +The `BaseMint` field replicates the field layout and serialization format of [SPL Mint accounts](https://solana.com/docs/tokens#mint-account). The struct uses custom serialization (not default Borsh) to match the on-chain format of SPL tokens and mints.compressed-token-program/ctoken/ctoken.mdx (1)
189-191: Enhance Note clarity with specific tx fee context.Line 190 uses the HTML entity
<instead of a<character, and the phrasing could be slightly clearer. The note is close to good but would benefit from minor polish:- <Note> - Top-ups are additional to standard Solana transaction fees (typically <10,000 lamports). - </Note> + <Note> + Top-ups are additional to standard Solana transaction fees (typically less than 10,000 lamports). Priority fees may apply if the transaction is prioritized. + </Note>This makes the note more accessible and acknowledges that users might incur additional priority fees.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
compressed-token-program/c-token-program.mdx(1 hunks)compressed-token-program/cmint/cmint.mdx(1 hunks)compressed-token-program/ctoken/ctoken.mdx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- compressed-token-program/cmint/cmint.mdx
🔇 Additional comments (3)
compressed-token-program/ctoken/ctoken.mdx (3)
42-48: Clear introduction and key points.The explanation of cTokens and their relationship to mints and owners is accurate and provides good context before diving into creation steps.
1-40: Front matter and initial context are well-structured.The title, description, comparison table, and recommended practice tip provide clear context for the documentation. Table links to section anchors are appropriate and should resolve correctly.
65-85: Step-by-step structure is clear and logical.The three-step approach (initialize, set initial lamports, set top-up amount) is well-organized. The rent calculation formula and example at lines 72–75 are helpful for developers. Note that lines 68 and 84 have constraint/clarity issues flagged in the earlier review comment on segment 50–56—ensure those are resolved for consistency.
| Compressible accounts maintain the **functionality of Solana accounts** but with **rent-exemption sponsorship**: | ||
|
|
||
| 1. The protocol funds the account's rent exemption (rent sponsor) at creation. | ||
| 2. The account creator top-ups the lamport balance with rent for at least two epochs (12,600 slots / 84 min) | ||
| 3. The transaction payer top-ups the lamports balance with transactions that write to compressible accounts to keep the account decompressed. | ||
| 4. The account will be compressed when inactive for a period of 12,600 slots (84 min). | ||
| 5. When the account is written to, it's automatically decompressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify prepaid epochs constraint and compression trigger conditions.
Line 68 states accounts must have "at least 2 epochs," but the code example at line 100 permits 0 epochs (// 0 or ≥2). Past review feedback indicates both 0 and ≥2 are valid inputs. Additionally, the compression trigger logic (line 84) is unclear—it should explain whether compression occurs when rent coverage drops below a threshold or after a fixed period of inactivity.
Revise lines 50–56 and 68 to accurately reflect the valid constraint (0 or ≥2 epochs, not "at least 2"), and clarify the exact compression trigger condition:
- 2. The account creator top-ups the lamport balance with rent for at least two epochs (12,600 slots / 84 min)
+ 2. The account creator top-ups the lamport balance with rent for N epochs (0 or ≥2; 12,600 slots / 84 min per epoch)- 1. Initialize cToken Account
- 2. **Set the initial lamports balance** to N epochs (must be at least 2 epochs)
+ 1. Initialize cToken Account
+ 2. **Set the initial lamports balance** to N epochs (0 or ≥2; 0 will compress immediately)Also clarify line 84: specify whether compression is triggered by reaching a rent deficit or by elapsed inactivity period.
Also applies to: 68-68
| | | cToken | SPL | | ||
| |-----------|--------|-----| | ||
| | allocate | 0.000011 | 0.002 | | ||
| | rent for 24h | 0.000005 | - | | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify rent calculation accuracy and clarify table units/terminology.
The cost comparison table lacks clarity on several fronts:
- SPL size: The table should specify that SPL costs are for a 165-byte token account (the standard SPL token account size).
- Rent calculation: Past review feedback suggests the 24-hour rent value (0.000005 SOL) should be double-checked for accuracy. Line 75 suggests ~388 lamports/epoch; verify if this translates correctly to the 24-hour figure.
- Terminology: "Rent for 24h" is misleading since Solana no longer charges rent (only exemption is required). Clarify this is "rent exemption required for 24h uptime" or similar.
- Units: Add explicit units (SOL vs. lamports) to all cost entries.
Please verify the rent calculation and update the table with corrected values and clarified units/terminology.
I'll verify the key claims in this review comment by examining the file and checking Solana documentation.
🏁 Script executed:
#!/bin/bash
# Locate and examine the ctoken.mdx file
find . -name "ctoken.mdx" -type f | head -1Length of output: 44
🏁 Script executed:
#!/bin/bash
# Read the file content around the disputed lines (60-80 for full context)
FILE=$(find . -name "ctoken.mdx" -type f | head -1)
if [ -n "$FILE" ]; then
sed -n '50,80p' "$FILE"
fiLength of output: 1577
🏁 Script executed:
#!/bin/bash
# Search for rent-related calculations or comments in the file
FILE=$(find . -name "ctoken.mdx" -type f | head -1)
if [ -n "$FILE" ]; then
grep -n -i "rent\|388\|lamport\|epoch" "$FILE" | head -20
fiLength of output: 1761
🏁 Script executed:
#!/bin/bash
# Check for any associated documentation or comments about the cost table
FILE=$(find . -name "ctoken.mdx" -type f | head -1)
if [ -n "$FILE" ]; then
sed -n '1,100p' "$FILE"
fiLength of output: 3733
🌐 Web query:
What is the current Solana rent policy - is rent still charged or only exemption required?
💡 Result:
Short answer: Rent is no longer being actively collected, but the rent-exempt minimum (a refundable minimum-balance/deposit required at account creation) still applies.
Details: Solana merged SIMD‑84 / a feature gate to disable runtime rent collection (removing periodic deductions), while the existing rent-exempt minimum (two years’ worth of rent per account-size) remains the requirement for accounts to persist. The rent-exempt minimum acts like a refundable deposit — if an account is closed you get it back. [1][2][3]
Sources:
- Solana docs — Rent explanation. [1]
- Solana changelog / SIMD‑84 (disable rent-collection feature). [2]
- Wallet / user docs explaining rent-exempt minimum behavior. [3]
🌐 Web query:
What is the standard size of an SPL token account in bytes?
💡 Result:
A standard SPL (token) account uses 165 bytes. [1][2]
Note: Token-2022 accounts can include extensions and therefore may be larger than 165 bytes. [1][3]
Verify and clarify the cost comparison table: SPL size, rent calculation, and terminology.
The table has several clarity issues that need addressing:
-
SPL size undocumented: A standard SPL token account uses 165 bytes. Specify this in the table so the cost comparison is transparent.
-
Rent calculation discrepancy: Line 75 shows 388 lamports/epoch for a 260-byte account. The table's 0.000005 SOL (5,000 lamports) for 24h rent should be recalculated and verified against this basis.
-
Misleading terminology: Rent is no longer being actively collected, but the rent-exempt minimum still applies. Rename "rent for 24h" to "rent exemption for 24h" or "exemption top-up cost" to clarify this is not an ongoing rental charge.
-
Missing units: Add explicit SOL or lamports labels to all cost entries for clarity.
🤖 Prompt for AI Agents
In compressed-token-program/ctoken/ctoken.mdx around lines 60 to 64, update the
cost comparison table to be explicit and accurate: state the SPL token account
size as 165 bytes next to the "SPL" column; recalculate the 24‑hour
rent/exemption number based on the documented lamports/epoch rate (use the 388
lamports/epoch baseline for a 260‑byte account or compute proportionally for 165
bytes) and replace the 0.000005 SOL value with the corrected SOL and lamports
amounts; rename the "rent for 24h" column to "rent-exemption top-up (24h)" or
"exemption top-up cost (24h)" to avoid implying ongoing rent collection; and
append units (SOL or lamports) to every monetary entry in the table for clarity.
| ```rust | ||
| use light_token_client::actions::{ | ||
| create_compressible_token_account, | ||
| CreateCompressibleTokenAccountInputs, | ||
| }; | ||
| use light_ctoken_types::state::TokenDataVersion; | ||
|
|
||
| let token_account_pubkey = create_compressible_token_account( | ||
| &mut rpc, | ||
| CreateCompressibleTokenAccountInputs { | ||
| owner: owner_pubkey, | ||
| mint: mint_pubkey, | ||
| payer: &payer_keypair, | ||
| num_prepaid_epochs: 10, // 0 or ≥2 | ||
| lamports_per_write: Some(5_000), // lamports added per top-up | ||
| token_account_version: TokenDataVersion::ShaFlat, | ||
| token_account_keypair: None, // SDK generates keypair | ||
| } | ||
| ).await?; | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Remove code example using light_token_client (test utility).
Per past review feedback, light_token_client is currently a test utility only and should not be used in documentation. Providing this unstable API as an example will mislead developers and cause future breakage when the API changes or is not released.
Either remove this code example or replace it with an alternative that uses stable, public APIs. If a higher-level stable SDK is not yet available, clarify that this is pseudo-code or an internal implementation reference, not production-ready code. Verify the current stability status of light_token_client before committing this documentation.
</script>
🏁 Script executed:
#!/bin/bash
# Search for light_token_client references in the repository
echo "=== Searching for light_token_client references ==="
rg -n "light_token_client" --type-list | head -20
echo ""
echo "=== File count matching light_token_client ==="
rg -l "light_token_client" | wc -l
echo ""
echo "=== Checking Cargo.toml files for light_token_client ==="
fd "Cargo.toml" --exec rg -l "light_token_client" {}Length of output: 549
🏁 Script executed:
#!/bin/bash
# Search for the actual light_token_client crate definition and check if it's marked as internal
echo "=== Looking for light_token_client crate definition ==="
find . -type d -name "light_token_client" | head -10
echo ""
echo "=== Checking for lib.rs or similar in light_token_client ==="
fd -e "lib.rs" | xargs grep -l "light_token_client" 2>/dev/null | head -10
echo ""
echo "=== Searching for comments about test utility status ==="
rg -n "test.?utility|test.?only|internal|unstable" --type rust -C2 | grep -A2 -B2 "light_token_client" | head -30Length of output: 324
🏁 Script executed:
#!/bin/bash
# Check the specific documentation file for context
echo "=== Checking ctoken.mdx file structure ==="
wc -l compressed-token-program/ctoken/ctoken.mdx 2>/dev/null || echo "File path needs verification"
echo ""
echo "=== Looking for alternative examples or imports in documentation ==="
rg -n "use light" "compressed-token-program/ctoken/ctoken.mdx" 2>/dev/null || echo "File not found in expected location"Length of output: 249
🏁 Script executed:
#!/bin/bash
# Search for any issues or comments discussing light_token_client stability
echo "=== Searching for TODO or FIXME comments about light_token_client ==="
rg -n "TODO|FIXME" | rg "light_token_client"
echo ""
echo "=== Searching for pub vs private visibility of light_token_client ==="
rg -n "^pub|^(pub )?mod light_token_client" --type rust | head -20Length of output: 289
</script>
🏁 Script executed:
#!/bin/bash
# Find all files referencing light_token_client
echo "=== All files referencing light_token_client ==="
rg -l "light_token_client"
echo ""
# Show context around each reference
echo "=== Context for each reference ==="
rg -n "light_token_client" -B2 -A2Length of output: 2388
🏁 Script executed:
#!/bin/bash
# Check Cargo.toml for light_token_client dependency details
echo "=== Searching Cargo.toml files for light_token_client ==="
find . -name "Cargo.toml" -type f -exec grep -H "light_token_client\|light-token-client" {} \;
echo ""
echo "=== Checking for any package metadata or versions ==="
rg "light_token_client|light-token-client" Cargo.toml -B1 -A1Length of output: 163
🏁 Script executed:
#!/bin/bash
# Search for stable alternatives or SDK references
echo "=== Looking for other client imports or SDKs ==="
rg -n "use light_" | head -30
echo ""
echo "=== Searching for stable API or public SDK mentions ==="
rg -ni "stable|public|sdk|client" compressed-token-program/ctoken/ctoken.mdx | head -20Length of output: 3621
🏁 Script executed:
#!/bin/bash
# Check git history or comments about this code
echo "=== Looking for setup or initialization patterns ==="
rg -n "CreateCompressibleTokenAccountInputs" -B5 -A5 | head -50Length of output: 2810
Replace light_token_client with light_compressed_token_sdk across documentation.
The review comment is valid. Past feedback documented that light_token_client is a test utility only and should not be used in code examples. Verification confirms this pattern appears in 5 documentation files and that a stable alternative, light_compressed_token_sdk, is already used in other examples (e.g., ctoken-to-spl-decompress.mdx, create-ctoken.mdx, create-ata.mdx, close-ctoken.mdx).
Update these files to use light_compressed_token_sdk instead:
- compressed-token-program/ctoken/ctoken.mdx (lines 88–106)
- compressed-token-program/ctoken/ctoken-transfer.mdx (line 23)
- compressed-token-program/ctoken/compress-and-close.mdx (line 22)
- compressed-token-program/ctoken/SPL-to-ctoken-transfer.mdx (line 25)
- compressed-token-program/Extensions/compressible.mdx (lines 91–106)
🤖 Prompt for AI Agents
In compressed-token-program/ctoken/ctoken.mdx around lines 87 to 106, the
example imports and usages reference the test-only crate light_token_client;
replace that import and any uses with the stable SDK crate
light_compressed_token_sdk and adjust the imported path/names if the SDK exposes
them differently (e.g., import create_compressible_token_account and
CreateCompressibleTokenAccountInputs from light_compressed_token_sdk::actions or
the SDK's equivalent module). Do the same replacement in the other files listed
(compressed-token-program/ctoken/ctoken-transfer.mdx line 23,
compressed-token-program/ctoken/compress-and-close.mdx line 22,
compressed-token-program/ctoken/SPL-to-ctoken-transfer.mdx line 25, and
compressed-token-program/Extensions/compressible.mdx lines 91–106), ensuring
each example's use sites and any docs text reflect light_compressed_token_sdk
and that any type names or paths are corrected to match the SDK API.
…ize guides - Extract compressible vs Solana rent content to reusable snippet - Move mint-actions.mdx and mint-ctokens.mdx from cmint/ to ctoken/ directory - Delete ctoken/ctoken.mdx, migrate content to create-ctoken.mdx with full guide structure - Update create-ctoken.mdx: add frontmatter, steps layout, compressible config details - Add Guides subgroup to cToken section in docs.json navigation - Update guide titles and descriptions for clarity across ctoken/ files - Fix docs.json syntax error (remove stray character) - Update cmint.mdx title: remove 'a' article for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
compressed-token-program/cmint/cmint.mdx (1)
102-108: Broken "Next Steps" link — still unresolved from previous review.The href at line 106 still points to the non-existent route
/compressible/mint-actions. Update it to/compressed-token-program/cmint/update-metadata, which is the registered next documentation page for cMint.<Card title=" Learn about all relevant actions to cMints" icon="chevron-right" color="#0066ff" - href="/compressible/mint-actions" + href="/compressed-token-program/cmint/update-metadata" horizontal > </Card>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
compressed-token-program/c-token-program.mdx(1 hunks)compressed-token-program/cmint/cmint.mdx(1 hunks)compressed-token-program/compressed-tokens/compressed-token-overview.mdx(1 hunks)compressed-token-program/ctoken/SPL-to-ctoken-transfer.mdx(1 hunks)compressed-token-program/ctoken/close-ctoken.mdx(1 hunks)compressed-token-program/ctoken/create-ctoken.mdx(1 hunks)compressed-token-program/ctoken/ctoken-to-spl-decompress.mdx(1 hunks)compressed-token-program/ctoken/ctoken-transfer.mdx(1 hunks)compressed-token-program/ctoken/mint-actions.mdx(1 hunks)compressed-token-program/ctoken/mint-ctokens.mdx(1 hunks)docs.json(2 hunks)snippets/compressible-vs-solana-rent.mdx(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- compressed-token-program/ctoken/mint-actions.mdx
- compressed-token-program/ctoken/mint-ctokens.mdx
- snippets/compressible-vs-solana-rent.mdx
- compressed-token-program/c-token-program.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
- compressed-token-program/ctoken/ctoken-transfer.mdx
- compressed-token-program/ctoken/close-ctoken.mdx
- compressed-token-program/ctoken/SPL-to-ctoken-transfer.mdx
- compressed-token-program/ctoken/create-ctoken.mdx
🔇 Additional comments (6)
compressed-token-program/cmint/cmint.mdx (1)
36-38: Verify anchor link to c-token-program documentation.Ensure that the anchor
#cmint-accountsexists in the referenced page/compressed-token-program/c-token-programso the internal link resolves correctly.compressed-token-program/ctoken/ctoken-to-spl-decompress.mdx (1)
1-49: Well-structured documentation with clear parameter documentation and complete example.The transfer flow is clearly explained, parameters are well-documented, and the Rust code example is idiomatic and complete. Navigation reference in docs.json is correct (line 232).
compressed-token-program/compressed-tokens/compressed-token-overview.mdx (2)
6-9: Verify snippet component imports exist and render correctly.The overview page imports four snippet components. Ensure these files exist and are correctly configured in your snippets directory, as they are core content placeholders:
/snippets/compressed-tokens-guides-table.mdx/snippets/compressed-tokens-advanced-guides-table.mdx/snippets/setup-environment-tabs.mdx/snippets/install-dependencies-codegroup.mdx
62-62: Verify internal link target path.Line 62 references
/compressed-token-program/ctoken/ctoken. Confirm this path exists in docs.json navigation. Based on the new structure, this should map to the cToken group entry (currently visible at lines 221-237 in docs.json).docs.json (2)
38-114: Duplicate navigation structure across two tabs — verify intent.The "Docs" tab (lines 38-114) and "Compressed Token Program" tab (lines 208-284) both contain nearly identical navigation hierarchies with identical nested groups (cMint, cToken, Compressed Token) and page references. This duplication may cause confusion or maintenance burden.
Clarify whether:
- Both tabs should exist with identical content (perhaps for different user entry points)?
- One tab should be consolidated or removed?
- The tabs should have different purposes or content?
Also applies to: 208-284
57-64: All cToken documentation files are present.Verification confirms that all 7 cToken documentation files referenced in docs.json (lines 57-64 and 227-235) exist in the repository. No missing files detected.
| "pages": [ | ||
| "compressed-tokens/overview", | ||
| "compressed-token-program/overview", | ||
| "compressed-token-program/c-token-program", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify c-token-program.mdx exists and verify if Extensions pages should be in navigation.
Lines 42 and 212 reference compressed-token-program/c-token-program. According to the PR summary, this is a new 353-line documentation file that should exist. Verify it's present.
Additionally, the PR objectives mention three new Extensions documentation files:
- extensions/compressible.mdx
- extensions/token-metadata.mdx
- extensions/extensions.mdx
These do not appear in the navigation structure in docs.json. Confirm whether these should be added to the navigation hierarchy (e.g., as a nested "Extensions" group under Compressed Token Program).
Also applies to: 212-212
🏁 Script executed:
#!/bin/bash
# Verify c-token-program file and check for Extensions files
echo "Checking core documentation files..."
test -f "compressed-token-program/c-token-program.mdx" && echo "✓ c-token-program.mdx exists" || echo "✗ c-token-program.mdx missing"
echo -e "\nChecking for Extensions documentation..."
find . -path "*/extensions/*.mdx" -type f 2>/dev/null | sortLength of output: 107
The c-token-program.mdx file is confirmed to exist, validating the reference in docs.json. However, the Extensions documentation files did not appear in the search. Let me verify if they exist elsewhere in the repository:
---
🏁 Script executed:
```shell
#!/bin/bash
# Search more broadly for extensions-related files
echo "Searching for all extensions-related files..."
find . -type f \( -name "*extension*" -o -name "*compressible*" -o -name "*token-metadata*" \) 2>/dev/null | grep -E "\.(mdx|md|json)$" | sort
echo -e "\nSearching for docs.json references to 'extensions'..."
rg -i "extensions" docs.json -n
Length of output: 255
The Extensions files were found! They exist at compressed-token-program/Extensions/ (with capital E), not at the extensions/ path mentioned in the PR objectives. However, they're not currently referenced in docs.json. Let me check the structure of the c-token-program section to determine if they should be added:
---
🏁 Script executed:
```shell
#!/bin/bash
# Check the c-token-program section structure in docs.json
echo "Examining c-token-program section in docs.json..."
rg -n -A 20 '"compressed-token-program"' docs.json | head -60
Length of output: 49
Let me view the docs.json file directly to see the navigation structure:
---
🏁 Script executed:
```shell
#!/bin/bash
# View docs.json with context around line 42 and 212
echo "=== Around line 42 ==="
sed -n '35,50p' docs.json
echo -e "\n=== Around line 212 ==="
sed -n '205,225p' docs.json
echo -e "\n=== Full structure of c-token-program section ==="
cat docs.json | jq '.[] | select(.items[]? | .id == "compressed-token-program/c-token-program")' 2>/dev/null | head -40
Length of output: 1177
Extensions files exist but are missing from docs.json navigation.
The c-token-program.mdx reference on lines 42 and 212 is valid and correctly points to the existing file. However, the Extensions documentation files do exist in the repository at compressed-token-program/Extensions/ (compressible.mdx and token-metadata.mdx) but are not currently referenced in docs.json. Following the existing pattern in the navigation (where cMint and cToken are nested groups), an Extensions group should be added to the Compressed Token Program section in docs.json to make these pages discoverable.
🤖 Prompt for AI Agents
In docs.json around line 42 (and mirror at line 212) the Compressed Token
Program nav entry only lists c-token-program/c-token-program and is missing an
"Extensions" group; add an "Extensions" nested group under the Compressed Token
Program section following the existing cMint/cToken grouping pattern and include
entries for "compressed-token-program/Extensions/compressible" and
"compressed-token-program/Extensions/token-metadata" (matching the .mdx
filenames without extensions) so those pages become part of the docs navigation.
Corrected indentation for nested Guides group object in docs.json cToken section (line 53-54)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "group": "Compressed Token Program", | ||
| "pages": [ | ||
| "compressed-tokens/overview", | ||
| "compressed-token-program/overview", | ||
| "compressed-token-program/c-token-program", | ||
| { | ||
| "group": "Guides", | ||
| "group": "cMint", | ||
| "pages": [ | ||
| "compressed-tokens/guides", | ||
| "compressed-tokens/guides/how-to-create-compressed-token-accounts", | ||
| "compressed-tokens/guides/how-to-mint-compressed-tokens", | ||
| "compressed-tokens/guides/how-to-transfer-compressed-token", | ||
| "compressed-tokens/guides/how-to-compress-and-decompress-spl-tokens", | ||
| "compressed-tokens/guides/how-to-compress-complete-spl-token-accounts", | ||
| "compressed-tokens/guides/how-to-create-and-register-a-mint-account-for-compression", | ||
| "compressed-tokens/guides/how-to-create-compressed-token-pools-for-mint-accounts", | ||
| "compressed-tokens/guides/how-to-merge-compressed-token-accounts", | ||
| "compressed-tokens/guides/how-to-approve-and-revoke-delegate-authority" | ||
| "compressed-token-program/cmint/cmint", | ||
| "compressed-token-program/cmint/update-metadata" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Advanced Guides", | ||
| "group": "cToken", | ||
| "pages": [ | ||
| "compressed-tokens/advanced-guides", | ||
| "compressed-tokens/advanced-guides/how-to-combine-operations-in-one-transaction", | ||
| "compressed-tokens/advanced-guides/create-an-airdrop", | ||
| "compressed-tokens/advanced-guides/create-an-airdrop-with-claim", | ||
| "compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens", | ||
| "compressed-tokens/advanced-guides/use-token-2022-with-compression", | ||
| "compressed-tokens/advanced-guides/example-web-client", | ||
| "compressed-tokens/advanced-guides/example-node-js" | ||
| "compressed-token-program/ctoken/mint-actions", | ||
| { | ||
| "group": "Guides", | ||
| "expanded": true, | ||
| "pages": [ | ||
| "compressed-token-program/ctoken/create-ctoken", | ||
| "compressed-token-program/ctoken/mint-ctokens", | ||
| "compressed-token-program/ctoken/create-ata", | ||
| "compressed-token-program/ctoken/ctoken-transfer", | ||
| "compressed-token-program/ctoken/SPL-to-ctoken-transfer", | ||
| "compressed-token-program/ctoken/ctoken-to-spl-decompress", | ||
| "compressed-token-program/ctoken/compress-and-close", | ||
| "compressed-token-program/ctoken/close-ctoken" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Compressed Token", | ||
| "pages": [ | ||
| "compressed-token-program/compressed-tokens/compressed-token-overview", | ||
| { | ||
| "group": "Basic Guides", | ||
| "pages": [ | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-create-compressed-token-accounts", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-mint-compressed-tokens", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-transfer-compressed-token", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-compress-and-decompress-spl-tokens", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-compress-complete-spl-token-accounts", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-create-and-register-a-mint-account-for-compression", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-create-compressed-token-pools-for-mint-accounts", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-merge-compressed-token-accounts", | ||
| "compressed-token-program/compressed-tokens/basic-guides/how-to-approve-and-revoke-delegate-authority" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Advanced Guides", | ||
| "pages": [ | ||
| { | ||
| "group": "Integration", | ||
| "expanded": true, | ||
| "pages": [ | ||
| "compressed-token-program/compressed-tokens/advanced-guides/how-to-combine-operations-in-one-transaction", | ||
| "compressed-token-program/compressed-tokens/advanced-guides/add-wallet-support-for-compressed-tokens", | ||
| "compressed-token-program/compressed-tokens/advanced-guides/use-token-2022-with-compression" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Examples", | ||
| "expanded": true, | ||
| "pages": [ | ||
| "compressed-token-program/compressed-tokens/advanced-guides/create-an-airdrop", | ||
| "compressed-token-program/compressed-tokens/advanced-guides/create-an-airdrop-with-claim", | ||
| "compressed-token-program/compressed-tokens/advanced-guides/example-web-client", | ||
| "compressed-token-program/compressed-tokens/advanced-guides/example-node-js" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Critical: Extensions documentation files missing from navigation.
The PR objectives state that three new Extensions documentation files are being added (extensions.mdx, compressible.mdx, token-metadata.mdx), but there is no "Extensions" group in the "Compressed Token Program" section of the Docs tab. This violates the test plan requirement: "Verify all new pages render correctly in Mintlify" — pages not in docs.json are not discoverable.
Following the established pattern for cMint and cToken (sibling groups within Compressed Token Program), add an "Extensions" group to the navigation.
Once confirmed, add an Extensions group to lines 69–70 (before the "Compressed Token" group) in both the "Docs" tab (after line 68) and the "Compressed Token Program" tab (after line 238):
{
"group": "Extensions",
"pages": [
"compressed-token-program/Extensions/extensions",
"compressed-token-program/Extensions/compressible",
"compressed-token-program/Extensions/token-metadata"
]
}🏁 Script executed:
#!/bin/bash
# Verify the Extensions documentation files exist and identify their path
echo "=== Searching for Extensions documentation files ==="
find . -type f \( -name "compressible.mdx" -o -name "token-metadata.mdx" -o -name "extensions.mdx" \) 2>/dev/null | grep -v node_modules | sort
echo -e "\n=== Confirm directory structure ==="
find . -type d -name "*xtension*" -o -type d -name "*Extension*" 2>/dev/null | grep -v node_modules | sortLength of output: 239
I found two of the three Extensions files, but extensions.mdx is missing. Let me search for it with broader patterns:
Let me search more broadly in the repository for any Extensions overview file or references:
[/run_scripts]
🏁 Script executed:
#!/bin/bash
# Broader search for Extensions-related files
echo "=== All files containing 'extension' in name (case-insensitive) ==="
find . -iname "*extension*" -type f 2>/dev/null | grep -v node_modules | head -20
echo -e "\n=== All markdown/MDX files in compressed-token-program/Extensions ==="
ls -la ./compressed-token-program/Extensions/ 2>/dev/null || echo "Directory not accessible"
echo -e "\n=== Check for any files in compressed-token-program/ that start with capital letters ==="
ls -la ./compressed-token-program/ 2>/dev/null | grep "^d" | grep -E "[A-Z]" || echo "None found"Length of output: 827
Now let me verify whether the Extensions group is actually missing from docs.json:
[/run_scripts]
🏁 Script executed:
#!/bin/bash
# Check if Extensions group exists in docs.json
echo "=== Search for 'Extensions' group in docs.json ==="
grep -n "Extensions" ./docs.json || echo "No Extensions group found in docs.json"
echo -e "\n=== Extract lines around 'Compressed Token' section to confirm structure ==="
sed -n '39,115p' ./docs.jsonLength of output: 4366
Critical: Extensions documentation files missing from navigation.
The PR adds two Extensions documentation files (compressible.mdx, token-metadata.mdx) to compressed-token-program/Extensions/, but there is no "Extensions" group in the "Compressed Token Program" section of docs.json. This violates the test plan requirement: "Verify all new pages render correctly in Mintlify" — pages not in docs.json are not discoverable.
Following the established pattern for cMint and cToken (sibling groups within Compressed Token Program), add an "Extensions" group after the cToken group (around line 69):
{
"group": "Extensions",
"pages": [
"compressed-token-program/Extensions/compressible",
"compressed-token-program/Extensions/token-metadata"
]
}🤖 Prompt for AI Agents
docs.json around lines 39 to 114: the new Extensions docs
(compressed-token-program/Extensions/compressible.mdx and token-metadata.mdx)
are not included in the "Compressed Token Program" navigation; add an
"Extensions" group immediately after the cToken group following the existing
cMint/cToken group pattern, with pages entries for
"compressed-token-program/Extensions/compressible" and
"compressed-token-program/Extensions/token-metadata" so the two new files become
discoverable in the docs navigation.
Summary
Changes
ctoken/c-token-program.mdx- Comprehensive C-Token program documentation (353 lines)extensions/extensions.mdx- Extensions overview (42 lines)extensions/compressible.mdx- Compressible account extension guide (251 lines)extensions/token-metadata.mdx- Token metadata extension guide (193 lines)docs.json- Updated navigation structure with new tab organizationTest plan
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.