Place #[light_account] below standard Anchor #[account] on the same field.
Anchor handles seeds, space, and payer; LightAccount handles rent-free creation.
Creates a rent-free token account via CPI to the Light Token program. The account type is UncheckedAccount because Light Token program initializes it via CPI.attribute
Add these to your init struct alongside the fields above. The LightAccounts derive macro appends additional protocol accounts to the instruction at runtime — you don’t add those manually.
PDA
Token / ATA / Mint
Account
Description
compression_config
Per-program PDA. Stores rent sponsor address and compression settings. Initialize once via InitializeRentFreeConfig.
pda_rent_sponsor
Per-program PDA. Receives rent-exemption lamports when accounts compress. Must be mutable.
system_program
Solana System Program. Transfers lamports for rent-exemption.
Account
Description
light_token_compressible_config
Protocol PDA. Stores rent-config for Light Token accounts.
light_token_rent_sponsor
Protocol PDA. Holds the lamport pool that sponsors rent-exemption. Reclaims lamports when accounts compress.
light_token_program
Light Token program. CPI target for token, ATA, and mint creation.
light_token_cpi_authority
Signer PDA. Authorizes CPI calls from your program to the Light Token program.
system_program
Solana System Program. Transfers lamports for rent-exemption.