Skip to main content

Session

Derive Macro Session 

Source
#[derive(Session)]
{
    // Attributes available to this derive:
    #[session]
}
Expand description

Derive macro for the Session trait (V1) or SessionV2 trait. Auto-detects based on the field type:

  • Option<Account<'info, SessionToken>> → implements Session
  • Option<Account<'info, SessionTokenV2>> → implements SessionV2