Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
44 changes: 22 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion program-libs/account-checks/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion program-tests/compressed-token-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ fn build_compressions_only_instruction(
packed_account_metas: Vec<solana_sdk::instruction::AccountMeta>,
) -> Result<solana_sdk::instruction::Instruction, RpcError> {
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:
Expand Down
4 changes: 2 additions & 2 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions sdk-libs/ctoken-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion sdk-libs/ctoken-sdk/src/compressed_token/v1/account.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion sdk-libs/ctoken-sdk/src/compressed_token/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
19 changes: 8 additions & 11 deletions sdk-libs/ctoken-sdk/src/constants.rs
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion sdk-libs/ctoken-sdk/src/ctoken/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand All @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion sdk-libs/ctoken-sdk/src/error.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading