Skip to main contentCrate light_sdk_macros
Source - derive_light_rent_sponsor
- Derives a complete Rent Sponsor configuration for a program at compile time.
- derive_light_rent_sponsor_pda
- Derives a Rent Sponsor PDA for a program at compile time.
- account
- light_program
- Auto-discovering Light program macro that reads external module files.
- AnchorDiscriminator
- Derives a discriminator using SHA256(“account:{struct_name}”)[0..8].
- CompressAs
- Legacy CompressAs trait implementation (use Compressible instead).
- HasCompressionInfo
- Automatically implements the HasCompressionInfo trait for structs that have a
compression_info: Option<CompressionInfo> field. - LightAccount
- Generates a unified
LightAccount trait implementation for light account structs. - LightAccounts
- Generates
LightFinalize trait implementation for Light Protocol accounts. - LightDiscriminator
- Derives a discriminator using SHA256(“{struct_name}”)[0..8].
- LightHasher
- Makes the annotated struct hashable by implementing the following traits:
- LightHasherSha
- SHA256 variant of the LightHasher derive macro.
- LightPinocchioAccount
- Pinocchio variant of
LightAccount derive macro. - LightProgram
- Derive macro for manually specifying compressed account variants on an enum.
- LightProgramPinocchio
- Pinocchio variant of
#[derive(LightProgram)].