Skip to content

Conversation

@tilo-14
Copy link
Collaborator

@tilo-14 tilo-14 commented Jan 15, 2026

Update docs to match SDK rename from light-protocol/light-protocol#2167

Changes:

  • Crate imports: light-ctoken-sdklight-token-sdk
  • Struct names: CTokenToken, MintToCTokenMintTo, etc.
  • Constants: CTOKEN_PROGRAM_IDLIGHT_TOKEN_PROGRAM_ID
  • Variable names: ctokenAtatokenAta
  • Updated sync-docs.sh paths

Summary by CodeRabbit

  • Refactor

    • Renamed public API types, constants, and method names to adopt "light token" terminology across the platform
  • Documentation

    • Updated guides, cookbooks, snippets, UI text, and examples to reflect light-token names and paths
    • Removed several legacy toolkit and interface-method documentation pages
  • Chores

    • Updated spell-check vocabulary to use "lighttoken" and "lighttokens"

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Warning

Rate limit exceeded

@tilo-14 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 33 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1736a0d and c7d4bfb.

📒 Files selected for processing (31)
  • blog/light-token.mdx
  • cspell.json
  • learn/light-token-standard.mdx
  • light-token/cookbook/close-token-account.mdx
  • light-token/cookbook/create-ata.mdx
  • light-token/cookbook/create-mint.mdx
  • light-token/cookbook/create-token-account.mdx
  • light-token/cookbook/mint-to.mdx
  • light-token/cookbook/transfer-interface.mdx
  • light-token/interface-methods.mdx
  • light-token/toolkits/for-dexs.mdx
  • light-token/toolkits/for-launchpads.mdx
  • light-token/toolkits/for-payments.mdx
  • light-token/toolkits/for-streaming-mints.mdx
  • light-token/toolkits/for-streaming-tokens.mdx
  • light-token/toolkits/for-trading-apps.mdx
  • light-token/toolkits/for-wallets.mdx
  • light-token/welcome.mdx
  • scripts/sync-docs.sh
  • snippets/accounts-list/light-token-create-ata-accounts-list.mdx
  • snippets/code-snippets/compressed-token/create-mint/instruction.mdx
  • snippets/code-snippets/light-token/load-ata/action.mdx
  • snippets/code-snippets/light-token/load-ata/instruction.mdx
  • snippets/code-snippets/light-token/unwrap/instruction.mdx
  • snippets/code-snippets/light-token/wrap/action.mdx
  • snippets/code-snippets/light-token/wrap/instruction.mdx
  • snippets/jsx/light-token-vs-spl-calculator.jsx
  • snippets/jsx/token22-extensions-table.jsx
  • snippets/light-token-configure-rent.mdx
  • snippets/light-token-guides/client-custom-rent-config.mdx
  • snippets/setup/rust-install-dependencies.mdx

Walkthrough

This PR renames ctoken/CToken terminology to light-token/Token across documentation, code snippets, config, and sync scripts; updates module paths, type and function names, constants (e.g., CTOKEN_PROGRAM_IDLIGHT_TOKEN_PROGRAM_ID), and example identifiers. Several long-form toolkit docs were removed. No runtime control-flow changes.

Changes

