Skip to main content

kvault_interface/state/
reserve_whitelist.rs

1use bytemuck::{Pod, Zeroable};
2use solana_pubkey::Pubkey;
3
4/// PDA account controlling which Kamino Lending reserves a vault can use.
5///
6/// On-chain this uses `#[account]` (Borsh), but all fields are fixed-size
7/// so the byte layout is identical to C repr after the 8-byte discriminator.
8#[derive(Debug, Clone, Copy, Pod, Zeroable)]
9#[repr(C)]
10pub struct ReserveWhitelistEntry {
11    /// SPL token mint of the whitelisted reserve.
12    pub token_mint: Pubkey,
13    /// Klend reserve account address.
14    pub reserve: Pubkey,
15    /// When non-zero (`1`), this reserve can be added as an allocation target.
16    pub whitelist_add_allocation: u8,
17    /// When non-zero (`1`), invest operations are permitted for this reserve.
18    pub whitelist_invest: u8,
19    /// Reserved for future use.
20    pub padding: [u8; 62],
21}
22
23const _: () = assert!(core::mem::size_of::<ReserveWhitelistEntry>() == 128);