Skip to main content

Crate light_macros

Crate light_macros 

Source
Expand description

§light-macros

Proc macros for Light Protocol on-chain programs.

MacroDescription
pubkey!Convert base58 public key to Pubkey at compile time
pubkey_array!Convert base58 public key to [u8; 32] at compile time
derive_light_cpi_signer!Derive CPI signer PDA, program ID, and bump seed
derive_light_cpi_signer_pda!Derive CPI signer PDA address and bump seed
#[heap_neutral]Assert a function frees all heap it allocates
#[derive(Noop)]No-op derive placeholder

Macros§

derive_light_cpi_signer
Derives a complete Light Protocol CPI configuration at runtime
derive_light_cpi_signer_pda
Derives a Light Protocol CPI signer PDA at compile time
pubkey
Converts a base58 encoded public key into a byte array.
pubkey_array
Converts a base58 encoded public key into a raw byte array [u8; 32].

Attribute Macros§

heap_neutral

Derive Macros§

Noop
No-op derive macro that does nothing. Used as a placeholder for serialization derives when not needed.