From 3a801c25f1d4b9b65a9504faf5689c2d25693f18 Mon Sep 17 00:00:00 2001 From: ananas-block Date: Sun, 7 Dec 2025 03:03:01 +0000 Subject: [PATCH] chore: rename light-compressed-token-types -> light-ctoken-types --- .github/workflows/sdk-tests.yml | 4 +- Cargo.lock | 44 +++++++++---------- Cargo.toml | 2 +- program-libs/account-checks/CLAUDE.md | 2 +- .../compressed-token-test/Cargo.toml | 2 +- .../no_system_program_cpi_failing.rs | 2 +- scripts/lint.sh | 4 +- sdk-libs/ctoken-sdk/Cargo.toml | 4 +- .../src/compressed_token/v1/account.rs | 2 +- .../v1/approve/instruction.rs | 4 +- .../v1/batch_compress/instruction.rs | 4 +- .../ctoken-sdk/src/compressed_token/v1/mod.rs | 2 +- .../v1/transfer/instruction.rs | 4 +- .../src/compressed_token/v1/transfer/mod.rs | 2 +- .../v2/mint_action/cpi_accounts.rs | 2 +- .../v2/mint_to_compressed/instruction.rs | 4 +- .../v2/transfer2/account_metas.rs | 2 +- .../v2/transfer2/cpi_accounts.rs | 2 +- .../v2/transfer2/instruction.rs | 2 +- .../v2/update_compressed_mint/instruction.rs | 2 +- sdk-libs/ctoken-sdk/src/constants.rs | 19 ++++---- sdk-libs/ctoken-sdk/src/ctoken/mod.rs | 2 +- sdk-libs/ctoken-sdk/src/error.rs | 2 +- sdk-libs/ctoken-sdk/src/spl_interface.rs | 2 +- sdk-libs/ctoken-sdk/src/utils.rs | 2 +- .../ctoken-sdk/tests/account_metas_test.rs | 8 ++-- .../tests/mint_action_cpi_accounts_tests.rs | 2 +- .../Cargo.toml | 2 +- .../src/account_infos/batch_compress.rs | 0 .../src/account_infos/burn.rs | 0 .../src/account_infos/config.rs | 0 .../account_infos/create_compressed_mint.rs | 0 .../src/account_infos/freeze.rs | 0 .../src/account_infos/mint_to.rs | 0 .../src/account_infos/mint_to_compressed.rs | 0 .../src/account_infos/mod.rs | 0 .../src/account_infos/transfer.rs | 0 .../src/constants.rs | 0 .../src/error.rs | 0 .../src/instruction/batch_compress.rs | 0 .../src/instruction/burn.rs | 0 .../src/instruction/delegation.rs | 0 .../src/instruction/freeze.rs | 0 .../src/instruction/generic.rs | 0 .../src/instruction/mint_to.rs | 0 .../src/instruction/mod.rs | 0 .../src/instruction/transfer.rs | 0 .../src/instruction/update_compressed_mint.rs | 0 .../src/lib.rs | 0 sdk-libs/token-client/Cargo.toml | 2 +- .../src/actions/update_compressed_mint.rs | 2 +- .../instructions/update_compressed_mint.rs | 2 +- sdk-tests/CLAUDE.md | 2 +- sdk-tests/csdk-anchor-derived-test/Cargo.toml | 2 +- .../tests/basic_test.rs | 3 +- .../csdk-anchor-full-derived-test/Cargo.toml | 2 +- .../tests/basic_test.rs | 3 +- sdk-tests/sdk-compressible-test/Cargo.toml | 2 +- .../tests/multi_account_tests.rs | 2 +- sdk-tests/sdk-ctoken-test/Cargo.lock | 6 +-- sdk-tests/sdk-ctoken-test/Cargo.toml | 2 +- sdk-tests/sdk-ctoken-test/README.md | 2 +- .../tests/test_transfer_interface.rs | 2 +- .../tests/test_transfer_spl_ctoken.rs | 2 +- sdk-tests/sdk-token-test/Cargo.toml | 2 +- .../src/process_batch_compress_tokens.rs | 2 +- sdk-tests/sdk-token-test/tests/ctoken_pda.rs | 2 +- sdk-tests/sdk-token-test/tests/pda_ctoken.rs | 2 +- sdk-tests/sdk-token-test/tests/test.rs | 2 +- .../tests/test_4_invocations.rs | 2 +- .../sdk-token-test/tests/test_deposit.rs | 2 +- 71 files changed, 90 insertions(+), 95 deletions(-) rename sdk-libs/{compressed-token-types => ctoken-types}/Cargo.toml (93%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/batch_compress.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/burn.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/config.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/create_compressed_mint.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/freeze.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/mint_to.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/mint_to_compressed.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/mod.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/account_infos/transfer.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/constants.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/error.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/batch_compress.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/burn.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/delegation.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/freeze.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/generic.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/mint_to.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/mod.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/transfer.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/instruction/update_compressed_mint.rs (100%) rename sdk-libs/{compressed-token-types => ctoken-types}/src/lib.rs (100%) diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 6c9d672f1b..0390949704 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -54,7 +54,7 @@ jobs: - program: token test sub-tests: '["cargo-test-sbf -p sdk-token-test"]' - program: sdk-libs - packages: light-sdk-macros light-sdk light-program-test light-client light-compressed-token-types light-ctoken-sdk + packages: light-sdk-macros light-sdk light-program-test light-client light-ctoken-types light-ctoken-sdk test_cmd: | cargo test -p light-sdk-macros cargo test -p light-sdk-macros --all-features @@ -63,7 +63,7 @@ jobs: cargo test -p light-program-test cargo test -p light-client cargo test -p light-sparse-merkle-tree - cargo test -p light-compressed-token-types + cargo test -p light-ctoken-types cargo test -p light-ctoken-sdk --all-features steps: - name: Checkout sources diff --git a/Cargo.lock b/Cargo.lock index adaac4838e..759d6fe626 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1427,10 +1427,10 @@ dependencies = [ "light-client", "light-compressed-account", "light-compressed-token", - "light-compressed-token-types", "light-compressible", "light-ctoken-interface", "light-ctoken-sdk", + "light-ctoken-types", "light-program-test", "light-prover-client", "light-registry", @@ -1644,11 +1644,11 @@ dependencies = [ "borsh 0.10.4", "light-client", "light-compressed-account", - "light-compressed-token-types", "light-compressible", "light-compressible-client", "light-ctoken-interface", "light-ctoken-sdk", + "light-ctoken-types", "light-hasher", "light-macros", "light-program-test", @@ -1679,11 +1679,11 @@ dependencies = [ "borsh 0.10.4", "light-client", "light-compressed-account", - "light-compressed-token-types", "light-compressible", "light-compressible-client", "light-ctoken-interface", "light-ctoken-sdk", + "light-ctoken-types", "light-hasher", "light-macros", "light-program-test", @@ -3698,20 +3698,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "light-compressed-token-types" -version = "0.1.0" -dependencies = [ - "anchor-lang", - "borsh 0.10.4", - "light-account-checks", - "light-compressed-account", - "light-macros", - "light-sdk-types", - "solana-msg 2.2.1", - "thiserror 2.0.17", -] - [[package]] name = "light-compressible" version = "0.2.1" @@ -3816,9 +3802,9 @@ dependencies = [ "light-account-checks", "light-compressed-account", "light-compressed-token", - "light-compressed-token-types", "light-compressible", "light-ctoken-interface", + "light-ctoken-types", "light-macros", "light-program-profiler", "light-sdk", @@ -3836,6 +3822,20 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "light-ctoken-types" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "light-account-checks", + "light-compressed-account", + "light-macros", + "light-sdk-types", + "solana-msg 2.2.1", + "thiserror 2.0.17", +] + [[package]] name = "light-event" version = "0.1.1" @@ -4292,9 +4292,9 @@ dependencies = [ "borsh 0.10.4", "light-client", "light-compressed-account", - "light-compressed-token-types", "light-ctoken-interface", "light-ctoken-sdk", + "light-ctoken-types", "light-sdk", "light-zero-copy", "solana-instruction", @@ -6049,11 +6049,11 @@ dependencies = [ "borsh 0.10.4", "light-client", "light-compressed-account", - "light-compressed-token-types", "light-compressible", "light-compressible-client", "light-ctoken-interface", "light-ctoken-sdk", + "light-ctoken-types", "light-hasher", "light-macros", "light-program-test", @@ -6082,10 +6082,10 @@ dependencies = [ "borsh 0.10.4", "light-client", "light-compressed-account", - "light-compressed-token-types", "light-compressible-client", "light-ctoken-interface", "light-ctoken-sdk", + "light-ctoken-types", "light-program-test", "light-sdk", "light-sdk-types", @@ -6158,10 +6158,10 @@ dependencies = [ "light-batched-merkle-tree", "light-client", "light-compressed-account", - "light-compressed-token-types", "light-compressible", "light-ctoken-interface", "light-ctoken-sdk", + "light-ctoken-types", "light-hasher", "light-program-profiler", "light-program-test", diff --git a/Cargo.toml b/Cargo.toml index 3e09ea7a1d..a6e4f72932 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -201,7 +201,7 @@ account-compression = { path = "programs/account-compression", version = "2.0.0" light-compressed-token = { path = "programs/compressed-token/program", version = "2.0.0", features = [ "cpi", ] } -light-compressed-token-types = { path = "sdk-libs/compressed-token-types", version = "0.1.0" } +light-ctoken-types = { path = "sdk-libs/ctoken-types", version = "0.1.0" } light-ctoken-sdk = { path = "sdk-libs/ctoken-sdk", version = "0.1.0" } light-token-client = { path = "sdk-libs/token-client", version = "0.1.0" } light-system-program-anchor = { path = "anchor-programs/system", version = "2.0.0", features = [ diff --git a/program-libs/account-checks/CLAUDE.md b/program-libs/account-checks/CLAUDE.md index f403bb2d1a..8849b9cbe5 100644 --- a/program-libs/account-checks/CLAUDE.md +++ b/program-libs/account-checks/CLAUDE.md @@ -16,7 +16,7 @@ - `light-sdk` - Core SDK account validation utilities - `light-sdk-pinocchio` - Pinocchio-specific SDK validation - `light-sdk-types` - Uses AccountInfoTrait for CPI context and tree info -- `light-compressed-token-types` - Uses AccountInfoTrait for instruction account structures +- `light-ctoken-types` - Uses AccountInfoTrait for instruction account structures # Navigation - This file: Overview and module organization diff --git a/program-tests/compressed-token-test/Cargo.toml b/program-tests/compressed-token-test/Cargo.toml index acfbb7e6f7..a0ea05f3ec 100644 --- a/program-tests/compressed-token-test/Cargo.toml +++ b/program-tests/compressed-token-test/Cargo.toml @@ -50,4 +50,4 @@ light-ctoken-sdk = { workspace = true } spl-token-2022 = { workspace = true } spl-pod = { workspace = true } light-zero-copy = { workspace = true , features = ["std", "derive", "mut"]} -light-compressed-token-types = { workspace = true } +light-ctoken-types = { workspace = true } diff --git a/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs b/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs index 20e024726c..a5afc1e90d 100644 --- a/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs +++ b/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs @@ -227,8 +227,8 @@ fn build_compressions_only_instruction( packed_account_metas: Vec, ) -> Result { use anchor_lang::AnchorSerialize; - use light_compressed_token_types::{CPI_AUTHORITY_PDA, TRANSFER2}; use light_ctoken_interface::instructions::transfer2::CompressedTokenInstructionDataTransfer2; + use light_ctoken_types::{CPI_AUTHORITY_PDA, TRANSFER2}; use solana_sdk::instruction::AccountMeta; // For compressions-only mode (decompressed_accounts_only), the account order is: diff --git a/scripts/lint.sh b/scripts/lint.sh index cb620d28fd..b1d2049fbf 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -34,7 +34,7 @@ NO_DEFAULT_CRATES=( "light-sdk-pinocchio" "light-sdk-macros" "light-ctoken-sdk" - "light-compressed-token-types" + "light-ctoken-types" "light-sdk" "sdk-compressible-test" "csdk-anchor-derived-test" @@ -101,7 +101,7 @@ ANCHOR_CRATES=( "light-sdk-types" "light-sdk" "light-ctoken-sdk" - "light-compressed-token-types" + "light-ctoken-types" ) for crate in "${ANCHOR_CRATES[@]}"; do diff --git a/sdk-libs/ctoken-sdk/Cargo.toml b/sdk-libs/ctoken-sdk/Cargo.toml index a8406ff567..b984495688 100644 --- a/sdk-libs/ctoken-sdk/Cargo.toml +++ b/sdk-libs/ctoken-sdk/Cargo.toml @@ -8,7 +8,7 @@ default = [] v1 = [] compressible = [] -anchor = ["anchor-lang", "light-compressed-token-types/anchor", "light-ctoken-interface/anchor"] +anchor = ["anchor-lang", "light-ctoken-types/anchor", "light-ctoken-interface/anchor"] cpi-context = ["light-sdk/cpi-context"] profile-program = [ "light-program-profiler/profile-program", @@ -23,7 +23,7 @@ profile-heap = [ [dependencies] # Light Protocol dependencies -light-compressed-token-types = { workspace = true } +light-ctoken-types = { workspace = true } light-compressed-account = { workspace = true, features = ["std"] } light-compressible = { workspace = true } light-ctoken-interface = { workspace = true } diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v1/account.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v1/account.rs index 2475069014..c7d77991a1 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v1/account.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v1/account.rs @@ -1,6 +1,6 @@ use std::ops::Deref; -use light_compressed_token_types::{PackedTokenTransferOutputData, TokenAccountMeta}; +use light_ctoken_types::{PackedTokenTransferOutputData, TokenAccountMeta}; use solana_pubkey::Pubkey; use crate::error::CTokenSdkError; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v1/approve/instruction.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v1/approve/instruction.rs index 3eac2aa429..2168288783 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v1/approve/instruction.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v1/approve/instruction.rs @@ -1,8 +1,8 @@ use borsh::BorshSerialize; -use light_compressed_token_types::{ +use light_ctoken_interface::CTOKEN_PROGRAM_ID; +use light_ctoken_types::{ instruction::delegation::CompressedTokenInstructionDataApprove, ValidityProof, }; -use light_ctoken_interface::CTOKEN_PROGRAM_ID; use solana_instruction::Instruction; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v1/batch_compress/instruction.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v1/batch_compress/instruction.rs index b3be6747ac..312aec28b5 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v1/batch_compress/instruction.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v1/batch_compress/instruction.rs @@ -1,7 +1,7 @@ -use light_compressed_token_types::{ +use light_ctoken_interface; +use light_ctoken_types::{ instruction::batch_compress::BatchCompressInstructionData, BATCH_COMPRESS, }; -use light_ctoken_interface; use solana_instruction::Instruction; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v1/mod.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v1/mod.rs index b9cf10903e..3322df7f0e 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v1/mod.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v1/mod.rs @@ -4,4 +4,4 @@ pub mod batch_compress; pub mod transfer; pub use account::*; -pub use light_compressed_token_types::TokenAccountMeta; +pub use light_ctoken_types::TokenAccountMeta; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/instruction.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/instruction.rs index 3c79efa0a1..640594408f 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/instruction.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/instruction.rs @@ -1,8 +1,8 @@ -use light_compressed_token_types::{ +use light_ctoken_interface::CTOKEN_PROGRAM_ID; +use light_ctoken_types::{ constants::TRANSFER, instruction::transfer::CompressedTokenInstructionDataTransfer, CompressedCpiContext, ValidityProof, }; -use light_ctoken_interface::CTOKEN_PROGRAM_ID; use solana_instruction::{AccountMeta, Instruction}; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/mod.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/mod.rs index aa39b7fcd3..d02cd38bd1 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/mod.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v1/transfer/mod.rs @@ -1,4 +1,4 @@ -use light_compressed_token_types::account_infos::TransferAccountInfos as TransferAccountInfosTypes; +use light_ctoken_types::account_infos::TransferAccountInfos as TransferAccountInfosTypes; use solana_account_info::AccountInfo; pub mod account_infos; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_action/cpi_accounts.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_action/cpi_accounts.rs index e22f55e369..22413b4e87 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_action/cpi_accounts.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_action/cpi_accounts.rs @@ -1,6 +1,6 @@ use light_account_checks::{AccountError, AccountInfoTrait, AccountIterator}; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_ctoken_interface::CTOKEN_PROGRAM_ID; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_program_profiler::profile; use light_sdk_types::{ ACCOUNT_COMPRESSION_AUTHORITY_PDA, ACCOUNT_COMPRESSION_PROGRAM_ID, LIGHT_SYSTEM_PROGRAM_ID, diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_to_compressed/instruction.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_to_compressed/instruction.rs index b4001ed392..9ee9ee8c65 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_to_compressed/instruction.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v2/mint_to_compressed/instruction.rs @@ -1,9 +1,9 @@ use light_compressed_account::instruction_data::traits::LightInstructionData; -pub use light_compressed_token_types::account_infos::mint_to_compressed::DecompressedMintConfig; -use light_compressed_token_types::CompressedProof; use light_ctoken_interface::instructions::mint_action::{ CompressedMintWithContext, CpiContext, Recipient, }; +pub use light_ctoken_types::account_infos::mint_to_compressed::DecompressedMintConfig; +use light_ctoken_types::CompressedProof; use solana_instruction::Instruction; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/account_metas.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/account_metas.rs index 3239fb2865..68bae49e47 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/account_metas.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/account_metas.rs @@ -1,4 +1,4 @@ -use light_compressed_token_types::CPI_AUTHORITY_PDA; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_sdk::constants::LIGHT_SYSTEM_PROGRAM_ID; use solana_instruction::AccountMeta; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/cpi_accounts.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/cpi_accounts.rs index 4f45e973e4..caa4b84c1c 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/cpi_accounts.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/cpi_accounts.rs @@ -1,6 +1,6 @@ use light_account_checks::{AccountError, AccountInfoTrait, AccountIterator}; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_ctoken_interface::CTOKEN_PROGRAM_ID; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_program_profiler::profile; use light_sdk_types::{ ACCOUNT_COMPRESSION_AUTHORITY_PDA, ACCOUNT_COMPRESSION_PROGRAM_ID, LIGHT_SYSTEM_PROGRAM_ID, diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/instruction.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/instruction.rs index 1dd55a2945..2e60d2eaa3 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/instruction.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v2/transfer2/instruction.rs @@ -1,8 +1,8 @@ -use light_compressed_token_types::{constants::TRANSFER2, ValidityProof}; use light_ctoken_interface::{ instructions::transfer2::{CompressedCpiContext, CompressedTokenInstructionDataTransfer2}, CTOKEN_PROGRAM_ID, }; +use light_ctoken_types::{constants::TRANSFER2, ValidityProof}; use light_program_profiler::profile; use solana_instruction::Instruction; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/src/compressed_token/v2/update_compressed_mint/instruction.rs b/sdk-libs/ctoken-sdk/src/compressed_token/v2/update_compressed_mint/instruction.rs index 8609da3c68..f62b15957d 100644 --- a/sdk-libs/ctoken-sdk/src/compressed_token/v2/update_compressed_mint/instruction.rs +++ b/sdk-libs/ctoken-sdk/src/compressed_token/v2/update_compressed_mint/instruction.rs @@ -1,11 +1,11 @@ use light_compressed_account::instruction_data::{ compressed_proof::CompressedProof, traits::LightInstructionData, }; -use light_compressed_token_types::CompressedMintAuthorityType; use light_ctoken_interface::{ self, instructions::mint_action::{CompressedMintWithContext, CpiContext}, }; +use light_ctoken_types::CompressedMintAuthorityType; use solana_instruction::Instruction; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/src/constants.rs b/sdk-libs/ctoken-sdk/src/constants.rs index 08929094f3..c53312c423 100644 --- a/sdk-libs/ctoken-sdk/src/constants.rs +++ b/sdk-libs/ctoken-sdk/src/constants.rs @@ -1,25 +1,22 @@ use solana_pubkey::Pubkey; pub const SPL_TOKEN_PROGRAM_ID: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::SPL_TOKEN_PROGRAM_ID); + Pubkey::new_from_array(light_ctoken_types::SPL_TOKEN_PROGRAM_ID); pub const SPL_TOKEN_2022_PROGRAM_ID: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::SPL_TOKEN_2022_PROGRAM_ID); + Pubkey::new_from_array(light_ctoken_types::SPL_TOKEN_2022_PROGRAM_ID); pub const LIGHT_SYSTEM_PROGRAM_ID: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::LIGHT_SYSTEM_PROGRAM_ID); + Pubkey::new_from_array(light_ctoken_types::LIGHT_SYSTEM_PROGRAM_ID); pub const ACCOUNT_COMPRESSION_PROGRAM_ID: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::ACCOUNT_COMPRESSION_PROGRAM_ID); + Pubkey::new_from_array(light_ctoken_types::ACCOUNT_COMPRESSION_PROGRAM_ID); pub const ACCOUNT_COMPRESSION_AUTHORITY_PDA: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::ACCOUNT_COMPRESSION_AUTHORITY_PDA); + Pubkey::new_from_array(light_ctoken_types::ACCOUNT_COMPRESSION_AUTHORITY_PDA); -pub const NOOP_PROGRAM_ID: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::NOOP_PROGRAM_ID); +pub const NOOP_PROGRAM_ID: Pubkey = Pubkey::new_from_array(light_ctoken_types::NOOP_PROGRAM_ID); -pub const CPI_AUTHORITY_PDA: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::CPI_AUTHORITY_PDA); +pub const CPI_AUTHORITY_PDA: Pubkey = Pubkey::new_from_array(light_ctoken_types::CPI_AUTHORITY_PDA); -pub const CTOKEN_PROGRAM_ID: Pubkey = - Pubkey::new_from_array(light_compressed_token_types::PROGRAM_ID); +pub const CTOKEN_PROGRAM_ID: Pubkey = Pubkey::new_from_array(light_ctoken_types::PROGRAM_ID); diff --git a/sdk-libs/ctoken-sdk/src/ctoken/mod.rs b/sdk-libs/ctoken-sdk/src/ctoken/mod.rs index 068f3956a5..5ff8972b92 100644 --- a/sdk-libs/ctoken-sdk/src/ctoken/mod.rs +++ b/sdk-libs/ctoken-sdk/src/ctoken/mod.rs @@ -77,7 +77,6 @@ pub use compressible::{CompressibleParams, CompressibleParamsCpi}; pub use create::*; pub use create_ata::*; pub use create_cmint::*; -use light_compressed_token_types::POOL_SEED; use light_compressible::config::CompressibleConfig; pub use light_ctoken_interface::{ instructions::{ @@ -86,6 +85,7 @@ pub use light_ctoken_interface::{ }, state::TokenDataVersion, }; +use light_ctoken_types::POOL_SEED; pub use mint_to::*; use solana_account_info::AccountInfo; use solana_pubkey::{pubkey, Pubkey}; diff --git a/sdk-libs/ctoken-sdk/src/error.rs b/sdk-libs/ctoken-sdk/src/error.rs index 619e1f7ae7..cf418697b5 100644 --- a/sdk-libs/ctoken-sdk/src/error.rs +++ b/sdk-libs/ctoken-sdk/src/error.rs @@ -1,6 +1,6 @@ use light_account_checks::AccountError; -use light_compressed_token_types::error::LightTokenSdkTypeError; use light_ctoken_interface::CTokenError; +use light_ctoken_types::error::LightTokenSdkTypeError; use light_sdk::error::LightSdkError; use light_sdk_types::error::LightSdkTypesError; use light_zero_copy::errors::ZeroCopyError; diff --git a/sdk-libs/ctoken-sdk/src/spl_interface.rs b/sdk-libs/ctoken-sdk/src/spl_interface.rs index 6d1c38438a..03b353c9e0 100644 --- a/sdk-libs/ctoken-sdk/src/spl_interface.rs +++ b/sdk-libs/ctoken-sdk/src/spl_interface.rs @@ -1,7 +1,7 @@ //! SPL interface PDA derivation utilities. -use light_compressed_token_types::constants::POOL_SEED; use light_ctoken_interface::CTOKEN_PROGRAM_ID; +use light_ctoken_types::constants::POOL_SEED; use solana_pubkey::Pubkey; use crate::{AnchorDeserialize, AnchorSerialize}; diff --git a/sdk-libs/ctoken-sdk/src/utils.rs b/sdk-libs/ctoken-sdk/src/utils.rs index eff2240d81..09072eea4c 100644 --- a/sdk-libs/ctoken-sdk/src/utils.rs +++ b/sdk-libs/ctoken-sdk/src/utils.rs @@ -60,7 +60,7 @@ pub struct AccountInfoToCompress<'info> { pub account_info: AccountInfo<'info>, pub signer_seeds: Vec>, } -use light_compressed_token_types::{ +use light_ctoken_types::{ ACCOUNT_COMPRESSION_AUTHORITY_PDA, ACCOUNT_COMPRESSION_PROGRAM_ID, CPI_AUTHORITY_PDA, LIGHT_SYSTEM_PROGRAM_ID, NOOP_PROGRAM_ID, PROGRAM_ID as LIGHT_COMPRESSED_TOKEN_PROGRAM_ID, }; diff --git a/sdk-libs/ctoken-sdk/tests/account_metas_test.rs b/sdk-libs/ctoken-sdk/tests/account_metas_test.rs index 988ffd0af6..230ebdc948 100644 --- a/sdk-libs/ctoken-sdk/tests/account_metas_test.rs +++ b/sdk-libs/ctoken-sdk/tests/account_metas_test.rs @@ -1,9 +1,5 @@ #![cfg(feature = "v1")] use anchor_lang::ToAccountMetas; -use light_compressed_token_types::constants::{ - ACCOUNT_COMPRESSION_PROGRAM_ID, CPI_AUTHORITY_PDA, LIGHT_SYSTEM_PROGRAM_ID, NOOP_PROGRAM_ID, - PROGRAM_ID as CTOKEN_PROGRAM_ID, -}; use light_ctoken_sdk::{ compressed_token::{ batch_compress::{get_batch_compress_instruction_account_metas, BatchCompressMetaConfig}, @@ -13,6 +9,10 @@ use light_ctoken_sdk::{ }, utils::CTokenDefaultAccounts, }; +use light_ctoken_types::constants::{ + ACCOUNT_COMPRESSION_PROGRAM_ID, CPI_AUTHORITY_PDA, LIGHT_SYSTEM_PROGRAM_ID, NOOP_PROGRAM_ID, + PROGRAM_ID as CTOKEN_PROGRAM_ID, +}; use light_sdk::constants::REGISTERED_PROGRAM_PDA; use solana_pubkey::Pubkey; diff --git a/sdk-libs/ctoken-sdk/tests/mint_action_cpi_accounts_tests.rs b/sdk-libs/ctoken-sdk/tests/mint_action_cpi_accounts_tests.rs index 4e7eb0e1dc..4f48f81fbe 100644 --- a/sdk-libs/ctoken-sdk/tests/mint_action_cpi_accounts_tests.rs +++ b/sdk-libs/ctoken-sdk/tests/mint_action_cpi_accounts_tests.rs @@ -1,11 +1,11 @@ #![cfg(test)] use light_account_checks::account_info::test_account_info::pinocchio::get_account_info; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_ctoken_interface::CTOKEN_PROGRAM_ID; use light_ctoken_sdk::compressed_token::mint_action::{ cpi_accounts::MintActionCpiAccountsConfig, MintActionCpiAccounts, }; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_sdk_types::{ ACCOUNT_COMPRESSION_AUTHORITY_PDA, ACCOUNT_COMPRESSION_PROGRAM_ID, LIGHT_SYSTEM_PROGRAM_ID, REGISTERED_PROGRAM_PDA, diff --git a/sdk-libs/compressed-token-types/Cargo.toml b/sdk-libs/ctoken-types/Cargo.toml similarity index 93% rename from sdk-libs/compressed-token-types/Cargo.toml rename to sdk-libs/ctoken-types/Cargo.toml index e81af4acb1..b36d669031 100644 --- a/sdk-libs/compressed-token-types/Cargo.toml +++ b/sdk-libs/ctoken-types/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "light-compressed-token-types" +name = "light-ctoken-types" version = "0.1.0" edition = "2021" diff --git a/sdk-libs/compressed-token-types/src/account_infos/batch_compress.rs b/sdk-libs/ctoken-types/src/account_infos/batch_compress.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/batch_compress.rs rename to sdk-libs/ctoken-types/src/account_infos/batch_compress.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/burn.rs b/sdk-libs/ctoken-types/src/account_infos/burn.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/burn.rs rename to sdk-libs/ctoken-types/src/account_infos/burn.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/config.rs b/sdk-libs/ctoken-types/src/account_infos/config.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/config.rs rename to sdk-libs/ctoken-types/src/account_infos/config.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/create_compressed_mint.rs b/sdk-libs/ctoken-types/src/account_infos/create_compressed_mint.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/create_compressed_mint.rs rename to sdk-libs/ctoken-types/src/account_infos/create_compressed_mint.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/freeze.rs b/sdk-libs/ctoken-types/src/account_infos/freeze.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/freeze.rs rename to sdk-libs/ctoken-types/src/account_infos/freeze.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/mint_to.rs b/sdk-libs/ctoken-types/src/account_infos/mint_to.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/mint_to.rs rename to sdk-libs/ctoken-types/src/account_infos/mint_to.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/mint_to_compressed.rs b/sdk-libs/ctoken-types/src/account_infos/mint_to_compressed.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/mint_to_compressed.rs rename to sdk-libs/ctoken-types/src/account_infos/mint_to_compressed.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/mod.rs b/sdk-libs/ctoken-types/src/account_infos/mod.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/mod.rs rename to sdk-libs/ctoken-types/src/account_infos/mod.rs diff --git a/sdk-libs/compressed-token-types/src/account_infos/transfer.rs b/sdk-libs/ctoken-types/src/account_infos/transfer.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/account_infos/transfer.rs rename to sdk-libs/ctoken-types/src/account_infos/transfer.rs diff --git a/sdk-libs/compressed-token-types/src/constants.rs b/sdk-libs/ctoken-types/src/constants.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/constants.rs rename to sdk-libs/ctoken-types/src/constants.rs diff --git a/sdk-libs/compressed-token-types/src/error.rs b/sdk-libs/ctoken-types/src/error.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/error.rs rename to sdk-libs/ctoken-types/src/error.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/batch_compress.rs b/sdk-libs/ctoken-types/src/instruction/batch_compress.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/batch_compress.rs rename to sdk-libs/ctoken-types/src/instruction/batch_compress.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/burn.rs b/sdk-libs/ctoken-types/src/instruction/burn.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/burn.rs rename to sdk-libs/ctoken-types/src/instruction/burn.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/delegation.rs b/sdk-libs/ctoken-types/src/instruction/delegation.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/delegation.rs rename to sdk-libs/ctoken-types/src/instruction/delegation.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/freeze.rs b/sdk-libs/ctoken-types/src/instruction/freeze.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/freeze.rs rename to sdk-libs/ctoken-types/src/instruction/freeze.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/generic.rs b/sdk-libs/ctoken-types/src/instruction/generic.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/generic.rs rename to sdk-libs/ctoken-types/src/instruction/generic.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/mint_to.rs b/sdk-libs/ctoken-types/src/instruction/mint_to.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/mint_to.rs rename to sdk-libs/ctoken-types/src/instruction/mint_to.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/mod.rs b/sdk-libs/ctoken-types/src/instruction/mod.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/mod.rs rename to sdk-libs/ctoken-types/src/instruction/mod.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/transfer.rs b/sdk-libs/ctoken-types/src/instruction/transfer.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/transfer.rs rename to sdk-libs/ctoken-types/src/instruction/transfer.rs diff --git a/sdk-libs/compressed-token-types/src/instruction/update_compressed_mint.rs b/sdk-libs/ctoken-types/src/instruction/update_compressed_mint.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/instruction/update_compressed_mint.rs rename to sdk-libs/ctoken-types/src/instruction/update_compressed_mint.rs diff --git a/sdk-libs/compressed-token-types/src/lib.rs b/sdk-libs/ctoken-types/src/lib.rs similarity index 100% rename from sdk-libs/compressed-token-types/src/lib.rs rename to sdk-libs/ctoken-types/src/lib.rs diff --git a/sdk-libs/token-client/Cargo.toml b/sdk-libs/token-client/Cargo.toml index f83a70f287..1605305a1e 100644 --- a/sdk-libs/token-client/Cargo.toml +++ b/sdk-libs/token-client/Cargo.toml @@ -7,7 +7,7 @@ edition = { workspace = true } [dependencies] # Light Protocol dependencies -light-compressed-token-types = { workspace = true } +light-ctoken-types = { workspace = true } light-compressed-account = { workspace = true, features = ["std"] } light-ctoken-interface = { workspace = true } light-sdk = { workspace = true } diff --git a/sdk-libs/token-client/src/actions/update_compressed_mint.rs b/sdk-libs/token-client/src/actions/update_compressed_mint.rs index 4b6c026257..42a3ae5b6b 100644 --- a/sdk-libs/token-client/src/actions/update_compressed_mint.rs +++ b/sdk-libs/token-client/src/actions/update_compressed_mint.rs @@ -2,7 +2,7 @@ use light_client::{ indexer::Indexer, rpc::{Rpc, RpcError}, }; -use light_compressed_token_types::CompressedMintAuthorityType; +use light_ctoken_types::CompressedMintAuthorityType; use solana_keypair::Keypair; use solana_pubkey::Pubkey; use solana_signature::Signature; diff --git a/sdk-libs/token-client/src/instructions/update_compressed_mint.rs b/sdk-libs/token-client/src/instructions/update_compressed_mint.rs index 3f9fec22ca..154cbf9a4b 100644 --- a/sdk-libs/token-client/src/instructions/update_compressed_mint.rs +++ b/sdk-libs/token-client/src/instructions/update_compressed_mint.rs @@ -3,7 +3,6 @@ use light_client::{ indexer::Indexer, rpc::{Rpc, RpcError}, }; -use light_compressed_token_types::CompressedMintAuthorityType; use light_ctoken_interface::{ instructions::mint_action::{CompressedMintInstructionData, CompressedMintWithContext}, state::CompressedMint, @@ -11,6 +10,7 @@ use light_ctoken_interface::{ use light_ctoken_sdk::compressed_token::update_compressed_mint::{ update_compressed_mint, UpdateCompressedMintInputs, }; +use light_ctoken_types::CompressedMintAuthorityType; use solana_instruction::Instruction; use solana_keypair::Keypair; use solana_pubkey::Pubkey; diff --git a/sdk-tests/CLAUDE.md b/sdk-tests/CLAUDE.md index 9f3b4bb3f7..2329cb409e 100644 --- a/sdk-tests/CLAUDE.md +++ b/sdk-tests/CLAUDE.md @@ -93,7 +93,7 @@ cargo test -p light-sdk --all-features cargo test -p light-program-test cargo test -p light-client cargo test -p light-sparse-merkle-tree -cargo test -p light-compressed-token-types +cargo test -p light-ctoken-types cargo test -p light-ctoken-sdk ``` diff --git a/sdk-tests/csdk-anchor-derived-test/Cargo.toml b/sdk-tests/csdk-anchor-derived-test/Cargo.toml index a23ca35b46..1afce0cc75 100644 --- a/sdk-tests/csdk-anchor-derived-test/Cargo.toml +++ b/sdk-tests/csdk-anchor-derived-test/Cargo.toml @@ -31,7 +31,7 @@ anchor-lang = { workspace = true, features = ["idl-build"] } anchor-spl = { version = "=0.31.1", git = "https://github.com/lightprotocol/anchor", rev = "d8a2b3d9", features = ["memo", "metadata", "idl-build"] } light-ctoken-interface = { workspace = true, features = ["anchor"] } light-ctoken-sdk = { workspace = true, features = ["anchor", "compressible"] } -light-compressed-token-types = { workspace = true, features = ["anchor"] } +light-ctoken-types = { workspace = true, features = ["anchor"] } light-compressible = { workspace = true, features = ["anchor"] } [dev-dependencies] diff --git a/sdk-tests/csdk-anchor-derived-test/tests/basic_test.rs b/sdk-tests/csdk-anchor-derived-test/tests/basic_test.rs index e49651a712..4e93b68646 100644 --- a/sdk-tests/csdk-anchor-derived-test/tests/basic_test.rs +++ b/sdk-tests/csdk-anchor-derived-test/tests/basic_test.rs @@ -586,8 +586,7 @@ pub async fn create_user_record_and_game_session( config: *config_pda, rent_sponsor: RENT_SPONSOR, mint_authority, - compress_token_program_cpi_authority: light_compressed_token_types::CPI_AUTHORITY_PDA - .into(), + compress_token_program_cpi_authority: light_ctoken_types::CPI_AUTHORITY_PDA.into(), }; let user_compressed_address = derive_address( diff --git a/sdk-tests/csdk-anchor-full-derived-test/Cargo.toml b/sdk-tests/csdk-anchor-full-derived-test/Cargo.toml index 4dbdbf80a7..21b78a54d2 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/Cargo.toml +++ b/sdk-tests/csdk-anchor-full-derived-test/Cargo.toml @@ -33,7 +33,7 @@ anchor-lang = { workspace = true, features = ["idl-build"] } anchor-spl = { version = "=0.31.1", git = "https://github.com/lightprotocol/anchor", rev = "d8a2b3d9", features = ["memo", "metadata", "idl-build"] } light-ctoken-interface = { workspace = true, features = ["anchor"] } light-ctoken-sdk = { workspace = true, features = ["anchor", "compressible"] } -light-compressed-token-types = { workspace = true, features = ["anchor"] } +light-ctoken-types = { workspace = true, features = ["anchor"] } light-compressible = { workspace = true, features = ["anchor"] } [dev-dependencies] diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs index f9ac19985e..8b02ab4f2d 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs @@ -237,8 +237,7 @@ pub async fn create_user_record_and_game_session( mint_authority, some_account: some_account.pubkey(), ctoken_program: C_TOKEN_PROGRAM_ID.into(), - compress_token_program_cpi_authority: light_compressed_token_types::CPI_AUTHORITY_PDA - .into(), + compress_token_program_cpi_authority: light_ctoken_types::CPI_AUTHORITY_PDA.into(), system_program: solana_sdk::system_program::ID, config: *config_pda, rent_sponsor: RENT_SPONSOR, diff --git a/sdk-tests/sdk-compressible-test/Cargo.toml b/sdk-tests/sdk-compressible-test/Cargo.toml index f7840a2d3a..5387cd75e8 100644 --- a/sdk-tests/sdk-compressible-test/Cargo.toml +++ b/sdk-tests/sdk-compressible-test/Cargo.toml @@ -30,7 +30,7 @@ anchor-lang = { workspace = true, features = ["idl-build"] } anchor-spl = { version = "=0.31.1", git = "https://github.com/lightprotocol/anchor", rev = "d8a2b3d9", features = ["memo", "metadata", "idl-build"] } light-ctoken-interface = { workspace = true, features = ["anchor"] } light-ctoken-sdk = { workspace = true, features = ["anchor", "compressible"] } -light-compressed-token-types = { workspace = true, features = ["anchor"] } +light-ctoken-types = { workspace = true, features = ["anchor"] } light-compressible = { workspace = true, features = ["anchor"] } [dev-dependencies] diff --git a/sdk-tests/sdk-compressible-test/tests/multi_account_tests.rs b/sdk-tests/sdk-compressible-test/tests/multi_account_tests.rs index 3d5c7b2fee..5ef5cdd5c8 100644 --- a/sdk-tests/sdk-compressible-test/tests/multi_account_tests.rs +++ b/sdk-tests/sdk-compressible-test/tests/multi_account_tests.rs @@ -3,7 +3,6 @@ use anchor_lang::{ }; use light_client::indexer::CompressedAccount; use light_compressed_account::address::derive_address; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_compressible_client::compressible_instruction; use light_ctoken_interface::{ instructions::mint_action::{CompressedMintInstructionData, CompressedMintWithContext}, @@ -16,6 +15,7 @@ use light_ctoken_sdk::{ ctoken, pack::compat::CTokenDataWithVariant, }; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_program_test::{ program_test::{ initialize_compression_config, setup_mock_program_data, LightProgramTest, TestRpc, diff --git a/sdk-tests/sdk-ctoken-test/Cargo.lock b/sdk-tests/sdk-ctoken-test/Cargo.lock index 66ff66b0ef..d30c23b5f9 100644 --- a/sdk-tests/sdk-ctoken-test/Cargo.lock +++ b/sdk-tests/sdk-ctoken-test/Cargo.lock @@ -2494,7 +2494,7 @@ dependencies = [ "borsh 0.10.4", "light-account-checks", "light-compressed-account", - "light-compressed-token-types", + "light-ctoken-types", "light-compressible", "light-ctoken-interface", "light-macros", @@ -2514,7 +2514,7 @@ dependencies = [ ] [[package]] -name = "light-compressed-token-types" +name = "light-ctoken-types" version = "0.1.0" dependencies = [ "borsh 0.10.4", @@ -3062,7 +3062,7 @@ dependencies = [ "light-client", "light-compressed-account", "light-ctoken-sdk", - "light-compressed-token-types", + "light-ctoken-types", "light-compressible-client", "light-ctoken-interface", "light-program-test", diff --git a/sdk-tests/sdk-ctoken-test/Cargo.toml b/sdk-tests/sdk-ctoken-test/Cargo.toml index 44fb35fd06..3f7c7d567b 100644 --- a/sdk-tests/sdk-ctoken-test/Cargo.toml +++ b/sdk-tests/sdk-ctoken-test/Cargo.toml @@ -17,7 +17,7 @@ default = [] [dependencies] # Light Protocol SDK dependencies (workspace-based) light-ctoken-sdk = { workspace = true } -light-compressed-token-types = { workspace = true } +light-ctoken-types = { workspace = true } light-ctoken-interface = { workspace = true } light-sdk = { workspace = true, features = ["v2"] } light-sdk-types = { workspace = true } diff --git a/sdk-tests/sdk-ctoken-test/README.md b/sdk-tests/sdk-ctoken-test/README.md index bca5d1d6c4..2d10b6397c 100644 --- a/sdk-tests/sdk-ctoken-test/README.md +++ b/sdk-tests/sdk-ctoken-test/README.md @@ -95,7 +95,7 @@ ctoken/native/ All dependencies use **path references** to `/Users/ananas/dev/light-protocol2/sdk-libs/`: - `light-ctoken-sdk` → Main SDK with ctoken builder pattern -- `light-compressed-token-types` → Type definitions +- `light-ctoken-types` → Type definitions - `light-sdk` → Core SDK - `light-sdk-types` → Common types - `light-program-test` → Testing framework (dev dependency) diff --git a/sdk-tests/sdk-ctoken-test/tests/test_transfer_interface.rs b/sdk-tests/sdk-ctoken-test/tests/test_transfer_interface.rs index 3b87fca1e2..68845911b8 100644 --- a/sdk-tests/sdk-ctoken-test/tests/test_transfer_interface.rs +++ b/sdk-tests/sdk-ctoken-test/tests/test_transfer_interface.rs @@ -4,11 +4,11 @@ mod shared; use borsh::BorshSerialize; use light_client::rpc::Rpc; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_ctoken_sdk::{ ctoken::{derive_ctoken_ata, CreateAssociatedTokenAccount}, spl_interface::find_spl_interface_pda_with_index, }; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_program_test::{LightProgramTest, ProgramTestConfig}; use light_test_utils::spl::{create_mint_helper, create_token_2022_account, mint_spl_tokens}; use native_ctoken_examples::{TransferInterfaceData, ID, TRANSFER_INTERFACE_AUTHORITY_SEED}; diff --git a/sdk-tests/sdk-ctoken-test/tests/test_transfer_spl_ctoken.rs b/sdk-tests/sdk-ctoken-test/tests/test_transfer_spl_ctoken.rs index 107cf3425e..3ef7f7b1d2 100644 --- a/sdk-tests/sdk-ctoken-test/tests/test_transfer_spl_ctoken.rs +++ b/sdk-tests/sdk-ctoken-test/tests/test_transfer_spl_ctoken.rs @@ -4,11 +4,11 @@ mod shared; use borsh::BorshSerialize; use light_client::rpc::Rpc; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_ctoken_sdk::{ ctoken::{derive_ctoken_ata, CreateAssociatedTokenAccount}, spl_interface::find_spl_interface_pda_with_index, }; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_program_test::{LightProgramTest, ProgramTestConfig}; use light_test_utils::spl::{create_mint_helper, create_token_2022_account, mint_spl_tokens}; use native_ctoken_examples::{ diff --git a/sdk-tests/sdk-token-test/Cargo.toml b/sdk-tests/sdk-token-test/Cargo.toml index 1c086c53eb..8c7dd728e3 100644 --- a/sdk-tests/sdk-token-test/Cargo.toml +++ b/sdk-tests/sdk-token-test/Cargo.toml @@ -32,7 +32,7 @@ profile-heap = [ [dependencies] light-ctoken-sdk = { workspace = true, features = ["anchor", "cpi-context", "v1"] } -light-compressed-token-types = { workspace = true } +light-ctoken-types = { workspace = true } anchor-lang = { workspace = true } light-hasher = { workspace = true } light-sdk = { workspace = true, features = ["v2", "cpi-context"] } diff --git a/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs b/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs index 1c79b0422c..1a9eb22f78 100644 --- a/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs +++ b/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs @@ -1,8 +1,8 @@ use anchor_lang::{prelude::*, solana_program::program::invoke}; -use light_compressed_token_types::account_infos::BatchCompressAccountInfos; use light_ctoken_sdk::compressed_token::batch_compress::{ create_batch_compress_instruction, BatchCompressInputs, Recipient, }; +use light_ctoken_types::account_infos::BatchCompressAccountInfos; use crate::Generic; diff --git a/sdk-tests/sdk-token-test/tests/ctoken_pda.rs b/sdk-tests/sdk-token-test/tests/ctoken_pda.rs index a81d1905ee..6fd3e29e28 100644 --- a/sdk-tests/sdk-token-test/tests/ctoken_pda.rs +++ b/sdk-tests/sdk-token-test/tests/ctoken_pda.rs @@ -1,7 +1,6 @@ use anchor_lang::{AnchorDeserialize, InstructionData, ToAccountMetas}; use light_client::indexer::Indexer; use light_compressed_account::{address::derive_address, hash_to_bn254_field_size_be}; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_ctoken_interface::{ instructions::{ extensions::token_metadata::TokenMetadataInstructionData, @@ -13,6 +12,7 @@ use light_ctoken_interface::{ use light_ctoken_sdk::compressed_token::create_compressed_mint::{ derive_cmint_compressed_address, find_cmint_address, }; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_program_test::{LightProgramTest, ProgramTestConfig, Rpc, RpcError}; use light_sdk::instruction::{PackedAccounts, SystemAccountMetaConfig}; use sdk_token_test::{ChainedCtokenInstructionData, PdaCreationData, ID}; diff --git a/sdk-tests/sdk-token-test/tests/pda_ctoken.rs b/sdk-tests/sdk-token-test/tests/pda_ctoken.rs index 7b9c59f677..3d28152ff3 100644 --- a/sdk-tests/sdk-token-test/tests/pda_ctoken.rs +++ b/sdk-tests/sdk-token-test/tests/pda_ctoken.rs @@ -4,7 +4,6 @@ use anchor_lang::{ use anchor_spl::token_interface::spl_token_2022; use light_client::indexer::Indexer; use light_compressed_account::{address::derive_address, hash_to_bn254_field_size_be}; -use light_compressed_token_types::CPI_AUTHORITY_PDA; use light_ctoken_interface::{ instructions::{ extensions::token_metadata::TokenMetadataInstructionData, @@ -19,6 +18,7 @@ use light_ctoken_sdk::{ }, ctoken::{derive_ctoken_ata, CompressibleParams, CreateAssociatedTokenAccount}, }; +use light_ctoken_types::CPI_AUTHORITY_PDA; use light_program_test::{LightProgramTest, ProgramTestConfig, Rpc, RpcError}; use light_sdk::instruction::{PackedAccounts, SystemAccountMetaConfig}; use sdk_token_test::{ChainedCtokenInstructionData, PdaCreationData, ID}; diff --git a/sdk-tests/sdk-token-test/tests/test.rs b/sdk-tests/sdk-token-test/tests/test.rs index e2de43203f..9ecff1ba77 100644 --- a/sdk-tests/sdk-token-test/tests/test.rs +++ b/sdk-tests/sdk-token-test/tests/test.rs @@ -3,7 +3,6 @@ use anchor_lang::{AccountDeserialize, InstructionData}; use anchor_spl::token::TokenAccount; use light_client::indexer::CompressedTokenAccount; -use light_compressed_token_types::{TokenAccountMeta, SPL_TOKEN_PROGRAM_ID}; use light_ctoken_sdk::{ compressed_token::{ batch_compress::{ @@ -15,6 +14,7 @@ use light_ctoken_sdk::{ }, spl_interface::{find_spl_interface_pda_with_index, get_spl_interface_pda}, }; +use light_ctoken_types::{TokenAccountMeta, SPL_TOKEN_PROGRAM_ID}; use light_program_test::{Indexer, LightProgramTest, ProgramTestConfig, Rpc}; use light_sdk::instruction::PackedAccounts; use light_test_utils::{ diff --git a/sdk-tests/sdk-token-test/tests/test_4_invocations.rs b/sdk-tests/sdk-token-test/tests/test_4_invocations.rs index ee3616a02b..c3f413d5cd 100644 --- a/sdk-tests/sdk-token-test/tests/test_4_invocations.rs +++ b/sdk-tests/sdk-token-test/tests/test_4_invocations.rs @@ -1,5 +1,4 @@ use anchor_lang::{prelude::AccountMeta, AccountDeserialize, InstructionData}; -use light_compressed_token_types::SPL_TOKEN_PROGRAM_ID; use light_ctoken_sdk::{ compressed_token::{ transfer::account_metas::{ @@ -10,6 +9,7 @@ use light_ctoken_sdk::{ spl_interface::get_spl_interface_pda, utils::CTokenDefaultAccounts, }; +use light_ctoken_types::SPL_TOKEN_PROGRAM_ID; use light_program_test::{AddressWithTree, Indexer, LightProgramTest, ProgramTestConfig, Rpc}; use light_sdk::{ address::v1::derive_address, diff --git a/sdk-tests/sdk-token-test/tests/test_deposit.rs b/sdk-tests/sdk-token-test/tests/test_deposit.rs index 06dab630b2..8084dc363e 100644 --- a/sdk-tests/sdk-token-test/tests/test_deposit.rs +++ b/sdk-tests/sdk-token-test/tests/test_deposit.rs @@ -1,6 +1,5 @@ use anchor_lang::InstructionData; use light_client::indexer::{CompressedAccount, CompressedTokenAccount, IndexerRpcConfig}; -use light_compressed_token_types::{TokenAccountMeta, SPL_TOKEN_PROGRAM_ID}; use light_ctoken_sdk::{ compressed_token::batch_compress::{ get_batch_compress_instruction_account_metas, BatchCompressMetaConfig, Recipient, @@ -8,6 +7,7 @@ use light_ctoken_sdk::{ spl_interface::find_spl_interface_pda_with_index, utils::CTokenDefaultAccounts, }; +use light_ctoken_types::{TokenAccountMeta, SPL_TOKEN_PROGRAM_ID}; use light_program_test::{AddressWithTree, Indexer, LightProgramTest, ProgramTestConfig, Rpc}; use light_sdk::{ address::v1::derive_address,