diff --git a/light-token/cookbook/create-ata.mdx b/light-token/cookbook/create-ata.mdx index a4d056f..125b728 100644 --- a/light-token/cookbook/create-ata.mdx +++ b/light-token/cookbook/create-ata.mdx @@ -266,9 +266,9 @@ Find [a full code example at the end](#full-code-example-1). ```toml [dependencies] -light-sdk = { version = "0.18.0", features = ["anchor", "v2", "cpi-context"] } -light-sdk-macros = "0.18.0" -light-compressible = "0.1.0" +light-sdk = { version = "0.23.0", features = ["anchor", "v2", "cpi-context"] } +light-sdk-macros = "0.23.0" +light-compressible = "0.6.0" anchor-lang = "0.31" ``` diff --git a/light-token/cookbook/create-mint.mdx b/light-token/cookbook/create-mint.mdx index 8d46f38..2cd0192 100644 --- a/light-token/cookbook/create-mint.mdx +++ b/light-token/cookbook/create-mint.mdx @@ -478,9 +478,9 @@ Find [a full code example at the end](#full-code-example). ```toml [dependencies] -light-sdk = { version = "0.18.0", features = ["anchor", "v2", "cpi-context"] } -light-sdk-macros = "0.18.0" -light-compressible = "0.1.0" +light-sdk = { version = "0.23.0", features = ["anchor", "v2", "cpi-context"] } +light-sdk-macros = "0.23.0" +light-compressible = "0.6.0" anchor-lang = "0.31" ``` diff --git a/light-token/cookbook/create-token-account.mdx b/light-token/cookbook/create-token-account.mdx index 1cdb97d..fdf7c8f 100644 --- a/light-token/cookbook/create-token-account.mdx +++ b/light-token/cookbook/create-token-account.mdx @@ -201,9 +201,9 @@ Find [a full code example at the end](#full-code-example-1). ```toml [dependencies] -light-sdk = { version = "0.18.0", features = ["anchor", "v2", "cpi-context"] } -light-sdk-macros = "0.18.0" -light-compressible = "0.1.0" +light-sdk = { version = "0.23.0", features = ["anchor", "v2", "cpi-context"] } +light-sdk-macros = "0.23.0" +light-compressible = "0.6.0" anchor-lang = "0.31" ``` diff --git a/light-token/defi/programs-pinocchio.mdx b/light-token/defi/programs-pinocchio.mdx index ef05999..f7689b4 100644 --- a/light-token/defi/programs-pinocchio.mdx +++ b/light-token/defi/programs-pinocchio.mdx @@ -39,8 +39,8 @@ Complete pinocchio Swap reference implementation: [pinocchio-swap](https://githu ```toml [dependencies] -light-account-pinocchio = { version = "0.20", features = ["token", "std"] } -light-token-pinocchio = "0.20" +light-account-pinocchio = { version = "0.23.0", features = ["token", "std"] } +light-token-pinocchio = "0.23.0" pinocchio = "0.9" pinocchio-pubkey = { version = "0.3", features = ["const"] } diff --git a/light-token/defi/programs.mdx b/light-token/defi/programs.mdx index 27f5604..3d1d6bd 100644 --- a/light-token/defi/programs.mdx +++ b/light-token/defi/programs.mdx @@ -43,9 +43,9 @@ You can find a complete rent-free AMM reference implementation [here](https://gi ```toml [dependencies] -light-sdk = { version = "0.19.0", features = ["anchor", "v2", "cpi-context"] } -light-sdk-macros = "0.19.0" -light-token = { version = "0.4.0", features = ["anchor"] } +light-sdk = { version = "0.23.0", features = ["anchor", "v2", "cpi-context"] } +light-sdk-macros = "0.23.0" +light-token = { version = "0.23.0", features = ["anchor"] } light-anchor-spl = "0.31" # TokenInterface uses light_token::ID anchor-lang = "0.31" ``` diff --git a/light-token/defi/routers.mdx b/light-token/defi/routers.mdx index 892bdb1..07ed690 100644 --- a/light-token/defi/routers.mdx +++ b/light-token/defi/routers.mdx @@ -145,7 +145,7 @@ pub trait LightProgramInterface { ```toml [dependencies] -light-client = { version = "0.19.0", features = ["v2"] } +light-client = { version = "0.23.0", features = ["v2"] } # AMM SDK that implements LightProgramInterface (provided by the AMM team) example-amm-sdk = "0.1" diff --git a/light-token/streaming/mints.mdx b/light-token/streaming/mints.mdx index a8d39fa..27a2a59 100644 --- a/light-token/streaming/mints.mdx +++ b/light-token/streaming/mints.mdx @@ -51,7 +51,7 @@ tokio = { version = "1", features = ["full"] } futures = "0.3" bs58 = "0.5" borsh = "0.10" -light-token-interface = "0.3.0" +light-token-interface = "0.5.0" ``` ```rust diff --git a/light-token/streaming/tokens.mdx b/light-token/streaming/tokens.mdx index 5095db6..3796230 100644 --- a/light-token/streaming/tokens.mdx +++ b/light-token/streaming/tokens.mdx @@ -56,7 +56,7 @@ tokio = { version = "1", features = ["full"] } futures = "0.3" bs58 = "0.5" borsh = "0.10" -light-token-interface = "0.3.0" +light-token-interface = "0.5.0" ``` ```rust diff --git a/llms.txt b/llms.txt index e5d1398..2db002a 100644 --- a/llms.txt +++ b/llms.txt @@ -9,17 +9,17 @@ This documentation provides guides, references and tutorials for developers buil - [Primitives](#primitives) - [AI Agent Resources](#ai-agent-resources) - [Getting Started](#getting-started) -- [Light Token Basics](#light-token-basics) +- [SDK Reference](#sdk-reference) +- [Solana to Light Reference](#solana-to-light-reference) +- [Anchor Reference](#anchor-reference) - [For Payments and Wallets](#for-payments-and-wallets) - [For DeFi](#for-defi) - [For Data Streaming](#for-data-streaming) +- [Light Token Basics](#light-token-basics) - [PDA Account basics for Solana programs](#pda-account-basics-for-solana-programs) - [For Other Use Cases](#for-other-use-cases) - [Learn](#learn) - [Resources](#resources) -- [SDK Reference](#sdk-reference) -- [Solana to Light Reference](#solana-to-light-reference) -- [Anchor Reference](#anchor-reference) - [JSON RPC Methods](#json-rpc-methods) - [Support](#support) - [Examples for DeFi](#examples-for-defi) @@ -75,7 +75,7 @@ Comparing creation cost and CU usage: - [Anchor Constraints LightAccount](https://www.zkcompression.com/api-reference/anchor.md): Syntax reference for #[light_account] constraints with sponsored rent-exemption. ## For Payments and Wallets -- [Payment Flows on Solana with Light Token](https://www.zkcompression.com/light-token/payments/overview.md): Learn how the Light Token API's reduce account creation cost for stablecoin payment infrastructure by 99% with minimal code differences and similar developer experience to SPL / Token 2022. +- [Payment Flows on Solana with Light Token](https://www.zkcompression.com/light-token/payments/overview.md): Learn how the Light Token API's reduce account creation cost for stablecoin payment infrastructure by 99% with similar developer experience to SPL / Token 2022. - [Integration Guide for Stablecoin Payments](https://www.zkcompression.com/light-token/payments/integration-guide.md): Guide to integrate light-token APIs for stablecoin payments with comparison to SPL. - [Integration Guide for Wallet Applications](https://www.zkcompression.com/light-token/wallets/overview.md): Guide for Wallet Applications to add Light-token support. - [Sign with Privy](https://www.zkcompression.com/light-token/wallets/privy.md): Integrate light-token with Privy embedded wallets for rent-free token accounts and transfers. @@ -114,7 +114,7 @@ Comparing creation cost and CU usage: - **Compressed PDA:** [Overview & Program Template](https://www.zkcompression.com/pda/compressed-pdas/overview.md): Compressed PDAs provide full composability and functionality of accounts at PDAs, without rent-exemption cost per account. Suited for accounts where each user or entity gets their own PDA and state is infrequently accessed. - **Compressed PDA:** [Client Guide](https://www.zkcompression.com/pda/compressed-pdas/guides/client-guide.md): Rust and Typescript client guides with step-by-step implementation and full code examples. - **Compressed PDA:** [Create Nullifier PDAs](https://www.zkcompression.com/pda/compressed-pdas/how-to-create-nullifier-pdas.md): Create rent-free nullifier PDAs to prevent duplicate actions. -- **Compressed PDA > Program Guides:** [Overview](https://www.zkcompression.com/pda/compressed-pdas/guides.md): Overview to guides for Solana programs to create, update, close, reinitialize, and burn permanently +- **Compressed PDA > Program Guides:** [Overview](https://www.zkcompression.com/pda/compressed-pdas/guides.md): Overview to guides for Solana programs to create, update, close, reinitialize, and burn permanently compressed accounts. - **Compressed PDA:** [Program Examples](https://www.zkcompression.com/pda/compressed-pdas/program-examples.md): Program example repository for compressed accounts with tests. ## For Other Use Cases diff --git a/pda/light-pda/overview.mdx b/pda/light-pda/overview.mdx index e7caef3..66df2ea 100644 --- a/pda/light-pda/overview.mdx +++ b/pda/light-pda/overview.mdx @@ -37,8 +37,8 @@ Audit overhead is minimal as your program logic is mostly untouched. The rest is ```toml [dependencies] -light-account = { version = "0.20.0", features = ["anchor"] } -light-sdk = { version = "0.20.0", features = ["anchor", "v2", "cpi-context"] } +light-account = { version = "0.23.0", features = ["anchor"] } +light-sdk = { version = "0.23.0", features = ["anchor", "v2", "cpi-context"] } anchor-lang = "0.31" ``` diff --git a/scripts/generate-llms-txt.js b/scripts/generate-llms-txt.js index b1c16c8..45da54f 100644 --- a/scripts/generate-llms-txt.js +++ b/scripts/generate-llms-txt.js @@ -85,6 +85,12 @@ function collectPages(entry, prefix) { } if (entry && entry.group) { const newPrefix = prefix ? `${prefix} > ${entry.group}` : entry.group; + // Program Guides: only include overview, not individual how-to pages + if (entry.group === 'Program Guides') { + const overview = entry.pages[0]; + if (typeof overview === 'string') return [formatPage(overview, newPrefix)]; + return []; + } return entry.pages.flatMap((p) => collectPages(p, newPrefix)); } return []; @@ -177,7 +183,7 @@ function splitLightTokenProgram(group) { basics.push(formatPage(entry)); } else if (entry.group === 'Cookbook' || entry.group === 'Examples') { basics.push(...collectFlatPages(entry.pages)); - } else if (entry.group === 'For Payments') { + } else if (entry.group === 'For Stablecoin Payments') { paymentsWallets.push(...collectFlatPages(entry.pages)); } else if (entry.group === 'For Wallets') { paymentsWallets.push(...collectFlatPages(entry.pages)); @@ -189,10 +195,10 @@ function splitLightTokenProgram(group) { } return [ - { name: 'Light Token Basics', lines: basics }, { name: 'For Payments and Wallets', lines: paymentsWallets }, { name: 'For DeFi', lines: defi }, { name: 'For Data Streaming', lines: streaming }, + { name: 'Light Token Basics', lines: basics }, ]; } @@ -297,26 +303,49 @@ function generate() { const aiAnchor = anchors.find((a) => a.anchor === 'AI Tools'); sections.push({ name: 'AI Agent Resources', lines: buildAiTools(aiAnchor) }); - // 2. Documentation anchor — each group becomes an H2 + // 2. Documentation and API Reference — interleaved const docAnchor = anchors.find((a) => a.anchor === 'Documentation'); + const apiAnchor = anchors.find((a) => a.anchor === 'API Reference'); + const apiSections = buildApiReferenceSections(apiAnchor); + const sectionRenames = { Introduction: 'Getting Started', 'PDA Accounts': 'PDA Account basics for Solana programs', }; + + // Getting Started + const introGroup = docAnchor.groups.find((g) => g.group === 'Introduction'); + if (introGroup) { + sections.push({ + name: 'Getting Started', + lines: introGroup.pages.flatMap((p) => collectPages(p)), + }); + } + + // API Reference sections (SDK, Solana to Light, Anchor) — before Light Token + for (const s of apiSections) { + if (s.name !== 'JSON RPC Methods') sections.push(s); + } + + // Light Token sections (payments, defi, streaming, then basics) + const ltGroup = docAnchor.groups.find( + (g) => g.group === 'Light Token Program', + ); + if (ltGroup) sections.push(...splitLightTokenProgram(ltGroup)); + + // Remaining Documentation groups (PDA, Other Use Cases, Learn, Resources) for (const group of docAnchor.groups) { - if (group.group === 'Light Token Program') { - sections.push(...splitLightTokenProgram(group)); - } else { - sections.push({ - name: sectionRenames[group.group] || group.group, - lines: group.pages.flatMap((p) => collectPages(p)), - }); - } + if (group.group === 'Introduction' || group.group === 'Light Token Program') + continue; + sections.push({ + name: sectionRenames[group.group] || group.group, + lines: group.pages.flatMap((p) => collectPages(p)), + }); } - // 3. API Reference anchor — each group becomes its own H2 - const apiAnchor = anchors.find((a) => a.anchor === 'API Reference'); - sections.push(...buildApiReferenceSections(apiAnchor)); + // JSON RPC Methods (after Resources) + const jsonRpc = apiSections.find((s) => s.name === 'JSON RPC Methods'); + if (jsonRpc) sections.push(jsonRpc); // 4. Support anchor const supportAnchor = anchors.find((a) => a.anchor === 'Support'); @@ -344,11 +373,14 @@ function generate() { out.push('# ZK Compression by Light Protocol and Helius Labs'); out.push(''); out.push( - "> ZK Compression is a framework on Solana for stablecoin payment rails, consumer apps and defi. The Light SDK and API's let you create mint, token and PDA accounts >99% cheaper with familiar Solana developer experience.", + '> ZK Compression is a framework on Solana for stablecoin payment rails, agent commerce, consumer apps, defi protocols, depin, and more. ', + ); + out.push( + "> The Light SDK and API's let you create mint, token and PDA accounts >99% cheaper with familiar Solana developer experience.", ); out.push(''); out.push( - 'This documentation provides guides, reference and tutorials for developers building on Solana.', + 'This documentation provides guides, references and tutorials for developers building on Solana.', ); out.push(''); diff --git a/snippets/ai-prompts/anchor-programs/defi-anchor.mdx b/snippets/ai-prompts/anchor-programs/defi-anchor.mdx index b115a81..2f53d87 100644 --- a/snippets/ai-prompts/anchor-programs/defi-anchor.mdx +++ b/snippets/ai-prompts/anchor-programs/defi-anchor.mdx @@ -40,7 +40,7 @@ Key macros/APIs: #[light_program], LightAccount, LightAccounts, #[light_account( - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add light-sdk@0.19 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.19\` and \`cargo add light-token@0.4 --features anchor\` and \`cargo add light-anchor-spl@0.31\` +- Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23\` and \`cargo add light-token@0.23 --features anchor\` and \`cargo add light-anchor-spl@0.31\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key macros/APIs: #[light_program], LightAccount, LightAccounts, #[light_account( - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add light-sdk@0.19 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.19` and `cargo add light-token@0.4 --features anchor` and `cargo add light-anchor-spl@0.31` +- Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23` and `cargo add light-token@0.23 --features anchor` and `cargo add light-anchor-spl@0.31` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/cpi-program-template.mdx b/snippets/ai-prompts/cpi-program-template.mdx index f9cf32c..4df03bd 100644 --- a/snippets/ai-prompts/cpi-program-template.mdx +++ b/snippets/ai-prompts/cpi-program-template.mdx @@ -39,7 +39,7 @@ Key SDK API: {{KEY_API}} - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash `cargo add light-sdk@0.16` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) +- Add deps: Bash `cargo add light-sdk@0.23` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/cpi-programs/burn.mdx b/snippets/ai-prompts/cpi-programs/burn.mdx index 2ff0e79..6daa174 100644 --- a/snippets/ai-prompts/cpi-programs/burn.mdx +++ b/snippets/ai-prompts/cpi-programs/burn.mdx @@ -40,7 +40,7 @@ Key SDK API: LightAccount::new_burn() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash \`cargo add light-sdk@0.16\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) +- Add deps: Bash \`cargo add light-sdk@0.23\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key SDK API: LightAccount::new_burn() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash `cargo add light-sdk@0.16` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) +- Add deps: Bash `cargo add light-sdk@0.23` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/cpi-programs/client-guide.mdx b/snippets/ai-prompts/cpi-programs/client-guide.mdx index efd49d3..cd8b281 100644 --- a/snippets/ai-prompts/cpi-programs/client-guide.mdx +++ b/snippets/ai-prompts/cpi-programs/client-guide.mdx @@ -45,7 +45,7 @@ Key APIs: ### 5. Implement - For TypeScript: Bash \`npm install @lightprotocol/stateless.js @lightprotocol/compressed-token @solana/web3.js\` -- For Rust: Bash \`cargo add light-client@0.16 light-sdk@0.16\` +- For Rust: Bash \`cargo add light-client@0.23 light-sdk@0.23\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -109,7 +109,7 @@ Key APIs: ### 5. Implement - For TypeScript: Bash `npm install @lightprotocol/stateless.js @lightprotocol/compressed-token @solana/web3.js` -- For Rust: Bash `cargo add light-client@0.16 light-sdk@0.16` +- For Rust: Bash `cargo add light-client@0.23 light-sdk@0.23` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/cpi-programs/close.mdx b/snippets/ai-prompts/cpi-programs/close.mdx index e7833fa..a18f837 100644 --- a/snippets/ai-prompts/cpi-programs/close.mdx +++ b/snippets/ai-prompts/cpi-programs/close.mdx @@ -40,7 +40,7 @@ Key SDK API: LightAccount::new_close() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash \`cargo add light-sdk@0.16\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) +- Add deps: Bash \`cargo add light-sdk@0.23\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key SDK API: LightAccount::new_close() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash `cargo add light-sdk@0.16` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) +- Add deps: Bash `cargo add light-sdk@0.23` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/cpi-programs/create.mdx b/snippets/ai-prompts/cpi-programs/create.mdx index 1dfb479..dd404d4 100644 --- a/snippets/ai-prompts/cpi-programs/create.mdx +++ b/snippets/ai-prompts/cpi-programs/create.mdx @@ -40,7 +40,7 @@ Key SDK API: LightAccount::new_init(), derive_address() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash \`cargo add light-sdk@0.16\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) +- Add deps: Bash \`cargo add light-sdk@0.23\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key SDK API: LightAccount::new_init(), derive_address() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash `cargo add light-sdk@0.16` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) +- Add deps: Bash `cargo add light-sdk@0.23` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/cpi-programs/reinitialize.mdx b/snippets/ai-prompts/cpi-programs/reinitialize.mdx index 0f60825..5c727c2 100644 --- a/snippets/ai-prompts/cpi-programs/reinitialize.mdx +++ b/snippets/ai-prompts/cpi-programs/reinitialize.mdx @@ -40,7 +40,7 @@ Key SDK API: LightAccount::new_empty() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash \`cargo add light-sdk@0.16\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) +- Add deps: Bash \`cargo add light-sdk@0.23\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key SDK API: LightAccount::new_empty() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash `cargo add light-sdk@0.16` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) +- Add deps: Bash `cargo add light-sdk@0.23` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/cpi-programs/update.mdx b/snippets/ai-prompts/cpi-programs/update.mdx index cbf9476..3607f85 100644 --- a/snippets/ai-prompts/cpi-programs/update.mdx +++ b/snippets/ai-prompts/cpi-programs/update.mdx @@ -40,7 +40,7 @@ Key SDK API: LightAccount::new_mut() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash \`cargo add light-sdk@0.16\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) +- Add deps: Bash \`cargo add light-sdk@0.23\` (add \`anchor_lang@0.31\` for Anchor or \`solana-program@2.2\` + \`borsh@0.10\` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key SDK API: LightAccount::new_mut() - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps: Bash `cargo add light-sdk@0.16` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) +- Add deps: Bash `cargo add light-sdk@0.23` (add `anchor_lang@0.31` for Anchor or `solana-program@2.2` + `borsh@0.10` for Native Rust) - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/defi/defi-pinocchio.mdx b/snippets/ai-prompts/defi/defi-pinocchio.mdx index b558f6f..0dbb4ea 100644 --- a/snippets/ai-prompts/defi/defi-pinocchio.mdx +++ b/snippets/ai-prompts/defi/defi-pinocchio.mdx @@ -40,7 +40,7 @@ Key macros/APIs: LightPinocchioAccount, LightProgramPinocchio, CreateTokenAccoun - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add light-account-pinocchio@0.20 --features token,std\` and \`cargo add light-token-pinocchio@0.20\` and \`cargo add pinocchio@0.9\` +- Add deps if missing: Bash \`cargo add light-account-pinocchio@0.23 --features token,std\` and \`cargo add light-token-pinocchio@0.23\` and \`cargo add pinocchio@0.9\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key macros/APIs: LightPinocchioAccount, LightProgramPinocchio, CreateTokenAccoun - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add light-account-pinocchio@0.20 --features token,std` and `cargo add light-token-pinocchio@0.20` and `cargo add pinocchio@0.9` +- Add deps if missing: Bash `cargo add light-account-pinocchio@0.23 --features token,std` and `cargo add light-token-pinocchio@0.23` and `cargo add pinocchio@0.9` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/defi/routers.mdx b/snippets/ai-prompts/defi/routers.mdx index 430c1f2..1d7cd65 100644 --- a/snippets/ai-prompts/defi/routers.mdx +++ b/snippets/ai-prompts/defi/routers.mdx @@ -43,7 +43,7 @@ Key APIs: create_load_instructions(), LightProgramInterface trait, get_account_i - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add light-client@0.19 --features v2\` +- Add deps if missing: Bash \`cargo add light-client@0.23 --features v2\` - Add AMM SDK dependency per the approved plan - Follow the guide and the approved plan - Write/Edit to create or modify files @@ -106,7 +106,7 @@ Key APIs: create_load_instructions(), LightProgramInterface trait, get_account_i - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add light-client@0.19 --features v2` +- Add deps if missing: Bash `cargo add light-client@0.23 --features v2` - Add AMM SDK dependency per the approved plan - Follow the guide and the approved plan - Write/Edit to create or modify files diff --git a/snippets/ai-prompts/program-cookbook/create-ata-macros.mdx b/snippets/ai-prompts/program-cookbook/create-ata-macros.mdx index b7a78b8..3dc08f7 100644 --- a/snippets/ai-prompts/program-cookbook/create-ata-macros.mdx +++ b/snippets/ai-prompts/program-cookbook/create-ata-macros.mdx @@ -38,7 +38,7 @@ Key macros: \`#[light_program]\`, \`LightAccounts\`, \`#[light_account(init, ass - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add light-sdk@0.18 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.18 light-compressible@0.1 anchor-lang@0.31\` +- Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -95,7 +95,7 @@ Key macros: `#[light_program]`, `LightAccounts`, `#[light_account(init, associat - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add light-sdk@0.18 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.18 light-compressible@0.1 anchor-lang@0.31` +- Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/program-cookbook/create-mint-macros.mdx b/snippets/ai-prompts/program-cookbook/create-mint-macros.mdx index 81ad80f..c116201 100644 --- a/snippets/ai-prompts/program-cookbook/create-mint-macros.mdx +++ b/snippets/ai-prompts/program-cookbook/create-mint-macros.mdx @@ -39,7 +39,7 @@ Key macros: \`#[light_program]\`, \`LightAccounts\`, \`#[light_account(init, min - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add light-sdk@0.18 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.18 light-compressible@0.1 anchor-lang@0.31\` +- Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -97,7 +97,7 @@ Key macros: `#[light_program]`, `LightAccounts`, `#[light_account(init, mint::.. - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add light-sdk@0.18 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.18 light-compressible@0.1 anchor-lang@0.31` +- Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/program-cookbook/create-token-account-macros.mdx b/snippets/ai-prompts/program-cookbook/create-token-account-macros.mdx index 042edbf..fcbed1a 100644 --- a/snippets/ai-prompts/program-cookbook/create-token-account-macros.mdx +++ b/snippets/ai-prompts/program-cookbook/create-token-account-macros.mdx @@ -38,7 +38,7 @@ Key macros: \`#[light_program]\`, \`LightAccounts\`, \`#[light_account(init, tok - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add light-sdk@0.18 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.18 light-compressible@0.1 anchor-lang@0.31\` +- Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -95,7 +95,7 @@ Key macros: `#[light_program]`, `LightAccounts`, `#[light_account(init, token::. - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add light-sdk@0.18 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.18 light-compressible@0.1 anchor-lang@0.31` +- Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/program-cookbook/light-pda.mdx b/snippets/ai-prompts/program-cookbook/light-pda.mdx index 67d2f65..3796957 100644 --- a/snippets/ai-prompts/program-cookbook/light-pda.mdx +++ b/snippets/ai-prompts/program-cookbook/light-pda.mdx @@ -39,7 +39,7 @@ Key macros/APIs: #[light_program], LightAccount, LightAccounts, #[light_account( - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add light-account@0.20 --features anchor\` and \`cargo add light-sdk@0.20 --features anchor,v2,cpi-context\` +- Add deps if missing: Bash \`cargo add light-account@0.23 --features anchor\` and \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -97,7 +97,7 @@ Key macros/APIs: #[light_program], LightAccount, LightAccounts, #[light_account( - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add light-account@0.20 --features anchor` and `cargo add light-sdk@0.20 --features anchor,v2,cpi-context` +- Add deps if missing: Bash `cargo add light-account@0.23 --features anchor` and `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/streaming/mints.mdx b/snippets/ai-prompts/streaming/mints.mdx index 2837a76..deef39a 100644 --- a/snippets/ai-prompts/streaming/mints.mdx +++ b/snippets/ai-prompts/streaming/mints.mdx @@ -40,7 +40,7 @@ Key APIs: LaserstreamConfig, subscribe(), Mint::deserialize(), ExtensionStruct:: - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add helius-laserstream@0.1 light-token-interface@0.3 borsh@0.10 futures@0.3 bs58@0.5 tokio --features full\` +- Add deps if missing: Bash \`cargo add helius-laserstream@0.1 light-token-interface@0.5 borsh@0.10 futures@0.3 bs58@0.5 tokio --features full\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -99,7 +99,7 @@ Key APIs: LaserstreamConfig, subscribe(), Mint::deserialize(), ExtensionStruct:: - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add helius-laserstream@0.1 light-token-interface@0.3 borsh@0.10 futures@0.3 bs58@0.5 tokio --features full` +- Add deps if missing: Bash `cargo add helius-laserstream@0.1 light-token-interface@0.5 borsh@0.10 futures@0.3 bs58@0.5 tokio --features full` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/streaming/tokens.mdx b/snippets/ai-prompts/streaming/tokens.mdx index 452a5f4..e6c9543 100644 --- a/snippets/ai-prompts/streaming/tokens.mdx +++ b/snippets/ai-prompts/streaming/tokens.mdx @@ -42,8 +42,8 @@ Key APIs: LaserstreamConfig, subscribe(), PodAccount (pod_from_bytes), LightClie - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash \`cargo add helius-laserstream@0.1 light-token-interface@0.3 spl-pod spl-token-2022-interface borsh@0.10 futures@0.3 bs58@0.5 tokio --features full\` -- For point queries, also: Bash \`cargo add light-client@0.19 --features v2\` +- Add deps if missing: Bash \`cargo add helius-laserstream@0.1 light-token-interface@0.5 spl-pod spl-token-2022-interface borsh@0.10 futures@0.3 bs58@0.5 tokio --features full\` +- For point queries, also: Bash \`cargo add light-client@0.23 --features v2\` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done @@ -104,8 +104,8 @@ Key APIs: LaserstreamConfig, subscribe(), PodAccount (pod_from_bytes), LightClie - Present the plan to the user for approval before proceeding ### 5. Implement -- Add deps if missing: Bash `cargo add helius-laserstream@0.1 light-token-interface@0.3 spl-pod spl-token-2022-interface borsh@0.10 futures@0.3 bs58@0.5 tokio --features full` -- For point queries, also: Bash `cargo add light-client@0.19 --features v2` +- Add deps if missing: Bash `cargo add helius-laserstream@0.1 light-token-interface@0.5 spl-pod spl-token-2022-interface borsh@0.10 futures@0.3 bs58@0.5 tokio --features full` +- For point queries, also: Bash `cargo add light-client@0.23 --features v2` - Follow the guide and the approved plan - Write/Edit to create or modify files - TaskUpdate to mark each step done diff --git a/snippets/ai-prompts/toolkits/nullifiers.mdx b/snippets/ai-prompts/toolkits/nullifiers.mdx index 8d08ce9..00a3ba5 100644 --- a/snippets/ai-prompts/toolkits/nullifiers.mdx +++ b/snippets/ai-prompts/toolkits/nullifiers.mdx @@ -45,7 +45,7 @@ Key APIs: - Present the plan to the user for approval before proceeding ### 5. Implement -- For Rust: Bash \`cargo add light-nullifier-program@0.1 light-client@0.19\` +- For Rust: Bash \`cargo add light-nullifier-program@0.1 light-client@0.23\` - For TypeScript: Bash \`npm install @lightprotocol/nullifier-program @lightprotocol/stateless.js@beta\` - Follow the guide and the approved plan - Write/Edit to create or modify files @@ -110,7 +110,7 @@ Key APIs: - Present the plan to the user for approval before proceeding ### 5. Implement -- For Rust: Bash `cargo add light-nullifier-program@0.1 light-client@0.19` +- For Rust: Bash `cargo add light-nullifier-program@0.1 light-client@0.23` - For TypeScript: Bash `npm install @lightprotocol/nullifier-program @lightprotocol/stateless.js@beta` - Follow the guide and the approved plan - Write/Edit to create or modify files diff --git a/snippets/light-token-guides/light-token-program-prerequisites.mdx b/snippets/light-token-guides/light-token-program-prerequisites.mdx index 1498773..d638107 100644 --- a/snippets/light-token-guides/light-token-program-prerequisites.mdx +++ b/snippets/light-token-guides/light-token-program-prerequisites.mdx @@ -3,29 +3,29 @@ ```toml Anchor Cargo.toml [dependencies] -light-token = "0.4.0" -light-token-types = "0.4.0" +light-token = "0.23.0" +light-token-types = "0.23.0" anchor-lang = "0.31.1" [dev-dependencies] -light-program-test = { version = "0.19.0", features = ["v2"] } -light-client = { version = "0.19.0", features = ["v2"] } +light-program-test = { version = "0.23.0", features = ["v2"] } +light-client = { version = "0.23.0", features = ["v2"] } solana-sdk = "2" tokio = { version = "1", features = ["full"] } ``` ```toml Native Rust Cargo.toml [dependencies] -light-token = "0.4.0" -light-compressible = "0.4.0" -light-token-interface = "0.3.0" -light-compressed-account = "0.9.0" +light-token = "0.23.0" +light-compressible = "0.6.0" +light-token-interface = "0.5.0" +light-compressed-account = "0.11.0" borsh = "0.10.4" solana-program = "2.2" [dev-dependencies] -light-program-test = { version = "0.19.0", features = ["v2"] } -light-client = { version = "0.19.0", features = ["v2"] } +light-program-test = { version = "0.23.0", features = ["v2"] } +light-client = { version = "0.23.0", features = ["v2"] } solana-sdk = "2" tokio = { version = "1", features = ["full"] } ``` diff --git a/snippets/setup/rust-install-dependencies.mdx b/snippets/setup/rust-install-dependencies.mdx index c1de57d..0a8bcb0 100644 --- a/snippets/setup/rust-install-dependencies.mdx +++ b/snippets/setup/rust-install-dependencies.mdx @@ -1,7 +1,7 @@ ```toml Cargo.toml [dependencies] -light-token = "0.4.0" -light-client = { version = "0.19.0", features = ["v2"] } +light-token = "0.23.0" +light-client = { version = "0.23.0", features = ["v2"] } solana-sdk = "2" borsh = "0.10.4" tokio = { version = "1", features = ["full"] } diff --git a/snippets/versions/rust-deps-0.19.0.mdx b/snippets/versions/rust-deps-0.19.0.mdx index ddb245e..af741b7 100644 --- a/snippets/versions/rust-deps-0.19.0.mdx +++ b/snippets/versions/rust-deps-0.19.0.mdx @@ -1,5 +1,5 @@ ```toml [dependencies] -light-client = "0.19.0" -light-sdk = "0.19.0" +light-client = "0.23.0" +light-sdk = "0.23.0" ``` diff --git a/snippets/versions/rust-deps-token-sdk-0.19.0.mdx b/snippets/versions/rust-deps-token-sdk-0.19.0.mdx index e51ec9c..294f4b3 100644 --- a/snippets/versions/rust-deps-token-sdk-0.19.0.mdx +++ b/snippets/versions/rust-deps-token-sdk-0.19.0.mdx @@ -1,5 +1,5 @@ ```toml [dependencies] -light-sdk = "0.19.0" -light-token = "0.4.0" +light-sdk = "0.23.0" +light-token = "0.23.0" ``` diff --git a/snippets/versions/rust-native-token.mdx b/snippets/versions/rust-native-token.mdx index e77600f..115a36c 100644 --- a/snippets/versions/rust-native-token.mdx +++ b/snippets/versions/rust-native-token.mdx @@ -1,7 +1,7 @@ ```toml [dependencies] -light-token = "0.4.0" -light-compressible = "0.4.0" -light-token-interface = "0.3.0" -light-compressed-account = "0.9.0" +light-token = "0.23.0" +light-compressible = "0.6.0" +light-token-interface = "0.5.0" +light-compressed-account = "0.11.0" ``` diff --git a/snippets/versions/rust-sdk-macros.mdx b/snippets/versions/rust-sdk-macros.mdx index cd5fc46..5dd48eb 100644 --- a/snippets/versions/rust-sdk-macros.mdx +++ b/snippets/versions/rust-sdk-macros.mdx @@ -1,5 +1,5 @@ ```toml [dependencies] -light-sdk = { version = "0.19.0", features = ["anchor", "v2", "cpi-context"] } -light-sdk-macros = "0.19.0" +light-sdk = { version = "0.23.0", features = ["anchor", "v2", "cpi-context"] } +light-sdk-macros = "0.23.0" ``` diff --git a/snippets/versions/rust-sdk.mdx b/snippets/versions/rust-sdk.mdx index 110d90a..9e97861 100644 --- a/snippets/versions/rust-sdk.mdx +++ b/snippets/versions/rust-sdk.mdx @@ -1,4 +1,4 @@ ```toml [dependencies] -light-sdk = "0.19.0" +light-sdk = "0.23.0" ``` diff --git a/snippets/versions/rust-test.mdx b/snippets/versions/rust-test.mdx index ab8e5c6..b633578 100644 --- a/snippets/versions/rust-test.mdx +++ b/snippets/versions/rust-test.mdx @@ -1,5 +1,5 @@ ```toml [dev-dependencies] -light-program-test = { version = "0.19.0", features = ["v2"] } -light-client = { version = "0.19.0", features = ["v2"] } +light-program-test = { version = "0.23.0", features = ["v2"] } +light-client = { version = "0.23.0", features = ["v2"] } ``` diff --git a/snippets/versions/rust-token-defi.mdx b/snippets/versions/rust-token-defi.mdx index dbaa0a5..10b5b18 100644 --- a/snippets/versions/rust-token-defi.mdx +++ b/snippets/versions/rust-token-defi.mdx @@ -1,6 +1,6 @@ ```toml [dependencies] -light-sdk = { version = "0.19.0", features = ["anchor", "v2", "cpi-context"] } -light-sdk-macros = "0.19.0" -light-token = { version = "0.4.0", features = ["anchor"] } +light-sdk = { version = "0.23.0", features = ["anchor", "v2", "cpi-context"] } +light-sdk-macros = "0.23.0" +light-token = { version = "0.23.0", features = ["anchor"] } ``` diff --git a/snippets/versions/rust-token.mdx b/snippets/versions/rust-token.mdx index e51ec9c..294f4b3 100644 --- a/snippets/versions/rust-token.mdx +++ b/snippets/versions/rust-token.mdx @@ -1,5 +1,5 @@ ```toml [dependencies] -light-sdk = "0.19.0" -light-token = "0.4.0" +light-sdk = "0.23.0" +light-token = "0.23.0" ```