Skip to main content

light_token/
constants.rs

1//! Constants for Light Token SDK.
2//!
3//! Re-exports constants from `light_compressed_token_sdk::constants` and adds
4//! Light Token specific constants.
5
6// Re-export all constants from compressed-token-sdk
7pub use light_compressed_token_sdk::constants::*;
8use light_compressible::config::CompressibleConfig;
9use solana_pubkey::{pubkey, Pubkey};
10
11/// CPI Authority PDA for the Light Token Program
12pub const LIGHT_TOKEN_CPI_AUTHORITY: Pubkey =
13    pubkey!("GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy");
14
15/// Returns the program ID for the Light Token Program
16pub fn id() -> Pubkey {
17    LIGHT_TOKEN_PROGRAM_ID
18}
19
20/// Return the CPI authority PDA of the Light Token Program.
21pub fn cpi_authority() -> Pubkey {
22    LIGHT_TOKEN_CPI_AUTHORITY
23}
24
25/// Default compressible config PDA (V1)
26pub const LIGHT_TOKEN_CONFIG: Pubkey = pubkey!("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg");
27
28/// Default rent sponsor PDA (V1)
29pub const RENT_SPONSOR_V1: Pubkey = pubkey!("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti");
30
31/// Returns the default compressible config PDA.
32pub fn config_pda() -> Pubkey {
33    CompressibleConfig::light_token_v1_config_pda()
34}
35
36/// Returns the default rent sponsor PDA.
37pub fn rent_sponsor_pda() -> Pubkey {
38    CompressibleConfig::light_token_v1_rent_sponsor_pda()
39}
40
41/// Returns the compression authority PDA.
42pub fn compression_authority_pda() -> Pubkey {
43    CompressibleConfig::light_token_v1_compression_authority_pda()
44}