Cohort / File(s) Summary
Configuration & Sync
cspell.json, scripts/sync-docs.sh, snippets/setup/rust-install-dependencies.mdx
Spelllist and dependency rename; sync mappings and SOURCE_DIR updated to sdk-light-token-test.
Core Guides & Cookbook
learn/light-token-standard.mdx, light-token/cookbook/... (e.g., create-*.mdx, mint-to.mdx, create-token-account.mdx, create-ata.mdx, close-token-account.mdx, transfer-interface.mdx)
Wide renames in docs/snippets: CTokenToken, light_ctoken_sdk::ctokenlight_token_sdk::token, CPI/builder/constructor names updated, program ID constants changed to LIGHT_TOKEN_PROGRAM_ID.
Toolkits Removed
light-token/toolkits/for-dexs.mdx, .../for-launchpads.mdx, .../for-trading-apps.mdx
Entire toolkit docs removed (large deletions of integration guides and examples).
Toolkits & Examples (edits)
light-token/toolkits/*, snippets/code-snippets/light-token/*, snippets/code-snippets/compressed-token/create-mint/instruction.mdx
Variable renames (ctokenAtatokenAta / lightTokenAta), program ID replacements, import path updates, minor comment/text adjustments.
Snippets & UI components
snippets/jsx/*, snippets/accounts-list/*, snippets/light-token-*
UI/snippet constant and instruction-name updates (e.g., CTOKEN_DEFAULT_CREATION_COSTLIGHT_TOKEN_DEFAULT_CREATION_COST, CTokenTransferTokenTransfer), PDA derivation docs updated.
Small local identifier updates
numerous .mdx snippets under snippets/code-snippets/ and light-token/toolkits/
Local identifier/field renames with no signature or control-flow changes (e.g., destination_ctoken_accountdestination_token_account).
Welcome & components
light-token/welcome.mdx, snippets/jsx/light-token-vs-spl-calculator.jsx
Component import/name updates (e.g., CTokenVsSplCalculatorLightTokenVsSplCalculator) and related UI text/constant renames.
Deleted interface docs
light-token/interface-methods.mdx
Removal of the public interface-methods documentation file and its code/reference sections.

Sequence Diagram(s)

(omitted — changes are primarily renames, deletions, and doc/snippet edits with no new multi-component control flow)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • Add client library guide #1 — related documentation path restructures and client-library content that intersect with these doc path and sync updates.

Poem

🐰 I hopped through docs with a tiny thump,

swapp'd names from ctoken to light-token with a jump.
Tokens now gleam, imports neatly aligned,
A carrot-shaped cheer — tidy changes, well-refined! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore: rename ctoken to light-token' accurately reflects the primary change: a comprehensive rename of ctoken-related identifiers (imports, types, constants, variables) to light-token equivalents across the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
light-token/toolkits/for-dexs.mdx (1)

432-445: Inconsistent terminology in ASCII diagram.

The integration flow diagram still uses "c-token" terminology (User c-token ATA) which is inconsistent with the rest of the file that uses "light-token" terminology.

Proposed fix
 ## Integration Flow
                 DEX with light-token Support

┌─────────────────────────────────────────────────────────────┐
│ │
│ DEPOSIT: │
-│ User c-token ATA ──unwrap()──► Pool SPL ATA │
+│ User light-token ATA ──unwrap()──► Pool SPL ATA │
│ │
│ SWAP: │
│ unwrap() ──► [swap instruction] ──► wrap() │
│ │
│ WITHDRAWAL: │
-│ Pool SPL ATA ──wrap()──► User c-token ATA │
+│ Pool SPL ATA ──wrap()──► User light-token ATA │
│ │
└─────────────────────────────────────────────────────────────┘

light-token/interface-methods.mdx (1)

92-101: Inconsistent terminology: "c-token" should be "light-token".

Lines 92 and 98 still reference "c-token" which is inconsistent with the rename objective of this PR.

📝 Suggested fix
-Create and initialize a new mint for SPL, Token-2022, or c-token.
+Create and initialize a new mint for SPL, Token-2022, or light-token.

 ```typescript
 const { mint, transactionSignature } = await createMintInterface(
   rpc,
   payer,
-  mintAuthority, // Signer for c-token mints
+  mintAuthority, // Signer for light-token mints
   freezeAuthority, // or null
   9 // decimals
 );
</details>

</blockquote></details>

</blockquote></details>
🤖 Fix all issues with AI agents
In `@learn/light-token-standard.mdx`:
- Around line 228-230: Update the broken GitHub link to the token_struct.rs
source in learn/light-token-standard.mdx by locating the current repository path
for token_struct.rs (token-interface/src/state/token/token_struct.rs) in the
Lightprotocol repo and replacing the hardcoded commit hash URL with a working
one (either the correct commit hash or the branch-based blob/main URL) so the
link resolves; verify the updated URL opens the token_struct.rs file in the
browser and update the markdown link text if needed.

In `@light-token/cookbook/create-ata.mdx`:
- Around line 352-354: The documentation link labeled "here" in create-ata.mdx
points to a non-existent GitHub path (create_ata2.rs) and returns 404; update
that markdown link to the correct repository path (or remove/replace it) by
locating the actual file in the light-protocol repo (search for create_ata2.rs
or equivalent in sdk-tests/sdk-light-token-test/src) and replace the URL in the
"Find the source code [here]" link so it points to the existing file or to the
proper file name.

In `@light-token/toolkits/for-streaming-mints.mdx`:
- Around line 133-136: The code references an undefined snake_case variable
light_token_program_id; replace it with the actual constant
LIGHT_TOKEN_PROGRAM_ID or create a properly-typed local variable from that
constant before comparison. Specifically, update the owner comparison in the
loop to compare against LIGHT_TOKEN_PROGRAM_ID (or parse/convert
LIGHT_TOKEN_PROGRAM_ID into a Pubkey/byte array named light_token_program_id if
you need a different type) so the identifier and types match the existing
constant and the owner comparison succeeds.

In `@snippets/jsx/light-token-vs-spl-calculator.jsx`:
- Around line 1-16: The component uses React hooks but misses the import for
useState; add an import for useState from 'react' at the top of the file so the
hooks used in LightTokenVsSplCalculator (useState, setNumAccounts,
setShowCustomAccounts) resolve correctly, and ensure the import coexists with
any other React imports if present.

In `@snippets/setup/rust-install-dependencies.mdx`:
- Line 5: The dependency line specifying the crate "light-token-types = \"0.1\""
is invalid because that version doesn't exist on crates.io; update the Cargo
dependency to a correct published crate and version (or correct the crate name)
by replacing the "light-token-types = \"0.1\"" entry with the verified crate
name and a valid version string (or remove it if the crate is unpublished),
ensuring the change is made where the dependency is declared (the
light-token-types dependency line in the snippet).
🧹 Nitpick comments (1)
snippets/jsx/token22-extensions-table.jsx (1)

59-121: Consistent rename across all filter conditions.

All nine filter arrays are correctly updated to use TokenTransfer instead of the previous naming.

Optional: Consider extracting the duplicated filter array into a constant to improve maintainability:

♻️ Suggested refactor
+ // Instructions excluded from runtime-constrained extensions
+ const excludedTransferInstructions = ["transfer", "TokenTransfer", "Transfer2"];
+
  // Extensions with runtime constraints
  {
    name: "MintCloseAuthority",
    description: "-",
    instructions: allInstructions.filter(
-     (i) => !["transfer", "TokenTransfer", "Transfer2"].includes(i)
+     (i) => !excludedTransferInstructions.includes(i)
    ),
  },
  // ... apply similarly to the other 8 extensions
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 87bacb1 and 771f91a.

📒 Files selected for processing (30)
  • cspell.json
  • learn/light-token-standard.mdx
  • light-token/cookbook/close-token-account.mdx
  • light-token/cookbook/create-ata.mdx
  • light-token/cookbook/create-mint.mdx
  • light-token/cookbook/create-token-account.mdx
  • light-token/cookbook/mint-to.mdx
  • light-token/cookbook/transfer-interface.mdx
  • light-token/interface-methods.mdx
  • light-token/toolkits/for-dexs.mdx
  • light-token/toolkits/for-launchpads.mdx
  • light-token/toolkits/for-payments.mdx
  • light-token/toolkits/for-streaming-mints.mdx
  • light-token/toolkits/for-streaming-tokens.mdx
  • light-token/toolkits/for-trading-apps.mdx
  • light-token/toolkits/for-wallets.mdx
  • light-token/welcome.mdx
  • scripts/sync-docs.sh
  • snippets/accounts-list/light-token-create-ata-accounts-list.mdx
  • snippets/code-snippets/compressed-token/create-mint/instruction.mdx
  • snippets/code-snippets/light-token/load-ata/action.mdx
  • snippets/code-snippets/light-token/load-ata/instruction.mdx
  • snippets/code-snippets/light-token/unwrap/instruction.mdx
  • snippets/code-snippets/light-token/wrap/action.mdx
  • snippets/code-snippets/light-token/wrap/instruction.mdx
  • snippets/jsx/light-token-vs-spl-calculator.jsx
  • snippets/jsx/token22-extensions-table.jsx
  • snippets/light-token-configure-rent.mdx
  • snippets/light-token-guides/client-custom-rent-config.mdx
  • snippets/setup/rust-install-dependencies.mdx
🔇 Additional comments (98)
snippets/accounts-list/light-token-create-ata-accounts-list.mdx (1)

43-43: LGTM!

The rename from ctoken_program_id to light_token_program_id is consistent with the broader SDK renaming effort and maintains terminology consistency throughout this documentation snippet.

light-token/toolkits/for-streaming-tokens.mdx (2)

59-64: LGTM!

The variable rename from ctokenAta to tokenAta and the updated comment are consistent with the PR's objective to rename "ctoken" terminology to "light-token". The changes are applied correctly to both the variable declaration and its usage in the loadAta call.


113-119: LGTM!

The same rename is consistently applied in the "Instruction" code example, with tokenAta used in both the variable declaration and the createLoadAtaInstructions call. This maintains parity between the two code examples.

snippets/jsx/token22-extensions-table.jsx (1)

21-21: LGTM!

The rename from CTokenTransfer to TokenTransfer aligns with the PR's terminology standardization from "ctoken" to "light-token".

snippets/light-token-configure-rent.mdx (2)

36-45: Documentation terminology is consistent with the rename.

The tooltip and description text correctly reference "light token program PDA" which aligns with the broader ctoken → light-token terminology change.


2-2: The import path is invalid and will not compile.

The crate light_token_sdk does not exist in the Rust ecosystem, nor does the struct CompressibleParamsInfos exist in any Light Protocol SDK crate. According to the Light Protocol documentation, the actual SDK crates are light_compressed_token_sdk, light_ctoken_sdk, and light_sdk.

Update the import to use the correct crate and struct name from the actual Light Protocol SDK.

Likely an incorrect or invalid review comment.

cspell.json (1)

35-38: LGTM on the vocabulary update.

The rename from ctoken/ctokens to lighttoken/lighttokens aligns with the SDK rename.

Note: The cmint/cmints entries (lines 37-38) still remain. Verify if these terms are still in use or if they should also be updated for consistency with the broader rename.

snippets/code-snippets/compressed-token/create-mint/instruction.mdx (1)

14-25: LGTM!

The LIGHT_TOKEN_PROGRAM_ID constant is correctly imported and used consistently in both the import statement and the findProgramAddressSync call.

light-token/toolkits/for-launchpads.mdx (2)

220-230: LGTM!

The LIGHT_TOKEN_PROGRAM_ID import and usage are consistent with the SDK rename.


517-517: LGTM!

The CPI builder reference is correctly updated from MintToCTokenCpi to MintToCpi, aligning with the SDK rename pattern.

light-token/toolkits/for-wallets.mdx (4)

106-116: LGTM!

The LIGHT_TOKEN_PROGRAM_ID import and usage are consistent with the SDK rename.


268-276: LGTM!

The second occurrence of LIGHT_TOKEN_PROGRAM_ID import and usage is consistent.


400-432: LGTM!

The variable rename from ctokenAta to tokenAta improves clarity and aligns with the light-token terminology. All usages within the wrap example are consistent.


462-477: LGTM!

The tokenAta variable naming is consistent throughout the unwrap example code.

scripts/sync-docs.sh (1)

18-25: LGTM!

The file mappings and source directory path are correctly updated to reflect the ctoken → light-token rename. The script logic remains sound.

light-token/toolkits/for-payments.mdx (4)

107-117: LGTM!

The import and usage of LIGHT_TOKEN_PROGRAM_ID are correctly updated from the previous CTOKEN_PROGRAM_ID.


225-236: LGTM!

Consistent rename of the program ID constant in the second code block.


447-479: LGTM!

Variable renames from ctokenAta to tokenAta are consistent throughout the wrap instruction and action helper examples.


509-524: LGTM!

Variable renames for the unwrap section are consistent with the overall light-token terminology.

snippets/jsx/light-token-vs-spl-calculator.jsx (1)

138-138: LGTM!

The display correctly references tokenCost to match the renamed variable.

light-token/toolkits/for-streaming-mints.mdx (2)

27-41: LGTM!

The dependency and import renames are consistent with the ctoken → light-token migration.


217-217: LGTM!

The doc comment correctly references "light token program".

light-token/toolkits/for-trading-apps.mdx (3)

274-290: LGTM!

Variable rename from ctokenAta to tokenAta and the comment update to "light-token ATA" are consistent with the migration.


317-333: LGTM!

The action helper section correctly uses tokenAta and updated comments for the light-token terminology.


363-382: LGTM!

The unwrap instruction section consistently uses tokenAta and properly documents the light-token ATA as the source.

learn/light-token-standard.mdx (1)

211-212: LGTM - Struct renamed to Token.

The struct rename from CToken to Token and the updated comment are consistent with the broader SDK rename.

snippets/light-token-guides/client-custom-rent-config.mdx (4)

11-17: LGTM - Import paths and types updated correctly.

The module paths have been updated from light_ctoken_sdk::ctoken to light_token_sdk::token, and the type path from light_ctoken_types to light_token_types.


19-26: LGTM - PDA helper functions renamed consistently.

The PDA helper functions have been renamed from ctoken_v1_* to light_token_v1_*, maintaining consistency with the broader rename.


28-34: LGTM - CreateTokenAccount constructor usage updated.

The instruction builder has been renamed from CreateCTokenAccount to CreateTokenAccount.


56-60: LGTM - Documentation text updated to Light Token terminology.

The tooltip and description text have been updated to use "Light Token program PDA" consistently.

light-token/cookbook/create-mint.mdx (11)

11-12: LGTM - Snippet import references updated.

The snippet imports have been updated to use the new light-token-* naming convention.


35-35: LGTM - Program ID constant renamed.

The constant has been renamed from CTOKEN_PROGRAM_ID to LIGHT_TOKEN_PROGRAM_ID.


90-90: LGTM - Import path updated to light_token_sdk.


116-119: LGTM - Import paths updated consistently.

The imports have been updated from light_ctoken_sdk and light_ctoken_interface to light_token_sdk and light_token_interface.


192-197: LGTM - Helper function paths updated.

The derive_cmint_compressed_address and find_cmint_address functions are now correctly referenced from light_token_sdk::token.


281-287: LGTM - light_token_interface import updated.


320-320: LGTM - CreateCMintParams import path updated.


354-354: LGTM - SystemAccountInfos import path updated.


382-382: LGTM - CreateCMintCpi import paths updated consistently across all invoke examples.

Also applies to: 403-403, 426-426


462-467: LGTM - Full code example imports updated.

The imports in the full code example have been updated to use light_token_sdk::token.


456-458: Source code link updated to new test path.

The link has been updated from sdk-ctoken-test to sdk-light-token-test and points to a valid resource.

light-token/cookbook/create-token-account.mdx (11)

10-12: LGTM - Snippet import references updated.

The snippet imports have been renamed from CToken* to Token* naming convention.


31-42: LGTM - CreateTokenAccount usage documented correctly.

The instruction builder has been renamed from CreateCTokenAccount to CreateTokenAccount.


62-63: LGTM - Import paths updated.

The imports have been updated to light_token_sdk::token and light_token_interface::state::Token.


108-113: LGTM - Token state deserialization and assertions updated.

The state type has been renamed from CToken to Token, and the deserialization and assertions are consistent.


150-155: LGTM - Helper function paths updated.

The derive_cmint_compressed_address and find_cmint_address functions are correctly referenced from light_token_sdk::token.


243-256: LGTM - CreateTokenAccountCpi usage updated in invoke example.

The CPI struct has been renamed from CreateCTokenAccountCpi to CreateTokenAccountCpi.


261-273: LGTM - CreateTokenAccountCpi usage updated in invoke_signed example.


290-290: LGTM - Full code example import updated.

The import has been updated to light_token_sdk::token::{CompressibleParamsCpi, CreateTokenAccountCpi}.


305-305: LGTM - Comment updated to reference token module.


332-339: LGTM - CreateTokenAccountCpi usages in full code example updated consistently.

Also applies to: 377-383


284-286: LGTM - Source code link updated to sdk-light-token-test. The GitHub link is valid and points to the correct file in the repository.

light-token/cookbook/create-ata.mdx (13)

10-17: LGTM - Snippet import references updated.

The snippet imports have been renamed from CToken* to Token* naming convention.


84-95: LGTM - CreateAssociatedTokenAccount documentation updated.

The instruction builder has been renamed from CreateAssociatedCTokenAccount to CreateAssociatedTokenAccount.


116-120: LGTM - Import paths updated.

The imports have been updated to light_token_sdk::token with derive_token_ata and CreateAssociatedTokenAccount.


151-151: LGTM - ATA derivation helper renamed.

The helper function has been renamed from derive_ctoken_ata to derive_token_ata.


154-160: LGTM - CreateAssociatedTokenAccount usage updated.


169-174: LGTM - Token state deserialization and assertions updated.

The state type has been renamed from CToken to Token.


210-216: LGTM - Helper function paths updated in create_compressed_mint.


288-288: LGTM - TokenConfigureRent snippet reference updated.


299-299: LGTM - PDA derivation note updated to use light_token_program_id.


308-321: LGTM - CreateAssociatedTokenAccountCpi usage updated in both invoke examples.

The CPI struct has been renamed from CreateAssociatedCTokenAccountCpi to CreateAssociatedTokenAccountCpi.

Also applies to: 327-341


345-345: LGTM - TokenCreateATAAccountsList snippet reference updated.


358-358: LGTM - Full code example import updated.

The import has been updated to light_token_sdk::token::{CompressibleParamsCpi, CreateAssociatedTokenAccountCpi}.


395-405: LGTM - CreateAssociatedTokenAccountCpi usages in full code example updated consistently.

Also applies to: 443-453

light-token/cookbook/mint-to.mdx (4)

1-90: LGTM!

The imports, documentation text, and code examples are correctly updated to reflect the new light_token_sdk::token module path and MintTo/MintToParams type names. The terminology is consistent throughout.


121-258: LGTM!

The test function rename (test_mint_to_token), variable renames (token_account, token_state), and SDK usage (MintToParams::new, MintTo::new, Token::deserialize) are all consistent with the new naming convention.


486-496: LGTM!

The source link correctly points to the new path sdk-tests/sdk-light-token-test/src/mint_to.rs and the full code example imports are properly updated.


107-114: The naming convention appears correct and intentional. The "C" prefix in CreateCMint and CreateCMintParams consistently represents "Compressed" throughout the SDK, as evidenced by the function naming pattern (e.g., create_compressed_mint) and corresponding types (CreateCMintCpi, CMintSystemAccountsList). This abbreviation is used specifically for Compressed Mint operations, while general operations like MintTo/MintToParams and CreateTokenAccount do not carry this prefix. The naming is consistent across all cookbook files.

light-token/cookbook/close-token-account.mdx (4)

26-36: LGTM!

The code example correctly demonstrates the renamed CloseTokenAccount builder and the new LIGHT_TOKEN_PROGRAM_ID constant.


53-56: LGTM!

Import paths correctly updated to light_token_sdk::token module, and the state type is properly renamed from CToken to Token.


64-130: LGTM!

Test function and variable names are consistently updated (test_close_token_account, token_state), and all SDK usage reflects the new naming (CreateTokenAccount, CloseTokenAccount, Token::deserialize).


291-374: LGTM!

The full code example correctly uses CloseTokenAccountCpi throughout both handler functions, and the source link is updated to the new path.

light-token/cookbook/transfer-interface.mdx (6)

124-130: LGTM!

The import block correctly uses the new module path light_token_sdk::token and renamed types (Transfer, TransferFromSpl, derive_token_ata, CreateAssociatedTokenAccount).


281-293: LGTM!

The TransferFromSpl struct usage correctly includes the renamed field destination_token_account (from destination_ctoken_account).


311-319: LGTM!

The Transfer struct is correctly used for light-token to light-token transfers.


361-371: LGTM!

The CPI import path is correctly updated to light_token_sdk::token::TransferInterfaceCpi.


434-443: LGTM!

Source link correctly points to the new path sdk-tests/sdk-light-token-test/src/transfer_interface.rs and imports are properly updated.


451-520: LGTM!

The comments in the full code example are properly updated to reflect "Token" terminology instead of "CToken" (e.g., "Token -> Token transfer", "SPL or Token" account descriptions).

light-token/welcome.mdx (2)

81-81: LGTM!

Component usage correctly updated to <IntegrateLightTokenGuidesTable />.


12-17: LGTM!

Component imports correctly updated to use the new naming convention (LightTokenVsSplCalculator, IntegrateLightTokenGuidesTable). All imported files exist at the specified paths.

light-token/toolkits/for-dexs.mdx (5)

81-88: LGTM!

The Rust SDK dependency and imports are correctly updated to use light-token-sdk and the new CPI types (TransferFromSplCpi, TransferToSplCpi).


109-125: LGTM!

Variable name correctly updated from ctokenAta to tokenAta, and the comment properly describes it as "user's light-token ATA".


174-195: LGTM!

The Rust CPI example correctly uses TransferToSplCpi with the renamed field source_token_account (from source_ctoken_account).


293-315: LGTM!

The TransferFromSplCpi usage correctly includes the renamed field destination_token_account.


338-350: LGTM!

Variable names in the atomic swap example are correctly updated (userInputToken, userOutputToken) with consistent naming throughout.

light-token/interface-methods.mdx (6)

60-64: LGTM!

The table updates correctly reflect the light-token terminology change with appropriate descriptions.


83-84: LGTM!

The TokenAccountSourceType values are properly renamed from ctoken-hot/ctoken-cold to token-hot/token-cold.


322-362: LGTM!

The TransferSplToTokenCpi section is correctly renamed with updated:

  • Section heading and description
  • Field names (destination_token_account)
  • Module import path (light_token_sdk::token::TransferSplToTokenCpi)
  • Code example variable names

366-406: LGTM!

The TransferTokenToSplCpi section is properly updated with consistent field naming (source_token_account) and module paths.


410-412: LGTM!

The CreateAssociatedTokenAccountCpi section heading and description correctly use light-token terminology.


453-486: LGTM!

The error type is correctly renamed from CTokenSdkError to TokenSdkError, maintaining all error codes and descriptions.

snippets/code-snippets/light-token/load-ata/action.mdx (1)

35-36: LGTM!

The variable rename from ctokenAta to lightTokenAta is consistent with the PR's terminology update, and the usage in loadAta is correctly updated.

snippets/code-snippets/light-token/wrap/action.mdx (1)

45-48: LGTM!

The variable rename to lightTokenAta is consistent, and the wrap function call correctly uses the renamed variable as the destination.

snippets/code-snippets/light-token/wrap/instruction.mdx (1)

44-56: LGTM!

The variable rename to lightTokenAta is applied consistently in both the declaration and usage within createWrapInstruction.

snippets/code-snippets/light-token/unwrap/instruction.mdx (2)

36-37: LGTM!

The variable is correctly renamed and used in the loadAta call to load compressed tokens to the hot balance.


53-54: LGTM!

The createUnwrapInstruction correctly uses lightTokenAta as the source account for the unwrap operation.

snippets/code-snippets/light-token/load-ata/instruction.mdx (1)

36-36: LGTM!

The variable rename from ctokenAta to lightTokenAta is applied consistently at both the declaration and usage sites, aligning with the PR's terminology update from "ctoken" to "light-token".

Also applies to: 41-41

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
light-token/toolkits/for-dexs.mdx (1)

432-445: Inconsistent terminology in ASCII diagram.

The diagram still uses "c-token ATA" at lines 437 and 443, while the rest of the file and PR consistently uses "light-token" terminology. Update these references for consistency.

📝 Suggested fix
                 DEX with light-token Support

┌─────────────────────────────────────────────────────────────┐
│ │
│ DEPOSIT: │
-│ User c-token ATA ──unwrap()──► Pool SPL ATA │
+│ User light-token ATA ──unwrap()──► Pool SPL ATA │
│ │
│ SWAP: │
│ unwrap() ──► [swap instruction] ──► wrap() │
│ │
│ WITHDRAWAL: │
-│ Pool SPL ATA ──wrap()──► User c-token ATA │
+│ Pool SPL ATA ──wrap()──► User light-token ATA │
│ │
└─────────────────────────────────────────────────────────────┘

light-token/cookbook/create-token-account.mdx (1)

92-93: Minor inconsistency in comment.

Line 92 comment still uses "cToken" terminology. Consider updating to "light-token" or "Token" for consistency.

📝 Suggested fix
-    // Step 2: Generate new keypair for the cToken account
+    // Step 2: Generate new keypair for the light-token account
     let account = Keypair::new();
light-token/interface-methods.mdx (1)

92-101: Inconsistent terminology in createMintInterface section.

Lines 92 and 98-99 still use "c-token" terminology while the rest of the file uses "light-token". Update for consistency.

📝 Suggested fix
-Create and initialize a new mint for SPL, Token-2022, or c-token.
+Create and initialize a new mint for SPL, Token-2022, or light-token.

 ```typescript
 const { mint, transactionSignature } = await createMintInterface(
   rpc,
   payer,
-  mintAuthority, // Signer for c-token mints
+  mintAuthority, // Signer for light-token mints
   freezeAuthority, // or null
   9 // decimals
 );
🤖 Fix all issues with AI agents
In `@light-token/cookbook/create-ata.mdx`:
- Around line 352-354: The markdown link labeled "here" in create-ata.mdx points
to a non-existent file create_ata2.rs; open the file create-ata.mdx, locate the
anchor text "here" (the Find the source code link) and either update its href to
the correct repository path for the intended source (replace
sdk-tests/sdk-light-token-test/src/create_ata2.rs with the actual file path/name
in the repo) or remove the sentence/link if that source no longer exists,
ensuring the visible text and URL are consistent.

In `@light-token/cookbook/transfer-interface.mdx`:
- Line 438: The link to transfer_interface.rs in transfer-interface.mdx is
broken because the path sdk-tests/sdk-light-token-test/src/transfer_interface.rs
does not exist; locate the correct file in the Lightprotocol repository (search
for transfer_interface.rs or equivalent under sdk-tests, sdk-light-token-test,
or sdk-light-token directories), then update the URL in the markdown to the
repository's correct relative path or raw GitHub URL pointing to that file
(replace the current
https://github.com/.../sdk-tests/sdk-light-token-test/src/transfer_interface.rs
with the actual path to transfer_interface.rs or the correct file name) so the
link resolves.
♻️ Duplicate comments (1)
snippets/setup/rust-install-dependencies.mdx (1)

5-5: Crate light-token-types version "0.1" may not exist on crates.io.

This was flagged in a previous review. The dependency rename aligns with PR objectives, but please verify the crate has been published to crates.io before merging to avoid build failures.

#!/bin/bash
# Verify the crate exists on crates.io
curl -s "https://crates.io/api/v1/crates/light-token-types" | jq '.crate.name, .crate.max_version, .errors'
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 771f91a and 0a14b0e.

📒 Files selected for processing (30)
  • cspell.json
  • learn/light-token-standard.mdx
  • light-token/cookbook/close-token-account.mdx
  • light-token/cookbook/create-ata.mdx
  • light-token/cookbook/create-mint.mdx
  • light-token/cookbook/create-token-account.mdx
  • light-token/cookbook/mint-to.mdx
  • light-token/cookbook/transfer-interface.mdx
  • light-token/interface-methods.mdx
  • light-token/toolkits/for-dexs.mdx
  • light-token/toolkits/for-launchpads.mdx
  • light-token/toolkits/for-payments.mdx
  • light-token/toolkits/for-streaming-mints.mdx
  • light-token/toolkits/for-streaming-tokens.mdx
  • light-token/toolkits/for-trading-apps.mdx
  • light-token/toolkits/for-wallets.mdx
  • light-token/welcome.mdx
  • scripts/sync-docs.sh
  • snippets/accounts-list/light-token-create-ata-accounts-list.mdx
  • snippets/code-snippets/compressed-token/create-mint/instruction.mdx
  • snippets/code-snippets/light-token/load-ata/action.mdx
  • snippets/code-snippets/light-token/load-ata/instruction.mdx
  • snippets/code-snippets/light-token/unwrap/instruction.mdx
  • snippets/code-snippets/light-token/wrap/action.mdx
  • snippets/code-snippets/light-token/wrap/instruction.mdx
  • snippets/jsx/light-token-vs-spl-calculator.jsx
  • snippets/jsx/token22-extensions-table.jsx
  • snippets/light-token-configure-rent.mdx
  • snippets/light-token-guides/client-custom-rent-config.mdx
  • snippets/setup/rust-install-dependencies.mdx
🚧 Files skipped from review as they are similar to previous changes (13)
  • light-token/welcome.mdx
  • snippets/accounts-list/light-token-create-ata-accounts-list.mdx
  • snippets/code-snippets/light-token/load-ata/instruction.mdx
  • light-token/toolkits/for-streaming-tokens.mdx
  • light-token/toolkits/for-launchpads.mdx
  • snippets/code-snippets/light-token/load-ata/action.mdx
  • cspell.json
  • light-token/cookbook/close-token-account.mdx
  • scripts/sync-docs.sh
  • snippets/jsx/light-token-vs-spl-calculator.jsx
  • light-token/toolkits/for-payments.mdx
  • light-token/toolkits/for-trading-apps.mdx
  • light-token/toolkits/for-wallets.mdx
🔇 Additional comments (34)
snippets/code-snippets/compressed-token/create-mint/instruction.mdx (1)

14-14: LGTM!

The rename from CTOKEN_PROGRAM_ID to LIGHT_TOKEN_PROGRAM_ID is consistent between the import and usage. The PDA derivation logic remains correct.

Also applies to: 25-25

snippets/light-token-configure-rent.mdx (1)

2-2: LGTM!

The import path update from light_compressed_token_sdk::ctoken to light_token_sdk::token is consistent with the SDK rename. The CompressibleParamsInfos struct usage remains unchanged.

snippets/jsx/token22-extensions-table.jsx (1)

21-21: LGTM!

The rename from CTokenTransfer to TokenTransfer is consistently applied across the pinocchioInstructions array and all filter conditions for extensions with runtime constraints.

Also applies to: 63-63, 70-70, 77-77, 84-84, 91-91, 98-98, 105-105, 112-112, 119-119

light-token/toolkits/for-streaming-mints.mdx (2)

27-27: LGTM!

The dependency, import paths, and constant renames are consistent with the light-token migration. The light-token-interface crate is correctly referenced in both Cargo.toml and the Rust imports.

Also applies to: 36-37, 41-41


134-135: LGTM!

The previous issue with the undefined variable has been properly addressed. The code now decodes LIGHT_TOKEN_PROGRAM_ID into a local light_token_program_id variable before comparison, which is the correct approach for comparing against the owner bytes.

snippets/light-token-guides/client-custom-rent-config.mdx (3)

11-17: LGTM!

The import path updates and type renames are consistent with the SDK migration:

  • light_ctoken_sdk::ctokenlight_token_sdk::token
  • CreateCTokenAccountCreateTokenAccount
  • PDA helpers renamed to light_token_v1_* prefix

20-21: LGTM!

The PDA helper function calls and CreateTokenAccount::new invocation are correctly updated to use the new naming convention.

Also applies to: 28-28


56-58: LGTM!

The tooltip and description text is correctly updated to "Light Token program PDA", maintaining consistency with the new terminology.

light-token/cookbook/transfer-interface.mdx (3)

12-14: LGTM!

Import renames are consistent with the light-token terminology migration. The component names clearly indicate their purpose.


124-130: LGTM!

Rust imports correctly reference the new light_token_sdk::token module with renamed types: Transfer (was TransferToken) and TransferFromSpl (was TransferSplToToken).


361-370: LGTM!

The TransferInterfaceCpi import and usage are correctly updated to the new module path.

light-token/toolkits/for-dexs.mdx (3)

81-88: LGTM!

Rust SDK imports and CPI type names are correctly updated to the new light_token_sdk::token module with TransferFromSplCpi and TransferToSplCpi.


338-350: LGTM!

Variable names (userInputToken, userOutputToken) and comments are consistently updated to reflect the light-token terminology.


174-191: LGTM!

The TransferToSplCpi struct usage with source_token_account field is correctly updated.

light-token/cookbook/create-token-account.mdx (4)

10-12: LGTM!

Import component names are correctly updated to the Token variants (TokenCreateAccountsList, TokenConfigureRent, TokenClientPrerequisites).


62-63: LGTM!

Rust imports correctly reference the new light_token_sdk::token module and light_token_interface::state::Token type.


108-112: LGTM!

Token state deserialization and field assertions are correctly updated to use the renamed Token type.


285-285: Link is valid and accessible.

The GitHub URL returns HTTP 200, confirming the file exists at the referenced location.

light-token/cookbook/create-ata.mdx (3)

10-17: LGTM!

Import component names are correctly updated to the Token variants.


116-120: LGTM!

Rust imports correctly reference the new light_token_sdk::token module with derive_token_ata, CreateAssociatedTokenAccount, and light_token_interface::state::Token.


308-320: LGTM!

CreateAssociatedTokenAccountCpi usage is correctly updated with proper field names.

light-token/interface-methods.mdx (6)

60-64: LGTM!

Table descriptions correctly updated to use "light-token" terminology for programId, merkleContext, and mintContext fields.


83-84: LGTM!

TokenAccountSourceType values correctly updated to token-hot and token-cold.


322-362: LGTM!

TransferSplToTokenCpi section correctly documents the renamed struct with destination_token_account field and updated import path.


366-406: LGTM!

TransferTokenToSplCpi section correctly documents the renamed struct with source_token_account field and updated code example.


410-430: LGTM!

CreateAssociatedTokenAccountCpi section correctly renamed from CreateAssociatedCTokenAccountCPI.


453-486: LGTM!

Error type correctly renamed from CTokenSdkError to TokenSdkError.

light-token/cookbook/mint-to.mdx (1)

1-491: LGTM! Comprehensive rename from ctoken to light-token terminology.

The file consistently updates:

  • Import paths (light_token_sdk::token, light_token_interface)
  • Type names (MintTo, MintToParams, MintToCpi, Token, CreateTokenAccount)
  • Variable names (token_account, token_accounts, token_state)
  • Test function name (test_mint_to_token)
  • Source code link to sdk-light-token-test

Note: The CMint naming (e.g., CreateCMint, derive_cmint_compressed_address) is correctly preserved as it refers to "Compressed Mint" rather than "CToken".

light-token/cookbook/create-mint.mdx (1)

1-737: LGTM! Consistent rename to light-token terminology.

The file properly updates:

  • Import paths to light_token_sdk::token and light_token_interface
  • Program ID reference to LIGHT_TOKEN_PROGRAM_ID (line 35)
  • Prerequisite imports (TokenClientPrerequisites, TokenTsClientPrerequisites)
  • Source code link to sdk-light-token-test (line 457)

The CreateCMint* naming is correctly preserved as it refers to "Compressed Mint" operations.

learn/light-token-standard.mdx (2)

211-212: LGTM! Token struct name correctly updated.

The rename from CToken to Token and the corresponding comment update align with the PR objectives for consistent light-token terminology.


227-230: Source code links updated to main branch.

The links now point to the main branch instead of a specific commit hash. This is more maintainable but means the links may show different code as the repository evolves. This trade-off is acceptable for documentation.

snippets/code-snippets/light-token/wrap/action.mdx (1)

45-48: LGTM! Variable rename aligns with light-token terminology.

The rename from ctokenAta to lightTokenAta improves consistency with the broader naming convention changes in this PR.

snippets/code-snippets/light-token/wrap/instruction.mdx (1)

44-44: LGTM!

The variable rename from ctokenAta to lightTokenAta is consistent and aligns with the SDK rename. The declaration on line 44 and its usage on line 56 are both updated correctly.

Also applies to: 56-56

snippets/code-snippets/light-token/unwrap/instruction.mdx (1)

36-37: LGTM!

The variable rename from ctokenAta to lightTokenAta is applied consistently across all three usages: declaration (line 36), loadAta call (line 37), and createUnwrapInstruction call (line 54). This aligns with the naming in the wrap instruction snippet.

Also applies to: 54-54

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
light-token/cookbook/create-token-account.mdx (1)

92-93: Stale comment references old naming.

The comment at line 92 still mentions "cToken account" but should be updated to match the new terminology (e.g., "Token account" or "light-token account").

📝 Suggested fix
-    // Step 2: Generate new keypair for the cToken account
+    // Step 2: Generate new keypair for the token account
🤖 Fix all issues with AI agents
In `@light-token/cookbook/create-ata.mdx`:
- Around line 351-354: Update the markdown link inside the Info block in
create-ata.mdx: replace the incorrect filename create_ata2.rs with create_ata.rs
so the URL becomes
https://github.com/Lightprotocol/light-protocol/blob/main/sdk-tests/sdk-light-token-test/src/create_ata.rs;
ensure only the filename part of the link is changed and the rest of the URL and
surrounding Info block remain unchanged.

In `@light-token/cookbook/mint-to.mdx`:
- Around line 488-491: The link in mint-to.mdx points to a non-existent file
(sdk-tests/sdk-light-token-test/src/mint_to.rs) causing a 404; locate the
correct source file in the light-protocol repo (search for mint_to.rs or the
mint_to test under sdk-tests or sdk-light-token-test) and update the markdown
link in the Info block to the accurate path/branch or to the appropriate file in
the sdk-light-token-test crate (reference the mint-to.mdx file and the
mint_to.rs test name to find and replace the broken URL).

In `@snippets/jsx/light-token-vs-spl-calculator.jsx`:
- Around line 1-3: Remove the extra blank line after the import statement to
satisfy Prettier; specifically edit the module containing the import "import {
useState } from 'react';" (in light-token-vs-spl-calculator.jsx) and ensure
there is no trailing empty line immediately following that import so the file is
formatted without the extra blank line flagged by CI.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a14b0e and 1736a0d.

📒 Files selected for processing (30)
  • cspell.json
  • learn/light-token-standard.mdx
  • light-token/cookbook/close-token-account.mdx
  • light-token/cookbook/create-ata.mdx
  • light-token/cookbook/create-mint.mdx
  • light-token/cookbook/create-token-account.mdx
  • light-token/cookbook/mint-to.mdx
  • light-token/cookbook/transfer-interface.mdx
  • light-token/interface-methods.mdx
  • light-token/toolkits/for-dexs.mdx
  • light-token/toolkits/for-launchpads.mdx
  • light-token/toolkits/for-payments.mdx
  • light-token/toolkits/for-streaming-mints.mdx
  • light-token/toolkits/for-streaming-tokens.mdx
  • light-token/toolkits/for-trading-apps.mdx
  • light-token/toolkits/for-wallets.mdx
  • light-token/welcome.mdx
  • scripts/sync-docs.sh
  • snippets/accounts-list/light-token-create-ata-accounts-list.mdx
  • snippets/code-snippets/compressed-token/create-mint/instruction.mdx
  • snippets/code-snippets/light-token/load-ata/action.mdx
  • snippets/code-snippets/light-token/load-ata/instruction.mdx
  • snippets/code-snippets/light-token/unwrap/instruction.mdx
  • snippets/code-snippets/light-token/wrap/action.mdx
  • snippets/code-snippets/light-token/wrap/instruction.mdx
  • snippets/jsx/light-token-vs-spl-calculator.jsx
  • snippets/jsx/token22-extensions-table.jsx
  • snippets/light-token-configure-rent.mdx
  • snippets/light-token-guides/client-custom-rent-config.mdx
  • snippets/setup/rust-install-dependencies.mdx
💤 Files with no reviewable changes (4)
  • light-token/toolkits/for-launchpads.mdx
  • light-token/toolkits/for-trading-apps.mdx
  • light-token/toolkits/for-dexs.mdx
  • light-token/interface-methods.mdx
🚧 Files skipped from review as they are similar to previous changes (9)
  • snippets/code-snippets/light-token/wrap/instruction.mdx
  • learn/light-token-standard.mdx
  • snippets/jsx/token22-extensions-table.jsx
  • light-token/toolkits/for-streaming-tokens.mdx
  • snippets/code-snippets/light-token/unwrap/instruction.mdx
  • snippets/code-snippets/light-token/load-ata/instruction.mdx
  • snippets/setup/rust-install-dependencies.mdx
  • light-token/cookbook/transfer-interface.mdx
  • snippets/code-snippets/light-token/wrap/action.mdx
🧰 Additional context used
🧬 Code graph analysis (1)
snippets/jsx/light-token-vs-spl-calculator.jsx (3)
snippets/jsx/token-account-compressed-vs-spl.jsx (5)
  • ACCOUNT_STORAGE_OVERHEAD (5-5)
  • LAMPORTS_PER_BYTE (6-6)
  • DATA_LEN (7-7)
  • LAMPORTS_PER_SOL (9-9)
  • formatSOL (23-31)
snippets/jsx/solana-rent-calculator.jsx (2)
  • ACCOUNT_STORAGE_OVERHEAD (4-4)
  • LAMPORTS_PER_BYTE (5-5)
snippets/jsx/compressible-rent-calculator.jsx (2)
  • DATA_LEN (8-8)
  • LAMPORTS_PER_SOL (13-13)
🪛 GitHub Actions: CI
snippets/jsx/light-token-vs-spl-calculator.jsx

[warning] 1-1: Code style issues found by Prettier. Run 'prettier --write' to fix.

🔇 Additional comments (40)
snippets/code-snippets/light-token/load-ata/action.mdx (1)

35-36: LGTM!

The variable rename from ctokenAta to lightTokenAta is consistent with the PR's broader renaming effort and accurately reflects the Light Token terminology. Both declaration and usage are updated correctly.

snippets/light-token-configure-rent.mdx (1)

1-9: LGTM!

The import path update from light_compressed_token_sdk::ctoken to light_token_sdk::token correctly reflects the SDK rename. The documentation table content (lines 36, 42) already uses "light token program" terminology, maintaining consistency throughout the file.

snippets/code-snippets/compressed-token/create-mint/instruction.mdx (1)

14-14: LGTM!

The constant rename from CTOKEN_PROGRAM_ID to LIGHT_TOKEN_PROGRAM_ID is applied consistently in both the import statement and its usage in findProgramAddressSync. This aligns with the SDK rename from light-ctoken-sdk to light-token-sdk.

Also applies to: 25-25

light-token/toolkits/for-wallets.mdx (4)

106-116: LGTM!

The import and usage of LIGHT_TOKEN_PROGRAM_ID are correctly updated to match the SDK rename.


268-276: LGTM!

Consistent rename of LIGHT_TOKEN_PROGRAM_ID import and usage in the idempotent ATA creation example.


400-432: LGTM!

Variable rename from ctokenAta to tokenAta is applied consistently across both the instruction and action helper examples, including the updated comment on line 429.


462-477: LGTM!

The tokenAta variable rename is consistently applied throughout the unwrap instruction example. The flow correctly demonstrates unwrapping from a light-token ATA to an SPL ATA.

light-token/toolkits/for-payments.mdx (5)

107-117: LGTM!

The import and usage of LIGHT_TOKEN_PROGRAM_ID are consistent and correctly applied to the instruction creation.


225-236: LGTM!

Consistent with the Receive Payments section—rename correctly applied.


447-460: LGTM!

Variable rename from ctokenAta to tokenAta is consistent and correctly used in the wrap instruction.


476-479: LGTM!

Comment and variable rename are consistent. The wrap function call correctly uses the renamed tokenAta variable.


509-531: LGTM!

Variable rename is consistent across all usages within the unwrap instruction code block.

snippets/light-token-guides/client-custom-rent-config.mdx (3)

19-34: LGTM!

The struct and PDA helper function usage correctly reflects the renamed imports. The CreateTokenAccount::new() invocation with chained .instruction() call follows the expected builder pattern.


56-58: LGTM!

The tooltip and description text correctly updated to reference "Light Token program PDA", maintaining consistency with the code changes above.


11-17: Code uses non-existent SDK module paths and imports.

The imports reference light_token_sdk::token and light_token_types, but the actual light-protocol SDK uses light_ctoken_sdk (Rust: light_ctoken_sdk). The light-protocol repository has not renamed the cToken terminology to token as of January 2026, and light_token_sdk does not exist as a crate. Update the imports to use the actual SDK module names (light_ctoken_sdk::ctoken, light_ctoken_types, etc.) or verify the SDK changes against the current light-protocol repository state.

Likely an incorrect or invalid review comment.

snippets/accounts-list/light-token-create-ata-accounts-list.mdx (1)

43-43: LGTM!

The derivation path correctly updated to use light_token_program_id, consistent with the PR-wide rename from CTOKEN_PROGRAM_ID to LIGHT_TOKEN_PROGRAM_ID.

cspell.json (1)

35-38: LGTM with a minor observation.

The vocabulary entries correctly updated to lighttoken/lighttokens. Note that cmint/cmints entries on lines 37-38 are retained—verify this is intentional if the "cmint" terminology is also being renamed to "light-mint" elsewhere in the codebase.

snippets/jsx/light-token-vs-spl-calculator.jsx (1)

11-19: LGTM!

The constant and variable renames (LIGHT_TOKEN_DEFAULT_CREATION_COST, tokenCost) are consistent throughout, and the calculations correctly use the renamed values.

light-token/welcome.mdx (1)

12-12: LGTM!

The import and component usage renames are consistent with the PR-wide migration from CToken to LightToken terminology.

Also applies to: 17-17, 81-81

scripts/sync-docs.sh (1)

17-25: LGTM!

The FILE_MAP and SOURCE_DIR are correctly configured. All five target documentation files exist in light-token/cookbook/:

  • ✓ create-mint.mdx
  • ✓ create-token-account.mdx
  • ✓ create-ata.mdx
  • ✓ close-token-account.mdx
  • ✓ transfer-interface.mdx

The script will sync from the external light-protocol repository's sdk-tests/sdk-light-token-test/src directory to the documentation targets as intended.

light-token/toolkits/for-streaming-mints.mdx (2)

134-135: Previous issue addressed correctly.

The variable name mismatch has been fixed by properly decoding the constant into a local variable for comparison. The bs58::decode approach correctly converts the base58-encoded program ID string to bytes for comparison with owner.


27-42: Dependency and import renames look correct.

The changes from light-ctoken-interface to light-token-interface and CTOKEN_PROGRAM_ID to LIGHT_TOKEN_PROGRAM_ID are consistent with the PR objectives.

light-token/cookbook/close-token-account.mdx (3)

53-56: Import renames are consistent.

The imports have been correctly updated from light_ctoken_sdk::ctoken to light_token_sdk::token, with types renamed appropriately (CloseTokenAccount, CreateTokenAccount, LIGHT_TOKEN_PROGRAM_ID).


105-107: State type rename is correct.

The CToken state type has been properly renamed to Token and the deserialization usage is consistent.


294-296: Source code link is valid.

The referenced file sdk-tests/sdk-light-token-test/src/close.rs exists in the light-protocol repository and contains valid Rust source code for the close account handler implementation.

light-token/cookbook/create-ata.mdx (2)

116-120: Import renames are consistent.

The imports have been correctly updated from light_ctoken_sdk::ctoken to light_token_sdk::token, with function and type renames (derive_token_ata, CreateAssociatedTokenAccount, Token).


286-302: Component and terminology updates are consistent.

The component references (<TokenConfigureRent />) and terminology in the note (light_token_program_id) are correctly updated to use the new naming convention.

light-token/cookbook/mint-to.mdx (3)

107-114: Import renames are consistent and comprehensive.

The imports have been correctly updated from light_ctoken_sdk::ctoken to light_token_sdk::token, and all type renames (MintTo, MintToParams, CreateTokenAccount, Token) are properly applied.


144-158: Variable renames are consistent.

The variable token_account (previously ctoken_account) and related references have been properly renamed throughout the test function.


505-538: Program Guide type and function renames are consistent.

The instruction data struct (MintToData), CPI builder (MintToCpi), and handler function (process_mint_to) have been properly renamed from their ctoken equivalents. Comments and documentation are updated accordingly.

light-token/cookbook/create-mint.mdx (4)

116-119: Import renames are consistent.

The imports have been correctly updated from light_ctoken_sdk::ctoken to light_token_sdk::token and from light_ctoken_interface to light_token_interface. The CreateCMint naming is preserved as expected since "CMint" refers to "compressed mint" rather than "ctoken mint".


281-287: Interface import paths are correct.

The light_token_interface imports for extension types and state are properly updated from the previous light_ctoken_interface paths.


462-467: Verify re-export consistency for ExtensionInstructionData.

The full code example imports ExtensionInstructionData from light_token_sdk::token (line 464), while the earlier Program Guide section imports it from light_token_interface::instructions::extensions (lines 281-284). Both may be valid if the SDK re-exports the interface type, but please verify this is intentional and that both import paths resolve to the same type.


455-458: The source code link at line 457 is correct and accessible.

light-token/cookbook/create-token-account.mdx (6)

10-13: LGTM!

Import paths and component names are consistently updated to follow the new light-token naming convention.


33-43: LGTM!

The SDK import and CreateTokenAccount builder usage are correctly updated to reflect the new naming convention.


97-112: LGTM!

The test code correctly uses the renamed CreateTokenAccount builder and Token state type with consistent variable naming (token_state).


240-276: LGTM!

Both invoke and invoke_signed CPI examples are consistently updated to use CreateTokenAccountCpi from the new light_token_sdk::token module.


288-391: LGTM!

The full code example is thoroughly updated with consistent use of CreateTokenAccountCpi and appropriate comment updates referencing the "token module".


283-286: Source code link is valid.

The GitHub link pointing to sdk-tests/sdk-light-token-test/src/create_token_account.rs is correct and resolves successfully.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines 1 to 3
import { useState } from 'react';


Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Address Prettier formatting issue flagged by CI.

The pipeline reports a formatting issue. The extra blank line at line 3 is likely the cause.

🧹 Suggested fix
 import { useState } from 'react';
-
 
 export const LightTokenVsSplCalculator = () => {
📝 Committable suggestion

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

Suggested change
import { useState } from 'react';
import { useState } from 'react';
🧰 Tools
🪛 GitHub Actions: CI

[warning] 1-1: Code style issues found by Prettier. Run 'prettier --write' to fix.

🤖 Prompt for AI Agents
In `@snippets/jsx/light-token-vs-spl-calculator.jsx` around lines 1 - 3, Remove
the extra blank line after the import statement to satisfy Prettier;
specifically edit the module containing the import "import { useState } from
'react';" (in light-token-vs-spl-calculator.jsx) and ensure there is no trailing
empty line immediately following that import so the file is formatted without
the extra blank line flagged by CI.

Update docs to match SDK rename from light-protocol/light-protocol#2167:
- light-ctoken-sdk → light-token-sdk
- CToken → Token, MintToCToken → MintTo, etc.
- CTOKEN_PROGRAM_ID → LIGHT_TOKEN_PROGRAM_ID
- Variable names: ctokenAta → tokenAta
- Update sync-docs.sh paths
@tilo-14 tilo-14 merged commit 96a5de3 into main Jan 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants