Skip to main content

light_token/
spl_interface.rs

1//! SPL interface PDA derivation utilities.
2//!
3//! Re-exports from `light_compressed_token_sdk::spl_interface` with additional helpers.
4
5// Re-export everything from compressed-token-sdk spl_interface
6pub use light_compressed_token_sdk::spl_interface::*;
7use light_token_types::POOL_SEED;
8use solana_pubkey::Pubkey;
9
10use crate::instruction::LIGHT_TOKEN_PROGRAM_ID;
11
12/// Get the SPL interface PDA and bump for a given mint (index 0, non-restricted).
13pub fn get_spl_interface_pda_and_bump(mint: &Pubkey) -> (Pubkey, u8) {
14    Pubkey::find_program_address(&[POOL_SEED, mint.as_ref()], &LIGHT_TOKEN_PROGRAM_ID)
15}