//! This code was AUTOGENERATED using the kinobi library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun kinobi to update it.
//!
//! [https://github.com/metaplex-foundation/kinobi]
//!

#![allow(unexpected_cfgs)]

use borsh::{BorshDeserialize, BorshSerialize};

pub mod accounts;
pub mod errors;
pub mod instructions;
pub mod programs;

pub use programs::MAGICBLOCK_PERMISSION_PROGRAM_ID;

/// Helper trait to make the generated code compatible with borsh 1.5
pub trait BorshCompatibility
where
    Self: BorshDeserialize + BorshSerialize,
{
    fn try_to_vec(&self) -> Result<Vec<u8>, std::io::Error> {
        let mut data = Vec::new();
        self.serialize(&mut data)?;
        Ok(data)
    }
}
